pollcatch 2.1.2 → 2.1.4
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/package.json +1 -1
- package/pc.js +185 -173
package/package.json
CHANGED
package/pc.js
CHANGED
|
@@ -45,7 +45,7 @@ const ke = (e) => new ae(typeof e == "string" ? e : e + "", void 0, _t), F = (e,
|
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is: _e, defineProperty: Ee, getOwnPropertyDescriptor: Pe, getOwnPropertyNames: Oe, getOwnPropertySymbols: Te, getPrototypeOf: ze } = Object,
|
|
48
|
+
const { is: _e, defineProperty: Ee, getOwnPropertyDescriptor: Pe, getOwnPropertyNames: Oe, getOwnPropertySymbols: Te, getPrototypeOf: ze } = Object, T = globalThis, Ut = T.trustedTypes, Ie = Ut ? Ut.emptyScript : "", mt = T.reactiveElementPolyfillSupport, K = (e, t) => e, at = { toAttribute(e, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
51
|
e = e ? Ie : null;
|
|
@@ -74,7 +74,7 @@ const { is: _e, defineProperty: Ee, getOwnPropertyDescriptor: Pe, getOwnProperty
|
|
|
74
74
|
}
|
|
75
75
|
return o;
|
|
76
76
|
} }, Et = (e, t) => !_e(e, t), jt = { attribute: !0, type: String, converter: at, reflect: !1, hasChanged: Et };
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), T.litPropertyMetadata ?? (T.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
let U = class extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
@@ -273,15 +273,15 @@ let U = class extends HTMLElement {
|
|
|
273
273
|
firstUpdated(t) {
|
|
274
274
|
}
|
|
275
275
|
};
|
|
276
|
-
U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[K("elementProperties")] = /* @__PURE__ */ new Map(), U[K("finalized")] = /* @__PURE__ */ new Map(), mt == null || mt({ ReactiveElement: U }), (
|
|
276
|
+
U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[K("elementProperties")] = /* @__PURE__ */ new Map(), U[K("finalized")] = /* @__PURE__ */ new Map(), mt == null || mt({ ReactiveElement: U }), (T.reactiveElementVersions ?? (T.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 W = globalThis, nt = W.trustedTypes, Bt = nt ? nt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, ne = "$lit$",
|
|
283
|
-
\f\r]`, Z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Dt = /-->/g, Vt = />/g,
|
|
284
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), qt = /'/g, Ht = /"/g, ce = /^(?:script|style|textarea|title)$/i, Le = (e) => (t, ...o) => ({ _$litType$: e, strings: t, values: o }), d = Le(1),
|
|
282
|
+
const W = globalThis, nt = W.trustedTypes, Bt = nt ? nt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, ne = "$lit$", P = `lit$${Math.random().toFixed(9).slice(2)}$`, le = "?" + P, Ne = `<${le}>`, L = document, X = () => L.createComment(""), Q = (e) => e === null || typeof e != "object" && typeof e != "function", Pt = Array.isArray, Me = (e) => Pt(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", bt = `[
|
|
283
|
+
\f\r]`, Z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Dt = /-->/g, Vt = />/g, N = RegExp(`>|${bt}(?:([^\\s"'>=/]+)(${bt}*=${bt}*(?:[^
|
|
284
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), qt = /'/g, Ht = /"/g, ce = /^(?:script|style|textarea|title)$/i, Le = (e) => (t, ...o) => ({ _$litType$: e, strings: t, values: o }), d = Le(1), z = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), Ft = /* @__PURE__ */ new WeakMap(), M = L.createTreeWalker(L, 129);
|
|
285
285
|
function de(e, t) {
|
|
286
286
|
if (!Pt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
287
287
|
return Bt !== void 0 ? Bt.createHTML(t) : t;
|
|
@@ -292,9 +292,9 @@ const Re = (e, t) => {
|
|
|
292
292
|
for (let n = 0; n < o; n++) {
|
|
293
293
|
const l = e[n];
|
|
294
294
|
let p, c, h = -1, w = 0;
|
|
295
|
-
for (; w < l.length && (a.lastIndex = w, c = a.exec(l), c !== null); ) w = a.lastIndex, a === Z ? c[1] === "!--" ? a = Dt : c[1] !== void 0 ? a = Vt : c[2] !== void 0 ? (ce.test(c[2]) && (s = RegExp("</" + c[2], "g")), a =
|
|
296
|
-
const
|
|
297
|
-
i += a === Z ? l + Ne : h >= 0 ? (r.push(p), l.slice(0, h) + ne + l.slice(h) +
|
|
295
|
+
for (; w < l.length && (a.lastIndex = w, c = a.exec(l), c !== null); ) w = a.lastIndex, a === Z ? c[1] === "!--" ? a = Dt : c[1] !== void 0 ? a = Vt : c[2] !== void 0 ? (ce.test(c[2]) && (s = RegExp("</" + c[2], "g")), a = N) : c[3] !== void 0 && (a = N) : a === N ? c[0] === ">" ? (a = s ?? Z, h = -1) : c[1] === void 0 ? h = -2 : (h = a.lastIndex - c[2].length, p = c[1], a = c[3] === void 0 ? N : c[3] === '"' ? Ht : qt) : a === Ht || a === qt ? a = N : a === Dt || a === Vt ? a = Z : (a = N, s = void 0);
|
|
296
|
+
const v = a === N && e[n + 1].startsWith("/>") ? " " : "";
|
|
297
|
+
i += a === Z ? l + Ne : h >= 0 ? (r.push(p), l.slice(0, h) + ne + l.slice(h) + P + v) : l + P + (h === -2 ? n : v);
|
|
298
298
|
}
|
|
299
299
|
return [de(e, i + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
300
300
|
};
|
|
@@ -304,40 +304,40 @@ let kt = class pe {
|
|
|
304
304
|
this.parts = [];
|
|
305
305
|
let i = 0, a = 0;
|
|
306
306
|
const n = t.length - 1, l = this.parts, [p, c] = Re(t, o);
|
|
307
|
-
if (this.el = pe.createElement(p, r),
|
|
307
|
+
if (this.el = pe.createElement(p, r), M.currentNode = this.el.content, o === 2 || o === 3) {
|
|
308
308
|
const h = this.el.content.firstChild;
|
|
309
309
|
h.replaceWith(...h.childNodes);
|
|
310
310
|
}
|
|
311
|
-
for (; (s =
|
|
311
|
+
for (; (s = M.nextNode()) !== null && l.length < n; ) {
|
|
312
312
|
if (s.nodeType === 1) {
|
|
313
313
|
if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(ne)) {
|
|
314
|
-
const w = c[a++],
|
|
315
|
-
l.push({ type: 1, index: i, name:
|
|
316
|
-
} else h.startsWith(
|
|
314
|
+
const w = c[a++], v = s.getAttribute(h).split(P), E = /([.?@])?(.*)/.exec(w);
|
|
315
|
+
l.push({ type: 1, index: i, name: E[2], strings: v, ctor: E[1] === "." ? je : E[1] === "?" ? Be : E[1] === "@" ? De : ct }), s.removeAttribute(h);
|
|
316
|
+
} else h.startsWith(P) && (l.push({ type: 6, index: i }), s.removeAttribute(h));
|
|
317
317
|
if (ce.test(s.tagName)) {
|
|
318
|
-
const h = s.textContent.split(
|
|
318
|
+
const h = s.textContent.split(P), w = h.length - 1;
|
|
319
319
|
if (w > 0) {
|
|
320
320
|
s.textContent = nt ? nt.emptyScript : "";
|
|
321
|
-
for (let
|
|
321
|
+
for (let v = 0; v < w; v++) s.append(h[v], X()), M.nextNode(), l.push({ type: 2, index: ++i });
|
|
322
322
|
s.append(h[w], X());
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
} else if (s.nodeType === 8) if (s.data === le) l.push({ type: 2, index: i });
|
|
326
326
|
else {
|
|
327
327
|
let h = -1;
|
|
328
|
-
for (; (h = s.data.indexOf(
|
|
328
|
+
for (; (h = s.data.indexOf(P, h + 1)) !== -1; ) l.push({ type: 7, index: i }), h += P.length - 1;
|
|
329
329
|
}
|
|
330
330
|
i++;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
static createElement(t, o) {
|
|
334
|
-
const r =
|
|
334
|
+
const r = L.createElement("template");
|
|
335
335
|
return r.innerHTML = t, r;
|
|
336
336
|
}
|
|
337
337
|
};
|
|
338
338
|
function D(e, t, o = e, r) {
|
|
339
339
|
var a, n;
|
|
340
|
-
if (t ===
|
|
340
|
+
if (t === z) return t;
|
|
341
341
|
let s = r !== void 0 ? (a = o._$Co) == null ? void 0 : a[r] : o._$Cl;
|
|
342
342
|
const i = Q(t) ? void 0 : t._$litDirective$;
|
|
343
343
|
return (s == null ? void 0 : s.constructor) !== i && ((n = s == null ? void 0 : s._$AO) == null || n.call(s, !1), i === void 0 ? s = void 0 : (s = new i(e), s._$AT(e, o, r)), r !== void 0 ? (o._$Co ?? (o._$Co = []))[r] = s : o._$Cl = s), s !== void 0 && (t = D(e, s._$AS(e, t.values), s, r)), t;
|
|
@@ -353,17 +353,17 @@ let Ue = class {
|
|
|
353
353
|
return this._$AM._$AU;
|
|
354
354
|
}
|
|
355
355
|
u(t) {
|
|
356
|
-
const { el: { content: o }, parts: r } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ??
|
|
357
|
-
|
|
358
|
-
let i =
|
|
356
|
+
const { el: { content: o }, parts: r } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? L).importNode(o, !0);
|
|
357
|
+
M.currentNode = s;
|
|
358
|
+
let i = M.nextNode(), a = 0, n = 0, l = r[0];
|
|
359
359
|
for (; l !== void 0; ) {
|
|
360
360
|
if (a === l.index) {
|
|
361
361
|
let p;
|
|
362
362
|
l.type === 2 ? p = new et(i, i.nextSibling, this, t) : l.type === 1 ? p = new l.ctor(i, l.name, l.strings, this, t) : l.type === 6 && (p = new Ve(i, this, t)), this._$AV.push(p), l = r[++n];
|
|
363
363
|
}
|
|
364
|
-
a !== (l == null ? void 0 : l.index) && (i =
|
|
364
|
+
a !== (l == null ? void 0 : l.index) && (i = M.nextNode(), a++);
|
|
365
365
|
}
|
|
366
|
-
return
|
|
366
|
+
return M.currentNode = L, s;
|
|
367
367
|
}
|
|
368
368
|
p(t) {
|
|
369
369
|
let o = 0;
|
|
@@ -390,7 +390,7 @@ class et {
|
|
|
390
390
|
return this._$AB;
|
|
391
391
|
}
|
|
392
392
|
_$AI(t, o = this) {
|
|
393
|
-
t = D(this, t, o), Q(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !==
|
|
393
|
+
t = D(this, t, o), Q(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== z && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Me(t) ? this.k(t) : this._(t);
|
|
394
394
|
}
|
|
395
395
|
O(t) {
|
|
396
396
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -399,7 +399,7 @@ class et {
|
|
|
399
399
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
400
400
|
}
|
|
401
401
|
_(t) {
|
|
402
|
-
this._$AH !== u && Q(this._$AH) ? this._$AA.nextSibling.data = t : this.T(
|
|
402
|
+
this._$AH !== u && Q(this._$AH) ? this._$AA.nextSibling.data = t : this.T(L.createTextNode(t)), this._$AH = t;
|
|
403
403
|
}
|
|
404
404
|
$(t) {
|
|
405
405
|
var i;
|
|
@@ -446,11 +446,11 @@ class ct {
|
|
|
446
446
|
_$AI(t, o = this, r, s) {
|
|
447
447
|
const i = this.strings;
|
|
448
448
|
let a = !1;
|
|
449
|
-
if (i === void 0) t = D(this, t, o, 0), a = !Q(t) || t !== this._$AH && t !==
|
|
449
|
+
if (i === void 0) t = D(this, t, o, 0), a = !Q(t) || t !== this._$AH && t !== z, a && (this._$AH = t);
|
|
450
450
|
else {
|
|
451
451
|
const n = t;
|
|
452
452
|
let l, p;
|
|
453
|
-
for (t = i[0], l = 0; l < i.length - 1; l++) p = D(this, n[r + l], o, l), p ===
|
|
453
|
+
for (t = i[0], l = 0; l < i.length - 1; l++) p = D(this, n[r + l], o, l), p === z && (p = this._$AH[l]), a || (a = !Q(p) || p !== this._$AH[l]), p === u ? t = u : t !== u && (t += (p ?? "") + i[l + 1]), this._$AH[l] = p;
|
|
454
454
|
}
|
|
455
455
|
a && !s && this.j(t);
|
|
456
456
|
}
|
|
@@ -479,7 +479,7 @@ class De extends ct {
|
|
|
479
479
|
super(t, o, r, s, i), this.type = 5;
|
|
480
480
|
}
|
|
481
481
|
_$AI(t, o = this) {
|
|
482
|
-
if ((t = D(this, t, o, 0) ?? u) ===
|
|
482
|
+
if ((t = D(this, t, o, 0) ?? u) === z) return;
|
|
483
483
|
const r = this._$AH, s = t === u && r !== u || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, i = t !== u && (r === u || s);
|
|
484
484
|
s && this.element.removeEventListener(this.name, this, r), i && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
485
485
|
}
|
|
@@ -537,7 +537,7 @@ let j = class extends U {
|
|
|
537
537
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
538
538
|
}
|
|
539
539
|
render() {
|
|
540
|
-
return
|
|
540
|
+
return z;
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
543
|
var ie;
|
|
@@ -599,7 +599,7 @@ var x = /* @__PURE__ */ ((e) => (e.reaction = "reaction", e.stars = "stars", e.p
|
|
|
599
599
|
const Ye = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24px'%20viewBox='0%20-960%20960%20960'%20width='24px'%20fill='%23434343'%3e%3cpath%20d='M640-160v-280h160v280H640Zm-240%200v-640h160v640H400Zm-240%200v-440h160v440H160Z'/%3e%3c/svg%3e", Ze = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24px'%20viewBox='0%20-960%20960%20960'%20width='24px'%20fill='%23434343'%3e%3cpath%20d='M160-160v-440h160v440H160Zm240%200v-400l160%20160v240H400Zm160-354L400-674v-126h160v286Zm240%20240L640-434v-6h160v166Zm-9%20219L55-791l57-57%20736%20736-57%2057Z'/%3e%3c/svg%3e", Ge = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24px'%20viewBox='0%20-960%20960%20960'%20width='24px'%20fill='currentColor'%3e%3cpath%20d='M200-200h57l391-391-57-57-391%20391v57Zm-80%2080v-170l528-527q12-11%2026.5-17t30.5-6q16%200%2031%206t26%2018l55%2056q12%2011%2017.5%2026t5.5%2030q0%2016-5.5%2030.5T817-647L290-120H120Zm640-584-56-56%2056%2056Zm-141%2085-28-29%2057%2057-29-28Z'/%3e%3c/svg%3e", Ke = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='%23666666'%20class='bi%20bi-x'%20viewBox='0%200%2016%2016'%3e%3cpath%20d='M4.646%204.646a.5.5%200%200%201%20.708%200L8%207.293l2.646-2.647a.5.5%200%200%201%20.708.708L8.707%208l2.647%202.646a.5.5%200%200%201-.708.708L8%208.707l-2.646%202.647a.5.5%200%200%201-.708-.708L7.293%208%204.646%205.354a.5.5%200%200%201%200-.708'/%3e%3c/svg%3e";
|
|
600
600
|
var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
601
601
|
return typeof e == "string" ? e.length > 0 : typeof e == "number";
|
|
602
|
-
},
|
|
602
|
+
}, $ = function(e, t, o) {
|
|
603
603
|
return t === void 0 && (t = 0), o === void 0 && (o = Math.pow(10, t)), Math.round(o * e) / o + 0;
|
|
604
604
|
}, S = function(e, t, o) {
|
|
605
605
|
return t === void 0 && (t = 0), o === void 0 && (o = 1), e > o ? o : e > t ? e : t;
|
|
@@ -608,7 +608,7 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
|
608
608
|
}, Yt = function(e) {
|
|
609
609
|
return { r: S(e.r, 0, 255), g: S(e.g, 0, 255), b: S(e.b, 0, 255), a: S(e.a) };
|
|
610
610
|
}, yt = function(e) {
|
|
611
|
-
return { r:
|
|
611
|
+
return { r: $(e.r), g: $(e.g), b: $(e.b), a: $(e.a, 3) };
|
|
612
612
|
}, Je = /^#([0-9a-f]{3,8})$/i, rt = function(e) {
|
|
613
613
|
var t = e.toString(16);
|
|
614
614
|
return t.length < 2 ? "0" + t : t;
|
|
@@ -623,7 +623,7 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
|
623
623
|
}, Zt = function(e) {
|
|
624
624
|
return { h: ue(e.h), s: S(e.s, 0, 100), l: S(e.l, 0, 100), a: S(e.a) };
|
|
625
625
|
}, Gt = function(e) {
|
|
626
|
-
return { h:
|
|
626
|
+
return { h: $(e.h), s: $(e.s), l: $(e.l), a: $(e.a, 3) };
|
|
627
627
|
}, Kt = function(e) {
|
|
628
628
|
return fe((o = (t = e).s, { h: t.h, s: (o *= ((r = t.l) < 50 ? r : 100 - r) / 100) > 0 ? 2 * o / (r + o) * 100 : 0, v: r + o, a: t.a }));
|
|
629
629
|
var t, o, r;
|
|
@@ -632,7 +632,7 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
|
632
632
|
var t, o, r, s;
|
|
633
633
|
}, Xe = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Qe = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, to = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, eo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Wt = { string: [[function(e) {
|
|
634
634
|
var t = Je.exec(e);
|
|
635
|
-
return t ? (e = t[1]).length <= 4 ? { r: parseInt(e[0] + e[0], 16), g: parseInt(e[1] + e[1], 16), b: parseInt(e[2] + e[2], 16), a: e.length === 4 ?
|
|
635
|
+
return t ? (e = t[1]).length <= 4 ? { r: parseInt(e[0] + e[0], 16), g: parseInt(e[1] + e[1], 16), b: parseInt(e[2] + e[2], 16), a: e.length === 4 ? $(parseInt(e[3] + e[3], 16) / 255, 2) : 1 } : e.length === 6 || e.length === 8 ? { r: parseInt(e.substr(0, 2), 16), g: parseInt(e.substr(2, 2), 16), b: parseInt(e.substr(4, 2), 16), a: e.length === 8 ? $(parseInt(e.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
|
|
636
636
|
}, "hex"], [function(e) {
|
|
637
637
|
var t = to.exec(e) || eo.exec(e);
|
|
638
638
|
return t ? t[2] !== t[4] || t[4] !== t[6] ? null : Yt({ r: Number(t[1]) / (t[2] ? 100 / 255 : 1), g: Number(t[3]) / (t[4] ? 100 / 255 : 1), b: Number(t[5]) / (t[6] ? 100 / 255 : 1), a: t[7] === void 0 ? 1 : Number(t[7]) / (t[8] ? 100 : 1) }) : null;
|
|
@@ -679,13 +679,13 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
|
679
679
|
return e.prototype.isValid = function() {
|
|
680
680
|
return this.parsed !== null;
|
|
681
681
|
}, e.prototype.brightness = function() {
|
|
682
|
-
return
|
|
682
|
+
return $($t(this.rgba), 2);
|
|
683
683
|
}, e.prototype.isDark = function() {
|
|
684
684
|
return $t(this.rgba) < 0.5;
|
|
685
685
|
}, e.prototype.isLight = function() {
|
|
686
686
|
return $t(this.rgba) >= 0.5;
|
|
687
687
|
}, e.prototype.toHex = function() {
|
|
688
|
-
return t = yt(this.rgba), o = t.r, r = t.g, s = t.b, a = (i = t.a) < 1 ? rt(
|
|
688
|
+
return t = yt(this.rgba), o = t.r, r = t.g, s = t.b, a = (i = t.a) < 1 ? rt($(255 * i)) : "", "#" + rt(o) + rt(r) + rt(s) + a;
|
|
689
689
|
var t, o, r, s, i, a;
|
|
690
690
|
}, e.prototype.toRgb = function() {
|
|
691
691
|
return yt(this.rgba);
|
|
@@ -698,7 +698,7 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
|
698
698
|
return t = Gt(J(this.rgba)), o = t.h, r = t.s, s = t.l, (i = t.a) < 1 ? "hsla(" + o + ", " + r + "%, " + s + "%, " + i + ")" : "hsl(" + o + ", " + r + "%, " + s + "%)";
|
|
699
699
|
var t, o, r, s, i;
|
|
700
700
|
}, e.prototype.toHsv = function() {
|
|
701
|
-
return t = he(this.rgba), { h:
|
|
701
|
+
return t = he(this.rgba), { h: $(t.h), s: $(t.s), v: $(t.v), a: $(t.a, 3) };
|
|
702
702
|
var t;
|
|
703
703
|
}, e.prototype.invert = function() {
|
|
704
704
|
return C({ r: 255 - (t = this.rgba).r, g: 255 - t.g, b: 255 - t.b, a: t.a });
|
|
@@ -716,11 +716,11 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
|
716
716
|
}, e.prototype.rotate = function(t) {
|
|
717
717
|
return t === void 0 && (t = 15), this.hue(this.hue() + t);
|
|
718
718
|
}, e.prototype.alpha = function(t) {
|
|
719
|
-
return typeof t == "number" ? C({ r: (o = this.rgba).r, g: o.g, b: o.b, a: t }) :
|
|
719
|
+
return typeof t == "number" ? C({ r: (o = this.rgba).r, g: o.g, b: o.b, a: t }) : $(this.rgba.a, 3);
|
|
720
720
|
var o;
|
|
721
721
|
}, e.prototype.hue = function(t) {
|
|
722
722
|
var o = J(this.rgba);
|
|
723
|
-
return typeof t == "number" ? C({ h: t, s: o.s, l: o.l, a: o.a }) :
|
|
723
|
+
return typeof t == "number" ? C({ h: t, s: o.s, l: o.l, a: o.a }) : $(o.h);
|
|
724
724
|
}, e.prototype.isEqual = function(t) {
|
|
725
725
|
return this.toHex() === C(t).toHex();
|
|
726
726
|
}, e;
|
|
@@ -744,7 +744,7 @@ function ro(e) {
|
|
|
744
744
|
}
|
|
745
745
|
};
|
|
746
746
|
}
|
|
747
|
-
const
|
|
747
|
+
const m = ro("Pollcatch");
|
|
748
748
|
var me = /* @__PURE__ */ ((e) => (e[e.AA_NORMAL = 4.5] = "AA_NORMAL", e[e.AA_LARGE = 3] = "AA_LARGE", e[e.AAA_NORMAL = 7] = "AAA_NORMAL", e[e.AAA_LARGE = 4.5] = "AAA_LARGE", e))(me || {});
|
|
749
749
|
const so = {
|
|
750
750
|
black: "#000000",
|
|
@@ -777,7 +777,7 @@ function te(e) {
|
|
|
777
777
|
}
|
|
778
778
|
function ao(e, t = {}) {
|
|
779
779
|
if (!C(e).isValid())
|
|
780
|
-
return
|
|
780
|
+
return m.warn(`Invalid color provided: ${e}`), "black";
|
|
781
781
|
const {
|
|
782
782
|
minContrast: r = 4.5,
|
|
783
783
|
colorOptions: s = ["black", "white", "light", "dark"],
|
|
@@ -800,7 +800,7 @@ function ao(e, t = {}) {
|
|
|
800
800
|
const w = St(e, h);
|
|
801
801
|
w > p && (p = w, l = h);
|
|
802
802
|
}
|
|
803
|
-
|
|
803
|
+
m.warn(
|
|
804
804
|
`No color option met the minimum contrast ratio of ${r}:1 against ${e}. Using ${l} with contrast ratio ${p.toFixed(2)}:1 instead.`
|
|
805
805
|
);
|
|
806
806
|
}
|
|
@@ -809,7 +809,7 @@ function ao(e, t = {}) {
|
|
|
809
809
|
function no(e) {
|
|
810
810
|
const o = io(e) || e, r = C(o);
|
|
811
811
|
if (!r.isValid())
|
|
812
|
-
return
|
|
812
|
+
return m.warn(`Invalid color provided: ${e}`), { r: 0, g: 0, b: 0 };
|
|
813
813
|
const { r: s, g: i, b: a } = r.toRgb();
|
|
814
814
|
return { r: s, g: i, b: a };
|
|
815
815
|
}
|
|
@@ -901,17 +901,17 @@ function ho(e) {
|
|
|
901
901
|
return /^(#[0-9a-fA-F]{3,8}|rgb\([^)]+\)|rgba\([^)]+\)|hsl\([^)]+\)|hsla\([^)]+\)|[a-zA-Z]+)$/.test(t);
|
|
902
902
|
}
|
|
903
903
|
function R(e) {
|
|
904
|
-
return ho(e) ? e.replace(/[<>"']/g, "").trim() : (
|
|
904
|
+
return ho(e) ? e.replace(/[<>"']/g, "").trim() : (m.warn("Invalid color value:", e), "#000000");
|
|
905
905
|
}
|
|
906
906
|
function fo(e) {
|
|
907
907
|
if (typeof e != "string")
|
|
908
|
-
return
|
|
908
|
+
return m.warn("Non-string value passed to sanitizeCSS:", typeof e), "";
|
|
909
909
|
let t = e;
|
|
910
910
|
return t = t.replace(/@import[^;]+;/gi, "").replace(/expression\s*\([^)]*\)/gi, "").replace(/javascript:\s*[^"'\s;]*/gi, "").replace(/url\s*\(\s*["']?data:(?!image\/[^;]+;base64,)[^"')]*["']?\s*\)/gi, "").replace(/-moz-binding\s*:[^;]+;/gi, "").replace(/behavior\s*:[^;]+;/gi, ""), t;
|
|
911
911
|
}
|
|
912
912
|
const ee = "https://jpxwfjorwcsrqraorpbj.supabase.co/functions/v1/data", mo = "pc_session_id", bo = 24 * 60 * 60 * 1e3;
|
|
913
913
|
function oe() {
|
|
914
|
-
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : (
|
|
914
|
+
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : (m.warn("crypto.randomUUID not available, using fallback UUID generator"), "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
915
915
|
const t = Math.random() * 16 | 0;
|
|
916
916
|
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
917
917
|
}));
|
|
@@ -921,7 +921,7 @@ function Tt() {
|
|
|
921
921
|
try {
|
|
922
922
|
return localStorage.setItem(e, e), localStorage.removeItem(e), !0;
|
|
923
923
|
} catch {
|
|
924
|
-
return
|
|
924
|
+
return m.warn("localStorage not available, session ID will not persist"), !1;
|
|
925
925
|
}
|
|
926
926
|
}
|
|
927
927
|
function be(e) {
|
|
@@ -929,7 +929,7 @@ function be(e) {
|
|
|
929
929
|
const t = localStorage.getItem(e);
|
|
930
930
|
return t ? JSON.parse(t) : void 0;
|
|
931
931
|
} catch (t) {
|
|
932
|
-
|
|
932
|
+
m.warn(`Failed to get item from localStorage: ${e}`, t);
|
|
933
933
|
return;
|
|
934
934
|
}
|
|
935
935
|
}
|
|
@@ -937,29 +937,29 @@ function ge(e, t) {
|
|
|
937
937
|
try {
|
|
938
938
|
return localStorage.setItem(e, JSON.stringify(t)), !0;
|
|
939
939
|
} catch (o) {
|
|
940
|
-
return
|
|
940
|
+
return m.warn(`Failed to set item in localStorage: ${e}`, o), !1;
|
|
941
941
|
}
|
|
942
942
|
}
|
|
943
943
|
async function go() {
|
|
944
944
|
if (typeof window < "u") {
|
|
945
945
|
if (window.pcProject !== void 0)
|
|
946
|
-
return
|
|
946
|
+
return m.debug("Found project key in global variable"), window.pcProject;
|
|
947
947
|
const e = document.querySelectorAll("script[pc-project]");
|
|
948
948
|
if (e.length > 0) {
|
|
949
949
|
const t = e[e.length - 1], o = t == null ? void 0 : t.getAttribute("pc-project");
|
|
950
950
|
if (o)
|
|
951
|
-
return
|
|
951
|
+
return m.debug("Found project key in script tag attribute"), o;
|
|
952
952
|
}
|
|
953
953
|
}
|
|
954
|
-
|
|
954
|
+
m.warn("No project key found in global variable or script tags");
|
|
955
955
|
}
|
|
956
956
|
async function re() {
|
|
957
957
|
const e = mo, t = bo;
|
|
958
958
|
if (Tt()) {
|
|
959
959
|
const o = be(e);
|
|
960
960
|
if (o && o.id && o.timestamp && Date.now() - o.timestamp < t)
|
|
961
|
-
return
|
|
962
|
-
|
|
961
|
+
return m.debug("Using existing session ID from localStorage"), o.id;
|
|
962
|
+
m.debug(
|
|
963
963
|
o ? "Session ID expired" : "No session ID found",
|
|
964
964
|
"generating new one"
|
|
965
965
|
);
|
|
@@ -967,10 +967,10 @@ async function re() {
|
|
|
967
967
|
return ge(e, {
|
|
968
968
|
id: r,
|
|
969
969
|
timestamp: Date.now()
|
|
970
|
-
}) ?
|
|
970
|
+
}) ? m.debug("Generated and stored new session ID") : m.warn("Generated session ID but failed to store it"), r;
|
|
971
971
|
} else {
|
|
972
972
|
const o = oe();
|
|
973
|
-
return
|
|
973
|
+
return m.debug("Generated non-persistent session ID"), o;
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
976
|
function lt(e) {
|
|
@@ -986,7 +986,7 @@ function lt(e) {
|
|
|
986
986
|
const s = t / r * 100, i = o / r * 100;
|
|
987
987
|
return Math.round(s - i);
|
|
988
988
|
}
|
|
989
|
-
function
|
|
989
|
+
function O() {
|
|
990
990
|
return {
|
|
991
991
|
count: 0,
|
|
992
992
|
sum: 0,
|
|
@@ -998,21 +998,21 @@ function P() {
|
|
|
998
998
|
}
|
|
999
999
|
function vo(e) {
|
|
1000
1000
|
if (!Tt())
|
|
1001
|
-
return
|
|
1001
|
+
return O();
|
|
1002
1002
|
try {
|
|
1003
1003
|
const t = be(e);
|
|
1004
|
-
return t ? { ...
|
|
1004
|
+
return t ? { ...O(), ...t } : O();
|
|
1005
1005
|
} catch (t) {
|
|
1006
|
-
return
|
|
1006
|
+
return m.warn("Failed to load localStats from localStorage", t), O();
|
|
1007
1007
|
}
|
|
1008
1008
|
}
|
|
1009
1009
|
function yo(e, t) {
|
|
1010
1010
|
if (!Tt())
|
|
1011
1011
|
return !1;
|
|
1012
1012
|
try {
|
|
1013
|
-
return ge(e, t) ? (
|
|
1013
|
+
return ge(e, t) ? (m.debug("Saved localStats to localStorage", t), !0) : !1;
|
|
1014
1014
|
} catch (o) {
|
|
1015
|
-
return
|
|
1015
|
+
return m.warn("Failed to save localStats to localStorage", o), !1;
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
1018
|
function wo(e, t) {
|
|
@@ -1032,7 +1032,7 @@ function wo(e, t) {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
function $o(e, t) {
|
|
1034
1034
|
if (!e.count && !t.count)
|
|
1035
|
-
return
|
|
1035
|
+
return O();
|
|
1036
1036
|
if (!e.count)
|
|
1037
1037
|
return { ...t };
|
|
1038
1038
|
const o = {
|
|
@@ -1100,7 +1100,7 @@ function ko(e, t = 50) {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
class Ao {
|
|
1102
1102
|
constructor(t) {
|
|
1103
|
-
this.stats =
|
|
1103
|
+
this.stats = O(), this.localStats = O(), this.isLoading = !0, this.isSubmitting = !1, (this.host = t).addController(this);
|
|
1104
1104
|
}
|
|
1105
1105
|
hostConnected() {
|
|
1106
1106
|
this.loadStats();
|
|
@@ -1127,27 +1127,39 @@ class Ao {
|
|
|
1127
1127
|
this.isLoading = !1, this.stats = this.localStats, this.host.requestUpdate();
|
|
1128
1128
|
try {
|
|
1129
1129
|
const o = await this.getProjectId(), r = t.name, s = t.type;
|
|
1130
|
-
if (!r)
|
|
1131
|
-
throw new Error("Name parameter is required");
|
|
1132
1130
|
let i;
|
|
1133
|
-
t.dataFunc && typeof window < "u"
|
|
1134
|
-
|
|
1131
|
+
if (t.dataFunc && typeof window < "u") {
|
|
1132
|
+
const w = t.dataFunc.replace(/^window\./, "").split(".");
|
|
1133
|
+
let v = window;
|
|
1134
|
+
for (const E of w)
|
|
1135
|
+
if (v = v == null ? void 0 : v[E], v === void 0) break;
|
|
1136
|
+
i = v;
|
|
1137
|
+
}
|
|
1138
|
+
let a, n;
|
|
1135
1139
|
if (i && typeof i == "function")
|
|
1136
|
-
|
|
1140
|
+
if (m.debug(`Using data function for: ${r}`, {
|
|
1137
1141
|
dataFuncName: t.dataFunc,
|
|
1138
1142
|
projectKey: o
|
|
1139
|
-
}), a = await i(o, r)
|
|
1143
|
+
}), a = await i(o, r), a && typeof a == "object" && "success" in a && "data" in a) {
|
|
1144
|
+
if (!a.success)
|
|
1145
|
+
throw m.error("Custom data function returned unsuccessful response", a), new Error("Custom data function returned unsuccessful response");
|
|
1146
|
+
n = a.data || {};
|
|
1147
|
+
} else
|
|
1148
|
+
n = a || {};
|
|
1140
1149
|
else {
|
|
1141
|
-
const h = t.dataEndpoint || ee
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1150
|
+
const h = t.dataEndpoint || ee;
|
|
1151
|
+
if (!r)
|
|
1152
|
+
throw new Error("Name parameter is required");
|
|
1153
|
+
const w = `${h}/${encodeURIComponent(o)}/${encodeURIComponent(r)}`;
|
|
1154
|
+
m.debug(`Fetching stats for: ${r}`, { endpoint: h, projectKey: o });
|
|
1155
|
+
const v = await fetch(w);
|
|
1156
|
+
if (!v.ok)
|
|
1157
|
+
throw new Error(`API request failed with status: ${v.status}`);
|
|
1158
|
+
if (a = await v.json(), !a.success)
|
|
1159
|
+
throw m.error("Backend returned unsuccessful response", a), new Error("Backend returned unsuccessful response");
|
|
1160
|
+
n = a.data || {};
|
|
1147
1161
|
}
|
|
1148
|
-
|
|
1149
|
-
throw b.error("Backend returned unsuccessful response", a), new Error("Backend returned unsuccessful response");
|
|
1150
|
-
const n = a.data || {}, l = n.count > 0 ? Math.round(n.sum / n.count) : 0, p = Math.round(n.sum / n.count * 100), c = {
|
|
1162
|
+
const l = n.count > 0 ? Math.round(n.sum / n.count) : 0, p = Math.round(n.sum / n.count * 100), c = {
|
|
1151
1163
|
count: n.count ?? 0,
|
|
1152
1164
|
sum: n.sum,
|
|
1153
1165
|
avg: l,
|
|
@@ -1158,7 +1170,7 @@ class Ao {
|
|
|
1158
1170
|
};
|
|
1159
1171
|
this.stats = c;
|
|
1160
1172
|
} catch (o) {
|
|
1161
|
-
throw
|
|
1173
|
+
throw m.error("Error loading stats:", o, this.localStats), o;
|
|
1162
1174
|
} finally {
|
|
1163
1175
|
this.isLoading = !1, this.host.requestUpdate();
|
|
1164
1176
|
}
|
|
@@ -1170,9 +1182,9 @@ class Ao {
|
|
|
1170
1182
|
const t = await this.getLocalStatsKey();
|
|
1171
1183
|
try {
|
|
1172
1184
|
const o = vo(t);
|
|
1173
|
-
|
|
1185
|
+
m.debug("Loaded localStats from localStorage", o), this.localStats = o;
|
|
1174
1186
|
} catch (o) {
|
|
1175
|
-
|
|
1187
|
+
m.warn("Failed to generate localStorage key for localStats", o), this.localStats = O();
|
|
1176
1188
|
}
|
|
1177
1189
|
this.host.requestUpdate();
|
|
1178
1190
|
}
|
|
@@ -1182,9 +1194,9 @@ class Ao {
|
|
|
1182
1194
|
async persistLocalStats() {
|
|
1183
1195
|
try {
|
|
1184
1196
|
const t = await this.getLocalStatsKey();
|
|
1185
|
-
yo(t, this.localStats) ||
|
|
1197
|
+
yo(t, this.localStats) || m.warn("Failed to save localStats to localStorage");
|
|
1186
1198
|
} catch (t) {
|
|
1187
|
-
|
|
1199
|
+
m.warn("Failed to save localStats to localStorage", t);
|
|
1188
1200
|
}
|
|
1189
1201
|
}
|
|
1190
1202
|
/**
|
|
@@ -1212,14 +1224,14 @@ class Ao {
|
|
|
1212
1224
|
}, o && o.length > 0)
|
|
1213
1225
|
for (const s of o)
|
|
1214
1226
|
s && (this.localStats.breakdown[s] = 1);
|
|
1215
|
-
this.stats = $o(this.stats, this.localStats),
|
|
1227
|
+
this.stats = $o(this.stats, this.localStats), m.debug("Stats updated - remote: ", this.stats), m.debug("Stats updated - local: ", this.stats), this.persistLocalStats(), this.host.requestUpdate();
|
|
1216
1228
|
}
|
|
1217
1229
|
async markStatsAsSubmitted() {
|
|
1218
1230
|
this.localStats.submitted = (/* @__PURE__ */ new Date()).toISOString(), await this.persistLocalStats(), this.host.requestUpdate();
|
|
1219
1231
|
}
|
|
1220
1232
|
async submitStats() {
|
|
1221
1233
|
if (!this.hasLocalStats())
|
|
1222
|
-
throw
|
|
1234
|
+
throw m.warn("No local stats to submit"), new Error("No local stats to submit");
|
|
1223
1235
|
const t = this.host, o = Math.floor(Date.now() / 1e3).toString(), r = await re(), s = await this.getProjectId(), i = t.name || "", a = this.localStats.sum, n = Object.keys(this.localStats.breakdown || {});
|
|
1224
1236
|
this.isSubmitting = !0, this.host.requestUpdate();
|
|
1225
1237
|
const l = {
|
|
@@ -1236,7 +1248,7 @@ class Ao {
|
|
|
1236
1248
|
try {
|
|
1237
1249
|
await this.sendStats({ ...l, hash: p }), await this.markStatsAsSubmitted(), this.dispatchSubmitEvent(l);
|
|
1238
1250
|
} catch (c) {
|
|
1239
|
-
|
|
1251
|
+
m.warn("Failed to send stats event", c);
|
|
1240
1252
|
} finally {
|
|
1241
1253
|
this.isSubmitting = !1, this.host.requestUpdate();
|
|
1242
1254
|
}
|
|
@@ -1245,18 +1257,18 @@ class Ao {
|
|
|
1245
1257
|
async sendStats(t) {
|
|
1246
1258
|
const o = JSON.stringify(t), r = this.host, s = r.dataEndpoint || ee;
|
|
1247
1259
|
if (r.dataFunc) {
|
|
1248
|
-
|
|
1260
|
+
m.debug("Skip sending stats as data function is in use.");
|
|
1249
1261
|
return;
|
|
1250
1262
|
}
|
|
1251
1263
|
if (!dt(s))
|
|
1252
|
-
throw
|
|
1264
|
+
throw m.error("Invalid data endpoint", { dataEndpoint: s }), new Error(`Invalid data endpoint: ${s}`);
|
|
1253
1265
|
try {
|
|
1254
|
-
if (
|
|
1266
|
+
if (m.debug("Sending stats", { endpoint: s, event: t }), typeof navigator < "u" && navigator.sendBeacon)
|
|
1255
1267
|
if (navigator.sendBeacon(s, o)) {
|
|
1256
|
-
|
|
1268
|
+
m.debug("Successfully sent stats via sendBeacon");
|
|
1257
1269
|
return;
|
|
1258
1270
|
} else
|
|
1259
|
-
|
|
1271
|
+
m.debug("sendBeacon failed, falling back to fetch");
|
|
1260
1272
|
const i = await fetch(s, {
|
|
1261
1273
|
body: o,
|
|
1262
1274
|
method: "POST",
|
|
@@ -1267,9 +1279,9 @@ class Ao {
|
|
|
1267
1279
|
});
|
|
1268
1280
|
if (!i.ok)
|
|
1269
1281
|
throw new Error(`API request failed with status: ${i.status}`);
|
|
1270
|
-
|
|
1282
|
+
m.debug("Successfully sent stats via fetch");
|
|
1271
1283
|
} catch (i) {
|
|
1272
|
-
throw
|
|
1284
|
+
throw m.error("Failed to send analytics:", i), i;
|
|
1273
1285
|
}
|
|
1274
1286
|
}
|
|
1275
1287
|
/**
|
|
@@ -1286,7 +1298,7 @@ class Ao {
|
|
|
1286
1298
|
pct: (o == null ? void 0 : o.pct) || 0,
|
|
1287
1299
|
nps: r.type === x.nps ? lt((o == null ? void 0 : o.breakdown) || {}) : 0
|
|
1288
1300
|
};
|
|
1289
|
-
return
|
|
1301
|
+
return m.debug("Stats data: ", this.stats), So(t, s);
|
|
1290
1302
|
}
|
|
1291
1303
|
/**
|
|
1292
1304
|
* Checks if a value is selected in the local stats
|
|
@@ -1346,7 +1358,7 @@ class Ao {
|
|
|
1346
1358
|
bubbles: !0,
|
|
1347
1359
|
composed: !0
|
|
1348
1360
|
});
|
|
1349
|
-
t.dispatchEvent(i),
|
|
1361
|
+
t.dispatchEvent(i), m.debug("Dispatched change event", s);
|
|
1350
1362
|
}
|
|
1351
1363
|
/**
|
|
1352
1364
|
* Dispatches a 'submit' CustomEvent on the host element
|
|
@@ -1358,7 +1370,7 @@ class Ao {
|
|
|
1358
1370
|
bubbles: !0,
|
|
1359
1371
|
composed: !0
|
|
1360
1372
|
});
|
|
1361
|
-
o.dispatchEvent(r),
|
|
1373
|
+
o.dispatchEvent(r), m.debug("Dispatched submit event", t);
|
|
1362
1374
|
}
|
|
1363
1375
|
hasLocalStats() {
|
|
1364
1376
|
var t;
|
|
@@ -1510,7 +1522,7 @@ let xe = class {
|
|
|
1510
1522
|
* Copyright 2018 Google LLC
|
|
1511
1523
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1512
1524
|
*/
|
|
1513
|
-
const
|
|
1525
|
+
const y = $e(class extends xe {
|
|
1514
1526
|
constructor(e) {
|
|
1515
1527
|
var t;
|
|
1516
1528
|
if (super(e), e.type !== we.ATTRIBUTE || e.name !== "class" || ((t = e.strings) == null ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
@@ -1531,7 +1543,7 @@ const v = $e(class extends xe {
|
|
|
1531
1543
|
const a = !!t[i];
|
|
1532
1544
|
a === this.st.has(i) || (s = this.nt) != null && s.has(i) || (a ? (o.add(i), this.st.add(i)) : (o.remove(i), this.st.delete(i)));
|
|
1533
1545
|
}
|
|
1534
|
-
return
|
|
1546
|
+
return z;
|
|
1535
1547
|
}
|
|
1536
1548
|
});
|
|
1537
1549
|
var Oo = Object.defineProperty, g = (e, t, o, r) => {
|
|
@@ -1713,7 +1725,7 @@ const st = {
|
|
|
1713
1725
|
"pc-status": !0,
|
|
1714
1726
|
[`pc-flex-content-${k(this.statsPosition, this.statsAlign)}`]: !0
|
|
1715
1727
|
};
|
|
1716
|
-
return d`<div class="${
|
|
1728
|
+
return d`<div class="${y(o)}" data-testid="pc-status">
|
|
1717
1729
|
${this.renderStatsText()} ${this.renderChartToggle()} ${this.renderEditToggleIcon()}
|
|
1718
1730
|
</div>`;
|
|
1719
1731
|
}
|
|
@@ -1839,106 +1851,106 @@ Mt.styles = [
|
|
|
1839
1851
|
}
|
|
1840
1852
|
`
|
|
1841
1853
|
];
|
|
1842
|
-
let
|
|
1854
|
+
let b = Mt;
|
|
1843
1855
|
g([
|
|
1844
1856
|
f({ type: String, attribute: "show-stats" })
|
|
1845
|
-
],
|
|
1857
|
+
], b.prototype, "showStats");
|
|
1846
1858
|
g([
|
|
1847
1859
|
f({ type: Boolean, attribute: "show-chart" })
|
|
1848
|
-
],
|
|
1860
|
+
], b.prototype, "showChart");
|
|
1849
1861
|
g([
|
|
1850
1862
|
f({ type: Boolean, attribute: "initialized" })
|
|
1851
|
-
],
|
|
1863
|
+
], b.prototype, "initialized");
|
|
1852
1864
|
g([
|
|
1853
1865
|
f({ type: Boolean, attribute: "lock-answer" })
|
|
1854
|
-
],
|
|
1866
|
+
], b.prototype, "lockAnswer");
|
|
1855
1867
|
g([
|
|
1856
1868
|
f({ type: String, attribute: "primary-color" })
|
|
1857
|
-
],
|
|
1869
|
+
], b.prototype, "primaryColor");
|
|
1858
1870
|
g([
|
|
1859
1871
|
f({ type: String, attribute: "mute-color" })
|
|
1860
|
-
],
|
|
1872
|
+
], b.prototype, "muteColor");
|
|
1861
1873
|
g([
|
|
1862
1874
|
f({ type: String, attribute: "text-color" })
|
|
1863
|
-
],
|
|
1875
|
+
], b.prototype, "textColor");
|
|
1864
1876
|
g([
|
|
1865
1877
|
f({ type: String, attribute: "background-color" })
|
|
1866
|
-
],
|
|
1878
|
+
], b.prototype, "backgroundColor");
|
|
1867
1879
|
g([
|
|
1868
1880
|
f({ type: String, attribute: "accent-color" })
|
|
1869
|
-
],
|
|
1881
|
+
], b.prototype, "accentColor");
|
|
1870
1882
|
g([
|
|
1871
1883
|
f({ type: String, attribute: "star-color" })
|
|
1872
|
-
],
|
|
1884
|
+
], b.prototype, "starColor");
|
|
1873
1885
|
g([
|
|
1874
1886
|
f({ type: String, attribute: "star-hover-color" })
|
|
1875
|
-
],
|
|
1887
|
+
], b.prototype, "starHoverColor");
|
|
1876
1888
|
g([
|
|
1877
1889
|
f({ type: String })
|
|
1878
|
-
],
|
|
1890
|
+
], b.prototype, "size");
|
|
1879
1891
|
g([
|
|
1880
1892
|
f({ type: String, attribute: "aria-label" })
|
|
1881
|
-
],
|
|
1893
|
+
], b.prototype, "ariaLabel");
|
|
1882
1894
|
g([
|
|
1883
1895
|
f({ type: String, attribute: "aria-describedby" })
|
|
1884
|
-
],
|
|
1896
|
+
], b.prototype, "ariaDescribedby");
|
|
1885
1897
|
g([
|
|
1886
1898
|
f({ type: Number, attribute: "min-contrast" })
|
|
1887
|
-
],
|
|
1899
|
+
], b.prototype, "minContrast");
|
|
1888
1900
|
g([
|
|
1889
1901
|
f({ type: String })
|
|
1890
|
-
],
|
|
1902
|
+
], b.prototype, "css");
|
|
1891
1903
|
g([
|
|
1892
1904
|
f({ type: Array })
|
|
1893
|
-
],
|
|
1905
|
+
], b.prototype, "options");
|
|
1894
1906
|
g([
|
|
1895
1907
|
f({ type: String })
|
|
1896
|
-
],
|
|
1908
|
+
], b.prototype, "project");
|
|
1897
1909
|
g([
|
|
1898
1910
|
f({ type: String, attribute: "name" })
|
|
1899
|
-
],
|
|
1911
|
+
], b.prototype, "name");
|
|
1900
1912
|
g([
|
|
1901
1913
|
f({ type: String })
|
|
1902
|
-
],
|
|
1914
|
+
], b.prototype, "metadata");
|
|
1903
1915
|
g([
|
|
1904
1916
|
f({ type: String, attribute: "data-func" })
|
|
1905
|
-
],
|
|
1917
|
+
], b.prototype, "dataFunc");
|
|
1906
1918
|
g([
|
|
1907
1919
|
f({ type: String, attribute: "data-endpoint" })
|
|
1908
|
-
],
|
|
1920
|
+
], b.prototype, "dataEndpoint");
|
|
1909
1921
|
g([
|
|
1910
1922
|
f({ type: String })
|
|
1911
|
-
],
|
|
1923
|
+
], b.prototype, "question");
|
|
1912
1924
|
g([
|
|
1913
1925
|
f({ type: String, attribute: "question-position" })
|
|
1914
|
-
],
|
|
1926
|
+
], b.prototype, "questionPosition");
|
|
1915
1927
|
g([
|
|
1916
1928
|
f({ type: String, attribute: "question-align" })
|
|
1917
|
-
],
|
|
1929
|
+
], b.prototype, "questionAlign");
|
|
1918
1930
|
g([
|
|
1919
1931
|
f({ type: String, attribute: "stats-text" })
|
|
1920
|
-
],
|
|
1932
|
+
], b.prototype, "statsText");
|
|
1921
1933
|
g([
|
|
1922
1934
|
f({ type: String, attribute: "stats-position" })
|
|
1923
|
-
],
|
|
1935
|
+
], b.prototype, "statsPosition");
|
|
1924
1936
|
g([
|
|
1925
1937
|
f({ type: String, attribute: "stats-align" })
|
|
1926
|
-
],
|
|
1938
|
+
], b.prototype, "statsAlign");
|
|
1927
1939
|
g([
|
|
1928
1940
|
f({ type: String, attribute: "button-text" })
|
|
1929
|
-
],
|
|
1941
|
+
], b.prototype, "buttonText");
|
|
1930
1942
|
g([
|
|
1931
1943
|
f({ type: String, attribute: "button-radius" })
|
|
1932
|
-
],
|
|
1944
|
+
], b.prototype, "buttonRadius");
|
|
1933
1945
|
g([
|
|
1934
1946
|
f({ type: String, attribute: "thank-you-msg" })
|
|
1935
|
-
],
|
|
1947
|
+
], b.prototype, "thankYouMsg");
|
|
1936
1948
|
g([
|
|
1937
1949
|
f({ type: Boolean, attribute: "multiple" })
|
|
1938
|
-
],
|
|
1950
|
+
], b.prototype, "multiple");
|
|
1939
1951
|
g([
|
|
1940
1952
|
f({ type: Boolean, attribute: "read-only" })
|
|
1941
|
-
],
|
|
1953
|
+
], b.prototype, "readOnly");
|
|
1942
1954
|
const To = F`
|
|
1943
1955
|
/* CSS variables inherit from parent - defaults are specified at usage sites */
|
|
1944
1956
|
|
|
@@ -2599,7 +2611,7 @@ var zo = Object.defineProperty, Io = Object.getOwnPropertyDescriptor, Y = (e, t,
|
|
|
2599
2611
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
2600
2612
|
return r && s && zo(t, o, s), s;
|
|
2601
2613
|
};
|
|
2602
|
-
let
|
|
2614
|
+
let I = class extends b {
|
|
2603
2615
|
constructor() {
|
|
2604
2616
|
super(), this.min = 0, this.max = 10, this.type = x.nps, this.minLabel = "Not at all", this.maxLabel = "Extremely", this.minMaxPosition = "top", this.hoverValue = -1, this.handleNumberLeave = () => {
|
|
2605
2617
|
this.hoverValue = -1;
|
|
@@ -2624,7 +2636,7 @@ let z = class extends m {
|
|
|
2624
2636
|
<button
|
|
2625
2637
|
data-testid="nps-button-${s}"
|
|
2626
2638
|
?disabled=${!this.displayController.allowEdit()}
|
|
2627
|
-
class=${
|
|
2639
|
+
class=${y(a)}
|
|
2628
2640
|
@click="${() => this.handleNumberClick(s)}"
|
|
2629
2641
|
@mouseenter="${() => this.handleNumberHover(s)}"
|
|
2630
2642
|
@focus="${() => this.handleNumberHover(s)}"
|
|
@@ -2717,9 +2729,9 @@ let z = class extends m {
|
|
|
2717
2729
|
[`pc-flex-align-${k(this.statsPosition, this.statsAlign)}`]: !0
|
|
2718
2730
|
};
|
|
2719
2731
|
return d`
|
|
2720
|
-
<div class="pc-container ${
|
|
2732
|
+
<div class="pc-container ${y(e)}" data-testid="nps-container">
|
|
2721
2733
|
${this.renderLabelAtStart()}
|
|
2722
|
-
<div class="pc-body ${
|
|
2734
|
+
<div class="pc-body ${y(t)}" data-testid="nps-body">
|
|
2723
2735
|
${this.renderStatusAtStart()} ${this.renderContent()} ${this.renderStatusAtEnd()}
|
|
2724
2736
|
</div>
|
|
2725
2737
|
${this.renderLabelAtEnd()}
|
|
@@ -2727,25 +2739,25 @@ let z = class extends m {
|
|
|
2727
2739
|
`;
|
|
2728
2740
|
}
|
|
2729
2741
|
};
|
|
2730
|
-
|
|
2742
|
+
I.styles = [...b.styles, pt, To];
|
|
2731
2743
|
Y([
|
|
2732
2744
|
f({ type: String, attribute: "min-label" })
|
|
2733
|
-
],
|
|
2745
|
+
], I.prototype, "minLabel", 2);
|
|
2734
2746
|
Y([
|
|
2735
2747
|
f({ type: String, attribute: "max-label" })
|
|
2736
|
-
],
|
|
2748
|
+
], I.prototype, "maxLabel", 2);
|
|
2737
2749
|
Y([
|
|
2738
2750
|
f({ type: String, attribute: "thank-you-msg" })
|
|
2739
|
-
],
|
|
2751
|
+
], I.prototype, "thankYouMsg", 2);
|
|
2740
2752
|
Y([
|
|
2741
2753
|
f({ type: String, attribute: "min-max-position" })
|
|
2742
|
-
],
|
|
2754
|
+
], I.prototype, "minMaxPosition", 2);
|
|
2743
2755
|
Y([
|
|
2744
2756
|
Ot()
|
|
2745
|
-
],
|
|
2746
|
-
|
|
2757
|
+
], I.prototype, "hoverValue", 2);
|
|
2758
|
+
I = Y([
|
|
2747
2759
|
ot("pc-nps")
|
|
2748
|
-
],
|
|
2760
|
+
], I);
|
|
2749
2761
|
const No = F`
|
|
2750
2762
|
/* CSS variables inherit from parent - defaults are specified at usage sites */
|
|
2751
2763
|
|
|
@@ -3008,7 +3020,7 @@ var Mo = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, Nt = (e, t
|
|
|
3008
3020
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
3009
3021
|
return r && s && Mo(t, o, s), s;
|
|
3010
3022
|
};
|
|
3011
|
-
let tt = class extends
|
|
3023
|
+
let tt = class extends b {
|
|
3012
3024
|
constructor() {
|
|
3013
3025
|
super(), this.type = x.poll, this.multiple = !1, this.compact = !1, this.hasEditButton = !0, this.statsText = "{count} votes", this.questionPosition = "top", this.statsPosition = "bottom", this.showStats = "after-vote";
|
|
3014
3026
|
}
|
|
@@ -3017,7 +3029,7 @@ let tt = class extends m {
|
|
|
3017
3029
|
"pc-status": !0,
|
|
3018
3030
|
[`pc-flex-content-${k("bottom", this.statsAlign)}`]: !0
|
|
3019
3031
|
};
|
|
3020
|
-
return d`<div class="${
|
|
3032
|
+
return d`<div class="${y(t)}" data-testid="pc-status">
|
|
3021
3033
|
<span>${this.renderStatsText()} ${this.renderEditToggleIcon("stats-edit-button")}</span>
|
|
3022
3034
|
</div>`;
|
|
3023
3035
|
}
|
|
@@ -3032,7 +3044,7 @@ let tt = class extends m {
|
|
|
3032
3044
|
}, t = this.displayController.shouldDisableSubmitButton();
|
|
3033
3045
|
return d`
|
|
3034
3046
|
<button
|
|
3035
|
-
class="${
|
|
3047
|
+
class="${y(e)}"
|
|
3036
3048
|
data-testid="pc-submit-button"
|
|
3037
3049
|
@click="${this.handleSubmit}"
|
|
3038
3050
|
?disabled="${t}"
|
|
@@ -3113,7 +3125,7 @@ let tt = class extends m {
|
|
|
3113
3125
|
return d`
|
|
3114
3126
|
<button
|
|
3115
3127
|
data-testid="poll-option-i${t}"
|
|
3116
|
-
class="${
|
|
3128
|
+
class="${y(s)}"
|
|
3117
3129
|
@click="${() => this.handleClick(e)}"
|
|
3118
3130
|
?disabled="${r}"
|
|
3119
3131
|
id="${a}-option-${t}"
|
|
@@ -3140,7 +3152,7 @@ let tt = class extends m {
|
|
|
3140
3152
|
});
|
|
3141
3153
|
return d`
|
|
3142
3154
|
<div
|
|
3143
|
-
class="${
|
|
3155
|
+
class="${y({
|
|
3144
3156
|
"poll-container": !0
|
|
3145
3157
|
})}"
|
|
3146
3158
|
data-testid="poll-option-container"
|
|
@@ -3157,13 +3169,13 @@ let tt = class extends m {
|
|
|
3157
3169
|
renderBarChart() {
|
|
3158
3170
|
var l, p;
|
|
3159
3171
|
const e = ((l = this.dataController.stats) == null ? void 0 : l.breakdown) || {}, t = ((p = this.dataController.localStats) == null ? void 0 : p.breakdown) || {}, o = Object.values(e).reduce((c, h) => c + h, 0), r = this.options.map((c, h) => {
|
|
3160
|
-
const w = e[c.value] || 0,
|
|
3172
|
+
const w = e[c.value] || 0, v = o > 0 ? Math.round(w / o * 100) : 0, E = (t[c.value] || 0) > 0;
|
|
3161
3173
|
return {
|
|
3162
3174
|
option: c,
|
|
3163
3175
|
index: h,
|
|
3164
3176
|
voteCount: w,
|
|
3165
|
-
percentage:
|
|
3166
|
-
isSelected:
|
|
3177
|
+
percentage: v,
|
|
3178
|
+
isSelected: E
|
|
3167
3179
|
};
|
|
3168
3180
|
}), s = this.multiple ? _.GROUP : _.RADIOGROUP, i = this.question || this.name || "Options", a = B({
|
|
3169
3181
|
role: s,
|
|
@@ -3171,7 +3183,7 @@ let tt = class extends m {
|
|
|
3171
3183
|
});
|
|
3172
3184
|
return d`
|
|
3173
3185
|
<div
|
|
3174
|
-
class="${
|
|
3186
|
+
class="${y({
|
|
3175
3187
|
"poll-container": !0
|
|
3176
3188
|
})}"
|
|
3177
3189
|
data-testid="poll-chart-container"
|
|
@@ -3187,7 +3199,7 @@ let tt = class extends m {
|
|
|
3187
3199
|
};
|
|
3188
3200
|
return d`
|
|
3189
3201
|
<div
|
|
3190
|
-
class="${
|
|
3202
|
+
class="${y(h)}"
|
|
3191
3203
|
data-testid="poll-chart-item-${c.index}"
|
|
3192
3204
|
role="listitem"
|
|
3193
3205
|
aria-label="${c.option.label}: ${c.percentage}% (${c.voteCount} votes)"
|
|
@@ -3258,12 +3270,12 @@ let tt = class extends m {
|
|
|
3258
3270
|
});
|
|
3259
3271
|
return d`
|
|
3260
3272
|
<div
|
|
3261
|
-
class="pc-container ${
|
|
3273
|
+
class="pc-container ${y(t)}"
|
|
3262
3274
|
data-testid="poll-container"
|
|
3263
3275
|
...=${s}
|
|
3264
3276
|
>
|
|
3265
3277
|
${this.renderLabelAtStart()}
|
|
3266
|
-
<div class="${
|
|
3278
|
+
<div class="${y(r)}" data-testid="poll-body">
|
|
3267
3279
|
${this.renderContent()} ${this.renderFooter()}
|
|
3268
3280
|
</div>
|
|
3269
3281
|
${this.renderLabelAtEnd()}
|
|
@@ -3271,7 +3283,7 @@ let tt = class extends m {
|
|
|
3271
3283
|
`;
|
|
3272
3284
|
}
|
|
3273
3285
|
};
|
|
3274
|
-
tt.styles = [...
|
|
3286
|
+
tt.styles = [...b.styles, pt, No];
|
|
3275
3287
|
Nt([
|
|
3276
3288
|
f({ type: Boolean })
|
|
3277
3289
|
], tt.prototype, "multiple", 2);
|
|
@@ -3386,7 +3398,7 @@ const Se = "important", Uo = " !" + Se, jo = $e(class extends xe {
|
|
|
3386
3398
|
r.includes("-") || i ? o.setProperty(r, i ? s.slice(0, -11) : s, i ? Se : "") : o[r] = s;
|
|
3387
3399
|
}
|
|
3388
3400
|
}
|
|
3389
|
-
return
|
|
3401
|
+
return z;
|
|
3390
3402
|
}
|
|
3391
3403
|
});
|
|
3392
3404
|
var Bo = Object.defineProperty, Do = Object.getOwnPropertyDescriptor, ut = (e, t, o, r) => {
|
|
@@ -3394,7 +3406,7 @@ var Bo = Object.defineProperty, Do = Object.getOwnPropertyDescriptor, ut = (e, t
|
|
|
3394
3406
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
3395
3407
|
return r && s && Bo(t, o, s), s;
|
|
3396
3408
|
};
|
|
3397
|
-
let V = class extends
|
|
3409
|
+
let V = class extends b {
|
|
3398
3410
|
constructor() {
|
|
3399
3411
|
super(), this.type = x.stars, this.numStars = 5, this.hoverValue = -1, this.handleStarKeyDown = (e) => {
|
|
3400
3412
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -3430,7 +3442,7 @@ let V = class extends m {
|
|
|
3430
3442
|
<div class="pc-section" data-testid="pc-section">
|
|
3431
3443
|
<span
|
|
3432
3444
|
data-testid="stars-view-star-${n}"
|
|
3433
|
-
class=${
|
|
3445
|
+
class=${y(c)}
|
|
3434
3446
|
style=${jo(h)}
|
|
3435
3447
|
role="${r ? "button" : "presentation"}"
|
|
3436
3448
|
tabindex="${r ? "0" : ""}"
|
|
@@ -3480,9 +3492,9 @@ let V = class extends m {
|
|
|
3480
3492
|
[`pc-flex-align-${o}`]: !0
|
|
3481
3493
|
};
|
|
3482
3494
|
return d`
|
|
3483
|
-
<div class="pc-container ${
|
|
3495
|
+
<div class="pc-container ${y(t)}" data-testid="pc-container">
|
|
3484
3496
|
${this.renderLabelAtStart()}
|
|
3485
|
-
<div class="${
|
|
3497
|
+
<div class="${y(r)}" data-testid="stars-body">
|
|
3486
3498
|
${this.renderStatusAtStart()} ${this.renderChart()} ${this.renderStars()}
|
|
3487
3499
|
${this.renderStatusAtEnd()}
|
|
3488
3500
|
</div>
|
|
@@ -3491,7 +3503,7 @@ let V = class extends m {
|
|
|
3491
3503
|
`;
|
|
3492
3504
|
}
|
|
3493
3505
|
};
|
|
3494
|
-
V.styles = [...
|
|
3506
|
+
V.styles = [...b.styles, pt, Ro];
|
|
3495
3507
|
ut([
|
|
3496
3508
|
f({ type: String })
|
|
3497
3509
|
], V.prototype, "icon", 2);
|
|
@@ -3853,7 +3865,7 @@ var Ho = Object.defineProperty, Fo = Object.getOwnPropertyDescriptor, ht = (e, t
|
|
|
3853
3865
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
3854
3866
|
return r && s && Ho(t, o, s), s;
|
|
3855
3867
|
};
|
|
3856
|
-
let q = class extends
|
|
3868
|
+
let q = class extends b {
|
|
3857
3869
|
constructor() {
|
|
3858
3870
|
super(), this.type = x.reaction, this.showCounts = !1, this.compact = !1, this.popupPosition = "auto", this.hasEditButton = !1, this.statsText = "{count} votes", this.buttonRadius = "990px", this.muteColor = "#cccccc", this.questionPosition = "top", this.statsPosition = "right", this.popupPosition = "auto";
|
|
3859
3871
|
}
|
|
@@ -3905,7 +3917,7 @@ let q = class extends m {
|
|
|
3905
3917
|
}, n = `${e.tooltip || e.value} reaction${o ? ", selected" : ""}${t ? `, ${r} votes` : ""}`;
|
|
3906
3918
|
return d`
|
|
3907
3919
|
<button
|
|
3908
|
-
class="${
|
|
3920
|
+
class="${y(a)}"
|
|
3909
3921
|
@click="${() => this.handleReactionClick(e)}"
|
|
3910
3922
|
?disabled="${s}"
|
|
3911
3923
|
aria-pressed="${o}"
|
|
@@ -3947,7 +3959,7 @@ let q = class extends m {
|
|
|
3947
3959
|
bottom: this.popupPosition === "bottom" || this.popupPosition === "auto" && !this.shouldShowPopoverOnTop()
|
|
3948
3960
|
};
|
|
3949
3961
|
return d`
|
|
3950
|
-
<div class="${
|
|
3962
|
+
<div class="${y(e)}" role="menu">
|
|
3951
3963
|
<div class="popover-content">
|
|
3952
3964
|
${this.options.map((t) => {
|
|
3953
3965
|
const o = this.displayController.shouldDisableOption(t);
|
|
@@ -3994,7 +4006,7 @@ let q = class extends m {
|
|
|
3994
4006
|
(o) => this.getReactionCount(o.value) > 0
|
|
3995
4007
|
);
|
|
3996
4008
|
return d`
|
|
3997
|
-
<div class="${
|
|
4009
|
+
<div class="${y(e)}">
|
|
3998
4010
|
${this.renderTriggerButton()}
|
|
3999
4011
|
${t.length > 0 ? d`
|
|
4000
4012
|
<div class="reaction-list">
|
|
@@ -4008,7 +4020,7 @@ let q = class extends m {
|
|
|
4008
4020
|
`;
|
|
4009
4021
|
} else
|
|
4010
4022
|
return d`
|
|
4011
|
-
<div class="${
|
|
4023
|
+
<div class="${y(e)}">
|
|
4012
4024
|
<div class="reaction-list">
|
|
4013
4025
|
${this.options.map((t) => this.renderReactionButton(t, this.showCounts))}
|
|
4014
4026
|
</div>
|
|
@@ -4052,9 +4064,9 @@ let q = class extends m {
|
|
|
4052
4064
|
[`pc-flex-align-${o}`]: !0
|
|
4053
4065
|
};
|
|
4054
4066
|
return d`
|
|
4055
|
-
<div class="${
|
|
4067
|
+
<div class="${y(t)}" data-testid="reaction-container">
|
|
4056
4068
|
${this.renderLabelAtStart()}
|
|
4057
|
-
<div class="${
|
|
4069
|
+
<div class="${y(r)}" data-testid="reaction-body">
|
|
4058
4070
|
${this.renderStatusAtStart()} ${this.renderChart()} ${this.renderReactions()}
|
|
4059
4071
|
${this.renderStatusAtEnd()}
|
|
4060
4072
|
</div>
|
|
@@ -4063,7 +4075,7 @@ let q = class extends m {
|
|
|
4063
4075
|
`;
|
|
4064
4076
|
}
|
|
4065
4077
|
};
|
|
4066
|
-
q.styles = [...
|
|
4078
|
+
q.styles = [...b.styles, pt, Vo];
|
|
4067
4079
|
ht([
|
|
4068
4080
|
f({ type: Boolean, attribute: "show-counts" })
|
|
4069
4081
|
], q.prototype, "showCounts", 2);
|