@florid-kit/components 0.2.1 → 0.2.2
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/assets/icons/icons.d.ts +1 -0
- package/components/icon-button.d.ts +20 -0
- package/components/wishlist-button.d.ts +16 -0
- package/index.js +206 -18
- package/index.mjs +513 -218
- package/package.json +2 -2
package/index.mjs
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
7
|
-
let
|
|
6
|
+
const I = globalThis, Q = I.ShadowRoot && (I.ShadyCSS === void 0 || I.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, X = Symbol(), rt = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let ft = class {
|
|
8
8
|
constructor(t, e, s) {
|
|
9
|
-
if (this._$cssResult$ = !0, s !==
|
|
9
|
+
if (this._$cssResult$ = !0, s !== X) 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
|
-
if (
|
|
15
|
+
if (Q && t === void 0) {
|
|
16
16
|
const s = e !== void 0 && e.length === 1;
|
|
17
|
-
s && (t =
|
|
17
|
+
s && (t = rt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && rt.set(e, t));
|
|
18
18
|
}
|
|
19
19
|
return t;
|
|
20
20
|
}
|
|
@@ -22,33 +22,33 @@ let lt = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
26
|
-
const e = i.length === 1 ? i[0] : t.reduce((s, r,
|
|
27
|
-
if (
|
|
28
|
-
if (typeof
|
|
29
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " +
|
|
30
|
-
})(r) + i[
|
|
31
|
-
return new
|
|
32
|
-
},
|
|
33
|
-
if (
|
|
25
|
+
const gt = (i) => new ft(typeof i == "string" ? i : i + "", void 0, X), R = (i, ...t) => {
|
|
26
|
+
const e = i.length === 1 ? i[0] : t.reduce((s, r, n) => s + ((o) => {
|
|
27
|
+
if (o._$cssResult$ === !0) return o.cssText;
|
|
28
|
+
if (typeof o == "number") return o;
|
|
29
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
|
+
})(r) + i[n + 1], i[0]);
|
|
31
|
+
return new ft(e, i, X);
|
|
32
|
+
}, St = (i, t) => {
|
|
33
|
+
if (Q) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
34
34
|
else for (const e of t) {
|
|
35
|
-
const s = document.createElement("style"), r =
|
|
35
|
+
const s = document.createElement("style"), r = I.litNonce;
|
|
36
36
|
r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, it = Q ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
39
39
|
let e = "";
|
|
40
40
|
for (const s of t.cssRules) e += s.cssText;
|
|
41
|
-
return
|
|
41
|
+
return gt(e);
|
|
42
42
|
})(i) : i;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: Et, defineProperty: xt, getOwnPropertyDescriptor: Pt, getOwnPropertyNames: Ct, getOwnPropertySymbols: Ot, getPrototypeOf: Ut } = Object, v = globalThis, ot = v.trustedTypes, Tt = ot ? ot.emptyScript : "", W = v.reactiveElementPolyfillSupport, U = (i, t) => i, L = { toAttribute(i, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
i = i ?
|
|
51
|
+
i = i ? Tt : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,46 +73,46 @@ const { is: bt, defineProperty: _t, getOwnPropertyDescriptor: mt, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return e;
|
|
76
|
-
} },
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
78
|
-
class
|
|
76
|
+
} }, Y = (i, t) => !Et(i, t), nt = { attribute: !0, type: String, converter: L, reflect: !1, hasChanged: Y };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), v.litPropertyMetadata ?? (v.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
|
+
class x extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
81
81
|
}
|
|
82
82
|
static get observedAttributes() {
|
|
83
83
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
84
|
}
|
|
85
|
-
static createProperty(t, e =
|
|
85
|
+
static createProperty(t, e = nt) {
|
|
86
86
|
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
87
87
|
const s = Symbol(), r = this.getPropertyDescriptor(t, s, e);
|
|
88
|
-
r !== void 0 &&
|
|
88
|
+
r !== void 0 && xt(this.prototype, t, r);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(t, e, s) {
|
|
92
|
-
const { get: r, set:
|
|
92
|
+
const { get: r, set: n } = Pt(this.prototype, t) ?? { get() {
|
|
93
93
|
return this[e];
|
|
94
|
-
}, set(
|
|
95
|
-
this[e] =
|
|
94
|
+
}, set(o) {
|
|
95
|
+
this[e] = o;
|
|
96
96
|
} };
|
|
97
97
|
return { get() {
|
|
98
98
|
return r == null ? void 0 : r.call(this);
|
|
99
|
-
}, set(
|
|
100
|
-
const
|
|
101
|
-
|
|
99
|
+
}, set(o) {
|
|
100
|
+
const l = r == null ? void 0 : r.call(this);
|
|
101
|
+
n.call(this, o), this.requestUpdate(t, l, s);
|
|
102
102
|
}, configurable: !0, enumerable: !0 };
|
|
103
103
|
}
|
|
104
104
|
static getPropertyOptions(t) {
|
|
105
|
-
return this.elementProperties.get(t) ??
|
|
105
|
+
return this.elementProperties.get(t) ?? nt;
|
|
106
106
|
}
|
|
107
107
|
static _$Ei() {
|
|
108
|
-
if (this.hasOwnProperty(
|
|
109
|
-
const t =
|
|
108
|
+
if (this.hasOwnProperty(U("elementProperties"))) return;
|
|
109
|
+
const t = Ut(this);
|
|
110
110
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
111
111
|
}
|
|
112
112
|
static finalize() {
|
|
113
|
-
if (this.hasOwnProperty(
|
|
114
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
115
|
-
const e = this.properties, s = [...
|
|
113
|
+
if (this.hasOwnProperty(U("finalized"))) return;
|
|
114
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(U("properties"))) {
|
|
115
|
+
const e = this.properties, s = [...Ct(e), ...Ot(e)];
|
|
116
116
|
for (const r of s) this.createProperty(r, e[r]);
|
|
117
117
|
}
|
|
118
118
|
const t = this[Symbol.metadata];
|
|
@@ -131,8 +131,8 @@ class A extends HTMLElement {
|
|
|
131
131
|
const e = [];
|
|
132
132
|
if (Array.isArray(t)) {
|
|
133
133
|
const s = new Set(t.flat(1 / 0).reverse());
|
|
134
|
-
for (const r of s) e.unshift(
|
|
135
|
-
} else t !== void 0 && e.push(
|
|
134
|
+
for (const r of s) e.unshift(it(r));
|
|
135
|
+
} else t !== void 0 && e.push(it(t));
|
|
136
136
|
return e;
|
|
137
137
|
}
|
|
138
138
|
static _$Eu(t, e) {
|
|
@@ -161,7 +161,7 @@ class A extends HTMLElement {
|
|
|
161
161
|
}
|
|
162
162
|
createRenderRoot() {
|
|
163
163
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
164
|
-
return
|
|
164
|
+
return St(t, this.constructor.elementStyles), t;
|
|
165
165
|
}
|
|
166
166
|
connectedCallback() {
|
|
167
167
|
var t;
|
|
@@ -183,24 +183,24 @@ class A extends HTMLElement {
|
|
|
183
183
|
this._$AK(t, s);
|
|
184
184
|
}
|
|
185
185
|
_$EC(t, e) {
|
|
186
|
-
var
|
|
186
|
+
var n;
|
|
187
187
|
const s = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, s);
|
|
188
188
|
if (r !== void 0 && s.reflect === !0) {
|
|
189
|
-
const
|
|
190
|
-
this._$Em = t,
|
|
189
|
+
const o = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : L).toAttribute(e, s.type);
|
|
190
|
+
this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
_$AK(t, e) {
|
|
194
|
-
var
|
|
194
|
+
var n;
|
|
195
195
|
const s = this.constructor, r = s._$Eh.get(t);
|
|
196
196
|
if (r !== void 0 && this._$Em !== r) {
|
|
197
|
-
const
|
|
198
|
-
this._$Em = r, this[r] =
|
|
197
|
+
const o = s.getPropertyOptions(r), l = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : L;
|
|
198
|
+
this._$Em = r, this[r] = l.fromAttribute(e, o.type), this._$Em = null;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
requestUpdate(t, e, s) {
|
|
202
202
|
if (t !== void 0) {
|
|
203
|
-
if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ??
|
|
203
|
+
if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? Y)(this[t], e)) return;
|
|
204
204
|
this.P(t, e, s);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
@@ -226,18 +226,18 @@ class A extends HTMLElement {
|
|
|
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 [n, o] of this._$Ep) this[n] = o;
|
|
230
230
|
this._$Ep = void 0;
|
|
231
231
|
}
|
|
232
232
|
const r = this.constructor.elementProperties;
|
|
233
|
-
if (r.size > 0) for (const [
|
|
233
|
+
if (r.size > 0) for (const [n, o] of r) o.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.P(n, this[n], o);
|
|
234
234
|
}
|
|
235
235
|
let t = !1;
|
|
236
236
|
const e = this._$AL;
|
|
237
237
|
try {
|
|
238
238
|
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((r) => {
|
|
239
|
-
var
|
|
240
|
-
return (
|
|
239
|
+
var n;
|
|
240
|
+
return (n = r.hostUpdate) == null ? void 0 : n.call(r);
|
|
241
241
|
}), this.update(e)) : this._$EU();
|
|
242
242
|
} catch (r) {
|
|
243
243
|
throw t = !1, this._$EU(), r;
|
|
@@ -273,76 +273,76 @@ class A extends HTMLElement {
|
|
|
273
273
|
firstUpdated(t) {
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
|
|
276
|
+
x.elementStyles = [], x.shadowRootOptions = { mode: "open" }, x[U("elementProperties")] = /* @__PURE__ */ new Map(), x[U("finalized")] = /* @__PURE__ */ new Map(), W == null || W({ ReactiveElement: x }), (v.reactiveElementVersions ?? (v.reactiveElementVersions = [])).push("2.0.4");
|
|
277
277
|
/**
|
|
278
278
|
* @license
|
|
279
279
|
* Copyright 2017 Google LLC
|
|
280
280
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
281
281
|
*/
|
|
282
|
-
const
|
|
283
|
-
\f\r]`,
|
|
284
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
285
|
-
function
|
|
286
|
-
if (!
|
|
287
|
-
return
|
|
282
|
+
const T = globalThis, D = T.trustedTypes, at = D ? D.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, $t = "$lit$", $ = `lit$${Math.random().toFixed(9).slice(2)}$`, vt = "?" + $, kt = `<${vt}>`, w = document, H = () => w.createComment(""), M = (i) => i === null || typeof i != "object" && typeof i != "function", tt = Array.isArray, Ht = (i) => tt(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", q = `[
|
|
283
|
+
\f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, lt = /-->/g, ht = />/g, y = RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^
|
|
284
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), ct = /'/g, dt = /"/g, _t = /^(?:script|style|textarea|title)$/i, Mt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), k = Mt(1), S = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), ut = /* @__PURE__ */ new WeakMap(), m = w.createTreeWalker(w, 129);
|
|
285
|
+
function yt(i, t) {
|
|
286
|
+
if (!tt(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
287
|
+
return at !== void 0 ? at.createHTML(t) : t;
|
|
288
288
|
}
|
|
289
|
-
const
|
|
289
|
+
const Nt = (i, t) => {
|
|
290
290
|
const e = i.length - 1, s = [];
|
|
291
|
-
let r,
|
|
292
|
-
for (let
|
|
293
|
-
const a = i[
|
|
294
|
-
let d, u,
|
|
295
|
-
for (;
|
|
296
|
-
const
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
return [
|
|
291
|
+
let r, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = O;
|
|
292
|
+
for (let l = 0; l < e; l++) {
|
|
293
|
+
const a = i[l];
|
|
294
|
+
let d, u, h = -1, f = 0;
|
|
295
|
+
for (; f < a.length && (o.lastIndex = f, u = o.exec(a), u !== null); ) f = o.lastIndex, o === O ? u[1] === "!--" ? o = lt : u[1] !== void 0 ? o = ht : u[2] !== void 0 ? (_t.test(u[2]) && (r = RegExp("</" + u[2], "g")), o = y) : u[3] !== void 0 && (o = y) : o === y ? u[0] === ">" ? (o = r ?? O, h = -1) : u[1] === void 0 ? h = -2 : (h = o.lastIndex - u[2].length, d = u[1], o = u[3] === void 0 ? y : u[3] === '"' ? dt : ct) : o === dt || o === ct ? o = y : o === lt || o === ht ? o = O : (o = y, r = void 0);
|
|
296
|
+
const g = o === y && i[l + 1].startsWith("/>") ? " " : "";
|
|
297
|
+
n += o === O ? a + kt : h >= 0 ? (s.push(d), a.slice(0, h) + $t + a.slice(h) + $ + g) : a + $ + (h === -2 ? l : g);
|
|
298
|
+
}
|
|
299
|
+
return [yt(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
300
300
|
};
|
|
301
|
-
class
|
|
301
|
+
class N {
|
|
302
302
|
constructor({ strings: t, _$litType$: e }, s) {
|
|
303
303
|
let r;
|
|
304
304
|
this.parts = [];
|
|
305
|
-
let
|
|
306
|
-
const
|
|
307
|
-
if (this.el =
|
|
308
|
-
const
|
|
309
|
-
|
|
305
|
+
let n = 0, o = 0;
|
|
306
|
+
const l = t.length - 1, a = this.parts, [d, u] = Nt(t, e);
|
|
307
|
+
if (this.el = N.createElement(d, s), m.currentNode = this.el.content, e === 2 || e === 3) {
|
|
308
|
+
const h = this.el.content.firstChild;
|
|
309
|
+
h.replaceWith(...h.childNodes);
|
|
310
310
|
}
|
|
311
|
-
for (; (r =
|
|
311
|
+
for (; (r = m.nextNode()) !== null && a.length < l; ) {
|
|
312
312
|
if (r.nodeType === 1) {
|
|
313
|
-
if (r.hasAttributes()) for (const
|
|
314
|
-
const
|
|
315
|
-
a.push({ type: 1, index:
|
|
316
|
-
} else
|
|
317
|
-
if (
|
|
318
|
-
const
|
|
319
|
-
if (
|
|
320
|
-
r.textContent =
|
|
321
|
-
for (let
|
|
322
|
-
r.append(
|
|
313
|
+
if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith($t)) {
|
|
314
|
+
const f = u[o++], g = r.getAttribute(h).split($), z = /([.?@])?(.*)/.exec(f);
|
|
315
|
+
a.push({ type: 1, index: n, name: z[2], strings: g, ctor: z[1] === "." ? jt : z[1] === "?" ? zt : z[1] === "@" ? It : V }), r.removeAttribute(h);
|
|
316
|
+
} else h.startsWith($) && (a.push({ type: 6, index: n }), r.removeAttribute(h));
|
|
317
|
+
if (_t.test(r.tagName)) {
|
|
318
|
+
const h = r.textContent.split($), f = h.length - 1;
|
|
319
|
+
if (f > 0) {
|
|
320
|
+
r.textContent = D ? D.emptyScript : "";
|
|
321
|
+
for (let g = 0; g < f; g++) r.append(h[g], H()), m.nextNode(), a.push({ type: 2, index: ++n });
|
|
322
|
+
r.append(h[f], H());
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
} else if (r.nodeType === 8) if (r.data ===
|
|
325
|
+
} else if (r.nodeType === 8) if (r.data === vt) a.push({ type: 2, index: n });
|
|
326
326
|
else {
|
|
327
|
-
let
|
|
328
|
-
for (; (
|
|
327
|
+
let h = -1;
|
|
328
|
+
for (; (h = r.data.indexOf($, h + 1)) !== -1; ) a.push({ type: 7, index: n }), h += $.length - 1;
|
|
329
329
|
}
|
|
330
|
-
|
|
330
|
+
n++;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
static createElement(t, e) {
|
|
334
|
-
const s =
|
|
334
|
+
const s = w.createElement("template");
|
|
335
335
|
return s.innerHTML = t, s;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
function
|
|
339
|
-
var
|
|
340
|
-
if (t ===
|
|
341
|
-
let r = s !== void 0 ? (
|
|
342
|
-
const
|
|
343
|
-
return (r == null ? void 0 : r.constructor) !==
|
|
338
|
+
function P(i, t, e = i, s) {
|
|
339
|
+
var o, l;
|
|
340
|
+
if (t === S) return t;
|
|
341
|
+
let r = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
|
|
342
|
+
const n = M(t) ? void 0 : t._$litDirective$;
|
|
343
|
+
return (r == null ? void 0 : r.constructor) !== n && ((l = r == null ? void 0 : r._$AO) == null || l.call(r, !1), n === void 0 ? r = void 0 : (r = new n(i), r._$AT(i, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = r : e._$Cl = r), r !== void 0 && (t = P(i, r._$AS(i, t.values), r, s)), t;
|
|
344
344
|
}
|
|
345
|
-
class
|
|
345
|
+
class Rt {
|
|
346
346
|
constructor(t, e) {
|
|
347
347
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
348
348
|
}
|
|
@@ -353,24 +353,24 @@ class Pt {
|
|
|
353
353
|
return this._$AM._$AU;
|
|
354
354
|
}
|
|
355
355
|
u(t) {
|
|
356
|
-
const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ??
|
|
357
|
-
|
|
358
|
-
let
|
|
356
|
+
const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? w).importNode(e, !0);
|
|
357
|
+
m.currentNode = r;
|
|
358
|
+
let n = m.nextNode(), o = 0, l = 0, a = s[0];
|
|
359
359
|
for (; a !== void 0; ) {
|
|
360
|
-
if (
|
|
360
|
+
if (o === a.index) {
|
|
361
361
|
let d;
|
|
362
|
-
a.type === 2 ? d = new
|
|
362
|
+
a.type === 2 ? d = new j(n, n.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (d = new Lt(n, this, t)), this._$AV.push(d), a = s[++l];
|
|
363
363
|
}
|
|
364
|
-
|
|
364
|
+
o !== (a == null ? void 0 : a.index) && (n = m.nextNode(), o++);
|
|
365
365
|
}
|
|
366
|
-
return
|
|
366
|
+
return m.currentNode = w, r;
|
|
367
367
|
}
|
|
368
368
|
p(t) {
|
|
369
369
|
let e = 0;
|
|
370
370
|
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++;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
class
|
|
373
|
+
class j {
|
|
374
374
|
get _$AU() {
|
|
375
375
|
var t;
|
|
376
376
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
@@ -390,7 +390,7 @@ class M {
|
|
|
390
390
|
return this._$AB;
|
|
391
391
|
}
|
|
392
392
|
_$AI(t, e = this) {
|
|
393
|
-
t =
|
|
393
|
+
t = P(this, t, e), M(t) ? t === c || t == null || t === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : t !== this._$AH && t !== S && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ht(t) ? this.k(t) : this._(t);
|
|
394
394
|
}
|
|
395
395
|
O(t) {
|
|
396
396
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -399,26 +399,26 @@ class M {
|
|
|
399
399
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
400
400
|
}
|
|
401
401
|
_(t) {
|
|
402
|
-
this._$AH !== c &&
|
|
402
|
+
this._$AH !== c && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(w.createTextNode(t)), this._$AH = t;
|
|
403
403
|
}
|
|
404
404
|
$(t) {
|
|
405
|
-
var
|
|
406
|
-
const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el =
|
|
407
|
-
if (((
|
|
405
|
+
var n;
|
|
406
|
+
const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = N.createElement(yt(s.h, s.h[0]), this.options)), s);
|
|
407
|
+
if (((n = this._$AH) == null ? void 0 : n._$AD) === r) this._$AH.p(e);
|
|
408
408
|
else {
|
|
409
|
-
const
|
|
410
|
-
|
|
409
|
+
const o = new Rt(r, this), l = o.u(this.options);
|
|
410
|
+
o.p(e), this.T(l), this._$AH = o;
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
_$AC(t) {
|
|
414
|
-
let e =
|
|
415
|
-
return e === void 0 &&
|
|
414
|
+
let e = ut.get(t.strings);
|
|
415
|
+
return e === void 0 && ut.set(t.strings, e = new N(t)), e;
|
|
416
416
|
}
|
|
417
417
|
k(t) {
|
|
418
|
-
|
|
418
|
+
tt(this._$AH) || (this._$AH = [], this._$AR());
|
|
419
419
|
const e = this._$AH;
|
|
420
420
|
let s, r = 0;
|
|
421
|
-
for (const
|
|
421
|
+
for (const n of t) r === e.length ? e.push(s = new j(this.O(H()), this.O(H()), this, this.options)) : s = e[r], s._$AI(n), r++;
|
|
422
422
|
r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);
|
|
423
423
|
}
|
|
424
424
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -433,32 +433,32 @@ class M {
|
|
|
433
433
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
class
|
|
436
|
+
class V {
|
|
437
437
|
get tagName() {
|
|
438
438
|
return this.element.tagName;
|
|
439
439
|
}
|
|
440
440
|
get _$AU() {
|
|
441
441
|
return this._$AM._$AU;
|
|
442
442
|
}
|
|
443
|
-
constructor(t, e, s, r,
|
|
444
|
-
this.type = 1, this._$AH = c, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options =
|
|
443
|
+
constructor(t, e, s, r, n) {
|
|
444
|
+
this.type = 1, this._$AH = c, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = c;
|
|
445
445
|
}
|
|
446
446
|
_$AI(t, e = this, s, r) {
|
|
447
|
-
const
|
|
448
|
-
let
|
|
449
|
-
if (
|
|
447
|
+
const n = this.strings;
|
|
448
|
+
let o = !1;
|
|
449
|
+
if (n === void 0) t = P(this, t, e, 0), o = !M(t) || t !== this._$AH && t !== S, o && (this._$AH = t);
|
|
450
450
|
else {
|
|
451
|
-
const
|
|
451
|
+
const l = t;
|
|
452
452
|
let a, d;
|
|
453
|
-
for (t =
|
|
453
|
+
for (t = n[0], a = 0; a < n.length - 1; a++) d = P(this, l[s + a], e, a), d === S && (d = this._$AH[a]), o || (o = !M(d) || d !== this._$AH[a]), d === c ? t = c : t !== c && (t += (d ?? "") + n[a + 1]), this._$AH[a] = d;
|
|
454
454
|
}
|
|
455
|
-
|
|
455
|
+
o && !r && this.j(t);
|
|
456
456
|
}
|
|
457
457
|
j(t) {
|
|
458
458
|
t === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
class
|
|
461
|
+
class jt extends V {
|
|
462
462
|
constructor() {
|
|
463
463
|
super(...arguments), this.type = 3;
|
|
464
464
|
}
|
|
@@ -466,7 +466,7 @@ class Ct extends I {
|
|
|
466
466
|
this.element[this.name] = t === c ? void 0 : t;
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
class
|
|
469
|
+
class zt extends V {
|
|
470
470
|
constructor() {
|
|
471
471
|
super(...arguments), this.type = 4;
|
|
472
472
|
}
|
|
@@ -474,21 +474,21 @@ class Ut extends I {
|
|
|
474
474
|
this.element.toggleAttribute(this.name, !!t && t !== c);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
class
|
|
478
|
-
constructor(t, e, s, r,
|
|
479
|
-
super(t, e, s, r,
|
|
477
|
+
class It extends V {
|
|
478
|
+
constructor(t, e, s, r, n) {
|
|
479
|
+
super(t, e, s, r, n), this.type = 5;
|
|
480
480
|
}
|
|
481
481
|
_$AI(t, e = this) {
|
|
482
|
-
if ((t =
|
|
483
|
-
const s = this._$AH, r = t === c && s !== c || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive,
|
|
484
|
-
r && this.element.removeEventListener(this.name, this, s),
|
|
482
|
+
if ((t = P(this, t, e, 0) ?? c) === S) return;
|
|
483
|
+
const s = this._$AH, r = t === c && s !== c || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== c && (s === c || r);
|
|
484
|
+
r && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
485
485
|
}
|
|
486
486
|
handleEvent(t) {
|
|
487
487
|
var e;
|
|
488
488
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
class
|
|
491
|
+
class Lt {
|
|
492
492
|
constructor(t, e, s) {
|
|
493
493
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
|
494
494
|
}
|
|
@@ -496,17 +496,17 @@ class Tt {
|
|
|
496
496
|
return this._$AM._$AU;
|
|
497
497
|
}
|
|
498
498
|
_$AI(t) {
|
|
499
|
-
|
|
499
|
+
P(this, t);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
const
|
|
502
|
+
const F = T.litHtmlPolyfillSupport;
|
|
503
|
+
F == null || F(N, j), (T.litHtmlVersions ?? (T.litHtmlVersions = [])).push("3.2.1");
|
|
504
|
+
const Dt = (i, t, e) => {
|
|
505
505
|
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
506
506
|
let r = s._$litPart$;
|
|
507
507
|
if (r === void 0) {
|
|
508
|
-
const
|
|
509
|
-
s._$litPart$ = r = new
|
|
508
|
+
const n = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
509
|
+
s._$litPart$ = r = new j(t.insertBefore(H(), n), n, void 0, e ?? {});
|
|
510
510
|
}
|
|
511
511
|
return r._$AI(i), r;
|
|
512
512
|
};
|
|
@@ -515,7 +515,7 @@ const Ht = (i, t, e) => {
|
|
|
515
515
|
* Copyright 2017 Google LLC
|
|
516
516
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
517
517
|
*/
|
|
518
|
-
let
|
|
518
|
+
let A = class extends x {
|
|
519
519
|
constructor() {
|
|
520
520
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
521
521
|
}
|
|
@@ -526,7 +526,7 @@ let U = class extends A {
|
|
|
526
526
|
}
|
|
527
527
|
update(t) {
|
|
528
528
|
const e = this.render();
|
|
529
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
529
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Dt(e, this.renderRoot, this.renderOptions);
|
|
530
530
|
}
|
|
531
531
|
connectedCallback() {
|
|
532
532
|
var t;
|
|
@@ -537,20 +537,20 @@ let U = class extends A {
|
|
|
537
537
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
538
538
|
}
|
|
539
539
|
render() {
|
|
540
|
-
return
|
|
540
|
+
return S;
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
|
-
var
|
|
544
|
-
|
|
545
|
-
const
|
|
546
|
-
|
|
543
|
+
var bt;
|
|
544
|
+
A._$litElement$ = !0, A.finalized = !0, (bt = globalThis.litElementHydrateSupport) == null || bt.call(globalThis, { LitElement: A });
|
|
545
|
+
const Z = globalThis.litElementPolyfillSupport;
|
|
546
|
+
Z == null || Z({ LitElement: A });
|
|
547
547
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
|
|
548
548
|
/**
|
|
549
549
|
* @license
|
|
550
550
|
* Copyright 2017 Google LLC
|
|
551
551
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
552
552
|
*/
|
|
553
|
-
const
|
|
553
|
+
const et = (i) => (t, e) => {
|
|
554
554
|
e !== void 0 ? e.addInitializer(() => {
|
|
555
555
|
customElements.define(i, t);
|
|
556
556
|
}) : customElements.define(i, t);
|
|
@@ -560,39 +560,39 @@ const Mt = (i) => (t, e) => {
|
|
|
560
560
|
* Copyright 2017 Google LLC
|
|
561
561
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
562
562
|
*/
|
|
563
|
-
const
|
|
563
|
+
const Bt = { attribute: !0, type: String, converter: L, reflect: !1, hasChanged: Y }, Vt = (i = Bt, t, e) => {
|
|
564
564
|
const { kind: s, metadata: r } = e;
|
|
565
|
-
let
|
|
566
|
-
if (
|
|
567
|
-
const { name:
|
|
568
|
-
return { set(
|
|
565
|
+
let n = globalThis.litPropertyMetadata.get(r);
|
|
566
|
+
if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), n.set(e.name, i), s === "accessor") {
|
|
567
|
+
const { name: o } = e;
|
|
568
|
+
return { set(l) {
|
|
569
569
|
const a = t.get.call(this);
|
|
570
|
-
t.set.call(this,
|
|
571
|
-
}, init(
|
|
572
|
-
return
|
|
570
|
+
t.set.call(this, l), this.requestUpdate(o, a, i);
|
|
571
|
+
}, init(l) {
|
|
572
|
+
return l !== void 0 && this.P(o, void 0, i), l;
|
|
573
573
|
} };
|
|
574
574
|
}
|
|
575
575
|
if (s === "setter") {
|
|
576
|
-
const { name:
|
|
577
|
-
return function(
|
|
578
|
-
const a = this[
|
|
579
|
-
t.call(this,
|
|
576
|
+
const { name: o } = e;
|
|
577
|
+
return function(l) {
|
|
578
|
+
const a = this[o];
|
|
579
|
+
t.call(this, l), this.requestUpdate(o, a, i);
|
|
580
580
|
};
|
|
581
581
|
}
|
|
582
582
|
throw Error("Unsupported decorator location: " + s);
|
|
583
583
|
};
|
|
584
|
-
function
|
|
585
|
-
return (t, e) => typeof e == "object" ?
|
|
586
|
-
const
|
|
587
|
-
return r.constructor.createProperty(
|
|
584
|
+
function p(i) {
|
|
585
|
+
return (t, e) => typeof e == "object" ? Vt(i, t, e) : ((s, r, n) => {
|
|
586
|
+
const o = r.hasOwnProperty(n);
|
|
587
|
+
return r.constructor.createProperty(n, o ? { ...s, wrapped: !0 } : s), o ? Object.getOwnPropertyDescriptor(r, n) : void 0;
|
|
588
588
|
})(i, t, e);
|
|
589
589
|
}
|
|
590
|
-
const
|
|
590
|
+
const Wt = R`
|
|
591
591
|
outline: 1px dashed var(--button-border-color);
|
|
592
592
|
outline-offset: 2px;
|
|
593
593
|
outline: dashed black;
|
|
594
594
|
`;
|
|
595
|
-
|
|
595
|
+
R`
|
|
596
596
|
:host * {
|
|
597
597
|
box-sizing: border-box;
|
|
598
598
|
}
|
|
@@ -602,12 +602,12 @@ J`
|
|
|
602
602
|
* Copyright 2023 Google LLC
|
|
603
603
|
* SPDX-License-Identifier: Apache-2.0
|
|
604
604
|
*/
|
|
605
|
-
const
|
|
606
|
-
function
|
|
605
|
+
const st = Symbol("internals"), J = Symbol("privateInternals");
|
|
606
|
+
function qt(i) {
|
|
607
607
|
var t;
|
|
608
608
|
class e extends i {
|
|
609
|
-
get [(t =
|
|
610
|
-
return this[
|
|
609
|
+
get [(t = st, t)]() {
|
|
610
|
+
return this[J] || (this[J] = this.attachInternals()), this[J];
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
613
|
return e;
|
|
@@ -617,39 +617,39 @@ function zt(i) {
|
|
|
617
617
|
* Copyright 2023 Google LLC
|
|
618
618
|
* SPDX-License-Identifier: Apache-2.0
|
|
619
619
|
*/
|
|
620
|
-
function
|
|
620
|
+
function Ft(i) {
|
|
621
621
|
i.addInitializer((t) => {
|
|
622
622
|
const e = t;
|
|
623
623
|
e.addEventListener("click", async (s) => {
|
|
624
|
-
const { type: r, [
|
|
625
|
-
if (!(!
|
|
626
|
-
setTimeout(
|
|
624
|
+
const { type: r, [st]: n } = e, { form: o } = n;
|
|
625
|
+
if (!(!o || r === "button") && (await new Promise((l) => {
|
|
626
|
+
setTimeout(l);
|
|
627
627
|
}), !s.defaultPrevented)) {
|
|
628
628
|
if (r === "reset") {
|
|
629
|
-
|
|
629
|
+
o.reset();
|
|
630
630
|
return;
|
|
631
631
|
}
|
|
632
|
-
|
|
632
|
+
o.addEventListener(
|
|
633
633
|
"submit",
|
|
634
|
-
(
|
|
635
|
-
Object.defineProperty(
|
|
634
|
+
(l) => {
|
|
635
|
+
Object.defineProperty(l, "submitter", {
|
|
636
636
|
configurable: !0,
|
|
637
637
|
enumerable: !0,
|
|
638
638
|
get: () => e
|
|
639
639
|
});
|
|
640
640
|
},
|
|
641
641
|
{ capture: !0, once: !0 }
|
|
642
|
-
),
|
|
642
|
+
), n.setFormValue(e.value), o.requestSubmit();
|
|
643
643
|
}
|
|
644
644
|
});
|
|
645
645
|
});
|
|
646
646
|
}
|
|
647
|
-
var
|
|
648
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
649
|
-
(
|
|
650
|
-
return s && r &&
|
|
647
|
+
var Zt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, E = (i, t, e, s) => {
|
|
648
|
+
for (var r = s > 1 ? void 0 : s ? Jt(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
|
649
|
+
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
650
|
+
return s && r && Zt(t, e, r), r;
|
|
651
651
|
};
|
|
652
|
-
const
|
|
652
|
+
const Kt = qt(A), pt = (i) => {
|
|
653
653
|
const t = `
|
|
654
654
|
--button-bg-disabled: var(--color-container-disabled);
|
|
655
655
|
--button-bg-pressed: var(--color-container-action-${i}-pressed);
|
|
@@ -664,9 +664,9 @@ const Bt = zt(U), at = (i) => {
|
|
|
664
664
|
--button-text-hover: var(--color-content-action-${i});
|
|
665
665
|
--button-text: var(--color-content-action-${i});
|
|
666
666
|
`;
|
|
667
|
-
return
|
|
668
|
-
},
|
|
669
|
-
let
|
|
667
|
+
return gt(t);
|
|
668
|
+
}, Gt = ["primary", "secondary"];
|
|
669
|
+
let b = class extends Kt {
|
|
670
670
|
constructor() {
|
|
671
671
|
super(...arguments), this.type = "submit", this.value = "", this.variant = "primary", this.disabled = !1, this.href = "", this.target = "";
|
|
672
672
|
}
|
|
@@ -680,41 +680,41 @@ let p = class extends Bt {
|
|
|
680
680
|
* The associated form element with which this element's value will submit.
|
|
681
681
|
*/
|
|
682
682
|
get form() {
|
|
683
|
-
return this[
|
|
683
|
+
return this[st].form;
|
|
684
684
|
}
|
|
685
685
|
// TODO: Add aria attributes support
|
|
686
686
|
// Adapt from: https://github.dev/material-components/material-web
|
|
687
687
|
willUpdate() {
|
|
688
688
|
const i = getComputedStyle(this).getPropertyValue("--button-variant");
|
|
689
|
-
i &&
|
|
689
|
+
i && Gt.some((t) => t === i) && (this.variant = i);
|
|
690
690
|
}
|
|
691
691
|
render() {
|
|
692
692
|
const i = this.href ? this.renderLink() : this.renderButton();
|
|
693
|
-
return
|
|
693
|
+
return k`${i}`;
|
|
694
694
|
}
|
|
695
695
|
renderLink() {
|
|
696
|
-
return
|
|
696
|
+
return k`<a href=${this.href} target=${this.target || c} class="button" ?disabled=${this.disabled}>
|
|
697
697
|
<slot />
|
|
698
698
|
</a>`;
|
|
699
699
|
}
|
|
700
700
|
renderButton() {
|
|
701
|
-
return
|
|
701
|
+
return k`<button class="button" ?disabled=${this.disabled}>
|
|
702
702
|
<slot />
|
|
703
703
|
</button>`;
|
|
704
704
|
}
|
|
705
705
|
};
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
706
|
+
Ft(b);
|
|
707
|
+
b.formAssociated = !0;
|
|
708
|
+
b.styles = R`
|
|
709
709
|
:host {
|
|
710
710
|
display: inline-flex;
|
|
711
711
|
cursor: pointer;
|
|
712
|
-
${
|
|
712
|
+
${pt("primary")};
|
|
713
713
|
--button-border: transparent;
|
|
714
714
|
}
|
|
715
715
|
|
|
716
716
|
:host([variant="secondary"]) {
|
|
717
|
-
${
|
|
717
|
+
${pt("secondary")};
|
|
718
718
|
}
|
|
719
719
|
|
|
720
720
|
:host([disabled]) {
|
|
@@ -775,31 +775,326 @@ p.styles = J`
|
|
|
775
775
|
}
|
|
776
776
|
|
|
777
777
|
.button:focus-visible {
|
|
778
|
-
${
|
|
778
|
+
${Wt};
|
|
779
779
|
}
|
|
780
780
|
`;
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
],
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
],
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
],
|
|
790
|
-
|
|
791
|
-
|
|
781
|
+
E([
|
|
782
|
+
p()
|
|
783
|
+
], b.prototype, "type", 2);
|
|
784
|
+
E([
|
|
785
|
+
p({ reflect: !0 })
|
|
786
|
+
], b.prototype, "value", 2);
|
|
787
|
+
E([
|
|
788
|
+
p({ reflect: !0 })
|
|
789
|
+
], b.prototype, "variant", 2);
|
|
790
|
+
E([
|
|
791
|
+
p({
|
|
792
792
|
converter: {
|
|
793
793
|
fromAttribute: (i) => i === "" || i === "true"
|
|
794
794
|
}
|
|
795
795
|
})
|
|
796
|
-
],
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
],
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
],
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
],
|
|
796
|
+
], b.prototype, "disabled", 2);
|
|
797
|
+
E([
|
|
798
|
+
p()
|
|
799
|
+
], b.prototype, "href", 2);
|
|
800
|
+
E([
|
|
801
|
+
p()
|
|
802
|
+
], b.prototype, "target", 2);
|
|
803
|
+
b = E([
|
|
804
|
+
et("o-button")
|
|
805
|
+
], b);
|
|
806
|
+
/**
|
|
807
|
+
* @license
|
|
808
|
+
* Copyright 2017 Google LLC
|
|
809
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
810
|
+
*/
|
|
811
|
+
const Qt = { CHILD: 2 }, Xt = (i) => (...t) => ({ _$litDirective$: i, values: t });
|
|
812
|
+
class Yt {
|
|
813
|
+
constructor(t) {
|
|
814
|
+
}
|
|
815
|
+
get _$AU() {
|
|
816
|
+
return this._$AM._$AU;
|
|
817
|
+
}
|
|
818
|
+
_$AT(t, e, s) {
|
|
819
|
+
this._$Ct = t, this._$AM = e, this._$Ci = s;
|
|
820
|
+
}
|
|
821
|
+
_$AS(t, e) {
|
|
822
|
+
return this.update(t, e);
|
|
823
|
+
}
|
|
824
|
+
update(t, e) {
|
|
825
|
+
return this.render(...e);
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* @license
|
|
830
|
+
* Copyright 2017 Google LLC
|
|
831
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
832
|
+
*/
|
|
833
|
+
class K extends Yt {
|
|
834
|
+
constructor(t) {
|
|
835
|
+
if (super(t), this.it = c, t.type !== Qt.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
836
|
+
}
|
|
837
|
+
render(t) {
|
|
838
|
+
if (t === c || t == null) return this._t = void 0, this.it = t;
|
|
839
|
+
if (t === S) return t;
|
|
840
|
+
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
841
|
+
if (t === this.it) return this._t;
|
|
842
|
+
this.it = t;
|
|
843
|
+
const e = [t];
|
|
844
|
+
return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
K.directiveName = "unsafeHTML", K.resultType = 1;
|
|
848
|
+
/**
|
|
849
|
+
* @license
|
|
850
|
+
* Copyright 2017 Google LLC
|
|
851
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
852
|
+
*/
|
|
853
|
+
class G extends K {
|
|
854
|
+
}
|
|
855
|
+
G.directiveName = "unsafeSVG", G.resultType = 2;
|
|
856
|
+
const mt = Xt(G), te = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
857
|
+
<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"/>
|
|
858
|
+
</svg>
|
|
859
|
+
`, At = {
|
|
860
|
+
wishlist: te
|
|
861
|
+
};
|
|
862
|
+
var ee = Object.defineProperty, se = Object.getOwnPropertyDescriptor, wt = (i, t, e, s) => {
|
|
863
|
+
for (var r = s > 1 ? void 0 : s ? se(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
|
864
|
+
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
865
|
+
return s && r && ee(t, e, r), r;
|
|
866
|
+
};
|
|
867
|
+
let B = class extends A {
|
|
868
|
+
constructor() {
|
|
869
|
+
super(...arguments), this.status = "empty";
|
|
870
|
+
}
|
|
871
|
+
render() {
|
|
872
|
+
const i = At.wishlist.replace(
|
|
873
|
+
"<svg",
|
|
874
|
+
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
875
|
+
);
|
|
876
|
+
return k`
|
|
877
|
+
<button
|
|
878
|
+
type="button"
|
|
879
|
+
aria-label="Add to wishlist"
|
|
880
|
+
aria-pressed="${this.status == "filled" ? "true" : "false"}"
|
|
881
|
+
class="wishlist-button"
|
|
882
|
+
@click="${this.toggleStatus}"
|
|
883
|
+
>
|
|
884
|
+
${mt(i)}
|
|
885
|
+
</button>
|
|
886
|
+
`;
|
|
887
|
+
}
|
|
888
|
+
toggleStatus() {
|
|
889
|
+
this.status = this.status == "empty" ? "filled" : "empty";
|
|
890
|
+
}
|
|
891
|
+
setStatus(i) {
|
|
892
|
+
this.status = i, this.requestUpdate();
|
|
893
|
+
}
|
|
894
|
+
};
|
|
895
|
+
B.styles = R`
|
|
896
|
+
:host {
|
|
897
|
+
display: inline-flex;
|
|
898
|
+
justify-content: center;
|
|
899
|
+
align-items: center;
|
|
900
|
+
cursor: pointer;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
.wishlist-button {
|
|
904
|
+
display: flex;
|
|
905
|
+
justify-content: center;
|
|
906
|
+
align-items: center;
|
|
907
|
+
width: 32px;
|
|
908
|
+
height: 32px;
|
|
909
|
+
border: transparent;
|
|
910
|
+
border-radius: var(--radius-full);
|
|
911
|
+
background-color: var(--color-alpha-light-strong);
|
|
912
|
+
position: relative;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
.wishlist-button:hover {
|
|
916
|
+
background-color: var(--color-alpha-light-stronger);
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
:host([status="filled"]) .wishlist-button {
|
|
920
|
+
background-color: var(--color-alpha-light-strongest);
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
.wishlist-button:hover svg path {
|
|
924
|
+
fill: var(--color-content-action-secondary);
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
:host([status="filled"]) .wishlist-button svg path {
|
|
928
|
+
fill: var(--color-content-action-secondary);
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
:host([status="filled"]) .wishlist-button:hover svg path {
|
|
932
|
+
fill: var(--color-alpha-light-strong);
|
|
933
|
+
}
|
|
934
|
+
`;
|
|
935
|
+
wt([
|
|
936
|
+
p({ type: String, reflect: !0 })
|
|
937
|
+
], B.prototype, "status", 2);
|
|
938
|
+
B = wt([
|
|
939
|
+
et("o-wishlist-button")
|
|
940
|
+
], B);
|
|
941
|
+
var re = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, C = (i, t, e, s) => {
|
|
942
|
+
for (var r = s > 1 ? void 0 : s ? ie(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
|
943
|
+
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
944
|
+
return s && r && re(t, e, r), r;
|
|
945
|
+
};
|
|
946
|
+
let _ = class extends A {
|
|
947
|
+
constructor() {
|
|
948
|
+
super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.icon = "wishlist", this.disabled = !1;
|
|
949
|
+
}
|
|
950
|
+
render() {
|
|
951
|
+
const t = (At[this.icon] ?? "").replace(
|
|
952
|
+
"<svg",
|
|
953
|
+
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
954
|
+
);
|
|
955
|
+
return k`
|
|
956
|
+
<button
|
|
957
|
+
type="button"
|
|
958
|
+
aria-label="icon"
|
|
959
|
+
class="icon-button ${this.size} ${this.bgstyle} ${this.status}"
|
|
960
|
+
?disabled="${this.disabled}"
|
|
961
|
+
>
|
|
962
|
+
${mt(t)}
|
|
963
|
+
</button>
|
|
964
|
+
`;
|
|
965
|
+
}
|
|
966
|
+
};
|
|
967
|
+
_.styles = R`
|
|
968
|
+
:host {
|
|
969
|
+
display: inline-flex;
|
|
970
|
+
justify-content: center;
|
|
971
|
+
align-items: center;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
.icon-button {
|
|
975
|
+
display: flex;
|
|
976
|
+
justify-content: center;
|
|
977
|
+
align-items: center;
|
|
978
|
+
width: 32px;
|
|
979
|
+
height: 32px;
|
|
980
|
+
border: transparent;
|
|
981
|
+
border-radius: var(--radius-full);
|
|
982
|
+
cursor: pointer;
|
|
983
|
+
position: relative;
|
|
984
|
+
|
|
985
|
+
svg {
|
|
986
|
+
path {
|
|
987
|
+
stroke: var(--color-content-action-secondary);
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
.icon-button.filled svg {
|
|
993
|
+
fill: var(--color-content-action-secondary);
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
.icon-button.small {
|
|
997
|
+
width: 20px;
|
|
998
|
+
height: 20px;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
.icon-button.medium {
|
|
1002
|
+
width: 32px;
|
|
1003
|
+
height: 32px;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
.icon-button.large {
|
|
1007
|
+
width: 40px;
|
|
1008
|
+
height: 40px;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
.icon-button.background-light {
|
|
1012
|
+
background-color: var(--color-alpha-light-strong);
|
|
1013
|
+
|
|
1014
|
+
&:hover:not(:disabled) {
|
|
1015
|
+
background-color: var(--color-alpha-light-stronger);
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
&:active:not(:disabled) {
|
|
1019
|
+
background-color: var(--color-alpha-light-strongest);
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
.icon-button.background-contrast {
|
|
1024
|
+
background-color: var(--color-container-action-tertiary-default);
|
|
1025
|
+
|
|
1026
|
+
&:hover:not(:disabled) {
|
|
1027
|
+
background-color: var(--color-container-action-tertiary-hover);
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
&:active:not(:disabled) {
|
|
1031
|
+
background-color: var(--color-container-action-tertiary-pressed);
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
.icon-button.ghost-light {
|
|
1036
|
+
background-color: transparent;
|
|
1037
|
+
&.filled {
|
|
1038
|
+
svg {
|
|
1039
|
+
fill: var(--color-content-action-primary);
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
svg {
|
|
1044
|
+
path {
|
|
1045
|
+
stroke: var(--color-content-action-primary);
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
&:hover:not(:disabled) {
|
|
1050
|
+
background-color: var(--color-alpha-light-lightest);
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
&:active:not(:disabled) {
|
|
1054
|
+
background-color: var(--color-alpha-light-light);
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
.icon-button.ghost-contrast {
|
|
1059
|
+
background-color: transparent;
|
|
1060
|
+
|
|
1061
|
+
&:hover:not(:disabled) {
|
|
1062
|
+
background-color: var(--color-alpha-light-medium);
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
&:active:not(:disabled) {
|
|
1066
|
+
background-color: var(--color-alpha-light-strongest);
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
.icon-button:disabled {
|
|
1071
|
+
background-color: var(--color-container-disabled);
|
|
1072
|
+
|
|
1073
|
+
svg {
|
|
1074
|
+
fill: var(--color-content-disabled);
|
|
1075
|
+
|
|
1076
|
+
path {
|
|
1077
|
+
stroke: var(--color-content-disabled);
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
}
|
|
1082
|
+
`;
|
|
1083
|
+
C([
|
|
1084
|
+
p({ type: String, reflect: !0 })
|
|
1085
|
+
], _.prototype, "bgstyle", 2);
|
|
1086
|
+
C([
|
|
1087
|
+
p({ type: String, reflect: !0 })
|
|
1088
|
+
], _.prototype, "size", 2);
|
|
1089
|
+
C([
|
|
1090
|
+
p({ type: String, reflect: !0 })
|
|
1091
|
+
], _.prototype, "status", 2);
|
|
1092
|
+
C([
|
|
1093
|
+
p({ type: String })
|
|
1094
|
+
], _.prototype, "icon", 2);
|
|
1095
|
+
C([
|
|
1096
|
+
p({ type: Boolean, reflect: !0 })
|
|
1097
|
+
], _.prototype, "disabled", 2);
|
|
1098
|
+
_ = C([
|
|
1099
|
+
et("o-icon-button")
|
|
1100
|
+
], _);
|