pollcatch 2.0.2 → 2.0.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/pc.js +95 -79
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pollcatch",
3
3
  "private": false,
4
- "version": "2.0.2",
4
+ "version": "2.0.3",
5
5
  "type": "module",
6
6
  "main": "pc.js",
7
7
  "module": "pc.js",
package/pc.js CHANGED
@@ -22,7 +22,7 @@ let ae = class {
22
22
  return this.cssText;
23
23
  }
24
24
  };
25
- const Ae = (e) => new ae(typeof e == "string" ? e : e + "", void 0, kt), H = (e, ...t) => {
25
+ const Ae = (e) => new ae(typeof e == "string" ? e : e + "", void 0, kt), F = (e, ...t) => {
26
26
  const o = e.length === 1 ? e[0] : t.reduce((r, s, i) => r + ((a) => {
27
27
  if (a._$cssResult$ === !0) return a.cssText;
28
28
  if (typeof a == "number") return a;
@@ -45,10 +45,10 @@ const Ae = (e) => new ae(typeof e == "string" ? e : e + "", void 0, kt), H = (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, O = globalThis, Ut = O.trustedTypes, Ne = Ut ? Ut.emptyScript : "", ft = O.reactiveElementPolyfillSupport, K = (e, t) => e, at = { toAttribute(e, t) {
48
+ const { is: _e, defineProperty: Ee, getOwnPropertyDescriptor: Pe, getOwnPropertyNames: Oe, getOwnPropertySymbols: Te, getPrototypeOf: ze } = Object, O = globalThis, Ut = O.trustedTypes, Ie = Ut ? Ut.emptyScript : "", ft = O.reactiveElementPolyfillSupport, K = (e, t) => e, at = { toAttribute(e, t) {
49
49
  switch (t) {
50
50
  case Boolean:
51
- e = e ? Ne : null;
51
+ e = e ? Ie : null;
52
52
  break;
53
53
  case Object:
54
54
  case Array:
@@ -279,22 +279,22 @@ U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[K("elementProper
279
279
  * Copyright 2017 Google LLC
280
280
  * SPDX-License-Identifier: BSD-3-Clause
281
281
  */
282
- const G = globalThis, nt = G.trustedTypes, Bt = nt ? nt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, ne = "$lit$", E = `lit$${Math.random().toFixed(9).slice(2)}$`, le = "?" + E, Ie = `<${le}>`, M = document, J = () => M.createComment(""), X = (e) => e === null || typeof e != "object" && typeof e != "function", Et = Array.isArray, Me = (e) => Et(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", mt = `[
283
- \f\r]`, Y = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Dt = /-->/g, Vt = />/g, N = RegExp(`>|${mt}(?:([^\\s"'>=/]+)(${mt}*=${mt}*(?:[^
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), T = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), Ft = /* @__PURE__ */ new WeakMap(), I = M.createTreeWalker(M, 129);
282
+ const W = globalThis, nt = W.trustedTypes, Bt = nt ? nt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, ne = "$lit$", E = `lit$${Math.random().toFixed(9).slice(2)}$`, le = "?" + E, Ne = `<${le}>`, M = document, X = () => M.createComment(""), Q = (e) => e === null || typeof e != "object" && typeof e != "function", Et = Array.isArray, Me = (e) => Et(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", mt = `[
283
+ \f\r]`, Z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Dt = /-->/g, Vt = />/g, I = RegExp(`>|${mt}(?:([^\\s"'>=/]+)(${mt}*=${mt}*(?:[^
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), T = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), Ft = /* @__PURE__ */ new WeakMap(), N = M.createTreeWalker(M, 129);
285
285
  function de(e, t) {
286
286
  if (!Et(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
287
287
  return Bt !== void 0 ? Bt.createHTML(t) : t;
288
288
  }
289
289
  const Re = (e, t) => {
290
290
  const o = e.length - 1, r = [];
291
- let s, i = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = Y;
291
+ let s, i = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = Z;
292
292
  for (let n = 0; n < o; n++) {
293
293
  const l = e[n];
294
294
  let p, c, h = -1, y = 0;
295
- for (; y < l.length && (a.lastIndex = y, c = a.exec(l), c !== null); ) y = a.lastIndex, a === Y ? 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 ?? Y, 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 = Y : (a = N, s = void 0);
296
- const C = a === N && e[n + 1].startsWith("/>") ? " " : "";
297
- i += a === Y ? l + Ie : h >= 0 ? (r.push(p), l.slice(0, h) + ne + l.slice(h) + E + C) : l + E + (h === -2 ? n : C);
295
+ for (; y < l.length && (a.lastIndex = y, c = a.exec(l), c !== null); ) y = 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 = I) : c[3] !== void 0 && (a = I) : a === I ? 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 ? I : c[3] === '"' ? Ht : qt) : a === Ht || a === qt ? a = I : a === Dt || a === Vt ? a = Z : (a = I, s = void 0);
296
+ const C = a === I && e[n + 1].startsWith("/>") ? " " : "";
297
+ i += a === Z ? l + Ne : h >= 0 ? (r.push(p), l.slice(0, h) + ne + l.slice(h) + E + C) : l + E + (h === -2 ? n : C);
298
298
  }
299
299
  return [de(e, i + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
300
300
  };
@@ -304,11 +304,11 @@ let Ct = 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), I.currentNode = this.el.content, o === 2 || o === 3) {
307
+ if (this.el = pe.createElement(p, r), N.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 = I.nextNode()) !== null && l.length < n; ) {
311
+ for (; (s = N.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
314
  const y = c[a++], C = s.getAttribute(h).split(E), L = /([.?@])?(.*)/.exec(y);
@@ -318,8 +318,8 @@ let Ct = class pe {
318
318
  const h = s.textContent.split(E), y = h.length - 1;
319
319
  if (y > 0) {
320
320
  s.textContent = nt ? nt.emptyScript : "";
321
- for (let C = 0; C < y; C++) s.append(h[C], J()), I.nextNode(), l.push({ type: 2, index: ++i });
322
- s.append(h[y], J());
321
+ for (let C = 0; C < y; C++) s.append(h[C], X()), N.nextNode(), l.push({ type: 2, index: ++i });
322
+ s.append(h[y], X());
323
323
  }
324
324
  }
325
325
  } else if (s.nodeType === 8) if (s.data === le) l.push({ type: 2, index: i });
@@ -339,7 +339,7 @@ function D(e, t, o = e, r) {
339
339
  var a, n;
340
340
  if (t === T) return t;
341
341
  let s = r !== void 0 ? (a = o._$Co) == null ? void 0 : a[r] : o._$Cl;
342
- const i = X(t) ? void 0 : t._$litDirective$;
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;
344
344
  }
345
345
  let Ue = class {
@@ -354,16 +354,16 @@ let Ue = class {
354
354
  }
355
355
  u(t) {
356
356
  const { el: { content: o }, parts: r } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? M).importNode(o, !0);
357
- I.currentNode = s;
358
- let i = I.nextNode(), a = 0, n = 0, l = r[0];
357
+ N.currentNode = s;
358
+ let i = N.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 = I.nextNode(), a++);
364
+ a !== (l == null ? void 0 : l.index) && (i = N.nextNode(), a++);
365
365
  }
366
- return I.currentNode = M, s;
366
+ return N.currentNode = M, 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), X(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== T && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Me(t) ? this.k(t) : this._(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 !== T && 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 && X(this._$AH) ? this._$AA.nextSibling.data = t : this.T(M.createTextNode(t)), this._$AH = t;
402
+ this._$AH !== u && Q(this._$AH) ? this._$AA.nextSibling.data = t : this.T(M.createTextNode(t)), this._$AH = t;
403
403
  }
404
404
  $(t) {
405
405
  var i;
@@ -418,7 +418,7 @@ class et {
418
418
  Et(this._$AH) || (this._$AH = [], this._$AR());
419
419
  const o = this._$AH;
420
420
  let r, s = 0;
421
- for (const i of t) s === o.length ? o.push(r = new et(this.O(J()), this.O(J()), this, this.options)) : r = o[s], r._$AI(i), s++;
421
+ for (const i of t) s === o.length ? o.push(r = new et(this.O(X()), this.O(X()), this, this.options)) : r = o[s], r._$AI(i), s++;
422
422
  s < o.length && (this._$AR(r && r._$AB.nextSibling, s), o.length = s);
423
423
  }
424
424
  _$AR(t = this._$AA.nextSibling, o) {
@@ -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 = !X(t) || t !== this._$AH && t !== T, a && (this._$AH = t);
449
+ if (i === void 0) t = D(this, t, o, 0), a = !Q(t) || t !== this._$AH && t !== T, 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 === T && (p = this._$AH[l]), a || (a = !X(p) || p !== this._$AH[l]), p === u ? t = u : t !== u && (t += (p ?? "") + i[l + 1]), this._$AH[l] = p;
453
+ for (t = i[0], l = 0; l < i.length - 1; l++) p = D(this, n[r + l], o, l), p === T && (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
  }
@@ -499,14 +499,14 @@ class Ve {
499
499
  D(this, t);
500
500
  }
501
501
  }
502
- const bt = G.litHtmlPolyfillSupport;
503
- bt == null || bt(Ct, et), (G.litHtmlVersions ?? (G.litHtmlVersions = [])).push("3.2.1");
502
+ const bt = W.litHtmlPolyfillSupport;
503
+ bt == null || bt(Ct, et), (W.litHtmlVersions ?? (W.litHtmlVersions = [])).push("3.2.1");
504
504
  const qe = (e, t, o) => {
505
505
  const r = (o == null ? void 0 : o.renderBefore) ?? t;
506
506
  let s = r._$litPart$;
507
507
  if (s === void 0) {
508
508
  const i = (o == null ? void 0 : o.renderBefore) ?? null;
509
- r._$litPart$ = s = new et(t.insertBefore(J(), i), i, void 0, o ?? {});
509
+ r._$litPart$ = s = new et(t.insertBefore(X(), i), i, void 0, o ?? {});
510
510
  }
511
511
  return s._$AI(e), s;
512
512
  };
@@ -596,7 +596,7 @@ function Pt(e) {
596
596
  return f({ ...e, state: !0, attribute: !1 });
597
597
  }
598
598
  var $ = /* @__PURE__ */ ((e) => (e.reaction = "reaction", e.stars = "stars", e.poll = "poll", e.text = "text", e.nps = "nps", e))($ || {});
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", Ke = "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", Ge = "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";
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) }, k = function(e) {
601
601
  return typeof e == "string" ? e.length > 0 : typeof e == "number";
602
602
  }, w = function(e, t, o) {
@@ -622,12 +622,12 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, k = function(e) {
622
622
  return { r: 255 * [r, n, a, a, l, r][p], g: 255 * [l, r, r, n, a, a][p], b: 255 * [a, a, l, r, r, n][p], a: s };
623
623
  }, Zt = function(e) {
624
624
  return { h: ue(e.h), s: x(e.s, 0, 100), l: x(e.l, 0, 100), a: x(e.a) };
625
- }, Kt = function(e) {
626
- return { h: w(e.h), s: w(e.s), l: w(e.l), a: w(e.a, 3) };
627
625
  }, Gt = function(e) {
626
+ return { h: w(e.h), s: w(e.s), l: w(e.l), a: w(e.a, 3) };
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;
630
- }, W = function(e) {
630
+ }, J = function(e) {
631
631
  return { h: (t = he(e)).h, s: (s = (200 - (o = t.s)) * (r = t.v) / 100) > 0 && s < 200 ? o * r / 100 / (s <= 100 ? s : 200 - s) * 100 : 0, l: s / 2, a: t.a };
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) {
@@ -640,7 +640,7 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, k = function(e) {
640
640
  var t = Xe.exec(e) || Qe.exec(e);
641
641
  if (!t) return null;
642
642
  var o, r, s = Zt({ h: (o = t[1], r = t[2], r === void 0 && (r = "deg"), Number(o) * (We[r] || 1)), s: Number(t[3]), l: Number(t[4]), a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1) });
643
- return Gt(s);
643
+ return Kt(s);
644
644
  }, "hsl"]], object: [[function(e) {
645
645
  var t = e.r, o = e.g, r = e.b, s = e.a, i = s === void 0 ? 1 : s;
646
646
  return k(t) && k(o) && k(r) ? Yt({ r: Number(t), g: Number(o), b: Number(r), a: Number(i) }) : null;
@@ -648,7 +648,7 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, k = function(e) {
648
648
  var t = e.h, o = e.s, r = e.l, s = e.a, i = s === void 0 ? 1 : s;
649
649
  if (!k(t) || !k(o) || !k(r)) return null;
650
650
  var a = Zt({ h: Number(t), s: Number(o), l: Number(r), a: Number(i) });
651
- return Gt(a);
651
+ return Kt(a);
652
652
  }, "hsl"], [function(e) {
653
653
  var t = e.h, o = e.s, r = e.v, s = e.a, i = s === void 0 ? 1 : s;
654
654
  if (!k(t) || !k(o) || !k(r)) return null;
@@ -665,12 +665,12 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, k = function(e) {
665
665
  }, oo = function(e) {
666
666
  return typeof e == "string" ? Jt(e.trim(), Wt.string) : typeof e == "object" && e !== null ? Jt(e, Wt.object) : [null, void 0];
667
667
  }, yt = function(e, t) {
668
- var o = W(e);
668
+ var o = J(e);
669
669
  return { h: o.h, s: x(o.s + 100 * t, 0, 100), l: o.l, a: o.a };
670
670
  }, wt = function(e) {
671
671
  return (299 * e.r + 587 * e.g + 114 * e.b) / 1e3 / 255;
672
672
  }, Xt = function(e, t) {
673
- var o = W(e);
673
+ var o = J(e);
674
674
  return { h: o.h, s: o.s, l: x(o.l + 100 * t, 0, 100), a: o.a };
675
675
  }, Qt = function() {
676
676
  function e(t) {
@@ -693,9 +693,9 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, k = function(e) {
693
693
  return t = vt(this.rgba), o = t.r, r = t.g, s = t.b, (i = t.a) < 1 ? "rgba(" + o + ", " + r + ", " + s + ", " + i + ")" : "rgb(" + o + ", " + r + ", " + s + ")";
694
694
  var t, o, r, s, i;
695
695
  }, e.prototype.toHsl = function() {
696
- return Kt(W(this.rgba));
696
+ return Gt(J(this.rgba));
697
697
  }, e.prototype.toHslString = function() {
698
- return t = Kt(W(this.rgba)), o = t.h, r = t.s, s = t.l, (i = t.a) < 1 ? "hsla(" + o + ", " + r + "%, " + s + "%, " + i + ")" : "hsl(" + o + ", " + r + "%, " + s + "%)";
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
701
  return t = he(this.rgba), { h: w(t.h), s: w(t.s), v: w(t.v), a: w(t.a, 3) };
@@ -719,7 +719,7 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, k = function(e) {
719
719
  return typeof t == "number" ? S({ r: (o = this.rgba).r, g: o.g, b: o.b, a: t }) : w(this.rgba.a, 3);
720
720
  var o;
721
721
  }, e.prototype.hue = function(t) {
722
- var o = W(this.rgba);
722
+ var o = J(this.rgba);
723
723
  return typeof t == "number" ? S({ h: t, s: o.s, l: o.l, a: o.a }) : w(o.h);
724
724
  }, e.prototype.isEqual = function(t) {
725
725
  return this.toHex() === S(t).toHex();
@@ -1633,7 +1633,7 @@ const st = {
1633
1633
  renderEditToggleIcon(t = "edit-toggle-button") {
1634
1634
  return this.displayController.shouldShowEditButton() ? d`
1635
1635
  <img
1636
- src="${Ke}"
1636
+ src="${Ge}"
1637
1637
  alt="Edit vote"
1638
1638
  class="edit-toggle-icon"
1639
1639
  data-testid="${t}"
@@ -1693,7 +1693,7 @@ const st = {
1693
1693
  <div class="pc-thank-you-msg" data-testid="thank-you-msg">
1694
1694
  ${t}
1695
1695
  <img
1696
- src="${Ge}"
1696
+ src="${Ke}"
1697
1697
  alt="Close"
1698
1698
  class="thank-you-close-icon"
1699
1699
  data-testid="close-thank-you-button"
@@ -1707,7 +1707,7 @@ const st = {
1707
1707
  }
1708
1708
  };
1709
1709
  Mt.styles = [
1710
- H`
1710
+ F`
1711
1711
  :host {
1712
1712
  /* Default values for CSS variables - can be overridden by external :root or parent definitions */
1713
1713
  --default-font-size-base: 1rem;
@@ -1890,7 +1890,7 @@ g([
1890
1890
  g([
1891
1891
  f({ type: Boolean, attribute: "read-only" })
1892
1892
  ], m.prototype, "readOnly");
1893
- const To = H`
1893
+ const To = F`
1894
1894
  /* CSS variables inherit from parent - defaults are specified at usage sites */
1895
1895
 
1896
1896
  .pc-body {
@@ -2036,7 +2036,7 @@ const To = H`
2036
2036
  }
2037
2037
 
2038
2038
  /* Removed unused responsive styles for action buttons */
2039
- `, dt = H`
2039
+ `, dt = F`
2040
2040
  /* Default values for CSS variables - can be overridden by external :root or parent definitions */
2041
2041
  :host {
2042
2042
  --default-primary-color: #2196f3;
@@ -2516,7 +2516,7 @@ const To = H`
2516
2516
  }
2517
2517
  }
2518
2518
  `;
2519
- function Nt(e, t = {}) {
2519
+ function It(e, t = {}) {
2520
2520
  if (!e || e.length === 0)
2521
2521
  return d`<div class="pc-bar-chart pc-bar-chart--empty">No data available</div>`;
2522
2522
  const o = Math.max(...e.map((i) => i.value)), s = { ...{
@@ -2545,8 +2545,8 @@ function Nt(e, t = {}) {
2545
2545
  </div>
2546
2546
  `;
2547
2547
  }
2548
- var zo = Object.defineProperty, No = Object.getOwnPropertyDescriptor, F = (e, t, o, r) => {
2549
- for (var s = r > 1 ? void 0 : r ? No(t, o) : t, i = e.length - 1, a; i >= 0; i--)
2548
+ var zo = Object.defineProperty, Io = Object.getOwnPropertyDescriptor, Y = (e, t, o, r) => {
2549
+ for (var s = r > 1 ? void 0 : r ? Io(t, o) : t, i = e.length - 1, a; i >= 0; i--)
2550
2550
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
2551
2551
  return r && s && zo(t, o, s), s;
2552
2552
  };
@@ -2617,7 +2617,7 @@ let z = class extends m {
2617
2617
  const e = ((a = this.dataController.stats) == null ? void 0 : a.breakdown) || {}, t = Object.values(e).reduce((n, l) => n + l, 0), o = Object.entries(e).map(([n, l]) => ({
2618
2618
  label: n,
2619
2619
  value: l
2620
- })), s = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", i = Nt(o, {
2620
+ })), s = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", i = It(o, {
2621
2621
  barColor: s,
2622
2622
  labelFormatter: (n) => `${n.label}`,
2623
2623
  valueFormatter: (n) => `${t > 0 ? Math.round(n.value / t * 100) : 0}%`
@@ -2679,25 +2679,25 @@ let z = class extends m {
2679
2679
  }
2680
2680
  };
2681
2681
  z.styles = [...m.styles, dt, To];
2682
- F([
2682
+ Y([
2683
2683
  f({ type: String, attribute: "min-label" })
2684
2684
  ], z.prototype, "minLabel", 2);
2685
- F([
2685
+ Y([
2686
2686
  f({ type: String, attribute: "max-label" })
2687
2687
  ], z.prototype, "maxLabel", 2);
2688
- F([
2688
+ Y([
2689
2689
  f({ type: String, attribute: "thank-you-msg" })
2690
2690
  ], z.prototype, "thankYouMsg", 2);
2691
- F([
2691
+ Y([
2692
2692
  f({ type: String, attribute: "min-max-position" })
2693
2693
  ], z.prototype, "minMaxPosition", 2);
2694
- F([
2694
+ Y([
2695
2695
  Pt()
2696
2696
  ], z.prototype, "hoverValue", 2);
2697
- z = F([
2697
+ z = Y([
2698
2698
  ot("pc-nps")
2699
2699
  ], z);
2700
- const Io = H`
2700
+ const No = F`
2701
2701
  /* CSS variables inherit from parent - defaults are specified at usage sites */
2702
2702
 
2703
2703
  .pc-container {
@@ -2954,12 +2954,12 @@ const Io = H`
2954
2954
  visibility: hidden;
2955
2955
  }
2956
2956
  `;
2957
- var Mo = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, It = (e, t, o, r) => {
2957
+ var Mo = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, Nt = (e, t, o, r) => {
2958
2958
  for (var s = r > 1 ? void 0 : r ? Lo(t, o) : t, i = e.length - 1, a; i >= 0; i--)
2959
2959
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
2960
2960
  return r && s && Mo(t, o, s), s;
2961
2961
  };
2962
- let Q = class extends m {
2962
+ let tt = class extends m {
2963
2963
  constructor() {
2964
2964
  super(), this.type = $.poll, this.multiple = !1, this.compact = !1, this.hasEditButton = !0, this.statsText = "{count} votes", this.questionPosition = "top", this.statsPosition = "bottom", this.showStats = "after-vote";
2965
2965
  }
@@ -3222,17 +3222,17 @@ let Q = class extends m {
3222
3222
  `;
3223
3223
  }
3224
3224
  };
3225
- Q.styles = [...m.styles, dt, Io];
3226
- It([
3225
+ tt.styles = [...m.styles, dt, No];
3226
+ Nt([
3227
3227
  f({ type: Boolean })
3228
- ], Q.prototype, "multiple", 2);
3229
- It([
3228
+ ], tt.prototype, "multiple", 2);
3229
+ Nt([
3230
3230
  f({ type: Boolean })
3231
- ], Q.prototype, "compact", 2);
3232
- Q = It([
3231
+ ], tt.prototype, "compact", 2);
3232
+ tt = Nt([
3233
3233
  ot("pc-poll")
3234
- ], Q);
3235
- const Ro = H`
3234
+ ], tt);
3235
+ const Ro = F`
3236
3236
  /* CSS variables inherit from parent - defaults are specified at usage sites */
3237
3237
 
3238
3238
  .pc-section {
@@ -3410,7 +3410,7 @@ let V = class extends m {
3410
3410
  label: n,
3411
3411
  value: l,
3412
3412
  icon: "★"
3413
- })), s = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", i = Nt(o, {
3413
+ })), s = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", i = It(o, {
3414
3414
  barColor: s,
3415
3415
  labelFormatter: (n) => `${n.label} ${n.icon}`,
3416
3416
  valueFormatter: (n) => `${t > 0 ? Math.round(n.value / t * 100) : 0}%`
@@ -3455,7 +3455,7 @@ pt([
3455
3455
  V = pt([
3456
3456
  ot("pc-stars")
3457
3457
  ], V);
3458
- const Vo = H`
3458
+ const Vo = F`
3459
3459
  /* Adjust stats text for reactions */
3460
3460
  .pc-stats-text {
3461
3461
  font-size: var(--pc-font-size-small, var(--default-font-size-small));
@@ -3981,7 +3981,7 @@ let q = class extends m {
3981
3981
  icon: (c == null ? void 0 : c.icon) || l
3982
3982
  // Use the icon or fall back to reaction value
3983
3983
  };
3984
- }), r = getComputedStyle(this), s = r.getPropertyValue("--pc-primary-color").trim(), a = r.getPropertyValue("--pc-accent-color").trim() || s || "#ffc107", n = Nt(o, {
3984
+ }), r = getComputedStyle(this), s = r.getPropertyValue("--pc-primary-color").trim(), a = r.getPropertyValue("--pc-accent-color").trim() || s || "#ffc107", n = It(o, {
3985
3985
  barColor: a,
3986
3986
  labelFormatter: (l) => `${l.label}`,
3987
3987
  valueFormatter: (l) => `${e.totalCount > 0 ? Math.round(l.value / e.totalCount * 100) : 0}%`
@@ -4026,7 +4026,7 @@ ut([
4026
4026
  q = ut([
4027
4027
  ot("pc-reaction")
4028
4028
  ], q);
4029
- function Z(e, t, o = void 0) {
4029
+ function G(e, t, o = void 0) {
4030
4030
  const r = e.getAttribute(t);
4031
4031
  return r === null ? o : r == null ? void 0 : r.trim();
4032
4032
  }
@@ -4034,14 +4034,30 @@ function Yo(e, t = void 0) {
4034
4034
  const o = e.textContent;
4035
4035
  return o === "" || o === null ? t : o == null ? void 0 : o.trim();
4036
4036
  }
4037
- var Zo = Object.defineProperty, Ko = Object.getOwnPropertyDescriptor, ht = (e, t, o, r) => {
4038
- for (var s = r > 1 ? void 0 : r ? Ko(t, o) : t, i = e.length - 1, a; i >= 0; i--)
4037
+ var Zo = Object.defineProperty, Go = Object.getOwnPropertyDescriptor, ht = (e, t, o, r) => {
4038
+ for (var s = r > 1 ? void 0 : r ? Go(t, o) : t, i = e.length - 1, a; i >= 0; i--)
4039
4039
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
4040
4040
  return r && s && Zo(t, o, s), s;
4041
4041
  };
4042
- let tt = class extends j {
4042
+ let H = class extends j {
4043
4043
  constructor() {
4044
- super(...arguments), this.options = "", this.parsedOptions = [];
4044
+ super(), this.options = "", this.parsedOptions = [], H.injectGlobalStyle();
4045
+ }
4046
+ /**
4047
+ * Inject global style to hide poll-catch-option elements
4048
+ * This is necessary because poll-catch-option is not a web component,
4049
+ * just an unknown tag that browsers will render as inline elements
4050
+ */
4051
+ static injectGlobalStyle() {
4052
+ const e = "poll-catch-global-style";
4053
+ if (document.getElementById(e))
4054
+ return;
4055
+ const t = document.createElement("style");
4056
+ t.id = e, t.textContent = `
4057
+ poll-catch-option {
4058
+ display: none;
4059
+ }
4060
+ `, document.head.appendChild(t);
4045
4061
  }
4046
4062
  /**
4047
4063
  * Disable shadow DOM for PollCatch
@@ -4091,7 +4107,7 @@ let tt = class extends j {
4091
4107
  // REACTION widget uses options for the icon
4092
4108
  }));
4093
4109
  t && t.length > 0 && (r = Array.from(t).map((s) => {
4094
- const i = Z(s, "value", "") || "", a = Z(s, "label", Yo(s, i)) || "", n = Z(s, "icon", void 0), l = Z(s, "tooltip", void 0), p = Z(s, "disabled", void 0), c = { value: i, label: a };
4110
+ const i = G(s, "value", "") || "", a = G(s, "label", Yo(s, i)) || "", n = G(s, "icon", void 0), l = G(s, "tooltip", void 0), p = G(s, "disabled", void 0), c = { value: i, label: a };
4095
4111
  if (n !== void 0) {
4096
4112
  const h = Ce(n);
4097
4113
  c.icon = h.icon;
@@ -4121,16 +4137,16 @@ let tt = class extends j {
4121
4137
  };
4122
4138
  ht([
4123
4139
  f({ type: String })
4124
- ], tt.prototype, "type", 2);
4140
+ ], H.prototype, "type", 2);
4125
4141
  ht([
4126
4142
  f({ type: String })
4127
- ], tt.prototype, "options", 2);
4143
+ ], H.prototype, "options", 2);
4128
4144
  ht([
4129
4145
  Pt()
4130
- ], tt.prototype, "parsedOptions", 2);
4131
- tt = ht([
4146
+ ], H.prototype, "parsedOptions", 2);
4147
+ H = ht([
4132
4148
  ot("poll-catch")
4133
- ], tt);
4149
+ ], H);
4134
4150
  export {
4135
- tt as PollCatch
4151
+ H as PollCatch
4136
4152
  };