pollcatch 2.3.1 → 2.3.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 +352 -271
package/pc.js CHANGED
@@ -3,16 +3,16 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const yt = globalThis, Ut = yt.ShadowRoot && (yt.ShadyCSS === void 0 || yt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, qt = Symbol(), Jt = /* @__PURE__ */ new WeakMap();
6
+ const yt = globalThis, qt = yt.ShadowRoot && (yt.ShadyCSS === void 0 || yt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ht = Symbol(), Jt = /* @__PURE__ */ new WeakMap();
7
7
  let $e = class {
8
8
  constructor(t, o, r) {
9
- if (this._$cssResult$ = !0, r !== qt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
9
+ if (this._$cssResult$ = !0, r !== Ht) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
10
  this.cssText = t, this.t = o;
11
11
  }
12
12
  get styleSheet() {
13
13
  let t = this.o;
14
14
  const o = this.t;
15
- if (Ut && t === void 0) {
15
+ if (qt && t === void 0) {
16
16
  const r = o !== void 0 && o.length === 1;
17
17
  r && (t = Jt.get(o)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && Jt.set(o, t));
18
18
  }
@@ -22,30 +22,30 @@ let $e = class {
22
22
  return this.cssText;
23
23
  }
24
24
  };
25
- const Ve = (e) => new $e(typeof e == "string" ? e : e + "", void 0, qt), R = (e, ...t) => {
25
+ const Ue = (e) => new $e(typeof e == "string" ? e : e + "", void 0, Ht), R = (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;
29
29
  throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
30
30
  })(s) + e[i + 1], e[0]);
31
- return new $e(o, e, qt);
32
- }, Ue = (e, t) => {
33
- if (Ut) e.adoptedStyleSheets = t.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
31
+ return new $e(o, e, Ht);
32
+ }, qe = (e, t) => {
33
+ if (qt) e.adoptedStyleSheets = t.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
34
34
  else for (const o of t) {
35
35
  const r = document.createElement("style"), s = yt.litNonce;
36
36
  s !== void 0 && r.setAttribute("nonce", s), r.textContent = o.cssText, e.appendChild(r);
37
37
  }
38
- }, Qt = Ut ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
38
+ }, Qt = qt ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
39
39
  let o = "";
40
40
  for (const r of t.cssRules) o += r.cssText;
41
- return Ve(o);
41
+ return Ue(o);
42
42
  })(e) : e;
43
43
  /**
44
44
  * @license
45
45
  * Copyright 2017 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
47
  */
