pollcatch 2.3.4 → 2.4.1

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 +594 -568
package/pc.js CHANGED
@@ -3,18 +3,18 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const yt = globalThis, Ht = yt.ShadowRoot && (yt.ShadyCSS === void 0 || yt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ft = Symbol(), Qt = /* @__PURE__ */ new WeakMap();
7
- let Se = class {
6
+ const wt = globalThis, Yt = wt.ShadowRoot && (wt.ShadyCSS === void 0 || wt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Kt = Symbol(), ee = /* @__PURE__ */ new WeakMap();
7
+ let Ee = class {
8
8
  constructor(t, o, r) {
9
- if (this._$cssResult$ = !0, r !== Ft) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
9
+ if (this._$cssResult$ = !0, r !== Kt) 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 (Ht && t === void 0) {
15
+ if (Yt && t === void 0) {
16
16
  const r = o !== void 0 && o.length === 1;
17
- r && (t = Qt.get(o)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && Qt.set(o, t));
17
+ r && (t = ee.get(o)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && ee.set(o, t));
18
18
  }
19
19
  return t;
20
20
  }
@@ -22,33 +22,33 @@ let Se = class {
22
22
  return this.cssText;
23
23
  }
24
24
  };
25
- const qe = (e) => new Se(typeof e == "string" ? e : e + "", void 0, Ft), R = (e, ...t) => {
25
+ const Fe = (e) => new Ee(typeof e == "string" ? e : e + "", void 0, Kt), U = (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 Se(o, e, Ft);
32
- }, He = (e, t) => {
33
- if (Ht) e.adoptedStyleSheets = t.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
31
+ return new Ee(o, e, Kt);
32
+ }, Ye = (e, t) => {
33
+ if (Yt) e.adoptedStyleSheets = t.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
34
34
  else for (const o of t) {
35
- const r = document.createElement("style"), s = yt.litNonce;
35
+ const r = document.createElement("style"), s = wt.litNonce;
36
36
  s !== void 0 && r.setAttribute("nonce", s), r.textContent = o.cssText, e.appendChild(r);
37
37
  }
38
- }, te = Ht ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
38
+ }, oe = Yt ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
39
39
  let o = "";
40
40
  for (const r of t.cssRules) o += r.cssText;
41
- return qe(o);
41
+ return Fe(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: Fe, defineProperty: Ye, getOwnPropertyDescriptor: Ke, getOwnPropertyNames: Ge, getOwnPropertySymbols: Ze, getPrototypeOf: We } = Object, V = globalThis, ee = V.trustedTypes, Xe = ee ? ee.emptyScript : "", It = V.reactiveElementPolyfillSupport, nt = (e, t) => e, wt = { toAttribute(e, t) {
48
+ const { is: Ke, defineProperty: We, getOwnPropertyDescriptor: Ge, getOwnPropertyNames: Ze, getOwnPropertySymbols: Je, getPrototypeOf: Xe } = Object, q = globalThis, re = q.trustedTypes, Qe = re ? re.emptyScript : "", Mt = q.reactiveElementPolyfillSupport, dt = (e, t) => e, St = { toAttribute(e, t) {
49
49
  switch (t) {
50
50
  case Boolean:
51
- e = e ? Xe : null;
51
+ e = e ? Qe : null;
52
52
  break;
53
53
  case Object:
54
54
  case Array:
@@ -73,23 +73,23 @@ const { is: Fe, defineProperty: Ye, getOwnPropertyDescriptor: Ke, getOwnProperty
73
73
  }
74
74
  }
75
75
  return o;
76
- } }, Yt = (e, t) => !Fe(e, t), oe = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged: Yt };
77
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), V.litPropertyMetadata ?? (V.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
- let Q = class extends HTMLElement {
76
+ } }, Wt = (e, t) => !Ke(e, t), se = { attribute: !0, type: String, converter: St, reflect: !1, hasChanged: Wt };
77
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), q.litPropertyMetadata ?? (q.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
+ let ot = class extends HTMLElement {
79
79
  static addInitializer(t) {
80
80
  this._$Ei(), (this.l ?? (this.l = [])).push(t);
81
81
  }
82
82
  static get observedAttributes() {
83
83
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
84
84
  }
85
- static createProperty(t, o = oe) {
85
+ static createProperty(t, o = se) {
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 && Ye(this.prototype, t, s);
88
+ s !== void 0 && We(this.prototype, t, s);
89
89
  }
90
90
  }
91
91
  static getPropertyDescriptor(t, o, r) {
92
- const { get: s, set: i } = Ke(this.prototype, t) ?? { get() {
92
+ const { get: s, set: i } = Ge(this.prototype, t) ?? { get() {
93
93
  return this[o];
94
94
  }, set(a) {
95
95
  this[o] = a;
@@ -102,17 +102,17 @@ let Q = class extends HTMLElement {
102
102
  }, configurable: !0, enumerable: !0 };
103
103
  }
104
104
  static getPropertyOptions(t) {
105
- return this.elementProperties.get(t) ?? oe;
105
+ return this.elementProperties.get(t) ?? se;
106
106
  }
107
107
  static _$Ei() {
108
- if (this.hasOwnProperty(nt("elementProperties"))) return;
109
- const t = We(this);
108
+ if (this.hasOwnProperty(dt("elementProperties"))) return;
109
+ const t = Xe(this);
110
110
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
111
111
  }
112
112
  static finalize() {
113
- if (this.hasOwnProperty(nt("finalized"))) return;
114
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(nt("properties"))) {
115
- const o = this.properties, r = [...Ge(o), ...Ze(o)];
113
+ if (this.hasOwnProperty(dt("finalized"))) return;
114
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(dt("properties"))) {
115
+ const o = this.properties, r = [...Ze(o), ...Je(o)];
116
116
  for (const s of r) this.createProperty(s, o[s]);
117
117
  }
118
118
  const t = this[Symbol.metadata];
@@ -131,8 +131,8 @@ let Q = class extends HTMLElement {
131
131
  const o = [];
132
132
  if (Array.isArray(t)) {
133
133
  const r = new Set(t.flat(1 / 0).reverse());
134
- for (const s of r) o.unshift(te(s));
135
- } else t !== void 0 && o.push(te(t));
134
+ for (const s of r) o.unshift(oe(s));
135
+ } else t !== void 0 && o.push(oe(t));
136
136
  return o;
137
137
  }
138
138
  static _$Eu(t, o) {
@@ -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 He(t, this.constructor.elementStyles), t;
164
+ return Ye(t, this.constructor.elementStyles), t;
165
165
  }
166
166
  connectedCallback() {
167
167
  var t;
@@ -186,7 +186,7 @@ let Q = class extends HTMLElement {
186
186
  var i;
187
187
  const r = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, r);
188
188
  if (s !== void 0 && r.reflect === !0) {
189
- const a = (((i = r.converter) == null ? void 0 : i.toAttribute) !== void 0 ? r.converter : wt).toAttribute(o, r.type);
189
+ const a = (((i = r.converter) == null ? void 0 : i.toAttribute) !== void 0 ? r.converter : St).toAttribute(o, r.type);
190
190
  this._$Em = t, a == null ? this.removeAttribute(s) : this.setAttribute(s, a), this._$Em = null;
191
191
  }
192
192
  }
@@ -194,13 +194,13 @@ let Q = class extends HTMLElement {
194
194
  var i;
195
195
  const r = this.constructor, s = r._$Eh.get(t);
196
196
  if (s !== void 0 && this._$Em !== s) {
197
- const a = r.getPropertyOptions(s), l = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((i = a.converter) == null ? void 0 : i.fromAttribute) !== void 0 ? a.converter : wt;
197
+ const a = r.getPropertyOptions(s), l = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((i = a.converter) == null ? void 0 : i.fromAttribute) !== void 0 ? a.converter : St;
198
198
  this._$Em = s, this[s] = l.fromAttribute(o, a.type), this._$Em = null;
199
199
  }
200
200
  }
201
201
  requestUpdate(t, o, r) {
202
202
  if (t !== void 0) {
203
- if (r ?? (r = this.constructor.getPropertyOptions(t)), !(r.hasChanged ?? Yt)(this[t], o)) return;
203
+ if (r ?? (r = this.constructor.getPropertyOptions(t)), !(r.hasChanged ?? Wt)(this[t], o)) return;
204
204
  this.P(t, o, r);
205
205
  }
206
206
  this.isUpdatePending === !1 && (this._$ES = this._$ET());
@@ -273,76 +273,76 @@ 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(), It == null || It({ ReactiveElement: Q }), (V.reactiveElementVersions ?? (V.reactiveElementVersions = [])).push("2.0.4");
276
+ ot.elementStyles = [], ot.shadowRootOptions = { mode: "open" }, ot[dt("elementProperties")] = /* @__PURE__ */ new Map(), ot[dt("finalized")] = /* @__PURE__ */ new Map(), Mt == null || Mt({ ReactiveElement: ot }), (q.reactiveElementVersions ?? (q.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, re = $t ? $t.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Ce = "$lit$", B = `lit$${Math.random().toFixed(9).slice(2)}$`, ke = "?" + B, Je = `<${ke}>`, G = document, dt = () => G.createComment(""), pt = (e) => e === null || typeof e != "object" && typeof e != "function", Kt = Array.isArray, Qe = (e) => Kt(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", zt = `[
283
- \f\r]`, it = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, se = /-->/g, ie = />/g, Y = RegExp(`>|${zt}(?:([^\\s"'>=/]+)(${zt}*=${zt}*(?:[^
284
- \f\r"'\`<>=]|("|')|))|$)`, "g"), ae = /'/g, ne = /"/g, Ee = /^(?:script|style|textarea|title)$/i, to = (e) => (t, ...o) => ({ _$litType$: e, strings: t, values: o }), c = to(1), U = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), le = /* @__PURE__ */ new WeakMap(), K = G.createTreeWalker(G, 129);
285
- function Ae(e, t) {
286
- if (!Kt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
287
- return re !== void 0 ? re.createHTML(t) : t;
282
+ const pt = globalThis, Ct = pt.trustedTypes, ie = Ct ? Ct.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Ae = "$lit$", j = `lit$${Math.random().toFixed(9).slice(2)}$`, Pe = "?" + j, to = `<${Pe}>`, J = document, ht = () => J.createComment(""), ft = (e) => e === null || typeof e != "object" && typeof e != "function", Gt = Array.isArray, eo = (e) => Gt(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", Lt = `[
283
+ \f\r]`, lt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ae = /-->/g, ne = />/g, G = RegExp(`>|${Lt}(?:([^\\s"'>=/]+)(${Lt}*=${Lt}*(?:[^
284
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), le = /'/g, ce = /"/g, Te = /^(?:script|style|textarea|title)$/i, oo = (e) => (t, ...o) => ({ _$litType$: e, strings: t, values: o }), c = oo(1), H = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), de = /* @__PURE__ */ new WeakMap(), Z = J.createTreeWalker(J, 129);
285
+ function _e(e, t) {
286
+ if (!Gt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
287
+ return ie !== void 0 ? ie.createHTML(t) : t;
288
288
  }
289
- const eo = (e, t) => {
289
+ const ro = (e, t) => {
290
290
  const o = e.length - 1, r = [];
291
- let s, i = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = it;
291
+ let s, i = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = lt;
292
292
  for (let l = 0; l < o; l++) {
293
293
  const n = e[l];
294
294
  let d, p, h = -1, b = 0;
295
- for (; b < n.length && (a.lastIndex = b, p = a.exec(n), p !== null); ) b = a.lastIndex, a === it ? p[1] === "!--" ? a = se : p[1] !== void 0 ? a = ie : p[2] !== void 0 ? (Ee.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] === '"' ? ne : ae) : a === ne || a === ae ? a = Y : a === se || a === ie ? a = it : (a = Y, s = void 0);
296
- const x = a === Y && e[l + 1].startsWith("/>") ? " " : "";
297
- i += a === it ? n + Je : h >= 0 ? (r.push(d), n.slice(0, h) + Ce + n.slice(h) + B + x) : n + B + (h === -2 ? l : x);
295
+ for (; b < n.length && (a.lastIndex = b, p = a.exec(n), p !== null); ) b = a.lastIndex, a === lt ? p[1] === "!--" ? a = ae : p[1] !== void 0 ? a = ne : p[2] !== void 0 ? (Te.test(p[2]) && (s = RegExp("</" + p[2], "g")), a = G) : p[3] !== void 0 && (a = G) : a === G ? p[0] === ">" ? (a = s ?? lt, h = -1) : p[1] === void 0 ? h = -2 : (h = a.lastIndex - p[2].length, d = p[1], a = p[3] === void 0 ? G : p[3] === '"' ? ce : le) : a === ce || a === le ? a = G : a === ae || a === ne ? a = lt : (a = G, s = void 0);
296
+ const x = a === G && e[l + 1].startsWith("/>") ? " " : "";
297
+ i += a === lt ? n + to : h >= 0 ? (r.push(d), n.slice(0, h) + Ae + n.slice(h) + j + x) : n + j + (h === -2 ? l : x);
298
298
  }
299
- return [Ae(e, i + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
299
+ return [_e(e, i + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
300
300
  };
301
- let qt = class Pe {
301
+ let Ft = class Oe {
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] = eo(t, o);
307
- if (this.el = Pe.createElement(d, r), K.currentNode = this.el.content, o === 2 || o === 3) {
306
+ const l = t.length - 1, n = this.parts, [d, p] = ro(t, o);
307
+ if (this.el = Oe.createElement(d, r), Z.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 = K.nextNode()) !== null && n.length < l; ) {
311
+ for (; (s = Z.nextNode()) !== null && n.length < l; ) {
312
312
  if (s.nodeType === 1) {
313
- if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(Ce)) {
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] === "." ? ro : E[1] === "?" ? so : E[1] === "@" ? io : Et }), s.removeAttribute(h);
316
- } else h.startsWith(B) && (n.push({ type: 6, index: i }), s.removeAttribute(h));
317
- if (Ee.test(s.tagName)) {
318
- const h = s.textContent.split(B), b = h.length - 1;
313
+ if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(Ae)) {
314
+ const b = p[a++], x = s.getAttribute(h).split(j), E = /([.?@])?(.*)/.exec(b);
315
+ n.push({ type: 1, index: i, name: E[2], strings: x, ctor: E[1] === "." ? io : E[1] === "?" ? ao : E[1] === "@" ? no : Pt }), s.removeAttribute(h);
316
+ } else h.startsWith(j) && (n.push({ type: 6, index: i }), s.removeAttribute(h));
317
+ if (Te.test(s.tagName)) {
318
+ const h = s.textContent.split(j), b = h.length - 1;
319
319
  if (b > 0) {
320
- s.textContent = $t ? $t.emptyScript : "";
321
- for (let x = 0; x < b; x++) s.append(h[x], dt()), K.nextNode(), n.push({ type: 2, index: ++i });
322
- s.append(h[b], dt());
320
+ s.textContent = Ct ? Ct.emptyScript : "";
321
+ for (let x = 0; x < b; x++) s.append(h[x], ht()), Z.nextNode(), n.push({ type: 2, index: ++i });
322
+ s.append(h[b], ht());
323
323
  }
324
324
  }
325
- } else if (s.nodeType === 8) if (s.data === ke) n.push({ type: 2, index: i });
325
+ } else if (s.nodeType === 8) if (s.data === Pe) n.push({ type: 2, index: i });
326
326
  else {
327
327
  let h = -1;
328
- for (; (h = s.data.indexOf(B, h + 1)) !== -1; ) n.push({ type: 7, index: i }), h += B.length - 1;
328
+ for (; (h = s.data.indexOf(j, h + 1)) !== -1; ) n.push({ type: 7, index: i }), h += j.length - 1;
329
329
  }
330
330
  i++;
331
331
  }
332
332
  }
333
333
  static createElement(t, o) {
334
- const r = G.createElement("template");
334
+ const r = J.createElement("template");
335
335
  return r.innerHTML = t, r;
336
336
  }
337
337
  };
338
- function et(e, t, o = e, r) {
338
+ function st(e, t, o = e, r) {
339
339
  var a, l;
340
- if (t === U) return t;
340
+ if (t === H) return t;
341
341
  let s = r !== void 0 ? (a = o._$Co) == null ? void 0 : a[r] : o._$Cl;
342
- const i = pt(t) ? void 0 : t._$litDirective$;
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;
342
+ const i = ft(t) ? void 0 : t._$litDirective$;
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 = st(e, s._$AS(e, t.values), s, r)), t;
344
344
  }
345
- let oo = class {
345
+ let so = class {
346
346
  constructor(t, o) {
347
347
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = o;
348
348
  }
@@ -353,24 +353,24 @@ let oo = class {
353
353
  return this._$AM._$AU;
354
354
  }
355
355
  u(t) {
356
- const { el: { content: o }, parts: r } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? G).importNode(o, !0);
357
- K.currentNode = s;
358
- let i = K.nextNode(), a = 0, l = 0, n = r[0];
356
+ const { el: { content: o }, parts: r } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? J).importNode(o, !0);
357
+ Z.currentNode = s;
358
+ let i = Z.nextNode(), a = 0, l = 0, n = r[0];
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 ao(i, this, t)), this._$AV.push(d), n = r[++l];
362
+ n.type === 2 ? d = new gt(i, i.nextSibling, this, t) : n.type === 1 ? d = new n.ctor(i, n.name, n.strings, this, t) : n.type === 6 && (d = new lo(i, this, t)), this._$AV.push(d), n = r[++l];
363
363
  }
364
- a !== (n == null ? void 0 : n.index) && (i = K.nextNode(), a++);
364
+ a !== (n == null ? void 0 : n.index) && (i = Z.nextNode(), a++);
365
365
  }
366
- return K.currentNode = G, s;
366
+ return Z.currentNode = J, s;
367
367
  }
368
368
  p(t) {
369
369
  let o = 0;
370
370
  for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(t, r, o), o += r.strings.length - 2) : r._$AI(t[o])), o++;
371
371
  }
372
372
  };
373
- class ut {
373
+ class gt {
374
374
  get _$AU() {
375
375
  var t;
376
376
  return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
@@ -390,7 +390,7 @@ class 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) : Qe(t) ? this.k(t) : this._(t);
393
+ t = st(this, t, o), ft(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== H && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : eo(t) ? this.k(t) : this._(t);
394
394
  }
395
395
  O(t) {
396
396
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -399,26 +399,26 @@ class ut {
399
399
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
400
400
  }
401
401
  _(t) {
402
- this._$AH !== u && pt(this._$AH) ? this._$AA.nextSibling.data = t : this.T(G.createTextNode(t)), this._$AH = t;
402
+ this._$AH !== u && ft(this._$AH) ? this._$AA.nextSibling.data = t : this.T(J.createTextNode(t)), this._$AH = t;
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 = qt.createElement(Ae(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 = Ft.createElement(_e(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 oo(s, this), l = a.u(this.options);
409
+ const a = new so(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
- let o = le.get(t.strings);
415
- return o === void 0 && le.set(t.strings, o = new qt(t)), o;
414
+ let o = de.get(t.strings);
415
+ return o === void 0 && de.set(t.strings, o = new Ft(t)), o;
416
416
  }
417
417
  k(t) {
418
- Kt(this._$AH) || (this._$AH = [], this._$AR());
418
+ Gt(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 ut(this.O(dt()), this.O(dt()), this, this.options)) : r = o[s], r._$AI(i), s++;
421
+ for (const i of t) s === o.length ? o.push(r = new gt(this.O(ht()), this.O(ht()), 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) {
@@ -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 Et {
436
+ class Pt {
437
437
  get tagName() {
438
438
  return this.element.tagName;
439
439
  }
@@ -446,11 +446,11 @@ class Et {
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 = et(this, t, o, 0), a = !pt(t) || t !== this._$AH && t !== U, a && (this._$AH = t);
449
+ if (i === void 0) t = st(this, t, o, 0), a = !ft(t) || t !== this._$AH && t !== H, a && (this._$AH = t);
450
450
  else {
451
451
  const l = t;
452
452
  let n, d;
453
- for (t = i[0], n = 0; n < i.length - 1; n++) d = et(this, l[r + n], o, n), d === U && (d = this._$AH[n]), a || (a = !pt(d) || d !== this._$AH[n]), d === u ? t = u : t !== u && (t += (d ?? "") + i[n + 1]), this._$AH[n] = d;
453
+ for (t = i[0], n = 0; n < i.length - 1; n++) d = st(this, l[r + n], o, n), d === H && (d = this._$AH[n]), a || (a = !ft(d) || d !== this._$AH[n]), d === u ? t = u : t !== u && (t += (d ?? "") + i[n + 1]), this._$AH[n] = d;
454
454
  }
455
455
  a && !s && this.j(t);
456
456
  }
@@ -458,7 +458,7 @@ class Et {
458
458
  t === u ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
459
459
  }
460
460
  }
461
- let ro = class extends Et {
461
+ let io = class extends Pt {
462
462
  constructor() {
463
463
  super(...arguments), this.type = 3;
464
464
  }
@@ -466,7 +466,7 @@ let ro = class extends Et {
466
466
  this.element[this.name] = t === u ? void 0 : t;
467
467
  }
468
468
  };
469
- class so extends Et {
469
+ class ao extends Pt {
470
470
  constructor() {
471
471
  super(...arguments), this.type = 4;
472
472
  }
@@ -474,12 +474,12 @@ class so extends Et {
474
474
  this.element.toggleAttribute(this.name, !!t && t !== u);
475
475
  }
476
476
  }
477
- class io extends Et {
477
+ class no extends Pt {
478
478
  constructor(t, o, r, s, i) {
479
479
  super(t, o, r, s, i), this.type = 5;
480
480
  }
481
481
  _$AI(t, o = this) {
482
- if ((t = et(this, t, o, 0) ?? u) === U) return;
482
+ if ((t = st(this, t, o, 0) ?? u) === H) return;
483
483
  const r = this._$AH, s = t === u && r !== u || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, i = t !== u && (r === u || s);
484
484
  s && this.element.removeEventListener(this.name, this, r), i && this.element.addEventListener(this.name, this, t), this._$AH = t;
485
485
  }
@@ -488,7 +488,7 @@ class io extends Et {
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 ao {
491
+ class lo {
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
  }
@@ -496,17 +496,17 @@ class ao {
496
496
  return this._$AM._$AU;
497
497
  }
498
498
  _$AI(t) {
499
- et(this, t);
499
+ st(this, t);
500
500
  }
501
501
  }
502
- const Mt = lt.litHtmlPolyfillSupport;
503
- Mt == null || Mt(qt, ut), (lt.litHtmlVersions ?? (lt.litHtmlVersions = [])).push("3.2.1");
504
- const no = (e, t, o) => {
502
+ const Nt = pt.litHtmlPolyfillSupport;
503
+ Nt == null || Nt(Ft, gt), (pt.litHtmlVersions ?? (pt.litHtmlVersions = [])).push("3.2.1");
504
+ const co = (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 ut(t.insertBefore(dt(), i), i, void 0, o ?? {});
509
+ r._$litPart$ = s = new gt(t.insertBefore(ht(), i), i, void 0, o ?? {});
510
510
  }
511
511
  return s._$AI(e), s;
512
512
  };
@@ -515,7 +515,7 @@ const no = (e, t, o) => {
515
515
  * Copyright 2017 Google LLC
516
516
  * SPDX-License-Identifier: BSD-3-Clause
517
517
  */
518
- let N = class extends Q {
518
+ let R = class extends ot {
519
519
  constructor() {
520
520
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
521
521
  }
@@ -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 = no(o, this.renderRoot, this.renderOptions);
529
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = co(o, this.renderRoot, this.renderOptions);
530
530
  }
531
531
  connectedCallback() {
532
532
  var t;
@@ -537,20 +537,20 @@ let N = class extends Q {
537
537
  super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
538
538
  }
539
539
  render() {
540
- return U;
540
+ return H;
541
541
  }
542
542
  };
543
- var $e;
544
- N._$litElement$ = !0, N.finalized = !0, ($e = globalThis.litElementHydrateSupport) == null || $e.call(globalThis, { LitElement: N });
545
- const Lt = globalThis.litElementPolyfillSupport;
546
- Lt == null || Lt({ LitElement: N });
543
+ var ke;
544
+ R._$litElement$ = !0, R.finalized = !0, (ke = globalThis.litElementHydrateSupport) == null || ke.call(globalThis, { LitElement: R });
545
+ const Dt = globalThis.litElementPolyfillSupport;
546
+ Dt == null || Dt({ LitElement: R });
547
547
  (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
548
548
  /**
549
549
  * @license
550
550
  * Copyright 2017 Google LLC
551
551
  * SPDX-License-Identifier: BSD-3-Clause
552
552
  */
553
- const H = (e) => (t, o) => {
553
+ const Y = (e) => (t, o) => {
554
554
  o !== void 0 ? o.addInitializer(() => {
555
555
  customElements.define(e, t);
556
556
  }) : customElements.define(e, t);
@@ -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 lo = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged: Yt }, co = (e = lo, t, o) => {
563
+ const po = { attribute: !0, type: String, converter: St, reflect: !1, hasChanged: Wt }, uo = (e = po, 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 lo = { 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" ? co(e, t, o) : ((r, s, i) => {
585
+ return (t, o) => typeof o == "object" ? uo(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,25 +600,25 @@ function k(e) {
600
600
  * Copyright 2017 Google LLC
601
601
  * SPDX-License-Identifier: BSD-3-Clause
602
602
  */
603
- const po = (e, t, o) => (o.configurable = !0, o.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, o), o);
603
+ const ho = (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
607
607
  * SPDX-License-Identifier: BSD-3-Clause
608
608
  */
609
- function ht(e, t) {
609
+ function mt(e, t) {
610
610
  return (o, r, s) => {
611
611
  const i = (a) => {
612
612
  var l;
613
613
  return ((l = a.renderRoot) == null ? void 0 : l.querySelector(e)) ?? null;
614
614
  };
615
- return po(o, r, { get() {
615
+ return ho(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 Gt = c`
621
+ const Zt = c`
622
622
  <svg
623
623
  xmlns="http://www.w3.org/2000/svg"
624
624
  height="24px"
@@ -628,7 +628,7 @@ const Gt = c`
628
628
  >
629
629
  <path d="M640-160v-280h160v280H640Zm-240 0v-640h160v640H400Zm-240 0v-440h160v440H160Z" />
630
630
  </svg>
631
- `, Zt = c`
631
+ `, Jt = c`
632
632
  <svg
633
633
  xmlns="http://www.w3.org/2000/svg"
634
634
  height="24px"
@@ -640,7 +640,7 @@ const Gt = 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
- `, St = c`
643
+ `, kt = c`
644
644
  <svg
645
645
  xmlns="http://www.w3.org/2000/svg"
646
646
  height="24px"
@@ -652,7 +652,7 @@ const Gt = 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
- `, At = c`
655
+ `, Tt = c`
656
656
  <svg
657
657
  xmlns="http://www.w3.org/2000/svg"
658
658
  width="16"
@@ -664,7 +664,7 @@ const Gt = 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
- `, Te = c`
667
+ `, Ie = c`
668
668
  <svg
669
669
  xmlns="http://www.w3.org/2000/svg"
670
670
  height="24px"
@@ -675,156 +675,156 @@ const Gt = c`
675
675
  <path d="M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z" />
676
676
  </svg>
677
677
  `;
678
- var uo = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, z = function(e) {
678
+ var fo = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, L = function(e) {
679
679
  return typeof e == "string" ? e.length > 0 : typeof e == "number";
680
680
  }, $ = function(e, t, o) {
681
681
  return t === void 0 && (t = 0), o === void 0 && (o = Math.pow(10, t)), Math.round(o * e) / o + 0;
682
- }, A = function(e, t, o) {
682
+ }, P = function(e, t, o) {
683
683
  return t === void 0 && (t = 0), o === void 0 && (o = 1), e > o ? o : e > t ? e : t;
684
- }, _e = function(e) {
684
+ }, ze = function(e) {
685
685
  return (e = isFinite(e) ? e % 360 : 0) > 0 ? e : e + 360;
686
- }, ce = function(e) {
687
- return { r: A(e.r, 0, 255), g: A(e.g, 0, 255), b: A(e.b, 0, 255), a: A(e.a) };
688
- }, Nt = function(e) {
686
+ }, pe = function(e) {
687
+ return { r: P(e.r, 0, 255), g: P(e.g, 0, 255), b: P(e.b, 0, 255), a: P(e.a) };
688
+ }, Rt = function(e) {
689
689
  return { r: $(e.r), g: $(e.g), b: $(e.b), a: $(e.a, 3) };
690
- }, ho = /^#([0-9a-f]{3,8})$/i, vt = function(e) {
690
+ }, go = /^#([0-9a-f]{3,8})$/i, yt = function(e) {
691
691
  var t = e.toString(16);
692
692
  return t.length < 2 ? "0" + t : t;
693
- }, Oe = function(e) {
693
+ }, Me = function(e) {
694
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;
695
695
  return { h: 60 * (l < 0 ? l + 6 : l), s: i ? a / i * 100 : 0, v: i / 255 * 100, a: s };
696
- }, Ie = function(e) {
696
+ }, Le = function(e) {
697
697
  var t = e.h, o = e.s, r = e.v, s = e.a;
698
698
  t = t / 360 * 6, o /= 100, r /= 100;
699
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;
700
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 };
701
- }, de = function(e) {
702
- return { h: _e(e.h), s: A(e.s, 0, 100), l: A(e.l, 0, 100), a: A(e.a) };
703
- }, pe = function(e) {
704
- return { h: $(e.h), s: $(e.s), l: $(e.l), a: $(e.a, 3) };
705
701
  }, ue = function(e) {
706
- return Ie((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 }));
702
+ return { h: ze(e.h), s: P(e.s, 0, 100), l: P(e.l, 0, 100), a: P(e.a) };
703
+ }, he = function(e) {
704
+ return { h: $(e.h), s: $(e.s), l: $(e.l), a: $(e.a, 3) };
705
+ }, fe = function(e) {
706
+ return Le((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 }));
707
707
  var t, o, r;
708
- }, ct = function(e) {
709
- return { h: (t = Oe(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 };
708
+ }, ut = function(e) {
709
+ return { h: (t = Me(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 };
710
710
  var t, o, r, s;
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, he = { string: [[function(e) {
712
- var t = ho.exec(e);
711
+ }, mo = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, vo = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, bo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, yo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, ge = { string: [[function(e) {
712
+ var t = go.exec(e);
713
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;
714
714
  }, "hex"], [function(e) {
715
- var t = mo.exec(e) || vo.exec(e);
716
- return t ? t[2] !== t[4] || t[4] !== t[6] ? null : ce({ 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;
715
+ var t = bo.exec(e) || yo.exec(e);
716
+ return t ? t[2] !== t[4] || t[4] !== t[6] ? null : pe({ 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;
717
717
  }, "rgb"], [function(e) {
718
- var t = fo.exec(e) || go.exec(e);
718
+ var t = mo.exec(e) || vo.exec(e);
719
719
  if (!t) return null;
720
- var o, r, s = de({ 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) });
721
- return ue(s);
720
+ var o, r, s = ue({ h: (o = t[1], r = t[2], r === void 0 && (r = "deg"), Number(o) * (fo[r] || 1)), s: Number(t[3]), l: Number(t[4]), a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1) });
721
+ return fe(s);
722
722
  }, "hsl"]], object: [[function(e) {
723
723
  var t = e.r, o = e.g, r = e.b, s = e.a, i = s === void 0 ? 1 : s;
724
- return z(t) && z(o) && z(r) ? ce({ r: Number(t), g: Number(o), b: Number(r), a: Number(i) }) : null;
724
+ return L(t) && L(o) && L(r) ? pe({ r: Number(t), g: Number(o), b: Number(r), a: Number(i) }) : null;
725
725
  }, "rgb"], [function(e) {
726
726
  var t = e.h, o = e.s, r = e.l, s = e.a, i = s === void 0 ? 1 : s;
727
- if (!z(t) || !z(o) || !z(r)) return null;
728
- var a = de({ h: Number(t), s: Number(o), l: Number(r), a: Number(i) });
729
- return ue(a);
727
+ if (!L(t) || !L(o) || !L(r)) return null;
728
+ var a = ue({ h: Number(t), s: Number(o), l: Number(r), a: Number(i) });
729
+ return fe(a);
730
730
  }, "hsl"], [function(e) {
731
731
  var t = e.h, o = e.s, r = e.v, s = e.a, i = s === void 0 ? 1 : s;
732
- if (!z(t) || !z(o) || !z(r)) return null;
732
+ if (!L(t) || !L(o) || !L(r)) return null;
733
733
  var a = function(l) {
734
- return { h: _e(l.h), s: A(l.s, 0, 100), v: A(l.v, 0, 100), a: A(l.a) };
734
+ return { h: ze(l.h), s: P(l.s, 0, 100), v: P(l.v, 0, 100), a: P(l.a) };
735
735
  }({ h: Number(t), s: Number(o), v: Number(r), a: Number(i) });
736
- return Ie(a);
737
- }, "hsv"]] }, fe = function(e, t) {
736
+ return Le(a);
737
+ }, "hsv"]] }, me = function(e, t) {
738
738
  for (var o = 0; o < t.length; o++) {
739
739
  var r = t[o][0](e);
740
740
  if (r) return [r, t[o][1]];
741
741
  }
742
742
  return [null, void 0];
743
- }, bo = function(e) {
744
- return typeof e == "string" ? fe(e.trim(), he.string) : typeof e == "object" && e !== null ? fe(e, he.object) : [null, void 0];
745
- }, Dt = function(e, t) {
746
- var o = ct(e);
747
- return { h: o.h, s: A(o.s + 100 * t, 0, 100), l: o.l, a: o.a };
748
- }, Rt = function(e) {
743
+ }, xo = function(e) {
744
+ return typeof e == "string" ? me(e.trim(), ge.string) : typeof e == "object" && e !== null ? me(e, ge.object) : [null, void 0];
745
+ }, Bt = function(e, t) {
746
+ var o = ut(e);
747
+ return { h: o.h, s: P(o.s + 100 * t, 0, 100), l: o.l, a: o.a };
748
+ }, Ut = function(e) {
749
749
  return (299 * e.r + 587 * e.g + 114 * e.b) / 1e3 / 255;
750
- }, ge = function(e, t) {
751
- var o = ct(e);
752
- return { h: o.h, s: o.s, l: A(o.l + 100 * t, 0, 100), a: o.a };
753
- }, me = function() {
750
+ }, ve = function(e, t) {
751
+ var o = ut(e);
752
+ return { h: o.h, s: o.s, l: P(o.l + 100 * t, 0, 100), a: o.a };
753
+ }, be = function() {
754
754
  function e(t) {
755
- this.parsed = bo(t)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
755
+ this.parsed = xo(t)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
756
756
  }
757
757
  return e.prototype.isValid = function() {
758
758
  return this.parsed !== null;
759
759
  }, e.prototype.brightness = function() {
760
- return $(Rt(this.rgba), 2);
760
+ return $(Ut(this.rgba), 2);
761
761
  }, e.prototype.isDark = function() {
762
- return Rt(this.rgba) < 0.5;
762
+ return Ut(this.rgba) < 0.5;
763
763
  }, e.prototype.isLight = function() {
764
- return Rt(this.rgba) >= 0.5;
764
+ return Ut(this.rgba) >= 0.5;
765
765
  }, e.prototype.toHex = function() {
766
- return t = Nt(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 = Rt(this.rgba), o = t.r, r = t.g, s = t.b, a = (i = t.a) < 1 ? yt($(255 * i)) : "", "#" + yt(o) + yt(r) + yt(s) + a;
767
767
  var t, o, r, s, i, a;
768
768
  }, e.prototype.toRgb = function() {
769
- return Nt(this.rgba);
769
+ return Rt(this.rgba);
770
770
  }, e.prototype.toRgbString = function() {
771
- return t = Nt(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 = Rt(this.rgba), o = t.r, r = t.g, s = t.b, (i = t.a) < 1 ? "rgba(" + o + ", " + r + ", " + s + ", " + i + ")" : "rgb(" + o + ", " + r + ", " + s + ")";
772
772
  var t, o, r, s, i;
773
773
  }, e.prototype.toHsl = function() {
774
- return pe(ct(this.rgba));
774
+ return he(ut(this.rgba));
775
775
  }, e.prototype.toHslString = function() {
776
- return t = pe(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 + "%)";
776
+ return t = he(ut(this.rgba)), o = t.h, r = t.s, s = t.l, (i = t.a) < 1 ? "hsla(" + o + ", " + r + "%, " + s + "%, " + i + ")" : "hsl(" + o + ", " + r + "%, " + s + "%)";
777
777
  var t, o, r, s, i;
778
778
  }, e.prototype.toHsv = function() {
779
- return t = Oe(this.rgba), { h: $(t.h), s: $(t.s), v: $(t.v), a: $(t.a, 3) };
779
+ return t = Me(this.rgba), { h: $(t.h), s: $(t.s), v: $(t.v), a: $(t.a, 3) };
780
780
  var t;
781
781
  }, e.prototype.invert = function() {
782
782
  return T({ r: 255 - (t = this.rgba).r, g: 255 - t.g, b: 255 - t.b, a: t.a });
783
783
  var t;
784
784
  }, e.prototype.saturate = function(t) {
785
- return t === void 0 && (t = 0.1), T(Dt(this.rgba, t));
785
+ return t === void 0 && (t = 0.1), T(Bt(this.rgba, t));
786
786
  }, e.prototype.desaturate = function(t) {
787
- return t === void 0 && (t = 0.1), T(Dt(this.rgba, -t));
787
+ return t === void 0 && (t = 0.1), T(Bt(this.rgba, -t));
788
788
  }, e.prototype.grayscale = function() {
789
- return T(Dt(this.rgba, -1));
789
+ return T(Bt(this.rgba, -1));
790
790
  }, e.prototype.lighten = function(t) {
791
- return t === void 0 && (t = 0.1), T(ge(this.rgba, t));
791
+ return t === void 0 && (t = 0.1), T(ve(this.rgba, t));
792
792
  }, e.prototype.darken = function(t) {
793
- return t === void 0 && (t = 0.1), T(ge(this.rgba, -t));
793
+ return t === void 0 && (t = 0.1), T(ve(this.rgba, -t));
794
794
  }, e.prototype.rotate = function(t) {
795
795
  return t === void 0 && (t = 15), this.hue(this.hue() + t);
796
796
  }, e.prototype.alpha = function(t) {
797
797
  return typeof t == "number" ? T({ r: (o = this.rgba).r, g: o.g, b: o.b, a: t }) : $(this.rgba.a, 3);
798
798
  var o;
799
799
  }, e.prototype.hue = function(t) {
800
- var o = ct(this.rgba);
800
+ var o = ut(this.rgba);
801
801
  return typeof t == "number" ? T({ h: t, s: o.s, l: o.l, a: o.a }) : $(o.h);
802
802
  }, e.prototype.isEqual = function(t) {
803
803
  return this.toHex() === T(t).toHex();
804
804
  }, e;
805
805
  }(), T = function(e) {
806
- return e instanceof me ? e : new me(e);
806
+ return e instanceof be ? e : new be(e);
807
807
  };
808
- const jt = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
809
- function yo(e) {
808
+ const Vt = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
809
+ function wo(e) {
810
810
  return {
811
811
  debug: (t, ...o) => {
812
- jt && console.debug(`[${e}]`, t, ...o);
812
+ Vt && console.debug(`[${e}]`, t, ...o);
813
813
  },
814
814
  info: (t, ...o) => {
815
- jt && console.info(`[${e}]`, t, ...o);
815
+ Vt && console.info(`[${e}]`, t, ...o);
816
816
  },
817
817
  warn: (t, ...o) => {
818
- jt && console.warn(`[${e}]`, t, ...o);
818
+ Vt && console.warn(`[${e}]`, t, ...o);
819
819
  },
820
820
  error: (t, ...o) => {
821
821
  console.error(`[${e}]`, t, ...o);
822
822
  }
823
823
  };
824
824
  }
825
- const m = yo("Pollcatch");
826
- var ze = /* @__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))(ze || {});
827
- const xo = {
825
+ const m = wo("Pollcatch");
826
+ var Ne = /* @__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))(Ne || {});
827
+ const $o = {
828
828
  black: "#000000",
829
829
  white: "#ffffff",
830
830
  red: "#ff0000",
@@ -841,19 +841,19 @@ const xo = {
841
841
  teal: "#008080",
842
842
  navy: "#000080"
843
843
  };
844
- function wo(e) {
844
+ function So(e) {
845
845
  const t = e.toLowerCase().trim();
846
- return xo[t] || null;
846
+ return $o[t] || null;
847
847
  }
848
- function Bt(e, t) {
849
- const o = ve(e), r = ve(t), s = Math.max(o, r), i = Math.min(o, r);
848
+ function jt(e, t) {
849
+ const o = ye(e), r = ye(t), s = Math.max(o, r), i = Math.min(o, r);
850
850
  return (s + 0.05) / (i + 0.05);
851
851
  }
852
- function ve(e) {
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);
852
+ function ye(e) {
853
+ const t = ko(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);
854
854
  return 0.2126 * i + 0.7152 * a + 0.0722 * l;
855
855
  }
856
- function $o(e, t = {}) {
856
+ function Co(e, t = {}) {
857
857
  if (!T(e).isValid())
858
858
  return m.warn(`Invalid color provided: ${e}`), "black";
859
859
  const {
@@ -867,15 +867,15 @@ function $o(e, t = {}) {
867
867
  } = t, l = s.map((p) => p === "black" ? "#000000" : p === "white" ? "#ffffff" : p === "light" ? i.light || "#f8f9fa" : p === "dark" ? i.dark || "#343a40" : p);
868
868
  let n = a, d = 0;
869
869
  for (const p of l) {
870
- const h = Bt(e, p);
870
+ const h = jt(e, p);
871
871
  h >= r && h > d && (d = h, n = p);
872
872
  }
873
873
  if (d === 0) {
874
- const p = Bt(e, a);
874
+ const p = jt(e, a);
875
875
  n = a, d = p;
876
876
  for (const h of l) {
877
877
  if (h === a) continue;
878
- const b = Bt(e, h);
878
+ const b = jt(e, h);
879
879
  b > d && (d = b, n = h);
880
880
  }
881
881
  m.warn(
@@ -884,8 +884,8 @@ function $o(e, t = {}) {
884
884
  }
885
885
  return n;
886
886
  }
887
- function So(e) {
888
- const o = wo(e) || e, r = T(o);
887
+ function ko(e) {
888
+ const o = So(e) || e, r = T(o);
889
889
  if (!r.isValid())
890
890
  return m.warn(`Invalid color provided: ${e}`), { r: 0, g: 0, b: 0 };
891
891
  const { r: s, g: i, b: a } = r.toRgb();
@@ -903,7 +903,7 @@ function O(e, t) {
903
903
  }[t] : void 0;
904
904
  return e === "left" || e === "right" ? r || "center" : e === "top" || e === "bottom" ? r || "start" : r || "center";
905
905
  }
906
- function Vt(e, t = "1rem", o = 1) {
906
+ function qt(e, t = "1rem", o = 1) {
907
907
  if (!e) return t;
908
908
  const r = {
909
909
  xs: 0.7,
@@ -922,7 +922,7 @@ function Vt(e, t = "1rem", o = 1) {
922
922
  const l = parseFloat(i);
923
923
  return isNaN(l) ? t : `${l}rem`;
924
924
  }
925
- function Co(e, t = "4px") {
925
+ function Eo(e, t = "4px") {
926
926
  if (!e) return t;
927
927
  const o = {
928
928
  xs: "2px",
@@ -942,8 +942,8 @@ function Co(e, t = "4px") {
942
942
  const a = parseFloat(s);
943
943
  return isNaN(a) ? t : `${a}px`;
944
944
  }
945
- var M = /* @__PURE__ */ ((e) => (e.BUTTON = "button", e.CHECKBOX = "checkbox", e.RADIO = "radio", e.RADIOGROUP = "radiogroup", e.SWITCH = "switch", e.TAB = "tab", e.TABLIST = "tablist", e.TABPANEL = "tabpanel", e.MENU = "menu", e.MENUITEM = "menuitem", e.MENUITEMCHECKBOX = "menuitemcheckbox", e.MENUITEMRADIO = "menuitemradio", e.SLIDER = "slider", e.TEXTBOX = "textbox", e.COMBOBOX = "combobox", e.LISTBOX = "listbox", e.OPTION = "option", e.PROGRESSBAR = "progressbar", e.STATUS = "status", e.ALERT = "alert", e.DIALOG = "dialog", e.GROUP = "group", e.REGION = "region", e.NONE = "none", e.PRESENTATION = "presentation", e))(M || {});
946
- function tt(e) {
945
+ var N = /* @__PURE__ */ ((e) => (e.BUTTON = "button", e.CHECKBOX = "checkbox", e.RADIO = "radio", e.RADIOGROUP = "radiogroup", e.SWITCH = "switch", e.TAB = "tab", e.TABLIST = "tablist", e.TABPANEL = "tabpanel", e.MENU = "menu", e.MENUITEM = "menuitem", e.MENUITEMCHECKBOX = "menuitemcheckbox", e.MENUITEMRADIO = "menuitemradio", e.SLIDER = "slider", e.TEXTBOX = "textbox", e.COMBOBOX = "combobox", e.LISTBOX = "listbox", e.OPTION = "option", e.PROGRESSBAR = "progressbar", e.STATUS = "status", e.ALERT = "alert", e.DIALOG = "dialog", e.GROUP = "group", e.REGION = "region", e.NONE = "none", e.PRESENTATION = "presentation", e))(N || {});
946
+ function rt(e) {
947
947
  const t = {};
948
948
  e.role !== void 0 && (t.role = e.role);
949
949
  for (const [o, r] of Object.entries(e)) {
@@ -953,54 +953,54 @@ function tt(e) {
953
953
  }
954
954
  return t;
955
955
  }
956
- function ko(e, t, o) {
957
- return tt({
956
+ function Ao(e, t, o) {
957
+ return rt({
958
958
  role: "button",
959
959
  ariaLabel: e,
960
960
  ariaPressed: t,
961
961
  ariaDisabled: o
962
962
  });
963
963
  }
964
- function Eo(e, t, o, r = !1) {
965
- return tt({
964
+ function Po(e, t, o, r = !1) {
965
+ return rt({
966
966
  role: r ? "radio" : "checkbox",
967
967
  ariaLabel: e,
968
968
  ariaChecked: t,
969
969
  ariaDisabled: o
970
970
  });
971
971
  }
972
- function Ut(e, t, o) {
972
+ function Ht(e, t, o) {
973
973
  typeof o == "boolean" ? e.setAttribute(t, o ? "true" : "false") : e.setAttribute(t, o);
974
974
  }
975
- function Ao(e) {
975
+ function To(e) {
976
976
  if (typeof e != "string")
977
977
  return !1;
978
978
  const t = e.replace(/[<>"']/g, "").trim();
979
979
  return /^(#[0-9a-fA-F]{3,8}|rgb\([^)]+\)|rgba\([^)]+\)|hsl\([^)]+\)|hsla\([^)]+\)|[a-zA-Z]+)$/.test(t);
980
980
  }
981
- function J(e) {
982
- return Ao(e) ? e.replace(/[<>"']/g, "").trim() : (m.warn("Invalid color value:", e), "#000000");
981
+ function et(e) {
982
+ return To(e) ? e.replace(/[<>"']/g, "").trim() : (m.warn("Invalid color value:", e), "#000000");
983
983
  }
984
- function Po(e) {
984
+ function _o(e) {
985
985
  if (typeof e != "string")
986
986
  return m.warn("Non-string value passed to sanitizeCSS:", typeof e), "";
987
987
  let t = e;
988
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;
989
989
  }
990
- function To(e) {
990
+ function Oo(e) {
991
991
  return typeof e != "string" || !e.trim() ? "" : e.replace(
992
992
  /([^{}:;]+):\s*([^;{}!]+)(\s*!important)?\s*(;|})/gi,
993
993
  (t, o, r, s, i) => s ? t : `${o}: ${r.trim()} !important${i}`
994
994
  );
995
995
  }
996
- const be = "https://jpxwfjorwcsrqraorpbj.supabase.co/functions/v1/data", _o = "pc_session_id", Oo = 24 * 60 * 60 * 1e3;
997
- function ye() {
996
+ const xe = "https://jpxwfjorwcsrqraorpbj.supabase.co/functions/v1/data", Io = "pc_session_id", zo = 24 * 60 * 60 * 1e3;
997
+ function we() {
998
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) {
999
999
  const t = Math.random() * 16 | 0;
1000
1000
  return (e === "x" ? t : t & 3 | 8).toString(16);
1001
1001
  }));
1002
1002
  }
1003
- function Wt() {
1003
+ function Xt() {
1004
1004
  const e = "test-local-storage";
1005
1005
  try {
1006
1006
  return localStorage.setItem(e, e), localStorage.removeItem(e), !0;
@@ -1008,7 +1008,7 @@ function Wt() {
1008
1008
  return m.warn("localStorage not available, session ID will not persist"), !1;
1009
1009
  }
1010
1010
  }
1011
- function Me(e) {
1011
+ function De(e) {
1012
1012
  try {
1013
1013
  const t = localStorage.getItem(e);
1014
1014
  return t ? JSON.parse(t) : void 0;
@@ -1017,47 +1017,34 @@ function Me(e) {
1017
1017
  return;
1018
1018
  }
1019
1019
  }
1020
- function Le(e, t) {
1020
+ function Re(e, t) {
1021
1021
  try {
1022
1022
  return localStorage.setItem(e, JSON.stringify(t)), !0;
1023
1023
  } catch (o) {
1024
1024
  return m.warn(`Failed to set item in localStorage: ${e}`, o), !1;
1025
1025
  }
1026
1026
  }
1027
- async function Io() {
1028
- if (typeof window < "u") {
1029
- if (window.pcProject !== void 0)
1030
- return m.debug("Found project key in global variable"), window.pcProject;
1031
- const e = document.querySelectorAll("script[pc-project]");
1032
- if (e.length > 0) {
1033
- const t = e[e.length - 1], o = t == null ? void 0 : t.getAttribute("pc-project");
1034
- if (o)
1035
- return m.debug("Found project key in script tag attribute"), o;
1036
- }
1037
- }
1038
- m.warn("No project key found in global variable or script tags");
1039
- }
1040
- async function xe() {
1041
- const e = _o, t = Oo;
1042
- if (Wt()) {
1043
- const o = Me(e);
1027
+ async function $e() {
1028
+ const e = Io, t = zo;
1029
+ if (Xt()) {
1030
+ const o = De(e);
1044
1031
  if (o && o.id && o.timestamp && Date.now() - o.timestamp < t)
1045
1032
  return m.debug("Using existing session ID from localStorage"), o.id;
1046
1033
  m.debug(
1047
1034
  o ? "Session ID expired" : "No session ID found",
1048
1035
  "generating new one"
1049
1036
  );
1050
- const r = ye();
1051
- return Le(e, {
1037
+ const r = we();
1038
+ return Re(e, {
1052
1039
  id: r,
1053
1040
  timestamp: Date.now()
1054
1041
  }) ? m.debug("Generated and stored new session ID") : m.warn("Generated session ID but failed to store it"), r;
1055
1042
  } else {
1056
- const o = ye();
1043
+ const o = we();
1057
1044
  return m.debug("Generated non-persistent session ID"), o;
1058
1045
  }
1059
1046
  }
1060
- function Ct(e) {
1047
+ function Et(e) {
1061
1048
  if (!e || typeof e != "object")
1062
1049
  return 0;
1063
1050
  let t = 0, o = 0, r = 0;
@@ -1070,7 +1057,7 @@ function Ct(e) {
1070
1057
  const s = t / r * 100, i = o / r * 100;
1071
1058
  return Math.round(s - i);
1072
1059
  }
1073
- function zo(e) {
1060
+ function Mo(e) {
1074
1061
  if (!e || typeof e != "object")
1075
1062
  return { promoters: 0, passives: 0, detractors: 0 };
1076
1063
  let t = 0, o = 0, r = 0;
@@ -1080,14 +1067,14 @@ function zo(e) {
1080
1067
  }
1081
1068
  return { promoters: t, passives: o, detractors: r };
1082
1069
  }
1083
- function Mo(e, t) {
1070
+ function Lo(e, t) {
1084
1071
  const o = {};
1085
1072
  for (const r of t)
1086
1073
  o[r] = e[r] || 0;
1087
1074
  return o;
1088
1075
  }
1089
- function Lo(e, t) {
1090
- const o = t ? Mo(e, t) : e;
1076
+ function No(e, t) {
1077
+ const o = t ? Lo(e, t) : e;
1091
1078
  let r = 0, s = 0;
1092
1079
  for (const [a, l] of Object.entries(o)) {
1093
1080
  s += l;
@@ -1096,7 +1083,7 @@ function Lo(e, t) {
1096
1083
  }
1097
1084
  return { avg: s > 0 ? Math.round(r / s * 10) / 10 : 0, count: s, sum: r, breakdown: o };
1098
1085
  }
1099
- function L() {
1086
+ function D() {
1100
1087
  return {
1101
1088
  count: 0,
1102
1089
  sum: 0,
@@ -1106,26 +1093,26 @@ function L() {
1106
1093
  updated: (/* @__PURE__ */ new Date()).toISOString()
1107
1094
  };
1108
1095
  }
1109
- function No(e) {
1110
- if (!Wt())
1111
- return L();
1096
+ function Do(e) {
1097
+ if (!Xt())
1098
+ return D();
1112
1099
  try {
1113
- const t = Me(e);
1114
- return t ? { ...L(), ...t } : L();
1100
+ const t = De(e);
1101
+ return t ? { ...D(), ...t } : D();
1115
1102
  } catch (t) {
1116
- return m.warn("Failed to load localStats from localStorage", t), L();
1103
+ return m.warn("Failed to load localStats from localStorage", t), D();
1117
1104
  }
1118
1105
  }
1119
- function Do(e, t) {
1120
- if (!Wt())
1106
+ function Ro(e, t) {
1107
+ if (!Xt())
1121
1108
  return !1;
1122
1109
  try {
1123
- return Le(e, t) ? (m.debug("Saved localStats to localStorage", t), !0) : !1;
1110
+ return Re(e, t) ? (m.debug("Saved localStats to localStorage", t), !0) : !1;
1124
1111
  } catch (o) {
1125
1112
  return m.warn("Failed to save localStats to localStorage", o), !1;
1126
1113
  }
1127
1114
  }
1128
- function Ro(e, t) {
1115
+ function Bo(e, t) {
1129
1116
  const o = {
1130
1117
  count: Math.max(0, e.count - t.count),
1131
1118
  sum: (e.sum || 0) - (t.sum || 0),
@@ -1138,11 +1125,11 @@ function Ro(e, t) {
1138
1125
  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)
1139
1126
  for (const [r, s] of Object.entries(t.breakdown))
1140
1127
  o.breakdown[r] && (o.breakdown[r] = Math.max(0, o.breakdown[r] - s), o.breakdown[r] === 0 && delete o.breakdown[r]);
1141
- return o.nps = Ct((o == null ? void 0 : o.breakdown) || {}), o;
1128
+ return o.nps = Et((o == null ? void 0 : o.breakdown) || {}), o;
1142
1129
  }
1143
- function jo(e, t) {
1130
+ function Uo(e, t) {
1144
1131
  if (!e.count && !t.count)
1145
- return L();
1132
+ return D();
1146
1133
  if (!e.count)
1147
1134
  return { ...t };
1148
1135
  const o = {
@@ -1159,12 +1146,12 @@ function jo(e, t) {
1159
1146
  for (const [r, s] of Object.entries(t.breakdown))
1160
1147
  o.breakdown[r] = (o.breakdown[r] || 0) + s;
1161
1148
  }
1162
- return o.nps = Ct((o == null ? void 0 : o.breakdown) || {}), o;
1149
+ return o.nps = Et((o == null ? void 0 : o.breakdown) || {}), o;
1163
1150
  }
1164
- function Ne(e) {
1151
+ function Be(e) {
1165
1152
  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);
1166
1153
  }
1167
- function Pt(e) {
1154
+ function _t(e) {
1168
1155
  if (!e || typeof e != "string")
1169
1156
  return !1;
1170
1157
  const t = e.trim();
@@ -1178,7 +1165,7 @@ function Pt(e) {
1178
1165
  return !1;
1179
1166
  }
1180
1167
  }
1181
- function Bo(e) {
1168
+ function Vo(e) {
1182
1169
  if (!e || typeof e != "string")
1183
1170
  return [];
1184
1171
  const t = e.trim();
@@ -1193,37 +1180,46 @@ function Bo(e) {
1193
1180
  }
1194
1181
  return t.split(",").map((o) => o.trim()).filter((o) => o !== "");
1195
1182
  }
1196
- function Vo(e, t) {
1183
+ function jo(e, t) {
1197
1184
  const o = /{([^{}]+)}/g;
1198
1185
  return e.replace(o, (r, s) => {
1199
1186
  const i = s.trim(), a = t[i];
1200
1187
  return a !== void 0 ? String(a) : r;
1201
1188
  });
1202
1189
  }
1203
- function Uo(e, t) {
1190
+ function qo(e, t) {
1204
1191
  let o = 2166136261;
1205
1192
  const r = e + ":" + t;
1206
1193
  for (let s = 0; s < r.length; s++)
1207
1194
  o ^= r.charCodeAt(s), o += (o << 1) + (o << 4) + (o << 7) + (o << 8) + (o << 24);
1208
1195
  return (o >>> 0).toString(16).padStart(8, "0");
1209
1196
  }
1210
- function qo(e, t = 50) {
1197
+ function Ho(e, t = 50) {
1211
1198
  return e.length <= t ? e : e.substring(0, t).trim() + "...";
1212
1199
  }
1213
- class Ho {
1200
+ const Se = 5;
1201
+ class Fo {
1214
1202
  // Tracks if user has ever made a selection (even if later deselected)
1215
1203
  constructor(t) {
1216
- this.stats = L(), this.localStats = L(), this.prevLocalStats = L(), this.isLoading = !0, this.isSubmitting = !1, this.hasInteracted = !1, (this.host = t).addController(this);
1204
+ this.stats = D(), this.localStats = D(), this.prevLocalStats = D(), this.isLoading = !0, this.isLoadingConfig = !1, this.isSubmitting = !1, this.hasInteracted = !1, (this.host = t).addController(this);
1217
1205
  }
1218
1206
  hostConnected() {
1219
1207
  this.loadStats();
1220
1208
  }
1221
- async getProjectId() {
1222
- return this.host.project || await Io() || "public";
1209
+ /**
1210
+ * Validates the widget identifier (widget-id or name)
1211
+ * Returns the type of widget and validates accordingly
1212
+ */
1213
+ validateWidgetIdentifier() {
1214
+ const t = this.host;
1215
+ return t.widgetId ? /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.widgetId) ? { type: "registered" } : { type: "none", error: `Invalid widget-id format: ${t.widgetId}` } : t.name ? t.name.length < Se ? {
1216
+ type: "none",
1217
+ error: `Widget name must be at least ${Se} characters long. Got: "${t.name}"`
1218
+ } : { type: "public" } : { type: "none", error: "Widget requires either widget-id or name attribute" };
1223
1219
  }
1224
1220
  async getLocalStatsKey() {
1225
- const t = this.host, o = await xe(), r = await this.getProjectId(), s = t.name || "unnamed";
1226
- return `pc-local-stats-${o}-${r}-${s}`;
1221
+ const t = this.host, o = await $e(), r = t.widgetId || t.name || "unnamed";
1222
+ return `pc-local-stats-${o}-${r}`;
1227
1223
  }
1228
1224
  /**
1229
1225
  * while 'hostConnected' is not async, we need to use this wrapper function
@@ -1232,62 +1228,85 @@ class Ho {
1232
1228
  async loadStats() {
1233
1229
  await this.loadLocalStats(), await this.loadServerStats();
1234
1230
  }
1231
+ /**
1232
+ * Applies widget attributes from registered widget API response
1233
+ * Sets attributes on the host element based on the attributes config
1234
+ */
1235
+ applyWidgetAttributes(t) {
1236
+ if (!t) return;
1237
+ const r = this.host;
1238
+ for (const [s, i] of Object.entries(t)) {
1239
+ if (i == null) continue;
1240
+ const a = s.replace(/([A-Z])/g, "-$1").toLowerCase();
1241
+ typeof i == "boolean" ? i ? r.setAttribute(a, "") : r.removeAttribute(a) : typeof i == "object" ? r.setAttribute(a, JSON.stringify(i)) : r.setAttribute(a, String(i)), m.debug(`Applied widget attribute: ${a}=${i}`);
1242
+ }
1243
+ }
1235
1244
  /**
1236
1245
  * Loads the stats for the widget.
1237
1246
  */
1238
1247
  async loadServerStats() {
1248
+ var r, s, i;
1239
1249
  const t = this.host;
1240
1250
  this.isLoading = !1, this.stats = this.localStats, this.host.requestUpdate();
1251
+ const o = this.validateWidgetIdentifier();
1252
+ if (o.error) {
1253
+ m.error(o.error);
1254
+ return;
1255
+ }
1241
1256
  try {
1242
- const o = await this.getProjectId(), r = t.name, s = t.type;
1243
- let i;
1257
+ const a = t.type;
1258
+ let l;
1244
1259
  if (t.dataFunc && typeof window < "u") {
1245
- const P = t.dataFunc.replace(/^window\./, "").split(".");
1246
- let w = window;
1247
- for (const mt of P)
1248
- if (w = w == null ? void 0 : w[mt], w === void 0) break;
1249
- i = w;
1260
+ const w = t.dataFunc.replace(/^window\./, "").split(".");
1261
+ let A = window;
1262
+ for (const W of w)
1263
+ if (A = A == null ? void 0 : A[W], A === void 0) break;
1264
+ l = A;
1250
1265
  }
1251
- let a, l;
1252
- if (i && typeof i == "function") {
1266
+ let n, d = null;
1267
+ if (l && typeof l == "function") {
1253
1268
  const C = this.getOptionsForDataFunc(t);
1254
- if (m.debug(`Using data function for: ${r}`, {
1269
+ m.debug(`Using data function for: ${t.widgetId || t.name}`, {
1255
1270
  dataFuncName: t.dataFunc,
1256
- projectKey: o,
1257
1271
  options: C
1258
- }), a = await i(o, r, C), a && typeof a == "object" && "success" in a && "data" in a) {
1259
- if (!a.success)
1260
- throw m.error("Custom data function returned unsuccessful response", a), new Error("Custom data function returned unsuccessful response");
1261
- l = a.data || {};
1272
+ });
1273
+ const w = await l(t.widgetId, t.name, C);
1274
+ if (w && typeof w == "object" && "success" in w && "data" in w) {
1275
+ if (!w.success)
1276
+ throw m.error("Custom data function returned unsuccessful response", w), new Error("Custom data function returned unsuccessful response");
1277
+ n = w.data || {};
1262
1278
  } else
1263
- l = a || {};
1279
+ n = w || {};
1264
1280
  } else {
1265
- const C = t.dataEndpoint || be;
1266
- if (!r)
1267
- throw new Error("Name parameter is required");
1268
- const P = `${C}/${encodeURIComponent(o)}/${encodeURIComponent(r)}`;
1269
- m.debug(`Fetching stats for: ${r}`, { endpoint: C, projectKey: o });
1270
- const w = await fetch(P);
1271
- if (!w.ok)
1272
- throw new Error(`API request failed with status: ${w.status}`);
1273
- if (a = await w.json(), !a.success)
1274
- throw m.error("Backend returned unsuccessful response", a), new Error("Backend returned unsuccessful response");
1275
- l = a.data || {};
1281
+ const C = t.dataEndpoint || xe;
1282
+ let w;
1283
+ o.type === "registered" ? (w = `${C}/widgets/${encodeURIComponent(t.widgetId)}`, this.isLoadingConfig = !0, this.host.requestUpdate()) : w = `${C}/public-widgets/${encodeURIComponent(t.name)}`, m.debug("Fetching stats for widget", {
1284
+ endpoint: w,
1285
+ type: o.type
1286
+ });
1287
+ const A = await fetch(w);
1288
+ if (!A.ok)
1289
+ throw new Error(`API request failed with status: ${A.status}`);
1290
+ const W = await A.json();
1291
+ if (!W.success)
1292
+ throw m.error("Backend returned unsuccessful response", W), new Error("Backend returned unsuccessful response");
1293
+ o.type === "registered" ? (d = ((s = (r = W.data) == null ? void 0 : r.config) == null ? void 0 : s.attributes) || null, n = ((i = W.data) == null ? void 0 : i.stats) || {}) : n = W.data || {};
1276
1294
  }
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 = {
1278
- count: p,
1279
- sum: h,
1280
- avg: b,
1281
- pct: x,
1282
- nps: s === S.nps ? Ct(d.breakdown) : 0,
1283
- breakdown: d.breakdown,
1284
- updated: l.updated_at || (/* @__PURE__ */ new Date()).toISOString()
1295
+ d && !l && this.applyWidgetAttributes(d);
1296
+ const p = this.getOptionsForDataFunc(t), h = No(n.breakdown ?? {}, p), b = h.count, x = h.sum, E = b > 0 ? Math.round(x / b * 10) / 10 : 0, z = b > 0 ? Math.round(x / b * 100) : 0, M = {
1297
+ count: b,
1298
+ sum: x,
1299
+ avg: E,
1300
+ pct: z,
1301
+ nps: a === S.nps ? Et(h.breakdown) : 0,
1302
+ breakdown: h.breakdown,
1303
+ updated: n.updatedAt || n.updated_at || (/* @__PURE__ */ new Date()).toISOString()
1285
1304
  };
1286
- this.stats = E;
1287
- } catch (o) {
1288
- throw m.error("Error loading stats:", o, this.localStats), o;
1305
+ this.stats = M;
1306
+ } catch (a) {
1307
+ throw m.error("Error loading stats:", a, this.localStats), a;
1289
1308
  } finally {
1290
- this.isLoading = !1, this.host.requestUpdate();
1309
+ this.isLoading = !1, this.isLoadingConfig = !1, this.host.requestUpdate();
1291
1310
  }
1292
1311
  }
1293
1312
  /**
@@ -1316,10 +1335,10 @@ class Ho {
1316
1335
  async loadLocalStats() {
1317
1336
  const t = await this.getLocalStatsKey();
1318
1337
  try {
1319
- const o = No(t);
1338
+ const o = Do(t);
1320
1339
  m.debug("Loaded localStats from localStorage", o), this.localStats = o, o.submitted && (this.prevLocalStats = { ...o });
1321
1340
  } catch (o) {
1322
- m.warn("Failed to generate localStorage key for localStats", o), this.localStats = L();
1341
+ m.warn("Failed to generate localStorage key for localStats", o), this.localStats = D();
1323
1342
  }
1324
1343
  this.host.requestUpdate();
1325
1344
  }
@@ -1329,7 +1348,7 @@ class Ho {
1329
1348
  async persistLocalStats() {
1330
1349
  try {
1331
1350
  const t = await this.getLocalStatsKey();
1332
- Do(t, this.localStats) || m.warn("Failed to save localStats to localStorage");
1351
+ Ro(t, this.localStats) || m.warn("Failed to save localStats to localStorage");
1333
1352
  } catch (t) {
1334
1353
  m.warn("Failed to save localStats to localStorage", t);
1335
1354
  }
@@ -1343,7 +1362,7 @@ class Ho {
1343
1362
  * @param textValues
1344
1363
  */
1345
1364
  updateStats(t, o) {
1346
- if (this.hasInteracted = !0, this.stats && (this.stats = Ro(this.stats, this.localStats)), this.localStats = {
1365
+ if (this.hasInteracted = !0, this.stats && (this.stats = Bo(this.stats, this.localStats)), this.localStats = {
1347
1366
  count: t > 0 || o.length > 0 ? 1 : 0,
1348
1367
  sum: t,
1349
1368
  // e.g. number of stars, nps value
@@ -1357,7 +1376,7 @@ class Ho {
1357
1376
  }, o && o.length > 0)
1358
1377
  for (const r of o)
1359
1378
  r && (this.localStats.breakdown[r] = 1);
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();
1379
+ this.stats = Uo(this.stats, this.localStats), m.debug("Stats updated - remote: ", this.stats), m.debug("Stats updated - local: ", this.stats), this.persistLocalStats(), this.host.requestUpdate();
1361
1380
  }
1362
1381
  async markStatsAsSubmitted() {
1363
1382
  this.localStats.submitted = (/* @__PURE__ */ new Date()).toISOString(), this.prevLocalStats = { ...this.localStats }, await this.persistLocalStats(), this.host.requestUpdate();
@@ -1365,58 +1384,65 @@ class Ho {
1365
1384
  async submitStats() {
1366
1385
  if (!this.hasLocalStats() && !this.hasInteracted)
1367
1386
  throw m.warn("No local stats to submit"), new Error("No local stats to submit");
1368
- const t = this.host, o = Math.floor(Date.now() / 1e3).toString(), r = await xe(), s = await this.getProjectId(), i = t.name || "", a = this.localStats.sum, l = Object.keys(this.localStats.breakdown || {}), n = this.prevLocalStats.sum, d = Object.keys(this.prevLocalStats.breakdown || {});
1387
+ const t = this.host, o = Math.floor(Date.now() / 1e3).toString(), r = await $e(), s = this.localStats.sum, i = Object.keys(this.localStats.breakdown || {}), a = this.prevLocalStats.sum, l = Object.keys(this.prevLocalStats.breakdown || {});
1369
1388
  this.isSubmitting = !0, this.host.requestUpdate();
1370
- const p = {
1389
+ const n = {
1371
1390
  sessionId: r,
1372
- projectId: s,
1373
- widgetName: i,
1391
+ widgetId: t.widgetId,
1392
+ widgetName: t.name,
1374
1393
  widgetType: t.type,
1375
1394
  url: window.location.href,
1376
- numericValue: a,
1377
- textValues: l,
1378
- prevNumericValue: n,
1379
- prevTextValues: d,
1395
+ numericValue: s,
1396
+ textValues: i,
1397
+ prevNumericValue: a,
1398
+ prevTextValues: l,
1380
1399
  metadata: t.metadata,
1381
1400
  timestamp: o
1382
- }, h = Uo(JSON.stringify(p), o);
1401
+ }, d = qo(JSON.stringify(n), o);
1383
1402
  try {
1384
- await this.sendStats({ ...p, hash: h }), await this.markStatsAsSubmitted(), this.dispatchSubmitEvent(p);
1385
- } catch (b) {
1386
- m.warn("Failed to send stats event", b);
1403
+ await this.sendStats({ ...n, hash: d }), await this.markStatsAsSubmitted(), this.dispatchSubmitEvent(n);
1404
+ } catch (p) {
1405
+ m.warn("Failed to send stats event", p);
1387
1406
  } finally {
1388
1407
  this.isSubmitting = !1, this.host.requestUpdate();
1389
1408
  }
1390
- return p;
1409
+ return n;
1391
1410
  }
1392
1411
  async sendStats(t) {
1393
- const o = JSON.stringify(t), r = this.host, s = r.dataEndpoint || be;
1394
- if (r.dataFunc) {
1412
+ const o = this.host;
1413
+ if (o.dataFunc) {
1395
1414
  m.debug("Skip sending stats as data function is in use.");
1396
1415
  return;
1397
1416
  }
1398
- if (!Pt(s))
1417
+ const r = this.validateWidgetIdentifier();
1418
+ if (r.error)
1419
+ throw m.error(r.error), new Error(r.error);
1420
+ const s = o.dataEndpoint || xe;
1421
+ if (!_t(s))
1399
1422
  throw m.error("Invalid data endpoint", { dataEndpoint: s }), new Error(`Invalid data endpoint: ${s}`);
1423
+ let i;
1424
+ r.type === "registered" ? i = `${s}/widgets/${encodeURIComponent(o.widgetId)}` : i = `${s}/public-widgets/${encodeURIComponent(o.name)}`;
1425
+ const a = JSON.stringify(t);
1400
1426
  try {
1401
- if (m.debug("Sending stats", { endpoint: s, event: t }), typeof navigator < "u" && navigator.sendBeacon)
1402
- if (navigator.sendBeacon(s, o)) {
1427
+ if (m.debug("Sending stats", { endpoint: i, event: t }), typeof navigator < "u" && navigator.sendBeacon)
1428
+ if (navigator.sendBeacon(i, a)) {
1403
1429
  m.debug("Successfully sent stats via sendBeacon");
1404
1430
  return;
1405
1431
  } else
1406
1432
  m.debug("sendBeacon failed, falling back to fetch");
1407
- const i = await fetch(s, {
1408
- body: o,
1433
+ const l = await fetch(i, {
1434
+ body: a,
1409
1435
  method: "POST",
1410
1436
  keepalive: !0,
1411
1437
  headers: {
1412
1438
  "Content-Type": "application/json"
1413
1439
  }
1414
1440
  });
1415
- if (!i.ok)
1416
- throw new Error(`API request failed with status: ${i.status}`);
1441
+ if (!l.ok)
1442
+ throw new Error(`API request failed with status: ${l.status}`);
1417
1443
  m.debug("Successfully sent stats via fetch");
1418
- } catch (i) {
1419
- throw m.error("Failed to send analytics:", i), i;
1444
+ } catch (l) {
1445
+ throw m.error("Failed to send analytics:", l), l;
1420
1446
  }
1421
1447
  }
1422
1448
  /**
@@ -1431,9 +1457,9 @@ class Ho {
1431
1457
  sum: (o == null ? void 0 : o.sum) || 0,
1432
1458
  avg: s,
1433
1459
  pct: (o == null ? void 0 : o.pct) || 0,
1434
- nps: r.type === S.nps ? Ct((o == null ? void 0 : o.breakdown) || {}) : 0
1460
+ nps: r.type === S.nps ? Et((o == null ? void 0 : o.breakdown) || {}) : 0
1435
1461
  };
1436
- return m.debug("Stats data: ", this.stats), Vo(t, i);
1462
+ return m.debug("Stats data: ", this.stats), jo(t, i);
1437
1463
  }
1438
1464
  /**
1439
1465
  * Checks if a value is selected in the local stats
@@ -1480,7 +1506,7 @@ class Ho {
1480
1506
  */
1481
1507
  dispatchChangeEvent() {
1482
1508
  const t = this.host, o = this.localStats.sum, r = Object.keys(this.localStats.breakdown || {}), s = {
1483
- projectId: t.project,
1509
+ widgetId: t.widgetId,
1484
1510
  widgetType: t.type,
1485
1511
  widgetName: t.name,
1486
1512
  numericValue: o,
@@ -1520,7 +1546,7 @@ class Ho {
1520
1546
  return ((t = this.localStats) == null ? void 0 : t.submitted) !== void 0 && this.hasLocalStats();
1521
1547
  }
1522
1548
  }
1523
- class Fo {
1549
+ class Yo {
1524
1550
  constructor(t, o) {
1525
1551
  this.isEditing = !0, this.isChartVisible = !1, this.isStatsVisible = !1, this.isThankYouVisible = !1, this.isReactionPopoverVisible = !1, this.initialized = !1, this.handleClickOutside = (r) => {
1526
1552
  r.target !== this.host && (this.toggleThankYouVisibility(!1), this.toggleReactionPopoverVisibility(!1));
@@ -1608,8 +1634,8 @@ class Fo {
1608
1634
  return !(this.host.readonly || !this.isEditing);
1609
1635
  }
1610
1636
  }
1611
- var Xt = /* @__PURE__ */ ((e) => (e.DECORATIVE = "decorative", e.FUNCTIONAL = "functional", e.STATUS = "status", e))(Xt || {});
1612
- function De(e, t = {}) {
1637
+ var Qt = /* @__PURE__ */ ((e) => (e.DECORATIVE = "decorative", e.FUNCTIONAL = "functional", e.STATUS = "status", e))(Qt || {});
1638
+ function Ue(e, t = {}) {
1613
1639
  const { type: o = "functional", alt: r, ariaLabel: s, isSelected: i } = t;
1614
1640
  if (!e)
1615
1641
  return { alt: "", ariaHidden: !0 };
@@ -1618,20 +1644,20 @@ function De(e, t = {}) {
1618
1644
  o === "functional" && !r && !s && console.warn(
1619
1645
  "No alt text or aria-label provided for functional icon. This may cause accessibility issues."
1620
1646
  );
1621
- const a = i ? " (selected)" : "", l = Pt(e) && !r ? "" : r || e, n = s || (l ? `${l}${a}` : a);
1647
+ const a = i ? " (selected)" : "", l = _t(e) && !r ? "" : r || e, n = s || (l ? `${l}${a}` : a);
1622
1648
  return {
1623
1649
  alt: l,
1624
1650
  ariaLabel: n,
1625
1651
  ariaHidden: !1
1626
1652
  };
1627
1653
  }
1628
- function Yo(e, t = "polite") {
1654
+ function Ko(e, t = "polite") {
1629
1655
  let o = document.getElementById("screen-reader-announcer");
1630
1656
  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(() => {
1631
1657
  o.textContent = e;
1632
1658
  }, 50);
1633
1659
  }
1634
- function Ko(e, t) {
1660
+ function Wo(e, t) {
1635
1661
  return `${e}: ${t}`;
1636
1662
  }
1637
1663
  /**
@@ -1639,8 +1665,8 @@ function Ko(e, t) {
1639
1665
  * Copyright 2017 Google LLC
1640
1666
  * SPDX-License-Identifier: BSD-3-Clause
1641
1667
  */
1642
- const Re = { ATTRIBUTE: 1 }, je = (e) => (...t) => ({ _$litDirective$: e, values: t });
1643
- let Be = class {
1668
+ const Ve = { ATTRIBUTE: 1 }, je = (e) => (...t) => ({ _$litDirective$: e, values: t });
1669
+ let qe = class {
1644
1670
  constructor(t) {
1645
1671
  }
1646
1672
  get _$AU() {
@@ -1661,10 +1687,10 @@ let Be = class {
1661
1687
  * Copyright 2018 Google LLC
1662
1688
  * SPDX-License-Identifier: BSD-3-Clause
1663
1689
  */
1664
- const y = je(class extends Be {
1690
+ const y = je(class extends qe {
1665
1691
  constructor(e) {
1666
1692
  var t;
1667
- if (super(e), e.type !== Re.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.");
1693
+ if (super(e), e.type !== Ve.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.");
1668
1694
  }
1669
1695
  render(e) {
1670
1696
  return " " + Object.keys(e).filter((t) => e[t]).join(" ") + " ";
@@ -1682,7 +1708,7 @@ const y = je(class extends Be {
1682
1708
  const a = !!t[i];
1683
1709
  a === this.st.has(i) || (s = this.nt) != null && s.has(i) || (a ? (o.add(i), this.st.add(i)) : (o.remove(i), this.st.delete(i)));
1684
1710
  }
1685
- return U;
1711
+ return H;
1686
1712
  }
1687
1713
  });
1688
1714
  var Go = Object.defineProperty, v = (e, t, o, r) => {
@@ -1690,13 +1716,13 @@ var Go = Object.defineProperty, v = (e, t, o, r) => {
1690
1716
  (a = e[i]) && (s = a(t, o, s) || s);
1691
1717
  return s && Go(t, o, s), s;
1692
1718
  };
1693
- const bt = {
1719
+ const xt = {
1694
1720
  mobile: "480px",
1695
1721
  tablet: "768px",
1696
1722
  desktop: "1024px"
1697
- }, Jt = class Jt extends N {
1723
+ }, te = class te extends R {
1698
1724
  constructor() {
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 = ze.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) => {
1725
+ super(...arguments), this.dataController = new Fo(this), this.displayController = new Yo(this, this.dataController), this.hasEditButton = !0, this.showStats = "never", this.showChart = !1, this.initialized = !1, this.ariaLabel = null, this.minContrast = Ne.AA_NORMAL, this.options = [], 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) => {
1700
1726
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), this.handleEnterEditMode());
1701
1727
  };
1702
1728
  }
@@ -1728,10 +1754,10 @@ const bt = {
1728
1754
  let o = `:host {
1729
1755
  `;
1730
1756
  if (this.primaryColor) {
1731
- const i = J(this.primaryColor);
1757
+ const i = et(this.primaryColor);
1732
1758
  o += `--pc-primary-color: ${i} !important;
1733
1759
  `;
1734
- const a = $o(i, {
1760
+ const a = Co(i, {
1735
1761
  minContrast: this.minContrast,
1736
1762
  colorOptions: ["black", "white", "light", "dark"]
1737
1763
  });
@@ -1739,56 +1765,56 @@ const bt = {
1739
1765
  `;
1740
1766
  }
1741
1767
  if (this.muteColor) {
1742
- const i = J(this.muteColor);
1768
+ const i = et(this.muteColor);
1743
1769
  o += `--pc-mute-color: ${i} !important;
1744
1770
  `;
1745
1771
  }
1746
1772
  if (this.textColor) {
1747
- const i = J(this.textColor);
1773
+ const i = et(this.textColor);
1748
1774
  o += `--pc-text-color: ${i} !important;
1749
1775
  `;
1750
1776
  }
1751
1777
  if (this.backgroundColor) {
1752
- const i = J(this.backgroundColor);
1778
+ const i = et(this.backgroundColor);
1753
1779
  o += `--pc-background-color: ${i} !important;
1754
1780
  `;
1755
1781
  }
1756
1782
  const r = this.starColor || this.accentColor || this.primaryColor;
1757
1783
  if (r) {
1758
- const i = J(r);
1784
+ const i = et(r);
1759
1785
  o += `--pc-star-color: ${i} !important;
1760
1786
  `;
1761
1787
  }
1762
- const s = this.starHoverColor || (r ? `color-mix(in srgb, ${J(r)} 80%, white)` : null);
1788
+ const s = this.starHoverColor || (r ? `color-mix(in srgb, ${et(r)} 80%, white)` : null);
1763
1789
  if (s && (o += `--pc-star-hover-color: ${s} !important;
1764
1790
  `), this.starSize) {
1765
- const i = Vt(this.starSize, "1.5em", 1.5);
1791
+ const i = qt(this.starSize, "1.5em", 1.5);
1766
1792
  o += `--pc-stars-star-size: ${i} !important;
1767
1793
  `;
1768
1794
  }
1769
1795
  if (this.reactionSize) {
1770
- const i = Vt(this.reactionSize, "1em", 1);
1796
+ const i = qt(this.reactionSize, "1em", 1);
1771
1797
  o += `--pc-reaction-size: ${i} !important;
1772
1798
  `;
1773
1799
  }
1774
1800
  if (this.size) {
1775
- const i = Vt(this.size);
1801
+ const i = qt(this.size);
1776
1802
  o += `font-size: ${i} !important;
1777
1803
  `;
1778
1804
  }
1779
1805
  if (this.buttonRadius) {
1780
- const i = Co(this.buttonRadius);
1806
+ const i = Eo(this.buttonRadius);
1781
1807
  o += `--pc-button-radius: ${i} !important;
1782
1808
  `;
1783
1809
  }
1784
1810
  o += `}
1785
- `, this.css && (o += To(Po(this.css))), t.textContent = o;
1811
+ `, this.css && (o += Oo(_o(this.css))), t.textContent = o;
1786
1812
  }
1787
1813
  /**
1788
1814
  * Update ARIA attributes for accessibility
1789
1815
  */
1790
1816
  updateAriaAttributes() {
1791
- this.ariaLabel && Ut(this, "aria-label", this.ariaLabel), this.ariaDescribedby && Ut(this, "aria-describedby", this.ariaDescribedby), Ut(this, "aria-busy", this.dataController.isLoading ? "true" : "false");
1817
+ this.ariaLabel && Ht(this, "aria-label", this.ariaLabel), this.ariaDescribedby && Ht(this, "aria-describedby", this.ariaDescribedby), Ht(this, "aria-busy", this.dataController.isLoading ? "true" : "false");
1792
1818
  }
1793
1819
  /**
1794
1820
  * Update host CSS classes based on state
@@ -1801,11 +1827,11 @@ const bt = {
1801
1827
  */
1802
1828
  getBreakpointClasses() {
1803
1829
  return {
1804
- "pc-mobile": window.matchMedia(`(max-width: ${bt.mobile})`).matches,
1830
+ "pc-mobile": window.matchMedia(`(max-width: ${xt.mobile})`).matches,
1805
1831
  "pc-tablet": window.matchMedia(
1806
- `(min-width: ${bt.mobile}) and (max-width: ${bt.tablet})`
1832
+ `(min-width: ${xt.mobile}) and (max-width: ${xt.tablet})`
1807
1833
  ).matches,
1808
- "pc-desktop": window.matchMedia(`(min-width: ${bt.desktop})`).matches
1834
+ "pc-desktop": window.matchMedia(`(min-width: ${xt.desktop})`).matches
1809
1835
  };
1810
1836
  }
1811
1837
  /**
@@ -1813,7 +1839,7 @@ const bt = {
1813
1839
  */
1814
1840
  announceSelectionChange(t, o, r) {
1815
1841
  const s = `Poll for "${t}"`, i = r ? `${o.label} selected` : `${o.label} unselected`;
1816
- Yo(Ko(s, i));
1842
+ Ko(Wo(s, i));
1817
1843
  }
1818
1844
  /** Common render methods */
1819
1845
  renderLabel() {
@@ -1844,7 +1870,7 @@ const bt = {
1844
1870
  tabindex="0"
1845
1871
  aria-label="Edit vote"
1846
1872
  @keydown="${this.handleEditToggleKeyDown}"
1847
- >${St}</span
1873
+ >${kt}</span
1848
1874
  >
1849
1875
  ` : u;
1850
1876
  }
@@ -1863,7 +1889,7 @@ const bt = {
1863
1889
  tabindex="0"
1864
1890
  aria-label="${this.displayController.isChartVisible ? "Hide chart" : "Show chart"}"
1865
1891
  @keydown="${() => this.displayController.toggleChartVisibility()}"
1866
- >${this.displayController.isChartVisible ? Zt : Gt}</span
1892
+ >${this.displayController.isChartVisible ? Jt : Zt}</span
1867
1893
  >
1868
1894
  ` : u;
1869
1895
  }
@@ -1890,7 +1916,7 @@ const bt = {
1890
1916
  renderThankYouMessage() {
1891
1917
  if (!this.displayController.shouldDisplayThankYouMsg())
1892
1918
  return u;
1893
- const t = qo(this.thankYouMsg || "");
1919
+ const t = Ho(this.thankYouMsg || "");
1894
1920
  return c`
1895
1921
  <div class="pc-thank-you-overlay" data-testid="poll-thank-you-overlay">
1896
1922
  <div class="pc-thank-you" data-testid="thank-you">
@@ -1902,7 +1928,7 @@ const bt = {
1902
1928
  @click="${() => this.displayController.toggleThankYouVisibility(!1)}"
1903
1929
  role="button"
1904
1930
  aria-label="Close"
1905
- >${At}</span
1931
+ >${Tt}</span
1906
1932
  >
1907
1933
  </div>
1908
1934
  </div>
@@ -1910,8 +1936,8 @@ const bt = {
1910
1936
  `;
1911
1937
  }
1912
1938
  };
1913
- Jt.styles = [
1914
- R`
1939
+ te.styles = [
1940
+ U`
1915
1941
  :host {
1916
1942
  /* Default values for CSS variables - can be overridden by external :root or parent definitions */
1917
1943
  --default-font-size-base: 1rem;
@@ -1991,7 +2017,7 @@ Jt.styles = [
1991
2017
  }
1992
2018
  `
1993
2019
  ];
1994
- let g = Jt;
2020
+ let g = te;
1995
2021
  v([
1996
2022
  f({ type: String, attribute: "show-stats" })
1997
2023
  ], g.prototype, "showStats");
@@ -2047,8 +2073,8 @@ v([
2047
2073
  f({ type: Array })
2048
2074
  ], g.prototype, "options");
2049
2075
  v([
2050
- f({ type: String })
2051
- ], g.prototype, "project");
2076
+ f({ type: String, attribute: "widget-id" })
2077
+ ], g.prototype, "widgetId");
2052
2078
  v([
2053
2079
  f({ type: String, attribute: "name" })
2054
2080
  ], g.prototype, "name");
@@ -2097,7 +2123,7 @@ v([
2097
2123
  v([
2098
2124
  f({ type: Boolean, reflect: !0 })
2099
2125
  ], g.prototype, "readonly");
2100
- const Zo = R`
2126
+ const Zo = U`
2101
2127
  /* CSS variables inherit from parent - defaults are specified at usage sites */
2102
2128
 
2103
2129
  .pc-body {
@@ -2548,7 +2574,7 @@ const Zo = R`
2548
2574
  animation: none;
2549
2575
  }
2550
2576
  }
2551
- `, Tt = R`
2577
+ `, Ot = U`
2552
2578
  /* Default values for CSS variables - can be overridden by external :root or parent definitions */
2553
2579
  :host {
2554
2580
  --default-primary-color: #2196f3;
@@ -3267,7 +3293,7 @@ const Zo = R`
3267
3293
  opacity: 1;
3268
3294
  }
3269
3295
  }
3270
- `, Wo = R`
3296
+ `, Jo = U`
3271
3297
  :host {
3272
3298
  --popover-bg: light-dark(#ffffff, #1a1a1a);
3273
3299
  --popover-border: light-dark(#e0e0e0, #333333);
@@ -3389,12 +3415,12 @@ const Zo = R`
3389
3415
  max-width: 100%;
3390
3416
  }
3391
3417
  `;
3392
- var Xo = Object.defineProperty, Jo = Object.getOwnPropertyDescriptor, j = (e, t, o, r) => {
3393
- for (var s = r > 1 ? void 0 : r ? Jo(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3418
+ var Xo = Object.defineProperty, Qo = Object.getOwnPropertyDescriptor, V = (e, t, o, r) => {
3419
+ for (var s = r > 1 ? void 0 : r ? Qo(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3394
3420
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
3395
3421
  return r && s && Xo(t, o, s), s;
3396
3422
  };
3397
- let _ = class extends N {
3423
+ let _ = class extends R {
3398
3424
  constructor() {
3399
3425
  super(...arguments), this.open = !1, this.position = "auto", this.isClosing = !1, this.computedPosition = "bottom", this.popoverStyles = {}, this.arrowStyles = {}, this.updatePosition = () => {
3400
3426
  var h;
@@ -3483,35 +3509,35 @@ let _ = class extends N {
3483
3509
  `;
3484
3510
  }
3485
3511
  };
3486
- _.styles = [Wo];
3487
- j([
3512
+ _.styles = [Jo];
3513
+ V([
3488
3514
  f({ type: Boolean, reflect: !0 })
3489
3515
  ], _.prototype, "open", 2);
3490
- j([
3516
+ V([
3491
3517
  f({ type: String })
3492
3518
  ], _.prototype, "position", 2);
3493
- j([
3519
+ V([
3494
3520
  f({ attribute: !1 })
3495
3521
  ], _.prototype, "anchor", 2);
3496
- j([
3522
+ V([
3497
3523
  k()
3498
3524
  ], _.prototype, "isClosing", 2);
3499
- j([
3525
+ V([
3500
3526
  k()
3501
3527
  ], _.prototype, "computedPosition", 2);
3502
- j([
3528
+ V([
3503
3529
  k()
3504
3530
  ], _.prototype, "popoverStyles", 2);
3505
- j([
3531
+ V([
3506
3532
  k()
3507
3533
  ], _.prototype, "arrowStyles", 2);
3508
- j([
3509
- ht(".pc-popover")
3534
+ V([
3535
+ mt(".pc-popover")
3510
3536
  ], _.prototype, "popoverElement", 2);
3511
- _ = j([
3512
- H("pc-popover")
3537
+ _ = V([
3538
+ Y("pc-popover")
3513
3539
  ], _);
3514
- const Qo = R`
3540
+ const tr = U`
3515
3541
  :host {
3516
3542
  --sheet-bg: light-dark(#ffffff, #1a1a1a);
3517
3543
  --sheet-border: light-dark(#e0e0e0, #333333);
@@ -3624,12 +3650,12 @@ const Qo = R`
3624
3650
  max-width: 100%;
3625
3651
  }
3626
3652
  `;
3627
- var tr = Object.defineProperty, er = Object.getOwnPropertyDescriptor, X = (e, t, o, r) => {
3628
- for (var s = r > 1 ? void 0 : r ? er(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3653
+ var er = Object.defineProperty, or = Object.getOwnPropertyDescriptor, tt = (e, t, o, r) => {
3654
+ for (var s = r > 1 ? void 0 : r ? or(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3629
3655
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
3630
- return r && s && tr(t, o, s), s;
3656
+ return r && s && er(t, o, s), s;
3631
3657
  };
3632
- let D = class extends N {
3658
+ let B = class extends R {
3633
3659
  constructor() {
3634
3660
  super(...arguments), this.open = !1, this.dragToClose = !0, this.isClosing = !1, this.isDragging = !1, this.dragOffset = 0, this.dragStartY = 0, this.sheetHeight = 0, this.handleKeyDown = (e) => {
3635
3661
  if (e.key === "Escape" && this.open && (e.preventDefault(), e.stopPropagation(), this.close()), e.key === "Tab" && this.open && this.sheetElement) {
@@ -3723,35 +3749,35 @@ let D = class extends N {
3723
3749
  `;
3724
3750
  }
3725
3751
  };
3726
- D.styles = [Qo];
3727
- X([
3752
+ B.styles = [tr];
3753
+ tt([
3728
3754
  f({ type: Boolean, reflect: !0 })
3729
- ], D.prototype, "open", 2);
3730
- X([
3755
+ ], B.prototype, "open", 2);
3756
+ tt([
3731
3757
  f({ type: Boolean, attribute: "drag-to-close" })
3732
- ], D.prototype, "dragToClose", 2);
3733
- X([
3758
+ ], B.prototype, "dragToClose", 2);
3759
+ tt([
3734
3760
  k()
3735
- ], D.prototype, "isClosing", 2);
3736
- X([
3761
+ ], B.prototype, "isClosing", 2);
3762
+ tt([
3737
3763
  k()
3738
- ], D.prototype, "isDragging", 2);
3739
- X([
3764
+ ], B.prototype, "isDragging", 2);
3765
+ tt([
3740
3766
  k()
3741
- ], D.prototype, "dragOffset", 2);
3742
- X([
3743
- ht(".pc-bottom-sheet")
3744
- ], D.prototype, "sheetElement", 2);
3745
- D = X([
3746
- H("pc-bottom-sheet")
3747
- ], D);
3748
- var or = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, ft = (e, t, o, r) => {
3749
- for (var s = r > 1 ? void 0 : r ? rr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3767
+ ], B.prototype, "dragOffset", 2);
3768
+ tt([
3769
+ mt(".pc-bottom-sheet")
3770
+ ], B.prototype, "sheetElement", 2);
3771
+ B = tt([
3772
+ Y("pc-bottom-sheet")
3773
+ ], B);
3774
+ var rr = Object.defineProperty, sr = Object.getOwnPropertyDescriptor, vt = (e, t, o, r) => {
3775
+ for (var s = r > 1 ? void 0 : r ? sr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3750
3776
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
3751
- return r && s && or(t, o, s), s;
3777
+ return r && s && rr(t, o, s), s;
3752
3778
  };
3753
- const sr = 768;
3754
- let Z = class extends N {
3779
+ const ir = 768;
3780
+ let X = class extends R {
3755
3781
  constructor() {
3756
3782
  super(...arguments), this.open = !1, this.position = "auto", this.isMobile = !1, this.handleMediaChange = (e) => {
3757
3783
  this.isMobile = e.matches;
@@ -3767,7 +3793,7 @@ let Z = class extends N {
3767
3793
  super.disconnectedCallback(), (e = this.mediaQuery) == null || e.removeEventListener("change", this.handleMediaChange);
3768
3794
  }
3769
3795
  setupMediaQuery() {
3770
- this.mediaQuery = window.matchMedia(`(max-width: ${sr - 1}px)`), this.isMobile = this.mediaQuery.matches, this.mediaQuery.addEventListener("change", this.handleMediaChange);
3796
+ this.mediaQuery = window.matchMedia(`(max-width: ${ir - 1}px)`), this.isMobile = this.mediaQuery.matches, this.mediaQuery.addEventListener("change", this.handleMediaChange);
3771
3797
  }
3772
3798
  render() {
3773
3799
  return this.isMobile ? c`
@@ -3786,30 +3812,30 @@ let Z = class extends N {
3786
3812
  `;
3787
3813
  }
3788
3814
  };
3789
- Z.styles = R`
3815
+ X.styles = U`
3790
3816
  :host {
3791
3817
  display: contents;
3792
3818
  }
3793
3819
  `;
3794
- ft([
3820
+ vt([
3795
3821
  f({ type: Boolean, reflect: !0 })
3796
- ], Z.prototype, "open", 2);
3797
- ft([
3822
+ ], X.prototype, "open", 2);
3823
+ vt([
3798
3824
  f({ type: String })
3799
- ], Z.prototype, "position", 2);
3800
- ft([
3825
+ ], X.prototype, "position", 2);
3826
+ vt([
3801
3827
  f({ attribute: !1 })
3802
- ], Z.prototype, "anchor", 2);
3803
- ft([
3828
+ ], X.prototype, "anchor", 2);
3829
+ vt([
3804
3830
  k()
3805
- ], Z.prototype, "isMobile", 2);
3806
- Z = ft([
3807
- H("pc-responsive-modal")
3808
- ], Z);
3809
- var ir = Object.defineProperty, ar = Object.getOwnPropertyDescriptor, F = (e, t, o, r) => {
3810
- for (var s = r > 1 ? void 0 : r ? ar(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3831
+ ], X.prototype, "isMobile", 2);
3832
+ X = vt([
3833
+ Y("pc-responsive-modal")
3834
+ ], X);
3835
+ var ar = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, K = (e, t, o, r) => {
3836
+ for (var s = r > 1 ? void 0 : r ? nr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3811
3837
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
3812
- return r && s && ir(t, o, s), s;
3838
+ return r && s && ar(t, o, s), s;
3813
3839
  };
3814
3840
  let I = class extends g {
3815
3841
  constructor() {
@@ -3823,15 +3849,15 @@ let I = class extends g {
3823
3849
  * Render NPS buttons for edit mode
3824
3850
  */
3825
3851
  renderNpsButtons() {
3826
- const e = Array.from({ length: this.max - this.min + 1 }, (s, i) => i + this.min), t = `nps-control-${this.name || this.type}`, o = tt({
3827
- role: M.GROUP,
3852
+ const e = Array.from({ length: this.max - this.min + 1 }, (s, i) => i + this.min), t = `nps-control-${this.name || this.type}`, o = rt({
3853
+ role: N.GROUP,
3828
3854
  ariaLabel: this.question || "NPS Rating",
3829
3855
  ariaDescribedby: `${t}-description`
3830
3856
  }), r = e.map((s) => {
3831
3857
  const i = this.dataController.isValueSelected(String(s)), a = {
3832
3858
  "nps-button": !0,
3833
3859
  selected: i
3834
- }, l = ko(`Rate ${s}`, i, !1);
3860
+ }, l = Ao(`Rate ${s}`, i, !1);
3835
3861
  return c`
3836
3862
  <button
3837
3863
  data-testid="nps-button-${s}"
@@ -3875,10 +3901,10 @@ let I = class extends g {
3875
3901
  * NPS score displayed prominently in the middle
3876
3902
  */
3877
3903
  renderChart() {
3878
- const e = this.dataController.stats, t = (e == null ? void 0 : e.nps) ?? 0, o = 100, r = 100, s = 80, i = (w) => ({
3879
- x: o + s * Math.cos(w),
3880
- y: r - s * Math.sin(w)
3881
- }), a = i(Math.PI), l = i(Math.PI / 2), n = i(Math.PI / 4), d = i(0), p = (w, mt, Ue = 0) => `M ${w.x} ${w.y} A ${s} ${s} 0 ${Ue} 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);
3904
+ const e = this.dataController.stats, t = (e == null ? void 0 : e.nps) ?? 0, o = 100, r = 100, s = 80, i = (C) => ({
3905
+ x: o + s * Math.cos(C),
3906
+ y: r - s * Math.sin(C)
3907
+ }), a = i(Math.PI), l = i(Math.PI / 2), n = i(Math.PI / 4), d = i(0), p = (C, w, A = 0) => `M ${C.x} ${C.y} A ${s} ${s} 0 ${A} 1 ${w.x} ${w.y}`, h = p(a, l), b = p(l, n), x = p(n, d), z = ((C) => Math.PI - (C + 100) / 200 * Math.PI)(t), M = i(z);
3882
3908
  return c`
3883
3909
  <div class="nps-semicircle-gauge" data-testid="nps-semicircle-gauge">
3884
3910
  <svg viewBox="0 0 200 115">
@@ -3894,7 +3920,7 @@ let I = class extends g {
3894
3920
  <path class="gauge-arc gauge-arc-promoter" d="${x}" />
3895
3921
 
3896
3922
  <!-- Needle indicator -->
3897
- <circle class="gauge-needle" cx="${P.x}" cy="${P.y}" r="5" />
3923
+ <circle class="gauge-needle" cx="${M.x}" cy="${M.y}" r="5" />
3898
3924
 
3899
3925
  <!-- Score display in center -->
3900
3926
  <text class="gauge-score" x="${o}" y="${r - 15}">${t}</text>
@@ -3954,7 +3980,7 @@ let I = class extends g {
3954
3980
  * Uses SVG with 3 colored segments for detractors/passives/promoters
3955
3981
  */
3956
3982
  renderInlineGauge() {
3957
- 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;
3983
+ const e = this.dataController.stats, t = (e == null ? void 0 : e.breakdown) || {}, o = 8, r = 2 * Math.PI * o, s = Mo(t), i = s.detractors + s.passives + s.promoters;
3958
3984
  if (i === 0)
3959
3985
  return c`
3960
3986
  <div class="inline-nps-gauge">
@@ -3963,9 +3989,9 @@ let I = class extends g {
3963
3989
  </svg>
3964
3990
  </div>
3965
3991
  `;
3966
- const a = s.detractors / i * 100, l = s.passives / i * 100, n = s.promoters / i * 100, d = a / 100 * r, p = l / 100 * r, h = n / 100 * r, b = 0, x = -d, E = -(d + p), C = this.getUserScore();
3967
- let P = "gauge-bg";
3968
- return C !== null && (C <= 6 ? P = "gauge-detractor" : C <= 8 ? P = "gauge-passive" : P = "gauge-promoter"), c`
3992
+ const a = s.detractors / i * 100, l = s.passives / i * 100, n = s.promoters / i * 100, d = a / 100 * r, p = l / 100 * r, h = n / 100 * r, b = 0, x = -d, E = -(d + p), z = this.getUserScore();
3993
+ let M = "gauge-bg";
3994
+ return z !== null && (z <= 6 ? M = "gauge-detractor" : z <= 8 ? M = "gauge-passive" : M = "gauge-promoter"), c`
3969
3995
  <div class="inline-nps-gauge">
3970
3996
  <svg viewBox="0 0 20 20">
3971
3997
  <!-- Background circle -->
@@ -3998,7 +4024,7 @@ let I = class extends g {
3998
4024
  stroke-dashoffset="${E}"
3999
4025
  />
4000
4026
  <!-- Center dot showing user's score category -->
4001
- <circle class="gauge-dot ${P}" cx="10" cy="10" r="2" />
4027
+ <circle class="gauge-dot ${M}" cx="10" cy="10" r="2" />
4002
4028
  </svg>
4003
4029
  </div>
4004
4030
  `;
@@ -4009,7 +4035,7 @@ let I = class extends g {
4009
4035
  * Shows add icon when no selection, edit icon when user has submitted
4010
4036
  */
4011
4037
  renderInlineTrigger() {
4012
- const t = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "", r = this.dataController.hasLocalStats() ? St : Te;
4038
+ const t = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "", r = this.dataController.hasLocalStats() ? kt : Ie;
4013
4039
  return c`
4014
4040
  <button
4015
4041
  class="pc-inline-trigger"
@@ -4075,7 +4101,7 @@ let I = class extends g {
4075
4101
  @keydown="${(e) => {
4076
4102
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.displayController.toggleChartVisibility());
4077
4103
  }}"
4078
- >${this.displayController.isChartVisible ? Zt : Gt}</span
4104
+ >${this.displayController.isChartVisible ? Jt : Zt}</span
4079
4105
  >
4080
4106
  `;
4081
4107
  }
@@ -4094,7 +4120,7 @@ let I = class extends g {
4094
4120
  aria-label="Close"
4095
4121
  data-testid="popover-close-button"
4096
4122
  >
4097
- ${At}
4123
+ ${Tt}
4098
4124
  </button>
4099
4125
  ${this.question ? c`<div class="pc-popover-question">${this.question}</div>` : u}
4100
4126
  ${this.renderPopoverNpsButtons()}
@@ -4167,32 +4193,32 @@ let I = class extends g {
4167
4193
  return this.inline ? this.renderInlineMode() : this.readonly ? this.renderReadonlyMode() : this.renderStandardMode();
4168
4194
  }
4169
4195
  };
4170
- I.styles = [...g.styles, Tt, Zo];
4171
- F([
4196
+ I.styles = [...g.styles, Ot, Zo];
4197
+ K([
4172
4198
  f({ type: String, attribute: "min-label" })
4173
4199
  ], I.prototype, "minLabel", 2);
4174
- F([
4200
+ K([
4175
4201
  f({ type: String, attribute: "max-label" })
4176
4202
  ], I.prototype, "maxLabel", 2);
4177
- F([
4203
+ K([
4178
4204
  f({ type: String, attribute: "thank-you-msg" })
4179
4205
  ], I.prototype, "thankYouMsg", 2);
4180
- F([
4206
+ K([
4181
4207
  f({ type: String, attribute: "min-max-position" })
4182
4208
  ], I.prototype, "minMaxPosition", 2);
4183
- F([
4209
+ K([
4184
4210
  k()
4185
4211
  ], I.prototype, "hoverValue", 2);
4186
- F([
4212
+ K([
4187
4213
  k()
4188
4214
  ], I.prototype, "popoverOpen", 2);
4189
- F([
4190
- ht(".pc-inline-trigger")
4215
+ K([
4216
+ mt(".pc-inline-trigger")
4191
4217
  ], I.prototype, "triggerElement", 2);
4192
- I = F([
4193
- H("pc-nps")
4218
+ I = K([
4219
+ Y("pc-nps")
4194
4220
  ], I);
4195
- const nr = R`
4221
+ const lr = U`
4196
4222
  /* CSS variables inherit from parent - defaults are specified at usage sites */
4197
4223
 
4198
4224
  .pc-container {
@@ -4577,12 +4603,12 @@ const nr = R`
4577
4603
  opacity: 0.8;
4578
4604
  }
4579
4605
  `;
4580
- var lr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, gt = (e, t, o, r) => {
4581
- for (var s = r > 1 ? void 0 : r ? cr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
4606
+ var cr = Object.defineProperty, dr = Object.getOwnPropertyDescriptor, bt = (e, t, o, r) => {
4607
+ for (var s = r > 1 ? void 0 : r ? dr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
4582
4608
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
4583
- return r && s && lr(t, o, s), s;
4609
+ return r && s && cr(t, o, s), s;
4584
4610
  };
4585
- let W = class extends g {
4611
+ let Q = class extends g {
4586
4612
  constructor() {
4587
4613
  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";
4588
4614
  }
@@ -4640,16 +4666,16 @@ let W = class extends g {
4640
4666
  */
4641
4667
  renderOptionIcon(e) {
4642
4668
  if (!(e != null && e.icon)) return "";
4643
- const t = Xt.DECORATIVE, o = (e == null ? void 0 : e.label) || "", r = e ? this.dataController.isValueSelected(e.value) : !1, s = De(e == null ? void 0 : e.icon, {
4669
+ const t = Qt.DECORATIVE, o = (e == null ? void 0 : e.label) || "", r = e ? this.dataController.isValueSelected(e.value) : !1, s = Ue(e == null ? void 0 : e.icon, {
4644
4670
  type: t,
4645
4671
  alt: o,
4646
4672
  isSelected: r
4647
4673
  });
4648
- return Ne(e == null ? void 0 : e.icon) ? c`<span
4674
+ return Be(e == null ? void 0 : e.icon) ? c`<span
4649
4675
  class="poll-option-icon"
4650
4676
  aria-hidden="${s.ariaHidden ? "true" : "false"}"
4651
4677
  >${e == null ? void 0 : e.icon}</span
4652
- >` : Pt(e == null ? void 0 : e.icon) ? c`<img
4678
+ >` : _t(e == null ? void 0 : e.icon) ? c`<img
4653
4679
  src="${e == null ? void 0 : e.icon}"
4654
4680
  alt="${s.alt}"
4655
4681
  class="poll-option-icon-img"
@@ -4665,7 +4691,7 @@ let W = class extends g {
4665
4691
  * Renders the selection indicator (checkbox or radio button) with proper ARIA roles
4666
4692
  */
4667
4693
  renderSelectionIndicator() {
4668
- const e = this.multiple ? M.CHECKBOX : M.RADIO;
4694
+ const e = this.multiple ? N.CHECKBOX : N.RADIO;
4669
4695
  return this.multiple ? c`<span class="poll-checkbox" role="${e}"></span>` : c`<span class="poll-radio" role="${e}"></span>`;
4670
4696
  }
4671
4697
  /**
@@ -4677,7 +4703,7 @@ let W = class extends g {
4677
4703
  selected: o,
4678
4704
  "poll-option--compact": this.compact,
4679
4705
  "poll-option--disabled": r
4680
- }, i = t + 1, a = `poll-${this.type}-${i}`, l = Eo(
4706
+ }, i = t + 1, a = `poll-${this.type}-${i}`, l = Po(
4681
4707
  e.label,
4682
4708
  o,
4683
4709
  r,
@@ -4711,7 +4737,7 @@ let W = class extends g {
4711
4737
  */
4712
4738
  renderPollOptions() {
4713
4739
  var s;
4714
- const e = this.multiple ? M.GROUP : M.RADIOGROUP, t = this.question || this.name || "Options", o = tt({
4740
+ const e = this.multiple ? N.GROUP : N.RADIOGROUP, t = this.question || this.name || "Options", o = rt({
4715
4741
  role: e,
4716
4742
  ariaLabel: t
4717
4743
  });
@@ -4742,7 +4768,7 @@ let W = class extends g {
4742
4768
  percentage: x,
4743
4769
  isSelected: E
4744
4770
  };
4745
- }), s = this.multiple ? M.GROUP : M.RADIOGROUP, i = this.question || this.name || "Options", a = tt({
4771
+ }), s = this.multiple ? N.GROUP : N.RADIOGROUP, i = this.question || this.name || "Options", a = rt({
4746
4772
  role: s,
4747
4773
  ariaLabel: i
4748
4774
  });
@@ -4835,7 +4861,7 @@ let W = class extends g {
4835
4861
  * Shows add icon when no selection, edit icon when user has submitted
4836
4862
  */
4837
4863
  renderInlineTrigger() {
4838
- const t = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "", r = this.dataController.hasLocalStats() ? St : Te;
4864
+ const t = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "", r = this.dataController.hasLocalStats() ? kt : Ie;
4839
4865
  return c`
4840
4866
  <button
4841
4867
  class="pc-inline-trigger"
@@ -4894,7 +4920,7 @@ let W = class extends g {
4894
4920
  aria-label="Close"
4895
4921
  data-testid="popover-close-button"
4896
4922
  >
4897
- ${At}
4923
+ ${Tt}
4898
4924
  </button>
4899
4925
  ${this.question ? c`<div class="pc-popover-question">${this.question}</div>` : u}
4900
4926
  ${e ? this.renderBarChart() : this.renderPollOptions()}
@@ -4911,7 +4937,7 @@ let W = class extends g {
4911
4937
  @keydown=${(s) => {
4912
4938
  (s.key === "Enter" || s.key === " ") && (s.preventDefault(), this.handlePopoverEditClick());
4913
4939
  }}
4914
- >${St}</span
4940
+ >${kt}</span
4915
4941
  >` : u}
4916
4942
  </div>` : u}
4917
4943
  </div>
@@ -4975,8 +5001,8 @@ let W = class extends g {
4975
5001
  "pc-body": !0,
4976
5002
  [`pc-flex-pos-${this.statsPosition}`]: !0,
4977
5003
  [`pc-flex-align-${o}`]: !0
4978
- }, s = tt({
4979
- role: M.REGION,
5004
+ }, s = rt({
5005
+ role: N.REGION,
4980
5006
  ariaLabel: this.question || this.name || "Poll"
4981
5007
  });
4982
5008
  return c`
@@ -4997,23 +5023,23 @@ let W = class extends g {
4997
5023
  return this.inline ? this.renderInlineMode() : this.readonly ? this.renderReadonlyMode() : this.renderStandardMode();
4998
5024
  }
4999
5025
  };
5000
- W.styles = [...g.styles, Tt, nr];
5001
- gt([
5026
+ Q.styles = [...g.styles, Ot, lr];
5027
+ bt([
5002
5028
  f({ type: Boolean })
5003
- ], W.prototype, "multiple", 2);
5004
- gt([
5029
+ ], Q.prototype, "multiple", 2);
5030
+ bt([
5005
5031
  f({ type: Boolean })
5006
- ], W.prototype, "compact", 2);
5007
- gt([
5032
+ ], Q.prototype, "compact", 2);
5033
+ bt([
5008
5034
  k()
5009
- ], W.prototype, "popoverOpen", 2);
5010
- gt([
5011
- ht(".pc-inline-trigger")
5012
- ], W.prototype, "triggerElement", 2);
5013
- W = gt([
5014
- H("pc-poll")
5015
- ], W);
5016
- const dr = R`
5035
+ ], Q.prototype, "popoverOpen", 2);
5036
+ bt([
5037
+ mt(".pc-inline-trigger")
5038
+ ], Q.prototype, "triggerElement", 2);
5039
+ Q = bt([
5040
+ Y("pc-poll")
5041
+ ], Q);
5042
+ const pr = U`
5017
5043
  /* CSS variables inherit from parent - defaults are specified at usage sites */
5018
5044
 
5019
5045
  .pc-section {
@@ -5200,10 +5226,10 @@ const dr = R`
5200
5226
  * Copyright 2018 Google LLC
5201
5227
  * SPDX-License-Identifier: BSD-3-Clause
5202
5228
  */
5203
- const Ve = "important", pr = " !" + Ve, ur = je(class extends Be {
5229
+ const He = "important", ur = " !" + He, hr = je(class extends qe {
5204
5230
  constructor(e) {
5205
5231
  var t;
5206
- if (super(e), e.type !== Re.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.");
5232
+ if (super(e), e.type !== Ve.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.");
5207
5233
  }
5208
5234
  render(e) {
5209
5235
  return Object.keys(e).reduce((t, o) => {
@@ -5219,14 +5245,14 @@ const Ve = "important", pr = " !" + Ve, ur = je(class extends Be {
5219
5245
  const s = t[r];
5220
5246
  if (s != null) {
5221
5247
  this.ft.add(r);
5222
- const i = typeof s == "string" && s.endsWith(pr);
5223
- r.includes("-") || i ? o.setProperty(r, i ? s.slice(0, -11) : s, i ? Ve : "") : o[r] = s;
5248
+ const i = typeof s == "string" && s.endsWith(ur);
5249
+ r.includes("-") || i ? o.setProperty(r, i ? s.slice(0, -11) : s, i ? He : "") : o[r] = s;
5224
5250
  }
5225
5251
  }
5226
- return U;
5252
+ return H;
5227
5253
  }
5228
5254
  });
5229
- function xt(e, t = {}) {
5255
+ function $t(e, t = {}) {
5230
5256
  if (!e || e.length === 0)
5231
5257
  return c`<div class="pc-bar-chart pc-bar-chart--empty">No data available</div>`;
5232
5258
  const o = Math.max(...e.map((i) => i.value)), s = { ...{
@@ -5255,7 +5281,7 @@ function xt(e, t = {}) {
5255
5281
  </div>
5256
5282
  `;
5257
5283
  }
5258
- const we = {
5284
+ const Ce = {
5259
5285
  // Faces
5260
5286
  smile: "😊",
5261
5287
  laugh: "😄",
@@ -5398,19 +5424,19 @@ const we = {
5398
5424
  hiking: "🥾",
5399
5425
  yoga: "🧘"
5400
5426
  };
5401
- function kt(e) {
5427
+ function At(e) {
5402
5428
  let t = "❓", o = !1;
5403
- return e ? e in we ? t = we[e] : Ne(e) ? t = e : Pt(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 = "❓", {
5429
+ return e ? e in Ce ? t = Ce[e] : Be(e) ? t = e : _t(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 = "❓", {
5404
5430
  icon: t,
5405
5431
  isRemoteImage: o
5406
5432
  };
5407
5433
  }
5408
- var hr = Object.defineProperty, fr = Object.getOwnPropertyDescriptor, st = (e, t, o, r) => {
5409
- for (var s = r > 1 ? void 0 : r ? fr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
5434
+ var fr = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, nt = (e, t, o, r) => {
5435
+ for (var s = r > 1 ? void 0 : r ? gr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
5410
5436
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
5411
- return r && s && hr(t, o, s), s;
5437
+ return r && s && fr(t, o, s), s;
5412
5438
  };
5413
- let q = class extends g {
5439
+ let F = class extends g {
5414
5440
  constructor() {
5415
5441
  super(), this.type = S.stars, this.icon = "★", this.numStars = 5, this.hoverValue = -1, this.popoverOpen = !1, this.handleStarKeyDown = (e) => {
5416
5442
  if (e.key === "Enter" || e.key === " ") {
@@ -5433,14 +5459,14 @@ let q = class extends g {
5433
5459
  * Renders the star icon using resolveIcon for emoji, URL, or MDI support
5434
5460
  */
5435
5461
  renderStarIcon() {
5436
- const { icon: e, isRemoteImage: t } = kt(this.icon);
5462
+ const { icon: e, isRemoteImage: t } = At(this.icon);
5437
5463
  return t ? c`<img class="star-icon-img" src="${e}" alt="star" />` : e;
5438
5464
  }
5439
5465
  /**
5440
5466
  * Gets the resolved icon string (for use in chart labels)
5441
5467
  */
5442
5468
  getResolvedIconString() {
5443
- const { icon: e, isRemoteImage: t } = kt(this.icon);
5469
+ const { icon: e, isRemoteImage: t } = At(this.icon);
5444
5470
  return t ? "★" : e;
5445
5471
  }
5446
5472
  /**
@@ -5456,17 +5482,17 @@ let q = class extends g {
5456
5482
  selected: h,
5457
5483
  partial: b,
5458
5484
  "view-mode": !a
5459
- }, E = b ? { "--partial-fill": `${i % 1 * 100}%` } : {}, C = e ? () => this.handlePopoverStarClick(d) : () => this.handleStarClick(d);
5485
+ }, E = b ? { "--partial-fill": `${i % 1 * 100}%` } : {}, z = e ? () => this.handlePopoverStarClick(d) : () => this.handleStarClick(d);
5460
5486
  return c`
5461
5487
  <div class="pc-section" data-testid="pc-section">
5462
5488
  <span
5463
5489
  data-testid="${e ? "popover" : "stars-view"}-star-${d}"
5464
5490
  class=${y(x)}
5465
- style=${ur(E)}
5491
+ style=${hr(E)}
5466
5492
  role="${a ? "button" : "presentation"}"
5467
5493
  tabindex="${a ? "0" : ""}"
5468
5494
  aria-label="${a ? `Rate ${d} star${d > 1 ? "s" : ""}` : ""}"
5469
- @click="${C}"
5495
+ @click="${z}"
5470
5496
  @mouseenter="${() => this.handleStarHover(d)}"
5471
5497
  @focus="${() => this.handleStarHover(d)}"
5472
5498
  @mouseleave="${this.handleStarLeave}"
@@ -5490,7 +5516,7 @@ let q = class extends g {
5490
5516
  label: n,
5491
5517
  value: d,
5492
5518
  icon: r
5493
- })), a = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", l = xt(s, {
5519
+ })), a = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", l = $t(s, {
5494
5520
  barColor: a,
5495
5521
  labelFormatter: (n) => `${n.label} ${n.icon}`,
5496
5522
  valueFormatter: (n) => `${o > 0 ? Math.round(n.value / o * 100) : 0}%`
@@ -5590,7 +5616,7 @@ let q = class extends g {
5590
5616
  aria-label="Close"
5591
5617
  data-testid="popover-close-button"
5592
5618
  >
5593
- ${At}
5619
+ ${Tt}
5594
5620
  </button>
5595
5621
  ${this.question ? c`<div class="pc-popover-question">${this.question}</div>` : u}
5596
5622
  ${this.renderStars(!0)}
@@ -5613,7 +5639,7 @@ let q = class extends g {
5613
5639
  label: n,
5614
5640
  value: d,
5615
5641
  icon: r
5616
- })), a = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", l = xt(s, {
5642
+ })), a = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", l = $t(s, {
5617
5643
  barColor: a,
5618
5644
  labelFormatter: (n) => `${n.label} ${n.icon}`,
5619
5645
  valueFormatter: (n) => `${o > 0 ? Math.round(n.value / o * 100) : 0}%`
@@ -5639,7 +5665,7 @@ let q = class extends g {
5639
5665
  @keydown="${(e) => {
5640
5666
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.displayController.toggleChartVisibility());
5641
5667
  }}"
5642
- >${this.displayController.isChartVisible ? Zt : Gt}</span
5668
+ >${this.displayController.isChartVisible ? Jt : Zt}</span
5643
5669
  >
5644
5670
  `;
5645
5671
  }
@@ -5682,7 +5708,7 @@ let q = class extends g {
5682
5708
  label: n,
5683
5709
  value: d,
5684
5710
  icon: r
5685
- })), a = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", l = xt(s, {
5711
+ })), a = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", l = $t(s, {
5686
5712
  barColor: a,
5687
5713
  labelFormatter: (n) => `${n.label} ${n.icon}`,
5688
5714
  valueFormatter: (n) => `${o > 0 ? Math.round(n.value / o * 100) : 0}%`
@@ -5720,26 +5746,26 @@ let q = class extends g {
5720
5746
  return this.inline ? this.renderInlineMode() : this.readonly ? this.renderReadonlyMode() : this.renderStandardMode();
5721
5747
  }
5722
5748
  };
5723
- q.styles = [...g.styles, Tt, dr];
5724
- st([
5749
+ F.styles = [...g.styles, Ot, pr];
5750
+ nt([
5725
5751
  f({ type: String })
5726
- ], q.prototype, "icon", 2);
5727
- st([
5752
+ ], F.prototype, "icon", 2);
5753
+ nt([
5728
5754
  f({ type: Number, attribute: "num-stars" })
5729
- ], q.prototype, "numStars", 2);
5730
- st([
5755
+ ], F.prototype, "numStars", 2);
5756
+ nt([
5731
5757
  k()
5732
- ], q.prototype, "hoverValue", 2);
5733
- st([
5758
+ ], F.prototype, "hoverValue", 2);
5759
+ nt([
5734
5760
  k()
5735
- ], q.prototype, "popoverOpen", 2);
5736
- st([
5737
- ht(".pc-inline-trigger")
5738
- ], q.prototype, "triggerElement", 2);
5739
- q = st([
5740
- H("pc-stars")
5741
- ], q);
5742
- const gr = R`
5761
+ ], F.prototype, "popoverOpen", 2);
5762
+ nt([
5763
+ mt(".pc-inline-trigger")
5764
+ ], F.prototype, "triggerElement", 2);
5765
+ F = nt([
5766
+ Y("pc-stars")
5767
+ ], F);
5768
+ const mr = U`
5743
5769
  /* Adjust stats text for reactions */
5744
5770
  .pc-stats-text {
5745
5771
  font-size: var(--pc-font-size-small, var(--default-font-size-small));
@@ -6002,13 +6028,13 @@ const gr = R`
6002
6028
  animation: none;
6003
6029
  }
6004
6030
  }
6005
- `, 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";
6006
- var vr = Object.defineProperty, br = Object.getOwnPropertyDescriptor, _t = (e, t, o, r) => {
6007
- for (var s = r > 1 ? void 0 : r ? br(t, o) : t, i = e.length - 1, a; i >= 0; i--)
6031
+ `, vr = "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";
6032
+ var br = Object.defineProperty, yr = Object.getOwnPropertyDescriptor, It = (e, t, o, r) => {
6033
+ for (var s = r > 1 ? void 0 : r ? yr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
6008
6034
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
6009
- return r && s && vr(t, o, s), s;
6035
+ return r && s && br(t, o, s), s;
6010
6036
  };
6011
- let ot = class extends g {
6037
+ let it = class extends g {
6012
6038
  constructor() {
6013
6039
  super(), this.type = S.reaction, this.showCounts = !1, this.compact = !1, this.popupPosition = "auto", this.hasEditButton = !1, this.statsText = "{count} votes", this.buttonRadius = "990px", this.muteColor = "#cccccc", this.questionPosition = "top", this.statsPosition = "right", this.popupPosition = "auto";
6014
6040
  }
@@ -6032,7 +6058,7 @@ let ot = class extends g {
6032
6058
  * Renders the icon for a reaction
6033
6059
  */
6034
6060
  renderReactionIcon(e, t) {
6035
- const { icon: o, isRemoteImage: r } = kt(e), s = Xt.FUNCTIONAL, i = t.tooltip || `${t.value} reaction`, a = De(o, {
6061
+ const { icon: o, isRemoteImage: r } = At(e), s = Qt.FUNCTIONAL, i = t.tooltip || `${t.value} reaction`, a = Ue(o, {
6036
6062
  type: s,
6037
6063
  alt: i,
6038
6064
  ariaLabel: i,
@@ -6086,7 +6112,7 @@ let ot = class extends g {
6086
6112
  aria-expanded="${this.displayController.shouldShowReactionPopover()}"
6087
6113
  aria-haspopup="true"
6088
6114
  >
6089
- <img src="${mr}" alt="" class="trigger-icon" />
6115
+ <img src="${vr}" alt="" class="trigger-icon" />
6090
6116
  </button>
6091
6117
  `;
6092
6118
  }
@@ -6184,7 +6210,7 @@ let ot = class extends g {
6184
6210
  icon: (p == null ? void 0 : p.icon) || n
6185
6211
  // Use the icon or fall back to reaction value
6186
6212
  };
6187
- }), r = getComputedStyle(this), s = r.getPropertyValue("--pc-primary-color").trim(), a = r.getPropertyValue("--pc-accent-color").trim() || s || "#ffc107", l = xt(o, {
6213
+ }), r = getComputedStyle(this), s = r.getPropertyValue("--pc-primary-color").trim(), a = r.getPropertyValue("--pc-accent-color").trim() || s || "#ffc107", l = $t(o, {
6188
6214
  barColor: a,
6189
6215
  labelFormatter: (n) => `${n.label}`,
6190
6216
  valueFormatter: (n) => `${e.totalCount > 0 ? Math.round(n.value / e.totalCount * 100) : 0}%`
@@ -6248,35 +6274,35 @@ let ot = class extends g {
6248
6274
  return this.readonly ? this.renderReadonlyMode() : this.renderStandardMode();
6249
6275
  }
6250
6276
  };
6251
- ot.styles = [...g.styles, Tt, gr];
6252
- _t([
6277
+ it.styles = [...g.styles, Ot, mr];
6278
+ It([
6253
6279
  f({ type: Boolean, attribute: "show-counts" })
6254
- ], ot.prototype, "showCounts", 2);
6255
- _t([
6280
+ ], it.prototype, "showCounts", 2);
6281
+ It([
6256
6282
  f({ type: Boolean, reflect: !0 })
6257
- ], ot.prototype, "compact", 2);
6258
- _t([
6283
+ ], it.prototype, "compact", 2);
6284
+ It([
6259
6285
  f({ type: String, attribute: "popup-position" })
6260
- ], ot.prototype, "popupPosition", 2);
6261
- ot = _t([
6262
- H("pc-reaction")
6263
- ], ot);
6264
- function at(e, t, o = void 0) {
6286
+ ], it.prototype, "popupPosition", 2);
6287
+ it = It([
6288
+ Y("pc-reaction")
6289
+ ], it);
6290
+ function ct(e, t, o = void 0) {
6265
6291
  const r = e.getAttribute(t);
6266
6292
  return r === null ? o : r == null ? void 0 : r.trim();
6267
6293
  }
6268
- function yr(e, t = void 0) {
6294
+ function xr(e, t = void 0) {
6269
6295
  const o = e.textContent;
6270
6296
  return o === "" || o === null ? t : o == null ? void 0 : o.trim();
6271
6297
  }
6272
- var xr = Object.defineProperty, wr = Object.getOwnPropertyDescriptor, Ot = (e, t, o, r) => {
6273
- for (var s = r > 1 ? void 0 : r ? wr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
6298
+ var wr = Object.defineProperty, $r = Object.getOwnPropertyDescriptor, zt = (e, t, o, r) => {
6299
+ for (var s = r > 1 ? void 0 : r ? $r(t, o) : t, i = e.length - 1, a; i >= 0; i--)
6274
6300
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
6275
- return r && s && xr(t, o, s), s;
6301
+ return r && s && wr(t, o, s), s;
6276
6302
  };
6277
- let rt = class extends N {
6303
+ let at = class extends R {
6278
6304
  constructor() {
6279
- super(), this.options = "", this.parsedOptions = [], rt.injectGlobalStyle();
6305
+ super(), this.options = "", this.parsedOptions = [], at.injectGlobalStyle();
6280
6306
  }
6281
6307
  /**
6282
6308
  * Inject global style to hide poll-catch-option elements
@@ -6335,16 +6361,16 @@ let rt = class extends N {
6335
6361
  const e = this.querySelector("pc-poll, pc-reaction");
6336
6362
  if (!e) return;
6337
6363
  const t = this.querySelectorAll("poll-catch-option");
6338
- let r = Bo(this.options).map((s) => ({
6364
+ let r = Vo(this.options).map((s) => ({
6339
6365
  value: s,
6340
6366
  label: s,
6341
6367
  icon: e.tagName === "PC-REACTION" ? s : void 0
6342
6368
  // REACTION widget uses options for the icon
6343
6369
  }));
6344
6370
  t && t.length > 0 && (r = Array.from(t).map((s) => {
6345
- 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 };
6371
+ const i = ct(s, "value", "") || "", a = ct(s, "label", xr(s, i)) || "", l = ct(s, "icon", void 0), n = ct(s, "tooltip", void 0), d = ct(s, "disabled", void 0), p = { value: i, label: a };
6346
6372
  if (l !== void 0) {
6347
- const h = kt(l);
6373
+ const h = At(l);
6348
6374
  p.icon = h.icon;
6349
6375
  }
6350
6376
  return n !== void 0 && (p.tooltip = n), d !== void 0 && (p.disabled = !0), p;
@@ -6370,18 +6396,18 @@ let rt = class extends N {
6370
6396
  }
6371
6397
  }
6372
6398
  };
6373
- Ot([
6399
+ zt([
6374
6400
  f({ type: String })
6375
- ], rt.prototype, "type", 2);
6376
- Ot([
6401
+ ], at.prototype, "type", 2);
6402
+ zt([
6377
6403
  f({ type: String })
6378
- ], rt.prototype, "options", 2);
6379
- Ot([
6404
+ ], at.prototype, "options", 2);
6405
+ zt([
6380
6406
  k()
6381
- ], rt.prototype, "parsedOptions", 2);
6382
- rt = Ot([
6383
- H("poll-catch")
6384
- ], rt);
6407
+ ], at.prototype, "parsedOptions", 2);
6408
+ at = zt([
6409
+ Y("poll-catch")
6410
+ ], at);
6385
6411
  export {
6386
- rt as PollCatch
6412
+ at as PollCatch
6387
6413
  };