@empoweredvote/ev-ui 0.6.5 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +514 -346
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +449 -282
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -770,6 +770,7 @@ function Header({
|
|
|
770
770
|
logoAlt = "Empowered Vote",
|
|
771
771
|
navItems = [],
|
|
772
772
|
ctaButton,
|
|
773
|
+
secondaryAction,
|
|
773
774
|
currentPath,
|
|
774
775
|
onNavigate,
|
|
775
776
|
profileMenu,
|
|
@@ -879,6 +880,22 @@ function Header({
|
|
|
879
880
|
textDecoration: "none",
|
|
880
881
|
display: "inline-block"
|
|
881
882
|
},
|
|
883
|
+
secondaryAction: {
|
|
884
|
+
display: "inline-flex",
|
|
885
|
+
alignItems: "center",
|
|
886
|
+
backgroundColor: "transparent",
|
|
887
|
+
color: colors.evTeal,
|
|
888
|
+
fontFamily: fonts.primary,
|
|
889
|
+
fontWeight: fontWeights.bold,
|
|
890
|
+
fontSize: fontSizes.base,
|
|
891
|
+
padding: `${spacing[2]} ${spacing[5]}`,
|
|
892
|
+
borderRadius: borderRadius.full || "999px",
|
|
893
|
+
border: `1.5px solid ${colors.evTeal}`,
|
|
894
|
+
cursor: "pointer",
|
|
895
|
+
textDecoration: "none",
|
|
896
|
+
lineHeight: 1.2,
|
|
897
|
+
transition: "background-color 0.15s ease, color 0.15s ease"
|
|
898
|
+
},
|
|
882
899
|
mobileMenuButton: {
|
|
883
900
|
display: isMobile ? "block" : "none",
|
|
884
901
|
background: "none",
|
|
@@ -1050,7 +1067,30 @@ function Header({
|
|
|
1050
1067
|
},
|
|
1051
1068
|
"empowered.vote"
|
|
1052
1069
|
)
|
|
1053
|
-
), /* @__PURE__ */ React2.createElement("nav", { style: styles2.nav, className: "ev-header-nav" }, navItems.map((item, idx) => /* @__PURE__ */ React2.createElement(NavLink, { key: idx, item }))), /* @__PURE__ */ React2.createElement("div", { style: { display: isMobile ? "none" : "flex", alignItems: "center", gap: spacing[
|
|
1070
|
+
), /* @__PURE__ */ React2.createElement("nav", { style: styles2.nav, className: "ev-header-nav" }, navItems.map((item, idx) => /* @__PURE__ */ React2.createElement(NavLink, { key: idx, item }))), /* @__PURE__ */ React2.createElement("div", { style: { display: isMobile ? "none" : "flex", alignItems: "center", gap: spacing[3] } }, secondaryAction && React2.isValidElement(secondaryAction) && secondaryAction, secondaryAction && !React2.isValidElement(secondaryAction) && /* @__PURE__ */ React2.createElement(
|
|
1071
|
+
"a",
|
|
1072
|
+
{
|
|
1073
|
+
href: secondaryAction.href,
|
|
1074
|
+
target: secondaryAction.target || "_self",
|
|
1075
|
+
rel: secondaryAction.target === "_blank" ? "noopener noreferrer" : secondaryAction.rel || void 0,
|
|
1076
|
+
onClick: (e) => {
|
|
1077
|
+
if (secondaryAction.target !== "_blank") {
|
|
1078
|
+
handleNavClick(e, secondaryAction.href);
|
|
1079
|
+
}
|
|
1080
|
+
},
|
|
1081
|
+
style: styles2.secondaryAction,
|
|
1082
|
+
className: "ev-header-secondary",
|
|
1083
|
+
onMouseEnter: (e) => {
|
|
1084
|
+
e.currentTarget.style.backgroundColor = colors.evTeal;
|
|
1085
|
+
e.currentTarget.style.color = colors.textWhite;
|
|
1086
|
+
},
|
|
1087
|
+
onMouseLeave: (e) => {
|
|
1088
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
1089
|
+
e.currentTarget.style.color = colors.evTeal;
|
|
1090
|
+
}
|
|
1091
|
+
},
|
|
1092
|
+
secondaryAction.label
|
|
1093
|
+
), ctaButton && /* @__PURE__ */ React2.createElement(
|
|
1054
1094
|
"a",
|
|
1055
1095
|
{
|
|
1056
1096
|
href: ctaButton.href,
|
|
@@ -1207,7 +1247,22 @@ function Header({
|
|
|
1207
1247
|
},
|
|
1208
1248
|
item.label
|
|
1209
1249
|
));
|
|
1210
|
-
}),
|
|
1250
|
+
}), secondaryAction && React2.isValidElement(secondaryAction) && /* @__PURE__ */ React2.createElement("div", { style: { marginTop: spacing[4], textAlign: "center" } }, secondaryAction), secondaryAction && !React2.isValidElement(secondaryAction) && /* @__PURE__ */ React2.createElement(
|
|
1251
|
+
"a",
|
|
1252
|
+
{
|
|
1253
|
+
href: secondaryAction.href,
|
|
1254
|
+
target: secondaryAction.target || "_self",
|
|
1255
|
+
rel: secondaryAction.target === "_blank" ? "noopener noreferrer" : secondaryAction.rel || void 0,
|
|
1256
|
+
onClick: (e) => {
|
|
1257
|
+
if (secondaryAction.target !== "_blank") {
|
|
1258
|
+
handleNavClick(e, secondaryAction.href);
|
|
1259
|
+
}
|
|
1260
|
+
setMobileMenuOpen(false);
|
|
1261
|
+
},
|
|
1262
|
+
style: { ...styles2.secondaryAction, marginTop: spacing[4], textAlign: "center", justifyContent: "center" }
|
|
1263
|
+
},
|
|
1264
|
+
secondaryAction.label
|
|
1265
|
+
), ctaButton && /* @__PURE__ */ React2.createElement(
|
|
1211
1266
|
"a",
|
|
1212
1267
|
{
|
|
1213
1268
|
href: ctaButton.href,
|
|
@@ -1275,7 +1330,107 @@ function Header({
|
|
|
1275
1330
|
}
|
|
1276
1331
|
|
|
1277
1332
|
// src/SiteHeader.jsx
|
|
1333
|
+
import React4 from "react";
|
|
1334
|
+
|
|
1335
|
+
// src/FeedbackButton.jsx
|
|
1278
1336
|
import React3 from "react";
|
|
1337
|
+
var FEEDBACK_BASE_DEFAULT = "https://alpha.empowered.vote/feedback";
|
|
1338
|
+
var HOST_FEATURE_MAP = {
|
|
1339
|
+
"compass.empowered.vote": "compass",
|
|
1340
|
+
"essentials.empowered.vote": "essentials",
|
|
1341
|
+
"readrank.empowered.vote": "readrank",
|
|
1342
|
+
"treasurytracker.empowered.vote": "treasury",
|
|
1343
|
+
"badges.empowered.vote": "badges",
|
|
1344
|
+
"ctc.empowered.vote": "trivia",
|
|
1345
|
+
"alpha.empowered.vote": "landing",
|
|
1346
|
+
"ev-landing.empowered.vote": "landing",
|
|
1347
|
+
"ev-landing.onrender.com": "landing"
|
|
1348
|
+
};
|
|
1349
|
+
function detectFeature() {
|
|
1350
|
+
if (typeof window === "undefined") return void 0;
|
|
1351
|
+
const host = window.location.hostname;
|
|
1352
|
+
if (HOST_FEATURE_MAP[host]) return HOST_FEATURE_MAP[host];
|
|
1353
|
+
const firstLabel = host.split(".")[0];
|
|
1354
|
+
for (const [knownHost, feature] of Object.entries(HOST_FEATURE_MAP)) {
|
|
1355
|
+
const knownPrefix = knownHost.split(".")[0];
|
|
1356
|
+
if (firstLabel === knownPrefix || firstLabel.startsWith(`${knownPrefix}-`)) {
|
|
1357
|
+
return feature;
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
return "other";
|
|
1361
|
+
}
|
|
1362
|
+
function buildHref({ baseUrl, feature, includeUrl }) {
|
|
1363
|
+
const params = new URLSearchParams();
|
|
1364
|
+
if (feature) params.set("feature", feature);
|
|
1365
|
+
if (includeUrl && typeof window !== "undefined") {
|
|
1366
|
+
params.set("url", window.location.href);
|
|
1367
|
+
}
|
|
1368
|
+
const qs = params.toString();
|
|
1369
|
+
return qs ? `${baseUrl}?${qs}` : baseUrl;
|
|
1370
|
+
}
|
|
1371
|
+
function FeedbackButton({
|
|
1372
|
+
feature: featureProp,
|
|
1373
|
+
baseUrl = FEEDBACK_BASE_DEFAULT,
|
|
1374
|
+
label = "Feedback",
|
|
1375
|
+
variant = "pill",
|
|
1376
|
+
includeUrl = true,
|
|
1377
|
+
className = "",
|
|
1378
|
+
style = {}
|
|
1379
|
+
}) {
|
|
1380
|
+
const feature = featureProp != null ? featureProp : detectFeature();
|
|
1381
|
+
const href = buildHref({ baseUrl, feature, includeUrl });
|
|
1382
|
+
const pillStyle = {
|
|
1383
|
+
display: "inline-flex",
|
|
1384
|
+
alignItems: "center",
|
|
1385
|
+
gap: spacing[1],
|
|
1386
|
+
padding: `${spacing[2]} ${spacing[4]}`,
|
|
1387
|
+
backgroundColor: "transparent",
|
|
1388
|
+
color: colors.evTeal,
|
|
1389
|
+
border: `1.5px solid ${colors.evTeal}`,
|
|
1390
|
+
borderRadius: borderRadius.full || "999px",
|
|
1391
|
+
fontFamily: fonts.primary,
|
|
1392
|
+
fontWeight: fontWeights.bold,
|
|
1393
|
+
fontSize: fontSizes.base,
|
|
1394
|
+
lineHeight: 1.2,
|
|
1395
|
+
textDecoration: "none",
|
|
1396
|
+
cursor: "pointer",
|
|
1397
|
+
transition: "background-color 0.15s ease, color 0.15s ease"
|
|
1398
|
+
};
|
|
1399
|
+
const linkStyle2 = {
|
|
1400
|
+
color: colors.evTeal,
|
|
1401
|
+
fontFamily: fonts.primary,
|
|
1402
|
+
fontWeight: fontWeights.medium,
|
|
1403
|
+
textDecoration: "underline",
|
|
1404
|
+
cursor: "pointer"
|
|
1405
|
+
};
|
|
1406
|
+
const baseStyle = variant === "link" ? linkStyle2 : pillStyle;
|
|
1407
|
+
return /* @__PURE__ */ React3.createElement(
|
|
1408
|
+
"a",
|
|
1409
|
+
{
|
|
1410
|
+
href,
|
|
1411
|
+
target: "_blank",
|
|
1412
|
+
rel: "noopener noreferrer",
|
|
1413
|
+
className: `ev-feedback-button ${className}`.trim(),
|
|
1414
|
+
style: { ...baseStyle, ...style },
|
|
1415
|
+
"aria-label": "Send feedback",
|
|
1416
|
+
onMouseEnter: (e) => {
|
|
1417
|
+
if (variant === "pill") {
|
|
1418
|
+
e.currentTarget.style.backgroundColor = colors.evTeal;
|
|
1419
|
+
e.currentTarget.style.color = colors.textWhite || "#ffffff";
|
|
1420
|
+
}
|
|
1421
|
+
},
|
|
1422
|
+
onMouseLeave: (e) => {
|
|
1423
|
+
if (variant === "pill") {
|
|
1424
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
1425
|
+
e.currentTarget.style.color = colors.evTeal;
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
},
|
|
1429
|
+
label
|
|
1430
|
+
);
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
// src/SiteHeader.jsx
|
|
1279
1434
|
var defaultNavItems = [
|
|
1280
1435
|
{
|
|
1281
1436
|
label: "Features",
|
|
@@ -1298,6 +1453,8 @@ function SiteHeader({
|
|
|
1298
1453
|
currentPath,
|
|
1299
1454
|
onNavigate,
|
|
1300
1455
|
profileMenu,
|
|
1456
|
+
secondaryAction,
|
|
1457
|
+
feedbackFeature,
|
|
1301
1458
|
style = {}
|
|
1302
1459
|
}) {
|
|
1303
1460
|
const handleNavigate = (href) => {
|
|
@@ -1307,13 +1464,22 @@ function SiteHeader({
|
|
|
1307
1464
|
window.location.href = href;
|
|
1308
1465
|
}
|
|
1309
1466
|
};
|
|
1310
|
-
|
|
1467
|
+
let resolvedSecondary;
|
|
1468
|
+
if (secondaryAction === false) {
|
|
1469
|
+
resolvedSecondary = void 0;
|
|
1470
|
+
} else if (secondaryAction === void 0) {
|
|
1471
|
+
resolvedSecondary = /* @__PURE__ */ React4.createElement(FeedbackButton, { feature: feedbackFeature });
|
|
1472
|
+
} else {
|
|
1473
|
+
resolvedSecondary = secondaryAction;
|
|
1474
|
+
}
|
|
1475
|
+
return /* @__PURE__ */ React4.createElement(
|
|
1311
1476
|
Header,
|
|
1312
1477
|
{
|
|
1313
1478
|
logoSrc,
|
|
1314
1479
|
logoAlt: "Empowered Vote",
|
|
1315
1480
|
navItems: defaultNavItems,
|
|
1316
1481
|
ctaButton: defaultCtaButton,
|
|
1482
|
+
secondaryAction: resolvedSecondary,
|
|
1317
1483
|
currentPath,
|
|
1318
1484
|
onNavigate: handleNavigate,
|
|
1319
1485
|
profileMenu,
|
|
@@ -1323,7 +1489,7 @@ function SiteHeader({
|
|
|
1323
1489
|
}
|
|
1324
1490
|
|
|
1325
1491
|
// src/FilterSidebar.jsx
|
|
1326
|
-
import
|
|
1492
|
+
import React5 from "react";
|
|
1327
1493
|
function FilterSidebar({
|
|
1328
1494
|
title = "Filter by",
|
|
1329
1495
|
zipCode = "",
|
|
@@ -1477,14 +1643,14 @@ function FilterSidebar({
|
|
|
1477
1643
|
fontSize: fontSizes.sm
|
|
1478
1644
|
}
|
|
1479
1645
|
};
|
|
1480
|
-
return /* @__PURE__ */
|
|
1646
|
+
return /* @__PURE__ */ React5.createElement("aside", { style: styles2.sidebar, className: "ev-filter-sidebar" }, !isMobile && /* @__PURE__ */ React5.createElement("h2", { style: styles2.title }, title), /* @__PURE__ */ React5.createElement("div", { style: isMobile ? void 0 : styles2.contentTop }, /* @__PURE__ */ React5.createElement("div", { style: isMobile ? { marginBottom: spacing[3] } : styles2.section }, !isMobile && /* @__PURE__ */ React5.createElement("label", { style: styles2.sectionLabel }, "Location"), autocompleteContainerRef ? /* @__PURE__ */ React5.createElement(
|
|
1481
1647
|
"div",
|
|
1482
1648
|
{
|
|
1483
1649
|
ref: autocompleteContainerRef,
|
|
1484
1650
|
style: styles2.zipInputWrapper,
|
|
1485
1651
|
className: "ev-autocomplete-container"
|
|
1486
1652
|
}
|
|
1487
|
-
) : /* @__PURE__ */
|
|
1653
|
+
) : /* @__PURE__ */ React5.createElement("div", { style: styles2.zipInputWrapper }, /* @__PURE__ */ React5.createElement(
|
|
1488
1654
|
"input",
|
|
1489
1655
|
{
|
|
1490
1656
|
ref: zipInputRef,
|
|
@@ -1496,7 +1662,7 @@ function FilterSidebar({
|
|
|
1496
1662
|
style: styles2.zipInput,
|
|
1497
1663
|
"aria-label": "Search location"
|
|
1498
1664
|
}
|
|
1499
|
-
), /* @__PURE__ */
|
|
1665
|
+
), /* @__PURE__ */ React5.createElement(
|
|
1500
1666
|
"button",
|
|
1501
1667
|
{
|
|
1502
1668
|
type: "button",
|
|
@@ -1505,7 +1671,7 @@ function FilterSidebar({
|
|
|
1505
1671
|
"aria-label": "Clear ZIP code"
|
|
1506
1672
|
},
|
|
1507
1673
|
"\xD7"
|
|
1508
|
-
))), /* @__PURE__ */
|
|
1674
|
+
))), /* @__PURE__ */ React5.createElement("div", { style: isMobile ? {} : styles2.section }, !isMobile && /* @__PURE__ */ React5.createElement("label", { style: styles2.sectionLabel }, "Group"), /* @__PURE__ */ React5.createElement("div", { style: styles2.radioGroup, role: "radiogroup", "aria-label": "Filter by group" }, filterOptions.map((option) => /* @__PURE__ */ React5.createElement("label", { key: option.value, style: styles2.radioLabel }, /* @__PURE__ */ React5.createElement(
|
|
1509
1675
|
"input",
|
|
1510
1676
|
{
|
|
1511
1677
|
type: "radio",
|
|
@@ -1515,18 +1681,18 @@ function FilterSidebar({
|
|
|
1515
1681
|
onChange: () => onFilterChange == null ? void 0 : onFilterChange(option.value),
|
|
1516
1682
|
style: styles2.radioInput
|
|
1517
1683
|
}
|
|
1518
|
-
), option.label))))), !isMobile && /* @__PURE__ */
|
|
1684
|
+
), option.label))))), !isMobile && /* @__PURE__ */ React5.createElement("div", { style: styles2.imageSection }, locationLabel && /* @__PURE__ */ React5.createElement("div", { style: styles2.locationLabel }, locationLabel), buildingImageSrc ? /* @__PURE__ */ React5.createElement(
|
|
1519
1685
|
"img",
|
|
1520
1686
|
{
|
|
1521
1687
|
src: buildingImageSrc,
|
|
1522
1688
|
alt: `${selectedFilter} government building`,
|
|
1523
1689
|
style: styles2.buildingImage
|
|
1524
1690
|
}
|
|
1525
|
-
) : /* @__PURE__ */
|
|
1691
|
+
) : /* @__PURE__ */ React5.createElement("div", { style: styles2.buildingPlaceholder }, "No image")));
|
|
1526
1692
|
}
|
|
1527
1693
|
|
|
1528
1694
|
// src/PoliticianCard.jsx
|
|
1529
|
-
import
|
|
1695
|
+
import React6, { useState as useState3, useEffect as useEffect4 } from "react";
|
|
1530
1696
|
function PoliticianCard({
|
|
1531
1697
|
id,
|
|
1532
1698
|
imageSrc,
|
|
@@ -1678,7 +1844,7 @@ function PoliticianCard({
|
|
|
1678
1844
|
textTransform: "uppercase"
|
|
1679
1845
|
}
|
|
1680
1846
|
};
|
|
1681
|
-
const CompassIcon2 = () => /* @__PURE__ */
|
|
1847
|
+
const CompassIcon2 = () => /* @__PURE__ */ React6.createElement(
|
|
1682
1848
|
"svg",
|
|
1683
1849
|
{
|
|
1684
1850
|
style: styles2.compassIcon,
|
|
@@ -1686,7 +1852,7 @@ function PoliticianCard({
|
|
|
1686
1852
|
fill: "none",
|
|
1687
1853
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1688
1854
|
},
|
|
1689
|
-
/* @__PURE__ */
|
|
1855
|
+
/* @__PURE__ */ React6.createElement(
|
|
1690
1856
|
"polygon",
|
|
1691
1857
|
{
|
|
1692
1858
|
points: "12,1 21.5,6.5 21.5,17.5 12,23 2.5,17.5 2.5,6.5",
|
|
@@ -1696,13 +1862,13 @@ function PoliticianCard({
|
|
|
1696
1862
|
strokeLinejoin: "round"
|
|
1697
1863
|
}
|
|
1698
1864
|
),
|
|
1699
|
-
/* @__PURE__ */
|
|
1700
|
-
/* @__PURE__ */
|
|
1701
|
-
/* @__PURE__ */
|
|
1702
|
-
/* @__PURE__ */
|
|
1703
|
-
/* @__PURE__ */
|
|
1704
|
-
/* @__PURE__ */
|
|
1705
|
-
/* @__PURE__ */
|
|
1865
|
+
/* @__PURE__ */ React6.createElement("line", { x1: "12", y1: "12", x2: "12", y2: "1", stroke: "currentColor", strokeWidth: "1" }),
|
|
1866
|
+
/* @__PURE__ */ React6.createElement("line", { x1: "12", y1: "12", x2: "21.5", y2: "6.5", stroke: "currentColor", strokeWidth: "1" }),
|
|
1867
|
+
/* @__PURE__ */ React6.createElement("line", { x1: "12", y1: "12", x2: "21.5", y2: "17.5", stroke: "currentColor", strokeWidth: "1" }),
|
|
1868
|
+
/* @__PURE__ */ React6.createElement("line", { x1: "12", y1: "12", x2: "12", y2: "23", stroke: "currentColor", strokeWidth: "1" }),
|
|
1869
|
+
/* @__PURE__ */ React6.createElement("line", { x1: "12", y1: "12", x2: "2.5", y2: "17.5", stroke: "currentColor", strokeWidth: "1" }),
|
|
1870
|
+
/* @__PURE__ */ React6.createElement("line", { x1: "12", y1: "12", x2: "2.5", y2: "6.5", stroke: "currentColor", strokeWidth: "1" }),
|
|
1871
|
+
/* @__PURE__ */ React6.createElement(
|
|
1706
1872
|
"polygon",
|
|
1707
1873
|
{
|
|
1708
1874
|
points: "12,4 18,7.5 18,16 12,19.5 7,15 5,8",
|
|
@@ -1710,7 +1876,7 @@ function PoliticianCard({
|
|
|
1710
1876
|
opacity: "0.35"
|
|
1711
1877
|
}
|
|
1712
1878
|
),
|
|
1713
|
-
/* @__PURE__ */
|
|
1879
|
+
/* @__PURE__ */ React6.createElement(
|
|
1714
1880
|
"polygon",
|
|
1715
1881
|
{
|
|
1716
1882
|
points: "12,4 18,7.5 18,16 12,19.5 7,15 5,8",
|
|
@@ -1731,7 +1897,7 @@ function PoliticianCard({
|
|
|
1731
1897
|
const initials = parts.length >= 2 ? parts[0][0] + parts[parts.length - 1][0] : ((_a = parts[0]) == null ? void 0 : _a[0]) || "?";
|
|
1732
1898
|
return initials.toUpperCase();
|
|
1733
1899
|
};
|
|
1734
|
-
return /* @__PURE__ */
|
|
1900
|
+
return /* @__PURE__ */ React6.createElement(
|
|
1735
1901
|
"div",
|
|
1736
1902
|
{
|
|
1737
1903
|
style: styles2.card,
|
|
@@ -1756,8 +1922,8 @@ function PoliticianCard({
|
|
|
1756
1922
|
}
|
|
1757
1923
|
}
|
|
1758
1924
|
},
|
|
1759
|
-
badge && /* @__PURE__ */
|
|
1760
|
-
/* @__PURE__ */
|
|
1925
|
+
badge && /* @__PURE__ */ React6.createElement("span", { style: styles2.badge }, badge),
|
|
1926
|
+
/* @__PURE__ */ React6.createElement("div", { style: styles2.imageWrapper }, imageSrc && !imgError ? /* @__PURE__ */ React6.createElement(
|
|
1761
1927
|
"img",
|
|
1762
1928
|
{
|
|
1763
1929
|
src: imageSrc,
|
|
@@ -1765,9 +1931,9 @@ function PoliticianCard({
|
|
|
1765
1931
|
style: styles2.image,
|
|
1766
1932
|
onError: () => setImgError(true)
|
|
1767
1933
|
}
|
|
1768
|
-
) : /* @__PURE__ */
|
|
1769
|
-
/* @__PURE__ */
|
|
1770
|
-
onCompassClick && /* @__PURE__ */
|
|
1934
|
+
) : /* @__PURE__ */ React6.createElement("div", { style: styles2.imagePlaceholder }, getInitials(name))),
|
|
1935
|
+
/* @__PURE__ */ React6.createElement("div", { style: styles2.content }, /* @__PURE__ */ React6.createElement("h3", { style: styles2.name }, name), /* @__PURE__ */ React6.createElement("p", { style: styles2.title }, title), subtitle && /* @__PURE__ */ React6.createElement("p", { style: styles2.subtitle }, subtitle), footer && /* @__PURE__ */ React6.createElement("div", { style: { marginTop: "auto", marginLeft: "-5px" } }, footer)),
|
|
1936
|
+
onCompassClick && /* @__PURE__ */ React6.createElement(
|
|
1771
1937
|
"button",
|
|
1772
1938
|
{
|
|
1773
1939
|
type: "button",
|
|
@@ -1782,16 +1948,16 @@ function PoliticianCard({
|
|
|
1782
1948
|
},
|
|
1783
1949
|
"aria-label": `View ${name}'s compass`
|
|
1784
1950
|
},
|
|
1785
|
-
/* @__PURE__ */
|
|
1951
|
+
/* @__PURE__ */ React6.createElement(CompassIcon2, null)
|
|
1786
1952
|
)
|
|
1787
1953
|
);
|
|
1788
1954
|
}
|
|
1789
1955
|
|
|
1790
1956
|
// src/CompassCardHorizontal.jsx
|
|
1791
|
-
import
|
|
1957
|
+
import React11, { useState as useState5, useEffect as useEffect5 } from "react";
|
|
1792
1958
|
|
|
1793
1959
|
// src/PlaceholderRadar.jsx
|
|
1794
|
-
import
|
|
1960
|
+
import React7 from "react";
|
|
1795
1961
|
function PlaceholderRadar({ size = 250, name = "" }) {
|
|
1796
1962
|
const cx = size / 2;
|
|
1797
1963
|
const cy = size / 2;
|
|
@@ -1804,7 +1970,7 @@ function PlaceholderRadar({ size = 250, name = "" }) {
|
|
|
1804
1970
|
const outerPts = vertices.map(([x, y]) => `${x},${y}`).join(" ");
|
|
1805
1971
|
const midPts = vertices.map(([x, y]) => `${cx + (x - cx) * 0.6},${cy + (y - cy) * 0.6}`).join(" ");
|
|
1806
1972
|
const innerPts = vertices.map(([x, y]) => `${cx + (x - cx) * 0.3},${cy + (y - cy) * 0.3}`).join(" ");
|
|
1807
|
-
return /* @__PURE__ */
|
|
1973
|
+
return /* @__PURE__ */ React7.createElement(
|
|
1808
1974
|
"svg",
|
|
1809
1975
|
{
|
|
1810
1976
|
width: size,
|
|
@@ -1818,7 +1984,7 @@ function PlaceholderRadar({ size = 250, name = "" }) {
|
|
|
1818
1984
|
flexShrink: 0
|
|
1819
1985
|
}
|
|
1820
1986
|
},
|
|
1821
|
-
vertices.map(([x, y], i) => /* @__PURE__ */
|
|
1987
|
+
vertices.map(([x, y], i) => /* @__PURE__ */ React7.createElement(
|
|
1822
1988
|
"line",
|
|
1823
1989
|
{
|
|
1824
1990
|
key: i,
|
|
@@ -1832,7 +1998,7 @@ function PlaceholderRadar({ size = 250, name = "" }) {
|
|
|
1832
1998
|
opacity: "0.6"
|
|
1833
1999
|
}
|
|
1834
2000
|
)),
|
|
1835
|
-
/* @__PURE__ */
|
|
2001
|
+
/* @__PURE__ */ React7.createElement(
|
|
1836
2002
|
"polygon",
|
|
1837
2003
|
{
|
|
1838
2004
|
points: innerPts,
|
|
@@ -1843,7 +2009,7 @@ function PlaceholderRadar({ size = 250, name = "" }) {
|
|
|
1843
2009
|
opacity: "0.5"
|
|
1844
2010
|
}
|
|
1845
2011
|
),
|
|
1846
|
-
/* @__PURE__ */
|
|
2012
|
+
/* @__PURE__ */ React7.createElement(
|
|
1847
2013
|
"polygon",
|
|
1848
2014
|
{
|
|
1849
2015
|
points: midPts,
|
|
@@ -1854,7 +2020,7 @@ function PlaceholderRadar({ size = 250, name = "" }) {
|
|
|
1854
2020
|
opacity: "0.6"
|
|
1855
2021
|
}
|
|
1856
2022
|
),
|
|
1857
|
-
/* @__PURE__ */
|
|
2023
|
+
/* @__PURE__ */ React7.createElement(
|
|
1858
2024
|
"polygon",
|
|
1859
2025
|
{
|
|
1860
2026
|
points: outerPts,
|
|
@@ -1868,10 +2034,10 @@ function PlaceholderRadar({ size = 250, name = "" }) {
|
|
|
1868
2034
|
}
|
|
1869
2035
|
|
|
1870
2036
|
// src/CompassCardHorizontalMeta.jsx
|
|
1871
|
-
import
|
|
2037
|
+
import React10 from "react";
|
|
1872
2038
|
|
|
1873
2039
|
// src/IconOverlay.jsx
|
|
1874
|
-
import
|
|
2040
|
+
import React9, { useState as useState4 } from "react";
|
|
1875
2041
|
import {
|
|
1876
2042
|
useFloating,
|
|
1877
2043
|
useHover,
|
|
@@ -1887,9 +2053,9 @@ import {
|
|
|
1887
2053
|
} from "@floating-ui/react";
|
|
1888
2054
|
|
|
1889
2055
|
// src/icons.js
|
|
1890
|
-
import
|
|
2056
|
+
import React8 from "react";
|
|
1891
2057
|
function BallotIcon({ size = 16, color = "currentColor" }) {
|
|
1892
|
-
return /* @__PURE__ */
|
|
2058
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1893
2059
|
"svg",
|
|
1894
2060
|
{
|
|
1895
2061
|
width: size,
|
|
@@ -1902,13 +2068,13 @@ function BallotIcon({ size = 16, color = "currentColor" }) {
|
|
|
1902
2068
|
strokeLinejoin: "round",
|
|
1903
2069
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1904
2070
|
},
|
|
1905
|
-
/* @__PURE__ */
|
|
1906
|
-
/* @__PURE__ */
|
|
1907
|
-
/* @__PURE__ */
|
|
2071
|
+
/* @__PURE__ */ React8.createElement("path", { d: "m9 12 2 2 4-4" }),
|
|
2072
|
+
/* @__PURE__ */ React8.createElement("path", { d: "M5 7c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v12H5V7Z" }),
|
|
2073
|
+
/* @__PURE__ */ React8.createElement("path", { d: "M22 19H2" })
|
|
1908
2074
|
);
|
|
1909
2075
|
}
|
|
1910
2076
|
function CompassIcon({ size = 16, color = "currentColor" }) {
|
|
1911
|
-
return /* @__PURE__ */
|
|
2077
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1912
2078
|
"svg",
|
|
1913
2079
|
{
|
|
1914
2080
|
width: size,
|
|
@@ -1921,27 +2087,27 @@ function CompassIcon({ size = 16, color = "currentColor" }) {
|
|
|
1921
2087
|
strokeLinejoin: "round",
|
|
1922
2088
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1923
2089
|
},
|
|
1924
|
-
/* @__PURE__ */
|
|
1925
|
-
/* @__PURE__ */
|
|
2090
|
+
/* @__PURE__ */ React8.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2091
|
+
/* @__PURE__ */ React8.createElement("path", { d: "m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" })
|
|
1926
2092
|
);
|
|
1927
2093
|
}
|
|
1928
2094
|
function BranchIcon({ size = 16, color = "currentColor", branch }) {
|
|
1929
2095
|
let paths;
|
|
1930
2096
|
switch (branch) {
|
|
1931
2097
|
case "executive":
|
|
1932
|
-
paths = /* @__PURE__ */
|
|
2098
|
+
paths = /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("path", { d: "M3 21h18" }), /* @__PURE__ */ React8.createElement("path", { d: "M5 21V7l8-4v18" }), /* @__PURE__ */ React8.createElement("path", { d: "M19 21V11l-6-4" }), /* @__PURE__ */ React8.createElement("path", { d: "M9 9v.01" }), /* @__PURE__ */ React8.createElement("path", { d: "M9 12v.01" }), /* @__PURE__ */ React8.createElement("path", { d: "M9 15v.01" }), /* @__PURE__ */ React8.createElement("path", { d: "M9 18v.01" }), /* @__PURE__ */ React8.createElement("path", { d: "M5 21h14" }), /* @__PURE__ */ React8.createElement("line", { x1: "13", y1: "5", x2: "13", y2: "3" }), /* @__PURE__ */ React8.createElement("line", { x1: "13", y1: "3", x2: "15", y2: "4" }));
|
|
1933
2099
|
break;
|
|
1934
2100
|
case "legislative":
|
|
1935
|
-
paths = /* @__PURE__ */
|
|
2101
|
+
paths = /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("path", { d: "M8 21h12a2 2 0 0 0 2-2v-2H10v2a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v3h4" }), /* @__PURE__ */ React8.createElement("path", { d: "M19 17V5a2 2 0 0 0-2-2H4" }), /* @__PURE__ */ React8.createElement("path", { d: "M15 8h-5" }), /* @__PURE__ */ React8.createElement("path", { d: "M15 12h-5" }));
|
|
1936
2102
|
break;
|
|
1937
2103
|
case "judicial":
|
|
1938
|
-
paths = /* @__PURE__ */
|
|
2104
|
+
paths = /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("path", { d: "M12 3v19" }), /* @__PURE__ */ React8.createElement("path", { d: "M5 8l7-5 7 5" }), /* @__PURE__ */ React8.createElement("path", { d: "M3 13l2-5 2 5a3 3 0 0 1-4 0z" }), /* @__PURE__ */ React8.createElement("path", { d: "M17 13l2-5 2 5a3 3 0 0 1-4 0z" }), /* @__PURE__ */ React8.createElement("path", { d: "M8 21h8" }));
|
|
1939
2105
|
break;
|
|
1940
2106
|
default:
|
|
1941
|
-
paths = /* @__PURE__ */
|
|
2107
|
+
paths = /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("path", { d: "M10 18v-7" }), /* @__PURE__ */ React8.createElement("path", { d: "M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z" }), /* @__PURE__ */ React8.createElement("path", { d: "M14 18v-7" }), /* @__PURE__ */ React8.createElement("path", { d: "M18 18v-7" }), /* @__PURE__ */ React8.createElement("path", { d: "M3 22h18" }), /* @__PURE__ */ React8.createElement("path", { d: "M6 18v-7" }));
|
|
1942
2108
|
break;
|
|
1943
2109
|
}
|
|
1944
|
-
return /* @__PURE__ */
|
|
2110
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1945
2111
|
"svg",
|
|
1946
2112
|
{
|
|
1947
2113
|
width: size,
|
|
@@ -1977,7 +2143,7 @@ function IconWithTooltip({ IconComponent, color, tooltip, size = 14, extraProps
|
|
|
1977
2143
|
dismiss,
|
|
1978
2144
|
role
|
|
1979
2145
|
]);
|
|
1980
|
-
return /* @__PURE__ */
|
|
2146
|
+
return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(
|
|
1981
2147
|
"span",
|
|
1982
2148
|
{
|
|
1983
2149
|
ref: refs.setReference,
|
|
@@ -1990,8 +2156,8 @@ function IconWithTooltip({ IconComponent, color, tooltip, size = 14, extraProps
|
|
|
1990
2156
|
onClick(e);
|
|
1991
2157
|
} : void 0
|
|
1992
2158
|
},
|
|
1993
|
-
/* @__PURE__ */
|
|
1994
|
-
), isOpen && /* @__PURE__ */
|
|
2159
|
+
/* @__PURE__ */ React9.createElement(IconComponent, { size, color, ...extraProps })
|
|
2160
|
+
), isOpen && /* @__PURE__ */ React9.createElement(FloatingPortal, null, /* @__PURE__ */ React9.createElement(
|
|
1995
2161
|
"div",
|
|
1996
2162
|
{
|
|
1997
2163
|
ref: refs.setFloating,
|
|
@@ -2015,7 +2181,7 @@ function IconWithTooltip({ IconComponent, color, tooltip, size = 14, extraProps
|
|
|
2015
2181
|
function IconOverlay({ ballot, hasStances, branch, onCompassClick }) {
|
|
2016
2182
|
if (!ballot && !hasStances && !branch) return null;
|
|
2017
2183
|
const ballotTooltip = ballot ? `This seat is on your ballot \u2014 ${ballot.electionLabel}: ${new Date(ballot.electionDate).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" })}` : null;
|
|
2018
|
-
return /* @__PURE__ */
|
|
2184
|
+
return /* @__PURE__ */ React9.createElement(
|
|
2019
2185
|
"div",
|
|
2020
2186
|
{
|
|
2021
2187
|
style: {
|
|
@@ -2028,7 +2194,7 @@ function IconOverlay({ ballot, hasStances, branch, onCompassClick }) {
|
|
|
2028
2194
|
// offset icon wrapper padding so icons align flush-left with text
|
|
2029
2195
|
}
|
|
2030
2196
|
},
|
|
2031
|
-
ballot && /* @__PURE__ */
|
|
2197
|
+
ballot && /* @__PURE__ */ React9.createElement(
|
|
2032
2198
|
IconWithTooltip,
|
|
2033
2199
|
{
|
|
2034
2200
|
IconComponent: BallotIcon,
|
|
@@ -2037,7 +2203,7 @@ function IconOverlay({ ballot, hasStances, branch, onCompassClick }) {
|
|
|
2037
2203
|
size: 14
|
|
2038
2204
|
}
|
|
2039
2205
|
),
|
|
2040
|
-
hasStances && /* @__PURE__ */
|
|
2206
|
+
hasStances && /* @__PURE__ */ React9.createElement(
|
|
2041
2207
|
IconWithTooltip,
|
|
2042
2208
|
{
|
|
2043
2209
|
IconComponent: CompassIcon,
|
|
@@ -2047,7 +2213,7 @@ function IconOverlay({ ballot, hasStances, branch, onCompassClick }) {
|
|
|
2047
2213
|
onClick: onCompassClick
|
|
2048
2214
|
}
|
|
2049
2215
|
),
|
|
2050
|
-
branch && /* @__PURE__ */
|
|
2216
|
+
branch && /* @__PURE__ */ React9.createElement(
|
|
2051
2217
|
IconWithTooltip,
|
|
2052
2218
|
{
|
|
2053
2219
|
IconComponent: BranchIcon,
|
|
@@ -2067,20 +2233,20 @@ function CompassCardHorizontalMeta({
|
|
|
2067
2233
|
userAnswers
|
|
2068
2234
|
}) {
|
|
2069
2235
|
const titleText = surface === "elections" ? politician.office_running_for : politician.office_title;
|
|
2070
|
-
return /* @__PURE__ */
|
|
2236
|
+
return /* @__PURE__ */ React10.createElement("div", { style: {
|
|
2071
2237
|
flex: 1,
|
|
2072
2238
|
minWidth: 0,
|
|
2073
2239
|
display: "flex",
|
|
2074
2240
|
flexDirection: "column",
|
|
2075
2241
|
gap: spacing[1]
|
|
2076
|
-
} }, /* @__PURE__ */
|
|
2242
|
+
} }, /* @__PURE__ */ React10.createElement("p", { style: {
|
|
2077
2243
|
fontFamily: fonts.primary,
|
|
2078
2244
|
fontSize: fontSizes.lg,
|
|
2079
2245
|
fontWeight: fontWeights.semibold,
|
|
2080
2246
|
lineHeight: 1.4,
|
|
2081
2247
|
color: colors.evMutedBlue,
|
|
2082
2248
|
margin: 0
|
|
2083
|
-
} }, politician.full_name), /* @__PURE__ */
|
|
2249
|
+
} }, politician.full_name), /* @__PURE__ */ React10.createElement("p", { style: {
|
|
2084
2250
|
fontFamily: fonts.primary,
|
|
2085
2251
|
fontSize: fontSizes.sm,
|
|
2086
2252
|
fontWeight: fontWeights.semibold,
|
|
@@ -2091,7 +2257,7 @@ function CompassCardHorizontalMeta({
|
|
|
2091
2257
|
display: "-webkit-box",
|
|
2092
2258
|
WebkitLineClamp: 2,
|
|
2093
2259
|
WebkitBoxOrient: "vertical"
|
|
2094
|
-
} }, titleText || ""), politician.district_label && /* @__PURE__ */
|
|
2260
|
+
} }, titleText || ""), politician.district_label && /* @__PURE__ */ React10.createElement("p", { style: {
|
|
2095
2261
|
fontFamily: fonts.primary,
|
|
2096
2262
|
fontSize: fontSizes.sm,
|
|
2097
2263
|
fontWeight: fontWeights.regular,
|
|
@@ -2101,7 +2267,7 @@ function CompassCardHorizontalMeta({
|
|
|
2101
2267
|
overflow: "hidden",
|
|
2102
2268
|
textOverflow: "ellipsis",
|
|
2103
2269
|
whiteSpace: "nowrap"
|
|
2104
|
-
} }, politician.district_label), /* @__PURE__ */
|
|
2270
|
+
} }, politician.district_label), /* @__PURE__ */ React10.createElement(
|
|
2105
2271
|
IconOverlay,
|
|
2106
2272
|
{
|
|
2107
2273
|
ballot: politician.ballot || null,
|
|
@@ -2178,7 +2344,7 @@ function CompassCardHorizontal({
|
|
|
2178
2344
|
function renderCompass() {
|
|
2179
2345
|
var _a2, _b, _c;
|
|
2180
2346
|
if (!userAnswers || userAnswers.length === 0) {
|
|
2181
|
-
return /* @__PURE__ */
|
|
2347
|
+
return /* @__PURE__ */ React11.createElement(PlaceholderRadar, { size: RADAR_SIZE, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2182
2348
|
}
|
|
2183
2349
|
let topics = [];
|
|
2184
2350
|
let data = {};
|
|
@@ -2214,12 +2380,12 @@ function CompassCardHorizontal({
|
|
|
2214
2380
|
}, {}) : politician.stances;
|
|
2215
2381
|
}
|
|
2216
2382
|
if (topics.length === 0) {
|
|
2217
|
-
return /* @__PURE__ */
|
|
2383
|
+
return /* @__PURE__ */ React11.createElement(PlaceholderRadar, { size: RADAR_SIZE, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2218
2384
|
}
|
|
2219
2385
|
} catch (err) {
|
|
2220
|
-
return /* @__PURE__ */
|
|
2386
|
+
return /* @__PURE__ */ React11.createElement(PlaceholderRadar, { size: RADAR_SIZE, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2221
2387
|
}
|
|
2222
|
-
return /* @__PURE__ */
|
|
2388
|
+
return /* @__PURE__ */ React11.createElement(
|
|
2223
2389
|
RadarChartCore,
|
|
2224
2390
|
{
|
|
2225
2391
|
topics,
|
|
@@ -2241,7 +2407,7 @@ function CompassCardHorizontal({
|
|
|
2241
2407
|
var _a2, _b, _c;
|
|
2242
2408
|
const imageSrc = (politician == null ? void 0 : politician.photo_origin_url) || (politician == null ? void 0 : politician.images) && ((_a2 = politician.images[0]) == null ? void 0 : _a2.url) || null;
|
|
2243
2409
|
if (imageSrc && !imgError) {
|
|
2244
|
-
return /* @__PURE__ */
|
|
2410
|
+
return /* @__PURE__ */ React11.createElement(
|
|
2245
2411
|
"img",
|
|
2246
2412
|
{
|
|
2247
2413
|
src: imageSrc,
|
|
@@ -2259,7 +2425,7 @@ function CompassCardHorizontal({
|
|
|
2259
2425
|
}
|
|
2260
2426
|
const parts = ((politician == null ? void 0 : politician.full_name) || "").split(" ").filter(Boolean);
|
|
2261
2427
|
const initials = (parts.length >= 2 ? parts[0][0] + parts[parts.length - 1][0] : ((_c = parts[0]) == null ? void 0 : _c[0]) || "?").toUpperCase();
|
|
2262
|
-
return /* @__PURE__ */
|
|
2428
|
+
return /* @__PURE__ */ React11.createElement("div", { style: {
|
|
2263
2429
|
width: "100%",
|
|
2264
2430
|
height: "100%",
|
|
2265
2431
|
backgroundColor: colors.evMutedBlue,
|
|
@@ -2273,7 +2439,7 @@ function CompassCardHorizontal({
|
|
|
2273
2439
|
} }, initials);
|
|
2274
2440
|
}
|
|
2275
2441
|
function renderEmptyVariant() {
|
|
2276
|
-
return /* @__PURE__ */
|
|
2442
|
+
return /* @__PURE__ */ React11.createElement("div", { style: {
|
|
2277
2443
|
width: "100%",
|
|
2278
2444
|
height: "100%",
|
|
2279
2445
|
display: "flex",
|
|
@@ -2284,14 +2450,14 @@ function CompassCardHorizontal({
|
|
|
2284
2450
|
padding: "12px 14px",
|
|
2285
2451
|
boxSizing: "border-box",
|
|
2286
2452
|
backgroundColor: colorScales.teal["050"]
|
|
2287
|
-
} }, /* @__PURE__ */
|
|
2453
|
+
} }, /* @__PURE__ */ React11.createElement(PlaceholderRadar, { size: 140, name: (politician == null ? void 0 : politician.full_name) || "" }), /* @__PURE__ */ React11.createElement("p", { style: {
|
|
2288
2454
|
margin: 0,
|
|
2289
2455
|
fontSize: fontSizes.xs,
|
|
2290
2456
|
color: colors.textMuted,
|
|
2291
2457
|
textAlign: "center",
|
|
2292
2458
|
lineHeight: 1.4,
|
|
2293
2459
|
fontFamily: fonts.primary
|
|
2294
|
-
} }, "Calibrate your compass to see how you align with ", (politician == null ? void 0 : politician.full_name) || "this official"), /* @__PURE__ */
|
|
2460
|
+
} }, "Calibrate your compass to see how you align with ", (politician == null ? void 0 : politician.full_name) || "this official"), /* @__PURE__ */ React11.createElement(
|
|
2295
2461
|
"button",
|
|
2296
2462
|
{
|
|
2297
2463
|
type: "button",
|
|
@@ -2319,7 +2485,7 @@ function CompassCardHorizontal({
|
|
|
2319
2485
|
));
|
|
2320
2486
|
}
|
|
2321
2487
|
function renderUnavailablePlate(message = "Compass currently unavailable for this role.") {
|
|
2322
|
-
return /* @__PURE__ */
|
|
2488
|
+
return /* @__PURE__ */ React11.createElement("div", { style: {
|
|
2323
2489
|
width: "100%",
|
|
2324
2490
|
height: "100%",
|
|
2325
2491
|
backgroundColor: colorScales.teal["050"],
|
|
@@ -2328,7 +2494,7 @@ function CompassCardHorizontal({
|
|
|
2328
2494
|
justifyContent: "center",
|
|
2329
2495
|
padding: spacing[4],
|
|
2330
2496
|
boxSizing: "border-box"
|
|
2331
|
-
} }, /* @__PURE__ */
|
|
2497
|
+
} }, /* @__PURE__ */ React11.createElement("p", { style: {
|
|
2332
2498
|
fontSize: fontSizes.sm,
|
|
2333
2499
|
fontWeight: fontWeights.semibold,
|
|
2334
2500
|
lineHeight: 1.4,
|
|
@@ -2347,7 +2513,7 @@ function CompassCardHorizontal({
|
|
|
2347
2513
|
const name = (politician == null ? void 0 : politician.full_name) || "this official";
|
|
2348
2514
|
return renderUnavailablePlate(`No compass stances on file for ${name} yet.`);
|
|
2349
2515
|
}
|
|
2350
|
-
return /* @__PURE__ */
|
|
2516
|
+
return /* @__PURE__ */ React11.createElement("div", { style: {
|
|
2351
2517
|
width: "100%",
|
|
2352
2518
|
height: "100%",
|
|
2353
2519
|
display: "flex",
|
|
@@ -2357,7 +2523,7 @@ function CompassCardHorizontal({
|
|
|
2357
2523
|
boxSizing: "border-box"
|
|
2358
2524
|
} }, renderCompass());
|
|
2359
2525
|
}
|
|
2360
|
-
return /* @__PURE__ */
|
|
2526
|
+
return /* @__PURE__ */ React11.createElement(
|
|
2361
2527
|
"div",
|
|
2362
2528
|
{
|
|
2363
2529
|
role: "article",
|
|
@@ -2376,7 +2542,7 @@ function CompassCardHorizontal({
|
|
|
2376
2542
|
onFocus: () => setFocused(true),
|
|
2377
2543
|
onBlur: () => setFocused(false)
|
|
2378
2544
|
},
|
|
2379
|
-
/* @__PURE__ */
|
|
2545
|
+
/* @__PURE__ */ React11.createElement("div", { style: slotStyle }, renderSlotContent(), surface === "elections" && politician.running_unopposed && /* @__PURE__ */ React11.createElement("div", { style: {
|
|
2380
2546
|
position: "absolute",
|
|
2381
2547
|
bottom: "15px",
|
|
2382
2548
|
left: 0,
|
|
@@ -2391,7 +2557,7 @@ function CompassCardHorizontal({
|
|
|
2391
2557
|
padding: "6px 0",
|
|
2392
2558
|
pointerEvents: "none"
|
|
2393
2559
|
} }, typeof politician.running_unopposed === "string" ? politician.running_unopposed : "Running Unopposed")),
|
|
2394
|
-
/* @__PURE__ */
|
|
2560
|
+
/* @__PURE__ */ React11.createElement("div", { style: { flex: 1, minWidth: 0, padding: spacing[4], paddingLeft: spacing[3] } }, /* @__PURE__ */ React11.createElement(
|
|
2395
2561
|
CompassCardHorizontalMeta,
|
|
2396
2562
|
{
|
|
2397
2563
|
politician,
|
|
@@ -2403,7 +2569,7 @@ function CompassCardHorizontal({
|
|
|
2403
2569
|
}
|
|
2404
2570
|
|
|
2405
2571
|
// src/CompassCardVertical.jsx
|
|
2406
|
-
import
|
|
2572
|
+
import React12, { useState as useState6, useEffect as useEffect6 } from "react";
|
|
2407
2573
|
var RADAR_SIZE2 = 400;
|
|
2408
2574
|
function CompassCardVertical({
|
|
2409
2575
|
politician,
|
|
@@ -2444,7 +2610,7 @@ function CompassCardVertical({
|
|
|
2444
2610
|
function renderCompass() {
|
|
2445
2611
|
var _a2, _b, _c;
|
|
2446
2612
|
if (!userAnswers || userAnswers.length === 0) {
|
|
2447
|
-
return /* @__PURE__ */
|
|
2613
|
+
return /* @__PURE__ */ React12.createElement(PlaceholderRadar, { size: RADAR_SIZE2, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2448
2614
|
}
|
|
2449
2615
|
let topics = [];
|
|
2450
2616
|
let data = {};
|
|
@@ -2480,17 +2646,17 @@ function CompassCardVertical({
|
|
|
2480
2646
|
}, {}) : politician.stances;
|
|
2481
2647
|
}
|
|
2482
2648
|
if (topics.length === 0) {
|
|
2483
|
-
return /* @__PURE__ */
|
|
2649
|
+
return /* @__PURE__ */ React12.createElement(PlaceholderRadar, { size: RADAR_SIZE2, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2484
2650
|
}
|
|
2485
2651
|
} catch {
|
|
2486
|
-
return /* @__PURE__ */
|
|
2652
|
+
return /* @__PURE__ */ React12.createElement(PlaceholderRadar, { size: RADAR_SIZE2, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2487
2653
|
}
|
|
2488
2654
|
const unansweredSpokes = {};
|
|
2489
2655
|
for (const t of topics) {
|
|
2490
2656
|
const v = compareData[t.short_title];
|
|
2491
2657
|
if (!v || Number(v) === 0) unansweredSpokes[t.short_title] = true;
|
|
2492
2658
|
}
|
|
2493
|
-
return /* @__PURE__ */
|
|
2659
|
+
return /* @__PURE__ */ React12.createElement("div", { style: { width: RADAR_SIZE2 + 240, maxWidth: "100%", flexShrink: 0 } }, /* @__PURE__ */ React12.createElement(
|
|
2494
2660
|
RadarChartCore,
|
|
2495
2661
|
{
|
|
2496
2662
|
topics,
|
|
@@ -2525,7 +2691,7 @@ function CompassCardVertical({
|
|
|
2525
2691
|
justifyContent: "center"
|
|
2526
2692
|
};
|
|
2527
2693
|
if (imageSrc && !imgError) {
|
|
2528
|
-
return /* @__PURE__ */
|
|
2694
|
+
return /* @__PURE__ */ React12.createElement("div", { style: baseStyle }, /* @__PURE__ */ React12.createElement(
|
|
2529
2695
|
"img",
|
|
2530
2696
|
{
|
|
2531
2697
|
src: imageSrc,
|
|
@@ -2543,7 +2709,7 @@ function CompassCardVertical({
|
|
|
2543
2709
|
}
|
|
2544
2710
|
const parts = ((politician == null ? void 0 : politician.full_name) || "").split(" ").filter(Boolean);
|
|
2545
2711
|
const initials = (parts.length >= 2 ? parts[0][0] + parts[parts.length - 1][0] : ((_c = parts[0]) == null ? void 0 : _c[0]) || "?").toUpperCase();
|
|
2546
|
-
return /* @__PURE__ */
|
|
2712
|
+
return /* @__PURE__ */ React12.createElement("div", { style: baseStyle }, /* @__PURE__ */ React12.createElement("span", { style: {
|
|
2547
2713
|
color: colors.textWhite,
|
|
2548
2714
|
fontFamily: fonts.primary,
|
|
2549
2715
|
fontWeight: fontWeights.bold,
|
|
@@ -2554,7 +2720,7 @@ function CompassCardVertical({
|
|
|
2554
2720
|
var _a2, _b, _c;
|
|
2555
2721
|
const imageSrc = (politician == null ? void 0 : politician.photo_origin_url) || (politician == null ? void 0 : politician.images) && ((_a2 = politician.images[0]) == null ? void 0 : _a2.url) || null;
|
|
2556
2722
|
if (imageSrc && !imgError) {
|
|
2557
|
-
return /* @__PURE__ */
|
|
2723
|
+
return /* @__PURE__ */ React12.createElement(
|
|
2558
2724
|
"img",
|
|
2559
2725
|
{
|
|
2560
2726
|
src: imageSrc,
|
|
@@ -2573,7 +2739,7 @@ function CompassCardVertical({
|
|
|
2573
2739
|
}
|
|
2574
2740
|
const parts = ((politician == null ? void 0 : politician.full_name) || "").split(" ").filter(Boolean);
|
|
2575
2741
|
const initials = (parts.length >= 2 ? parts[0][0] + parts[parts.length - 1][0] : ((_c = parts[0]) == null ? void 0 : _c[0]) || "?").toUpperCase();
|
|
2576
|
-
return /* @__PURE__ */
|
|
2742
|
+
return /* @__PURE__ */ React12.createElement("div", { style: {
|
|
2577
2743
|
width: RADAR_SIZE2,
|
|
2578
2744
|
height: RADAR_SIZE2,
|
|
2579
2745
|
backgroundColor: colors.evMutedBlue,
|
|
@@ -2588,7 +2754,7 @@ function CompassCardVertical({
|
|
|
2588
2754
|
} }, initials);
|
|
2589
2755
|
}
|
|
2590
2756
|
function renderEmptyVariant() {
|
|
2591
|
-
return /* @__PURE__ */
|
|
2757
|
+
return /* @__PURE__ */ React12.createElement("div", { style: {
|
|
2592
2758
|
width: "100%",
|
|
2593
2759
|
height: "100%",
|
|
2594
2760
|
flex: 1,
|
|
@@ -2601,14 +2767,14 @@ function CompassCardVertical({
|
|
|
2601
2767
|
boxSizing: "border-box",
|
|
2602
2768
|
backgroundColor: colorScales.teal["050"],
|
|
2603
2769
|
borderRadius: borderRadius.md
|
|
2604
|
-
} }, /* @__PURE__ */
|
|
2770
|
+
} }, /* @__PURE__ */ React12.createElement(PlaceholderRadar, { size: 220, name: (politician == null ? void 0 : politician.full_name) || "" }), /* @__PURE__ */ React12.createElement("p", { style: {
|
|
2605
2771
|
margin: 0,
|
|
2606
2772
|
fontSize: fontSizes.sm,
|
|
2607
2773
|
color: colors.textMuted,
|
|
2608
2774
|
textAlign: "center",
|
|
2609
2775
|
lineHeight: 1.4,
|
|
2610
2776
|
fontFamily: fonts.primary
|
|
2611
|
-
} }, "Calibrate your compass to see how you align with ", (politician == null ? void 0 : politician.full_name) || "this official"), /* @__PURE__ */
|
|
2777
|
+
} }, "Calibrate your compass to see how you align with ", (politician == null ? void 0 : politician.full_name) || "this official"), /* @__PURE__ */ React12.createElement(
|
|
2612
2778
|
"button",
|
|
2613
2779
|
{
|
|
2614
2780
|
type: "button",
|
|
@@ -2634,7 +2800,7 @@ function CompassCardVertical({
|
|
|
2634
2800
|
));
|
|
2635
2801
|
}
|
|
2636
2802
|
function renderUnavailablePlate(message) {
|
|
2637
|
-
return /* @__PURE__ */
|
|
2803
|
+
return /* @__PURE__ */ React12.createElement("div", { style: {
|
|
2638
2804
|
width: "100%",
|
|
2639
2805
|
height: "100%",
|
|
2640
2806
|
flex: 1,
|
|
@@ -2645,7 +2811,7 @@ function CompassCardVertical({
|
|
|
2645
2811
|
justifyContent: "center",
|
|
2646
2812
|
padding: spacing[6],
|
|
2647
2813
|
boxSizing: "border-box"
|
|
2648
|
-
} }, /* @__PURE__ */
|
|
2814
|
+
} }, /* @__PURE__ */ React12.createElement("p", { style: {
|
|
2649
2815
|
fontSize: fontSizes.base,
|
|
2650
2816
|
fontWeight: fontWeights.semibold,
|
|
2651
2817
|
lineHeight: 1.4,
|
|
@@ -2666,7 +2832,7 @@ function CompassCardVertical({
|
|
|
2666
2832
|
}
|
|
2667
2833
|
return renderCompass();
|
|
2668
2834
|
}
|
|
2669
|
-
return /* @__PURE__ */
|
|
2835
|
+
return /* @__PURE__ */ React12.createElement(
|
|
2670
2836
|
"div",
|
|
2671
2837
|
{
|
|
2672
2838
|
role: "article",
|
|
@@ -2685,21 +2851,21 @@ function CompassCardVertical({
|
|
|
2685
2851
|
onFocus: () => setFocused(true),
|
|
2686
2852
|
onBlur: () => setFocused(false)
|
|
2687
2853
|
},
|
|
2688
|
-
/* @__PURE__ */
|
|
2854
|
+
/* @__PURE__ */ React12.createElement("div", { style: { padding: spacing[4], paddingBottom: spacing[3], display: "flex", alignItems: "stretch", gap: spacing[3], flexShrink: 0 } }, renderAvatar(), /* @__PURE__ */ React12.createElement("div", { style: { display: "flex", flexDirection: "column", gap: spacing[1], minWidth: 0, flex: 1 } }, /* @__PURE__ */ React12.createElement("p", { style: {
|
|
2689
2855
|
fontFamily: fonts.primary,
|
|
2690
2856
|
fontSize: fontSizes.xl,
|
|
2691
2857
|
fontWeight: fontWeights.semibold,
|
|
2692
2858
|
lineHeight: 1.3,
|
|
2693
2859
|
color: colors.evMutedBlue,
|
|
2694
2860
|
margin: 0
|
|
2695
|
-
} }, politician.full_name), /* @__PURE__ */
|
|
2861
|
+
} }, politician.full_name), /* @__PURE__ */ React12.createElement("p", { style: {
|
|
2696
2862
|
fontFamily: fonts.primary,
|
|
2697
2863
|
fontSize: fontSizes.sm,
|
|
2698
2864
|
fontWeight: fontWeights.semibold,
|
|
2699
2865
|
lineHeight: 1.4,
|
|
2700
2866
|
color: colors.textSecondary,
|
|
2701
2867
|
margin: 0
|
|
2702
|
-
} }, titleText || ""), politician.district_label && /* @__PURE__ */
|
|
2868
|
+
} }, titleText || ""), politician.district_label && /* @__PURE__ */ React12.createElement("p", { style: {
|
|
2703
2869
|
fontFamily: fonts.primary,
|
|
2704
2870
|
fontSize: fontSizes.sm,
|
|
2705
2871
|
fontWeight: fontWeights.regular,
|
|
@@ -2709,7 +2875,7 @@ function CompassCardVertical({
|
|
|
2709
2875
|
overflow: "hidden",
|
|
2710
2876
|
textOverflow: "ellipsis",
|
|
2711
2877
|
whiteSpace: "nowrap"
|
|
2712
|
-
} }, politician.district_label), /* @__PURE__ */
|
|
2878
|
+
} }, politician.district_label), /* @__PURE__ */ React12.createElement("div", { style: { marginTop: "auto" } }, /* @__PURE__ */ React12.createElement(
|
|
2713
2879
|
IconOverlay,
|
|
2714
2880
|
{
|
|
2715
2881
|
ballot: politician.ballot || null,
|
|
@@ -2717,7 +2883,7 @@ function CompassCardVertical({
|
|
|
2717
2883
|
branch: politician.branch || null
|
|
2718
2884
|
}
|
|
2719
2885
|
)))),
|
|
2720
|
-
surface === "elections" && politician.withdrawn && /* @__PURE__ */
|
|
2886
|
+
surface === "elections" && politician.withdrawn && /* @__PURE__ */ React12.createElement("div", { style: {
|
|
2721
2887
|
margin: `0 ${spacing[4]} ${spacing[3]}`,
|
|
2722
2888
|
backgroundColor: "rgba(120,0,0,0.85)",
|
|
2723
2889
|
color: "#fff",
|
|
@@ -2729,7 +2895,7 @@ function CompassCardVertical({
|
|
|
2729
2895
|
padding: "6px 0",
|
|
2730
2896
|
borderRadius: borderRadius.sm
|
|
2731
2897
|
} }, "Withdrawn"),
|
|
2732
|
-
surface === "elections" && !politician.withdrawn && politician.running_unopposed && /* @__PURE__ */
|
|
2898
|
+
surface === "elections" && !politician.withdrawn && politician.running_unopposed && /* @__PURE__ */ React12.createElement("div", { style: {
|
|
2733
2899
|
margin: `0 ${spacing[4]} ${spacing[3]}`,
|
|
2734
2900
|
backgroundColor: "rgba(0,0,0,0.75)",
|
|
2735
2901
|
color: "#fff",
|
|
@@ -2741,7 +2907,7 @@ function CompassCardVertical({
|
|
|
2741
2907
|
padding: "6px 0",
|
|
2742
2908
|
borderRadius: borderRadius.sm
|
|
2743
2909
|
} }, typeof politician.running_unopposed === "string" ? politician.running_unopposed : "Running Unopposed"),
|
|
2744
|
-
/* @__PURE__ */
|
|
2910
|
+
/* @__PURE__ */ React12.createElement("div", { style: {
|
|
2745
2911
|
flex: 1,
|
|
2746
2912
|
padding: spacing[4],
|
|
2747
2913
|
paddingTop: 0,
|
|
@@ -2755,7 +2921,7 @@ function CompassCardVertical({
|
|
|
2755
2921
|
}
|
|
2756
2922
|
|
|
2757
2923
|
// src/CompassKey.jsx
|
|
2758
|
-
import
|
|
2924
|
+
import React13, { useEffect as useEffect7, useState as useState7 } from "react";
|
|
2759
2925
|
|
|
2760
2926
|
// src/evContext.js
|
|
2761
2927
|
var DEFAULT_BROKER_URL = "https://ev-context.empowered.vote/";
|
|
@@ -3032,7 +3198,7 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3032
3198
|
persistDismissed(false);
|
|
3033
3199
|
}
|
|
3034
3200
|
if (!loaded) return null;
|
|
3035
|
-
const Swatch = ({ color, label, ring }) => /* @__PURE__ */
|
|
3201
|
+
const Swatch = ({ color, label, ring }) => /* @__PURE__ */ React13.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: spacing[1] } }, /* @__PURE__ */ React13.createElement("span", { style: {
|
|
3036
3202
|
display: "inline-block",
|
|
3037
3203
|
width: 12,
|
|
3038
3204
|
height: 12,
|
|
@@ -3040,9 +3206,9 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3040
3206
|
background: color,
|
|
3041
3207
|
border: `2px solid ${ring || "#fff"}`,
|
|
3042
3208
|
boxShadow: "0 0 0 1px rgba(0,0,0,0.08)"
|
|
3043
|
-
} }), /* @__PURE__ */
|
|
3209
|
+
} }), /* @__PURE__ */ React13.createElement("span", { style: { fontSize: fontSizes.xs, color: colors.textSecondary, fontFamily: fonts.primary } }, label));
|
|
3044
3210
|
if (dismissed) {
|
|
3045
|
-
return /* @__PURE__ */
|
|
3211
|
+
return /* @__PURE__ */ React13.createElement(
|
|
3046
3212
|
"button",
|
|
3047
3213
|
{
|
|
3048
3214
|
type: "button",
|
|
@@ -3063,11 +3229,11 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3063
3229
|
cursor: "pointer"
|
|
3064
3230
|
}
|
|
3065
3231
|
},
|
|
3066
|
-
/* @__PURE__ */
|
|
3232
|
+
/* @__PURE__ */ React13.createElement("span", { "aria-hidden": "true" }, "?"),
|
|
3067
3233
|
" Compass key"
|
|
3068
3234
|
);
|
|
3069
3235
|
}
|
|
3070
|
-
return /* @__PURE__ */
|
|
3236
|
+
return /* @__PURE__ */ React13.createElement(
|
|
3071
3237
|
"div",
|
|
3072
3238
|
{
|
|
3073
3239
|
role: "region",
|
|
@@ -3086,17 +3252,17 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3086
3252
|
boxSizing: "border-box"
|
|
3087
3253
|
}
|
|
3088
3254
|
},
|
|
3089
|
-
!compact && /* @__PURE__ */
|
|
3255
|
+
!compact && /* @__PURE__ */ React13.createElement("span", { style: {
|
|
3090
3256
|
fontSize: fontSizes.xs,
|
|
3091
3257
|
fontWeight: fontWeights.semibold,
|
|
3092
3258
|
color: colors.textMuted,
|
|
3093
3259
|
textTransform: "uppercase",
|
|
3094
3260
|
letterSpacing: "0.5px"
|
|
3095
3261
|
} }, "Compass key"),
|
|
3096
|
-
/* @__PURE__ */
|
|
3097
|
-
/* @__PURE__ */
|
|
3098
|
-
/* @__PURE__ */
|
|
3099
|
-
/* @__PURE__ */
|
|
3262
|
+
/* @__PURE__ */ React13.createElement(Swatch, { color: "#7C6B9E", label: "You" }),
|
|
3263
|
+
/* @__PURE__ */ React13.createElement(Swatch, { color: "#5A9A6E", label: "Politician" }),
|
|
3264
|
+
/* @__PURE__ */ React13.createElement(Swatch, { color: "#fed12e", label: "Match" }),
|
|
3265
|
+
/* @__PURE__ */ React13.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: spacing[1] } }, /* @__PURE__ */ React13.createElement("span", { style: {
|
|
3100
3266
|
fontSize: fontSizes.xs,
|
|
3101
3267
|
fontWeight: fontWeights.semibold,
|
|
3102
3268
|
color: "#9ca3af",
|
|
@@ -3104,8 +3270,8 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3104
3270
|
textDecoration: "underline",
|
|
3105
3271
|
textDecorationStyle: "dashed",
|
|
3106
3272
|
textUnderlineOffset: "3px"
|
|
3107
|
-
} }, "Topic"), /* @__PURE__ */
|
|
3108
|
-
/* @__PURE__ */
|
|
3273
|
+
} }, "Topic"), /* @__PURE__ */ React13.createElement("span", { style: { fontSize: fontSizes.xs, color: colors.textSecondary, fontFamily: fonts.primary } }, "= no stance")),
|
|
3274
|
+
/* @__PURE__ */ React13.createElement(
|
|
3109
3275
|
"button",
|
|
3110
3276
|
{
|
|
3111
3277
|
type: "button",
|
|
@@ -3128,7 +3294,7 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3128
3294
|
}
|
|
3129
3295
|
|
|
3130
3296
|
// src/CategorySection.jsx
|
|
3131
|
-
import
|
|
3297
|
+
import React14, { useState as useState8 } from "react";
|
|
3132
3298
|
function CategorySection({
|
|
3133
3299
|
title,
|
|
3134
3300
|
infoTooltip,
|
|
@@ -3206,7 +3372,7 @@ function CategorySection({
|
|
|
3206
3372
|
gap: spacing[4]
|
|
3207
3373
|
}
|
|
3208
3374
|
};
|
|
3209
|
-
return /* @__PURE__ */
|
|
3375
|
+
return /* @__PURE__ */ React14.createElement("section", { style: styles2.section, className: "ev-category-section" }, /* @__PURE__ */ React14.createElement("div", { style: styles2.header }, /* @__PURE__ */ React14.createElement("span", { style: styles2.titlePill }, title), infoTooltip && /* @__PURE__ */ React14.createElement(
|
|
3210
3376
|
"button",
|
|
3211
3377
|
{
|
|
3212
3378
|
type: "button",
|
|
@@ -3218,8 +3384,8 @@ function CategorySection({
|
|
|
3218
3384
|
"aria-label": `Info about ${title}`
|
|
3219
3385
|
},
|
|
3220
3386
|
"i",
|
|
3221
|
-
showTooltip && /* @__PURE__ */
|
|
3222
|
-
), websiteUrl && /* @__PURE__ */
|
|
3387
|
+
showTooltip && /* @__PURE__ */ React14.createElement("div", { style: styles2.tooltip, role: "tooltip" }, infoTooltip)
|
|
3388
|
+
), websiteUrl && /* @__PURE__ */ React14.createElement(
|
|
3223
3389
|
"a",
|
|
3224
3390
|
{
|
|
3225
3391
|
href: websiteUrl,
|
|
@@ -3228,7 +3394,7 @@ function CategorySection({
|
|
|
3228
3394
|
style: styles2.externalLink,
|
|
3229
3395
|
"aria-label": `Visit official website for ${title}`
|
|
3230
3396
|
},
|
|
3231
|
-
/* @__PURE__ */
|
|
3397
|
+
/* @__PURE__ */ React14.createElement(
|
|
3232
3398
|
"svg",
|
|
3233
3399
|
{
|
|
3234
3400
|
viewBox: "0 0 24 24",
|
|
@@ -3236,7 +3402,7 @@ function CategorySection({
|
|
|
3236
3402
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3237
3403
|
style: { width: "14px", height: "14px" }
|
|
3238
3404
|
},
|
|
3239
|
-
/* @__PURE__ */
|
|
3405
|
+
/* @__PURE__ */ React14.createElement(
|
|
3240
3406
|
"path",
|
|
3241
3407
|
{
|
|
3242
3408
|
d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",
|
|
@@ -3247,11 +3413,11 @@ function CategorySection({
|
|
|
3247
3413
|
}
|
|
3248
3414
|
)
|
|
3249
3415
|
)
|
|
3250
|
-
)), /* @__PURE__ */
|
|
3416
|
+
)), /* @__PURE__ */ React14.createElement("div", { style: styles2.grid, className: "ev-category-grid" }, children));
|
|
3251
3417
|
}
|
|
3252
3418
|
|
|
3253
3419
|
// src/SubGroupSection.jsx
|
|
3254
|
-
import
|
|
3420
|
+
import React15 from "react";
|
|
3255
3421
|
function SubGroupSection({ title, websiteUrl, children, gridTemplateColumns, gap, justifyContent }) {
|
|
3256
3422
|
const styles2 = {
|
|
3257
3423
|
section: {
|
|
@@ -3286,7 +3452,7 @@ function SubGroupSection({ title, websiteUrl, children, gridTemplateColumns, gap
|
|
|
3286
3452
|
width: "100%"
|
|
3287
3453
|
}
|
|
3288
3454
|
};
|
|
3289
|
-
return /* @__PURE__ */
|
|
3455
|
+
return /* @__PURE__ */ React15.createElement("div", { style: styles2.section }, title && /* @__PURE__ */ React15.createElement("div", { style: styles2.header }, /* @__PURE__ */ React15.createElement("span", { style: styles2.label }, title), websiteUrl && /* @__PURE__ */ React15.createElement(
|
|
3290
3456
|
"a",
|
|
3291
3457
|
{
|
|
3292
3458
|
href: websiteUrl,
|
|
@@ -3294,12 +3460,12 @@ function SubGroupSection({ title, websiteUrl, children, gridTemplateColumns, gap
|
|
|
3294
3460
|
rel: "noopener noreferrer",
|
|
3295
3461
|
style: styles2.link
|
|
3296
3462
|
},
|
|
3297
|
-
/* @__PURE__ */
|
|
3298
|
-
)), /* @__PURE__ */
|
|
3463
|
+
/* @__PURE__ */ React15.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: "12px", height: "12px" } }, /* @__PURE__ */ React15.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React15.createElement("path", { d: "M2 12h20M12 2a15.3 15.3 0 014 10 15.3 15.3 0 01-4 10 15.3 15.3 0 01-4-10 15.3 15.3 0 014-10z", stroke: "currentColor", strokeWidth: "2" }))
|
|
3464
|
+
)), /* @__PURE__ */ React15.createElement("div", { style: styles2.grid, className: "ev-subgroup-grid" }, children));
|
|
3299
3465
|
}
|
|
3300
3466
|
|
|
3301
3467
|
// src/GovernmentBodySection.jsx
|
|
3302
|
-
import
|
|
3468
|
+
import React16, { useState as useState9 } from "react";
|
|
3303
3469
|
function GovernmentBodySection({
|
|
3304
3470
|
title,
|
|
3305
3471
|
websiteUrl,
|
|
@@ -3348,7 +3514,7 @@ function GovernmentBodySection({
|
|
|
3348
3514
|
display: expanded ? "block" : "none"
|
|
3349
3515
|
}
|
|
3350
3516
|
};
|
|
3351
|
-
return /* @__PURE__ */
|
|
3517
|
+
return /* @__PURE__ */ React16.createElement("section", { style: styles2.section, className: "ev-gov-body-section" }, /* @__PURE__ */ React16.createElement(
|
|
3352
3518
|
"div",
|
|
3353
3519
|
{
|
|
3354
3520
|
style: styles2.header,
|
|
@@ -3364,8 +3530,8 @@ function GovernmentBodySection({
|
|
|
3364
3530
|
"aria-expanded": expanded,
|
|
3365
3531
|
"aria-label": `${expanded ? "Collapse" : "Expand"} ${title}`
|
|
3366
3532
|
},
|
|
3367
|
-
/* @__PURE__ */
|
|
3368
|
-
websiteUrl && /* @__PURE__ */
|
|
3533
|
+
/* @__PURE__ */ React16.createElement("span", { style: styles2.title }, title),
|
|
3534
|
+
websiteUrl && /* @__PURE__ */ React16.createElement(
|
|
3369
3535
|
"a",
|
|
3370
3536
|
{
|
|
3371
3537
|
href: websiteUrl,
|
|
@@ -3375,14 +3541,14 @@ function GovernmentBodySection({
|
|
|
3375
3541
|
onClick: (e) => e.stopPropagation(),
|
|
3376
3542
|
"aria-label": `Visit ${title} website`
|
|
3377
3543
|
},
|
|
3378
|
-
/* @__PURE__ */
|
|
3544
|
+
/* @__PURE__ */ React16.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: "14px", height: "14px" } }, /* @__PURE__ */ React16.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React16.createElement("path", { d: "M2 12h20M12 2a15.3 15.3 0 014 10 15.3 15.3 0 01-4 10 15.3 15.3 0 01-4-10 15.3 15.3 0 014-10z", stroke: "currentColor", strokeWidth: "2" }))
|
|
3379
3545
|
),
|
|
3380
|
-
/* @__PURE__ */
|
|
3381
|
-
), /* @__PURE__ */
|
|
3546
|
+
/* @__PURE__ */ React16.createElement("span", { style: styles2.toggle, "aria-hidden": "true" }, "\u25BC")
|
|
3547
|
+
), /* @__PURE__ */ React16.createElement("div", { style: styles2.content }, children));
|
|
3382
3548
|
}
|
|
3383
3549
|
|
|
3384
3550
|
// src/SocialLinks.jsx
|
|
3385
|
-
import
|
|
3551
|
+
import React17 from "react";
|
|
3386
3552
|
var SOCIAL_PLATFORMS = [
|
|
3387
3553
|
{ test: /facebook\.com/i, platform: "facebook" },
|
|
3388
3554
|
{ test: /twitter\.com|x\.com/i, platform: "twitter" },
|
|
@@ -3453,7 +3619,7 @@ function SocialLinks({
|
|
|
3453
3619
|
}
|
|
3454
3620
|
};
|
|
3455
3621
|
const platformIconMap = {
|
|
3456
|
-
twitter: /* @__PURE__ */
|
|
3622
|
+
twitter: /* @__PURE__ */ React17.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React17.createElement(
|
|
3457
3623
|
"path",
|
|
3458
3624
|
{
|
|
3459
3625
|
d: "M4 4L10.5 12.5M20 20L13.5 11.5M10.5 12.5L4 20H8L13.5 11.5M10.5 12.5L16 4H20L13.5 11.5",
|
|
@@ -3463,7 +3629,7 @@ function SocialLinks({
|
|
|
3463
3629
|
strokeLinejoin: "round"
|
|
3464
3630
|
}
|
|
3465
3631
|
)),
|
|
3466
|
-
facebook: /* @__PURE__ */
|
|
3632
|
+
facebook: /* @__PURE__ */ React17.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React17.createElement(
|
|
3467
3633
|
"path",
|
|
3468
3634
|
{
|
|
3469
3635
|
d: "M18 2H15C13.6739 2 12.4021 2.52678 11.4645 3.46447C10.5268 4.40215 10 5.67392 10 7V10H7V14H10V22H14V14H17L18 10H14V7C14 6.73478 14.1054 6.48043 14.2929 6.29289C14.4804 6.10536 14.7348 6 15 6H18V2Z",
|
|
@@ -3473,8 +3639,8 @@ function SocialLinks({
|
|
|
3473
3639
|
strokeLinejoin: "round"
|
|
3474
3640
|
}
|
|
3475
3641
|
)),
|
|
3476
|
-
instagram: /* @__PURE__ */
|
|
3477
|
-
linkedin: /* @__PURE__ */
|
|
3642
|
+
instagram: /* @__PURE__ */ React17.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React17.createElement("rect", { x: "2", y: "2", width: "20", height: "20", rx: "5", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React17.createElement("circle", { cx: "12", cy: "12", r: "4", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React17.createElement("circle", { cx: "18", cy: "6", r: "1", fill: "currentColor" })),
|
|
3643
|
+
linkedin: /* @__PURE__ */ React17.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React17.createElement(
|
|
3478
3644
|
"path",
|
|
3479
3645
|
{
|
|
3480
3646
|
d: "M16 8C17.5913 8 19.1174 8.63214 20.2426 9.75736C21.3679 10.8826 22 12.4087 22 14V21H18V14C18 13.4696 17.7893 12.9609 17.4142 12.5858C17.0391 12.2107 16.5304 12 16 12C15.4696 12 14.9609 12.2107 14.5858 12.5858C14.2107 12.9609 14 13.4696 14 14V21H10V14C10 12.4087 10.6321 10.8826 11.7574 9.75736C12.8826 8.63214 14.4087 8 16 8Z",
|
|
@@ -3483,8 +3649,8 @@ function SocialLinks({
|
|
|
3483
3649
|
strokeLinecap: "round",
|
|
3484
3650
|
strokeLinejoin: "round"
|
|
3485
3651
|
}
|
|
3486
|
-
), /* @__PURE__ */
|
|
3487
|
-
youtube: /* @__PURE__ */
|
|
3652
|
+
), /* @__PURE__ */ React17.createElement("rect", { x: "2", y: "9", width: "4", height: "12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ React17.createElement("circle", { cx: "4", cy: "4", r: "2", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })),
|
|
3653
|
+
youtube: /* @__PURE__ */ React17.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React17.createElement("rect", { x: "2", y: "5", width: "20", height: "14", rx: "3", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React17.createElement("polygon", { points: "10,9 16,12 10,15", fill: "currentColor" }))
|
|
3488
3654
|
};
|
|
3489
3655
|
const links = [
|
|
3490
3656
|
{
|
|
@@ -3510,7 +3676,7 @@ function SocialLinks({
|
|
|
3510
3676
|
{
|
|
3511
3677
|
href: website,
|
|
3512
3678
|
label: "Website",
|
|
3513
|
-
icon: /* @__PURE__ */
|
|
3679
|
+
icon: /* @__PURE__ */ React17.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React17.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React17.createElement(
|
|
3514
3680
|
"path",
|
|
3515
3681
|
{
|
|
3516
3682
|
d: "M2 12H22M12 2C14.5 4.5 16 8 16 12C16 16 14.5 19.5 12 22C9.5 19.5 8 16 8 12C8 8 9.5 4.5 12 2Z",
|
|
@@ -3540,7 +3706,7 @@ function SocialLinks({
|
|
|
3540
3706
|
if (links.length === 0) {
|
|
3541
3707
|
return null;
|
|
3542
3708
|
}
|
|
3543
|
-
return /* @__PURE__ */
|
|
3709
|
+
return /* @__PURE__ */ React17.createElement("div", { style: styles2.container, className: "ev-social-links" }, links.map((link) => /* @__PURE__ */ React17.createElement(
|
|
3544
3710
|
"a",
|
|
3545
3711
|
{
|
|
3546
3712
|
key: link.label,
|
|
@@ -3563,7 +3729,7 @@ function SocialLinks({
|
|
|
3563
3729
|
}
|
|
3564
3730
|
|
|
3565
3731
|
// src/IssueTags.jsx
|
|
3566
|
-
import
|
|
3732
|
+
import React18 from "react";
|
|
3567
3733
|
function IssueTags({
|
|
3568
3734
|
tags = [],
|
|
3569
3735
|
selectedTags = [],
|
|
@@ -3606,9 +3772,9 @@ function IssueTags({
|
|
|
3606
3772
|
onTagClick(tag.value);
|
|
3607
3773
|
}
|
|
3608
3774
|
};
|
|
3609
|
-
return /* @__PURE__ */
|
|
3775
|
+
return /* @__PURE__ */ React18.createElement("div", { style: styles2.container, className: "ev-issue-tags", role: "list" }, tags.map((tag) => {
|
|
3610
3776
|
const isSelected = selectedTags.includes(tag.value);
|
|
3611
|
-
return /* @__PURE__ */
|
|
3777
|
+
return /* @__PURE__ */ React18.createElement(
|
|
3612
3778
|
"span",
|
|
3613
3779
|
{
|
|
3614
3780
|
key: tag.value,
|
|
@@ -3637,7 +3803,7 @@ function IssueTags({
|
|
|
3637
3803
|
}
|
|
3638
3804
|
|
|
3639
3805
|
// src/CommitteeTable.jsx
|
|
3640
|
-
import
|
|
3806
|
+
import React19, { useState as useState10 } from "react";
|
|
3641
3807
|
var ROLE_ORDER = {
|
|
3642
3808
|
"chair": 0,
|
|
3643
3809
|
"co-chair": 1,
|
|
@@ -3726,7 +3892,7 @@ function CommitteeTable({
|
|
|
3726
3892
|
cursor: "pointer"
|
|
3727
3893
|
}
|
|
3728
3894
|
};
|
|
3729
|
-
return /* @__PURE__ */
|
|
3895
|
+
return /* @__PURE__ */ React19.createElement("div", { style: styles2.container, className: "ev-committee-table" }, /* @__PURE__ */ React19.createElement("h4", { style: styles2.heading }, /* @__PURE__ */ React19.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.createElement("path", { d: "M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2" }), /* @__PURE__ */ React19.createElement("circle", { cx: "9", cy: "7", r: "4" }), /* @__PURE__ */ React19.createElement("path", { d: "M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75" })), title), /* @__PURE__ */ React19.createElement("table", { style: styles2.table }, /* @__PURE__ */ React19.createElement("tbody", null, visible.map((committee, index) => /* @__PURE__ */ React19.createElement("tr", { key: index, style: styles2.row }, /* @__PURE__ */ React19.createElement("td", { style: { ...styles2.cell, ...styles2.nameCell } }, committee.url ? /* @__PURE__ */ React19.createElement(
|
|
3730
3896
|
"a",
|
|
3731
3897
|
{
|
|
3732
3898
|
href: committee.url,
|
|
@@ -3741,7 +3907,7 @@ function CommitteeTable({
|
|
|
3741
3907
|
}
|
|
3742
3908
|
},
|
|
3743
3909
|
committee.name
|
|
3744
|
-
) : committee.name), /* @__PURE__ */
|
|
3910
|
+
) : committee.name), /* @__PURE__ */ React19.createElement("td", { style: { ...styles2.cell, ...styles2.positionCell } }, formatPosition(committee.position)))))), hasMore && /* @__PURE__ */ React19.createElement(
|
|
3745
3911
|
"button",
|
|
3746
3912
|
{
|
|
3747
3913
|
type: "button",
|
|
@@ -3749,7 +3915,7 @@ function CommitteeTable({
|
|
|
3749
3915
|
onClick: () => setShowAll(!showAll)
|
|
3750
3916
|
},
|
|
3751
3917
|
showAll ? "Show less" : `Show all ${sorted.length} committees`,
|
|
3752
|
-
/* @__PURE__ */
|
|
3918
|
+
/* @__PURE__ */ React19.createElement(
|
|
3753
3919
|
"svg",
|
|
3754
3920
|
{
|
|
3755
3921
|
width: "14",
|
|
@@ -3762,16 +3928,16 @@ function CommitteeTable({
|
|
|
3762
3928
|
strokeLinejoin: "round",
|
|
3763
3929
|
style: { transform: showAll ? "rotate(180deg)" : "none", transition: "transform 0.2s" }
|
|
3764
3930
|
},
|
|
3765
|
-
/* @__PURE__ */
|
|
3931
|
+
/* @__PURE__ */ React19.createElement("polyline", { points: "6 9 12 15 18 9" })
|
|
3766
3932
|
)
|
|
3767
3933
|
));
|
|
3768
3934
|
}
|
|
3769
3935
|
|
|
3770
3936
|
// src/PoliticianProfile.jsx
|
|
3771
|
-
import
|
|
3937
|
+
import React22, { useState as useState11, useEffect as useEffect8 } from "react";
|
|
3772
3938
|
|
|
3773
3939
|
// src/LegislativeInlineSummary.jsx
|
|
3774
|
-
import
|
|
3940
|
+
import React20 from "react";
|
|
3775
3941
|
function normalizePosition(pos) {
|
|
3776
3942
|
if (!pos) return "";
|
|
3777
3943
|
return pos.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
@@ -3879,7 +4045,7 @@ function LegislativeInlineSummary({ summary, politicianId, onNavigateToRecord })
|
|
|
3879
4045
|
fontSize: fontSizes.sm,
|
|
3880
4046
|
fontWeight: fontWeights.medium
|
|
3881
4047
|
};
|
|
3882
|
-
return /* @__PURE__ */
|
|
4048
|
+
return /* @__PURE__ */ React20.createElement("div", { style: card }, stats.length > 0 && /* @__PURE__ */ React20.createElement("div", { style: statsRow }, stats.map((s, i) => /* @__PURE__ */ React20.createElement("div", { key: i, style: statItem }, /* @__PURE__ */ React20.createElement("span", { style: statValue }, s.value), s.label && /* @__PURE__ */ React20.createElement("span", { style: statLabel }, s.label)))), mostRecentAction && /* @__PURE__ */ React20.createElement("div", { style: actionLine, title: mostRecentAction }, mostRecentAction), /* @__PURE__ */ React20.createElement("div", null), /* @__PURE__ */ React20.createElement("div", { style: footerRow }, /* @__PURE__ */ React20.createElement(
|
|
3883
4049
|
"button",
|
|
3884
4050
|
{
|
|
3885
4051
|
onClick: () => {
|
|
@@ -3904,12 +4070,12 @@ function LegislativeInlineSummary({ summary, politicianId, onNavigateToRecord })
|
|
|
3904
4070
|
}
|
|
3905
4071
|
},
|
|
3906
4072
|
"View Full Legislative Record",
|
|
3907
|
-
/* @__PURE__ */
|
|
4073
|
+
/* @__PURE__ */ React20.createElement("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React20.createElement("path", { d: "M9 18l6-6-6-6" }))
|
|
3908
4074
|
)));
|
|
3909
4075
|
}
|
|
3910
4076
|
|
|
3911
4077
|
// src/JudicialScorecard.jsx
|
|
3912
|
-
import
|
|
4078
|
+
import React21 from "react";
|
|
3913
4079
|
|
|
3914
4080
|
// src/judicialUtils.js
|
|
3915
4081
|
function formatDate(dateStr) {
|
|
@@ -4027,7 +4193,7 @@ function JudicialScorecard({ judicialRecord, politicianId, onNavigateToRecord })
|
|
|
4027
4193
|
onNavigateToRecord(`/politician/${politicianId}/judicial-record`);
|
|
4028
4194
|
}
|
|
4029
4195
|
};
|
|
4030
|
-
return /* @__PURE__ */
|
|
4196
|
+
return /* @__PURE__ */ React21.createElement("section", { style: sectionStyle }, /* @__PURE__ */ React21.createElement("h3", { style: headingStyle }, "Judicial Record"), evaluations.length > 0 && /* @__PURE__ */ React21.createElement("div", { style: { marginBottom: "16px" } }, evaluations.slice(0, 3).map((ev, i) => /* @__PURE__ */ React21.createElement("span", { key: i, style: evalChipStyle }, ev.rating, /* @__PURE__ */ React21.createElement("span", { style: { fontWeight: 400, color: "#4a90a4", fontSize: "11px" } }, "\u2014 ", ev.source)))), metrics.length > 0 && /* @__PURE__ */ React21.createElement("div", { style: cardGridStyle }, metrics.slice(0, 4).map((m, i) => /* @__PURE__ */ React21.createElement("div", { key: i, style: metricCardStyle }, /* @__PURE__ */ React21.createElement("div", { style: metricLabelStyle }, METRIC_LABELS[m.metric_type] || m.metric_type.replace(/_/g, " ")), /* @__PURE__ */ React21.createElement("div", { style: metricValueStyle }, formatMetricValue(m.metric_type, m.value)), m.context_label && /* @__PURE__ */ React21.createElement("div", { style: metricContextStyle }, m.context_label)))), disciplinary.length > 0 && /* @__PURE__ */ React21.createElement("div", { style: { marginBottom: "12px" } }, disciplinary.slice(0, 2).map((d, i) => /* @__PURE__ */ React21.createElement("div", { key: i, style: disciplinaryStyle }, /* @__PURE__ */ React21.createElement("strong", null, d.record_type), " \u2014 ", formatDate(d.record_date), d.description && /* @__PURE__ */ React21.createElement("div", { style: { marginTop: "4px" } }, d.description)))), /* @__PURE__ */ React21.createElement("a", { href: `/politician/${politicianId}/judicial-record`, onClick: handleNavigate, style: linkStyle }, "View Full Judicial Record \u2192"));
|
|
4031
4197
|
}
|
|
4032
4198
|
|
|
4033
4199
|
// src/PoliticianProfile.jsx
|
|
@@ -4178,13 +4344,13 @@ function formatAddress(addr) {
|
|
|
4178
4344
|
if (cityStateZip) lines.push(cityStateZip);
|
|
4179
4345
|
return lines;
|
|
4180
4346
|
}
|
|
4181
|
-
var CalendarIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4182
|
-
var ClockIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4183
|
-
var MapPinIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4184
|
-
var PhoneIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4185
|
-
var MailIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4186
|
-
var GlobeIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4187
|
-
var ExternalLinkIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4347
|
+
var CalendarIcon = ({ size = 16 }) => /* @__PURE__ */ React22.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }), /* @__PURE__ */ React22.createElement("line", { x1: "16", y1: "2", x2: "16", y2: "6" }), /* @__PURE__ */ React22.createElement("line", { x1: "8", y1: "2", x2: "8", y2: "6" }), /* @__PURE__ */ React22.createElement("line", { x1: "3", y1: "10", x2: "21", y2: "10" }));
|
|
4348
|
+
var ClockIcon = ({ size = 16 }) => /* @__PURE__ */ React22.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React22.createElement("polyline", { points: "12 6 12 12 16 14" }));
|
|
4349
|
+
var MapPinIcon = ({ size = 16 }) => /* @__PURE__ */ React22.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z" }), /* @__PURE__ */ React22.createElement("circle", { cx: "12", cy: "10", r: "3" }));
|
|
4350
|
+
var PhoneIcon = ({ size = 16 }) => /* @__PURE__ */ React22.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("path", { d: "M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07A19.5 19.5 0 013.07 10.8 19.79 19.79 0 01.07 2.18 2 2 0 012.02 0h3a2 2 0 012 1.72c.127.96.361 1.903.7 2.81a2 2 0 01-.45 2.11L6.09 7.91a16 16 0 006 6l1.27-1.27a2 2 0 012.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0122 16.92z" }));
|
|
4351
|
+
var MailIcon = ({ size = 16 }) => /* @__PURE__ */ React22.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("path", { d: "M4 4H20C21.1 4 22 4.9 22 6V18C22 19.1 21.1 20 20 20H4C2.9 20 2 19.1 2 18V6C2 4.9 2.9 4 4 4Z" }), /* @__PURE__ */ React22.createElement("path", { d: "M22 6L12 13L2 6" }));
|
|
4352
|
+
var GlobeIcon = ({ size = 16 }) => /* @__PURE__ */ React22.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React22.createElement("path", { d: "M2 12H22M12 2C14.5 4.5 16 8 16 12C16 16 14.5 19.5 12 22C9.5 19.5 8 16 8 12C8 8 9.5 4.5 12 2Z" }));
|
|
4353
|
+
var ExternalLinkIcon = ({ size = 16 }) => /* @__PURE__ */ React22.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("path", { d: "M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6" }), /* @__PURE__ */ React22.createElement("polyline", { points: "15 3 21 3 21 9" }), /* @__PURE__ */ React22.createElement("line", { x1: "10", y1: "14", x2: "21", y2: "3" }));
|
|
4188
4354
|
function PoliticianProfile({
|
|
4189
4355
|
politician = {},
|
|
4190
4356
|
onBack,
|
|
@@ -4512,7 +4678,7 @@ function PoliticianProfile({
|
|
|
4512
4678
|
borderRadius: borderRadius.full
|
|
4513
4679
|
}
|
|
4514
4680
|
};
|
|
4515
|
-
return /* @__PURE__ */
|
|
4681
|
+
return /* @__PURE__ */ React22.createElement("div", { style: styles2.container, className: "ev-politician-profile" }, onBack && /* @__PURE__ */ React22.createElement(
|
|
4516
4682
|
"button",
|
|
4517
4683
|
{
|
|
4518
4684
|
type: "button",
|
|
@@ -4525,9 +4691,9 @@ function PoliticianProfile({
|
|
|
4525
4691
|
e.currentTarget.style.textDecoration = "none";
|
|
4526
4692
|
}
|
|
4527
4693
|
},
|
|
4528
|
-
/* @__PURE__ */
|
|
4694
|
+
/* @__PURE__ */ React22.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("path", { d: "M15 19l-7-7 7-7" })),
|
|
4529
4695
|
label
|
|
4530
|
-
), /* @__PURE__ */
|
|
4696
|
+
), /* @__PURE__ */ React22.createElement("div", { style: styles2.card }, /* @__PURE__ */ React22.createElement("div", { style: styles2.heroRow }, /* @__PURE__ */ React22.createElement("div", { style: styles2.photoWrap }, profileImageUrl && !imgError ? /* @__PURE__ */ React22.createElement(
|
|
4531
4697
|
"img",
|
|
4532
4698
|
{
|
|
4533
4699
|
src: profileImageUrl,
|
|
@@ -4535,7 +4701,7 @@ function PoliticianProfile({
|
|
|
4535
4701
|
style: styles2.photo,
|
|
4536
4702
|
onError: () => setImgError(true)
|
|
4537
4703
|
}
|
|
4538
|
-
) : /* @__PURE__ */
|
|
4704
|
+
) : /* @__PURE__ */ React22.createElement("div", { style: styles2.placeholder }, initials || "?")), /* @__PURE__ */ React22.createElement("div", { style: styles2.infoCol }, styles2.tierBadge && /* @__PURE__ */ React22.createElement("div", { style: styles2.tierBadge }, tier), /* @__PURE__ */ React22.createElement("h1", { style: styles2.name }, displayName), banner, /* @__PURE__ */ React22.createElement("p", { style: styles2.roleLine }, roleLine), pol.office_description && /* @__PURE__ */ React22.createElement("p", { style: styles2.officeDesc }, pol.office_description), pol.bio_text && /* @__PURE__ */ React22.createElement("p", { style: styles2.bioText }, pol.bio_text), (termLine || pol.total_years_in_office > 0) && /* @__PURE__ */ React22.createElement("div", { style: styles2.metaRow }, termLine && /* @__PURE__ */ React22.createElement("span", { style: styles2.metaItem }, /* @__PURE__ */ React22.createElement(CalendarIcon, { size: 14 }), termLine), pol.total_years_in_office > 0 && /* @__PURE__ */ React22.createElement("span", { style: styles2.metaItem }, /* @__PURE__ */ React22.createElement(ClockIcon, { size: 14 }), pol.total_years_in_office, " ", pol.total_years_in_office === 1 ? "year" : "years", " in office")), pol.web_form_url && /* @__PURE__ */ React22.createElement(
|
|
4539
4705
|
"a",
|
|
4540
4706
|
{
|
|
4541
4707
|
href: pol.web_form_url,
|
|
@@ -4549,9 +4715,9 @@ function PoliticianProfile({
|
|
|
4549
4715
|
e.currentTarget.style.background = colors.evTeal;
|
|
4550
4716
|
}
|
|
4551
4717
|
},
|
|
4552
|
-
/* @__PURE__ */
|
|
4718
|
+
/* @__PURE__ */ React22.createElement(ExternalLinkIcon, { size: 14 }),
|
|
4553
4719
|
"Submit a Message"
|
|
4554
|
-
))), hasContactInfo && /* @__PURE__ */
|
|
4720
|
+
))), hasContactInfo && /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement("div", { style: divider }), /* @__PURE__ */ React22.createElement("div", { style: sectionHeading }, /* @__PURE__ */ React22.createElement(MailIcon, { size: 20 }), "Contact Information"), /* @__PURE__ */ React22.createElement("div", { style: styles2.contactGrid }, hasAddresses && /* @__PURE__ */ React22.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ React22.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ React22.createElement(MapPinIcon, { size: 12 }), "Addresses"), addresses.map((addr, i) => /* @__PURE__ */ React22.createElement("div", { key: `addr-${i}` }, /* @__PURE__ */ React22.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, addr.type), /* @__PURE__ */ React22.createElement("p", { style: styles2.contactValue }, addr.lines.map((line, j) => /* @__PURE__ */ React22.createElement(React22.Fragment, { key: j }, line, j < addr.lines.length - 1 && /* @__PURE__ */ React22.createElement("br", null))))))), hasPhones && /* @__PURE__ */ React22.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ React22.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ React22.createElement(PhoneIcon, { size: 12 }), "Phone"), Object.entries(phonesByType).map(([type, phones], i) => /* @__PURE__ */ React22.createElement("div", { key: `phone-${type}` }, /* @__PURE__ */ React22.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, type), phones.map((phone, j) => /* @__PURE__ */ React22.createElement("p", { key: j, style: styles2.contactValue }, /* @__PURE__ */ React22.createElement(
|
|
4555
4721
|
"a",
|
|
4556
4722
|
{
|
|
4557
4723
|
href: `tel:${phone}`,
|
|
@@ -4564,7 +4730,7 @@ function PoliticianProfile({
|
|
|
4564
4730
|
}
|
|
4565
4731
|
},
|
|
4566
4732
|
phone
|
|
4567
|
-
)))))), hasEmails && /* @__PURE__ */
|
|
4733
|
+
)))))), hasEmails && /* @__PURE__ */ React22.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ React22.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ React22.createElement(MailIcon, { size: 12 }), "Email"), Object.entries(emailsByType).filter(([, emails]) => emails.some((e) => e && e.trim())).map(([type, emails], i) => /* @__PURE__ */ React22.createElement("div", { key: `email-${type}` }, /* @__PURE__ */ React22.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, type), emails.filter((e) => e && e.trim()).map((email, j) => /* @__PURE__ */ React22.createElement("p", { key: j, style: styles2.contactValue }, /* @__PURE__ */ React22.createElement(
|
|
4568
4734
|
"a",
|
|
4569
4735
|
{
|
|
4570
4736
|
href: `mailto:${email}`,
|
|
@@ -4577,7 +4743,7 @@ function PoliticianProfile({
|
|
|
4577
4743
|
}
|
|
4578
4744
|
},
|
|
4579
4745
|
email
|
|
4580
|
-
)))))), hasWebsitesCol && /* @__PURE__ */
|
|
4746
|
+
)))))), hasWebsitesCol && /* @__PURE__ */ React22.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ React22.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ React22.createElement(GlobeIcon, { size: 12 }), "Websites"), allWebsites.map((url, i) => /* @__PURE__ */ React22.createElement("p", { key: i, style: styles2.contactValue }, /* @__PURE__ */ React22.createElement(
|
|
4581
4747
|
"a",
|
|
4582
4748
|
{
|
|
4583
4749
|
href: url,
|
|
@@ -4592,7 +4758,7 @@ function PoliticianProfile({
|
|
|
4592
4758
|
}
|
|
4593
4759
|
},
|
|
4594
4760
|
extractDomain(url)
|
|
4595
|
-
))), (hasSocial || socialWebsiteUrls.length > 0) && /* @__PURE__ */
|
|
4761
|
+
))), (hasSocial || socialWebsiteUrls.length > 0) && /* @__PURE__ */ React22.createElement(
|
|
4596
4762
|
SocialLinks,
|
|
4597
4763
|
{
|
|
4598
4764
|
twitter,
|
|
@@ -4603,14 +4769,14 @@ function PoliticianProfile({
|
|
|
4603
4769
|
size: "sm",
|
|
4604
4770
|
style: { marginTop: allWebsites.length > 0 ? "8px" : 0 }
|
|
4605
4771
|
}
|
|
4606
|
-
)))), committees.length > 0 && /* @__PURE__ */
|
|
4772
|
+
)))), committees.length > 0 && /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement("div", { style: divider }), /* @__PURE__ */ React22.createElement(CommitteeTable, { committees })), pol.is_judicial ? /* @__PURE__ */ React22.createElement(
|
|
4607
4773
|
JudicialScorecard,
|
|
4608
4774
|
{
|
|
4609
4775
|
judicialRecord,
|
|
4610
4776
|
politicianId,
|
|
4611
4777
|
onNavigateToRecord
|
|
4612
4778
|
}
|
|
4613
|
-
) : /* @__PURE__ */
|
|
4779
|
+
) : /* @__PURE__ */ React22.createElement(
|
|
4614
4780
|
LegislativeInlineSummary,
|
|
4615
4781
|
{
|
|
4616
4782
|
summary: legislativeSummary,
|
|
@@ -4621,7 +4787,7 @@ function PoliticianProfile({
|
|
|
4621
4787
|
}
|
|
4622
4788
|
|
|
4623
4789
|
// src/LegislativeRecord.jsx
|
|
4624
|
-
import
|
|
4790
|
+
import React23, { useState as useState12 } from "react";
|
|
4625
4791
|
var DEFAULT_LIMIT = 25;
|
|
4626
4792
|
function normalizeText(str) {
|
|
4627
4793
|
if (!str) return "";
|
|
@@ -4701,7 +4867,7 @@ function getPositionBadge(position) {
|
|
|
4701
4867
|
return { bg: colors.borderLight, text: colors.textSecondary };
|
|
4702
4868
|
}
|
|
4703
4869
|
function Badge({ label, bg, text }) {
|
|
4704
|
-
return /* @__PURE__ */
|
|
4870
|
+
return /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4705
4871
|
display: "inline-block",
|
|
4706
4872
|
background: bg,
|
|
4707
4873
|
color: text,
|
|
@@ -4714,18 +4880,18 @@ function Badge({ label, bg, text }) {
|
|
|
4714
4880
|
} }, label);
|
|
4715
4881
|
}
|
|
4716
4882
|
function SectionHeader({ title, yearFilter, years, onYearChange }) {
|
|
4717
|
-
return /* @__PURE__ */
|
|
4883
|
+
return /* @__PURE__ */ React23.createElement("div", { style: {
|
|
4718
4884
|
display: "flex",
|
|
4719
4885
|
alignItems: "center",
|
|
4720
4886
|
justifyContent: "space-between",
|
|
4721
4887
|
marginBottom: spacing[4]
|
|
4722
|
-
} }, /* @__PURE__ */
|
|
4888
|
+
} }, /* @__PURE__ */ React23.createElement("h2", { style: {
|
|
4723
4889
|
fontFamily: fonts.primary,
|
|
4724
4890
|
fontSize: fontSizes.xl,
|
|
4725
4891
|
fontWeight: fontWeights.bold,
|
|
4726
4892
|
color: colors.evTeal,
|
|
4727
4893
|
margin: 0
|
|
4728
|
-
} }, title), years && years.length > 0 && /* @__PURE__ */
|
|
4894
|
+
} }, title), years && years.length > 0 && /* @__PURE__ */ React23.createElement(
|
|
4729
4895
|
"select",
|
|
4730
4896
|
{
|
|
4731
4897
|
value: yearFilter,
|
|
@@ -4741,13 +4907,13 @@ function SectionHeader({ title, yearFilter, years, onYearChange }) {
|
|
|
4741
4907
|
cursor: "pointer"
|
|
4742
4908
|
}
|
|
4743
4909
|
},
|
|
4744
|
-
/* @__PURE__ */
|
|
4745
|
-
years.map((y) => /* @__PURE__ */
|
|
4910
|
+
/* @__PURE__ */ React23.createElement("option", { value: "All" }, "All years"),
|
|
4911
|
+
years.map((y) => /* @__PURE__ */ React23.createElement("option", { key: y, value: y }, y))
|
|
4746
4912
|
));
|
|
4747
4913
|
}
|
|
4748
4914
|
function ShowAllLink({ totalCount, visibleCount, onClick }) {
|
|
4749
4915
|
if (totalCount <= visibleCount) return null;
|
|
4750
|
-
return /* @__PURE__ */
|
|
4916
|
+
return /* @__PURE__ */ React23.createElement("div", { style: { textAlign: "center", marginTop: spacing[3] } }, /* @__PURE__ */ React23.createElement(
|
|
4751
4917
|
"button",
|
|
4752
4918
|
{
|
|
4753
4919
|
type: "button",
|
|
@@ -4775,7 +4941,7 @@ function ShowAllLink({ totalCount, visibleCount, onClick }) {
|
|
|
4775
4941
|
));
|
|
4776
4942
|
}
|
|
4777
4943
|
function EmptyState({ message }) {
|
|
4778
|
-
return /* @__PURE__ */
|
|
4944
|
+
return /* @__PURE__ */ React23.createElement("p", { style: {
|
|
4779
4945
|
fontFamily: fonts.primary,
|
|
4780
4946
|
fontSize: fontSizes.sm,
|
|
4781
4947
|
color: colors.textMuted,
|
|
@@ -4785,24 +4951,24 @@ function EmptyState({ message }) {
|
|
|
4785
4951
|
} }, message);
|
|
4786
4952
|
}
|
|
4787
4953
|
function Spinner() {
|
|
4788
|
-
return /* @__PURE__ */
|
|
4954
|
+
return /* @__PURE__ */ React23.createElement("div", { style: {
|
|
4789
4955
|
display: "flex",
|
|
4790
4956
|
justifyContent: "center",
|
|
4791
4957
|
alignItems: "center",
|
|
4792
4958
|
padding: spacing[10]
|
|
4793
|
-
} }, /* @__PURE__ */
|
|
4959
|
+
} }, /* @__PURE__ */ React23.createElement("div", { style: {
|
|
4794
4960
|
width: "40px",
|
|
4795
4961
|
height: "40px",
|
|
4796
4962
|
borderRadius: borderRadius.full,
|
|
4797
4963
|
border: `3px solid ${colors.borderLight}`,
|
|
4798
4964
|
borderTopColor: colors.evTeal,
|
|
4799
4965
|
animation: "ev-spin 0.8s linear infinite"
|
|
4800
|
-
} }), /* @__PURE__ */
|
|
4966
|
+
} }), /* @__PURE__ */ React23.createElement("style", null, `@keyframes ev-spin { to { transform: rotate(360deg); } }`));
|
|
4801
4967
|
}
|
|
4802
4968
|
function CommitteesSection({ committees, leadership }) {
|
|
4803
4969
|
const [showAll, setShowAll] = useState12(false);
|
|
4804
4970
|
const visible = showAll ? committees : committees.slice(0, DEFAULT_LIMIT);
|
|
4805
|
-
return /* @__PURE__ */
|
|
4971
|
+
return /* @__PURE__ */ React23.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ React23.createElement(SectionHeader, { title: "Committees & Leadership" }), leadership && leadership.length > 0 && /* @__PURE__ */ React23.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: spacing[2], marginBottom: spacing[4] } }, leadership.map((role, i) => /* @__PURE__ */ React23.createElement("div", { key: i, style: {
|
|
4806
4972
|
display: "inline-flex",
|
|
4807
4973
|
alignItems: "center",
|
|
4808
4974
|
gap: spacing[1],
|
|
@@ -4813,23 +4979,23 @@ function CommitteesSection({ committees, leadership }) {
|
|
|
4813
4979
|
fontFamily: fonts.primary,
|
|
4814
4980
|
fontSize: fontSizes.sm,
|
|
4815
4981
|
fontWeight: fontWeights.semibold
|
|
4816
|
-
} }, role.title, role.chamber && /* @__PURE__ */
|
|
4982
|
+
} }, role.title, role.chamber && /* @__PURE__ */ React23.createElement("span", { style: { fontWeight: fontWeights.regular, opacity: 0.85 } }, "(", role.chamber, ")")))), committees.length === 0 ? /* @__PURE__ */ React23.createElement(EmptyState, { message: "Committee information is not available for this office." }) : /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("div", null, visible.map((c, i) => {
|
|
4817
4983
|
const badge = getRoleBadge(c.role);
|
|
4818
|
-
return /* @__PURE__ */
|
|
4984
|
+
return /* @__PURE__ */ React23.createElement("div", { key: i, style: {
|
|
4819
4985
|
display: "flex",
|
|
4820
4986
|
alignItems: "center",
|
|
4821
4987
|
justifyContent: "space-between",
|
|
4822
4988
|
padding: `${spacing[3]} 0`,
|
|
4823
4989
|
borderBottom: `1px solid ${colors.borderLight}`,
|
|
4824
4990
|
gap: spacing[3]
|
|
4825
|
-
} }, /* @__PURE__ */
|
|
4991
|
+
} }, /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4826
4992
|
fontFamily: fonts.primary,
|
|
4827
4993
|
fontSize: fontSizes.sm,
|
|
4828
4994
|
color: colors.textSecondary,
|
|
4829
4995
|
flex: 1,
|
|
4830
4996
|
minWidth: 0
|
|
4831
|
-
} }, c.committee_name, c.parent_name && /* @__PURE__ */
|
|
4832
|
-
})), !showAll && /* @__PURE__ */
|
|
4997
|
+
} }, c.committee_name, c.parent_name && /* @__PURE__ */ React23.createElement("span", { style: { color: colors.textMuted, marginLeft: spacing[1] } }, "(", c.parent_name, ")")), /* @__PURE__ */ React23.createElement(Badge, { label: badge.label, bg: badge.bg, text: badge.text }));
|
|
4998
|
+
})), !showAll && /* @__PURE__ */ React23.createElement(
|
|
4833
4999
|
ShowAllLink,
|
|
4834
5000
|
{
|
|
4835
5001
|
totalCount: committees.length,
|
|
@@ -4848,7 +5014,7 @@ function LegislationSection({ bills, isMobile }) {
|
|
|
4848
5014
|
};
|
|
4849
5015
|
const filtered = yearFilter === "All" ? bills : bills.filter((b) => extractYear(b.introduced_at) === yearFilter);
|
|
4850
5016
|
const visible = showAll ? filtered : filtered.slice(0, DEFAULT_LIMIT);
|
|
4851
|
-
return /* @__PURE__ */
|
|
5017
|
+
return /* @__PURE__ */ React23.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ React23.createElement(
|
|
4852
5018
|
SectionHeader,
|
|
4853
5019
|
{
|
|
4854
5020
|
title: "Sponsored Legislation",
|
|
@@ -4856,42 +5022,42 @@ function LegislationSection({ bills, isMobile }) {
|
|
|
4856
5022
|
years,
|
|
4857
5023
|
onYearChange: handleYearChange
|
|
4858
5024
|
}
|
|
4859
|
-
), bills.length === 0 ? /* @__PURE__ */
|
|
5025
|
+
), bills.length === 0 ? /* @__PURE__ */ React23.createElement(EmptyState, { message: "Sponsored legislation data is not available for this office." }) : /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("div", null, visible.map((bill, i) => {
|
|
4860
5026
|
const statusBadge = getStatusBadge(bill.status_label);
|
|
4861
|
-
return /* @__PURE__ */
|
|
5027
|
+
return /* @__PURE__ */ React23.createElement("div", { key: i, style: {
|
|
4862
5028
|
display: "flex",
|
|
4863
5029
|
flexDirection: isMobile ? "column" : "row",
|
|
4864
5030
|
alignItems: isMobile ? "flex-start" : "center",
|
|
4865
5031
|
gap: isMobile ? spacing[1] : spacing[3],
|
|
4866
5032
|
padding: `${spacing[3]} 0`,
|
|
4867
5033
|
borderBottom: `1px solid ${colors.borderLight}`
|
|
4868
|
-
} }, /* @__PURE__ */
|
|
5034
|
+
} }, /* @__PURE__ */ React23.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4869
5035
|
fontFamily: fonts.primary,
|
|
4870
5036
|
fontSize: fontSizes.xs,
|
|
4871
5037
|
fontWeight: fontWeights.bold,
|
|
4872
5038
|
color: colors.textSecondary,
|
|
4873
5039
|
marginRight: spacing[2]
|
|
4874
|
-
} }, bill.number), /* @__PURE__ */
|
|
5040
|
+
} }, bill.number), /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4875
5041
|
fontFamily: fonts.primary,
|
|
4876
5042
|
fontSize: fontSizes.sm,
|
|
4877
5043
|
color: colors.textSecondary
|
|
4878
|
-
} }, bill.title)), /* @__PURE__ */
|
|
5044
|
+
} }, bill.title)), /* @__PURE__ */ React23.createElement("div", { style: {
|
|
4879
5045
|
display: "flex",
|
|
4880
5046
|
alignItems: "center",
|
|
4881
5047
|
gap: spacing[2],
|
|
4882
5048
|
flexShrink: 0,
|
|
4883
5049
|
flexWrap: "wrap"
|
|
4884
|
-
} }, /* @__PURE__ */
|
|
5050
|
+
} }, /* @__PURE__ */ React23.createElement(Badge, { label: bill.status_label || "Unknown", bg: statusBadge.bg, text: statusBadge.text }), bill.introduced_at && /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4885
5051
|
fontFamily: fonts.primary,
|
|
4886
5052
|
fontSize: fontSizes.xs,
|
|
4887
5053
|
color: colors.textMuted
|
|
4888
|
-
} }, formatDate2(bill.introduced_at)), /* @__PURE__ */
|
|
5054
|
+
} }, formatDate2(bill.introduced_at)), /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4889
5055
|
fontFamily: fonts.primary,
|
|
4890
5056
|
fontSize: fontSizes.xs,
|
|
4891
5057
|
color: colors.textMuted,
|
|
4892
5058
|
fontStyle: "italic"
|
|
4893
5059
|
} }, bill.is_sponsor ? "Sponsored" : "Cosponsored")));
|
|
4894
|
-
})), !showAll && /* @__PURE__ */
|
|
5060
|
+
})), !showAll && /* @__PURE__ */ React23.createElement(
|
|
4895
5061
|
ShowAllLink,
|
|
4896
5062
|
{
|
|
4897
5063
|
totalCount: filtered.length,
|
|
@@ -4910,7 +5076,7 @@ function VotingSection({ votes, isMobile }) {
|
|
|
4910
5076
|
};
|
|
4911
5077
|
const filtered = yearFilter === "All" ? votes : votes.filter((v) => extractYear(v.vote_date) === yearFilter);
|
|
4912
5078
|
const visible = showAll ? filtered : filtered.slice(0, DEFAULT_LIMIT);
|
|
4913
|
-
return /* @__PURE__ */
|
|
5079
|
+
return /* @__PURE__ */ React23.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ React23.createElement(
|
|
4914
5080
|
SectionHeader,
|
|
4915
5081
|
{
|
|
4916
5082
|
title: "Voting Record",
|
|
@@ -4918,38 +5084,38 @@ function VotingSection({ votes, isMobile }) {
|
|
|
4918
5084
|
years,
|
|
4919
5085
|
onYearChange: handleYearChange
|
|
4920
5086
|
}
|
|
4921
|
-
), votes.length === 0 ? /* @__PURE__ */
|
|
5087
|
+
), votes.length === 0 ? /* @__PURE__ */ React23.createElement(EmptyState, { message: "Voting records are not available for this office." }) : /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("div", null, visible.map((vote, i) => {
|
|
4922
5088
|
const positionBadge = getPositionBadge(vote.position);
|
|
4923
5089
|
const normPosition = normalizeText(vote.position);
|
|
4924
5090
|
const topic = vote.bill_title || vote.vote_question;
|
|
4925
5091
|
const sourceUrl = vote.bill_url;
|
|
4926
|
-
return /* @__PURE__ */
|
|
5092
|
+
return /* @__PURE__ */ React23.createElement("div", { key: i, style: {
|
|
4927
5093
|
display: "flex",
|
|
4928
5094
|
flexDirection: isMobile ? "column" : "row",
|
|
4929
5095
|
alignItems: isMobile ? "flex-start" : "center",
|
|
4930
5096
|
gap: isMobile ? spacing[1] : spacing[3],
|
|
4931
5097
|
padding: `${spacing[3]} 0`,
|
|
4932
5098
|
borderBottom: `1px solid ${colors.borderLight}`
|
|
4933
|
-
} }, /* @__PURE__ */
|
|
5099
|
+
} }, /* @__PURE__ */ React23.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4934
5100
|
fontFamily: fonts.primary,
|
|
4935
5101
|
fontSize: fontSizes.sm,
|
|
4936
5102
|
color: colors.textSecondary
|
|
4937
|
-
} }, topic)), /* @__PURE__ */
|
|
5103
|
+
} }, topic)), /* @__PURE__ */ React23.createElement("div", { style: {
|
|
4938
5104
|
display: "flex",
|
|
4939
5105
|
alignItems: "center",
|
|
4940
5106
|
gap: spacing[2],
|
|
4941
5107
|
flexShrink: 0,
|
|
4942
5108
|
flexWrap: "wrap"
|
|
4943
|
-
} }, vote.vote_date && /* @__PURE__ */
|
|
5109
|
+
} }, vote.vote_date && /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4944
5110
|
fontFamily: fonts.primary,
|
|
4945
5111
|
fontSize: fontSizes.xs,
|
|
4946
5112
|
color: colors.textMuted
|
|
4947
|
-
} }, formatDate2(vote.vote_date)), /* @__PURE__ */
|
|
5113
|
+
} }, formatDate2(vote.vote_date)), /* @__PURE__ */ React23.createElement(Badge, { label: normPosition || "Unknown", bg: positionBadge.bg, text: positionBadge.text }), vote.result && /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4948
5114
|
fontFamily: fonts.primary,
|
|
4949
5115
|
fontSize: fontSizes.xs,
|
|
4950
5116
|
color: vote.result === "Passed" ? colors.success : colors.textMuted,
|
|
4951
5117
|
fontWeight: fontWeights.medium
|
|
4952
|
-
} }, vote.result), sourceUrl && /* @__PURE__ */
|
|
5118
|
+
} }, vote.result), sourceUrl && /* @__PURE__ */ React23.createElement(
|
|
4953
5119
|
"a",
|
|
4954
5120
|
{
|
|
4955
5121
|
href: sourceUrl,
|
|
@@ -4970,7 +5136,7 @@ function VotingSection({ votes, isMobile }) {
|
|
|
4970
5136
|
},
|
|
4971
5137
|
"Source"
|
|
4972
5138
|
)));
|
|
4973
|
-
})), !showAll && /* @__PURE__ */
|
|
5139
|
+
})), !showAll && /* @__PURE__ */ React23.createElement(
|
|
4974
5140
|
ShowAllLink,
|
|
4975
5141
|
{
|
|
4976
5142
|
totalCount: filtered.length,
|
|
@@ -4989,20 +5155,20 @@ function LegislativeRecord({
|
|
|
4989
5155
|
}) {
|
|
4990
5156
|
const isMobile = useMediaQuery("(max-width: 768px)");
|
|
4991
5157
|
if (loading) {
|
|
4992
|
-
return /* @__PURE__ */
|
|
5158
|
+
return /* @__PURE__ */ React23.createElement(Spinner, null);
|
|
4993
5159
|
}
|
|
4994
|
-
return /* @__PURE__ */
|
|
5160
|
+
return /* @__PURE__ */ React23.createElement("div", { style: { fontFamily: fonts.primary } }, politicianName && /* @__PURE__ */ React23.createElement("h1", { style: {
|
|
4995
5161
|
fontFamily: fonts.primary,
|
|
4996
5162
|
fontSize: isMobile ? fontSizes["2xl"] : fontSizes["4xl"],
|
|
4997
5163
|
fontWeight: fontWeights.bold,
|
|
4998
5164
|
color: colors.evTeal,
|
|
4999
5165
|
marginBottom: spacing[8],
|
|
5000
5166
|
marginTop: 0
|
|
5001
|
-
} }, "Legislative Record: ", politicianName), /* @__PURE__ */
|
|
5167
|
+
} }, "Legislative Record: ", politicianName), /* @__PURE__ */ React23.createElement(CommitteesSection, { committees, leadership }), /* @__PURE__ */ React23.createElement(LegislationSection, { bills, isMobile }), /* @__PURE__ */ React23.createElement(VotingSection, { votes, isMobile }));
|
|
5002
5168
|
}
|
|
5003
5169
|
|
|
5004
5170
|
// src/JudicialRecordDetail.jsx
|
|
5005
|
-
import
|
|
5171
|
+
import React24 from "react";
|
|
5006
5172
|
var containerStyle = {
|
|
5007
5173
|
fontFamily: "'Manrope', sans-serif",
|
|
5008
5174
|
maxWidth: "800px"
|
|
@@ -5087,7 +5253,7 @@ var emptyStateStyle = {
|
|
|
5087
5253
|
function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
|
|
5088
5254
|
var _a;
|
|
5089
5255
|
if (!judicialRecord) {
|
|
5090
|
-
return /* @__PURE__ */
|
|
5256
|
+
return /* @__PURE__ */ React24.createElement("div", { style: containerStyle }, /* @__PURE__ */ React24.createElement("button", { style: backBtnStyle, onClick: onBack }, "\u2190 Back to Profile"), /* @__PURE__ */ React24.createElement("div", { style: emptyStateStyle }, "No judicial record data available."));
|
|
5091
5257
|
}
|
|
5092
5258
|
const {
|
|
5093
5259
|
judge_detail: detail,
|
|
@@ -5096,13 +5262,13 @@ function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
|
|
|
5096
5262
|
disciplinary_records: disciplinary = []
|
|
5097
5263
|
} = judicialRecord;
|
|
5098
5264
|
const displayName = politician.full_name || `${politician.first_name || ""} ${politician.last_name || ""}`.trim();
|
|
5099
|
-
return /* @__PURE__ */
|
|
5265
|
+
return /* @__PURE__ */ React24.createElement("div", { style: containerStyle }, /* @__PURE__ */ React24.createElement("button", { style: backBtnStyle, onClick: onBack }, "\u2190 Back to Profile"), /* @__PURE__ */ React24.createElement("h1", { style: nameStyle }, displayName), /* @__PURE__ */ React24.createElement("p", { style: roleStyle }, (detail == null ? void 0 : detail.court_role) || politician.office_title, (detail == null ? void 0 : detail.date_seated) && ` \xB7 Seated ${formatDate(detail.date_seated)}`), detail && /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("h2", { style: sectionHeadingStyle }, "Background"), detail.appointed_by && /* @__PURE__ */ React24.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ React24.createElement("span", { style: detailLabelStyle }, "Appointed by"), /* @__PURE__ */ React24.createElement("span", { style: detailValueStyle }, detail.appointed_by, " (", detail.appointing_president_party, ")")), detail.confirmation_vote && /* @__PURE__ */ React24.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ React24.createElement("span", { style: detailLabelStyle }, "Confirmation Vote"), /* @__PURE__ */ React24.createElement("span", { style: detailValueStyle }, detail.confirmation_vote)), detail.election_type && /* @__PURE__ */ React24.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ React24.createElement("span", { style: detailLabelStyle }, "Election Type"), /* @__PURE__ */ React24.createElement("span", { style: detailValueStyle }, detail.election_type === "retention" ? "Retention (Yes/No)" : "Contested Election")), ((_a = detail.areas_of_focus) == null ? void 0 : _a.length) > 0 && /* @__PURE__ */ React24.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ React24.createElement("span", { style: detailLabelStyle }, "Areas of Focus"), /* @__PURE__ */ React24.createElement("span", { style: detailValueStyle }, detail.areas_of_focus.join(", ")))), /* @__PURE__ */ React24.createElement("h2", { style: sectionHeadingStyle }, "Performance Evaluations"), evaluations.length === 0 ? /* @__PURE__ */ React24.createElement("div", { style: emptyStateStyle }, "No evaluation data available yet.") : /* @__PURE__ */ React24.createElement("table", { style: tableStyle }, /* @__PURE__ */ React24.createElement("thead", null, /* @__PURE__ */ React24.createElement("tr", null, /* @__PURE__ */ React24.createElement("th", { style: thStyle }, "Source"), /* @__PURE__ */ React24.createElement("th", { style: thStyle }, "Rating"), /* @__PURE__ */ React24.createElement("th", { style: thStyle }, "Date"))), /* @__PURE__ */ React24.createElement("tbody", null, evaluations.map((ev, i) => /* @__PURE__ */ React24.createElement("tr", { key: i }, /* @__PURE__ */ React24.createElement("td", { style: tdStyle }, ev.source_url ? /* @__PURE__ */ React24.createElement("a", { href: ev.source_url, target: "_blank", rel: "noopener noreferrer", style: { color: "#319795" } }, ev.source) : ev.source), /* @__PURE__ */ React24.createElement("td", { style: { ...tdStyle, fontWeight: 600 } }, ev.rating), /* @__PURE__ */ React24.createElement("td", { style: tdStyle }, formatDate(ev.rating_date)))))), /* @__PURE__ */ React24.createElement("h2", { style: sectionHeadingStyle }, "Performance Metrics"), metrics.length === 0 ? /* @__PURE__ */ React24.createElement("div", { style: emptyStateStyle }, "No performance metric data available yet.") : /* @__PURE__ */ React24.createElement("table", { style: tableStyle }, /* @__PURE__ */ React24.createElement("thead", null, /* @__PURE__ */ React24.createElement("tr", null, /* @__PURE__ */ React24.createElement("th", { style: thStyle }, "Metric"), /* @__PURE__ */ React24.createElement("th", { style: thStyle }, "Value"), /* @__PURE__ */ React24.createElement("th", { style: thStyle }, "Context"), /* @__PURE__ */ React24.createElement("th", { style: thStyle }, "Period"))), /* @__PURE__ */ React24.createElement("tbody", null, metrics.map((m, i) => /* @__PURE__ */ React24.createElement("tr", { key: i }, /* @__PURE__ */ React24.createElement("td", { style: { ...tdStyle, fontWeight: 600 } }, METRIC_LABELS[m.metric_type] || m.metric_type.replace(/_/g, " ")), /* @__PURE__ */ React24.createElement("td", { style: tdStyle }, formatMetricValue(m.metric_type, m.value)), /* @__PURE__ */ React24.createElement("td", { style: { ...tdStyle, color: "#718096", fontSize: "13px" } }, m.context_label), /* @__PURE__ */ React24.createElement("td", { style: tdStyle }, m.time_period))))), disciplinary.length > 0 && /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("h2", { style: sectionHeadingStyle }, "Disciplinary History"), disciplinary.map((d, i) => /* @__PURE__ */ React24.createElement("div", { key: i, style: {
|
|
5100
5266
|
borderLeft: "3px solid #fc8181",
|
|
5101
5267
|
backgroundColor: "#fff5f5",
|
|
5102
5268
|
borderRadius: "0 6px 6px 0",
|
|
5103
5269
|
padding: "12px 16px",
|
|
5104
5270
|
marginBottom: "10px"
|
|
5105
|
-
} }, /* @__PURE__ */
|
|
5271
|
+
} }, /* @__PURE__ */ React24.createElement("div", { style: { fontWeight: 700, color: "#742a2a", fontSize: "14px" } }, d.record_type, " \u2014 ", formatDate(d.record_date)), d.description && /* @__PURE__ */ React24.createElement("div", { style: { color: "#9b2c2c", fontSize: "13px", marginTop: "4px" } }, d.description), d.source_url && /* @__PURE__ */ React24.createElement(
|
|
5106
5272
|
"a",
|
|
5107
5273
|
{
|
|
5108
5274
|
href: d.source_url,
|
|
@@ -5115,7 +5281,7 @@ function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
|
|
|
5115
5281
|
}
|
|
5116
5282
|
|
|
5117
5283
|
// src/AuthForm.jsx
|
|
5118
|
-
import
|
|
5284
|
+
import React25, { useState as useState13 } from "react";
|
|
5119
5285
|
function AuthForm({
|
|
5120
5286
|
logoSrc = "/EVLogo.svg",
|
|
5121
5287
|
appName = "Empowered Vote",
|
|
@@ -5142,7 +5308,7 @@ function AuthForm({
|
|
|
5142
5308
|
setPasswordMismatch(false);
|
|
5143
5309
|
onSubmit == null ? void 0 : onSubmit(username.trim(), password);
|
|
5144
5310
|
};
|
|
5145
|
-
const EyeOpen = () => /* @__PURE__ */
|
|
5311
|
+
const EyeOpen = () => /* @__PURE__ */ React25.createElement(
|
|
5146
5312
|
"svg",
|
|
5147
5313
|
{
|
|
5148
5314
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5152,7 +5318,7 @@ function AuthForm({
|
|
|
5152
5318
|
stroke: "currentColor",
|
|
5153
5319
|
style: { width: "20px", height: "20px" }
|
|
5154
5320
|
},
|
|
5155
|
-
/* @__PURE__ */
|
|
5321
|
+
/* @__PURE__ */ React25.createElement(
|
|
5156
5322
|
"path",
|
|
5157
5323
|
{
|
|
5158
5324
|
strokeLinecap: "round",
|
|
@@ -5160,7 +5326,7 @@ function AuthForm({
|
|
|
5160
5326
|
d: "M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"
|
|
5161
5327
|
}
|
|
5162
5328
|
),
|
|
5163
|
-
/* @__PURE__ */
|
|
5329
|
+
/* @__PURE__ */ React25.createElement(
|
|
5164
5330
|
"path",
|
|
5165
5331
|
{
|
|
5166
5332
|
strokeLinecap: "round",
|
|
@@ -5169,7 +5335,7 @@ function AuthForm({
|
|
|
5169
5335
|
}
|
|
5170
5336
|
)
|
|
5171
5337
|
);
|
|
5172
|
-
const EyeClosed = () => /* @__PURE__ */
|
|
5338
|
+
const EyeClosed = () => /* @__PURE__ */ React25.createElement(
|
|
5173
5339
|
"svg",
|
|
5174
5340
|
{
|
|
5175
5341
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5179,7 +5345,7 @@ function AuthForm({
|
|
|
5179
5345
|
stroke: "currentColor",
|
|
5180
5346
|
style: { width: "20px", height: "20px" }
|
|
5181
5347
|
},
|
|
5182
|
-
/* @__PURE__ */
|
|
5348
|
+
/* @__PURE__ */ React25.createElement(
|
|
5183
5349
|
"path",
|
|
5184
5350
|
{
|
|
5185
5351
|
strokeLinecap: "round",
|
|
@@ -5188,17 +5354,17 @@ function AuthForm({
|
|
|
5188
5354
|
}
|
|
5189
5355
|
)
|
|
5190
5356
|
);
|
|
5191
|
-
const PasswordToggle = () => /* @__PURE__ */
|
|
5357
|
+
const PasswordToggle = () => /* @__PURE__ */ React25.createElement(
|
|
5192
5358
|
"button",
|
|
5193
5359
|
{
|
|
5194
5360
|
type: "button",
|
|
5195
5361
|
onClick: () => setShowPasswords((prev) => !prev),
|
|
5196
5362
|
style: styles.passwordToggle
|
|
5197
5363
|
},
|
|
5198
|
-
showPasswords ? /* @__PURE__ */
|
|
5364
|
+
showPasswords ? /* @__PURE__ */ React25.createElement(EyeOpen, null) : /* @__PURE__ */ React25.createElement(EyeClosed, null)
|
|
5199
5365
|
);
|
|
5200
5366
|
const displayError = passwordMismatch ? "Passwords do not match." : error;
|
|
5201
|
-
return /* @__PURE__ */
|
|
5367
|
+
return /* @__PURE__ */ React25.createElement("div", { style: styles.wrapper }, /* @__PURE__ */ React25.createElement("div", { style: styles.container }, /* @__PURE__ */ React25.createElement("div", { style: styles.header }, logoSrc && /* @__PURE__ */ React25.createElement("img", { src: logoSrc, alt: appName, style: styles.logo }), appName && /* @__PURE__ */ React25.createElement("h1", { style: styles.appName }, appName), appSubtitle && /* @__PURE__ */ React25.createElement("p", { style: styles.appSubtitle }, appSubtitle)), /* @__PURE__ */ React25.createElement("form", { onSubmit: handleSubmit, style: styles.card }, /* @__PURE__ */ React25.createElement("h2", { style: styles.cardTitle }, isLogin ? "Welcome Back" : "Create Account"), /* @__PURE__ */ React25.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ React25.createElement("label", { style: styles.label }, "Username"), /* @__PURE__ */ React25.createElement(
|
|
5202
5368
|
"input",
|
|
5203
5369
|
{
|
|
5204
5370
|
type: "text",
|
|
@@ -5215,7 +5381,7 @@ function AuthForm({
|
|
|
5215
5381
|
},
|
|
5216
5382
|
required: true
|
|
5217
5383
|
}
|
|
5218
|
-
)), /* @__PURE__ */
|
|
5384
|
+
)), /* @__PURE__ */ React25.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ React25.createElement("label", { style: styles.label }, "Password"), /* @__PURE__ */ React25.createElement("div", { style: styles.passwordWrapper }, /* @__PURE__ */ React25.createElement(
|
|
5219
5385
|
"input",
|
|
5220
5386
|
{
|
|
5221
5387
|
type: showPasswords ? "text" : "password",
|
|
@@ -5231,7 +5397,7 @@ function AuthForm({
|
|
|
5231
5397
|
},
|
|
5232
5398
|
required: true
|
|
5233
5399
|
}
|
|
5234
|
-
), /* @__PURE__ */
|
|
5400
|
+
), /* @__PURE__ */ React25.createElement(PasswordToggle, null))), !isLogin && /* @__PURE__ */ React25.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ React25.createElement("label", { style: styles.label }, "Confirm Password"), /* @__PURE__ */ React25.createElement("div", { style: styles.passwordWrapper }, /* @__PURE__ */ React25.createElement(
|
|
5235
5401
|
"input",
|
|
5236
5402
|
{
|
|
5237
5403
|
type: showPasswords ? "text" : "password",
|
|
@@ -5247,7 +5413,7 @@ function AuthForm({
|
|
|
5247
5413
|
},
|
|
5248
5414
|
required: true
|
|
5249
5415
|
}
|
|
5250
|
-
), /* @__PURE__ */
|
|
5416
|
+
), /* @__PURE__ */ React25.createElement(PasswordToggle, null))), displayError && /* @__PURE__ */ React25.createElement("div", { style: styles.errorBox }, /* @__PURE__ */ React25.createElement("p", { style: styles.errorText }, displayError)), /* @__PURE__ */ React25.createElement(
|
|
5251
5417
|
"button",
|
|
5252
5418
|
{
|
|
5253
5419
|
type: "submit",
|
|
@@ -5265,7 +5431,7 @@ function AuthForm({
|
|
|
5265
5431
|
}
|
|
5266
5432
|
},
|
|
5267
5433
|
submitting ? isLogin ? "Signing In..." : "Creating Account..." : isLogin ? "Sign In" : "Create Account"
|
|
5268
|
-
), onModeSwitch && /* @__PURE__ */
|
|
5434
|
+
), onModeSwitch && /* @__PURE__ */ React25.createElement("div", { style: styles.modeSwitch }, /* @__PURE__ */ React25.createElement("p", { style: styles.modeSwitchText }, isLogin ? "Don't have an account?" : "Already have an account?"), /* @__PURE__ */ React25.createElement(
|
|
5269
5435
|
"button",
|
|
5270
5436
|
{
|
|
5271
5437
|
type: "button",
|
|
@@ -5438,9 +5604,9 @@ var styles = {
|
|
|
5438
5604
|
};
|
|
5439
5605
|
|
|
5440
5606
|
// src/TopicTierBadge.jsx
|
|
5441
|
-
import
|
|
5607
|
+
import React26 from "react";
|
|
5442
5608
|
function LandmarkIcon({ size = 14 }) {
|
|
5443
|
-
return /* @__PURE__ */
|
|
5609
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5444
5610
|
"svg",
|
|
5445
5611
|
{
|
|
5446
5612
|
width: size,
|
|
@@ -5454,16 +5620,16 @@ function LandmarkIcon({ size = 14 }) {
|
|
|
5454
5620
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5455
5621
|
"aria-hidden": "true"
|
|
5456
5622
|
},
|
|
5457
|
-
/* @__PURE__ */
|
|
5458
|
-
/* @__PURE__ */
|
|
5459
|
-
/* @__PURE__ */
|
|
5460
|
-
/* @__PURE__ */
|
|
5461
|
-
/* @__PURE__ */
|
|
5462
|
-
/* @__PURE__ */
|
|
5623
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M10 18v-7" }),
|
|
5624
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z" }),
|
|
5625
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M14 18v-7" }),
|
|
5626
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M18 18v-7" }),
|
|
5627
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M3 22h18" }),
|
|
5628
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M6 18v-7" })
|
|
5463
5629
|
);
|
|
5464
5630
|
}
|
|
5465
5631
|
function Building2Icon({ size = 14 }) {
|
|
5466
|
-
return /* @__PURE__ */
|
|
5632
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5467
5633
|
"svg",
|
|
5468
5634
|
{
|
|
5469
5635
|
width: size,
|
|
@@ -5477,17 +5643,17 @@ function Building2Icon({ size = 14 }) {
|
|
|
5477
5643
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5478
5644
|
"aria-hidden": "true"
|
|
5479
5645
|
},
|
|
5480
|
-
/* @__PURE__ */
|
|
5481
|
-
/* @__PURE__ */
|
|
5482
|
-
/* @__PURE__ */
|
|
5483
|
-
/* @__PURE__ */
|
|
5484
|
-
/* @__PURE__ */
|
|
5485
|
-
/* @__PURE__ */
|
|
5486
|
-
/* @__PURE__ */
|
|
5646
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }),
|
|
5647
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M6 12H4a2 2 0 0 0-2 2v8h4" }),
|
|
5648
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M18 9h2a2 2 0 0 1 2 2v11h-4" }),
|
|
5649
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M10 6h4" }),
|
|
5650
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M10 10h4" }),
|
|
5651
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M10 14h4" }),
|
|
5652
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M10 18h4" })
|
|
5487
5653
|
);
|
|
5488
5654
|
}
|
|
5489
5655
|
function HomeIcon({ size = 14 }) {
|
|
5490
|
-
return /* @__PURE__ */
|
|
5656
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5491
5657
|
"svg",
|
|
5492
5658
|
{
|
|
5493
5659
|
width: size,
|
|
@@ -5501,8 +5667,8 @@ function HomeIcon({ size = 14 }) {
|
|
|
5501
5667
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5502
5668
|
"aria-hidden": "true"
|
|
5503
5669
|
},
|
|
5504
|
-
/* @__PURE__ */
|
|
5505
|
-
/* @__PURE__ */
|
|
5670
|
+
/* @__PURE__ */ React26.createElement("path", { d: "m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }),
|
|
5671
|
+
/* @__PURE__ */ React26.createElement("polyline", { points: "9 22 9 12 15 12 15 22" })
|
|
5506
5672
|
);
|
|
5507
5673
|
}
|
|
5508
5674
|
var TIER_INFO = {
|
|
@@ -5562,7 +5728,7 @@ function TopicTierBadge({
|
|
|
5562
5728
|
userSelect: "none"
|
|
5563
5729
|
};
|
|
5564
5730
|
};
|
|
5565
|
-
return /* @__PURE__ */
|
|
5731
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5566
5732
|
"span",
|
|
5567
5733
|
{
|
|
5568
5734
|
className: "ev-topic-tier-badge",
|
|
@@ -5572,13 +5738,13 @@ function TopicTierBadge({
|
|
|
5572
5738
|
},
|
|
5573
5739
|
effectiveTiers.map((tier) => {
|
|
5574
5740
|
const { label, Icon } = TIER_INFO[tier];
|
|
5575
|
-
return /* @__PURE__ */
|
|
5741
|
+
return /* @__PURE__ */ React26.createElement("span", { key: tier, style: itemStyle(tier) }, /* @__PURE__ */ React26.createElement(Icon, { size: sizeStyle.iconSize }), !iconOnly && /* @__PURE__ */ React26.createElement("span", null, label));
|
|
5576
5742
|
})
|
|
5577
5743
|
);
|
|
5578
5744
|
}
|
|
5579
5745
|
|
|
5580
5746
|
// src/CompassCoverageCallout.jsx
|
|
5581
|
-
import
|
|
5747
|
+
import React27, { useState as useState14 } from "react";
|
|
5582
5748
|
var TIER_LABELS = {
|
|
5583
5749
|
federal: "federal",
|
|
5584
5750
|
state: "state",
|
|
@@ -5642,15 +5808,15 @@ function CompassCoverageCallout({
|
|
|
5642
5808
|
setDismissed(true);
|
|
5643
5809
|
if (onDismiss) onDismiss();
|
|
5644
5810
|
};
|
|
5645
|
-
return /* @__PURE__ */
|
|
5811
|
+
return /* @__PURE__ */ React27.createElement(
|
|
5646
5812
|
"div",
|
|
5647
5813
|
{
|
|
5648
5814
|
className: "ev-compass-coverage-callout",
|
|
5649
5815
|
role: "status",
|
|
5650
5816
|
style: containerStyle2
|
|
5651
5817
|
},
|
|
5652
|
-
/* @__PURE__ */
|
|
5653
|
-
onDismiss !== void 0 && /* @__PURE__ */
|
|
5818
|
+
/* @__PURE__ */ React27.createElement("div", { style: textStyle }, /* @__PURE__ */ React27.createElement("div", { style: headlineStyle }, "Your compass covers ", tierLabel, " issues lightly"), /* @__PURE__ */ React27.createElement("div", null, count === 0 ? `None of your ${totalSelected != null ? totalSelected : "selected"} compass topics apply at the ${tierLabel} level. ` : `Only ${count} of your ${totalSelected != null ? totalSelected : "selected"} compass topics apply at the ${tierLabel} level. `, "Add more ", tierLabel, "-applicable topics to get better comparisons with ", tierLabel, " officials."), /* @__PURE__ */ React27.createElement("a", { href: compassUrl, style: ctaStyle }, "Add ", tierLabel, " topics \u2192")),
|
|
5819
|
+
onDismiss !== void 0 && /* @__PURE__ */ React27.createElement(
|
|
5654
5820
|
"button",
|
|
5655
5821
|
{
|
|
5656
5822
|
onClick: handleDismiss,
|
|
@@ -5663,7 +5829,7 @@ function CompassCoverageCallout({
|
|
|
5663
5829
|
}
|
|
5664
5830
|
|
|
5665
5831
|
// src/ExpandCompassNudge.jsx
|
|
5666
|
-
import
|
|
5832
|
+
import React28 from "react";
|
|
5667
5833
|
function ExpandCompassNudge({
|
|
5668
5834
|
politicianName,
|
|
5669
5835
|
missingCount,
|
|
@@ -5710,7 +5876,7 @@ function ExpandCompassNudge({
|
|
|
5710
5876
|
};
|
|
5711
5877
|
const topicsLabel = missingCount === 1 ? "topic" : "topics";
|
|
5712
5878
|
const speakerName = politicianName || "This politician";
|
|
5713
|
-
return /* @__PURE__ */
|
|
5879
|
+
return /* @__PURE__ */ React28.createElement("div", { className: "ev-expand-compass-nudge", style: containerStyle2, role: "region" }, /* @__PURE__ */ React28.createElement("p", { style: headlineStyle }, "Want a richer comparison?"), /* @__PURE__ */ React28.createElement("p", { style: bodyStyle }, speakerName, " has stances on ", missingCount, " more ", topicsLabel, " you haven't answered yet. Expand your compass to see where you stand on all of them."), /* @__PURE__ */ React28.createElement("a", { href: compassUrl, style: ctaStyle }, "Expand my compass \u2192"));
|
|
5714
5880
|
}
|
|
5715
5881
|
|
|
5716
5882
|
// src/computeTierCoverage.js
|
|
@@ -5890,14 +6056,14 @@ function isGuestPopulated(domain, fullEvContext) {
|
|
|
5890
6056
|
}
|
|
5891
6057
|
|
|
5892
6058
|
// src/StanceAccordion.jsx
|
|
5893
|
-
import
|
|
6059
|
+
import React30, { useState as useState16, useRef as useRef4, useCallback as useCallback2, useEffect as useEffect10 } from "react";
|
|
5894
6060
|
|
|
5895
6061
|
// src/Favicon.jsx
|
|
5896
|
-
import
|
|
6062
|
+
import React29 from "react";
|
|
5897
6063
|
function Favicon({ url, size = 16 }) {
|
|
5898
6064
|
try {
|
|
5899
6065
|
const domain = new URL(url).hostname;
|
|
5900
|
-
return /* @__PURE__ */
|
|
6066
|
+
return /* @__PURE__ */ React29.createElement(
|
|
5901
6067
|
"img",
|
|
5902
6068
|
{
|
|
5903
6069
|
src: `https://www.google.com/s2/favicons?sz=${size}&domain=${domain}`,
|
|
@@ -5908,7 +6074,7 @@ function Favicon({ url, size = 16 }) {
|
|
|
5908
6074
|
}
|
|
5909
6075
|
);
|
|
5910
6076
|
} catch {
|
|
5911
|
-
return /* @__PURE__ */
|
|
6077
|
+
return /* @__PURE__ */ React29.createElement(
|
|
5912
6078
|
"svg",
|
|
5913
6079
|
{
|
|
5914
6080
|
width: size,
|
|
@@ -5919,8 +6085,8 @@ function Favicon({ url, size = 16 }) {
|
|
|
5919
6085
|
strokeWidth: "1.5",
|
|
5920
6086
|
style: { verticalAlign: "middle", flexShrink: 0 }
|
|
5921
6087
|
},
|
|
5922
|
-
/* @__PURE__ */
|
|
5923
|
-
/* @__PURE__ */
|
|
6088
|
+
/* @__PURE__ */ React29.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
6089
|
+
/* @__PURE__ */ React29.createElement("path", { d: "M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" })
|
|
5924
6090
|
);
|
|
5925
6091
|
}
|
|
5926
6092
|
}
|
|
@@ -6047,13 +6213,13 @@ function StanceAccordion({
|
|
|
6047
6213
|
visibleTopics = [pinned, ...baseTopics.filter((t) => String(t.id) !== String(initialExpandedTopicId))];
|
|
6048
6214
|
}
|
|
6049
6215
|
}
|
|
6050
|
-
return /* @__PURE__ */
|
|
6216
|
+
return /* @__PURE__ */ React30.createElement(
|
|
6051
6217
|
"div",
|
|
6052
6218
|
{
|
|
6053
6219
|
className: "flex flex-col",
|
|
6054
6220
|
style: { fontFamily: "'Manrope', sans-serif" }
|
|
6055
6221
|
},
|
|
6056
|
-
/* @__PURE__ */
|
|
6222
|
+
/* @__PURE__ */ React30.createElement(
|
|
6057
6223
|
"h3",
|
|
6058
6224
|
{
|
|
6059
6225
|
className: "text-sm font-semibold text-neutral-400 uppercase tracking-wider mb-2",
|
|
@@ -6076,15 +6242,15 @@ function StanceAccordion({
|
|
|
6076
6242
|
if (topic.topic_key) return q.issue === topic.topic_key;
|
|
6077
6243
|
return topic.short_title && q.issue.toLowerCase() === topic.short_title.toLowerCase();
|
|
6078
6244
|
}) : [];
|
|
6079
|
-
return /* @__PURE__ */
|
|
6245
|
+
return /* @__PURE__ */ React30.createElement("div", { key: topicId, className: "border-b border-neutral-100" }, /* @__PURE__ */ React30.createElement(
|
|
6080
6246
|
"button",
|
|
6081
6247
|
{
|
|
6082
6248
|
type: "button",
|
|
6083
6249
|
onClick: () => handleToggle(topicId),
|
|
6084
6250
|
className: "w-full flex items-center justify-between py-3 px-2 text-left cursor-pointer hover:bg-neutral-50 transition-colors"
|
|
6085
6251
|
},
|
|
6086
|
-
/* @__PURE__ */
|
|
6087
|
-
/* @__PURE__ */
|
|
6252
|
+
/* @__PURE__ */ React30.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React30.createElement("span", { className: "text-sm font-medium text-neutral-800 truncate" }, topic.short_title), questionText && /* @__PURE__ */ React30.createElement("span", { className: "text-xs text-neutral-400 mt-0.5" }, questionText), /* @__PURE__ */ React30.createElement("span", { className: "text-xs text-neutral-500 mt-0.5" }, label)),
|
|
6253
|
+
/* @__PURE__ */ React30.createElement(
|
|
6088
6254
|
"svg",
|
|
6089
6255
|
{
|
|
6090
6256
|
width: "16",
|
|
@@ -6101,9 +6267,9 @@ function StanceAccordion({
|
|
|
6101
6267
|
transition: "transform 0.2s ease"
|
|
6102
6268
|
}
|
|
6103
6269
|
},
|
|
6104
|
-
/* @__PURE__ */
|
|
6270
|
+
/* @__PURE__ */ React30.createElement("polyline", { points: "9 18 15 12 9 6" })
|
|
6105
6271
|
)
|
|
6106
|
-
), /* @__PURE__ */
|
|
6272
|
+
), /* @__PURE__ */ React30.createElement(
|
|
6107
6273
|
"div",
|
|
6108
6274
|
{
|
|
6109
6275
|
style: {
|
|
@@ -6112,7 +6278,7 @@ function StanceAccordion({
|
|
|
6112
6278
|
transition: "grid-template-rows 0.25s ease"
|
|
6113
6279
|
}
|
|
6114
6280
|
},
|
|
6115
|
-
/* @__PURE__ */
|
|
6281
|
+
/* @__PURE__ */ React30.createElement("div", { style: { overflow: "hidden" } }, /* @__PURE__ */ React30.createElement("div", { className: "px-2 pb-4" }, isLoading && /* @__PURE__ */ React30.createElement("div", { className: "flex items-center py-3" }, /* @__PURE__ */ React30.createElement(
|
|
6116
6282
|
"div",
|
|
6117
6283
|
{
|
|
6118
6284
|
style: {
|
|
@@ -6124,14 +6290,14 @@ function StanceAccordion({
|
|
|
6124
6290
|
animation: "ev-spin 0.8s linear infinite"
|
|
6125
6291
|
}
|
|
6126
6292
|
}
|
|
6127
|
-
)), !isLoading && cached && /* @__PURE__ */
|
|
6293
|
+
)), !isLoading && cached && /* @__PURE__ */ React30.createElement(React30.Fragment, null, cached.reasoning ? /* @__PURE__ */ React30.createElement(
|
|
6128
6294
|
"p",
|
|
6129
6295
|
{
|
|
6130
6296
|
className: "text-sm text-neutral-700 mb-3",
|
|
6131
6297
|
style: { whiteSpace: "pre-wrap", lineHeight: 1.6 }
|
|
6132
6298
|
},
|
|
6133
6299
|
cached.reasoning
|
|
6134
|
-
) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */
|
|
6300
|
+
) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */ React30.createElement("div", { className: "mt-2" }, /* @__PURE__ */ React30.createElement("p", { className: "text-xs font-semibold text-neutral-500 uppercase tracking-wider mb-1.5" }, "References"), /* @__PURE__ */ React30.createElement("ol", { className: "list-decimal list-inside space-y-1" }, cached.sources.map((src, i) => /* @__PURE__ */ React30.createElement("li", { key: i, className: "text-xs text-neutral-600" }, /* @__PURE__ */ React30.createElement(
|
|
6135
6301
|
"a",
|
|
6136
6302
|
{
|
|
6137
6303
|
href: src,
|
|
@@ -6139,9 +6305,9 @@ function StanceAccordion({
|
|
|
6139
6305
|
rel: "noreferrer",
|
|
6140
6306
|
className: "inline-flex items-center gap-1.5 hover:text-[#00657c] transition-colors"
|
|
6141
6307
|
},
|
|
6142
|
-
/* @__PURE__ */
|
|
6143
|
-
/* @__PURE__ */
|
|
6144
|
-
))))), topicQuotes.length > 0 && /* @__PURE__ */
|
|
6308
|
+
/* @__PURE__ */ React30.createElement(Favicon, { url: src }),
|
|
6309
|
+
/* @__PURE__ */ React30.createElement("span", { className: "underline underline-offset-2" }, getDisplayUrl(src))
|
|
6310
|
+
))))), topicQuotes.length > 0 && /* @__PURE__ */ React30.createElement("div", { style: { marginTop: "12px" } }, /* @__PURE__ */ React30.createElement(
|
|
6145
6311
|
"p",
|
|
6146
6312
|
{
|
|
6147
6313
|
style: {
|
|
@@ -6158,7 +6324,7 @@ function StanceAccordion({
|
|
|
6158
6324
|
const verdict = verdictsByQuote ? verdictsByQuote[quote.id] : void 0;
|
|
6159
6325
|
const borderColor = verdict === "agreed" ? "#0e7490" : verdict === "disagreed" ? "#b45309" : "#e2e8f0";
|
|
6160
6326
|
const sourceName = quote.source_name || quote.sourceName;
|
|
6161
|
-
return /* @__PURE__ */
|
|
6327
|
+
return /* @__PURE__ */ React30.createElement(
|
|
6162
6328
|
"div",
|
|
6163
6329
|
{
|
|
6164
6330
|
key: quote.id,
|
|
@@ -6170,7 +6336,7 @@ function StanceAccordion({
|
|
|
6170
6336
|
marginBottom: "8px"
|
|
6171
6337
|
}
|
|
6172
6338
|
},
|
|
6173
|
-
/* @__PURE__ */
|
|
6339
|
+
/* @__PURE__ */ React30.createElement(
|
|
6174
6340
|
"p",
|
|
6175
6341
|
{
|
|
6176
6342
|
style: {
|
|
@@ -6183,7 +6349,7 @@ function StanceAccordion({
|
|
|
6183
6349
|
},
|
|
6184
6350
|
quote.text
|
|
6185
6351
|
),
|
|
6186
|
-
verdict === "agreed" && /* @__PURE__ */
|
|
6352
|
+
verdict === "agreed" && /* @__PURE__ */ React30.createElement(
|
|
6187
6353
|
"span",
|
|
6188
6354
|
{
|
|
6189
6355
|
style: {
|
|
@@ -6200,10 +6366,10 @@ function StanceAccordion({
|
|
|
6200
6366
|
flexShrink: 0
|
|
6201
6367
|
}
|
|
6202
6368
|
},
|
|
6203
|
-
/* @__PURE__ */
|
|
6369
|
+
/* @__PURE__ */ React30.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React30.createElement("path", { d: "M5 13l4 4L19 7" })),
|
|
6204
6370
|
"Agreed"
|
|
6205
6371
|
),
|
|
6206
|
-
verdict === "disagreed" && /* @__PURE__ */
|
|
6372
|
+
verdict === "disagreed" && /* @__PURE__ */ React30.createElement(
|
|
6207
6373
|
"span",
|
|
6208
6374
|
{
|
|
6209
6375
|
style: {
|
|
@@ -6220,10 +6386,10 @@ function StanceAccordion({
|
|
|
6220
6386
|
flexShrink: 0
|
|
6221
6387
|
}
|
|
6222
6388
|
},
|
|
6223
|
-
/* @__PURE__ */
|
|
6389
|
+
/* @__PURE__ */ React30.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React30.createElement("path", { d: "M6 18L18 6M6 6l12 12" })),
|
|
6224
6390
|
"Disagreed"
|
|
6225
6391
|
),
|
|
6226
|
-
sourceName && /* @__PURE__ */
|
|
6392
|
+
sourceName && /* @__PURE__ */ React30.createElement(
|
|
6227
6393
|
"a",
|
|
6228
6394
|
{
|
|
6229
6395
|
href: quote.source_url || quote.sourceUrl,
|
|
@@ -6240,10 +6406,10 @@ function StanceAccordion({
|
|
|
6240
6406
|
sourceName
|
|
6241
6407
|
)
|
|
6242
6408
|
);
|
|
6243
|
-
})), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */
|
|
6409
|
+
})), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */ React30.createElement("p", { className: "text-sm text-neutral-400 italic py-2" }, "No detailed reasoning available for this topic."))))
|
|
6244
6410
|
));
|
|
6245
6411
|
}),
|
|
6246
|
-
hasToggle && /* @__PURE__ */
|
|
6412
|
+
hasToggle && /* @__PURE__ */ React30.createElement(
|
|
6247
6413
|
"button",
|
|
6248
6414
|
{
|
|
6249
6415
|
type: "button",
|
|
@@ -6267,6 +6433,7 @@ export {
|
|
|
6267
6433
|
CompassIcon,
|
|
6268
6434
|
CompassKey,
|
|
6269
6435
|
ExpandCompassNudge,
|
|
6436
|
+
FeedbackButton,
|
|
6270
6437
|
FilterSidebar,
|
|
6271
6438
|
GovernmentBodySection,
|
|
6272
6439
|
Header,
|