48
- const { is: qe, defineProperty: He, getOwnPropertyDescriptor: Fe, getOwnPropertyNames: Ye, getOwnPropertySymbols: Ke, getPrototypeOf: Ge } = Object, V = globalThis, te = V.trustedTypes, We = te ? te.emptyScript : "", _t = V.reactiveElementPolyfillSupport, nt = (e, t) => e, wt = { toAttribute(e, t) {
48
+ const { is: He, defineProperty: Fe, getOwnPropertyDescriptor: Ye, getOwnPropertyNames: Ke, getOwnPropertySymbols: Ge, getPrototypeOf: Ze } = Object, V = globalThis, te = V.trustedTypes, We = te ? te.emptyScript : "", Ot = V.reactiveElementPolyfillSupport, nt = (e, t) => e, wt = { toAttribute(e, t) {
49
49
  switch (t) {
50
50
  case Boolean:
51
51
  e = e ? We : null;
@@ -73,7 +73,7 @@ const { is: qe, defineProperty: He, getOwnPropertyDescriptor: Fe, getOwnProperty
73
73
  }
74
74
  }
75
75
  return o;
76
- } }, Ht = (e, t) => !qe(e, t), ee = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged: Ht };
76
+ } }, Ft = (e, t) => !He(e, t), ee = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged: Ft };
77
77
  Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), V.litPropertyMetadata ?? (V.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
78
  let Q = class extends HTMLElement {
79
79
  static addInitializer(t) {
@@ -85,11 +85,11 @@ let Q = class extends HTMLElement {
85
85
  static createProperty(t, o = ee) {
86
86
  if (o.state && (o.attribute = !1), this._$Ei(), this.elementProperties.set(t, o), !o.noAccessor) {
87
87
  const r = Symbol(), s = this.getPropertyDescriptor(t, r, o);
88
- s !== void 0 && He(this.prototype, t, s);
88
+ s !== void 0 && Fe(this.prototype, t, s);
89
89
  }
90
90
  }
91
91
  static getPropertyDescriptor(t, o, r) {
92
- const { get: s, set: i } = Fe(this.prototype, t) ?? { get() {
92
+ const { get: s, set: i } = Ye(this.prototype, t) ?? { get() {
93
93
  return this[o];
94
94
  }, set(a) {
95
95
  this[o] = a;
@@ -106,13 +106,13 @@ let Q = class extends HTMLElement {
106
106
  }
107
107
  static _$Ei() {
108
108
  if (this.hasOwnProperty(nt("elementProperties"))) return;
109
- const t = Ge(this);
109
+ const t = Ze(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
113
  if (this.hasOwnProperty(nt("finalized"))) return;
114
114
  if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(nt("properties"))) {
115
- const o = this.properties, r = [...Ye(o), ...Ke(o)];
115
+ const o = this.properties, r = [...Ke(o), ...Ge(o)];
116
116
  for (const s of r) this.createProperty(s, o[s]);
117
117
  }
118
118
  const t = this[Symbol.metadata];
@@ -161,7 +161,7 @@ let Q = class extends HTMLElement {
161
161
  }
162
162
  createRenderRoot() {
163
163
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
164
- return Ue(t, this.constructor.elementStyles), t;
164
+ return qe(t, this.constructor.elementStyles), t;
165
165
  }
166
166
  connectedCallback() {
167
167
  var t;
@@ -200,7 +200,7 @@ let Q = class extends HTMLElement {
200
200
  }
201
201
  requestUpdate(t, o, r) {
202
202
  if (t !== void 0) {
203
- if (r ?? (r = this.constructor.getPropertyOptions(t)), !(r.hasChanged ?? Ht)(this[t], o)) return;
203
+ if (r ?? (r = this.constructor.getPropertyOptions(t)), !(r.hasChanged ?? Ft)(this[t], o)) return;
204
204
  this.P(t, o, r);
205
205
  }
206
206
  this.isUpdatePending === !1 && (this._$ES = this._$ET());
@@ -273,20 +273,20 @@ let Q = class extends HTMLElement {
273
273
  firstUpdated(t) {
274
274
  }
275
275
  };
276
- Q.elementStyles = [], Q.shadowRootOptions = { mode: "open" }, Q[nt("elementProperties")] = /* @__PURE__ */ new Map(), Q[nt("finalized")] = /* @__PURE__ */ new Map(), _t == null || _t({ ReactiveElement: Q }), (V.reactiveElementVersions ?? (V.reactiveElementVersions = [])).push("2.0.4");
276
+ Q.elementStyles = [], Q.shadowRootOptions = { mode: "open" }, Q[nt("elementProperties")] = /* @__PURE__ */ new Map(), Q[nt("finalized")] = /* @__PURE__ */ new Map(), Ot == null || Ot({ ReactiveElement: Q }), (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 lt = globalThis, $t = lt.trustedTypes, oe = $t ? $t.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Se = "$lit$", B = `lit$${Math.random().toFixed(9).slice(2)}$`, Ce = "?" + B, Ze = `<${Ce}>`, G = document, dt = () => G.createComment(""), pt = (e) => e === null || typeof e != "object" && typeof e != "function", Ft = Array.isArray, Xe = (e) => Ft(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", Ot = `[
283
- \f\r]`, it = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, re = /-->/g, se = />/g, Y = RegExp(`>|${Ot}(?:([^\\s"'>=/]+)(${Ot}*=${Ot}*(?:[^
284
- \f\r"'\`<>=]|("|')|))|$)`, "g"), ie = /'/g, ae = /"/g, ke = /^(?:script|style|textarea|title)$/i, Je = (e) => (t, ...o) => ({ _$litType$: e, strings: t, values: o }), c = Je(1), U = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), ne = /* @__PURE__ */ new WeakMap(), K = G.createTreeWalker(G, 129);
282
+ const lt = globalThis, $t = lt.trustedTypes, oe = $t ? $t.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Se = "$lit$", B = `lit$${Math.random().toFixed(9).slice(2)}$`, Ce = "?" + B, Xe = `<${Ce}>`, G = document, dt = () => G.createComment(""), pt = (e) => e === null || typeof e != "object" && typeof e != "function", Yt = Array.isArray, Je = (e) => Yt(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", It = `[
283
+ \f\r]`, it = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, re = /-->/g, se = />/g, Y = RegExp(`>|${It}(?:([^\\s"'>=/]+)(${It}*=${It}*(?:[^
284
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ie = /'/g, ae = /"/g, ke = /^(?:script|style|textarea|title)$/i, Qe = (e) => (t, ...o) => ({ _$litType$: e, strings: t, values: o }), c = Qe(1), U = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), ne = /* @__PURE__ */ new WeakMap(), K = G.createTreeWalker(G, 129);
285
285
  function Ee(e, t) {
286
- if (!Ft(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
286
+ if (!Yt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
287
287
  return oe !== void 0 ? oe.createHTML(t) : t;
288
288
  }
289
- const Qe = (e, t) => {
289
+ const to = (e, t) => {
290
290
  const o = e.length - 1, r = [];
291
291
  let s, i = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = it;
292
292
  for (let l = 0; l < o; l++) {
@@ -294,16 +294,16 @@ const Qe = (e, t) => {
294
294
  let d, p, h = -1, b = 0;
295
295
  for (; b < n.length && (a.lastIndex = b, p = a.exec(n), p !== null); ) b = a.lastIndex, a === it ? p[1] === "!--" ? a = re : p[1] !== void 0 ? a = se : p[2] !== void 0 ? (ke.test(p[2]) && (s = RegExp("</" + p[2], "g")), a = Y) : p[3] !== void 0 && (a = Y) : a === Y ? p[0] === ">" ? (a = s ?? it, h = -1) : p[1] === void 0 ? h = -2 : (h = a.lastIndex - p[2].length, d = p[1], a = p[3] === void 0 ? Y : p[3] === '"' ? ae : ie) : a === ae || a === ie ? a = Y : a === re || a === se ? a = it : (a = Y, s = void 0);
296
296
  const x = a === Y && e[l + 1].startsWith("/>") ? " " : "";
297
- i += a === it ? n + Ze : h >= 0 ? (r.push(d), n.slice(0, h) + Se + n.slice(h) + B + x) : n + B + (h === -2 ? l : x);
297
+ i += a === it ? n + Xe : h >= 0 ? (r.push(d), n.slice(0, h) + Se + n.slice(h) + B + x) : n + B + (h === -2 ? l : x);
298
298
  }
299
299
  return [Ee(e, i + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
300
300
  };
301
- let Vt = class Ae {
301
+ let Ut = class Ae {
302
302
  constructor({ strings: t, _$litType$: o }, r) {
303
303
  let s;
304
304
  this.parts = [];
305
305
  let i = 0, a = 0;
306
- const l = t.length - 1, n = this.parts, [d, p] = Qe(t, o);
306
+ const l = t.length - 1, n = this.parts, [d, p] = to(t, o);
307
307
  if (this.el = Ae.createElement(d, r), K.currentNode = this.el.content, o === 2 || o === 3) {
308
308
  const h = this.el.content.firstChild;
309
309
  h.replaceWith(...h.childNodes);
@@ -312,7 +312,7 @@ let Vt = class Ae {
312
312
  if (s.nodeType === 1) {
313
313
  if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(Se)) {
314
314
  const b = p[a++], x = s.getAttribute(h).split(B), E = /([.?@])?(.*)/.exec(b);
315
- n.push({ type: 1, index: i, name: E[2], strings: x, ctor: E[1] === "." ? eo : E[1] === "?" ? oo : E[1] === "@" ? ro : kt }), s.removeAttribute(h);
315
+ n.push({ type: 1, index: i, name: E[2], strings: x, ctor: E[1] === "." ? oo : E[1] === "?" ? ro : E[1] === "@" ? so : Et }), s.removeAttribute(h);
316
316
  } else h.startsWith(B) && (n.push({ type: 6, index: i }), s.removeAttribute(h));
317
317
  if (ke.test(s.tagName)) {
318
318
  const h = s.textContent.split(B), b = h.length - 1;
@@ -342,7 +342,7 @@ function et(e, t, o = e, r) {
342
342
  const i = pt(t) ? void 0 : t._$litDirective$;
343
343
  return (s == null ? void 0 : s.constructor) !== i && ((l = s == null ? void 0 : s._$AO) == null || l.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 = et(e, s._$AS(e, t.values), s, r)), t;
344
344
  }
345
- let to = class {
345
+ let eo = class {
346
346
  constructor(t, o) {
347
347
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = o;
348
348
  }
@@ -359,7 +359,7 @@ let to = class {
359
359
  for (; n !== void 0; ) {
360
360
  if (a === n.index) {
361
361
  let d;
362
- n.type === 2 ? d = new ut(i, i.nextSibling, this, t) : n.type === 1 ? d = new n.ctor(i, n.name, n.strings, this, t) : n.type === 6 && (d = new so(i, this, t)), this._$AV.push(d), n = r[++l];
362
+ n.type === 2 ? d = new ut(i, i.nextSibling, this, t) : n.type === 1 ? d = new n.ctor(i, n.name, n.strings, this, t) : n.type === 6 && (d = new io(i, this, t)), this._$AV.push(d), n = r[++l];
363
363
  }
364
364
  a !== (n == null ? void 0 : n.index) && (i = K.nextNode(), a++);
365
365
  }
@@ -390,7 +390,7 @@ class ut {
390
390
  return this._$AB;
391
391
  }
392
392
  _$AI(t, o = this) {
393
- t = et(this, t, o), pt(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== U && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Xe(t) ? this.k(t) : this._(t);
393
+ t = et(this, t, o), pt(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== U && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Je(t) ? this.k(t) : this._(t);
394
394
  }
395
395
  O(t) {
396
396
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -403,19 +403,19 @@ class ut {
403
403
  }
404
404
  $(t) {
405
405
  var i;
406
- const { values: o, _$litType$: r } = t, s = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = Vt.createElement(Ee(r.h, r.h[0]), this.options)), r);
406
+ const { values: o, _$litType$: r } = t, s = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = Ut.createElement(Ee(r.h, r.h[0]), this.options)), r);
407
407
  if (((i = this._$AH) == null ? void 0 : i._$AD) === s) this._$AH.p(o);
408
408
  else {
409
- const a = new to(s, this), l = a.u(this.options);
409
+ const a = new eo(s, this), l = a.u(this.options);
410
410
  a.p(o), this.T(l), this._$AH = a;
411
411
  }
412
412
  }
413
413
  _$AC(t) {
414
414
  let o = ne.get(t.strings);
415
- return o === void 0 && ne.set(t.strings, o = new Vt(t)), o;
415
+ return o === void 0 && ne.set(t.strings, o = new Ut(t)), o;
416
416
  }
417
417
  k(t) {
418
- Ft(this._$AH) || (this._$AH = [], this._$AR());
418
+ Yt(this._$AH) || (this._$AH = [], this._$AR());
419
419
  const o = this._$AH;
420
420
  let r, s = 0;
421
421
  for (const i of t) s === o.length ? o.push(r = new ut(this.O(dt()), this.O(dt()), this, this.options)) : r = o[s], r._$AI(i), s++;
@@ -433,7 +433,7 @@ class ut {
433
433
  this._$AM === void 0 && (this._$Cv = t, (o = this._$AP) == null || o.call(this, t));
434
434
  }
435
435
  }
436
- class kt {
436
+ class Et {
437
437
  get tagName() {
438
438
  return this.element.tagName;
439
439
  }
@@ -458,7 +458,7 @@ class kt {
458
458
  t === u ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
459
459
  }
460
460
  }
461
- let eo = class extends kt {
461
+ let oo = class extends Et {
462
462
  constructor() {
463
463
  super(...arguments), this.type = 3;
464
464
  }
@@ -466,7 +466,7 @@ let eo = class extends kt {
466
466
  this.element[this.name] = t === u ? void 0 : t;
467
467
  }
468
468
  };
469
- class oo extends kt {
469
+ class ro extends Et {
470
470
  constructor() {
471
471
  super(...arguments), this.type = 4;
472
472
  }
@@ -474,7 +474,7 @@ class oo extends kt {
474
474
  this.element.toggleAttribute(this.name, !!t && t !== u);
475
475
  }
476
476
  }
477
- class ro extends kt {
477
+ class so extends Et {
478
478
  constructor(t, o, r, s, i) {
479
479
  super(t, o, r, s, i), this.type = 5;
480
480
  }
@@ -488,7 +488,7 @@ class ro extends kt {
488
488
  typeof this._$AH == "function" ? this._$AH.call(((o = this.options) == null ? void 0 : o.host) ?? this.element, t) : this._$AH.handleEvent(t);
489
489
  }
490
490
  }
491
- class so {
491
+ class io {
492
492
  constructor(t, o, r) {
493
493
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = o, this.options = r;
494
494
  }
@@ -499,9 +499,9 @@ class so {
499
499
  et(this, t);
500
500
  }
501
501
  }
502
- const It = lt.litHtmlPolyfillSupport;
503
- It == null || It(Vt, ut), (lt.litHtmlVersions ?? (lt.litHtmlVersions = [])).push("3.2.1");
504
- const io = (e, t, o) => {
502
+ const zt = lt.litHtmlPolyfillSupport;
503
+ zt == null || zt(Ut, ut), (lt.litHtmlVersions ?? (lt.litHtmlVersions = [])).push("3.2.1");
504
+ const ao = (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) {
@@ -526,7 +526,7 @@ let N = class extends Q {
526
526
  }
527
527
  update(t) {
528
528
  const o = this.render();
529
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = io(o, this.renderRoot, this.renderOptions);
529
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = ao(o, this.renderRoot, this.renderOptions);
530
530
  }
531
531
  connectedCallback() {
532
532
  var t;
@@ -542,8 +542,8 @@ let N = class extends Q {
542
542
  };
543
543
  var we;
544
544
  N._$litElement$ = !0, N.finalized = !0, (we = globalThis.litElementHydrateSupport) == null || we.call(globalThis, { LitElement: N });
545
- const zt = globalThis.litElementPolyfillSupport;
546
- zt == null || zt({ LitElement: N });
545
+ const Mt = globalThis.litElementPolyfillSupport;
546
+ Mt == null || Mt({ LitElement: N });
547
547
  (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
548
548
  /**
549
549
  * @license
@@ -560,7 +560,7 @@ const H = (e) => (t, o) => {
560
560
  * Copyright 2017 Google LLC
561
561
  * SPDX-License-Identifier: BSD-3-Clause
562
562
  */
563
- const ao = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged: Ht }, no = (e = ao, t, o) => {
563
+ const no = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged: Ft }, lo = (e = no, t, o) => {
564
564
  const { kind: r, metadata: s } = o;
565
565
  let i = globalThis.litPropertyMetadata.get(s);
566
566
  if (i === void 0 && globalThis.litPropertyMetadata.set(s, i = /* @__PURE__ */ new Map()), i.set(o.name, e), r === "accessor") {
@@ -582,7 +582,7 @@ const ao = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged
582
582
  throw Error("Unsupported decorator location: " + r);
583
583
  };
584
584
  function f(e) {
585
- return (t, o) => typeof o == "object" ? no(e, t, o) : ((r, s, i) => {
585
+ return (t, o) => typeof o == "object" ? lo(e, t, o) : ((r, s, i) => {
586
586
  const a = s.hasOwnProperty(i);
587
587
  return s.constructor.createProperty(i, a ? { ...r, wrapped: !0 } : r), a ? Object.getOwnPropertyDescriptor(s, i) : void 0;
588
588
  })(e, t, o);
@@ -600,7 +600,7 @@ function k(e) {
600
600
  * Copyright 2017 Google LLC
601
601
  * SPDX-License-Identifier: BSD-3-Clause
602
602
  */
603
- const lo = (e, t, o) => (o.configurable = !0, o.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, o), o);
603
+ const co = (e, t, o) => (o.configurable = !0, o.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, o), o);
604
604
  /**
605
605
  * @license
606
606
  * Copyright 2017 Google LLC
@@ -612,13 +612,13 @@ function ht(e, t) {
612
612
  var l;
613
613
  return ((l = a.renderRoot) == null ? void 0 : l.querySelector(e)) ?? null;
614
614
  };
615
- return lo(o, r, { get() {
615
+ return co(o, r, { get() {
616
616
  return i(this);
617
617
  } });
618
618
  };
619
619
  }
620
620
  var S = /* @__PURE__ */ ((e) => (e.reaction = "reaction", e.stars = "stars", e.poll = "poll", e.text = "text", e.nps = "nps", e))(S || {});
621
- const Yt = c`
621
+ const Kt = c`
622
622
  <svg
623
623
  xmlns="http://www.w3.org/2000/svg"
624
624
  height="24px"
@@ -628,7 +628,7 @@ const Yt = c`
628
628
  >
629
629
  <path d="M640-160v-280h160v280H640Zm-240 0v-640h160v640H400Zm-240 0v-440h160v440H160Z" />
630
630
  </svg>
631
- `, Kt = c`
631
+ `, Gt = c`
632
632
  <svg
633
633
  xmlns="http://www.w3.org/2000/svg"
634
634
  height="24px"
@@ -640,7 +640,7 @@ const Yt = c`
640
640
  d="M160-160v-440h160v440H160Zm240 0v-400l160 160v240H400Zm160-354L400-674v-126h160v286Zm240 240L640-434v-6h160v166Zm-9 219L55-791l57-57 736 736-57 57Z"
641
641
  />
642
642
  </svg>
643
- `, Gt = c`
643
+ `, St = c`
644
644
  <svg
645
645
  xmlns="http://www.w3.org/2000/svg"
646
646
  height="24px"
@@ -652,7 +652,7 @@ const Yt = c`
652
652
  d="M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z"
653
653
  />
654
654
  </svg>
655
- `, co = c`
655
+ `, po = c`
656
656
  <svg
657
657
  xmlns="http://www.w3.org/2000/svg"
658
658
  width="16"
@@ -664,50 +664,60 @@ const Yt = c`
664
664
  d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"
665
665
  />
666
666
  </svg>
667
+ `, Pe = c`
668
+ <svg
669
+ xmlns="http://www.w3.org/2000/svg"
670
+ height="24px"
671
+ viewBox="0 -960 960 960"
672
+ width="24px"
673
+ fill="currentColor"
674
+ >
675
+ <path d="M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z" />
676
+ </svg>
667
677
  `;
668
- var po = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, z = function(e) {
678
+ var uo = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, z = function(e) {
669
679
  return typeof e == "string" ? e.length > 0 : typeof e == "number";
670
680
  }, $ = function(e, t, o) {
671
681
  return t === void 0 && (t = 0), o === void 0 && (o = Math.pow(10, t)), Math.round(o * e) / o + 0;
672
682
  }, A = function(e, t, o) {
673
683
  return t === void 0 && (t = 0), o === void 0 && (o = 1), e > o ? o : e > t ? e : t;
674
- }, Pe = function(e) {
684
+ }, Te = function(e) {
675
685
  return (e = isFinite(e) ? e % 360 : 0) > 0 ? e : e + 360;
676
686
  }, le = function(e) {
677
687
  return { r: A(e.r, 0, 255), g: A(e.g, 0, 255), b: A(e.b, 0, 255), a: A(e.a) };
678
- }, Mt = function(e) {
688
+ }, Lt = function(e) {
679
689
  return { r: $(e.r), g: $(e.g), b: $(e.b), a: $(e.a, 3) };
680
- }, uo = /^#([0-9a-f]{3,8})$/i, vt = function(e) {
690
+ }, ho = /^#([0-9a-f]{3,8})$/i, vt = function(e) {
681
691
  var t = e.toString(16);
682
692
  return t.length < 2 ? "0" + t : t;
683
- }, Te = function(e) {
693
+ }, _e = function(e) {
684
694
  var t = e.r, o = e.g, r = e.b, s = e.a, i = Math.max(t, o, r), a = i - Math.min(t, o, r), l = a ? i === t ? (o - r) / a : i === o ? 2 + (r - t) / a : 4 + (t - o) / a : 0;
685
695
  return { h: 60 * (l < 0 ? l + 6 : l), s: i ? a / i * 100 : 0, v: i / 255 * 100, a: s };
686
- }, _e = function(e) {
696
+ }, Oe = function(e) {
687
697
  var t = e.h, o = e.s, r = e.v, s = e.a;
688
698
  t = t / 360 * 6, o /= 100, r /= 100;
689
699
  var i = Math.floor(t), a = r * (1 - o), l = r * (1 - (t - i) * o), n = r * (1 - (1 - t + i) * o), d = i % 6;
690
700
  return { r: 255 * [r, l, a, a, n, r][d], g: 255 * [n, r, r, l, a, a][d], b: 255 * [a, a, n, r, r, l][d], a: s };
691
701
  }, ce = function(e) {
692
- return { h: Pe(e.h), s: A(e.s, 0, 100), l: A(e.l, 0, 100), a: A(e.a) };
702
+ return { h: Te(e.h), s: A(e.s, 0, 100), l: A(e.l, 0, 100), a: A(e.a) };
693
703
  }, de = function(e) {
694
704
  return { h: $(e.h), s: $(e.s), l: $(e.l), a: $(e.a, 3) };
695
705
  }, pe = function(e) {
696
- return _e((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 }));
706
+ return Oe((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 }));
697
707
  var t, o, r;
698
708
  }, ct = function(e) {
699
- return { h: (t = Te(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 };
709
+ return { h: (t = _e(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 };
700
710
  var t, o, r, s;
701
- }, ho = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, fo = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, go = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, mo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, ue = { string: [[function(e) {
702
- var t = uo.exec(e);
711
+ }, fo = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, go = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, mo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, vo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, ue = { string: [[function(e) {
712
+ var t = ho.exec(e);
703
713
  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;
704
714
  }, "hex"], [function(e) {
705
- var t = go.exec(e) || mo.exec(e);
715
+ var t = mo.exec(e) || vo.exec(e);
706
716
  return t ? t[2] !== t[4] || t[4] !== t[6] ? null : le({ 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;
707
717
  }, "rgb"], [function(e) {
708
- var t = ho.exec(e) || fo.exec(e);
718
+ var t = fo.exec(e) || go.exec(e);
709
719
  if (!t) return null;
710
- var o, r, s = ce({ h: (o = t[1], r = t[2], r === void 0 && (r = "deg"), Number(o) * (po[r] || 1)), s: Number(t[3]), l: Number(t[4]), a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1) });
720
+ var o, r, s = ce({ h: (o = t[1], r = t[2], r === void 0 && (r = "deg"), Number(o) * (uo[r] || 1)), s: Number(t[3]), l: Number(t[4]), a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1) });
711
721
  return pe(s);
712
722
  }, "hsl"]], object: [[function(e) {
713
723
  var t = e.r, o = e.g, r = e.b, s = e.a, i = s === void 0 ? 1 : s;
@@ -721,44 +731,44 @@ var po = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, z = function(e) {
721
731
  var t = e.h, o = e.s, r = e.v, s = e.a, i = s === void 0 ? 1 : s;
722
732
  if (!z(t) || !z(o) || !z(r)) return null;
723
733
  var a = function(l) {
724
- return { h: Pe(l.h), s: A(l.s, 0, 100), v: A(l.v, 0, 100), a: A(l.a) };
734
+ return { h: Te(l.h), s: A(l.s, 0, 100), v: A(l.v, 0, 100), a: A(l.a) };
725
735
  }({ h: Number(t), s: Number(o), v: Number(r), a: Number(i) });
726
- return _e(a);
736
+ return Oe(a);
727
737
  }, "hsv"]] }, he = function(e, t) {
728
738
  for (var o = 0; o < t.length; o++) {
729
739
  var r = t[o][0](e);
730
740
  if (r) return [r, t[o][1]];
731
741
  }
732
742
  return [null, void 0];
733
- }, vo = function(e) {
743
+ }, bo = function(e) {
734
744
  return typeof e == "string" ? he(e.trim(), ue.string) : typeof e == "object" && e !== null ? he(e, ue.object) : [null, void 0];
735
- }, Lt = function(e, t) {
745
+ }, Nt = function(e, t) {
736
746
  var o = ct(e);
737
747
  return { h: o.h, s: A(o.s + 100 * t, 0, 100), l: o.l, a: o.a };
738
- }, Nt = function(e) {
748
+ }, Dt = function(e) {
739
749
  return (299 * e.r + 587 * e.g + 114 * e.b) / 1e3 / 255;
740
750
  }, fe = function(e, t) {
741
751
  var o = ct(e);
742
752
  return { h: o.h, s: o.s, l: A(o.l + 100 * t, 0, 100), a: o.a };
743
753
  }, ge = function() {
744
754
  function e(t) {
745
- this.parsed = vo(t)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
755
+ this.parsed = bo(t)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
746
756
  }
747
757
  return e.prototype.isValid = function() {
748
758
  return this.parsed !== null;
749
759
  }, e.prototype.brightness = function() {
750
- return $(Nt(this.rgba), 2);
760
+ return $(Dt(this.rgba), 2);
751
761
  }, e.prototype.isDark = function() {
752
- return Nt(this.rgba) < 0.5;
762
+ return Dt(this.rgba) < 0.5;
753
763
  }, e.prototype.isLight = function() {
754
- return Nt(this.rgba) >= 0.5;
764
+ return Dt(this.rgba) >= 0.5;
755
765
  }, e.prototype.toHex = function() {
756
- return t = Mt(this.rgba), o = t.r, r = t.g, s = t.b, a = (i = t.a) < 1 ? vt($(255 * i)) : "", "#" + vt(o) + vt(r) + vt(s) + a;
766
+ return t = Lt(this.rgba), o = t.r, r = t.g, s = t.b, a = (i = t.a) < 1 ? vt($(255 * i)) : "", "#" + vt(o) + vt(r) + vt(s) + a;
757
767
  var t, o, r, s, i, a;
758
768
  }, e.prototype.toRgb = function() {
759
- return Mt(this.rgba);
769
+ return Lt(this.rgba);
760
770
  }, e.prototype.toRgbString = function() {
761
- return t = Mt(this.rgba), o = t.r, r = t.g, s = t.b, (i = t.a) < 1 ? "rgba(" + o + ", " + r + ", " + s + ", " + i + ")" : "rgb(" + o + ", " + r + ", " + s + ")";
771
+ return t = Lt(this.rgba), o = t.r, r = t.g, s = t.b, (i = t.a) < 1 ? "rgba(" + o + ", " + r + ", " + s + ", " + i + ")" : "rgb(" + o + ", " + r + ", " + s + ")";
762
772
  var t, o, r, s, i;
763
773
  }, e.prototype.toHsl = function() {
764
774
  return de(ct(this.rgba));
@@ -766,17 +776,17 @@ var po = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, z = function(e) {
766
776
  return t = de(ct(this.rgba)), o = t.h, r = t.s, s = t.l, (i = t.a) < 1 ? "hsla(" + o + ", " + r + "%, " + s + "%, " + i + ")" : "hsl(" + o + ", " + r + "%, " + s + "%)";
767
777
  var t, o, r, s, i;
768
778
  }, e.prototype.toHsv = function() {
769
- return t = Te(this.rgba), { h: $(t.h), s: $(t.s), v: $(t.v), a: $(t.a, 3) };
779
+ return t = _e(this.rgba), { h: $(t.h), s: $(t.s), v: $(t.v), a: $(t.a, 3) };
770
780
  var t;
771
781
  }, e.prototype.invert = function() {
772
782
  return T({ r: 255 - (t = this.rgba).r, g: 255 - t.g, b: 255 - t.b, a: t.a });
773
783
  var t;
774
784
  }, e.prototype.saturate = function(t) {
775
- return t === void 0 && (t = 0.1), T(Lt(this.rgba, t));
785
+ return t === void 0 && (t = 0.1), T(Nt(this.rgba, t));
776
786
  }, e.prototype.desaturate = function(t) {
777
- return t === void 0 && (t = 0.1), T(Lt(this.rgba, -t));
787
+ return t === void 0 && (t = 0.1), T(Nt(this.rgba, -t));
778
788
  }, e.prototype.grayscale = function() {
779
- return T(Lt(this.rgba, -1));
789
+ return T(Nt(this.rgba, -1));
780
790
  }, e.prototype.lighten = function(t) {
781
791
  return t === void 0 && (t = 0.1), T(fe(this.rgba, t));
782
792
  }, e.prototype.darken = function(t) {
@@ -795,26 +805,26 @@ var po = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, z = function(e) {
795
805
  }(), T = function(e) {
796
806
  return e instanceof ge ? e : new ge(e);
797
807
  };
798
- const Dt = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
799
- function bo(e) {
808
+ const Rt = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
809
+ function yo(e) {
800
810
  return {
801
811
  debug: (t, ...o) => {
802
- Dt && console.debug(`[${e}]`, t, ...o);
812
+ Rt && console.debug(`[${e}]`, t, ...o);
803
813
  },
804
814
  info: (t, ...o) => {
805
- Dt && console.info(`[${e}]`, t, ...o);
815
+ Rt && console.info(`[${e}]`, t, ...o);
806
816
  },
807
817
  warn: (t, ...o) => {
808
- Dt && console.warn(`[${e}]`, t, ...o);
818
+ Rt && console.warn(`[${e}]`, t, ...o);
809
819
  },
810
820
  error: (t, ...o) => {
811
821
  console.error(`[${e}]`, t, ...o);
812
822
  }
813
823
  };
814
824
  }
815
- const m = bo("Pollcatch");
816
- var Oe = /* @__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))(Oe || {});
817
- const yo = {
825
+ const m = yo("Pollcatch");
826
+ var Ie = /* @__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))(Ie || {});
827
+ const xo = {
818
828
  black: "#000000",
819
829
  white: "#ffffff",
820
830
  red: "#ff0000",
@@ -831,19 +841,19 @@ const yo = {
831
841
  teal: "#008080",
832
842
  navy: "#000080"
833
843
  };
834
- function xo(e) {
844
+ function wo(e) {
835
845
  const t = e.toLowerCase().trim();
836
- return yo[t] || null;
846
+ return xo[t] || null;
837
847
  }
838
- function Rt(e, t) {
848
+ function jt(e, t) {
839
849
  const o = me(e), r = me(t), s = Math.max(o, r), i = Math.min(o, r);
840
850
  return (s + 0.05) / (i + 0.05);
841
851
  }
842
852
  function me(e) {
843
- const t = $o(e), o = t.r / 255, r = t.g / 255, s = t.b / 255, i = o <= 0.03928 ? o / 12.92 : Math.pow((o + 0.055) / 1.055, 2.4), a = r <= 0.03928 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4), l = s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
853
+ const t = So(e), o = t.r / 255, r = t.g / 255, s = t.b / 255, i = o <= 0.03928 ? o / 12.92 : Math.pow((o + 0.055) / 1.055, 2.4), a = r <= 0.03928 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4), l = s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
844
854
  return 0.2126 * i + 0.7152 * a + 0.0722 * l;
845
855
  }
846
- function wo(e, t = {}) {
856
+ function $o(e, t = {}) {
847
857
  if (!T(e).isValid())
848
858
  return m.warn(`Invalid color provided: ${e}`), "black";
849
859
  const {
@@ -857,15 +867,15 @@ function wo(e, t = {}) {
857
867
  } = t, l = s.map((p) => p === "black" ? "#000000" : p === "white" ? "#ffffff" : p === "light" ? i.light || "#f8f9fa" : p === "dark" ? i.dark || "#343a40" : p);
858
868
  let n = a, d = 0;
859
869
  for (const p of l) {
860
- const h = Rt(e, p);
870
+ const h = jt(e, p);
861
871
  h >= r && h > d && (d = h, n = p);
862
872
  }
863
873
  if (d === 0) {
864
- const p = Rt(e, a);
874
+ const p = jt(e, a);
865
875
  n = a, d = p;
866
876
  for (const h of l) {
867
877
  if (h === a) continue;
868
- const b = Rt(e, h);
878
+ const b = jt(e, h);
869
879
  b > d && (d = b, n = h);
870
880
  }
871
881
  m.warn(
@@ -874,8 +884,8 @@ function wo(e, t = {}) {
874
884
  }
875
885
  return n;
876
886
  }
877
- function $o(e) {
878
- const o = xo(e) || e, r = T(o);
887
+ function So(e) {
888
+ const o = wo(e) || e, r = T(o);
879
889
  if (!r.isValid())
880
890
  return m.warn(`Invalid color provided: ${e}`), { r: 0, g: 0, b: 0 };
881
891
  const { r: s, g: i, b: a } = r.toRgb();
@@ -893,7 +903,7 @@ function O(e, t) {
893
903
  }[t] : void 0;
894
904
  return e === "left" || e === "right" ? r || "center" : e === "top" || e === "bottom" ? r || "start" : r || "center";
895
905
  }
896
- function jt(e, t = "1rem", o = 1) {
906
+ function Bt(e, t = "1rem", o = 1) {
897
907
  if (!e) return t;
898
908
  const r = {
899
909
  xs: 0.7,
@@ -912,7 +922,7 @@ function jt(e, t = "1rem", o = 1) {
912
922
  const l = parseFloat(i);
913
923
  return isNaN(l) ? t : `${l}rem`;
914
924
  }
915
- function So(e, t = "4px") {
925
+ function Co(e, t = "4px") {
916
926
  if (!e) return t;
917
927
  const o = {
918
928
  xs: "2px",
@@ -943,7 +953,7 @@ function tt(e) {
943
953
  }
944
954
  return t;
945
955
  }
946
- function Co(e, t, o) {
956
+ function ko(e, t, o) {
947
957
  return tt({
948
958
  role: "button",
949
959
  ariaLabel: e,
@@ -951,7 +961,7 @@ function Co(e, t, o) {
951
961
  ariaDisabled: o
952
962
  });
953
963
  }
954
- function ko(e, t, o, r = !1) {
964
+ function Eo(e, t, o, r = !1) {
955
965
  return tt({
956
966
  role: r ? "radio" : "checkbox",
957
967
  ariaLabel: e,
@@ -959,38 +969,38 @@ function ko(e, t, o, r = !1) {
959
969
  ariaDisabled: o
960
970
  });
961
971
  }
962
- function Bt(e, t, o) {
972
+ function Vt(e, t, o) {
963
973
  typeof o == "boolean" ? e.setAttribute(t, o ? "true" : "false") : e.setAttribute(t, o);
964
974
  }
965
- function Eo(e) {
975
+ function Ao(e) {
966
976
  if (typeof e != "string")
967
977
  return !1;
968
978
  const t = e.replace(/[<>"']/g, "").trim();
969
979
  return /^(#[0-9a-fA-F]{3,8}|rgb\([^)]+\)|rgba\([^)]+\)|hsl\([^)]+\)|hsla\([^)]+\)|[a-zA-Z]+)$/.test(t);
970
980
  }
971
981
  function J(e) {
972
- return Eo(e) ? e.replace(/[<>"']/g, "").trim() : (m.warn("Invalid color value:", e), "#000000");
982
+ return Ao(e) ? e.replace(/[<>"']/g, "").trim() : (m.warn("Invalid color value:", e), "#000000");
973
983
  }
974
- function Ao(e) {
984
+ function Po(e) {
975
985
  if (typeof e != "string")
976
986
  return m.warn("Non-string value passed to sanitizeCSS:", typeof e), "";
977
987
  let t = e;
978
988
  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;
979
989
  }
980
- function Po(e) {
990
+ function To(e) {
981
991
  return typeof e != "string" || !e.trim() ? "" : e.replace(
982
992
  /([^{}:;]+):\s*([^;{}!]+)(\s*!important)?\s*(;|})/gi,
983
993
  (t, o, r, s, i) => s ? t : `${o}: ${r.trim()} !important${i}`
984
994
  );
985
995
  }
986
- const ve = "https://jpxwfjorwcsrqraorpbj.supabase.co/functions/v1/data", To = "pc_session_id", _o = 24 * 60 * 60 * 1e3;
996
+ const ve = "https://jpxwfjorwcsrqraorpbj.supabase.co/functions/v1/data", _o = "pc_session_id", Oo = 24 * 60 * 60 * 1e3;
987
997
  function be() {
988
998
  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) {
989
999
  const t = Math.random() * 16 | 0;
990
1000
  return (e === "x" ? t : t & 3 | 8).toString(16);
991
1001
  }));
992
1002
  }
993
- function Wt() {
1003
+ function Zt() {
994
1004
  const e = "test-local-storage";
995
1005
  try {
996
1006
  return localStorage.setItem(e, e), localStorage.removeItem(e), !0;
@@ -998,7 +1008,7 @@ function Wt() {
998
1008
  return m.warn("localStorage not available, session ID will not persist"), !1;
999
1009
  }
1000
1010
  }
1001
- function Ie(e) {
1011
+ function ze(e) {
1002
1012
  try {
1003
1013
  const t = localStorage.getItem(e);
1004
1014
  return t ? JSON.parse(t) : void 0;
@@ -1007,14 +1017,14 @@ function Ie(e) {
1007
1017
  return;
1008
1018
  }
1009
1019
  }
1010
- function ze(e, t) {
1020
+ function Me(e, t) {
1011
1021
  try {
1012
1022
  return localStorage.setItem(e, JSON.stringify(t)), !0;
1013
1023
  } catch (o) {
1014
1024
  return m.warn(`Failed to set item in localStorage: ${e}`, o), !1;
1015
1025
  }
1016
1026
  }
1017
- async function Oo() {
1027
+ async function Io() {
1018
1028
  if (typeof window < "u") {
1019
1029
  if (window.pcProject !== void 0)
1020
1030
  return m.debug("Found project key in global variable"), window.pcProject;
@@ -1028,9 +1038,9 @@ async function Oo() {
1028
1038
  m.warn("No project key found in global variable or script tags");
1029
1039
  }
1030
1040
  async function ye() {
1031
- const e = To, t = _o;
1032
- if (Wt()) {
1033
- const o = Ie(e);
1041
+ const e = _o, t = Oo;
1042
+ if (Zt()) {
1043
+ const o = ze(e);
1034
1044
  if (o && o.id && o.timestamp && Date.now() - o.timestamp < t)
1035
1045
  return m.debug("Using existing session ID from localStorage"), o.id;
1036
1046
  m.debug(
@@ -1038,7 +1048,7 @@ async function ye() {
1038
1048
  "generating new one"
1039
1049
  );
1040
1050
  const r = be();
1041
- return ze(e, {
1051
+ return Me(e, {
1042
1052
  id: r,
1043
1053
  timestamp: Date.now()
1044
1054
  }) ? m.debug("Generated and stored new session ID") : m.warn("Generated session ID but failed to store it"), r;
@@ -1047,7 +1057,7 @@ async function ye() {
1047
1057
  return m.debug("Generated non-persistent session ID"), o;
1048
1058
  }
1049
1059
  }
1050
- function St(e) {
1060
+ function Ct(e) {
1051
1061
  if (!e || typeof e != "object")
1052
1062
  return 0;
1053
1063
  let t = 0, o = 0, r = 0;
@@ -1060,7 +1070,7 @@ function St(e) {
1060
1070
  const s = t / r * 100, i = o / r * 100;
1061
1071
  return Math.round(s - i);
1062
1072
  }
1063
- function Io(e) {
1073
+ function zo(e) {
1064
1074
  if (!e || typeof e != "object")
1065
1075
  return { promoters: 0, passives: 0, detractors: 0 };
1066
1076
  let t = 0, o = 0, r = 0;
@@ -1070,14 +1080,14 @@ function Io(e) {
1070
1080
  }
1071
1081
  return { promoters: t, passives: o, detractors: r };
1072
1082
  }
1073
- function zo(e, t) {
1083
+ function Mo(e, t) {
1074
1084
  const o = {};
1075
1085
  for (const r of t)
1076
1086
  o[r] = e[r] || 0;
1077
1087
  return o;
1078
1088
  }
1079
- function Mo(e, t) {
1080
- const o = t ? zo(e, t) : e;
1089
+ function Lo(e, t) {
1090
+ const o = t ? Mo(e, t) : e;
1081
1091
  let r = 0, s = 0;
1082
1092
  for (const [a, l] of Object.entries(o)) {
1083
1093
  s += l;
@@ -1096,26 +1106,26 @@ function L() {
1096
1106
  updated: (/* @__PURE__ */ new Date()).toISOString()
1097
1107
  };
1098
1108
  }
1099
- function Lo(e) {
1100
- if (!Wt())
1109
+ function No(e) {
1110
+ if (!Zt())
1101
1111
  return L();
1102
1112
  try {
1103
- const t = Ie(e);
1113
+ const t = ze(e);
1104
1114
  return t ? { ...L(), ...t } : L();
1105
1115
  } catch (t) {
1106
1116
  return m.warn("Failed to load localStats from localStorage", t), L();
1107
1117
  }
1108
1118
  }
1109
- function No(e, t) {
1110
- if (!Wt())
1119
+ function Do(e, t) {
1120
+ if (!Zt())
1111
1121
  return !1;
1112
1122
  try {
1113
- return ze(e, t) ? (m.debug("Saved localStats to localStorage", t), !0) : !1;
1123
+ return Me(e, t) ? (m.debug("Saved localStats to localStorage", t), !0) : !1;
1114
1124
  } catch (o) {
1115
1125
  return m.warn("Failed to save localStats to localStorage", o), !1;
1116
1126
  }
1117
1127
  }
1118
- function Do(e, t) {
1128
+ function Ro(e, t) {
1119
1129
  const o = {
1120
1130
  count: Math.max(0, e.count - t.count),
1121
1131
  sum: (e.sum || 0) - (t.sum || 0),
@@ -1128,9 +1138,9 @@ function Do(e, t) {
1128
1138
  if (o.count > 0 && o.sum !== void 0 ? o.avg = Math.round(o.sum / o.count * 100) / 100 : o.avg = 0, t.breakdown && o.breakdown)
1129
1139
  for (const [r, s] of Object.entries(t.breakdown))
1130
1140
  o.breakdown[r] && (o.breakdown[r] = Math.max(0, o.breakdown[r] - s), o.breakdown[r] === 0 && delete o.breakdown[r]);
1131
- return o.nps = St((o == null ? void 0 : o.breakdown) || {}), o;
1141
+ return o.nps = Ct((o == null ? void 0 : o.breakdown) || {}), o;
1132
1142
  }
1133
- function Ro(e, t) {
1143
+ function jo(e, t) {
1134
1144
  if (!e.count && !t.count)
1135
1145
  return L();
1136
1146
  if (!e.count)
@@ -1149,12 +1159,12 @@ function Ro(e, t) {
1149
1159
  for (const [r, s] of Object.entries(t.breakdown))
1150
1160
  o.breakdown[r] = (o.breakdown[r] || 0) + s;
1151
1161
  }
1152
- return o.nps = St((o == null ? void 0 : o.breakdown) || {}), o;
1162
+ return o.nps = Ct((o == null ? void 0 : o.breakdown) || {}), o;
1153
1163
  }
1154
- function Me(e) {
1164
+ function Le(e) {
1155
1165
  return !e || typeof e != "string" ? !1 : /^[\p{Emoji}]$/u.test(e) ? !0 : new RegExp("^\\p{Emoji}(\\p{Emoji_Modifier}|\\u200D\\p{Emoji})*$", "u").test(e);
1156
1166
  }
1157
- function Et(e) {
1167
+ function At(e) {
1158
1168
  if (!e || typeof e != "string")
1159
1169
  return !1;
1160
1170
  const t = e.trim();
@@ -1168,7 +1178,7 @@ function Et(e) {
1168
1178
  return !1;
1169
1179
  }
1170
1180
  }
1171
- function jo(e) {
1181
+ function Bo(e) {
1172
1182
  if (!e || typeof e != "string")
1173
1183
  return [];
1174
1184
  const t = e.trim();
@@ -1183,24 +1193,24 @@ function jo(e) {
1183
1193
  }
1184
1194
  return t.split(",").map((o) => o.trim()).filter((o) => o !== "");
1185
1195
  }
1186
- function Bo(e, t) {
1196
+ function Vo(e, t) {
1187
1197
  const o = /{([^{}]+)}/g;
1188
1198
  return e.replace(o, (r, s) => {
1189
1199
  const i = s.trim(), a = t[i];
1190
1200
  return a !== void 0 ? String(a) : r;
1191
1201
  });
1192
1202
  }
1193
- function Vo(e, t) {
1203
+ function Uo(e, t) {
1194
1204
  let o = 2166136261;
1195
1205
  const r = e + ":" + t;
1196
1206
  for (let s = 0; s < r.length; s++)
1197
1207
  o ^= r.charCodeAt(s), o += (o << 1) + (o << 4) + (o << 7) + (o << 8) + (o << 24);
1198
1208
  return (o >>> 0).toString(16).padStart(8, "0");
1199
1209
  }
1200
- function Uo(e, t = 50) {
1210
+ function qo(e, t = 50) {
1201
1211
  return e.length <= t ? e : e.substring(0, t).trim() + "...";
1202
1212
  }
1203
- class qo {
1213
+ class Ho {
1204
1214
  // Tracks if user has ever made a selection (even if later deselected)
1205
1215
  constructor(t) {
1206
1216
  this.stats = L(), this.localStats = L(), this.prevLocalStats = L(), this.isLoading = !0, this.isSubmitting = !1, this.hasInteracted = !1, (this.host = t).addController(this);
@@ -1209,7 +1219,7 @@ class qo {
1209
1219
  this.loadStats();
1210
1220
  }
1211
1221
  async getProjectId() {
1212
- return this.host.project || await Oo() || "public";
1222
+ return this.host.project || await Io() || "public";
1213
1223
  }
1214
1224
  async getLocalStatsKey() {
1215
1225
  const t = this.host, o = await ye(), r = await this.getProjectId(), s = t.name || "unnamed";
@@ -1264,12 +1274,12 @@ class qo {
1264
1274
  throw m.error("Backend returned unsuccessful response", a), new Error("Backend returned unsuccessful response");
1265
1275
  l = a.data || {};
1266
1276
  }
1267
- const n = this.getOptionsForDataFunc(t), d = Mo(l.breakdown ?? {}, n), p = d.count, h = d.sum, b = p > 0 ? Math.round(h / p * 10) / 10 : 0, x = p > 0 ? Math.round(h / p * 100) : 0, E = {
1277
+ const n = this.getOptionsForDataFunc(t), d = Lo(l.breakdown ?? {}, n), p = d.count, h = d.sum, b = p > 0 ? Math.round(h / p * 10) / 10 : 0, x = p > 0 ? Math.round(h / p * 100) : 0, E = {
1268
1278
  count: p,
1269
1279
  sum: h,
1270
1280
  avg: b,
1271
1281
  pct: x,
1272
- nps: s === S.nps ? St(d.breakdown) : 0,
1282
+ nps: s === S.nps ? Ct(d.breakdown) : 0,
1273
1283
  breakdown: d.breakdown,
1274
1284
  updated: l.updated_at || (/* @__PURE__ */ new Date()).toISOString()
1275
1285
  };
@@ -1306,7 +1316,7 @@ class qo {
1306
1316
  async loadLocalStats() {
1307
1317
  const t = await this.getLocalStatsKey();
1308
1318
  try {
1309
- const o = Lo(t);
1319
+ const o = No(t);
1310
1320
  m.debug("Loaded localStats from localStorage", o), this.localStats = o, o.submitted && (this.prevLocalStats = { ...o });
1311
1321
  } catch (o) {
1312
1322
  m.warn("Failed to generate localStorage key for localStats", o), this.localStats = L();
@@ -1319,7 +1329,7 @@ class qo {
1319
1329
  async persistLocalStats() {
1320
1330
  try {
1321
1331
  const t = await this.getLocalStatsKey();
1322
- No(t, this.localStats) || m.warn("Failed to save localStats to localStorage");
1332
+ Do(t, this.localStats) || m.warn("Failed to save localStats to localStorage");
1323
1333
  } catch (t) {
1324
1334
  m.warn("Failed to save localStats to localStorage", t);
1325
1335
  }
@@ -1333,7 +1343,7 @@ class qo {
1333
1343
  * @param textValues
1334
1344
  */
1335
1345
  updateStats(t, o) {
1336
- if (this.hasInteracted = !0, this.stats && (this.stats = Do(this.stats, this.localStats)), this.localStats = {
1346
+ if (this.hasInteracted = !0, this.stats && (this.stats = Ro(this.stats, this.localStats)), this.localStats = {
1337
1347
  count: t > 0 || o.length > 0 ? 1 : 0,
1338
1348
  sum: t,
1339
1349
  // e.g. number of stars, nps value
@@ -1347,7 +1357,7 @@ class qo {
1347
1357
  }, o && o.length > 0)
1348
1358
  for (const r of o)
1349
1359
  r && (this.localStats.breakdown[r] = 1);
1350
- this.stats = Ro(this.stats, this.localStats), m.debug("Stats updated - remote: ", this.stats), m.debug("Stats updated - local: ", this.stats), this.persistLocalStats(), this.host.requestUpdate();
1360
+ this.stats = jo(this.stats, this.localStats), m.debug("Stats updated - remote: ", this.stats), m.debug("Stats updated - local: ", this.stats), this.persistLocalStats(), this.host.requestUpdate();
1351
1361
  }
1352
1362
  async markStatsAsSubmitted() {
1353
1363
  this.localStats.submitted = (/* @__PURE__ */ new Date()).toISOString(), this.prevLocalStats = { ...this.localStats }, await this.persistLocalStats(), this.host.requestUpdate();
@@ -1369,7 +1379,7 @@ class qo {
1369
1379
  prevTextValues: d,
1370
1380
  metadata: t.metadata,
1371
1381
  timestamp: o
1372
- }, h = Vo(JSON.stringify(p), o);
1382
+ }, h = Uo(JSON.stringify(p), o);
1373
1383
  try {
1374
1384
  await this.sendStats({ ...p, hash: h }), await this.markStatsAsSubmitted(), this.dispatchSubmitEvent(p);
1375
1385
  } catch (b) {
@@ -1385,7 +1395,7 @@ class qo {
1385
1395
  m.debug("Skip sending stats as data function is in use.");
1386
1396
  return;
1387
1397
  }
1388
- if (!Et(s))
1398
+ if (!At(s))
1389
1399
  throw m.error("Invalid data endpoint", { dataEndpoint: s }), new Error(`Invalid data endpoint: ${s}`);
1390
1400
  try {
1391
1401
  if (m.debug("Sending stats", { endpoint: s, event: t }), typeof navigator < "u" && navigator.sendBeacon)
@@ -1421,9 +1431,9 @@ class qo {
1421
1431
  sum: (o == null ? void 0 : o.sum) || 0,
1422
1432
  avg: s,
1423
1433
  pct: (o == null ? void 0 : o.pct) || 0,
1424
- nps: r.type === S.nps ? St((o == null ? void 0 : o.breakdown) || {}) : 0
1434
+ nps: r.type === S.nps ? Ct((o == null ? void 0 : o.breakdown) || {}) : 0
1425
1435
  };
1426
- return m.debug("Stats data: ", this.stats), Bo(t, i);
1436
+ return m.debug("Stats data: ", this.stats), Vo(t, i);
1427
1437
  }
1428
1438
  /**
1429
1439
  * Checks if a value is selected in the local stats
@@ -1510,7 +1520,7 @@ class qo {
1510
1520
  return ((t = this.localStats) == null ? void 0 : t.submitted) !== void 0 && this.hasLocalStats();
1511
1521
  }
1512
1522
  }
1513
- class Ho {
1523
+ class Fo {
1514
1524
  constructor(t, o) {
1515
1525
  this.isEditing = !0, this.isChartVisible = !1, this.isStatsVisible = !1, this.isThankYouVisible = !1, this.isReactionPopoverVisible = !1, this.initialized = !1, this.handleClickOutside = (r) => {
1516
1526
  r.target !== this.host && (this.toggleThankYouVisibility(!1), this.toggleReactionPopoverVisibility(!1));
@@ -1554,10 +1564,15 @@ class Ho {
1554
1564
  }
1555
1565
  /**
1556
1566
  * Determine if stats should be shown
1567
+ * show-stats attribute values:
1568
+ * - undefined: don't show stats (default when attribute is absent)
1569
+ * - 'never': don't show stats
1570
+ * - 'always' or '' (empty/boolean style): always show stats
1571
+ * - 'after-vote': show stats after user interaction
1557
1572
  */
1558
1573
  shouldShowStats() {
1559
1574
  const t = this.host;
1560
- return t.showStats === void 0 || t.showStats === "never" ? !1 : t.showStats === "always" || t.showStats === "" || t.readonly && t.showStats === "after-vote" ? !0 : t.hasEditButton && this.isEditing ? !1 : this.dataController.hasLocalStats() || this.dataController.hasInteracted;
1575
+ return t.showStats === void 0 || t.showStats === "never" ? !1 : t.showStats === "after-vote" ? t.readonly ? !0 : t.hasEditButton && this.isEditing ? !1 : this.dataController.hasLocalStats() || this.dataController.hasInteracted : !0;
1561
1576
  }
1562
1577
  shouldShowFooter() {
1563
1578
  return this.shouldShowSubmitButton() || this.shouldShowStats();
@@ -1593,8 +1608,8 @@ class Ho {
1593
1608
  return !(this.host.readonly || !this.isEditing);
1594
1609
  }
1595
1610
  }
1596
- var Zt = /* @__PURE__ */ ((e) => (e.DECORATIVE = "decorative", e.FUNCTIONAL = "functional", e.STATUS = "status", e))(Zt || {});
1597
- function Le(e, t = {}) {
1611
+ var Wt = /* @__PURE__ */ ((e) => (e.DECORATIVE = "decorative", e.FUNCTIONAL = "functional", e.STATUS = "status", e))(Wt || {});
1612
+ function Ne(e, t = {}) {
1598
1613
  const { type: o = "functional", alt: r, ariaLabel: s, isSelected: i } = t;
1599
1614
  if (!e)
1600
1615
  return { alt: "", ariaHidden: !0 };
@@ -1603,20 +1618,20 @@ function Le(e, t = {}) {
1603
1618
  o === "functional" && !r && !s && console.warn(
1604
1619
  "No alt text or aria-label provided for functional icon. This may cause accessibility issues."
1605
1620
  );
1606
- const a = i ? " (selected)" : "", l = Et(e) && !r ? "" : r || e, n = s || (l ? `${l}${a}` : a);
1621
+ const a = i ? " (selected)" : "", l = At(e) && !r ? "" : r || e, n = s || (l ? `${l}${a}` : a);
1607
1622
  return {
1608
1623
  alt: l,
1609
1624
  ariaLabel: n,
1610
1625
  ariaHidden: !1
1611
1626
  };
1612
1627
  }
1613
- function Fo(e, t = "polite") {
1628
+ function Yo(e, t = "polite") {
1614
1629
  let o = document.getElementById("screen-reader-announcer");
1615
1630
  o ? o.setAttribute("aria-live", t) : (o = document.createElement("div"), o.id = "screen-reader-announcer", o.setAttribute("aria-live", t), o.setAttribute("role", "status"), o.setAttribute("aria-atomic", "true"), o.style.position = "absolute", o.style.width = "1px", o.style.height = "1px", o.style.margin = "-1px", o.style.padding = "0", o.style.overflow = "hidden", o.style.clip = "rect(0, 0, 0, 0)", o.style.whiteSpace = "nowrap", o.style.border = "0", document.body.appendChild(o)), o.textContent = "", setTimeout(() => {
1616
1631
  o.textContent = e;
1617
1632
  }, 50);
1618
1633
  }
1619
- function Yo(e, t) {
1634
+ function Ko(e, t) {
1620
1635
  return `${e}: ${t}`;
1621
1636
  }
1622
1637
  /**
@@ -1624,8 +1639,8 @@ function Yo(e, t) {
1624
1639
  * Copyright 2017 Google LLC
1625
1640
  * SPDX-License-Identifier: BSD-3-Clause
1626
1641
  */
1627
- const Ne = { ATTRIBUTE: 1 }, De = (e) => (...t) => ({ _$litDirective$: e, values: t });
1628
- let Re = class {
1642
+ const De = { ATTRIBUTE: 1 }, Re = (e) => (...t) => ({ _$litDirective$: e, values: t });
1643
+ let je = class {
1629
1644
  constructor(t) {
1630
1645
  }
1631
1646
  get _$AU() {
@@ -1646,10 +1661,10 @@ let Re = class {
1646
1661
  * Copyright 2018 Google LLC
1647
1662
  * SPDX-License-Identifier: BSD-3-Clause
1648
1663
  */
1649
- const y = De(class extends Re {
1664
+ const y = Re(class extends je {
1650
1665
  constructor(e) {
1651
1666
  var t;
1652
- if (super(e), e.type !== Ne.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.");
1667
+ if (super(e), e.type !== De.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.");
1653
1668
  }
1654
1669
  render(e) {
1655
1670
  return " " + Object.keys(e).filter((t) => e[t]).join(" ") + " ";
@@ -1670,10 +1685,10 @@ const y = De(class extends Re {
1670
1685
  return U;
1671
1686
  }
1672
1687
  });
1673
- var Ko = Object.defineProperty, v = (e, t, o, r) => {
1688
+ var Go = Object.defineProperty, v = (e, t, o, r) => {
1674
1689
  for (var s = void 0, i = e.length - 1, a; i >= 0; i--)
1675
1690
  (a = e[i]) && (s = a(t, o, s) || s);
1676
- return s && Ko(t, o, s), s;
1691
+ return s && Go(t, o, s), s;
1677
1692
  };
1678
1693
  const bt = {
1679
1694
  mobile: "480px",
@@ -1681,7 +1696,7 @@ const bt = {
1681
1696
  desktop: "1024px"
1682
1697
  }, Xt = class Xt extends N {
1683
1698
  constructor() {
1684
- super(...arguments), this.dataController = new qo(this), this.displayController = new Ho(this, this.dataController), this.hasEditButton = !0, this.showStats = "never", this.showChart = !1, this.initialized = !1, this.ariaLabel = null, this.minContrast = Oe.AA_NORMAL, this.options = [], this.project = "public", this.questionPosition = "top", this.statsText = "{count} votes", this.buttonText = "Submit", this.buttonRadius = "sm", this.multiple = !1, this.inline = !1, this.readonly = !1, this.handleEditToggleKeyDown = (t) => {
1699
+ super(...arguments), this.dataController = new Ho(this), this.displayController = new Fo(this, this.dataController), this.hasEditButton = !0, this.showStats = "never", this.showChart = !1, this.initialized = !1, this.ariaLabel = null, this.minContrast = Ie.AA_NORMAL, this.options = [], this.project = "public", this.questionPosition = "top", this.statsText = "{count} votes", this.buttonText = "Submit", this.buttonRadius = "sm", this.multiple = !1, this.inline = !1, this.readonly = !1, this.handleEditToggleKeyDown = (t) => {
1685
1700
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), this.handleEnterEditMode());
1686
1701
  };
1687
1702
  }
@@ -1716,7 +1731,7 @@ const bt = {
1716
1731
  const i = J(this.primaryColor);
1717
1732
  o += `--pc-primary-color: ${i} !important;
1718
1733
  `;
1719
- const a = wo(i, {
1734
+ const a = $o(i, {
1720
1735
  minContrast: this.minContrast,
1721
1736
  colorOptions: ["black", "white", "light", "dark"]
1722
1737
  });
@@ -1747,33 +1762,33 @@ const bt = {
1747
1762
  const s = this.starHoverColor || (r ? `color-mix(in srgb, ${J(r)} 80%, white)` : null);
1748
1763
  if (s && (o += `--pc-star-hover-color: ${s} !important;
1749
1764
  `), this.starSize) {
1750
- const i = jt(this.starSize, "1.5em", 1.5);
1765
+ const i = Bt(this.starSize, "1.5em", 1.5);
1751
1766
  o += `--pc-stars-star-size: ${i} !important;
1752
1767
  `;
1753
1768
  }
1754
1769
  if (this.reactionSize) {
1755
- const i = jt(this.reactionSize, "1em", 1);
1770
+ const i = Bt(this.reactionSize, "1em", 1);
1756
1771
  o += `--pc-reaction-size: ${i} !important;
1757
1772
  `;
1758
1773
  }
1759
1774
  if (this.size) {
1760
- const i = jt(this.size);
1775
+ const i = Bt(this.size);
1761
1776
  o += `font-size: ${i} !important;
1762
1777
  `;
1763
1778
  }
1764
1779
  if (this.buttonRadius) {
1765
- const i = So(this.buttonRadius);
1780
+ const i = Co(this.buttonRadius);
1766
1781
  o += `--pc-button-radius: ${i} !important;
1767
1782
  `;
1768
1783
  }
1769
1784
  o += `}
1770
- `, this.css && (o += Po(Ao(this.css))), t.textContent = o;
1785
+ `, this.css && (o += To(Po(this.css))), t.textContent = o;
1771
1786
  }
1772
1787
  /**
1773
1788
  * Update ARIA attributes for accessibility
1774
1789
  */
1775
1790
  updateAriaAttributes() {
1776
- this.ariaLabel && Bt(this, "aria-label", this.ariaLabel), this.ariaDescribedby && Bt(this, "aria-describedby", this.ariaDescribedby), Bt(this, "aria-busy", this.dataController.isLoading ? "true" : "false");
1791
+ this.ariaLabel && Vt(this, "aria-label", this.ariaLabel), this.ariaDescribedby && Vt(this, "aria-describedby", this.ariaDescribedby), Vt(this, "aria-busy", this.dataController.isLoading ? "true" : "false");
1777
1792
  }
1778
1793
  /**
1779
1794
  * Update host CSS classes based on state
@@ -1798,7 +1813,7 @@ const bt = {
1798
1813
  */
1799
1814
  announceSelectionChange(t, o, r) {
1800
1815
  const s = `Poll for "${t}"`, i = r ? `${o.label} selected` : `${o.label} unselected`;
1801
- Fo(Yo(s, i));
1816
+ Yo(Ko(s, i));
1802
1817
  }
1803
1818
  /** Common render methods */
1804
1819
  renderLabel() {
@@ -1829,7 +1844,7 @@ const bt = {
1829
1844
  tabindex="0"
1830
1845
  aria-label="Edit vote"
1831
1846
  @keydown="${this.handleEditToggleKeyDown}"
1832
- >${Gt}</span
1847
+ >${St}</span
1833
1848
  >
1834
1849
  ` : u;
1835
1850
  }
@@ -1848,7 +1863,7 @@ const bt = {
1848
1863
  tabindex="0"
1849
1864
  aria-label="${this.displayController.isChartVisible ? "Hide chart" : "Show chart"}"
1850
1865
  @keydown="${() => this.displayController.toggleChartVisibility()}"
1851
- >${this.displayController.isChartVisible ? Kt : Yt}</span
1866
+ >${this.displayController.isChartVisible ? Gt : Kt}</span
1852
1867
  >
1853
1868
  ` : u;
1854
1869
  }
@@ -1875,7 +1890,7 @@ const bt = {
1875
1890
  renderThankYouMessage() {
1876
1891
  if (!this.displayController.shouldDisplayThankYouMsg())
1877
1892
  return u;
1878
- const t = Uo(this.thankYouMsg || "");
1893
+ const t = qo(this.thankYouMsg || "");
1879
1894
  return c`
1880
1895
  <div class="pc-thank-you-overlay" data-testid="poll-thank-you-overlay">
1881
1896
  <div class="pc-thank-you" data-testid="thank-you">
@@ -1887,7 +1902,7 @@ const bt = {
1887
1902
  @click="${() => this.displayController.toggleThankYouVisibility(!1)}"
1888
1903
  role="button"
1889
1904
  aria-label="Close"
1890
- >${co}</span
1905
+ >${po}</span
1891
1906
  >
1892
1907
  </div>
1893
1908
  </div>
@@ -2082,7 +2097,7 @@ v([
2082
2097
  v([
2083
2098
  f({ type: Boolean, reflect: !0 })
2084
2099
  ], g.prototype, "readonly");
2085
- const Go = R`
2100
+ const Zo = R`
2086
2101
  /* CSS variables inherit from parent - defaults are specified at usage sites */
2087
2102
 
2088
2103
  .pc-body {
@@ -2533,7 +2548,7 @@ const Go = R`
2533
2548
  animation: none;
2534
2549
  }
2535
2550
  }
2536
- `, At = R`
2551
+ `, Pt = R`
2537
2552
  /* Default values for CSS variables - can be overridden by external :root or parent definitions */
2538
2553
  :host {
2539
2554
  --default-primary-color: #2196f3;
@@ -2962,6 +2977,22 @@ const Go = R`
2962
2977
  text-decoration-thickness: 2px;
2963
2978
  }
2964
2979
 
2980
+ /* Selected option indicator for inline mode */
2981
+ .pc-inline-selected {
2982
+ display: inline-flex;
2983
+ align-items: center;
2984
+ font-size: 0.9em;
2985
+ color: var(--pc-primary-color, var(--default-primary-color));
2986
+ opacity: 0.9;
2987
+ }
2988
+
2989
+ .pc-inline-selected .poll-option-icon,
2990
+ .pc-inline-selected .poll-option-icon-img {
2991
+ font-size: 1em;
2992
+ width: 1em;
2993
+ height: 1em;
2994
+ }
2995
+
2965
2996
  /* Vertical layout for top/bottom stats position */
2966
2997
  .pc-inline-trigger-vertical {
2967
2998
  flex-direction: column;
@@ -3023,6 +3054,10 @@ const Go = R`
3023
3054
 
3024
3055
  /* Popover stats text */
3025
3056
  .pc-popover-stats {
3057
+ display: flex;
3058
+ align-items: center;
3059
+ justify-content: center;
3060
+ gap: 0.3em;
3026
3061
  font-size: 0.85em;
3027
3062
  color: var(--pc-text-color, var(--default-text-color));
3028
3063
  opacity: 0.8;
@@ -3035,6 +3070,25 @@ const Go = R`
3035
3070
  display: none;
3036
3071
  }
3037
3072
 
3073
+ /* Edit icon in popover stats */
3074
+ .pc-popover-edit-icon {
3075
+ display: inline-flex;
3076
+ align-items: center;
3077
+ justify-content: center;
3078
+ cursor: pointer;
3079
+ opacity: 0.7;
3080
+ transition: opacity 0.15s ease;
3081
+ }
3082
+
3083
+ .pc-popover-edit-icon:hover {
3084
+ opacity: 1;
3085
+ }
3086
+
3087
+ .pc-popover-edit-icon svg {
3088
+ width: 1.1em;
3089
+ height: 1.1em;
3090
+ }
3091
+
3038
3092
  /* Popover submit button */
3039
3093
  .pc-popover-submit {
3040
3094
  font: inherit;
@@ -3086,6 +3140,11 @@ const Go = R`
3086
3140
  font-size: var(--pc-font-size-medium, var(--default-font-size-medium));
3087
3141
  padding: 0.2em 0;
3088
3142
  }
3143
+
3144
+ /* Popover content should not exceed screen width on mobile */
3145
+ .pc-popover-content {
3146
+ width: 100% !important;
3147
+ }
3089
3148
  }
3090
3149
 
3091
3150
  .pc-thank-you-msg {
@@ -3301,10 +3360,10 @@ const Go = R`
3301
3360
  max-width: 100%;
3302
3361
  }
3303
3362
  `;
3304
- var Zo = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, j = (e, t, o, r) => {
3305
- for (var s = r > 1 ? void 0 : r ? Xo(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3363
+ var Xo = Object.defineProperty, Jo = Object.getOwnPropertyDescriptor, j = (e, t, o, r) => {
3364
+ for (var s = r > 1 ? void 0 : r ? Jo(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3306
3365
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
3307
- return r && s && Zo(t, o, s), s;
3366
+ return r && s && Xo(t, o, s), s;
3308
3367
  };
3309
3368
  let _ = class extends N {
3310
3369
  constructor() {
@@ -3423,7 +3482,7 @@ j([
3423
3482
  _ = j([
3424
3483
  H("pc-popover")
3425
3484
  ], _);
3426
- const Jo = R`
3485
+ const Qo = R`
3427
3486
  :host {
3428
3487
  --sheet-bg: light-dark(#ffffff, #1a1a1a);
3429
3488
  --sheet-border: light-dark(#e0e0e0, #333333);
@@ -3536,10 +3595,10 @@ const Jo = R`
3536
3595
  max-width: 100%;
3537
3596
  }
3538
3597
  `;
3539
- var Qo = Object.defineProperty, tr = Object.getOwnPropertyDescriptor, X = (e, t, o, r) => {
3540
- for (var s = r > 1 ? void 0 : r ? tr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3598
+ var tr = Object.defineProperty, er = Object.getOwnPropertyDescriptor, X = (e, t, o, r) => {
3599
+ for (var s = r > 1 ? void 0 : r ? er(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3541
3600
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
3542
- return r && s && Qo(t, o, s), s;
3601
+ return r && s && tr(t, o, s), s;
3543
3602
  };
3544
3603
  let D = class extends N {
3545
3604
  constructor() {
@@ -3635,7 +3694,7 @@ let D = class extends N {
3635
3694
  `;
3636
3695
  }
3637
3696
  };
3638
- D.styles = [Jo];
3697
+ D.styles = [Qo];
3639
3698
  X([
3640
3699
  f({ type: Boolean, reflect: !0 })
3641
3700
  ], D.prototype, "open", 2);
@@ -3657,13 +3716,13 @@ X([
3657
3716
  D = X([
3658
3717
  H("pc-bottom-sheet")
3659
3718
  ], D);
3660
- var er = Object.defineProperty, or = Object.getOwnPropertyDescriptor, ft = (e, t, o, r) => {
3661
- for (var s = r > 1 ? void 0 : r ? or(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3719
+ var or = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, ft = (e, t, o, r) => {
3720
+ for (var s = r > 1 ? void 0 : r ? rr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3662
3721
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
3663
- return r && s && er(t, o, s), s;
3722
+ return r && s && or(t, o, s), s;
3664
3723
  };
3665
- const rr = 768;
3666
- let W = class extends N {
3724
+ const sr = 768;
3725
+ let Z = class extends N {
3667
3726
  constructor() {
3668
3727
  super(...arguments), this.open = !1, this.position = "auto", this.isMobile = !1, this.handleMediaChange = (e) => {
3669
3728
  this.isMobile = e.matches;
@@ -3679,7 +3738,7 @@ let W = class extends N {
3679
3738
  super.disconnectedCallback(), (e = this.mediaQuery) == null || e.removeEventListener("change", this.handleMediaChange);
3680
3739
  }
3681
3740
  setupMediaQuery() {
3682
- this.mediaQuery = window.matchMedia(`(max-width: ${rr - 1}px)`), this.isMobile = this.mediaQuery.matches, this.mediaQuery.addEventListener("change", this.handleMediaChange);
3741
+ this.mediaQuery = window.matchMedia(`(max-width: ${sr - 1}px)`), this.isMobile = this.mediaQuery.matches, this.mediaQuery.addEventListener("change", this.handleMediaChange);
3683
3742
  }
3684
3743
  render() {
3685
3744
  return this.isMobile ? c`
@@ -3698,30 +3757,30 @@ let W = class extends N {
3698
3757
  `;
3699
3758
  }
3700
3759
  };
3701
- W.styles = R`
3760
+ Z.styles = R`
3702
3761
  :host {
3703
3762
  display: contents;
3704
3763
  }
3705
3764
  `;
3706
3765
  ft([
3707
3766
  f({ type: Boolean, reflect: !0 })
3708
- ], W.prototype, "open", 2);
3767
+ ], Z.prototype, "open", 2);
3709
3768
  ft([
3710
3769
  f({ type: String })
3711
- ], W.prototype, "position", 2);
3770
+ ], Z.prototype, "position", 2);
3712
3771
  ft([
3713
3772
  f({ attribute: !1 })
3714
- ], W.prototype, "anchor", 2);
3773
+ ], Z.prototype, "anchor", 2);
3715
3774
  ft([
3716
3775
  k()
3717
- ], W.prototype, "isMobile", 2);
3718
- W = ft([
3776
+ ], Z.prototype, "isMobile", 2);
3777
+ Z = ft([
3719
3778
  H("pc-responsive-modal")
3720
- ], W);
3721
- var sr = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, F = (e, t, o, r) => {
3722
- for (var s = r > 1 ? void 0 : r ? ir(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3779
+ ], Z);
3780
+ var ir = Object.defineProperty, ar = Object.getOwnPropertyDescriptor, F = (e, t, o, r) => {
3781
+ for (var s = r > 1 ? void 0 : r ? ar(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3723
3782
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
3724
- return r && s && sr(t, o, s), s;
3783
+ return r && s && ir(t, o, s), s;
3725
3784
  };
3726
3785
  let I = class extends g {
3727
3786
  constructor() {
@@ -3743,7 +3802,7 @@ let I = class extends g {
3743
3802
  const i = this.dataController.isValueSelected(String(s)), a = {
3744
3803
  "nps-button": !0,
3745
3804
  selected: i
3746
- }, l = Co(`Rate ${s}`, i, !1);
3805
+ }, l = ko(`Rate ${s}`, i, !1);
3747
3806
  return c`
3748
3807
  <button
3749
3808
  data-testid="nps-button-${s}"
@@ -3790,7 +3849,7 @@ let I = class extends g {
3790
3849
  const e = this.dataController.stats, t = (e == null ? void 0 : e.nps) ?? 0, o = 100, r = 100, s = 80, i = (w) => ({
3791
3850
  x: o + s * Math.cos(w),
3792
3851
  y: r - s * Math.sin(w)
3793
- }), a = i(Math.PI), l = i(Math.PI / 2), n = i(Math.PI / 4), d = i(0), p = (w, mt, Be = 0) => `M ${w.x} ${w.y} A ${s} ${s} 0 ${Be} 1 ${mt.x} ${mt.y}`, h = p(a, l), b = p(l, n), x = p(n, d), C = ((w) => Math.PI - (w + 100) / 200 * Math.PI)(t), P = i(C);
3852
+ }), a = i(Math.PI), l = i(Math.PI / 2), n = i(Math.PI / 4), d = i(0), p = (w, mt, Ve = 0) => `M ${w.x} ${w.y} A ${s} ${s} 0 ${Ve} 1 ${mt.x} ${mt.y}`, h = p(a, l), b = p(l, n), x = p(n, d), C = ((w) => Math.PI - (w + 100) / 200 * Math.PI)(t), P = i(C);
3794
3853
  return c`
3795
3854
  <div class="nps-semicircle-gauge" data-testid="nps-semicircle-gauge">
3796
3855
  <svg viewBox="0 0 200 115">
@@ -3866,7 +3925,7 @@ let I = class extends g {
3866
3925
  * Uses SVG with 3 colored segments for detractors/passives/promoters
3867
3926
  */
3868
3927
  renderInlineGauge() {
3869
- const e = this.dataController.stats, t = (e == null ? void 0 : e.breakdown) || {}, o = 8, r = 2 * Math.PI * o, s = Io(t), i = s.detractors + s.passives + s.promoters;
3928
+ const e = this.dataController.stats, t = (e == null ? void 0 : e.breakdown) || {}, o = 8, r = 2 * Math.PI * o, s = zo(t), i = s.detractors + s.passives + s.promoters;
3870
3929
  if (i === 0)
3871
3930
  return c`
3872
3931
  <div class="inline-nps-gauge">
@@ -3918,9 +3977,10 @@ let I = class extends g {
3918
3977
  /**
3919
3978
  * Render the inline trigger button
3920
3979
  * Respects show-stats attribute for controlling stats text visibility
3980
+ * Shows add icon when no selection, edit icon when user has submitted
3921
3981
  */
3922
3982
  renderInlineTrigger() {
3923
- const t = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "";
3983
+ const t = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "", r = this.dataController.hasLocalStats() ? St : Pe;
3924
3984
  return c`
3925
3985
  <button
3926
3986
  class="pc-inline-trigger"
@@ -3933,7 +3993,7 @@ let I = class extends g {
3933
3993
  >
3934
3994
  ${this.renderInlineGauge()}
3935
3995
  ${t ? c`<span class="pc-inline-stats-text">${t}</span>` : u}
3936
- <span class="inline-nps-icon">${Gt}</span>
3996
+ <span class="inline-nps-icon">${r}</span>
3937
3997
  </button>
3938
3998
  `;
3939
3999
  }
@@ -3986,7 +4046,7 @@ let I = class extends g {
3986
4046
  @keydown="${(e) => {
3987
4047
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.displayController.toggleChartVisibility());
3988
4048
  }}"
3989
- >${this.displayController.isChartVisible ? Kt : Yt}</span
4049
+ >${this.displayController.isChartVisible ? Gt : Kt}</span
3990
4050
  >
3991
4051
  `;
3992
4052
  }
@@ -4070,7 +4130,7 @@ let I = class extends g {
4070
4130
  return this.inline ? this.renderInlineMode() : this.readonly ? this.renderReadonlyMode() : this.renderStandardMode();
4071
4131
  }
4072
4132
  };
4073
- I.styles = [...g.styles, At, Go];
4133
+ I.styles = [...g.styles, Pt, Zo];
4074
4134
  F([
4075
4135
  f({ type: String, attribute: "min-label" })
4076
4136
  ], I.prototype, "minLabel", 2);
@@ -4095,7 +4155,7 @@ F([
4095
4155
  I = F([
4096
4156
  H("pc-nps")
4097
4157
  ], I);
4098
- const ar = R`
4158
+ const nr = R`
4099
4159
  /* CSS variables inherit from parent - defaults are specified at usage sites */
4100
4160
 
4101
4161
  .pc-container {
@@ -4402,8 +4462,7 @@ const ar = R`
4402
4462
  /* Poll popover sizing */
4403
4463
  .pc-popover-content {
4404
4464
  padding: 0.5rem;
4405
- min-width: 250px;
4406
- max-width: 350px;
4465
+ min-width: 280px;
4407
4466
  }
4408
4467
 
4409
4468
  /* Poll-specific: center the stats text */
@@ -4481,12 +4540,12 @@ const ar = R`
4481
4540
  opacity: 0.8;
4482
4541
  }
4483
4542
  `;
4484
- var nr = Object.defineProperty, lr = Object.getOwnPropertyDescriptor, gt = (e, t, o, r) => {
4485
- for (var s = r > 1 ? void 0 : r ? lr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
4543
+ var lr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, gt = (e, t, o, r) => {
4544
+ for (var s = r > 1 ? void 0 : r ? cr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
4486
4545
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
4487
- return r && s && nr(t, o, s), s;
4546
+ return r && s && lr(t, o, s), s;
4488
4547
  };
4489
- let Z = class extends g {
4548
+ let W = class extends g {
4490
4549
  constructor() {
4491
4550
  super(), this.type = S.poll, this.multiple = !1, this.compact = !1, this.popoverOpen = !1, this.hasEditButton = !0, this.statsText = "{count} votes", this.questionPosition = "top", this.statsPosition = "bottom", this.showStats = "after-vote";
4492
4551
  }
@@ -4544,16 +4603,16 @@ let Z = class extends g {
4544
4603
  */
4545
4604
  renderOptionIcon(e) {
4546
4605
  if (!(e != null && e.icon)) return "";
4547
- const t = Zt.DECORATIVE, o = (e == null ? void 0 : e.label) || "", r = e ? this.dataController.isValueSelected(e.value) : !1, s = Le(e == null ? void 0 : e.icon, {
4606
+ const t = Wt.DECORATIVE, o = (e == null ? void 0 : e.label) || "", r = e ? this.dataController.isValueSelected(e.value) : !1, s = Ne(e == null ? void 0 : e.icon, {
4548
4607
  type: t,
4549
4608
  alt: o,
4550
4609
  isSelected: r
4551
4610
  });
4552
- return Me(e == null ? void 0 : e.icon) ? c`<span
4611
+ return Le(e == null ? void 0 : e.icon) ? c`<span
4553
4612
  class="poll-option-icon"
4554
4613
  aria-hidden="${s.ariaHidden ? "true" : "false"}"
4555
4614
  >${e == null ? void 0 : e.icon}</span
4556
- >` : Et(e == null ? void 0 : e.icon) ? c`<img
4615
+ >` : At(e == null ? void 0 : e.icon) ? c`<img
4557
4616
  src="${e == null ? void 0 : e.icon}"
4558
4617
  alt="${s.alt}"
4559
4618
  class="poll-option-icon-img"
@@ -4581,7 +4640,7 @@ let Z = class extends g {
4581
4640
  selected: o,
4582
4641
  "poll-option--compact": this.compact,
4583
4642
  "poll-option--disabled": r
4584
- }, i = t + 1, a = `poll-${this.type}-${i}`, l = ko(
4643
+ }, i = t + 1, a = `poll-${this.type}-${i}`, l = Eo(
4585
4644
  e.label,
4586
4645
  o,
4587
4646
  r,
@@ -4736,9 +4795,10 @@ let Z = class extends g {
4736
4795
  /**
4737
4796
  * Render the inline trigger button
4738
4797
  * Respects show-stats attribute for controlling stats text visibility
4798
+ * Shows add icon when no selection, edit icon when user has submitted
4739
4799
  */
4740
4800
  renderInlineTrigger() {
4741
- const t = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "";
4801
+ const t = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "", r = this.dataController.hasLocalStats() ? St : Pe;
4742
4802
  return c`
4743
4803
  <button
4744
4804
  class="pc-inline-trigger"
@@ -4752,7 +4812,7 @@ let Z = class extends g {
4752
4812
  >
4753
4813
  ${this.question ? c`<span class="inline-poll-question">${this.question}</span>` : u}
4754
4814
  ${t ? c`<span class="pc-inline-stats-text">${t}</span>` : u}
4755
- <span class="inline-poll-icon">${Gt}</span>
4815
+ <span class="inline-poll-icon">${r}</span>
4756
4816
  </button>
4757
4817
  `;
4758
4818
  }
@@ -4776,18 +4836,39 @@ let Z = class extends g {
4776
4836
  </button>
4777
4837
  `;
4778
4838
  }
4839
+ /**
4840
+ * Handle edit button click in popover to switch back to edit mode
4841
+ */
4842
+ handlePopoverEditClick() {
4843
+ this.displayController.toggleEditMode(!0), this.displayController.toggleChartVisibility(!1);
4844
+ }
4779
4845
  /**
4780
4846
  * Render popover content
4781
4847
  * Shows poll options for voting, or chart after submission
4848
+ * Respects show-stats attribute for controlling stats text visibility
4782
4849
  */
4783
4850
  renderPopoverContent() {
4784
- const e = this.displayController.shouldShowChart(), o = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "";
4851
+ const e = this.displayController.shouldShowChart(), o = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "", r = e && !this.readonly;
4785
4852
  return c`
4786
4853
  <div class="pc-popover-content" data-testid="poll-popover-content">
4787
4854
  ${this.question ? c`<div class="pc-popover-question">${this.question}</div>` : u}
4788
4855
  ${e ? this.renderBarChart() : this.renderPollOptions()}
4789
4856
  ${e ? u : this.renderPopoverSubmitButton()}
4790
- ${o ? c`<div class="pc-popover-stats">${o}</div>` : u}
4857
+ ${o || r ? c`<div class="pc-popover-stats">
4858
+ ${o ? c`<span>${o}</span>` : u}
4859
+ ${r ? c`<span
4860
+ class="pc-popover-edit-icon"
4861
+ @click=${this.handlePopoverEditClick}
4862
+ role="button"
4863
+ tabindex="0"
4864
+ aria-label="Edit vote"
4865
+ data-testid="popover-edit-icon"
4866
+ @keydown=${(s) => {
4867
+ (s.key === "Enter" || s.key === " ") && (s.preventDefault(), this.handlePopoverEditClick());
4868
+ }}
4869
+ >${St}</span
4870
+ >` : u}
4871
+ </div>` : u}
4791
4872
  </div>
4792
4873
  `;
4793
4874
  }
@@ -4871,23 +4952,23 @@ let Z = class extends g {
4871
4952
  return this.inline ? this.renderInlineMode() : this.readonly ? this.renderReadonlyMode() : this.renderStandardMode();
4872
4953
  }
4873
4954
  };
4874
- Z.styles = [...g.styles, At, ar];
4955
+ W.styles = [...g.styles, Pt, nr];
4875
4956
  gt([
4876
4957
  f({ type: Boolean })
4877
- ], Z.prototype, "multiple", 2);
4958
+ ], W.prototype, "multiple", 2);
4878
4959
  gt([
4879
4960
  f({ type: Boolean })
4880
- ], Z.prototype, "compact", 2);
4961
+ ], W.prototype, "compact", 2);
4881
4962
  gt([
4882
4963
  k()
4883
- ], Z.prototype, "popoverOpen", 2);
4964
+ ], W.prototype, "popoverOpen", 2);
4884
4965
  gt([
4885
4966
  ht(".pc-inline-trigger")
4886
- ], Z.prototype, "triggerElement", 2);
4887
- Z = gt([
4967
+ ], W.prototype, "triggerElement", 2);
4968
+ W = gt([
4888
4969
  H("pc-poll")
4889
- ], Z);
4890
- const cr = R`
4970
+ ], W);
4971
+ const dr = R`
4891
4972
  /* CSS variables inherit from parent - defaults are specified at usage sites */
4892
4973
 
4893
4974
  .pc-section {
@@ -5074,10 +5155,10 @@ const cr = R`
5074
5155
  * Copyright 2018 Google LLC
5075
5156
  * SPDX-License-Identifier: BSD-3-Clause
5076
5157
  */
5077
- const je = "important", dr = " !" + je, pr = De(class extends Re {
5158
+ const Be = "important", pr = " !" + Be, ur = Re(class extends je {
5078
5159
  constructor(e) {
5079
5160
  var t;
5080
- if (super(e), e.type !== Ne.ATTRIBUTE || e.name !== "style" || ((t = e.strings) == null ? void 0 : t.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
5161
+ if (super(e), e.type !== De.ATTRIBUTE || e.name !== "style" || ((t = e.strings) == null ? void 0 : t.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
5081
5162
  }
5082
5163
  render(e) {
5083
5164
  return Object.keys(e).reduce((t, o) => {
@@ -5093,8 +5174,8 @@ const je = "important", dr = " !" + je, pr = De(class extends Re {
5093
5174
  const s = t[r];
5094
5175
  if (s != null) {
5095
5176
  this.ft.add(r);
5096
- const i = typeof s == "string" && s.endsWith(dr);
5097
- r.includes("-") || i ? o.setProperty(r, i ? s.slice(0, -11) : s, i ? je : "") : o[r] = s;
5177
+ const i = typeof s == "string" && s.endsWith(pr);
5178
+ r.includes("-") || i ? o.setProperty(r, i ? s.slice(0, -11) : s, i ? Be : "") : o[r] = s;
5098
5179
  }
5099
5180
  }
5100
5181
  return U;
@@ -5272,17 +5353,17 @@ const xe = {
5272
5353
  hiking: "🥾",
5273
5354
  yoga: "🧘"
5274
5355
  };
5275
- function Ct(e) {
5356
+ function kt(e) {
5276
5357
  let t = "❓", o = !1;
5277
- return e ? e in xe ? t = xe[e] : Me(e) ? t = e : Et(e) ? (o = !0, t = e) : /^\w+@\w+$/.test(e) ? t = e : e.endsWith(".svg") && !e.includes("/") ? (t = `https://cdn.jsdelivr.net/npm/@mdi/svg@7.4.47/svg/${e}`, o = !0) : t = e : t = "❓", {
5358
+ return e ? e in xe ? t = xe[e] : Le(e) ? t = e : At(e) ? (o = !0, t = e) : /^\w+@\w+$/.test(e) ? t = e : e.endsWith(".svg") && !e.includes("/") ? (t = `https://cdn.jsdelivr.net/npm/@mdi/svg@7.4.47/svg/${e}`, o = !0) : t = e : t = "❓", {
5278
5359
  icon: t,
5279
5360
  isRemoteImage: o
5280
5361
  };
5281
5362
  }
5282
- var ur = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, st = (e, t, o, r) => {
5283
- for (var s = r > 1 ? void 0 : r ? hr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
5363
+ var hr = Object.defineProperty, fr = Object.getOwnPropertyDescriptor, st = (e, t, o, r) => {
5364
+ for (var s = r > 1 ? void 0 : r ? fr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
5284
5365
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
5285
- return r && s && ur(t, o, s), s;
5366
+ return r && s && hr(t, o, s), s;
5286
5367
  };
5287
5368
  let q = class extends g {
5288
5369
  constructor() {
@@ -5307,14 +5388,14 @@ let q = class extends g {
5307
5388
  * Renders the star icon using resolveIcon for emoji, URL, or MDI support
5308
5389
  */
5309
5390
  renderStarIcon() {
5310
- const { icon: e, isRemoteImage: t } = Ct(this.icon);
5391
+ const { icon: e, isRemoteImage: t } = kt(this.icon);
5311
5392
  return t ? c`<img class="star-icon-img" src="${e}" alt="star" />` : e;
5312
5393
  }
5313
5394
  /**
5314
5395
  * Gets the resolved icon string (for use in chart labels)
5315
5396
  */
5316
5397
  getResolvedIconString() {
5317
- const { icon: e, isRemoteImage: t } = Ct(this.icon);
5398
+ const { icon: e, isRemoteImage: t } = kt(this.icon);
5318
5399
  return t ? "★" : e;
5319
5400
  }
5320
5401
  /**
@@ -5336,7 +5417,7 @@ let q = class extends g {
5336
5417
  <span
5337
5418
  data-testid="${e ? "popover" : "stars-view"}-star-${d}"
5338
5419
  class=${y(x)}
5339
- style=${pr(E)}
5420
+ style=${ur(E)}
5340
5421
  role="${a ? "button" : "presentation"}"
5341
5422
  tabindex="${a ? "0" : ""}"
5342
5423
  aria-label="${a ? `Rate ${d} star${d > 1 ? "s" : ""}` : ""}"
@@ -5505,7 +5586,7 @@ let q = class extends g {
5505
5586
  @keydown="${(e) => {
5506
5587
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.displayController.toggleChartVisibility());
5507
5588
  }}"
5508
- >${this.displayController.isChartVisible ? Kt : Yt}</span
5589
+ >${this.displayController.isChartVisible ? Gt : Kt}</span
5509
5590
  >
5510
5591
  `;
5511
5592
  }
@@ -5586,7 +5667,7 @@ let q = class extends g {
5586
5667
  return this.inline ? this.renderInlineMode() : this.readonly ? this.renderReadonlyMode() : this.renderStandardMode();
5587
5668
  }
5588
5669
  };
5589
- q.styles = [...g.styles, At, cr];
5670
+ q.styles = [...g.styles, Pt, dr];
5590
5671
  st([
5591
5672
  f({ type: String })
5592
5673
  ], q.prototype, "icon", 2);
@@ -5605,7 +5686,7 @@ st([
5605
5686
  q = st([
5606
5687
  H("pc-stars")
5607
5688
  ], q);
5608
- const fr = R`
5689
+ const gr = R`
5609
5690
  /* Adjust stats text for reactions */
5610
5691
  .pc-stats-text {
5611
5692
  font-size: var(--pc-font-size-small, var(--default-font-size-small));
@@ -5868,11 +5949,11 @@ const fr = R`
5868
5949
  animation: none;
5869
5950
  }
5870
5951
  }
5871
- `, gr = "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='M480-480Zm0%20400q-83%200-156-31.5T197-197q-54-54-85.5-127T80-480q0-83%2031.5-156T197-763q54-54%20127-85.5T480-880q43%200%2083%208.5t77%2024.5v90q-35-20-75.5-31.5T480-800q-133%200-226.5%2093.5T160-480q0%20133%2093.5%20226.5T480-160q133%200%20226.5-93.5T800-480q0-32-6.5-62T776-600h86q9%2029%2013.5%2058.5T880-480q0%2083-31.5%20156T763-197q-54%2054-127%2085.5T480-80Zm320-600v-80h-80v-80h80v-80h80v80h80v80h-80v80h-80ZM620-520q25%200%2042.5-17.5T680-580q0-25-17.5-42.5T620-640q-25%200-42.5%2017.5T560-580q0%2025%2017.5%2042.5T620-520Zm-280%200q25%200%2042.5-17.5T400-580q0-25-17.5-42.5T340-640q-25%200-42.5%2017.5T280-580q0%2025%2017.5%2042.5T340-520Zm140%20260q68%200%20123.5-38.5T684-400H276q25%2063%2080.5%20101.5T480-260Z'/%3e%3c/svg%3e";
5872
- var mr = Object.defineProperty, vr = Object.getOwnPropertyDescriptor, Pt = (e, t, o, r) => {
5873
- for (var s = r > 1 ? void 0 : r ? vr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
5952
+ `, mr = "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='M480-480Zm0%20400q-83%200-156-31.5T197-197q-54-54-85.5-127T80-480q0-83%2031.5-156T197-763q54-54%20127-85.5T480-880q43%200%2083%208.5t77%2024.5v90q-35-20-75.5-31.5T480-800q-133%200-226.5%2093.5T160-480q0%20133%2093.5%20226.5T480-160q133%200%20226.5-93.5T800-480q0-32-6.5-62T776-600h86q9%2029%2013.5%2058.5T880-480q0%2083-31.5%20156T763-197q-54%2054-127%2085.5T480-80Zm320-600v-80h-80v-80h80v-80h80v80h80v80h-80v80h-80ZM620-520q25%200%2042.5-17.5T680-580q0-25-17.5-42.5T620-640q-25%200-42.5%2017.5T560-580q0%2025%2017.5%2042.5T620-520Zm-280%200q25%200%2042.5-17.5T400-580q0-25-17.5-42.5T340-640q-25%200-42.5%2017.5T280-580q0%2025%2017.5%2042.5T340-520Zm140%20260q68%200%20123.5-38.5T684-400H276q25%2063%2080.5%20101.5T480-260Z'/%3e%3c/svg%3e";
5953
+ var vr = Object.defineProperty, br = Object.getOwnPropertyDescriptor, Tt = (e, t, o, r) => {
5954
+ for (var s = r > 1 ? void 0 : r ? br(t, o) : t, i = e.length - 1, a; i >= 0; i--)
5874
5955
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
5875
- return r && s && mr(t, o, s), s;
5956
+ return r && s && vr(t, o, s), s;
5876
5957
  };
5877
5958
  let ot = class extends g {
5878
5959
  constructor() {
@@ -5898,7 +5979,7 @@ let ot = class extends g {
5898
5979
  * Renders the icon for a reaction
5899
5980
  */
5900
5981
  renderReactionIcon(e, t) {
5901
- const { icon: o, isRemoteImage: r } = Ct(e), s = Zt.FUNCTIONAL, i = t.tooltip || `${t.value} reaction`, a = Le(o, {
5982
+ const { icon: o, isRemoteImage: r } = kt(e), s = Wt.FUNCTIONAL, i = t.tooltip || `${t.value} reaction`, a = Ne(o, {
5902
5983
  type: s,
5903
5984
  alt: i,
5904
5985
  ariaLabel: i,
@@ -5952,7 +6033,7 @@ let ot = class extends g {
5952
6033
  aria-expanded="${this.displayController.shouldShowReactionPopover()}"
5953
6034
  aria-haspopup="true"
5954
6035
  >
5955
- <img src="${gr}" alt="" class="trigger-icon" />
6036
+ <img src="${mr}" alt="" class="trigger-icon" />
5956
6037
  </button>
5957
6038
  `;
5958
6039
  }
@@ -6114,31 +6195,31 @@ let ot = class extends g {
6114
6195
  return this.readonly ? this.renderReadonlyMode() : this.renderStandardMode();
6115
6196
  }
6116
6197
  };
6117
- ot.styles = [...g.styles, At, fr];
6118
- Pt([
6198
+ ot.styles = [...g.styles, Pt, gr];
6199
+ Tt([
6119
6200
  f({ type: Boolean, attribute: "show-counts" })
6120
6201
  ], ot.prototype, "showCounts", 2);
6121
- Pt([
6202
+ Tt([
6122
6203
  f({ type: Boolean, reflect: !0 })
6123
6204
  ], ot.prototype, "compact", 2);
6124
- Pt([
6205
+ Tt([
6125
6206
  f({ type: String, attribute: "popup-position" })
6126
6207
  ], ot.prototype, "popupPosition", 2);
6127
- ot = Pt([
6208
+ ot = Tt([
6128
6209
  H("pc-reaction")
6129
6210
  ], ot);
6130
6211
  function at(e, t, o = void 0) {
6131
6212
  const r = e.getAttribute(t);
6132
6213
  return r === null ? o : r == null ? void 0 : r.trim();
6133
6214
  }
6134
- function br(e, t = void 0) {
6215
+ function yr(e, t = void 0) {
6135
6216
  const o = e.textContent;
6136
6217
  return o === "" || o === null ? t : o == null ? void 0 : o.trim();
6137
6218
  }
6138
- var yr = Object.defineProperty, xr = Object.getOwnPropertyDescriptor, Tt = (e, t, o, r) => {
6139
- for (var s = r > 1 ? void 0 : r ? xr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
6219
+ var xr = Object.defineProperty, wr = Object.getOwnPropertyDescriptor, _t = (e, t, o, r) => {
6220
+ for (var s = r > 1 ? void 0 : r ? wr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
6140
6221
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
6141
- return r && s && yr(t, o, s), s;
6222
+ return r && s && xr(t, o, s), s;
6142
6223
  };
6143
6224
  let rt = class extends N {
6144
6225
  constructor() {
@@ -6201,16 +6282,16 @@ let rt = class extends N {
6201
6282
  const e = this.querySelector("pc-poll, pc-reaction");
6202
6283
  if (!e) return;
6203
6284
  const t = this.querySelectorAll("poll-catch-option");
6204
- let r = jo(this.options).map((s) => ({
6285
+ let r = Bo(this.options).map((s) => ({
6205
6286
  value: s,
6206
6287
  label: s,
6207
6288
  icon: e.tagName === "PC-REACTION" ? s : void 0
6208
6289
  // REACTION widget uses options for the icon
6209
6290
  }));
6210
6291
  t && t.length > 0 && (r = Array.from(t).map((s) => {
6211
- const i = at(s, "value", "") || "", a = at(s, "label", br(s, i)) || "", l = at(s, "icon", void 0), n = at(s, "tooltip", void 0), d = at(s, "disabled", void 0), p = { value: i, label: a };
6292
+ const i = at(s, "value", "") || "", a = at(s, "label", yr(s, i)) || "", l = at(s, "icon", void 0), n = at(s, "tooltip", void 0), d = at(s, "disabled", void 0), p = { value: i, label: a };
6212
6293
  if (l !== void 0) {
6213
- const h = Ct(l);
6294
+ const h = kt(l);
6214
6295
  p.icon = h.icon;
6215
6296
  }
6216
6297
  return n !== void 0 && (p.tooltip = n), d !== void 0 && (p.disabled = !0), p;
@@ -6236,16 +6317,16 @@ let rt = class extends N {
6236
6317
  }
6237
6318
  }
6238
6319
  };
6239
- Tt([
6320
+ _t([
6240
6321
  f({ type: String })
6241
6322
  ], rt.prototype, "type", 2);
6242
- Tt([
6323
+ _t([
6243
6324
  f({ type: String })
6244
6325
  ], rt.prototype, "options", 2);
6245
- Tt([
6326
+ _t([
6246
6327
  k()
6247
6328
  ], rt.prototype, "parsedOptions", 2);
6248
- rt = Tt([
6329
+ rt = _t([
6249
6330
  H("poll-catch")
6250
6331
  ], rt);
6251
6332
  export {