pollcatch 2.1.3 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/pc.js +97 -91
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pollcatch",
3
3
  "private": false,
4
- "version": "2.1.3",
4
+ "version": "2.1.4",
5
5
  "type": "module",
6
6
  "main": "pc.js",
7
7
  "module": "pc.js",
package/pc.js CHANGED
@@ -744,7 +744,7 @@ function ro(e) {
744
744
  }
745
745
  };
746
746
  }
747
- const b = ro("Pollcatch");
747
+ const m = ro("Pollcatch");
748
748
  var me = /* @__PURE__ */ ((e) => (e[e.AA_NORMAL = 4.5] = "AA_NORMAL", e[e.AA_LARGE = 3] = "AA_LARGE", e[e.AAA_NORMAL = 7] = "AAA_NORMAL", e[e.AAA_LARGE = 4.5] = "AAA_LARGE", e))(me || {});
749
749
  const so = {
750
750
  black: "#000000",
@@ -777,7 +777,7 @@ function te(e) {
777
777
  }
778
778
  function ao(e, t = {}) {
779
779
  if (!C(e).isValid())
780
- return b.warn(`Invalid color provided: ${e}`), "black";
780
+ return m.warn(`Invalid color provided: ${e}`), "black";
781
781
  const {
782
782
  minContrast: r = 4.5,
783
783
  colorOptions: s = ["black", "white", "light", "dark"],
@@ -800,7 +800,7 @@ function ao(e, t = {}) {
800
800
  const w = St(e, h);
801
801
  w > p && (p = w, l = h);
802
802
  }
803
- b.warn(
803
+ m.warn(
804
804
  `No color option met the minimum contrast ratio of ${r}:1 against ${e}. Using ${l} with contrast ratio ${p.toFixed(2)}:1 instead.`
805
805
  );
806
806
  }
@@ -809,7 +809,7 @@ function ao(e, t = {}) {
809
809
  function no(e) {
810
810
  const o = io(e) || e, r = C(o);
811
811
  if (!r.isValid())
812
- return b.warn(`Invalid color provided: ${e}`), { r: 0, g: 0, b: 0 };
812
+ return m.warn(`Invalid color provided: ${e}`), { r: 0, g: 0, b: 0 };
813
813
  const { r: s, g: i, b: a } = r.toRgb();
814
814
  return { r: s, g: i, b: a };
815
815
  }
@@ -901,17 +901,17 @@ function ho(e) {
901
901
  return /^(#[0-9a-fA-F]{3,8}|rgb\([^)]+\)|rgba\([^)]+\)|hsl\([^)]+\)|hsla\([^)]+\)|[a-zA-Z]+)$/.test(t);
902
902
  }
903
903
  function R(e) {
904
- return ho(e) ? e.replace(/[<>"']/g, "").trim() : (b.warn("Invalid color value:", e), "#000000");
904
+ return ho(e) ? e.replace(/[<>"']/g, "").trim() : (m.warn("Invalid color value:", e), "#000000");
905
905
  }
906
906
  function fo(e) {
907
907
  if (typeof e != "string")
908
- return b.warn("Non-string value passed to sanitizeCSS:", typeof e), "";
908
+ return m.warn("Non-string value passed to sanitizeCSS:", typeof e), "";
909
909
  let t = e;
910
910
  return t = t.replace(/@import[^;]+;/gi, "").replace(/expression\s*\([^)]*\)/gi, "").replace(/javascript:\s*[^"'\s;]*/gi, "").replace(/url\s*\(\s*["']?data:(?!image\/[^;]+;base64,)[^"')]*["']?\s*\)/gi, "").replace(/-moz-binding\s*:[^;]+;/gi, "").replace(/behavior\s*:[^;]+;/gi, ""), t;
911
911
  }
912
912
  const ee = "https://jpxwfjorwcsrqraorpbj.supabase.co/functions/v1/data", mo = "pc_session_id", bo = 24 * 60 * 60 * 1e3;
913
913
  function oe() {
914
- return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : (b.warn("crypto.randomUUID not available, using fallback UUID generator"), "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
914
+ return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : (m.warn("crypto.randomUUID not available, using fallback UUID generator"), "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
915
915
  const t = Math.random() * 16 | 0;
916
916
  return (e === "x" ? t : t & 3 | 8).toString(16);
917
917
  }));
@@ -921,7 +921,7 @@ function Tt() {
921
921
  try {
922
922
  return localStorage.setItem(e, e), localStorage.removeItem(e), !0;
923
923
  } catch {
924
- return b.warn("localStorage not available, session ID will not persist"), !1;
924
+ return m.warn("localStorage not available, session ID will not persist"), !1;
925
925
  }
926
926
  }
927
927
  function be(e) {
@@ -929,7 +929,7 @@ function be(e) {
929
929
  const t = localStorage.getItem(e);
930
930
  return t ? JSON.parse(t) : void 0;
931
931
  } catch (t) {
932
- b.warn(`Failed to get item from localStorage: ${e}`, t);
932
+ m.warn(`Failed to get item from localStorage: ${e}`, t);
933
933
  return;
934
934
  }
935
935
  }
@@ -937,29 +937,29 @@ function ge(e, t) {
937
937
  try {
938
938
  return localStorage.setItem(e, JSON.stringify(t)), !0;
939
939
  } catch (o) {
940
- return b.warn(`Failed to set item in localStorage: ${e}`, o), !1;
940
+ return m.warn(`Failed to set item in localStorage: ${e}`, o), !1;
941
941
  }
942
942
  }
943
943
  async function go() {
944
944
  if (typeof window < "u") {
945
945
  if (window.pcProject !== void 0)
946
- return b.debug("Found project key in global variable"), window.pcProject;
946
+ return m.debug("Found project key in global variable"), window.pcProject;
947
947
  const e = document.querySelectorAll("script[pc-project]");
948
948
  if (e.length > 0) {
949
949
  const t = e[e.length - 1], o = t == null ? void 0 : t.getAttribute("pc-project");
950
950
  if (o)
951
- return b.debug("Found project key in script tag attribute"), o;
951
+ return m.debug("Found project key in script tag attribute"), o;
952
952
  }
953
953
  }
954
- b.warn("No project key found in global variable or script tags");
954
+ m.warn("No project key found in global variable or script tags");
955
955
  }
956
956
  async function re() {
957
957
  const e = mo, t = bo;
958
958
  if (Tt()) {
959
959
  const o = be(e);
960
960
  if (o && o.id && o.timestamp && Date.now() - o.timestamp < t)
961
- return b.debug("Using existing session ID from localStorage"), o.id;
962
- b.debug(
961
+ return m.debug("Using existing session ID from localStorage"), o.id;
962
+ m.debug(
963
963
  o ? "Session ID expired" : "No session ID found",
964
964
  "generating new one"
965
965
  );
@@ -967,10 +967,10 @@ async function re() {
967
967
  return ge(e, {
968
968
  id: r,
969
969
  timestamp: Date.now()
970
- }) ? b.debug("Generated and stored new session ID") : b.warn("Generated session ID but failed to store it"), r;
970
+ }) ? m.debug("Generated and stored new session ID") : m.warn("Generated session ID but failed to store it"), r;
971
971
  } else {
972
972
  const o = oe();
973
- return b.debug("Generated non-persistent session ID"), o;
973
+ return m.debug("Generated non-persistent session ID"), o;
974
974
  }
975
975
  }
976
976
  function lt(e) {
@@ -1003,16 +1003,16 @@ function vo(e) {
1003
1003
  const t = be(e);
1004
1004
  return t ? { ...O(), ...t } : O();
1005
1005
  } catch (t) {
1006
- return b.warn("Failed to load localStats from localStorage", t), O();
1006
+ return m.warn("Failed to load localStats from localStorage", t), O();
1007
1007
  }
1008
1008
  }
1009
1009
  function yo(e, t) {
1010
1010
  if (!Tt())
1011
1011
  return !1;
1012
1012
  try {
1013
- return ge(e, t) ? (b.debug("Saved localStats to localStorage", t), !0) : !1;
1013
+ return ge(e, t) ? (m.debug("Saved localStats to localStorage", t), !0) : !1;
1014
1014
  } catch (o) {
1015
- return b.warn("Failed to save localStats to localStorage", o), !1;
1015
+ return m.warn("Failed to save localStats to localStorage", o), !1;
1016
1016
  }
1017
1017
  }
1018
1018
  function wo(e, t) {
@@ -1127,8 +1127,6 @@ class Ao {
1127
1127
  this.isLoading = !1, this.stats = this.localStats, this.host.requestUpdate();
1128
1128
  try {
1129
1129
  const o = await this.getProjectId(), r = t.name, s = t.type;
1130
- if (!r)
1131
- throw new Error("Name parameter is required");
1132
1130
  let i;
1133
1131
  if (t.dataFunc && typeof window < "u") {
1134
1132
  const w = t.dataFunc.replace(/^window\./, "").split(".");
@@ -1137,23 +1135,31 @@ class Ao {
1137
1135
  if (v = v == null ? void 0 : v[E], v === void 0) break;
1138
1136
  i = v;
1139
1137
  }
1140
- let a;
1138
+ let a, n;
1141
1139
  if (i && typeof i == "function")
1142
- b.debug(`Using data function for: ${r}`, {
1140
+ if (m.debug(`Using data function for: ${r}`, {
1143
1141
  dataFuncName: t.dataFunc,
1144
1142
  projectKey: o
1145
- }), a = await i(o, r);
1143
+ }), a = await i(o, r), a && typeof a == "object" && "success" in a && "data" in a) {
1144
+ if (!a.success)
1145
+ throw m.error("Custom data function returned unsuccessful response", a), new Error("Custom data function returned unsuccessful response");
1146
+ n = a.data || {};
1147
+ } else
1148
+ n = a || {};
1146
1149
  else {
1147
- const h = t.dataEndpoint || ee, w = `${h}/${encodeURIComponent(o)}/${encodeURIComponent(r)}`;
1148
- b.debug(`Fetching stats for: ${r}`, { endpoint: h, projectKey: o });
1150
+ const h = t.dataEndpoint || ee;
1151
+ if (!r)
1152
+ throw new Error("Name parameter is required");
1153
+ const w = `${h}/${encodeURIComponent(o)}/${encodeURIComponent(r)}`;
1154
+ m.debug(`Fetching stats for: ${r}`, { endpoint: h, projectKey: o });
1149
1155
  const v = await fetch(w);
1150
1156
  if (!v.ok)
1151
1157
  throw new Error(`API request failed with status: ${v.status}`);
1152
- a = await v.json();
1158
+ if (a = await v.json(), !a.success)
1159
+ throw m.error("Backend returned unsuccessful response", a), new Error("Backend returned unsuccessful response");
1160
+ n = a.data || {};
1153
1161
  }
1154
- if (!a.success)
1155
- throw b.error("Backend returned unsuccessful response", a), new Error("Backend returned unsuccessful response");
1156
- const n = a.data || {}, l = n.count > 0 ? Math.round(n.sum / n.count) : 0, p = Math.round(n.sum / n.count * 100), c = {
1162
+ const l = n.count > 0 ? Math.round(n.sum / n.count) : 0, p = Math.round(n.sum / n.count * 100), c = {
1157
1163
  count: n.count ?? 0,
1158
1164
  sum: n.sum,
1159
1165
  avg: l,
@@ -1164,7 +1170,7 @@ class Ao {
1164
1170
  };
1165
1171
  this.stats = c;
1166
1172
  } catch (o) {
1167
- throw b.error("Error loading stats:", o, this.localStats), o;
1173
+ throw m.error("Error loading stats:", o, this.localStats), o;
1168
1174
  } finally {
1169
1175
  this.isLoading = !1, this.host.requestUpdate();
1170
1176
  }
@@ -1176,9 +1182,9 @@ class Ao {
1176
1182
  const t = await this.getLocalStatsKey();
1177
1183
  try {
1178
1184
  const o = vo(t);
1179
- b.debug("Loaded localStats from localStorage", o), this.localStats = o;
1185
+ m.debug("Loaded localStats from localStorage", o), this.localStats = o;
1180
1186
  } catch (o) {
1181
- b.warn("Failed to generate localStorage key for localStats", o), this.localStats = O();
1187
+ m.warn("Failed to generate localStorage key for localStats", o), this.localStats = O();
1182
1188
  }
1183
1189
  this.host.requestUpdate();
1184
1190
  }
@@ -1188,9 +1194,9 @@ class Ao {
1188
1194
  async persistLocalStats() {
1189
1195
  try {
1190
1196
  const t = await this.getLocalStatsKey();
1191
- yo(t, this.localStats) || b.warn("Failed to save localStats to localStorage");
1197
+ yo(t, this.localStats) || m.warn("Failed to save localStats to localStorage");
1192
1198
  } catch (t) {
1193
- b.warn("Failed to save localStats to localStorage", t);
1199
+ m.warn("Failed to save localStats to localStorage", t);
1194
1200
  }
1195
1201
  }
1196
1202
  /**
@@ -1218,14 +1224,14 @@ class Ao {
1218
1224
  }, o && o.length > 0)
1219
1225
  for (const s of o)
1220
1226
  s && (this.localStats.breakdown[s] = 1);
1221
- this.stats = $o(this.stats, this.localStats), b.debug("Stats updated - remote: ", this.stats), b.debug("Stats updated - local: ", this.stats), this.persistLocalStats(), this.host.requestUpdate();
1227
+ this.stats = $o(this.stats, this.localStats), m.debug("Stats updated - remote: ", this.stats), m.debug("Stats updated - local: ", this.stats), this.persistLocalStats(), this.host.requestUpdate();
1222
1228
  }
1223
1229
  async markStatsAsSubmitted() {
1224
1230
  this.localStats.submitted = (/* @__PURE__ */ new Date()).toISOString(), await this.persistLocalStats(), this.host.requestUpdate();
1225
1231
  }
1226
1232
  async submitStats() {
1227
1233
  if (!this.hasLocalStats())
1228
- throw b.warn("No local stats to submit"), new Error("No local stats to submit");
1234
+ throw m.warn("No local stats to submit"), new Error("No local stats to submit");
1229
1235
  const t = this.host, o = Math.floor(Date.now() / 1e3).toString(), r = await re(), s = await this.getProjectId(), i = t.name || "", a = this.localStats.sum, n = Object.keys(this.localStats.breakdown || {});
1230
1236
  this.isSubmitting = !0, this.host.requestUpdate();
1231
1237
  const l = {
@@ -1242,7 +1248,7 @@ class Ao {
1242
1248
  try {
1243
1249
  await this.sendStats({ ...l, hash: p }), await this.markStatsAsSubmitted(), this.dispatchSubmitEvent(l);
1244
1250
  } catch (c) {
1245
- b.warn("Failed to send stats event", c);
1251
+ m.warn("Failed to send stats event", c);
1246
1252
  } finally {
1247
1253
  this.isSubmitting = !1, this.host.requestUpdate();
1248
1254
  }
@@ -1251,18 +1257,18 @@ class Ao {
1251
1257
  async sendStats(t) {
1252
1258
  const o = JSON.stringify(t), r = this.host, s = r.dataEndpoint || ee;
1253
1259
  if (r.dataFunc) {
1254
- b.debug("Skip sending stats as data function is in use.");
1260
+ m.debug("Skip sending stats as data function is in use.");
1255
1261
  return;
1256
1262
  }
1257
1263
  if (!dt(s))
1258
- throw b.error("Invalid data endpoint", { dataEndpoint: s }), new Error(`Invalid data endpoint: ${s}`);
1264
+ throw m.error("Invalid data endpoint", { dataEndpoint: s }), new Error(`Invalid data endpoint: ${s}`);
1259
1265
  try {
1260
- if (b.debug("Sending stats", { endpoint: s, event: t }), typeof navigator < "u" && navigator.sendBeacon)
1266
+ if (m.debug("Sending stats", { endpoint: s, event: t }), typeof navigator < "u" && navigator.sendBeacon)
1261
1267
  if (navigator.sendBeacon(s, o)) {
1262
- b.debug("Successfully sent stats via sendBeacon");
1268
+ m.debug("Successfully sent stats via sendBeacon");
1263
1269
  return;
1264
1270
  } else
1265
- b.debug("sendBeacon failed, falling back to fetch");
1271
+ m.debug("sendBeacon failed, falling back to fetch");
1266
1272
  const i = await fetch(s, {
1267
1273
  body: o,
1268
1274
  method: "POST",
@@ -1273,9 +1279,9 @@ class Ao {
1273
1279
  });
1274
1280
  if (!i.ok)
1275
1281
  throw new Error(`API request failed with status: ${i.status}`);
1276
- b.debug("Successfully sent stats via fetch");
1282
+ m.debug("Successfully sent stats via fetch");
1277
1283
  } catch (i) {
1278
- throw b.error("Failed to send analytics:", i), i;
1284
+ throw m.error("Failed to send analytics:", i), i;
1279
1285
  }
1280
1286
  }
1281
1287
  /**
@@ -1292,7 +1298,7 @@ class Ao {
1292
1298
  pct: (o == null ? void 0 : o.pct) || 0,
1293
1299
  nps: r.type === x.nps ? lt((o == null ? void 0 : o.breakdown) || {}) : 0
1294
1300
  };
1295
- return b.debug("Stats data: ", this.stats), So(t, s);
1301
+ return m.debug("Stats data: ", this.stats), So(t, s);
1296
1302
  }
1297
1303
  /**
1298
1304
  * Checks if a value is selected in the local stats
@@ -1352,7 +1358,7 @@ class Ao {
1352
1358
  bubbles: !0,
1353
1359
  composed: !0
1354
1360
  });
1355
- t.dispatchEvent(i), b.debug("Dispatched change event", s);
1361
+ t.dispatchEvent(i), m.debug("Dispatched change event", s);
1356
1362
  }
1357
1363
  /**
1358
1364
  * Dispatches a 'submit' CustomEvent on the host element
@@ -1364,7 +1370,7 @@ class Ao {
1364
1370
  bubbles: !0,
1365
1371
  composed: !0
1366
1372
  });
1367
- o.dispatchEvent(r), b.debug("Dispatched submit event", t);
1373
+ o.dispatchEvent(r), m.debug("Dispatched submit event", t);
1368
1374
  }
1369
1375
  hasLocalStats() {
1370
1376
  var t;
@@ -1845,106 +1851,106 @@ Mt.styles = [
1845
1851
  }
1846
1852
  `
1847
1853
  ];
1848
- let m = Mt;
1854
+ let b = Mt;
1849
1855
  g([
1850
1856
  f({ type: String, attribute: "show-stats" })
1851
- ], m.prototype, "showStats");
1857
+ ], b.prototype, "showStats");
1852
1858
  g([
1853
1859
  f({ type: Boolean, attribute: "show-chart" })
1854
- ], m.prototype, "showChart");
1860
+ ], b.prototype, "showChart");
1855
1861
  g([
1856
1862
  f({ type: Boolean, attribute: "initialized" })
1857
- ], m.prototype, "initialized");
1863
+ ], b.prototype, "initialized");
1858
1864
  g([
1859
1865
  f({ type: Boolean, attribute: "lock-answer" })
1860
- ], m.prototype, "lockAnswer");
1866
+ ], b.prototype, "lockAnswer");
1861
1867
  g([
1862
1868
  f({ type: String, attribute: "primary-color" })
1863
- ], m.prototype, "primaryColor");
1869
+ ], b.prototype, "primaryColor");
1864
1870
  g([
1865
1871
  f({ type: String, attribute: "mute-color" })
1866
- ], m.prototype, "muteColor");
1872
+ ], b.prototype, "muteColor");
1867
1873
  g([
1868
1874
  f({ type: String, attribute: "text-color" })
1869
- ], m.prototype, "textColor");
1875
+ ], b.prototype, "textColor");
1870
1876
  g([
1871
1877
  f({ type: String, attribute: "background-color" })
1872
- ], m.prototype, "backgroundColor");
1878
+ ], b.prototype, "backgroundColor");
1873
1879
  g([
1874
1880
  f({ type: String, attribute: "accent-color" })
1875
- ], m.prototype, "accentColor");
1881
+ ], b.prototype, "accentColor");
1876
1882
  g([
1877
1883
  f({ type: String, attribute: "star-color" })
1878
- ], m.prototype, "starColor");
1884
+ ], b.prototype, "starColor");
1879
1885
  g([
1880
1886
  f({ type: String, attribute: "star-hover-color" })
1881
- ], m.prototype, "starHoverColor");
1887
+ ], b.prototype, "starHoverColor");
1882
1888
  g([
1883
1889
  f({ type: String })
1884
- ], m.prototype, "size");
1890
+ ], b.prototype, "size");
1885
1891
  g([
1886
1892
  f({ type: String, attribute: "aria-label" })
1887
- ], m.prototype, "ariaLabel");
1893
+ ], b.prototype, "ariaLabel");
1888
1894
  g([
1889
1895
  f({ type: String, attribute: "aria-describedby" })
1890
- ], m.prototype, "ariaDescribedby");
1896
+ ], b.prototype, "ariaDescribedby");
1891
1897
  g([
1892
1898
  f({ type: Number, attribute: "min-contrast" })
1893
- ], m.prototype, "minContrast");
1899
+ ], b.prototype, "minContrast");
1894
1900
  g([
1895
1901
  f({ type: String })
1896
- ], m.prototype, "css");
1902
+ ], b.prototype, "css");
1897
1903
  g([
1898
1904
  f({ type: Array })
1899
- ], m.prototype, "options");
1905
+ ], b.prototype, "options");
1900
1906
  g([
1901
1907
  f({ type: String })
1902
- ], m.prototype, "project");
1908
+ ], b.prototype, "project");
1903
1909
  g([
1904
1910
  f({ type: String, attribute: "name" })
1905
- ], m.prototype, "name");
1911
+ ], b.prototype, "name");
1906
1912
  g([
1907
1913
  f({ type: String })
1908
- ], m.prototype, "metadata");
1914
+ ], b.prototype, "metadata");
1909
1915
  g([
1910
1916
  f({ type: String, attribute: "data-func" })
1911
- ], m.prototype, "dataFunc");
1917
+ ], b.prototype, "dataFunc");
1912
1918
  g([
1913
1919
  f({ type: String, attribute: "data-endpoint" })
1914
- ], m.prototype, "dataEndpoint");
1920
+ ], b.prototype, "dataEndpoint");
1915
1921
  g([
1916
1922
  f({ type: String })
1917
- ], m.prototype, "question");
1923
+ ], b.prototype, "question");
1918
1924
  g([
1919
1925
  f({ type: String, attribute: "question-position" })
1920
- ], m.prototype, "questionPosition");
1926
+ ], b.prototype, "questionPosition");
1921
1927
  g([
1922
1928
  f({ type: String, attribute: "question-align" })
1923
- ], m.prototype, "questionAlign");
1929
+ ], b.prototype, "questionAlign");
1924
1930
  g([
1925
1931
  f({ type: String, attribute: "stats-text" })
1926
- ], m.prototype, "statsText");
1932
+ ], b.prototype, "statsText");
1927
1933
  g([
1928
1934
  f({ type: String, attribute: "stats-position" })
1929
- ], m.prototype, "statsPosition");
1935
+ ], b.prototype, "statsPosition");
1930
1936
  g([
1931
1937
  f({ type: String, attribute: "stats-align" })
1932
- ], m.prototype, "statsAlign");
1938
+ ], b.prototype, "statsAlign");
1933
1939
  g([
1934
1940
  f({ type: String, attribute: "button-text" })
1935
- ], m.prototype, "buttonText");
1941
+ ], b.prototype, "buttonText");
1936
1942
  g([
1937
1943
  f({ type: String, attribute: "button-radius" })
1938
- ], m.prototype, "buttonRadius");
1944
+ ], b.prototype, "buttonRadius");
1939
1945
  g([
1940
1946
  f({ type: String, attribute: "thank-you-msg" })
1941
- ], m.prototype, "thankYouMsg");
1947
+ ], b.prototype, "thankYouMsg");
1942
1948
  g([
1943
1949
  f({ type: Boolean, attribute: "multiple" })
1944
- ], m.prototype, "multiple");
1950
+ ], b.prototype, "multiple");
1945
1951
  g([
1946
1952
  f({ type: Boolean, attribute: "read-only" })
1947
- ], m.prototype, "readOnly");
1953
+ ], b.prototype, "readOnly");
1948
1954
  const To = F`
1949
1955
  /* CSS variables inherit from parent - defaults are specified at usage sites */
1950
1956
 
@@ -2605,7 +2611,7 @@ var zo = Object.defineProperty, Io = Object.getOwnPropertyDescriptor, Y = (e, t,
2605
2611
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
2606
2612
  return r && s && zo(t, o, s), s;
2607
2613
  };
2608
- let I = class extends m {
2614
+ let I = class extends b {
2609
2615
  constructor() {
2610
2616
  super(), this.min = 0, this.max = 10, this.type = x.nps, this.minLabel = "Not at all", this.maxLabel = "Extremely", this.minMaxPosition = "top", this.hoverValue = -1, this.handleNumberLeave = () => {
2611
2617
  this.hoverValue = -1;
@@ -2733,7 +2739,7 @@ let I = class extends m {
2733
2739
  `;
2734
2740
  }
2735
2741
  };
2736
- I.styles = [...m.styles, pt, To];
2742
+ I.styles = [...b.styles, pt, To];
2737
2743
  Y([
2738
2744
  f({ type: String, attribute: "min-label" })
2739
2745
  ], I.prototype, "minLabel", 2);
@@ -3014,7 +3020,7 @@ var Mo = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, Nt = (e, t
3014
3020
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
3015
3021
  return r && s && Mo(t, o, s), s;
3016
3022
  };
3017
- let tt = class extends m {
3023
+ let tt = class extends b {
3018
3024
  constructor() {
3019
3025
  super(), this.type = x.poll, this.multiple = !1, this.compact = !1, this.hasEditButton = !0, this.statsText = "{count} votes", this.questionPosition = "top", this.statsPosition = "bottom", this.showStats = "after-vote";
3020
3026
  }
@@ -3277,7 +3283,7 @@ let tt = class extends m {
3277
3283
  `;
3278
3284
  }
3279
3285
  };
3280
- tt.styles = [...m.styles, pt, No];
3286
+ tt.styles = [...b.styles, pt, No];
3281
3287
  Nt([
3282
3288
  f({ type: Boolean })
3283
3289
  ], tt.prototype, "multiple", 2);
@@ -3400,7 +3406,7 @@ var Bo = Object.defineProperty, Do = Object.getOwnPropertyDescriptor, ut = (e, t
3400
3406
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
3401
3407
  return r && s && Bo(t, o, s), s;
3402
3408
  };
3403
- let V = class extends m {
3409
+ let V = class extends b {
3404
3410
  constructor() {
3405
3411
  super(), this.type = x.stars, this.numStars = 5, this.hoverValue = -1, this.handleStarKeyDown = (e) => {
3406
3412
  if (e.key === "Enter" || e.key === " ") {
@@ -3497,7 +3503,7 @@ let V = class extends m {
3497
3503
  `;
3498
3504
  }
3499
3505
  };
3500
- V.styles = [...m.styles, pt, Ro];
3506
+ V.styles = [...b.styles, pt, Ro];
3501
3507
  ut([
3502
3508
  f({ type: String })
3503
3509
  ], V.prototype, "icon", 2);
@@ -3859,7 +3865,7 @@ var Ho = Object.defineProperty, Fo = Object.getOwnPropertyDescriptor, ht = (e, t
3859
3865
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
3860
3866
  return r && s && Ho(t, o, s), s;
3861
3867
  };
3862
- let q = class extends m {
3868
+ let q = class extends b {
3863
3869
  constructor() {
3864
3870
  super(), this.type = x.reaction, this.showCounts = !1, this.compact = !1, this.popupPosition = "auto", this.hasEditButton = !1, this.statsText = "{count} votes", this.buttonRadius = "990px", this.muteColor = "#cccccc", this.questionPosition = "top", this.statsPosition = "right", this.popupPosition = "auto";
3865
3871
  }
@@ -4069,7 +4075,7 @@ let q = class extends m {
4069
4075
  `;
4070
4076
  }
4071
4077
  };
4072
- q.styles = [...m.styles, pt, Vo];
4078
+ q.styles = [...b.styles, pt, Vo];
4073
4079
  ht([
4074
4080
  f({ type: Boolean, attribute: "show-counts" })
4075
4081
  ], q.prototype, "showCounts", 2);