@empoweredvote/ev-ui 0.5.0 → 0.6.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.mjs CHANGED
@@ -15,7 +15,8 @@ function RadarChartCore({
15
15
  size = 400,
16
16
  labelFontSize = 18,
17
17
  padding = 80,
18
- labelOffset = 20
18
+ labelOffset = 20,
19
+ tightFit = false
19
20
  }) {
20
21
  const radius = size / 2 - 40;
21
22
  const centerX = size / 2;
@@ -114,6 +115,20 @@ function RadarChartCore({
114
115
  const leftPadding = symmetricPadding;
115
116
  const rightPadding = symmetricPadding;
116
117
  const verticalPadding = padding;
118
+ let tightTop = -verticalPadding;
119
+ let tightHeight = size + verticalPadding * 2;
120
+ if (tightFit && numSpokes > 0) {
121
+ let yMin = Infinity, yMax = -Infinity;
122
+ for (let i = 0; i < numSpokes; i++) {
123
+ const angle = 2 * Math.PI * i / numSpokes;
124
+ const y = centerY - radius * Math.cos(angle);
125
+ if (y < yMin) yMin = y;
126
+ if (y > yMax) yMax = y;
127
+ }
128
+ const labelMargin = labelOffset + labelFontSize * 1.4 + labelFontSize * 1.1;
129
+ tightTop = yMin - labelMargin;
130
+ tightHeight = yMax + labelMargin - tightTop;
131
+ }
117
132
  const guidePolygons = [];
118
133
  for (let level = 1; level <= 5; level++) {
119
134
  const scale = level / 5;
@@ -132,7 +147,7 @@ function RadarChartCore({
132
147
  "svg",
133
148
  {
134
149
  className: "w-full h-auto max-h-full",
135
- viewBox: `-${leftPadding} -${verticalPadding} ${size + leftPadding + rightPadding} ${size + verticalPadding * 2}`,
150
+ viewBox: `-${leftPadding} ${tightTop} ${size + leftPadding + rightPadding} ${tightHeight}`,
136
151
  preserveAspectRatio: "xMidYMid meet"
137
152
  },
138
153
  guidePolygons,
@@ -190,6 +205,7 @@ function RadarChartCore({
190
205
  fill: isUnansweredLabel ? "#9ca3af" : void 0,
191
206
  style: { cursor: "pointer", userSelect: "none", fontSize: fSize }
192
207
  },
208
+ isUnansweredLabel && /* @__PURE__ */ React.createElement("title", null, "No stance on file for this topic."),
193
209
  lines.map((ln, idx) => /* @__PURE__ */ React.createElement("tspan", { key: idx, x: labelX, dy: idx === 0 ? "0" : `${lineHeight}` }, ln))
194
210
  );
195
211
  }),
@@ -216,18 +232,25 @@ function RadarChartCore({
216
232
  }
217
233
  }
218
234
  ),
219
- pointsArr.map(([cx, cy], i) => /* @__PURE__ */ React.createElement(
220
- "circle",
221
- {
222
- key: `user-dot-${i}`,
223
- cx,
224
- cy,
225
- r: 5,
226
- fill: "#7C6B9E",
227
- stroke: "#FFFFFF",
228
- strokeWidth: 2
229
- }
230
- )),
235
+ pointsArr.map(([cx, cy], i) => {
236
+ const shortTitle = spokes[i][0];
237
+ const userVal = spokes[i][1];
238
+ if (!userVal || Number(userVal) === 0) return null;
239
+ const compareVal = compareData[shortTitle];
240
+ const matches = hasCompareData && userVal !== 0 && compareVal !== 0 && compareVal != null && Number(userVal) === Number(compareVal);
241
+ return /* @__PURE__ */ React.createElement(
242
+ "circle",
243
+ {
244
+ key: `user-dot-${i}`,
245
+ cx,
246
+ cy,
247
+ r: matches ? 8 : 7,
248
+ fill: matches ? "#fed12e" : "#7C6B9E",
249
+ stroke: "#FFFFFF",
250
+ strokeWidth: 3
251
+ }
252
+ );
253
+ }),
231
254
  hasCompareData && comparePoints ? countChanged || compareJustAppeared ? /* @__PURE__ */ React.createElement(
232
255
  "polygon",
233
256
  {
@@ -251,18 +274,25 @@ function RadarChartCore({
251
274
  }
252
275
  }
253
276
  ) : null,
254
- hasCompareData && compareCoords && compareCoords.map(([cx, cy], i) => /* @__PURE__ */ React.createElement(
255
- "circle",
256
- {
257
- key: `compare-dot-${i}`,
258
- cx,
259
- cy,
260
- r: 4,
261
- fill: "#5A9A6E",
262
- stroke: "#FFFFFF",
263
- strokeWidth: 2
264
- }
265
- )),
277
+ hasCompareData && compareCoords && compareCoords.map(([cx, cy], i) => {
278
+ const shortTitle = spokes[i][0];
279
+ const userVal = spokes[i][1];
280
+ const compareVal = compareData[shortTitle];
281
+ if (!compareVal || Number(compareVal) === 0) return null;
282
+ const matches = userVal !== 0 && compareVal !== 0 && compareVal != null && Number(userVal) === Number(compareVal);
283
+ return /* @__PURE__ */ React.createElement(
284
+ "circle",
285
+ {
286
+ key: `compare-dot-${i}`,
287
+ cx,
288
+ cy,
289
+ r: matches ? 8 : 7,
290
+ fill: matches ? "#fed12e" : "#5A9A6E",
291
+ stroke: "#FFFFFF",
292
+ strokeWidth: 3
293
+ }
294
+ );
295
+ }),
266
296
  spokes.map(([shortTitle], i) => {
267
297
  const angle = 2 * Math.PI * i / numSpokes;
268
298
  const x = centerX + radius * Math.sin(angle);
@@ -1538,7 +1568,8 @@ function PoliticianCard({
1538
1568
  },
1539
1569
  imageWrapper: {
1540
1570
  width: isHorizontal ? "90px" : "100%",
1541
- height: isHorizontal ? void 0 : "auto",
1571
+ height: isHorizontal ? "100%" : "auto",
1572
+ maxHeight: isHorizontal ? "200px" : void 0,
1542
1573
  aspectRatio: isHorizontal ? void 0 : "4/5",
1543
1574
  flexShrink: 0,
1544
1575
  overflow: "hidden"
@@ -2074,7 +2105,7 @@ function CompassCardHorizontalMeta({
2074
2105
  IconOverlay,
2075
2106
  {
2076
2107
  ballot: politician.ballot || null,
2077
- hasStances: Boolean(userAnswers && userAnswers.length > 0) || Boolean(politician.hasStances),
2108
+ hasStances: false,
2078
2109
  branch: politician.branch || null
2079
2110
  }
2080
2111
  ));
@@ -2105,11 +2136,12 @@ function buildAnswerMapByShortTitle(allTopics, allAnswers, allowedShorts) {
2105
2136
  }
2106
2137
 
2107
2138
  // src/CompassCardHorizontal.jsx
2108
- var RADAR_SIZE = 250;
2109
- var SLOT_WIDTH = 260;
2139
+ var RADAR_SIZE = 400;
2140
+ var SLOT_WIDTH = 420;
2110
2141
  function CompassCardHorizontal({
2111
2142
  politician,
2112
2143
  userAnswers = null,
2144
+ invertedSpokes = {},
2113
2145
  tierVisuals = null,
2114
2146
  view = "compass",
2115
2147
  surface = "representatives",
@@ -2193,7 +2225,7 @@ function CompassCardHorizontal({
2193
2225
  topics,
2194
2226
  data,
2195
2227
  compareData,
2196
- invertedSpokes: {},
2228
+ invertedSpokes: invertedSpokes || {},
2197
2229
  onToggleInversion: () => {
2198
2230
  },
2199
2231
  onReplaceTopic: () => {
@@ -2286,7 +2318,7 @@ function CompassCardHorizontal({
2286
2318
  "Calibrate your compass"
2287
2319
  ));
2288
2320
  }
2289
- function renderUnavailablePlate() {
2321
+ function renderUnavailablePlate(message = "Compass currently unavailable for this role.") {
2290
2322
  return /* @__PURE__ */ React10.createElement("div", { style: {
2291
2323
  width: "100%",
2292
2324
  height: "100%",
@@ -2305,12 +2337,16 @@ function CompassCardHorizontal({
2305
2337
  maxWidth: "180px",
2306
2338
  margin: 0,
2307
2339
  fontFamily: fonts.primary
2308
- } }, "Compass currently unavailable for this role."));
2340
+ } }, message));
2309
2341
  }
2310
2342
  function renderSlotContent() {
2311
2343
  if (view === "portrait") return renderPortrait();
2312
2344
  if (variant === "empty") return renderEmptyVariant();
2313
2345
  if (variant === "administrative" || variant === "judicial") return renderUnavailablePlate();
2346
+ if (variant === "no-stances") {
2347
+ const name = (politician == null ? void 0 : politician.full_name) || "this official";
2348
+ return renderUnavailablePlate(`No compass stances on file for ${name} yet.`);
2349
+ }
2314
2350
  return /* @__PURE__ */ React10.createElement("div", { style: {
2315
2351
  width: "100%",
2316
2352
  height: "100%",
@@ -2366,8 +2402,644 @@ function CompassCardHorizontal({
2366
2402
  );
2367
2403
  }
2368
2404
 
2405
+ // src/CompassCardVertical.jsx
2406
+ import React11, { useState as useState6, useEffect as useEffect6 } from "react";
2407
+ var RADAR_SIZE2 = 400;
2408
+ function CompassCardVertical({
2409
+ politician,
2410
+ userAnswers = null,
2411
+ invertedSpokes = {},
2412
+ tierVisuals = null,
2413
+ view = "compass",
2414
+ surface = "representatives",
2415
+ variant = "compass",
2416
+ onBuildCompass = null,
2417
+ onClick
2418
+ }) {
2419
+ var _a;
2420
+ const [hovered, setHovered] = useState6(false);
2421
+ const [focused, setFocused] = useState6(false);
2422
+ const [imgError, setImgError] = useState6(false);
2423
+ const [emptyCtaHovered, setEmptyCtaHovered] = useState6(false);
2424
+ useEffect6(() => {
2425
+ setImgError(false);
2426
+ }, [politician == null ? void 0 : politician.photo_origin_url]);
2427
+ const cardStyle = {
2428
+ position: "relative",
2429
+ display: "flex",
2430
+ flexDirection: "column",
2431
+ height: "100%",
2432
+ backgroundColor: (_a = tierVisuals == null ? void 0 : tierVisuals.bg) != null ? _a : colors.bgWhite,
2433
+ border: `1px solid ${colors.borderLight}`,
2434
+ borderRadius: borderRadius.xl,
2435
+ overflow: "hidden",
2436
+ boxShadow: focused ? focus.ring : hovered ? shadows.cardHover : shadows.md,
2437
+ transform: hovered ? "translateY(-2px)" : "none",
2438
+ transition: `box-shadow ${duration.normal} ease, transform ${duration.normal} ease`,
2439
+ cursor: onClick ? "pointer" : "default",
2440
+ fontFamily: fonts.primary,
2441
+ outline: "none"
2442
+ };
2443
+ const titleText = surface === "elections" ? politician.office_running_for : politician.office_title;
2444
+ function renderCompass() {
2445
+ var _a2, _b, _c;
2446
+ if (!userAnswers || userAnswers.length === 0) {
2447
+ return /* @__PURE__ */ React11.createElement(PlaceholderRadar, { size: RADAR_SIZE2, name: (politician == null ? void 0 : politician.full_name) || "" });
2448
+ }
2449
+ let topics = [];
2450
+ let data = {};
2451
+ let compareData = {};
2452
+ try {
2453
+ if (Array.isArray(userAnswers) && userAnswers.length > 0) {
2454
+ const hasEmbeddedTopics = (_b = (_a2 = userAnswers[0]) == null ? void 0 : _a2.topic) == null ? void 0 : _b.short_title;
2455
+ if (hasEmbeddedTopics) {
2456
+ const allowedShorts = userAnswers.map((a) => a.topic.short_title);
2457
+ const allTopics = userAnswers.map((a) => a.topic);
2458
+ const { topicsFiltered, answersByShort } = buildAnswerMapByShortTitle(
2459
+ allTopics,
2460
+ userAnswers,
2461
+ allowedShorts
2462
+ );
2463
+ topics = topicsFiltered;
2464
+ data = answersByShort;
2465
+ } else {
2466
+ if (!Array.isArray(userAnswers[0])) {
2467
+ topics = userAnswers.filter((a) => a.short_title).map((a) => ({ id: a.topic_id || a.short_title, short_title: a.short_title, title: a.short_title }));
2468
+ data = {};
2469
+ for (const a of userAnswers) {
2470
+ if (a.short_title) data[a.short_title] = (_c = a.value) != null ? _c : 0;
2471
+ }
2472
+ }
2473
+ }
2474
+ }
2475
+ if ((politician == null ? void 0 : politician.stances) && typeof politician.stances === "object") {
2476
+ compareData = Array.isArray(politician.stances) ? politician.stances.reduce((acc, s) => {
2477
+ var _a3;
2478
+ if (s.short_title) acc[s.short_title] = (_a3 = s.value) != null ? _a3 : 0;
2479
+ return acc;
2480
+ }, {}) : politician.stances;
2481
+ }
2482
+ if (topics.length === 0) {
2483
+ return /* @__PURE__ */ React11.createElement(PlaceholderRadar, { size: RADAR_SIZE2, name: (politician == null ? void 0 : politician.full_name) || "" });
2484
+ }
2485
+ } catch {
2486
+ return /* @__PURE__ */ React11.createElement(PlaceholderRadar, { size: RADAR_SIZE2, name: (politician == null ? void 0 : politician.full_name) || "" });
2487
+ }
2488
+ const unansweredSpokes = {};
2489
+ for (const t of topics) {
2490
+ const v = compareData[t.short_title];
2491
+ if (!v || Number(v) === 0) unansweredSpokes[t.short_title] = true;
2492
+ }
2493
+ return /* @__PURE__ */ React11.createElement("div", { style: { width: RADAR_SIZE2 + 240, maxWidth: "100%", flexShrink: 0 } }, /* @__PURE__ */ React11.createElement(
2494
+ RadarChartCore,
2495
+ {
2496
+ topics,
2497
+ data,
2498
+ compareData,
2499
+ invertedSpokes: invertedSpokes || {},
2500
+ unansweredSpokes,
2501
+ onToggleInversion: () => {
2502
+ },
2503
+ onReplaceTopic: () => {
2504
+ },
2505
+ size: RADAR_SIZE2,
2506
+ padding: 40,
2507
+ labelOffset: 5,
2508
+ labelFontSize: 18,
2509
+ tightFit: true
2510
+ }
2511
+ ));
2512
+ }
2513
+ function renderAvatar() {
2514
+ var _a2, _b, _c;
2515
+ 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;
2516
+ const baseStyle = {
2517
+ width: 88,
2518
+ height: 110,
2519
+ flexShrink: 0,
2520
+ overflow: "hidden",
2521
+ borderRadius: borderRadius.md,
2522
+ backgroundColor: colors.evMutedBlue,
2523
+ display: "flex",
2524
+ alignItems: "center",
2525
+ justifyContent: "center"
2526
+ };
2527
+ if (imageSrc && !imgError) {
2528
+ return /* @__PURE__ */ React11.createElement("div", { style: baseStyle }, /* @__PURE__ */ React11.createElement(
2529
+ "img",
2530
+ {
2531
+ src: imageSrc,
2532
+ alt: `${politician.full_name} portrait`,
2533
+ onError: () => setImgError(true),
2534
+ style: {
2535
+ width: "100%",
2536
+ height: "100%",
2537
+ objectFit: "cover",
2538
+ objectPosition: (_b = politician.imageFocalPoint) != null ? _b : "center 20%",
2539
+ display: "block"
2540
+ }
2541
+ }
2542
+ ));
2543
+ }
2544
+ const parts = ((politician == null ? void 0 : politician.full_name) || "").split(" ").filter(Boolean);
2545
+ 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__ */ React11.createElement("div", { style: baseStyle }, /* @__PURE__ */ React11.createElement("span", { style: {
2547
+ color: colors.textWhite,
2548
+ fontFamily: fonts.primary,
2549
+ fontWeight: fontWeights.bold,
2550
+ fontSize: fontSizes["2xl"]
2551
+ } }, initials));
2552
+ }
2553
+ function renderPortrait() {
2554
+ var _a2, _b, _c;
2555
+ 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
+ if (imageSrc && !imgError) {
2557
+ return /* @__PURE__ */ React11.createElement(
2558
+ "img",
2559
+ {
2560
+ src: imageSrc,
2561
+ alt: `${politician.full_name} portrait`,
2562
+ style: {
2563
+ width: RADAR_SIZE2,
2564
+ height: RADAR_SIZE2,
2565
+ objectFit: "cover",
2566
+ objectPosition: (_b = politician.imageFocalPoint) != null ? _b : "center 20%",
2567
+ display: "block",
2568
+ borderRadius: borderRadius.md
2569
+ },
2570
+ onError: () => setImgError(true)
2571
+ }
2572
+ );
2573
+ }
2574
+ const parts = ((politician == null ? void 0 : politician.full_name) || "").split(" ").filter(Boolean);
2575
+ 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__ */ React11.createElement("div", { style: {
2577
+ width: RADAR_SIZE2,
2578
+ height: RADAR_SIZE2,
2579
+ backgroundColor: colors.evMutedBlue,
2580
+ color: colors.textWhite,
2581
+ display: "flex",
2582
+ alignItems: "center",
2583
+ justifyContent: "center",
2584
+ fontFamily: fonts.primary,
2585
+ fontWeight: fontWeights.bold,
2586
+ fontSize: fontSizes["5xl"],
2587
+ borderRadius: borderRadius.md
2588
+ } }, initials);
2589
+ }
2590
+ function renderEmptyVariant() {
2591
+ return /* @__PURE__ */ React11.createElement("div", { style: {
2592
+ width: "100%",
2593
+ height: "100%",
2594
+ flex: 1,
2595
+ display: "flex",
2596
+ flexDirection: "column",
2597
+ alignItems: "center",
2598
+ justifyContent: "center",
2599
+ gap: "12px",
2600
+ padding: "20px",
2601
+ boxSizing: "border-box",
2602
+ backgroundColor: colorScales.teal["050"],
2603
+ borderRadius: borderRadius.md
2604
+ } }, /* @__PURE__ */ React11.createElement(PlaceholderRadar, { size: 220, name: (politician == null ? void 0 : politician.full_name) || "" }), /* @__PURE__ */ React11.createElement("p", { style: {
2605
+ margin: 0,
2606
+ fontSize: fontSizes.sm,
2607
+ color: colors.textMuted,
2608
+ textAlign: "center",
2609
+ lineHeight: 1.4,
2610
+ fontFamily: fonts.primary
2611
+ } }, "Calibrate your compass to see how you align with ", (politician == null ? void 0 : politician.full_name) || "this official"), /* @__PURE__ */ React11.createElement(
2612
+ "button",
2613
+ {
2614
+ type: "button",
2615
+ onClick: onBuildCompass || void 0,
2616
+ onMouseEnter: () => setEmptyCtaHovered(true),
2617
+ onMouseLeave: () => setEmptyCtaHovered(false),
2618
+ style: {
2619
+ minWidth: "180px",
2620
+ height: "44px",
2621
+ padding: "0 20px",
2622
+ backgroundColor: emptyCtaHovered ? semanticTokens.light.buttonPrimary.background.hovered : semanticTokens.light.buttonPrimary.background.default,
2623
+ color: colors.textWhite,
2624
+ fontSize: fontSizes.sm,
2625
+ fontWeight: fontWeights.semibold,
2626
+ fontFamily: fonts.primary,
2627
+ borderRadius: borderRadius.full,
2628
+ border: "none",
2629
+ cursor: onBuildCompass ? "pointer" : "default",
2630
+ transition: `background ${duration.normal} ease`
2631
+ }
2632
+ },
2633
+ "Calibrate your compass"
2634
+ ));
2635
+ }
2636
+ function renderUnavailablePlate(message) {
2637
+ return /* @__PURE__ */ React11.createElement("div", { style: {
2638
+ width: "100%",
2639
+ height: "100%",
2640
+ flex: 1,
2641
+ backgroundColor: colorScales.teal["050"],
2642
+ borderRadius: borderRadius.md,
2643
+ display: "flex",
2644
+ alignItems: "center",
2645
+ justifyContent: "center",
2646
+ padding: spacing[6],
2647
+ boxSizing: "border-box"
2648
+ } }, /* @__PURE__ */ React11.createElement("p", { style: {
2649
+ fontSize: fontSizes.base,
2650
+ fontWeight: fontWeights.semibold,
2651
+ lineHeight: 1.4,
2652
+ color: colors.textMuted,
2653
+ textAlign: "center",
2654
+ margin: 0,
2655
+ fontFamily: fonts.primary
2656
+ } }, message));
2657
+ }
2658
+ function renderSlotContent() {
2659
+ if (view === "portrait") return renderPortrait();
2660
+ if (variant === "empty") return renderEmptyVariant();
2661
+ if (variant === "administrative" || variant === "judicial") {
2662
+ return renderUnavailablePlate("Compass currently unavailable for this role.");
2663
+ }
2664
+ if (variant === "no-stances") {
2665
+ return renderUnavailablePlate(`No compass stances on file for ${(politician == null ? void 0 : politician.full_name) || "this official"} yet.`);
2666
+ }
2667
+ return renderCompass();
2668
+ }
2669
+ return /* @__PURE__ */ React11.createElement(
2670
+ "div",
2671
+ {
2672
+ role: "article",
2673
+ "aria-label": `${politician.full_name}, ${politician.office_title || ""}`,
2674
+ tabIndex: 0,
2675
+ style: cardStyle,
2676
+ onClick,
2677
+ onKeyDown: (e) => {
2678
+ if (onClick && (e.key === "Enter" || e.key === " ")) {
2679
+ e.preventDefault();
2680
+ onClick();
2681
+ }
2682
+ },
2683
+ onMouseEnter: () => setHovered(true),
2684
+ onMouseLeave: () => setHovered(false),
2685
+ onFocus: () => setFocused(true),
2686
+ onBlur: () => setFocused(false)
2687
+ },
2688
+ /* @__PURE__ */ React11.createElement("div", { style: { padding: spacing[4], paddingBottom: spacing[3], display: "flex", alignItems: "stretch", gap: spacing[3], flexShrink: 0 } }, renderAvatar(), /* @__PURE__ */ React11.createElement("div", { style: { display: "flex", flexDirection: "column", gap: spacing[1], minWidth: 0, flex: 1 } }, /* @__PURE__ */ React11.createElement("p", { style: {
2689
+ fontFamily: fonts.primary,
2690
+ fontSize: fontSizes.xl,
2691
+ fontWeight: fontWeights.semibold,
2692
+ lineHeight: 1.3,
2693
+ color: colors.evMutedBlue,
2694
+ margin: 0
2695
+ } }, politician.full_name), /* @__PURE__ */ React11.createElement("p", { style: {
2696
+ fontFamily: fonts.primary,
2697
+ fontSize: fontSizes.sm,
2698
+ fontWeight: fontWeights.semibold,
2699
+ lineHeight: 1.4,
2700
+ color: colors.textSecondary,
2701
+ margin: 0
2702
+ } }, titleText || ""), politician.district_label && /* @__PURE__ */ React11.createElement("p", { style: {
2703
+ fontFamily: fonts.primary,
2704
+ fontSize: fontSizes.sm,
2705
+ fontWeight: fontWeights.regular,
2706
+ lineHeight: 1.5,
2707
+ color: colors.textMuted,
2708
+ margin: 0,
2709
+ overflow: "hidden",
2710
+ textOverflow: "ellipsis",
2711
+ whiteSpace: "nowrap"
2712
+ } }, politician.district_label), /* @__PURE__ */ React11.createElement("div", { style: { marginTop: "auto" } }, /* @__PURE__ */ React11.createElement(
2713
+ IconOverlay,
2714
+ {
2715
+ ballot: politician.ballot || null,
2716
+ hasStances: false,
2717
+ branch: politician.branch || null
2718
+ }
2719
+ )))),
2720
+ surface === "elections" && politician.withdrawn && /* @__PURE__ */ React11.createElement("div", { style: {
2721
+ margin: `0 ${spacing[4]} ${spacing[3]}`,
2722
+ backgroundColor: "rgba(120,0,0,0.85)",
2723
+ color: "#fff",
2724
+ fontSize: "12px",
2725
+ fontWeight: 700,
2726
+ letterSpacing: "0.4px",
2727
+ textAlign: "center",
2728
+ textTransform: "uppercase",
2729
+ padding: "6px 0",
2730
+ borderRadius: borderRadius.sm
2731
+ } }, "Withdrawn"),
2732
+ surface === "elections" && !politician.withdrawn && politician.running_unopposed && /* @__PURE__ */ React11.createElement("div", { style: {
2733
+ margin: `0 ${spacing[4]} ${spacing[3]}`,
2734
+ backgroundColor: "rgba(0,0,0,0.75)",
2735
+ color: "#fff",
2736
+ fontSize: "12px",
2737
+ fontWeight: 700,
2738
+ letterSpacing: "0.4px",
2739
+ textAlign: "center",
2740
+ textTransform: "uppercase",
2741
+ padding: "6px 0",
2742
+ borderRadius: borderRadius.sm
2743
+ } }, "Running Unopposed"),
2744
+ /* @__PURE__ */ React11.createElement("div", { style: {
2745
+ flex: 1,
2746
+ padding: spacing[4],
2747
+ paddingTop: 0,
2748
+ display: "flex",
2749
+ alignItems: "center",
2750
+ justifyContent: "center",
2751
+ position: "relative",
2752
+ minHeight: 0
2753
+ } }, renderSlotContent())
2754
+ );
2755
+ }
2756
+
2757
+ // src/CompassKey.jsx
2758
+ import React12, { useEffect as useEffect7, useState as useState7 } from "react";
2759
+
2760
+ // src/evContext.js
2761
+ var DEFAULT_BROKER_URL = "https://ev-context.empowered.vote/";
2762
+ var brokerUrl = DEFAULT_BROKER_URL;
2763
+ var iframe = null;
2764
+ var readyPromise = null;
2765
+ var pendingRequests = /* @__PURE__ */ new Map();
2766
+ var subscribers = /* @__PURE__ */ new Set();
2767
+ var lastValue = null;
2768
+ var nextRequestId = 1;
2769
+ function brokerOrigin() {
2770
+ try {
2771
+ return new URL(brokerUrl).origin;
2772
+ } catch {
2773
+ return "";
2774
+ }
2775
+ }
2776
+ function ensureMounted() {
2777
+ if (typeof window === "undefined" || typeof document === "undefined") return null;
2778
+ if (iframe) return iframe;
2779
+ iframe = document.createElement("iframe");
2780
+ iframe.src = brokerUrl;
2781
+ iframe.setAttribute("aria-hidden", "true");
2782
+ iframe.setAttribute("tabindex", "-1");
2783
+ iframe.style.position = "absolute";
2784
+ iframe.style.width = "1px";
2785
+ iframe.style.height = "1px";
2786
+ iframe.style.border = "0";
2787
+ iframe.style.opacity = "0";
2788
+ iframe.style.pointerEvents = "none";
2789
+ iframe.style.top = "-9999px";
2790
+ iframe.style.left = "-9999px";
2791
+ window.addEventListener("message", onMessage);
2792
+ (document.body || document.documentElement).appendChild(iframe);
2793
+ readyPromise = new Promise((resolve) => {
2794
+ const onReady = (e) => {
2795
+ if (e.origin !== brokerOrigin()) return;
2796
+ if (!e.data || e.data.type !== "ev-context:ready") return;
2797
+ window.removeEventListener("message", onReady);
2798
+ resolve();
2799
+ };
2800
+ window.addEventListener("message", onReady);
2801
+ iframe.addEventListener("load", () => {
2802
+ setTimeout(() => resolve(), 50);
2803
+ });
2804
+ });
2805
+ return iframe;
2806
+ }
2807
+ function onMessage(event) {
2808
+ var _a, _b, _c;
2809
+ if (event.origin !== brokerOrigin()) return;
2810
+ const data = event.data;
2811
+ if (!data || typeof data !== "object") return;
2812
+ if (data.type === "ev-context:value" || data.type === "ev-context:ack") {
2813
+ const id = data.requestId;
2814
+ if (id && pendingRequests.has(id)) {
2815
+ const { resolve, timeout } = pendingRequests.get(id);
2816
+ clearTimeout(timeout);
2817
+ pendingRequests.delete(id);
2818
+ resolve(data.type === "ev-context:value" ? (_a = data.value) != null ? _a : null : data.ok);
2819
+ }
2820
+ if (data.type === "ev-context:value") {
2821
+ lastValue = (_b = data.value) != null ? _b : null;
2822
+ notifySubscribers();
2823
+ }
2824
+ } else if (data.type === "ev-context:update") {
2825
+ lastValue = (_c = data.value) != null ? _c : null;
2826
+ notifySubscribers();
2827
+ }
2828
+ }
2829
+ function notifySubscribers() {
2830
+ for (const fn of subscribers) {
2831
+ try {
2832
+ fn(lastValue);
2833
+ } catch {
2834
+ }
2835
+ }
2836
+ }
2837
+ function send(message, { expectReply = true, timeoutMs = 4e3 } = {}) {
2838
+ ensureMounted();
2839
+ return readyPromise.then(() => new Promise((resolve, reject) => {
2840
+ if (!iframe || !iframe.contentWindow) {
2841
+ reject(new Error("evContext broker iframe not ready"));
2842
+ return;
2843
+ }
2844
+ const requestId = expectReply ? `req-${nextRequestId++}` : void 0;
2845
+ if (expectReply) {
2846
+ const timeout = setTimeout(() => {
2847
+ pendingRequests.delete(requestId);
2848
+ reject(new Error("evContext request timed out"));
2849
+ }, timeoutMs);
2850
+ pendingRequests.set(requestId, { resolve, reject, timeout });
2851
+ }
2852
+ try {
2853
+ iframe.contentWindow.postMessage({ ...message, requestId }, brokerOrigin());
2854
+ if (!expectReply) resolve(true);
2855
+ } catch (err) {
2856
+ if (expectReply) {
2857
+ const entry = pendingRequests.get(requestId);
2858
+ if (entry) {
2859
+ clearTimeout(entry.timeout);
2860
+ pendingRequests.delete(requestId);
2861
+ }
2862
+ }
2863
+ reject(err);
2864
+ }
2865
+ }));
2866
+ }
2867
+ var evContext = {
2868
+ /**
2869
+ * Override the broker URL. Call once at app startup before any get/set.
2870
+ * Defaults to https://ev-context.empowered.vote/ for prod.
2871
+ */
2872
+ configure({ brokerUrl: url } = {}) {
2873
+ if (url) brokerUrl = url;
2874
+ },
2875
+ /** Mount the iframe immediately (optional — get/set will mount lazily). */
2876
+ preload() {
2877
+ ensureMounted();
2878
+ return readyPromise;
2879
+ },
2880
+ /** Read the current shared context. Resolves to the stored value or null. */
2881
+ async get() {
2882
+ return send({ type: "ev-context:get" });
2883
+ },
2884
+ /** Overwrite the shared context. */
2885
+ async set(value) {
2886
+ return send({ type: "ev-context:set", value });
2887
+ },
2888
+ /** Clear the shared context. */
2889
+ async clear() {
2890
+ return send({ type: "ev-context:clear" });
2891
+ },
2892
+ /**
2893
+ * Subscribe to live updates. Fires when this tab or any other tab
2894
+ * (any subdomain) writes to the store. Returns an unsubscribe function.
2895
+ */
2896
+ subscribe(fn) {
2897
+ subscribers.add(fn);
2898
+ send({ type: "ev-context:subscribe" }).then((value) => {
2899
+ lastValue = value != null ? value : lastValue;
2900
+ try {
2901
+ fn(lastValue);
2902
+ } catch {
2903
+ }
2904
+ }).catch(() => {
2905
+ });
2906
+ return () => {
2907
+ subscribers.delete(fn);
2908
+ };
2909
+ }
2910
+ };
2911
+
2912
+ // src/CompassKey.jsx
2913
+ function CompassKey({ compact = false } = {}) {
2914
+ const [dismissed, setDismissed] = useState7(false);
2915
+ const [loaded, setLoaded] = useState7(false);
2916
+ useEffect7(() => {
2917
+ let cancelled = false;
2918
+ evContext.get().then((shared) => {
2919
+ if (cancelled) return;
2920
+ setDismissed(Boolean(shared == null ? void 0 : shared.compassKeyDismissed));
2921
+ setLoaded(true);
2922
+ }).catch(() => {
2923
+ if (!cancelled) setLoaded(true);
2924
+ });
2925
+ return () => {
2926
+ cancelled = true;
2927
+ };
2928
+ }, []);
2929
+ function persistDismissed(value) {
2930
+ evContext.get().then((current) => {
2931
+ const next = { ...current || {}, compassKeyDismissed: value };
2932
+ evContext.set(next).catch(() => {
2933
+ });
2934
+ }).catch(() => {
2935
+ });
2936
+ }
2937
+ function handleDismiss() {
2938
+ setDismissed(true);
2939
+ persistDismissed(true);
2940
+ }
2941
+ function handleReopen() {
2942
+ setDismissed(false);
2943
+ persistDismissed(false);
2944
+ }
2945
+ if (!loaded) return null;
2946
+ const Swatch = ({ color, label, ring }) => /* @__PURE__ */ React12.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: spacing[1] } }, /* @__PURE__ */ React12.createElement("span", { style: {
2947
+ display: "inline-block",
2948
+ width: 12,
2949
+ height: 12,
2950
+ borderRadius: "50%",
2951
+ background: color,
2952
+ border: `2px solid ${ring || "#fff"}`,
2953
+ boxShadow: "0 0 0 1px rgba(0,0,0,0.08)"
2954
+ } }), /* @__PURE__ */ React12.createElement("span", { style: { fontSize: fontSizes.xs, color: colors.textSecondary, fontFamily: fonts.primary } }, label));
2955
+ if (dismissed) {
2956
+ return /* @__PURE__ */ React12.createElement(
2957
+ "button",
2958
+ {
2959
+ type: "button",
2960
+ onClick: handleReopen,
2961
+ "aria-label": "Show compass legend",
2962
+ style: {
2963
+ display: "inline-flex",
2964
+ alignItems: "center",
2965
+ gap: spacing[1],
2966
+ padding: "4px 10px",
2967
+ borderRadius: borderRadius.full,
2968
+ background: "transparent",
2969
+ border: `1px solid ${colors.borderLight}`,
2970
+ color: colors.textMuted,
2971
+ fontFamily: fonts.primary,
2972
+ fontSize: fontSizes.xs,
2973
+ fontWeight: fontWeights.semibold,
2974
+ cursor: "pointer"
2975
+ }
2976
+ },
2977
+ /* @__PURE__ */ React12.createElement("span", { "aria-hidden": "true" }, "?"),
2978
+ " Compass key"
2979
+ );
2980
+ }
2981
+ return /* @__PURE__ */ React12.createElement(
2982
+ "div",
2983
+ {
2984
+ role: "region",
2985
+ "aria-label": "Compass legend",
2986
+ style: {
2987
+ display: "inline-flex",
2988
+ alignItems: "center",
2989
+ flexWrap: "wrap",
2990
+ gap: compact ? spacing[2] : spacing[3],
2991
+ padding: compact ? `${spacing[1]} ${spacing[2]}` : `${spacing[2]} ${spacing[3]}`,
2992
+ background: "#fff",
2993
+ border: `1px solid ${colors.borderLight}`,
2994
+ borderRadius: borderRadius.md,
2995
+ fontFamily: fonts.primary,
2996
+ maxWidth: "100%",
2997
+ boxSizing: "border-box"
2998
+ }
2999
+ },
3000
+ !compact && /* @__PURE__ */ React12.createElement("span", { style: {
3001
+ fontSize: fontSizes.xs,
3002
+ fontWeight: fontWeights.semibold,
3003
+ color: colors.textMuted,
3004
+ textTransform: "uppercase",
3005
+ letterSpacing: "0.5px"
3006
+ } }, "Compass key"),
3007
+ /* @__PURE__ */ React12.createElement(Swatch, { color: "#7C6B9E", label: "You" }),
3008
+ /* @__PURE__ */ React12.createElement(Swatch, { color: "#5A9A6E", label: "Politician" }),
3009
+ /* @__PURE__ */ React12.createElement(Swatch, { color: "#fed12e", label: "Match" }),
3010
+ /* @__PURE__ */ React12.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: spacing[1] } }, /* @__PURE__ */ React12.createElement("span", { style: {
3011
+ fontSize: fontSizes.xs,
3012
+ fontWeight: fontWeights.semibold,
3013
+ color: "#9ca3af",
3014
+ fontFamily: fonts.primary,
3015
+ textDecoration: "underline",
3016
+ textDecorationStyle: "dashed",
3017
+ textUnderlineOffset: "3px"
3018
+ } }, "Topic"), /* @__PURE__ */ React12.createElement("span", { style: { fontSize: fontSizes.xs, color: colors.textSecondary, fontFamily: fonts.primary } }, "= no stance")),
3019
+ /* @__PURE__ */ React12.createElement(
3020
+ "button",
3021
+ {
3022
+ type: "button",
3023
+ onClick: handleDismiss,
3024
+ "aria-label": "Hide compass legend",
3025
+ style: {
3026
+ marginLeft: spacing[2],
3027
+ padding: "2px 6px",
3028
+ border: "none",
3029
+ background: "transparent",
3030
+ color: colors.textMuted,
3031
+ fontSize: "16px",
3032
+ lineHeight: 1,
3033
+ cursor: "pointer"
3034
+ }
3035
+ },
3036
+ "\xD7"
3037
+ )
3038
+ );
3039
+ }
3040
+
2369
3041
  // src/CategorySection.jsx
2370
- import React11, { useState as useState6 } from "react";
3042
+ import React13, { useState as useState8 } from "react";
2371
3043
  function CategorySection({
2372
3044
  title,
2373
3045
  infoTooltip,
@@ -2377,7 +3049,7 @@ function CategorySection({
2377
3049
  tier
2378
3050
  }) {
2379
3051
  var _a, _b;
2380
- const [showTooltip, setShowTooltip] = useState6(false);
3052
+ const [showTooltip, setShowTooltip] = useState8(false);
2381
3053
  const tierStyle = tier ? tierColors[tier] : null;
2382
3054
  const styles2 = {
2383
3055
  section: {
@@ -2445,7 +3117,7 @@ function CategorySection({
2445
3117
  gap: spacing[4]
2446
3118
  }
2447
3119
  };
2448
- return /* @__PURE__ */ React11.createElement("section", { style: styles2.section, className: "ev-category-section" }, /* @__PURE__ */ React11.createElement("div", { style: styles2.header }, /* @__PURE__ */ React11.createElement("span", { style: styles2.titlePill }, title), infoTooltip && /* @__PURE__ */ React11.createElement(
3120
+ return /* @__PURE__ */ React13.createElement("section", { style: styles2.section, className: "ev-category-section" }, /* @__PURE__ */ React13.createElement("div", { style: styles2.header }, /* @__PURE__ */ React13.createElement("span", { style: styles2.titlePill }, title), infoTooltip && /* @__PURE__ */ React13.createElement(
2449
3121
  "button",
2450
3122
  {
2451
3123
  type: "button",
@@ -2457,8 +3129,8 @@ function CategorySection({
2457
3129
  "aria-label": `Info about ${title}`
2458
3130
  },
2459
3131
  "i",
2460
- showTooltip && /* @__PURE__ */ React11.createElement("div", { style: styles2.tooltip, role: "tooltip" }, infoTooltip)
2461
- ), websiteUrl && /* @__PURE__ */ React11.createElement(
3132
+ showTooltip && /* @__PURE__ */ React13.createElement("div", { style: styles2.tooltip, role: "tooltip" }, infoTooltip)
3133
+ ), websiteUrl && /* @__PURE__ */ React13.createElement(
2462
3134
  "a",
2463
3135
  {
2464
3136
  href: websiteUrl,
@@ -2467,7 +3139,7 @@ function CategorySection({
2467
3139
  style: styles2.externalLink,
2468
3140
  "aria-label": `Visit official website for ${title}`
2469
3141
  },
2470
- /* @__PURE__ */ React11.createElement(
3142
+ /* @__PURE__ */ React13.createElement(
2471
3143
  "svg",
2472
3144
  {
2473
3145
  viewBox: "0 0 24 24",
@@ -2475,7 +3147,7 @@ function CategorySection({
2475
3147
  xmlns: "http://www.w3.org/2000/svg",
2476
3148
  style: { width: "14px", height: "14px" }
2477
3149
  },
2478
- /* @__PURE__ */ React11.createElement(
3150
+ /* @__PURE__ */ React13.createElement(
2479
3151
  "path",
2480
3152
  {
2481
3153
  d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",
@@ -2486,12 +3158,12 @@ function CategorySection({
2486
3158
  }
2487
3159
  )
2488
3160
  )
2489
- )), /* @__PURE__ */ React11.createElement("div", { style: styles2.grid, className: "ev-category-grid" }, children));
3161
+ )), /* @__PURE__ */ React13.createElement("div", { style: styles2.grid, className: "ev-category-grid" }, children));
2490
3162
  }
2491
3163
 
2492
3164
  // src/SubGroupSection.jsx
2493
- import React12 from "react";
2494
- function SubGroupSection({ title, websiteUrl, children }) {
3165
+ import React14 from "react";
3166
+ function SubGroupSection({ title, websiteUrl, children, gridTemplateColumns, gap, justifyContent }) {
2495
3167
  const styles2 = {
2496
3168
  section: {
2497
3169
  marginBottom: spacing[4]
@@ -2519,11 +3191,13 @@ function SubGroupSection({ title, websiteUrl, children }) {
2519
3191
  },
2520
3192
  grid: {
2521
3193
  display: "grid",
2522
- gridTemplateColumns: "repeat(auto-fill, minmax(min(250px, 100%), 1fr))",
2523
- gap: spacing[2]
3194
+ gridTemplateColumns: gridTemplateColumns || "repeat(auto-fill, minmax(min(250px, 100%), 1fr))",
3195
+ gap: gap || spacing[2],
3196
+ justifyContent: justifyContent || void 0,
3197
+ width: "100%"
2524
3198
  }
2525
3199
  };
2526
- return /* @__PURE__ */ React12.createElement("div", { style: styles2.section }, title && /* @__PURE__ */ React12.createElement("div", { style: styles2.header }, /* @__PURE__ */ React12.createElement("span", { style: styles2.label }, title), websiteUrl && /* @__PURE__ */ React12.createElement(
3200
+ return /* @__PURE__ */ React14.createElement("div", { style: styles2.section }, title && /* @__PURE__ */ React14.createElement("div", { style: styles2.header }, /* @__PURE__ */ React14.createElement("span", { style: styles2.label }, title), websiteUrl && /* @__PURE__ */ React14.createElement(
2527
3201
  "a",
2528
3202
  {
2529
3203
  href: websiteUrl,
@@ -2531,12 +3205,12 @@ function SubGroupSection({ title, websiteUrl, children }) {
2531
3205
  rel: "noopener noreferrer",
2532
3206
  style: styles2.link
2533
3207
  },
2534
- /* @__PURE__ */ React12.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: "12px", height: "12px" } }, /* @__PURE__ */ React12.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React12.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" }))
2535
- )), /* @__PURE__ */ React12.createElement("div", { style: styles2.grid, className: "ev-subgroup-grid" }, children));
3208
+ /* @__PURE__ */ React14.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: "12px", height: "12px" } }, /* @__PURE__ */ React14.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React14.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" }))
3209
+ )), /* @__PURE__ */ React14.createElement("div", { style: styles2.grid, className: "ev-subgroup-grid" }, children));
2536
3210
  }
2537
3211
 
2538
3212
  // src/GovernmentBodySection.jsx
2539
- import React13, { useState as useState7 } from "react";
3213
+ import React15, { useState as useState9 } from "react";
2540
3214
  function GovernmentBodySection({
2541
3215
  title,
2542
3216
  websiteUrl,
@@ -2545,7 +3219,7 @@ function GovernmentBodySection({
2545
3219
  children
2546
3220
  }) {
2547
3221
  var _a;
2548
- const [expanded, setExpanded] = useState7(defaultExpanded);
3222
+ const [expanded, setExpanded] = useState9(defaultExpanded);
2549
3223
  const tierStyle = tier ? tierColors[tier] : null;
2550
3224
  const accentColor = (_a = tierStyle == null ? void 0 : tierStyle.accent) != null ? _a : colors.borderMedium;
2551
3225
  const styles2 = {
@@ -2585,7 +3259,7 @@ function GovernmentBodySection({
2585
3259
  display: expanded ? "block" : "none"
2586
3260
  }
2587
3261
  };
2588
- return /* @__PURE__ */ React13.createElement("section", { style: styles2.section, className: "ev-gov-body-section" }, /* @__PURE__ */ React13.createElement(
3262
+ return /* @__PURE__ */ React15.createElement("section", { style: styles2.section, className: "ev-gov-body-section" }, /* @__PURE__ */ React15.createElement(
2589
3263
  "div",
2590
3264
  {
2591
3265
  style: styles2.header,
@@ -2601,8 +3275,8 @@ function GovernmentBodySection({
2601
3275
  "aria-expanded": expanded,
2602
3276
  "aria-label": `${expanded ? "Collapse" : "Expand"} ${title}`
2603
3277
  },
2604
- /* @__PURE__ */ React13.createElement("span", { style: styles2.title }, title),
2605
- websiteUrl && /* @__PURE__ */ React13.createElement(
3278
+ /* @__PURE__ */ React15.createElement("span", { style: styles2.title }, title),
3279
+ websiteUrl && /* @__PURE__ */ React15.createElement(
2606
3280
  "a",
2607
3281
  {
2608
3282
  href: websiteUrl,
@@ -2612,14 +3286,14 @@ function GovernmentBodySection({
2612
3286
  onClick: (e) => e.stopPropagation(),
2613
3287
  "aria-label": `Visit ${title} website`
2614
3288
  },
2615
- /* @__PURE__ */ React13.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: "14px", height: "14px" } }, /* @__PURE__ */ React13.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React13.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" }))
3289
+ /* @__PURE__ */ React15.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: "14px", height: "14px" } }, /* @__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" }))
2616
3290
  ),
2617
- /* @__PURE__ */ React13.createElement("span", { style: styles2.toggle, "aria-hidden": "true" }, "\u25BC")
2618
- ), /* @__PURE__ */ React13.createElement("div", { style: styles2.content }, children));
3291
+ /* @__PURE__ */ React15.createElement("span", { style: styles2.toggle, "aria-hidden": "true" }, "\u25BC")
3292
+ ), /* @__PURE__ */ React15.createElement("div", { style: styles2.content }, children));
2619
3293
  }
2620
3294
 
2621
3295
  // src/SocialLinks.jsx
2622
- import React14 from "react";
3296
+ import React16 from "react";
2623
3297
  var SOCIAL_PLATFORMS = [
2624
3298
  { test: /facebook\.com/i, platform: "facebook" },
2625
3299
  { test: /twitter\.com|x\.com/i, platform: "twitter" },
@@ -2690,7 +3364,7 @@ function SocialLinks({
2690
3364
  }
2691
3365
  };
2692
3366
  const platformIconMap = {
2693
- twitter: /* @__PURE__ */ React14.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React14.createElement(
3367
+ twitter: /* @__PURE__ */ React16.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React16.createElement(
2694
3368
  "path",
2695
3369
  {
2696
3370
  d: "M4 4L10.5 12.5M20 20L13.5 11.5M10.5 12.5L4 20H8L13.5 11.5M10.5 12.5L16 4H20L13.5 11.5",
@@ -2700,7 +3374,7 @@ function SocialLinks({
2700
3374
  strokeLinejoin: "round"
2701
3375
  }
2702
3376
  )),
2703
- facebook: /* @__PURE__ */ React14.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React14.createElement(
3377
+ facebook: /* @__PURE__ */ React16.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React16.createElement(
2704
3378
  "path",
2705
3379
  {
2706
3380
  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",
@@ -2710,8 +3384,8 @@ function SocialLinks({
2710
3384
  strokeLinejoin: "round"
2711
3385
  }
2712
3386
  )),
2713
- instagram: /* @__PURE__ */ React14.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React14.createElement("rect", { x: "2", y: "2", width: "20", height: "20", rx: "5", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React14.createElement("circle", { cx: "12", cy: "12", r: "4", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React14.createElement("circle", { cx: "18", cy: "6", r: "1", fill: "currentColor" })),
2714
- linkedin: /* @__PURE__ */ React14.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React14.createElement(
3387
+ instagram: /* @__PURE__ */ React16.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React16.createElement("rect", { x: "2", y: "2", width: "20", height: "20", rx: "5", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React16.createElement("circle", { cx: "12", cy: "12", r: "4", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React16.createElement("circle", { cx: "18", cy: "6", r: "1", fill: "currentColor" })),
3388
+ linkedin: /* @__PURE__ */ React16.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React16.createElement(
2715
3389
  "path",
2716
3390
  {
2717
3391
  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",
@@ -2720,8 +3394,8 @@ function SocialLinks({
2720
3394
  strokeLinecap: "round",
2721
3395
  strokeLinejoin: "round"
2722
3396
  }
2723
- ), /* @__PURE__ */ React14.createElement("rect", { x: "2", y: "9", width: "4", height: "12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ React14.createElement("circle", { cx: "4", cy: "4", r: "2", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })),
2724
- youtube: /* @__PURE__ */ React14.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React14.createElement("rect", { x: "2", y: "5", width: "20", height: "14", rx: "3", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React14.createElement("polygon", { points: "10,9 16,12 10,15", fill: "currentColor" }))
3397
+ ), /* @__PURE__ */ React16.createElement("rect", { x: "2", y: "9", width: "4", height: "12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ React16.createElement("circle", { cx: "4", cy: "4", r: "2", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })),
3398
+ youtube: /* @__PURE__ */ React16.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React16.createElement("rect", { x: "2", y: "5", width: "20", height: "14", rx: "3", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React16.createElement("polygon", { points: "10,9 16,12 10,15", fill: "currentColor" }))
2725
3399
  };
2726
3400
  const links = [
2727
3401
  {
@@ -2747,7 +3421,7 @@ function SocialLinks({
2747
3421
  {
2748
3422
  href: website,
2749
3423
  label: "Website",
2750
- icon: /* @__PURE__ */ React14.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React14.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React14.createElement(
3424
+ icon: /* @__PURE__ */ React16.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React16.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React16.createElement(
2751
3425
  "path",
2752
3426
  {
2753
3427
  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",
@@ -2777,7 +3451,7 @@ function SocialLinks({
2777
3451
  if (links.length === 0) {
2778
3452
  return null;
2779
3453
  }
2780
- return /* @__PURE__ */ React14.createElement("div", { style: styles2.container, className: "ev-social-links" }, links.map((link) => /* @__PURE__ */ React14.createElement(
3454
+ return /* @__PURE__ */ React16.createElement("div", { style: styles2.container, className: "ev-social-links" }, links.map((link) => /* @__PURE__ */ React16.createElement(
2781
3455
  "a",
2782
3456
  {
2783
3457
  key: link.label,
@@ -2800,7 +3474,7 @@ function SocialLinks({
2800
3474
  }
2801
3475
 
2802
3476
  // src/IssueTags.jsx
2803
- import React15 from "react";
3477
+ import React17 from "react";
2804
3478
  function IssueTags({
2805
3479
  tags = [],
2806
3480
  selectedTags = [],
@@ -2843,9 +3517,9 @@ function IssueTags({
2843
3517
  onTagClick(tag.value);
2844
3518
  }
2845
3519
  };
2846
- return /* @__PURE__ */ React15.createElement("div", { style: styles2.container, className: "ev-issue-tags", role: "list" }, tags.map((tag) => {
3520
+ return /* @__PURE__ */ React17.createElement("div", { style: styles2.container, className: "ev-issue-tags", role: "list" }, tags.map((tag) => {
2847
3521
  const isSelected = selectedTags.includes(tag.value);
2848
- return /* @__PURE__ */ React15.createElement(
3522
+ return /* @__PURE__ */ React17.createElement(
2849
3523
  "span",
2850
3524
  {
2851
3525
  key: tag.value,
@@ -2874,7 +3548,7 @@ function IssueTags({
2874
3548
  }
2875
3549
 
2876
3550
  // src/CommitteeTable.jsx
2877
- import React16, { useState as useState8 } from "react";
3551
+ import React18, { useState as useState10 } from "react";
2878
3552
  var ROLE_ORDER = {
2879
3553
  "chair": 0,
2880
3554
  "co-chair": 1,
@@ -2901,7 +3575,7 @@ function CommitteeTable({
2901
3575
  maxVisible = 6,
2902
3576
  style = {}
2903
3577
  }) {
2904
- const [showAll, setShowAll] = useState8(false);
3578
+ const [showAll, setShowAll] = useState10(false);
2905
3579
  if (committees.length === 0) {
2906
3580
  return null;
2907
3581
  }
@@ -2963,7 +3637,7 @@ function CommitteeTable({
2963
3637
  cursor: "pointer"
2964
3638
  }
2965
3639
  };
2966
- return /* @__PURE__ */ React16.createElement("div", { style: styles2.container, className: "ev-committee-table" }, /* @__PURE__ */ React16.createElement("h4", { style: styles2.heading }, /* @__PURE__ */ React16.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React16.createElement("path", { d: "M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2" }), /* @__PURE__ */ React16.createElement("circle", { cx: "9", cy: "7", r: "4" }), /* @__PURE__ */ React16.createElement("path", { d: "M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75" })), title), /* @__PURE__ */ React16.createElement("table", { style: styles2.table }, /* @__PURE__ */ React16.createElement("tbody", null, visible.map((committee, index) => /* @__PURE__ */ React16.createElement("tr", { key: index, style: styles2.row }, /* @__PURE__ */ React16.createElement("td", { style: { ...styles2.cell, ...styles2.nameCell } }, committee.url ? /* @__PURE__ */ React16.createElement(
3640
+ return /* @__PURE__ */ React18.createElement("div", { style: styles2.container, className: "ev-committee-table" }, /* @__PURE__ */ React18.createElement("h4", { style: styles2.heading }, /* @__PURE__ */ React18.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React18.createElement("path", { d: "M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2" }), /* @__PURE__ */ React18.createElement("circle", { cx: "9", cy: "7", r: "4" }), /* @__PURE__ */ React18.createElement("path", { d: "M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75" })), title), /* @__PURE__ */ React18.createElement("table", { style: styles2.table }, /* @__PURE__ */ React18.createElement("tbody", null, visible.map((committee, index) => /* @__PURE__ */ React18.createElement("tr", { key: index, style: styles2.row }, /* @__PURE__ */ React18.createElement("td", { style: { ...styles2.cell, ...styles2.nameCell } }, committee.url ? /* @__PURE__ */ React18.createElement(
2967
3641
  "a",
2968
3642
  {
2969
3643
  href: committee.url,
@@ -2978,7 +3652,7 @@ function CommitteeTable({
2978
3652
  }
2979
3653
  },
2980
3654
  committee.name
2981
- ) : committee.name), /* @__PURE__ */ React16.createElement("td", { style: { ...styles2.cell, ...styles2.positionCell } }, formatPosition(committee.position)))))), hasMore && /* @__PURE__ */ React16.createElement(
3655
+ ) : committee.name), /* @__PURE__ */ React18.createElement("td", { style: { ...styles2.cell, ...styles2.positionCell } }, formatPosition(committee.position)))))), hasMore && /* @__PURE__ */ React18.createElement(
2982
3656
  "button",
2983
3657
  {
2984
3658
  type: "button",
@@ -2986,7 +3660,7 @@ function CommitteeTable({
2986
3660
  onClick: () => setShowAll(!showAll)
2987
3661
  },
2988
3662
  showAll ? "Show less" : `Show all ${sorted.length} committees`,
2989
- /* @__PURE__ */ React16.createElement(
3663
+ /* @__PURE__ */ React18.createElement(
2990
3664
  "svg",
2991
3665
  {
2992
3666
  width: "14",
@@ -2999,16 +3673,16 @@ function CommitteeTable({
2999
3673
  strokeLinejoin: "round",
3000
3674
  style: { transform: showAll ? "rotate(180deg)" : "none", transition: "transform 0.2s" }
3001
3675
  },
3002
- /* @__PURE__ */ React16.createElement("polyline", { points: "6 9 12 15 18 9" })
3676
+ /* @__PURE__ */ React18.createElement("polyline", { points: "6 9 12 15 18 9" })
3003
3677
  )
3004
3678
  ));
3005
3679
  }
3006
3680
 
3007
3681
  // src/PoliticianProfile.jsx
3008
- import React19, { useState as useState9, useEffect as useEffect6 } from "react";
3682
+ import React21, { useState as useState11, useEffect as useEffect8 } from "react";
3009
3683
 
3010
3684
  // src/LegislativeInlineSummary.jsx
3011
- import React17 from "react";
3685
+ import React19 from "react";
3012
3686
  function normalizePosition(pos) {
3013
3687
  if (!pos) return "";
3014
3688
  return pos.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
@@ -3116,7 +3790,7 @@ function LegislativeInlineSummary({ summary, politicianId, onNavigateToRecord })
3116
3790
  fontSize: fontSizes.sm,
3117
3791
  fontWeight: fontWeights.medium
3118
3792
  };
3119
- return /* @__PURE__ */ React17.createElement("div", { style: card }, stats.length > 0 && /* @__PURE__ */ React17.createElement("div", { style: statsRow }, stats.map((s, i) => /* @__PURE__ */ React17.createElement("div", { key: i, style: statItem }, /* @__PURE__ */ React17.createElement("span", { style: statValue }, s.value), s.label && /* @__PURE__ */ React17.createElement("span", { style: statLabel }, s.label)))), mostRecentAction && /* @__PURE__ */ React17.createElement("div", { style: actionLine, title: mostRecentAction }, mostRecentAction), /* @__PURE__ */ React17.createElement("div", null), /* @__PURE__ */ React17.createElement("div", { style: footerRow }, /* @__PURE__ */ React17.createElement(
3793
+ return /* @__PURE__ */ React19.createElement("div", { style: card }, stats.length > 0 && /* @__PURE__ */ React19.createElement("div", { style: statsRow }, stats.map((s, i) => /* @__PURE__ */ React19.createElement("div", { key: i, style: statItem }, /* @__PURE__ */ React19.createElement("span", { style: statValue }, s.value), s.label && /* @__PURE__ */ React19.createElement("span", { style: statLabel }, s.label)))), mostRecentAction && /* @__PURE__ */ React19.createElement("div", { style: actionLine, title: mostRecentAction }, mostRecentAction), /* @__PURE__ */ React19.createElement("div", null), /* @__PURE__ */ React19.createElement("div", { style: footerRow }, /* @__PURE__ */ React19.createElement(
3120
3794
  "button",
3121
3795
  {
3122
3796
  onClick: () => {
@@ -3141,12 +3815,12 @@ function LegislativeInlineSummary({ summary, politicianId, onNavigateToRecord })
3141
3815
  }
3142
3816
  },
3143
3817
  "View Full Legislative Record",
3144
- /* @__PURE__ */ React17.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__ */ React17.createElement("path", { d: "M9 18l6-6-6-6" }))
3818
+ /* @__PURE__ */ React19.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__ */ React19.createElement("path", { d: "M9 18l6-6-6-6" }))
3145
3819
  )));
3146
3820
  }
3147
3821
 
3148
3822
  // src/JudicialScorecard.jsx
3149
- import React18 from "react";
3823
+ import React20 from "react";
3150
3824
 
3151
3825
  // src/judicialUtils.js
3152
3826
  function formatDate(dateStr) {
@@ -3264,7 +3938,7 @@ function JudicialScorecard({ judicialRecord, politicianId, onNavigateToRecord })
3264
3938
  onNavigateToRecord(`/politician/${politicianId}/judicial-record`);
3265
3939
  }
3266
3940
  };
3267
- return /* @__PURE__ */ React18.createElement("section", { style: sectionStyle }, /* @__PURE__ */ React18.createElement("h3", { style: headingStyle }, "Judicial Record"), evaluations.length > 0 && /* @__PURE__ */ React18.createElement("div", { style: { marginBottom: "16px" } }, evaluations.slice(0, 3).map((ev, i) => /* @__PURE__ */ React18.createElement("span", { key: i, style: evalChipStyle }, ev.rating, /* @__PURE__ */ React18.createElement("span", { style: { fontWeight: 400, color: "#4a90a4", fontSize: "11px" } }, "\u2014 ", ev.source)))), metrics.length > 0 && /* @__PURE__ */ React18.createElement("div", { style: cardGridStyle }, metrics.slice(0, 4).map((m, i) => /* @__PURE__ */ React18.createElement("div", { key: i, style: metricCardStyle }, /* @__PURE__ */ React18.createElement("div", { style: metricLabelStyle }, METRIC_LABELS[m.metric_type] || m.metric_type.replace(/_/g, " ")), /* @__PURE__ */ React18.createElement("div", { style: metricValueStyle }, formatMetricValue(m.metric_type, m.value)), m.context_label && /* @__PURE__ */ React18.createElement("div", { style: metricContextStyle }, m.context_label)))), disciplinary.length > 0 && /* @__PURE__ */ React18.createElement("div", { style: { marginBottom: "12px" } }, disciplinary.slice(0, 2).map((d, i) => /* @__PURE__ */ React18.createElement("div", { key: i, style: disciplinaryStyle }, /* @__PURE__ */ React18.createElement("strong", null, d.record_type), " \u2014 ", formatDate(d.record_date), d.description && /* @__PURE__ */ React18.createElement("div", { style: { marginTop: "4px" } }, d.description)))), /* @__PURE__ */ React18.createElement("a", { href: `/politician/${politicianId}/judicial-record`, onClick: handleNavigate, style: linkStyle }, "View Full Judicial Record \u2192"));
3941
+ return /* @__PURE__ */ React20.createElement("section", { style: sectionStyle }, /* @__PURE__ */ React20.createElement("h3", { style: headingStyle }, "Judicial Record"), evaluations.length > 0 && /* @__PURE__ */ React20.createElement("div", { style: { marginBottom: "16px" } }, evaluations.slice(0, 3).map((ev, i) => /* @__PURE__ */ React20.createElement("span", { key: i, style: evalChipStyle }, ev.rating, /* @__PURE__ */ React20.createElement("span", { style: { fontWeight: 400, color: "#4a90a4", fontSize: "11px" } }, "\u2014 ", ev.source)))), metrics.length > 0 && /* @__PURE__ */ React20.createElement("div", { style: cardGridStyle }, metrics.slice(0, 4).map((m, i) => /* @__PURE__ */ React20.createElement("div", { key: i, style: metricCardStyle }, /* @__PURE__ */ React20.createElement("div", { style: metricLabelStyle }, METRIC_LABELS[m.metric_type] || m.metric_type.replace(/_/g, " ")), /* @__PURE__ */ React20.createElement("div", { style: metricValueStyle }, formatMetricValue(m.metric_type, m.value)), m.context_label && /* @__PURE__ */ React20.createElement("div", { style: metricContextStyle }, m.context_label)))), disciplinary.length > 0 && /* @__PURE__ */ React20.createElement("div", { style: { marginBottom: "12px" } }, disciplinary.slice(0, 2).map((d, i) => /* @__PURE__ */ React20.createElement("div", { key: i, style: disciplinaryStyle }, /* @__PURE__ */ React20.createElement("strong", null, d.record_type), " \u2014 ", formatDate(d.record_date), d.description && /* @__PURE__ */ React20.createElement("div", { style: { marginTop: "4px" } }, d.description)))), /* @__PURE__ */ React20.createElement("a", { href: `/politician/${politicianId}/judicial-record`, onClick: handleNavigate, style: linkStyle }, "View Full Judicial Record \u2192"));
3268
3942
  }
3269
3943
 
3270
3944
  // src/PoliticianProfile.jsx
@@ -3415,13 +4089,13 @@ function formatAddress(addr) {
3415
4089
  if (cityStateZip) lines.push(cityStateZip);
3416
4090
  return lines;
3417
4091
  }
3418
- var CalendarIcon = ({ size = 16 }) => /* @__PURE__ */ React19.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.createElement("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }), /* @__PURE__ */ React19.createElement("line", { x1: "16", y1: "2", x2: "16", y2: "6" }), /* @__PURE__ */ React19.createElement("line", { x1: "8", y1: "2", x2: "8", y2: "6" }), /* @__PURE__ */ React19.createElement("line", { x1: "3", y1: "10", x2: "21", y2: "10" }));
3419
- var ClockIcon = ({ size = 16 }) => /* @__PURE__ */ React19.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React19.createElement("polyline", { points: "12 6 12 12 16 14" }));
3420
- var MapPinIcon = ({ size = 16 }) => /* @__PURE__ */ React19.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.createElement("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z" }), /* @__PURE__ */ React19.createElement("circle", { cx: "12", cy: "10", r: "3" }));
3421
- var PhoneIcon = ({ size = 16 }) => /* @__PURE__ */ React19.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.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" }));
3422
- var MailIcon = ({ size = 16 }) => /* @__PURE__ */ React19.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.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__ */ React19.createElement("path", { d: "M22 6L12 13L2 6" }));
3423
- var GlobeIcon = ({ size = 16 }) => /* @__PURE__ */ React19.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React19.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" }));
3424
- var ExternalLinkIcon = ({ size = 16 }) => /* @__PURE__ */ React19.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.createElement("path", { d: "M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6" }), /* @__PURE__ */ React19.createElement("polyline", { points: "15 3 21 3 21 9" }), /* @__PURE__ */ React19.createElement("line", { x1: "10", y1: "14", x2: "21", y2: "3" }));
4092
+ var CalendarIcon = ({ size = 16 }) => /* @__PURE__ */ React21.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React21.createElement("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }), /* @__PURE__ */ React21.createElement("line", { x1: "16", y1: "2", x2: "16", y2: "6" }), /* @__PURE__ */ React21.createElement("line", { x1: "8", y1: "2", x2: "8", y2: "6" }), /* @__PURE__ */ React21.createElement("line", { x1: "3", y1: "10", x2: "21", y2: "10" }));
4093
+ var ClockIcon = ({ size = 16 }) => /* @__PURE__ */ React21.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React21.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React21.createElement("polyline", { points: "12 6 12 12 16 14" }));
4094
+ var MapPinIcon = ({ size = 16 }) => /* @__PURE__ */ React21.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React21.createElement("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z" }), /* @__PURE__ */ React21.createElement("circle", { cx: "12", cy: "10", r: "3" }));
4095
+ var PhoneIcon = ({ size = 16 }) => /* @__PURE__ */ React21.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React21.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" }));
4096
+ var MailIcon = ({ size = 16 }) => /* @__PURE__ */ React21.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React21.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__ */ React21.createElement("path", { d: "M22 6L12 13L2 6" }));
4097
+ var GlobeIcon = ({ size = 16 }) => /* @__PURE__ */ React21.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React21.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React21.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" }));
4098
+ var ExternalLinkIcon = ({ size = 16 }) => /* @__PURE__ */ React21.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React21.createElement("path", { d: "M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6" }), /* @__PURE__ */ React21.createElement("polyline", { points: "15 3 21 3 21 9" }), /* @__PURE__ */ React21.createElement("line", { x1: "10", y1: "14", x2: "21", y2: "3" }));
3425
4099
  function PoliticianProfile({
3426
4100
  politician = {},
3427
4101
  onBack,
@@ -3448,8 +4122,8 @@ function PoliticianProfile({
3448
4122
  return pol.photo_origin_url;
3449
4123
  })();
3450
4124
  const initials = [pol.first_name, pol.last_name].filter(Boolean).map((n) => n[0]).join("");
3451
- const [imgError, setImgError] = useState9(false);
3452
- useEffect6(() => {
4125
+ const [imgError, setImgError] = useState11(false);
4126
+ useEffect8(() => {
3453
4127
  setImgError(false);
3454
4128
  }, [profileImageUrl]);
3455
4129
  const getSocialHandle = (type) => {
@@ -3749,7 +4423,7 @@ function PoliticianProfile({
3749
4423
  borderRadius: borderRadius.full
3750
4424
  }
3751
4425
  };
3752
- return /* @__PURE__ */ React19.createElement("div", { style: styles2.container, className: "ev-politician-profile" }, onBack && /* @__PURE__ */ React19.createElement(
4426
+ return /* @__PURE__ */ React21.createElement("div", { style: styles2.container, className: "ev-politician-profile" }, onBack && /* @__PURE__ */ React21.createElement(
3753
4427
  "button",
3754
4428
  {
3755
4429
  type: "button",
@@ -3762,9 +4436,9 @@ function PoliticianProfile({
3762
4436
  e.currentTarget.style.textDecoration = "none";
3763
4437
  }
3764
4438
  },
3765
- /* @__PURE__ */ React19.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.createElement("path", { d: "M15 19l-7-7 7-7" })),
4439
+ /* @__PURE__ */ React21.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React21.createElement("path", { d: "M15 19l-7-7 7-7" })),
3766
4440
  label
3767
- ), /* @__PURE__ */ React19.createElement("div", { style: styles2.card }, /* @__PURE__ */ React19.createElement("div", { style: styles2.heroRow }, /* @__PURE__ */ React19.createElement("div", { style: styles2.photoWrap }, profileImageUrl && !imgError ? /* @__PURE__ */ React19.createElement(
4441
+ ), /* @__PURE__ */ React21.createElement("div", { style: styles2.card }, /* @__PURE__ */ React21.createElement("div", { style: styles2.heroRow }, /* @__PURE__ */ React21.createElement("div", { style: styles2.photoWrap }, profileImageUrl && !imgError ? /* @__PURE__ */ React21.createElement(
3768
4442
  "img",
3769
4443
  {
3770
4444
  src: profileImageUrl,
@@ -3772,7 +4446,7 @@ function PoliticianProfile({
3772
4446
  style: styles2.photo,
3773
4447
  onError: () => setImgError(true)
3774
4448
  }
3775
- ) : /* @__PURE__ */ React19.createElement("div", { style: styles2.placeholder }, initials || "?")), /* @__PURE__ */ React19.createElement("div", { style: styles2.infoCol }, styles2.tierBadge && /* @__PURE__ */ React19.createElement("div", { style: styles2.tierBadge }, tier), /* @__PURE__ */ React19.createElement("h1", { style: styles2.name }, displayName), banner, /* @__PURE__ */ React19.createElement("p", { style: styles2.roleLine }, roleLine), pol.office_description && /* @__PURE__ */ React19.createElement("p", { style: styles2.officeDesc }, pol.office_description), pol.bio_text && /* @__PURE__ */ React19.createElement("p", { style: styles2.bioText }, pol.bio_text), (termLine || pol.total_years_in_office > 0) && /* @__PURE__ */ React19.createElement("div", { style: styles2.metaRow }, termLine && /* @__PURE__ */ React19.createElement("span", { style: styles2.metaItem }, /* @__PURE__ */ React19.createElement(CalendarIcon, { size: 14 }), termLine), pol.total_years_in_office > 0 && /* @__PURE__ */ React19.createElement("span", { style: styles2.metaItem }, /* @__PURE__ */ React19.createElement(ClockIcon, { size: 14 }), pol.total_years_in_office, " ", pol.total_years_in_office === 1 ? "year" : "years", " in office")), pol.web_form_url && /* @__PURE__ */ React19.createElement(
4449
+ ) : /* @__PURE__ */ React21.createElement("div", { style: styles2.placeholder }, initials || "?")), /* @__PURE__ */ React21.createElement("div", { style: styles2.infoCol }, styles2.tierBadge && /* @__PURE__ */ React21.createElement("div", { style: styles2.tierBadge }, tier), /* @__PURE__ */ React21.createElement("h1", { style: styles2.name }, displayName), banner, /* @__PURE__ */ React21.createElement("p", { style: styles2.roleLine }, roleLine), pol.office_description && /* @__PURE__ */ React21.createElement("p", { style: styles2.officeDesc }, pol.office_description), pol.bio_text && /* @__PURE__ */ React21.createElement("p", { style: styles2.bioText }, pol.bio_text), (termLine || pol.total_years_in_office > 0) && /* @__PURE__ */ React21.createElement("div", { style: styles2.metaRow }, termLine && /* @__PURE__ */ React21.createElement("span", { style: styles2.metaItem }, /* @__PURE__ */ React21.createElement(CalendarIcon, { size: 14 }), termLine), pol.total_years_in_office > 0 && /* @__PURE__ */ React21.createElement("span", { style: styles2.metaItem }, /* @__PURE__ */ React21.createElement(ClockIcon, { size: 14 }), pol.total_years_in_office, " ", pol.total_years_in_office === 1 ? "year" : "years", " in office")), pol.web_form_url && /* @__PURE__ */ React21.createElement(
3776
4450
  "a",
3777
4451
  {
3778
4452
  href: pol.web_form_url,
@@ -3786,9 +4460,9 @@ function PoliticianProfile({
3786
4460
  e.currentTarget.style.background = colors.evTeal;
3787
4461
  }
3788
4462
  },
3789
- /* @__PURE__ */ React19.createElement(ExternalLinkIcon, { size: 14 }),
4463
+ /* @__PURE__ */ React21.createElement(ExternalLinkIcon, { size: 14 }),
3790
4464
  "Submit a Message"
3791
- ))), hasContactInfo && /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement("div", { style: divider }), /* @__PURE__ */ React19.createElement("div", { style: sectionHeading }, /* @__PURE__ */ React19.createElement(MailIcon, { size: 20 }), "Contact Information"), /* @__PURE__ */ React19.createElement("div", { style: styles2.contactGrid }, hasAddresses && /* @__PURE__ */ React19.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ React19.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ React19.createElement(MapPinIcon, { size: 12 }), "Addresses"), addresses.map((addr, i) => /* @__PURE__ */ React19.createElement("div", { key: `addr-${i}` }, /* @__PURE__ */ React19.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, addr.type), /* @__PURE__ */ React19.createElement("p", { style: styles2.contactValue }, addr.lines.map((line, j) => /* @__PURE__ */ React19.createElement(React19.Fragment, { key: j }, line, j < addr.lines.length - 1 && /* @__PURE__ */ React19.createElement("br", null))))))), hasPhones && /* @__PURE__ */ React19.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ React19.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ React19.createElement(PhoneIcon, { size: 12 }), "Phone"), Object.entries(phonesByType).map(([type, phones], i) => /* @__PURE__ */ React19.createElement("div", { key: `phone-${type}` }, /* @__PURE__ */ React19.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, type), phones.map((phone, j) => /* @__PURE__ */ React19.createElement("p", { key: j, style: styles2.contactValue }, /* @__PURE__ */ React19.createElement(
4465
+ ))), hasContactInfo && /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", { style: divider }), /* @__PURE__ */ React21.createElement("div", { style: sectionHeading }, /* @__PURE__ */ React21.createElement(MailIcon, { size: 20 }), "Contact Information"), /* @__PURE__ */ React21.createElement("div", { style: styles2.contactGrid }, hasAddresses && /* @__PURE__ */ React21.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ React21.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ React21.createElement(MapPinIcon, { size: 12 }), "Addresses"), addresses.map((addr, i) => /* @__PURE__ */ React21.createElement("div", { key: `addr-${i}` }, /* @__PURE__ */ React21.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, addr.type), /* @__PURE__ */ React21.createElement("p", { style: styles2.contactValue }, addr.lines.map((line, j) => /* @__PURE__ */ React21.createElement(React21.Fragment, { key: j }, line, j < addr.lines.length - 1 && /* @__PURE__ */ React21.createElement("br", null))))))), hasPhones && /* @__PURE__ */ React21.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ React21.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ React21.createElement(PhoneIcon, { size: 12 }), "Phone"), Object.entries(phonesByType).map(([type, phones], i) => /* @__PURE__ */ React21.createElement("div", { key: `phone-${type}` }, /* @__PURE__ */ React21.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, type), phones.map((phone, j) => /* @__PURE__ */ React21.createElement("p", { key: j, style: styles2.contactValue }, /* @__PURE__ */ React21.createElement(
3792
4466
  "a",
3793
4467
  {
3794
4468
  href: `tel:${phone}`,
@@ -3801,7 +4475,7 @@ function PoliticianProfile({
3801
4475
  }
3802
4476
  },
3803
4477
  phone
3804
- )))))), hasEmails && /* @__PURE__ */ React19.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ React19.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ React19.createElement(MailIcon, { size: 12 }), "Email"), Object.entries(emailsByType).filter(([, emails]) => emails.some((e) => e && e.trim())).map(([type, emails], i) => /* @__PURE__ */ React19.createElement("div", { key: `email-${type}` }, /* @__PURE__ */ React19.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, type), emails.filter((e) => e && e.trim()).map((email, j) => /* @__PURE__ */ React19.createElement("p", { key: j, style: styles2.contactValue }, /* @__PURE__ */ React19.createElement(
4478
+ )))))), hasEmails && /* @__PURE__ */ React21.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ React21.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ React21.createElement(MailIcon, { size: 12 }), "Email"), Object.entries(emailsByType).filter(([, emails]) => emails.some((e) => e && e.trim())).map(([type, emails], i) => /* @__PURE__ */ React21.createElement("div", { key: `email-${type}` }, /* @__PURE__ */ React21.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, type), emails.filter((e) => e && e.trim()).map((email, j) => /* @__PURE__ */ React21.createElement("p", { key: j, style: styles2.contactValue }, /* @__PURE__ */ React21.createElement(
3805
4479
  "a",
3806
4480
  {
3807
4481
  href: `mailto:${email}`,
@@ -3814,7 +4488,7 @@ function PoliticianProfile({
3814
4488
  }
3815
4489
  },
3816
4490
  email
3817
- )))))), hasWebsitesCol && /* @__PURE__ */ React19.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ React19.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ React19.createElement(GlobeIcon, { size: 12 }), "Websites"), allWebsites.map((url, i) => /* @__PURE__ */ React19.createElement("p", { key: i, style: styles2.contactValue }, /* @__PURE__ */ React19.createElement(
4491
+ )))))), hasWebsitesCol && /* @__PURE__ */ React21.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ React21.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ React21.createElement(GlobeIcon, { size: 12 }), "Websites"), allWebsites.map((url, i) => /* @__PURE__ */ React21.createElement("p", { key: i, style: styles2.contactValue }, /* @__PURE__ */ React21.createElement(
3818
4492
  "a",
3819
4493
  {
3820
4494
  href: url,
@@ -3829,7 +4503,7 @@ function PoliticianProfile({
3829
4503
  }
3830
4504
  },
3831
4505
  extractDomain(url)
3832
- ))), (hasSocial || socialWebsiteUrls.length > 0) && /* @__PURE__ */ React19.createElement(
4506
+ ))), (hasSocial || socialWebsiteUrls.length > 0) && /* @__PURE__ */ React21.createElement(
3833
4507
  SocialLinks,
3834
4508
  {
3835
4509
  twitter,
@@ -3840,14 +4514,14 @@ function PoliticianProfile({
3840
4514
  size: "sm",
3841
4515
  style: { marginTop: allWebsites.length > 0 ? "8px" : 0 }
3842
4516
  }
3843
- )))), committees.length > 0 && /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement("div", { style: divider }), /* @__PURE__ */ React19.createElement(CommitteeTable, { committees })), pol.is_judicial ? /* @__PURE__ */ React19.createElement(
4517
+ )))), committees.length > 0 && /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", { style: divider }), /* @__PURE__ */ React21.createElement(CommitteeTable, { committees })), pol.is_judicial ? /* @__PURE__ */ React21.createElement(
3844
4518
  JudicialScorecard,
3845
4519
  {
3846
4520
  judicialRecord,
3847
4521
  politicianId,
3848
4522
  onNavigateToRecord
3849
4523
  }
3850
- ) : /* @__PURE__ */ React19.createElement(
4524
+ ) : /* @__PURE__ */ React21.createElement(
3851
4525
  LegislativeInlineSummary,
3852
4526
  {
3853
4527
  summary: legislativeSummary,
@@ -3858,7 +4532,7 @@ function PoliticianProfile({
3858
4532
  }
3859
4533
 
3860
4534
  // src/LegislativeRecord.jsx
3861
- import React20, { useState as useState10 } from "react";
4535
+ import React22, { useState as useState12 } from "react";
3862
4536
  var DEFAULT_LIMIT = 25;
3863
4537
  function normalizeText(str) {
3864
4538
  if (!str) return "";
@@ -3938,7 +4612,7 @@ function getPositionBadge(position) {
3938
4612
  return { bg: colors.borderLight, text: colors.textSecondary };
3939
4613
  }
3940
4614
  function Badge({ label, bg, text }) {
3941
- return /* @__PURE__ */ React20.createElement("span", { style: {
4615
+ return /* @__PURE__ */ React22.createElement("span", { style: {
3942
4616
  display: "inline-block",
3943
4617
  background: bg,
3944
4618
  color: text,
@@ -3951,18 +4625,18 @@ function Badge({ label, bg, text }) {
3951
4625
  } }, label);
3952
4626
  }
3953
4627
  function SectionHeader({ title, yearFilter, years, onYearChange }) {
3954
- return /* @__PURE__ */ React20.createElement("div", { style: {
4628
+ return /* @__PURE__ */ React22.createElement("div", { style: {
3955
4629
  display: "flex",
3956
4630
  alignItems: "center",
3957
4631
  justifyContent: "space-between",
3958
4632
  marginBottom: spacing[4]
3959
- } }, /* @__PURE__ */ React20.createElement("h2", { style: {
4633
+ } }, /* @__PURE__ */ React22.createElement("h2", { style: {
3960
4634
  fontFamily: fonts.primary,
3961
4635
  fontSize: fontSizes.xl,
3962
4636
  fontWeight: fontWeights.bold,
3963
4637
  color: colors.evTeal,
3964
4638
  margin: 0
3965
- } }, title), years && years.length > 0 && /* @__PURE__ */ React20.createElement(
4639
+ } }, title), years && years.length > 0 && /* @__PURE__ */ React22.createElement(
3966
4640
  "select",
3967
4641
  {
3968
4642
  value: yearFilter,
@@ -3978,13 +4652,13 @@ function SectionHeader({ title, yearFilter, years, onYearChange }) {
3978
4652
  cursor: "pointer"
3979
4653
  }
3980
4654
  },
3981
- /* @__PURE__ */ React20.createElement("option", { value: "All" }, "All years"),
3982
- years.map((y) => /* @__PURE__ */ React20.createElement("option", { key: y, value: y }, y))
4655
+ /* @__PURE__ */ React22.createElement("option", { value: "All" }, "All years"),
4656
+ years.map((y) => /* @__PURE__ */ React22.createElement("option", { key: y, value: y }, y))
3983
4657
  ));
3984
4658
  }
3985
4659
  function ShowAllLink({ totalCount, visibleCount, onClick }) {
3986
4660
  if (totalCount <= visibleCount) return null;
3987
- return /* @__PURE__ */ React20.createElement("div", { style: { textAlign: "center", marginTop: spacing[3] } }, /* @__PURE__ */ React20.createElement(
4661
+ return /* @__PURE__ */ React22.createElement("div", { style: { textAlign: "center", marginTop: spacing[3] } }, /* @__PURE__ */ React22.createElement(
3988
4662
  "button",
3989
4663
  {
3990
4664
  type: "button",
@@ -4012,7 +4686,7 @@ function ShowAllLink({ totalCount, visibleCount, onClick }) {
4012
4686
  ));
4013
4687
  }
4014
4688
  function EmptyState({ message }) {
4015
- return /* @__PURE__ */ React20.createElement("p", { style: {
4689
+ return /* @__PURE__ */ React22.createElement("p", { style: {
4016
4690
  fontFamily: fonts.primary,
4017
4691
  fontSize: fontSizes.sm,
4018
4692
  color: colors.textMuted,
@@ -4022,24 +4696,24 @@ function EmptyState({ message }) {
4022
4696
  } }, message);
4023
4697
  }
4024
4698
  function Spinner() {
4025
- return /* @__PURE__ */ React20.createElement("div", { style: {
4699
+ return /* @__PURE__ */ React22.createElement("div", { style: {
4026
4700
  display: "flex",
4027
4701
  justifyContent: "center",
4028
4702
  alignItems: "center",
4029
4703
  padding: spacing[10]
4030
- } }, /* @__PURE__ */ React20.createElement("div", { style: {
4704
+ } }, /* @__PURE__ */ React22.createElement("div", { style: {
4031
4705
  width: "40px",
4032
4706
  height: "40px",
4033
4707
  borderRadius: borderRadius.full,
4034
4708
  border: `3px solid ${colors.borderLight}`,
4035
4709
  borderTopColor: colors.evTeal,
4036
4710
  animation: "ev-spin 0.8s linear infinite"
4037
- } }), /* @__PURE__ */ React20.createElement("style", null, `@keyframes ev-spin { to { transform: rotate(360deg); } }`));
4711
+ } }), /* @__PURE__ */ React22.createElement("style", null, `@keyframes ev-spin { to { transform: rotate(360deg); } }`));
4038
4712
  }
4039
4713
  function CommitteesSection({ committees, leadership }) {
4040
- const [showAll, setShowAll] = useState10(false);
4714
+ const [showAll, setShowAll] = useState12(false);
4041
4715
  const visible = showAll ? committees : committees.slice(0, DEFAULT_LIMIT);
4042
- return /* @__PURE__ */ React20.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ React20.createElement(SectionHeader, { title: "Committees & Leadership" }), leadership && leadership.length > 0 && /* @__PURE__ */ React20.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: spacing[2], marginBottom: spacing[4] } }, leadership.map((role, i) => /* @__PURE__ */ React20.createElement("div", { key: i, style: {
4716
+ return /* @__PURE__ */ React22.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ React22.createElement(SectionHeader, { title: "Committees & Leadership" }), leadership && leadership.length > 0 && /* @__PURE__ */ React22.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: spacing[2], marginBottom: spacing[4] } }, leadership.map((role, i) => /* @__PURE__ */ React22.createElement("div", { key: i, style: {
4043
4717
  display: "inline-flex",
4044
4718
  alignItems: "center",
4045
4719
  gap: spacing[1],
@@ -4050,23 +4724,23 @@ function CommitteesSection({ committees, leadership }) {
4050
4724
  fontFamily: fonts.primary,
4051
4725
  fontSize: fontSizes.sm,
4052
4726
  fontWeight: fontWeights.semibold
4053
- } }, role.title, role.chamber && /* @__PURE__ */ React20.createElement("span", { style: { fontWeight: fontWeights.regular, opacity: 0.85 } }, "(", role.chamber, ")")))), committees.length === 0 ? /* @__PURE__ */ React20.createElement(EmptyState, { message: "Committee information is not available for this office." }) : /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement("div", null, visible.map((c, i) => {
4727
+ } }, role.title, role.chamber && /* @__PURE__ */ React22.createElement("span", { style: { fontWeight: fontWeights.regular, opacity: 0.85 } }, "(", role.chamber, ")")))), committees.length === 0 ? /* @__PURE__ */ React22.createElement(EmptyState, { message: "Committee information is not available for this office." }) : /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement("div", null, visible.map((c, i) => {
4054
4728
  const badge = getRoleBadge(c.role);
4055
- return /* @__PURE__ */ React20.createElement("div", { key: i, style: {
4729
+ return /* @__PURE__ */ React22.createElement("div", { key: i, style: {
4056
4730
  display: "flex",
4057
4731
  alignItems: "center",
4058
4732
  justifyContent: "space-between",
4059
4733
  padding: `${spacing[3]} 0`,
4060
4734
  borderBottom: `1px solid ${colors.borderLight}`,
4061
4735
  gap: spacing[3]
4062
- } }, /* @__PURE__ */ React20.createElement("span", { style: {
4736
+ } }, /* @__PURE__ */ React22.createElement("span", { style: {
4063
4737
  fontFamily: fonts.primary,
4064
4738
  fontSize: fontSizes.sm,
4065
4739
  color: colors.textSecondary,
4066
4740
  flex: 1,
4067
4741
  minWidth: 0
4068
- } }, c.committee_name, c.parent_name && /* @__PURE__ */ React20.createElement("span", { style: { color: colors.textMuted, marginLeft: spacing[1] } }, "(", c.parent_name, ")")), /* @__PURE__ */ React20.createElement(Badge, { label: badge.label, bg: badge.bg, text: badge.text }));
4069
- })), !showAll && /* @__PURE__ */ React20.createElement(
4742
+ } }, c.committee_name, c.parent_name && /* @__PURE__ */ React22.createElement("span", { style: { color: colors.textMuted, marginLeft: spacing[1] } }, "(", c.parent_name, ")")), /* @__PURE__ */ React22.createElement(Badge, { label: badge.label, bg: badge.bg, text: badge.text }));
4743
+ })), !showAll && /* @__PURE__ */ React22.createElement(
4070
4744
  ShowAllLink,
4071
4745
  {
4072
4746
  totalCount: committees.length,
@@ -4077,15 +4751,15 @@ function CommitteesSection({ committees, leadership }) {
4077
4751
  }
4078
4752
  function LegislationSection({ bills, isMobile }) {
4079
4753
  const years = getYears(bills, "introduced_at");
4080
- const [yearFilter, setYearFilter] = useState10("All");
4081
- const [showAll, setShowAll] = useState10(false);
4754
+ const [yearFilter, setYearFilter] = useState12("All");
4755
+ const [showAll, setShowAll] = useState12(false);
4082
4756
  const handleYearChange = (y) => {
4083
4757
  setYearFilter(y);
4084
4758
  setShowAll(false);
4085
4759
  };
4086
4760
  const filtered = yearFilter === "All" ? bills : bills.filter((b) => extractYear(b.introduced_at) === yearFilter);
4087
4761
  const visible = showAll ? filtered : filtered.slice(0, DEFAULT_LIMIT);
4088
- return /* @__PURE__ */ React20.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ React20.createElement(
4762
+ return /* @__PURE__ */ React22.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ React22.createElement(
4089
4763
  SectionHeader,
4090
4764
  {
4091
4765
  title: "Sponsored Legislation",
@@ -4093,42 +4767,42 @@ function LegislationSection({ bills, isMobile }) {
4093
4767
  years,
4094
4768
  onYearChange: handleYearChange
4095
4769
  }
4096
- ), bills.length === 0 ? /* @__PURE__ */ React20.createElement(EmptyState, { message: "Sponsored legislation data is not available for this office." }) : /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement("div", null, visible.map((bill, i) => {
4770
+ ), bills.length === 0 ? /* @__PURE__ */ React22.createElement(EmptyState, { message: "Sponsored legislation data is not available for this office." }) : /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement("div", null, visible.map((bill, i) => {
4097
4771
  const statusBadge = getStatusBadge(bill.status_label);
4098
- return /* @__PURE__ */ React20.createElement("div", { key: i, style: {
4772
+ return /* @__PURE__ */ React22.createElement("div", { key: i, style: {
4099
4773
  display: "flex",
4100
4774
  flexDirection: isMobile ? "column" : "row",
4101
4775
  alignItems: isMobile ? "flex-start" : "center",
4102
4776
  gap: isMobile ? spacing[1] : spacing[3],
4103
4777
  padding: `${spacing[3]} 0`,
4104
4778
  borderBottom: `1px solid ${colors.borderLight}`
4105
- } }, /* @__PURE__ */ React20.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React20.createElement("span", { style: {
4779
+ } }, /* @__PURE__ */ React22.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React22.createElement("span", { style: {
4106
4780
  fontFamily: fonts.primary,
4107
4781
  fontSize: fontSizes.xs,
4108
4782
  fontWeight: fontWeights.bold,
4109
4783
  color: colors.textSecondary,
4110
4784
  marginRight: spacing[2]
4111
- } }, bill.number), /* @__PURE__ */ React20.createElement("span", { style: {
4785
+ } }, bill.number), /* @__PURE__ */ React22.createElement("span", { style: {
4112
4786
  fontFamily: fonts.primary,
4113
4787
  fontSize: fontSizes.sm,
4114
4788
  color: colors.textSecondary
4115
- } }, bill.title)), /* @__PURE__ */ React20.createElement("div", { style: {
4789
+ } }, bill.title)), /* @__PURE__ */ React22.createElement("div", { style: {
4116
4790
  display: "flex",
4117
4791
  alignItems: "center",
4118
4792
  gap: spacing[2],
4119
4793
  flexShrink: 0,
4120
4794
  flexWrap: "wrap"
4121
- } }, /* @__PURE__ */ React20.createElement(Badge, { label: bill.status_label || "Unknown", bg: statusBadge.bg, text: statusBadge.text }), bill.introduced_at && /* @__PURE__ */ React20.createElement("span", { style: {
4795
+ } }, /* @__PURE__ */ React22.createElement(Badge, { label: bill.status_label || "Unknown", bg: statusBadge.bg, text: statusBadge.text }), bill.introduced_at && /* @__PURE__ */ React22.createElement("span", { style: {
4122
4796
  fontFamily: fonts.primary,
4123
4797
  fontSize: fontSizes.xs,
4124
4798
  color: colors.textMuted
4125
- } }, formatDate2(bill.introduced_at)), /* @__PURE__ */ React20.createElement("span", { style: {
4799
+ } }, formatDate2(bill.introduced_at)), /* @__PURE__ */ React22.createElement("span", { style: {
4126
4800
  fontFamily: fonts.primary,
4127
4801
  fontSize: fontSizes.xs,
4128
4802
  color: colors.textMuted,
4129
4803
  fontStyle: "italic"
4130
4804
  } }, bill.is_sponsor ? "Sponsored" : "Cosponsored")));
4131
- })), !showAll && /* @__PURE__ */ React20.createElement(
4805
+ })), !showAll && /* @__PURE__ */ React22.createElement(
4132
4806
  ShowAllLink,
4133
4807
  {
4134
4808
  totalCount: filtered.length,
@@ -4139,15 +4813,15 @@ function LegislationSection({ bills, isMobile }) {
4139
4813
  }
4140
4814
  function VotingSection({ votes, isMobile }) {
4141
4815
  const years = getYears(votes, "vote_date");
4142
- const [yearFilter, setYearFilter] = useState10("All");
4143
- const [showAll, setShowAll] = useState10(false);
4816
+ const [yearFilter, setYearFilter] = useState12("All");
4817
+ const [showAll, setShowAll] = useState12(false);
4144
4818
  const handleYearChange = (y) => {
4145
4819
  setYearFilter(y);
4146
4820
  setShowAll(false);
4147
4821
  };
4148
4822
  const filtered = yearFilter === "All" ? votes : votes.filter((v) => extractYear(v.vote_date) === yearFilter);
4149
4823
  const visible = showAll ? filtered : filtered.slice(0, DEFAULT_LIMIT);
4150
- return /* @__PURE__ */ React20.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ React20.createElement(
4824
+ return /* @__PURE__ */ React22.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ React22.createElement(
4151
4825
  SectionHeader,
4152
4826
  {
4153
4827
  title: "Voting Record",
@@ -4155,38 +4829,38 @@ function VotingSection({ votes, isMobile }) {
4155
4829
  years,
4156
4830
  onYearChange: handleYearChange
4157
4831
  }
4158
- ), votes.length === 0 ? /* @__PURE__ */ React20.createElement(EmptyState, { message: "Voting records are not available for this office." }) : /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement("div", null, visible.map((vote, i) => {
4832
+ ), votes.length === 0 ? /* @__PURE__ */ React22.createElement(EmptyState, { message: "Voting records are not available for this office." }) : /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement("div", null, visible.map((vote, i) => {
4159
4833
  const positionBadge = getPositionBadge(vote.position);
4160
4834
  const normPosition = normalizeText(vote.position);
4161
4835
  const topic = vote.bill_title || vote.vote_question;
4162
4836
  const sourceUrl = vote.bill_url;
4163
- return /* @__PURE__ */ React20.createElement("div", { key: i, style: {
4837
+ return /* @__PURE__ */ React22.createElement("div", { key: i, style: {
4164
4838
  display: "flex",
4165
4839
  flexDirection: isMobile ? "column" : "row",
4166
4840
  alignItems: isMobile ? "flex-start" : "center",
4167
4841
  gap: isMobile ? spacing[1] : spacing[3],
4168
4842
  padding: `${spacing[3]} 0`,
4169
4843
  borderBottom: `1px solid ${colors.borderLight}`
4170
- } }, /* @__PURE__ */ React20.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React20.createElement("span", { style: {
4844
+ } }, /* @__PURE__ */ React22.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React22.createElement("span", { style: {
4171
4845
  fontFamily: fonts.primary,
4172
4846
  fontSize: fontSizes.sm,
4173
4847
  color: colors.textSecondary
4174
- } }, topic)), /* @__PURE__ */ React20.createElement("div", { style: {
4848
+ } }, topic)), /* @__PURE__ */ React22.createElement("div", { style: {
4175
4849
  display: "flex",
4176
4850
  alignItems: "center",
4177
4851
  gap: spacing[2],
4178
4852
  flexShrink: 0,
4179
4853
  flexWrap: "wrap"
4180
- } }, vote.vote_date && /* @__PURE__ */ React20.createElement("span", { style: {
4854
+ } }, vote.vote_date && /* @__PURE__ */ React22.createElement("span", { style: {
4181
4855
  fontFamily: fonts.primary,
4182
4856
  fontSize: fontSizes.xs,
4183
4857
  color: colors.textMuted
4184
- } }, formatDate2(vote.vote_date)), /* @__PURE__ */ React20.createElement(Badge, { label: normPosition || "Unknown", bg: positionBadge.bg, text: positionBadge.text }), vote.result && /* @__PURE__ */ React20.createElement("span", { style: {
4858
+ } }, formatDate2(vote.vote_date)), /* @__PURE__ */ React22.createElement(Badge, { label: normPosition || "Unknown", bg: positionBadge.bg, text: positionBadge.text }), vote.result && /* @__PURE__ */ React22.createElement("span", { style: {
4185
4859
  fontFamily: fonts.primary,
4186
4860
  fontSize: fontSizes.xs,
4187
4861
  color: vote.result === "Passed" ? colors.success : colors.textMuted,
4188
4862
  fontWeight: fontWeights.medium
4189
- } }, vote.result), sourceUrl && /* @__PURE__ */ React20.createElement(
4863
+ } }, vote.result), sourceUrl && /* @__PURE__ */ React22.createElement(
4190
4864
  "a",
4191
4865
  {
4192
4866
  href: sourceUrl,
@@ -4207,7 +4881,7 @@ function VotingSection({ votes, isMobile }) {
4207
4881
  },
4208
4882
  "Source"
4209
4883
  )));
4210
- })), !showAll && /* @__PURE__ */ React20.createElement(
4884
+ })), !showAll && /* @__PURE__ */ React22.createElement(
4211
4885
  ShowAllLink,
4212
4886
  {
4213
4887
  totalCount: filtered.length,
@@ -4226,20 +4900,20 @@ function LegislativeRecord({
4226
4900
  }) {
4227
4901
  const isMobile = useMediaQuery("(max-width: 768px)");
4228
4902
  if (loading) {
4229
- return /* @__PURE__ */ React20.createElement(Spinner, null);
4903
+ return /* @__PURE__ */ React22.createElement(Spinner, null);
4230
4904
  }
4231
- return /* @__PURE__ */ React20.createElement("div", { style: { fontFamily: fonts.primary } }, politicianName && /* @__PURE__ */ React20.createElement("h1", { style: {
4905
+ return /* @__PURE__ */ React22.createElement("div", { style: { fontFamily: fonts.primary } }, politicianName && /* @__PURE__ */ React22.createElement("h1", { style: {
4232
4906
  fontFamily: fonts.primary,
4233
4907
  fontSize: isMobile ? fontSizes["2xl"] : fontSizes["4xl"],
4234
4908
  fontWeight: fontWeights.bold,
4235
4909
  color: colors.evTeal,
4236
4910
  marginBottom: spacing[8],
4237
4911
  marginTop: 0
4238
- } }, "Legislative Record: ", politicianName), /* @__PURE__ */ React20.createElement(CommitteesSection, { committees, leadership }), /* @__PURE__ */ React20.createElement(LegislationSection, { bills, isMobile }), /* @__PURE__ */ React20.createElement(VotingSection, { votes, isMobile }));
4912
+ } }, "Legislative Record: ", politicianName), /* @__PURE__ */ React22.createElement(CommitteesSection, { committees, leadership }), /* @__PURE__ */ React22.createElement(LegislationSection, { bills, isMobile }), /* @__PURE__ */ React22.createElement(VotingSection, { votes, isMobile }));
4239
4913
  }
4240
4914
 
4241
4915
  // src/JudicialRecordDetail.jsx
4242
- import React21 from "react";
4916
+ import React23 from "react";
4243
4917
  var containerStyle = {
4244
4918
  fontFamily: "'Manrope', sans-serif",
4245
4919
  maxWidth: "800px"
@@ -4324,7 +4998,7 @@ var emptyStateStyle = {
4324
4998
  function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
4325
4999
  var _a;
4326
5000
  if (!judicialRecord) {
4327
- return /* @__PURE__ */ React21.createElement("div", { style: containerStyle }, /* @__PURE__ */ React21.createElement("button", { style: backBtnStyle, onClick: onBack }, "\u2190 Back to Profile"), /* @__PURE__ */ React21.createElement("div", { style: emptyStateStyle }, "No judicial record data available."));
5001
+ return /* @__PURE__ */ React23.createElement("div", { style: containerStyle }, /* @__PURE__ */ React23.createElement("button", { style: backBtnStyle, onClick: onBack }, "\u2190 Back to Profile"), /* @__PURE__ */ React23.createElement("div", { style: emptyStateStyle }, "No judicial record data available."));
4328
5002
  }
4329
5003
  const {
4330
5004
  judge_detail: detail,
@@ -4333,13 +5007,13 @@ function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
4333
5007
  disciplinary_records: disciplinary = []
4334
5008
  } = judicialRecord;
4335
5009
  const displayName = politician.full_name || `${politician.first_name || ""} ${politician.last_name || ""}`.trim();
4336
- return /* @__PURE__ */ React21.createElement("div", { style: containerStyle }, /* @__PURE__ */ React21.createElement("button", { style: backBtnStyle, onClick: onBack }, "\u2190 Back to Profile"), /* @__PURE__ */ React21.createElement("h1", { style: nameStyle }, displayName), /* @__PURE__ */ React21.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__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("h2", { style: sectionHeadingStyle }, "Background"), detail.appointed_by && /* @__PURE__ */ React21.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ React21.createElement("span", { style: detailLabelStyle }, "Appointed by"), /* @__PURE__ */ React21.createElement("span", { style: detailValueStyle }, detail.appointed_by, " (", detail.appointing_president_party, ")")), detail.confirmation_vote && /* @__PURE__ */ React21.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ React21.createElement("span", { style: detailLabelStyle }, "Confirmation Vote"), /* @__PURE__ */ React21.createElement("span", { style: detailValueStyle }, detail.confirmation_vote)), detail.election_type && /* @__PURE__ */ React21.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ React21.createElement("span", { style: detailLabelStyle }, "Election Type"), /* @__PURE__ */ React21.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__ */ React21.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ React21.createElement("span", { style: detailLabelStyle }, "Areas of Focus"), /* @__PURE__ */ React21.createElement("span", { style: detailValueStyle }, detail.areas_of_focus.join(", ")))), /* @__PURE__ */ React21.createElement("h2", { style: sectionHeadingStyle }, "Performance Evaluations"), evaluations.length === 0 ? /* @__PURE__ */ React21.createElement("div", { style: emptyStateStyle }, "No evaluation data available yet.") : /* @__PURE__ */ React21.createElement("table", { style: tableStyle }, /* @__PURE__ */ React21.createElement("thead", null, /* @__PURE__ */ React21.createElement("tr", null, /* @__PURE__ */ React21.createElement("th", { style: thStyle }, "Source"), /* @__PURE__ */ React21.createElement("th", { style: thStyle }, "Rating"), /* @__PURE__ */ React21.createElement("th", { style: thStyle }, "Date"))), /* @__PURE__ */ React21.createElement("tbody", null, evaluations.map((ev, i) => /* @__PURE__ */ React21.createElement("tr", { key: i }, /* @__PURE__ */ React21.createElement("td", { style: tdStyle }, ev.source_url ? /* @__PURE__ */ React21.createElement("a", { href: ev.source_url, target: "_blank", rel: "noopener noreferrer", style: { color: "#319795" } }, ev.source) : ev.source), /* @__PURE__ */ React21.createElement("td", { style: { ...tdStyle, fontWeight: 600 } }, ev.rating), /* @__PURE__ */ React21.createElement("td", { style: tdStyle }, formatDate(ev.rating_date)))))), /* @__PURE__ */ React21.createElement("h2", { style: sectionHeadingStyle }, "Performance Metrics"), metrics.length === 0 ? /* @__PURE__ */ React21.createElement("div", { style: emptyStateStyle }, "No performance metric data available yet.") : /* @__PURE__ */ React21.createElement("table", { style: tableStyle }, /* @__PURE__ */ React21.createElement("thead", null, /* @__PURE__ */ React21.createElement("tr", null, /* @__PURE__ */ React21.createElement("th", { style: thStyle }, "Metric"), /* @__PURE__ */ React21.createElement("th", { style: thStyle }, "Value"), /* @__PURE__ */ React21.createElement("th", { style: thStyle }, "Context"), /* @__PURE__ */ React21.createElement("th", { style: thStyle }, "Period"))), /* @__PURE__ */ React21.createElement("tbody", null, metrics.map((m, i) => /* @__PURE__ */ React21.createElement("tr", { key: i }, /* @__PURE__ */ React21.createElement("td", { style: { ...tdStyle, fontWeight: 600 } }, METRIC_LABELS[m.metric_type] || m.metric_type.replace(/_/g, " ")), /* @__PURE__ */ React21.createElement("td", { style: tdStyle }, formatMetricValue(m.metric_type, m.value)), /* @__PURE__ */ React21.createElement("td", { style: { ...tdStyle, color: "#718096", fontSize: "13px" } }, m.context_label), /* @__PURE__ */ React21.createElement("td", { style: tdStyle }, m.time_period))))), disciplinary.length > 0 && /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("h2", { style: sectionHeadingStyle }, "Disciplinary History"), disciplinary.map((d, i) => /* @__PURE__ */ React21.createElement("div", { key: i, style: {
5010
+ return /* @__PURE__ */ React23.createElement("div", { style: containerStyle }, /* @__PURE__ */ React23.createElement("button", { style: backBtnStyle, onClick: onBack }, "\u2190 Back to Profile"), /* @__PURE__ */ React23.createElement("h1", { style: nameStyle }, displayName), /* @__PURE__ */ React23.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__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("h2", { style: sectionHeadingStyle }, "Background"), detail.appointed_by && /* @__PURE__ */ React23.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ React23.createElement("span", { style: detailLabelStyle }, "Appointed by"), /* @__PURE__ */ React23.createElement("span", { style: detailValueStyle }, detail.appointed_by, " (", detail.appointing_president_party, ")")), detail.confirmation_vote && /* @__PURE__ */ React23.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ React23.createElement("span", { style: detailLabelStyle }, "Confirmation Vote"), /* @__PURE__ */ React23.createElement("span", { style: detailValueStyle }, detail.confirmation_vote)), detail.election_type && /* @__PURE__ */ React23.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ React23.createElement("span", { style: detailLabelStyle }, "Election Type"), /* @__PURE__ */ React23.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__ */ React23.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ React23.createElement("span", { style: detailLabelStyle }, "Areas of Focus"), /* @__PURE__ */ React23.createElement("span", { style: detailValueStyle }, detail.areas_of_focus.join(", ")))), /* @__PURE__ */ React23.createElement("h2", { style: sectionHeadingStyle }, "Performance Evaluations"), evaluations.length === 0 ? /* @__PURE__ */ React23.createElement("div", { style: emptyStateStyle }, "No evaluation data available yet.") : /* @__PURE__ */ React23.createElement("table", { style: tableStyle }, /* @__PURE__ */ React23.createElement("thead", null, /* @__PURE__ */ React23.createElement("tr", null, /* @__PURE__ */ React23.createElement("th", { style: thStyle }, "Source"), /* @__PURE__ */ React23.createElement("th", { style: thStyle }, "Rating"), /* @__PURE__ */ React23.createElement("th", { style: thStyle }, "Date"))), /* @__PURE__ */ React23.createElement("tbody", null, evaluations.map((ev, i) => /* @__PURE__ */ React23.createElement("tr", { key: i }, /* @__PURE__ */ React23.createElement("td", { style: tdStyle }, ev.source_url ? /* @__PURE__ */ React23.createElement("a", { href: ev.source_url, target: "_blank", rel: "noopener noreferrer", style: { color: "#319795" } }, ev.source) : ev.source), /* @__PURE__ */ React23.createElement("td", { style: { ...tdStyle, fontWeight: 600 } }, ev.rating), /* @__PURE__ */ React23.createElement("td", { style: tdStyle }, formatDate(ev.rating_date)))))), /* @__PURE__ */ React23.createElement("h2", { style: sectionHeadingStyle }, "Performance Metrics"), metrics.length === 0 ? /* @__PURE__ */ React23.createElement("div", { style: emptyStateStyle }, "No performance metric data available yet.") : /* @__PURE__ */ React23.createElement("table", { style: tableStyle }, /* @__PURE__ */ React23.createElement("thead", null, /* @__PURE__ */ React23.createElement("tr", null, /* @__PURE__ */ React23.createElement("th", { style: thStyle }, "Metric"), /* @__PURE__ */ React23.createElement("th", { style: thStyle }, "Value"), /* @__PURE__ */ React23.createElement("th", { style: thStyle }, "Context"), /* @__PURE__ */ React23.createElement("th", { style: thStyle }, "Period"))), /* @__PURE__ */ React23.createElement("tbody", null, metrics.map((m, i) => /* @__PURE__ */ React23.createElement("tr", { key: i }, /* @__PURE__ */ React23.createElement("td", { style: { ...tdStyle, fontWeight: 600 } }, METRIC_LABELS[m.metric_type] || m.metric_type.replace(/_/g, " ")), /* @__PURE__ */ React23.createElement("td", { style: tdStyle }, formatMetricValue(m.metric_type, m.value)), /* @__PURE__ */ React23.createElement("td", { style: { ...tdStyle, color: "#718096", fontSize: "13px" } }, m.context_label), /* @__PURE__ */ React23.createElement("td", { style: tdStyle }, m.time_period))))), disciplinary.length > 0 && /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("h2", { style: sectionHeadingStyle }, "Disciplinary History"), disciplinary.map((d, i) => /* @__PURE__ */ React23.createElement("div", { key: i, style: {
4337
5011
  borderLeft: "3px solid #fc8181",
4338
5012
  backgroundColor: "#fff5f5",
4339
5013
  borderRadius: "0 6px 6px 0",
4340
5014
  padding: "12px 16px",
4341
5015
  marginBottom: "10px"
4342
- } }, /* @__PURE__ */ React21.createElement("div", { style: { fontWeight: 700, color: "#742a2a", fontSize: "14px" } }, d.record_type, " \u2014 ", formatDate(d.record_date)), d.description && /* @__PURE__ */ React21.createElement("div", { style: { color: "#9b2c2c", fontSize: "13px", marginTop: "4px" } }, d.description), d.source_url && /* @__PURE__ */ React21.createElement(
5016
+ } }, /* @__PURE__ */ React23.createElement("div", { style: { fontWeight: 700, color: "#742a2a", fontSize: "14px" } }, d.record_type, " \u2014 ", formatDate(d.record_date)), d.description && /* @__PURE__ */ React23.createElement("div", { style: { color: "#9b2c2c", fontSize: "13px", marginTop: "4px" } }, d.description), d.source_url && /* @__PURE__ */ React23.createElement(
4343
5017
  "a",
4344
5018
  {
4345
5019
  href: d.source_url,
@@ -4352,7 +5026,7 @@ function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
4352
5026
  }
4353
5027
 
4354
5028
  // src/AuthForm.jsx
4355
- import React22, { useState as useState11 } from "react";
5029
+ import React24, { useState as useState13 } from "react";
4356
5030
  function AuthForm({
4357
5031
  logoSrc = "/EVLogo.svg",
4358
5032
  appName = "Empowered Vote",
@@ -4363,11 +5037,11 @@ function AuthForm({
4363
5037
  error = null,
4364
5038
  submitting = false
4365
5039
  }) {
4366
- const [username, setUsername] = useState11("");
4367
- const [password, setPassword] = useState11("");
4368
- const [confirmPassword, setConfirmPassword] = useState11("");
4369
- const [showPasswords, setShowPasswords] = useState11(false);
4370
- const [passwordMismatch, setPasswordMismatch] = useState11(false);
5040
+ const [username, setUsername] = useState13("");
5041
+ const [password, setPassword] = useState13("");
5042
+ const [confirmPassword, setConfirmPassword] = useState13("");
5043
+ const [showPasswords, setShowPasswords] = useState13(false);
5044
+ const [passwordMismatch, setPasswordMismatch] = useState13(false);
4371
5045
  const isLogin = mode === "login";
4372
5046
  const handleSubmit = (e) => {
4373
5047
  e.preventDefault();
@@ -4379,7 +5053,7 @@ function AuthForm({
4379
5053
  setPasswordMismatch(false);
4380
5054
  onSubmit == null ? void 0 : onSubmit(username.trim(), password);
4381
5055
  };
4382
- const EyeOpen = () => /* @__PURE__ */ React22.createElement(
5056
+ const EyeOpen = () => /* @__PURE__ */ React24.createElement(
4383
5057
  "svg",
4384
5058
  {
4385
5059
  xmlns: "http://www.w3.org/2000/svg",
@@ -4389,7 +5063,7 @@ function AuthForm({
4389
5063
  stroke: "currentColor",
4390
5064
  style: { width: "20px", height: "20px" }
4391
5065
  },
4392
- /* @__PURE__ */ React22.createElement(
5066
+ /* @__PURE__ */ React24.createElement(
4393
5067
  "path",
4394
5068
  {
4395
5069
  strokeLinecap: "round",
@@ -4397,7 +5071,7 @@ function AuthForm({
4397
5071
  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"
4398
5072
  }
4399
5073
  ),
4400
- /* @__PURE__ */ React22.createElement(
5074
+ /* @__PURE__ */ React24.createElement(
4401
5075
  "path",
4402
5076
  {
4403
5077
  strokeLinecap: "round",
@@ -4406,7 +5080,7 @@ function AuthForm({
4406
5080
  }
4407
5081
  )
4408
5082
  );
4409
- const EyeClosed = () => /* @__PURE__ */ React22.createElement(
5083
+ const EyeClosed = () => /* @__PURE__ */ React24.createElement(
4410
5084
  "svg",
4411
5085
  {
4412
5086
  xmlns: "http://www.w3.org/2000/svg",
@@ -4416,7 +5090,7 @@ function AuthForm({
4416
5090
  stroke: "currentColor",
4417
5091
  style: { width: "20px", height: "20px" }
4418
5092
  },
4419
- /* @__PURE__ */ React22.createElement(
5093
+ /* @__PURE__ */ React24.createElement(
4420
5094
  "path",
4421
5095
  {
4422
5096
  strokeLinecap: "round",
@@ -4425,17 +5099,17 @@ function AuthForm({
4425
5099
  }
4426
5100
  )
4427
5101
  );
4428
- const PasswordToggle = () => /* @__PURE__ */ React22.createElement(
5102
+ const PasswordToggle = () => /* @__PURE__ */ React24.createElement(
4429
5103
  "button",
4430
5104
  {
4431
5105
  type: "button",
4432
5106
  onClick: () => setShowPasswords((prev) => !prev),
4433
5107
  style: styles.passwordToggle
4434
5108
  },
4435
- showPasswords ? /* @__PURE__ */ React22.createElement(EyeOpen, null) : /* @__PURE__ */ React22.createElement(EyeClosed, null)
5109
+ showPasswords ? /* @__PURE__ */ React24.createElement(EyeOpen, null) : /* @__PURE__ */ React24.createElement(EyeClosed, null)
4436
5110
  );
4437
5111
  const displayError = passwordMismatch ? "Passwords do not match." : error;
4438
- return /* @__PURE__ */ React22.createElement("div", { style: styles.wrapper }, /* @__PURE__ */ React22.createElement("div", { style: styles.container }, /* @__PURE__ */ React22.createElement("div", { style: styles.header }, logoSrc && /* @__PURE__ */ React22.createElement("img", { src: logoSrc, alt: appName, style: styles.logo }), appName && /* @__PURE__ */ React22.createElement("h1", { style: styles.appName }, appName), appSubtitle && /* @__PURE__ */ React22.createElement("p", { style: styles.appSubtitle }, appSubtitle)), /* @__PURE__ */ React22.createElement("form", { onSubmit: handleSubmit, style: styles.card }, /* @__PURE__ */ React22.createElement("h2", { style: styles.cardTitle }, isLogin ? "Welcome Back" : "Create Account"), /* @__PURE__ */ React22.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ React22.createElement("label", { style: styles.label }, "Username"), /* @__PURE__ */ React22.createElement(
5112
+ return /* @__PURE__ */ React24.createElement("div", { style: styles.wrapper }, /* @__PURE__ */ React24.createElement("div", { style: styles.container }, /* @__PURE__ */ React24.createElement("div", { style: styles.header }, logoSrc && /* @__PURE__ */ React24.createElement("img", { src: logoSrc, alt: appName, style: styles.logo }), appName && /* @__PURE__ */ React24.createElement("h1", { style: styles.appName }, appName), appSubtitle && /* @__PURE__ */ React24.createElement("p", { style: styles.appSubtitle }, appSubtitle)), /* @__PURE__ */ React24.createElement("form", { onSubmit: handleSubmit, style: styles.card }, /* @__PURE__ */ React24.createElement("h2", { style: styles.cardTitle }, isLogin ? "Welcome Back" : "Create Account"), /* @__PURE__ */ React24.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ React24.createElement("label", { style: styles.label }, "Username"), /* @__PURE__ */ React24.createElement(
4439
5113
  "input",
4440
5114
  {
4441
5115
  type: "text",
@@ -4452,7 +5126,7 @@ function AuthForm({
4452
5126
  },
4453
5127
  required: true
4454
5128
  }
4455
- )), /* @__PURE__ */ React22.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ React22.createElement("label", { style: styles.label }, "Password"), /* @__PURE__ */ React22.createElement("div", { style: styles.passwordWrapper }, /* @__PURE__ */ React22.createElement(
5129
+ )), /* @__PURE__ */ React24.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ React24.createElement("label", { style: styles.label }, "Password"), /* @__PURE__ */ React24.createElement("div", { style: styles.passwordWrapper }, /* @__PURE__ */ React24.createElement(
4456
5130
  "input",
4457
5131
  {
4458
5132
  type: showPasswords ? "text" : "password",
@@ -4468,7 +5142,7 @@ function AuthForm({
4468
5142
  },
4469
5143
  required: true
4470
5144
  }
4471
- ), /* @__PURE__ */ React22.createElement(PasswordToggle, null))), !isLogin && /* @__PURE__ */ React22.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ React22.createElement("label", { style: styles.label }, "Confirm Password"), /* @__PURE__ */ React22.createElement("div", { style: styles.passwordWrapper }, /* @__PURE__ */ React22.createElement(
5145
+ ), /* @__PURE__ */ React24.createElement(PasswordToggle, null))), !isLogin && /* @__PURE__ */ React24.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ React24.createElement("label", { style: styles.label }, "Confirm Password"), /* @__PURE__ */ React24.createElement("div", { style: styles.passwordWrapper }, /* @__PURE__ */ React24.createElement(
4472
5146
  "input",
4473
5147
  {
4474
5148
  type: showPasswords ? "text" : "password",
@@ -4484,7 +5158,7 @@ function AuthForm({
4484
5158
  },
4485
5159
  required: true
4486
5160
  }
4487
- ), /* @__PURE__ */ React22.createElement(PasswordToggle, null))), displayError && /* @__PURE__ */ React22.createElement("div", { style: styles.errorBox }, /* @__PURE__ */ React22.createElement("p", { style: styles.errorText }, displayError)), /* @__PURE__ */ React22.createElement(
5161
+ ), /* @__PURE__ */ React24.createElement(PasswordToggle, null))), displayError && /* @__PURE__ */ React24.createElement("div", { style: styles.errorBox }, /* @__PURE__ */ React24.createElement("p", { style: styles.errorText }, displayError)), /* @__PURE__ */ React24.createElement(
4488
5162
  "button",
4489
5163
  {
4490
5164
  type: "submit",
@@ -4502,7 +5176,7 @@ function AuthForm({
4502
5176
  }
4503
5177
  },
4504
5178
  submitting ? isLogin ? "Signing In..." : "Creating Account..." : isLogin ? "Sign In" : "Create Account"
4505
- ), onModeSwitch && /* @__PURE__ */ React22.createElement("div", { style: styles.modeSwitch }, /* @__PURE__ */ React22.createElement("p", { style: styles.modeSwitchText }, isLogin ? "Don't have an account?" : "Already have an account?"), /* @__PURE__ */ React22.createElement(
5179
+ ), onModeSwitch && /* @__PURE__ */ React24.createElement("div", { style: styles.modeSwitch }, /* @__PURE__ */ React24.createElement("p", { style: styles.modeSwitchText }, isLogin ? "Don't have an account?" : "Already have an account?"), /* @__PURE__ */ React24.createElement(
4506
5180
  "button",
4507
5181
  {
4508
5182
  type: "button",
@@ -4675,9 +5349,9 @@ var styles = {
4675
5349
  };
4676
5350
 
4677
5351
  // src/TopicTierBadge.jsx
4678
- import React23 from "react";
5352
+ import React25 from "react";
4679
5353
  function LandmarkIcon({ size = 14 }) {
4680
- return /* @__PURE__ */ React23.createElement(
5354
+ return /* @__PURE__ */ React25.createElement(
4681
5355
  "svg",
4682
5356
  {
4683
5357
  width: size,
@@ -4691,16 +5365,16 @@ function LandmarkIcon({ size = 14 }) {
4691
5365
  xmlns: "http://www.w3.org/2000/svg",
4692
5366
  "aria-hidden": "true"
4693
5367
  },
4694
- /* @__PURE__ */ React23.createElement("path", { d: "M10 18v-7" }),
4695
- /* @__PURE__ */ React23.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" }),
4696
- /* @__PURE__ */ React23.createElement("path", { d: "M14 18v-7" }),
4697
- /* @__PURE__ */ React23.createElement("path", { d: "M18 18v-7" }),
4698
- /* @__PURE__ */ React23.createElement("path", { d: "M3 22h18" }),
4699
- /* @__PURE__ */ React23.createElement("path", { d: "M6 18v-7" })
5368
+ /* @__PURE__ */ React25.createElement("path", { d: "M10 18v-7" }),
5369
+ /* @__PURE__ */ React25.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" }),
5370
+ /* @__PURE__ */ React25.createElement("path", { d: "M14 18v-7" }),
5371
+ /* @__PURE__ */ React25.createElement("path", { d: "M18 18v-7" }),
5372
+ /* @__PURE__ */ React25.createElement("path", { d: "M3 22h18" }),
5373
+ /* @__PURE__ */ React25.createElement("path", { d: "M6 18v-7" })
4700
5374
  );
4701
5375
  }
4702
5376
  function Building2Icon({ size = 14 }) {
4703
- return /* @__PURE__ */ React23.createElement(
5377
+ return /* @__PURE__ */ React25.createElement(
4704
5378
  "svg",
4705
5379
  {
4706
5380
  width: size,
@@ -4714,17 +5388,17 @@ function Building2Icon({ size = 14 }) {
4714
5388
  xmlns: "http://www.w3.org/2000/svg",
4715
5389
  "aria-hidden": "true"
4716
5390
  },
4717
- /* @__PURE__ */ React23.createElement("path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }),
4718
- /* @__PURE__ */ React23.createElement("path", { d: "M6 12H4a2 2 0 0 0-2 2v8h4" }),
4719
- /* @__PURE__ */ React23.createElement("path", { d: "M18 9h2a2 2 0 0 1 2 2v11h-4" }),
4720
- /* @__PURE__ */ React23.createElement("path", { d: "M10 6h4" }),
4721
- /* @__PURE__ */ React23.createElement("path", { d: "M10 10h4" }),
4722
- /* @__PURE__ */ React23.createElement("path", { d: "M10 14h4" }),
4723
- /* @__PURE__ */ React23.createElement("path", { d: "M10 18h4" })
5391
+ /* @__PURE__ */ React25.createElement("path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }),
5392
+ /* @__PURE__ */ React25.createElement("path", { d: "M6 12H4a2 2 0 0 0-2 2v8h4" }),
5393
+ /* @__PURE__ */ React25.createElement("path", { d: "M18 9h2a2 2 0 0 1 2 2v11h-4" }),
5394
+ /* @__PURE__ */ React25.createElement("path", { d: "M10 6h4" }),
5395
+ /* @__PURE__ */ React25.createElement("path", { d: "M10 10h4" }),
5396
+ /* @__PURE__ */ React25.createElement("path", { d: "M10 14h4" }),
5397
+ /* @__PURE__ */ React25.createElement("path", { d: "M10 18h4" })
4724
5398
  );
4725
5399
  }
4726
5400
  function HomeIcon({ size = 14 }) {
4727
- return /* @__PURE__ */ React23.createElement(
5401
+ return /* @__PURE__ */ React25.createElement(
4728
5402
  "svg",
4729
5403
  {
4730
5404
  width: size,
@@ -4738,8 +5412,8 @@ function HomeIcon({ size = 14 }) {
4738
5412
  xmlns: "http://www.w3.org/2000/svg",
4739
5413
  "aria-hidden": "true"
4740
5414
  },
4741
- /* @__PURE__ */ React23.createElement("path", { d: "m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }),
4742
- /* @__PURE__ */ React23.createElement("polyline", { points: "9 22 9 12 15 12 15 22" })
5415
+ /* @__PURE__ */ React25.createElement("path", { d: "m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }),
5416
+ /* @__PURE__ */ React25.createElement("polyline", { points: "9 22 9 12 15 12 15 22" })
4743
5417
  );
4744
5418
  }
4745
5419
  var TIER_INFO = {
@@ -4799,7 +5473,7 @@ function TopicTierBadge({
4799
5473
  userSelect: "none"
4800
5474
  };
4801
5475
  };
4802
- return /* @__PURE__ */ React23.createElement(
5476
+ return /* @__PURE__ */ React25.createElement(
4803
5477
  "span",
4804
5478
  {
4805
5479
  className: "ev-topic-tier-badge",
@@ -4809,13 +5483,13 @@ function TopicTierBadge({
4809
5483
  },
4810
5484
  effectiveTiers.map((tier) => {
4811
5485
  const { label, Icon } = TIER_INFO[tier];
4812
- return /* @__PURE__ */ React23.createElement("span", { key: tier, style: itemStyle(tier) }, /* @__PURE__ */ React23.createElement(Icon, { size: sizeStyle.iconSize }), !iconOnly && /* @__PURE__ */ React23.createElement("span", null, label));
5486
+ return /* @__PURE__ */ React25.createElement("span", { key: tier, style: itemStyle(tier) }, /* @__PURE__ */ React25.createElement(Icon, { size: sizeStyle.iconSize }), !iconOnly && /* @__PURE__ */ React25.createElement("span", null, label));
4813
5487
  })
4814
5488
  );
4815
5489
  }
4816
5490
 
4817
5491
  // src/CompassCoverageCallout.jsx
4818
- import React24, { useState as useState12 } from "react";
5492
+ import React26, { useState as useState14 } from "react";
4819
5493
  var TIER_LABELS = {
4820
5494
  federal: "federal",
4821
5495
  state: "state",
@@ -4828,7 +5502,7 @@ function CompassCoverageCallout({
4828
5502
  compassUrl,
4829
5503
  onDismiss
4830
5504
  }) {
4831
- const [dismissed, setDismissed] = useState12(false);
5505
+ const [dismissed, setDismissed] = useState14(false);
4832
5506
  if (dismissed) return null;
4833
5507
  const tierLabel = TIER_LABELS[tier] || tier;
4834
5508
  const tierStyle = tierColors[tier] || tierColors.federal;
@@ -4879,15 +5553,15 @@ function CompassCoverageCallout({
4879
5553
  setDismissed(true);
4880
5554
  if (onDismiss) onDismiss();
4881
5555
  };
4882
- return /* @__PURE__ */ React24.createElement(
5556
+ return /* @__PURE__ */ React26.createElement(
4883
5557
  "div",
4884
5558
  {
4885
5559
  className: "ev-compass-coverage-callout",
4886
5560
  role: "status",
4887
5561
  style: containerStyle2
4888
5562
  },
4889
- /* @__PURE__ */ React24.createElement("div", { style: textStyle }, /* @__PURE__ */ React24.createElement("div", { style: headlineStyle }, "Your compass covers ", tierLabel, " issues lightly"), /* @__PURE__ */ React24.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__ */ React24.createElement("a", { href: compassUrl, style: ctaStyle }, "Add ", tierLabel, " topics \u2192")),
4890
- onDismiss !== void 0 && /* @__PURE__ */ React24.createElement(
5563
+ /* @__PURE__ */ React26.createElement("div", { style: textStyle }, /* @__PURE__ */ React26.createElement("div", { style: headlineStyle }, "Your compass covers ", tierLabel, " issues lightly"), /* @__PURE__ */ React26.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__ */ React26.createElement("a", { href: compassUrl, style: ctaStyle }, "Add ", tierLabel, " topics \u2192")),
5564
+ onDismiss !== void 0 && /* @__PURE__ */ React26.createElement(
4891
5565
  "button",
4892
5566
  {
4893
5567
  onClick: handleDismiss,
@@ -4900,7 +5574,7 @@ function CompassCoverageCallout({
4900
5574
  }
4901
5575
 
4902
5576
  // src/ExpandCompassNudge.jsx
4903
- import React25 from "react";
5577
+ import React27 from "react";
4904
5578
  function ExpandCompassNudge({
4905
5579
  politicianName,
4906
5580
  missingCount,
@@ -4947,7 +5621,7 @@ function ExpandCompassNudge({
4947
5621
  };
4948
5622
  const topicsLabel = missingCount === 1 ? "topic" : "topics";
4949
5623
  const speakerName = politicianName || "This politician";
4950
- return /* @__PURE__ */ React25.createElement("div", { className: "ev-expand-compass-nudge", style: containerStyle2, role: "region" }, /* @__PURE__ */ React25.createElement("p", { style: headlineStyle }, "Want a richer comparison?"), /* @__PURE__ */ React25.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__ */ React25.createElement("a", { href: compassUrl, style: ctaStyle }, "Expand my compass \u2192"));
5624
+ return /* @__PURE__ */ React27.createElement("div", { className: "ev-expand-compass-nudge", style: containerStyle2, role: "region" }, /* @__PURE__ */ React27.createElement("p", { style: headlineStyle }, "Want a richer comparison?"), /* @__PURE__ */ React27.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__ */ React27.createElement("a", { href: compassUrl, style: ctaStyle }, "Expand my compass \u2192"));
4951
5625
  }
4952
5626
 
4953
5627
  // src/computeTierCoverage.js
@@ -4968,14 +5642,14 @@ function computeTierCoverage(topics) {
4968
5642
  }
4969
5643
 
4970
5644
  // src/StanceAccordion.jsx
4971
- import React27, { useState as useState13, useRef as useRef3, useCallback, useEffect as useEffect7 } from "react";
5645
+ import React29, { useState as useState15, useRef as useRef3, useCallback, useEffect as useEffect9 } from "react";
4972
5646
 
4973
5647
  // src/Favicon.jsx
4974
- import React26 from "react";
5648
+ import React28 from "react";
4975
5649
  function Favicon({ url, size = 16 }) {
4976
5650
  try {
4977
5651
  const domain = new URL(url).hostname;
4978
- return /* @__PURE__ */ React26.createElement(
5652
+ return /* @__PURE__ */ React28.createElement(
4979
5653
  "img",
4980
5654
  {
4981
5655
  src: `https://www.google.com/s2/favicons?sz=${size}&domain=${domain}`,
@@ -4986,7 +5660,7 @@ function Favicon({ url, size = 16 }) {
4986
5660
  }
4987
5661
  );
4988
5662
  } catch {
4989
- return /* @__PURE__ */ React26.createElement(
5663
+ return /* @__PURE__ */ React28.createElement(
4990
5664
  "svg",
4991
5665
  {
4992
5666
  width: size,
@@ -4997,8 +5671,8 @@ function Favicon({ url, size = 16 }) {
4997
5671
  strokeWidth: "1.5",
4998
5672
  style: { verticalAlign: "middle", flexShrink: 0 }
4999
5673
  },
5000
- /* @__PURE__ */ React26.createElement("circle", { cx: "12", cy: "12", r: "10" }),
5001
- /* @__PURE__ */ React26.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" })
5674
+ /* @__PURE__ */ React28.createElement("circle", { cx: "12", cy: "12", r: "10" }),
5675
+ /* @__PURE__ */ React28.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" })
5002
5676
  );
5003
5677
  }
5004
5678
  }
@@ -5029,9 +5703,9 @@ function StanceAccordion({
5029
5703
  apiUrl = "https://api.empowered.vote"
5030
5704
  }) {
5031
5705
  var _a;
5032
- const [expandedTopicId, setExpandedTopicId] = useState13(null);
5033
- const [loadingId, setLoadingId] = useState13(null);
5034
- const [showAll, setShowAll] = useState13(false);
5706
+ const [expandedTopicId, setExpandedTopicId] = useState15(null);
5707
+ const [loadingId, setLoadingId] = useState15(null);
5708
+ const [showAll, setShowAll] = useState15(false);
5035
5709
  const contextCache = useRef3(/* @__PURE__ */ new Map());
5036
5710
  const quotesCache = useRef3(null);
5037
5711
  const polAnswerMap = {};
@@ -5109,7 +5783,7 @@ function StanceAccordion({
5109
5783
  },
5110
5784
  [expandedTopicId, politicianId, apiUrl]
5111
5785
  );
5112
- useEffect7(() => {
5786
+ useEffect9(() => {
5113
5787
  if (initialExpandedTopicId && topics && topics.length > 0) {
5114
5788
  handleToggle(String(initialExpandedTopicId));
5115
5789
  }
@@ -5125,13 +5799,13 @@ function StanceAccordion({
5125
5799
  visibleTopics = [pinned, ...baseTopics.filter((t) => String(t.id) !== String(initialExpandedTopicId))];
5126
5800
  }
5127
5801
  }
5128
- return /* @__PURE__ */ React27.createElement(
5802
+ return /* @__PURE__ */ React29.createElement(
5129
5803
  "div",
5130
5804
  {
5131
5805
  className: "flex flex-col",
5132
5806
  style: { fontFamily: "'Manrope', sans-serif" }
5133
5807
  },
5134
- /* @__PURE__ */ React27.createElement(
5808
+ /* @__PURE__ */ React29.createElement(
5135
5809
  "h3",
5136
5810
  {
5137
5811
  className: "text-sm font-semibold text-neutral-400 uppercase tracking-wider mb-2",
@@ -5153,15 +5827,15 @@ function StanceAccordion({
5153
5827
  if (topic.topic_key) return q.issue === topic.topic_key;
5154
5828
  return topic.short_title && q.issue.toLowerCase() === topic.short_title.toLowerCase();
5155
5829
  }) : [];
5156
- return /* @__PURE__ */ React27.createElement("div", { key: topicId, className: "border-b border-neutral-100" }, /* @__PURE__ */ React27.createElement(
5830
+ return /* @__PURE__ */ React29.createElement("div", { key: topicId, className: "border-b border-neutral-100" }, /* @__PURE__ */ React29.createElement(
5157
5831
  "button",
5158
5832
  {
5159
5833
  type: "button",
5160
5834
  onClick: () => handleToggle(topicId),
5161
5835
  className: "w-full flex items-center justify-between py-3 px-2 text-left cursor-pointer hover:bg-neutral-50 transition-colors"
5162
5836
  },
5163
- /* @__PURE__ */ React27.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React27.createElement("span", { className: "text-sm font-medium text-neutral-800 truncate" }, topic.short_title), questionText && /* @__PURE__ */ React27.createElement("span", { className: "text-xs text-neutral-400 mt-0.5" }, questionText), /* @__PURE__ */ React27.createElement("span", { className: "text-xs text-neutral-500 mt-0.5" }, label)),
5164
- /* @__PURE__ */ React27.createElement(
5837
+ /* @__PURE__ */ React29.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React29.createElement("span", { className: "text-sm font-medium text-neutral-800 truncate" }, topic.short_title), questionText && /* @__PURE__ */ React29.createElement("span", { className: "text-xs text-neutral-400 mt-0.5" }, questionText), /* @__PURE__ */ React29.createElement("span", { className: "text-xs text-neutral-500 mt-0.5" }, label)),
5838
+ /* @__PURE__ */ React29.createElement(
5165
5839
  "svg",
5166
5840
  {
5167
5841
  width: "16",
@@ -5178,9 +5852,9 @@ function StanceAccordion({
5178
5852
  transition: "transform 0.2s ease"
5179
5853
  }
5180
5854
  },
5181
- /* @__PURE__ */ React27.createElement("polyline", { points: "9 18 15 12 9 6" })
5855
+ /* @__PURE__ */ React29.createElement("polyline", { points: "9 18 15 12 9 6" })
5182
5856
  )
5183
- ), /* @__PURE__ */ React27.createElement(
5857
+ ), /* @__PURE__ */ React29.createElement(
5184
5858
  "div",
5185
5859
  {
5186
5860
  style: {
@@ -5189,7 +5863,7 @@ function StanceAccordion({
5189
5863
  transition: "grid-template-rows 0.25s ease"
5190
5864
  }
5191
5865
  },
5192
- /* @__PURE__ */ React27.createElement("div", { style: { overflow: "hidden" } }, /* @__PURE__ */ React27.createElement("div", { className: "px-2 pb-4" }, isLoading && /* @__PURE__ */ React27.createElement("div", { className: "flex items-center py-3" }, /* @__PURE__ */ React27.createElement(
5866
+ /* @__PURE__ */ React29.createElement("div", { style: { overflow: "hidden" } }, /* @__PURE__ */ React29.createElement("div", { className: "px-2 pb-4" }, isLoading && /* @__PURE__ */ React29.createElement("div", { className: "flex items-center py-3" }, /* @__PURE__ */ React29.createElement(
5193
5867
  "div",
5194
5868
  {
5195
5869
  style: {
@@ -5201,14 +5875,14 @@ function StanceAccordion({
5201
5875
  animation: "ev-spin 0.8s linear infinite"
5202
5876
  }
5203
5877
  }
5204
- )), !isLoading && cached && /* @__PURE__ */ React27.createElement(React27.Fragment, null, cached.reasoning ? /* @__PURE__ */ React27.createElement(
5878
+ )), !isLoading && cached && /* @__PURE__ */ React29.createElement(React29.Fragment, null, cached.reasoning ? /* @__PURE__ */ React29.createElement(
5205
5879
  "p",
5206
5880
  {
5207
5881
  className: "text-sm text-neutral-700 mb-3",
5208
5882
  style: { whiteSpace: "pre-wrap", lineHeight: 1.6 }
5209
5883
  },
5210
5884
  cached.reasoning
5211
- ) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */ React27.createElement("div", { className: "mt-2" }, /* @__PURE__ */ React27.createElement("p", { className: "text-xs font-semibold text-neutral-500 uppercase tracking-wider mb-1.5" }, "References"), /* @__PURE__ */ React27.createElement("ol", { className: "list-decimal list-inside space-y-1" }, cached.sources.map((src, i) => /* @__PURE__ */ React27.createElement("li", { key: i, className: "text-xs text-neutral-600" }, /* @__PURE__ */ React27.createElement(
5885
+ ) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */ React29.createElement("div", { className: "mt-2" }, /* @__PURE__ */ React29.createElement("p", { className: "text-xs font-semibold text-neutral-500 uppercase tracking-wider mb-1.5" }, "References"), /* @__PURE__ */ React29.createElement("ol", { className: "list-decimal list-inside space-y-1" }, cached.sources.map((src, i) => /* @__PURE__ */ React29.createElement("li", { key: i, className: "text-xs text-neutral-600" }, /* @__PURE__ */ React29.createElement(
5212
5886
  "a",
5213
5887
  {
5214
5888
  href: src,
@@ -5216,9 +5890,9 @@ function StanceAccordion({
5216
5890
  rel: "noreferrer",
5217
5891
  className: "inline-flex items-center gap-1.5 hover:text-[#00657c] transition-colors"
5218
5892
  },
5219
- /* @__PURE__ */ React27.createElement(Favicon, { url: src }),
5220
- /* @__PURE__ */ React27.createElement("span", { className: "underline underline-offset-2" }, getDisplayUrl(src))
5221
- ))))), topicQuotes.length > 0 && /* @__PURE__ */ React27.createElement("div", { style: { marginTop: "12px" } }, /* @__PURE__ */ React27.createElement(
5893
+ /* @__PURE__ */ React29.createElement(Favicon, { url: src }),
5894
+ /* @__PURE__ */ React29.createElement("span", { className: "underline underline-offset-2" }, getDisplayUrl(src))
5895
+ ))))), topicQuotes.length > 0 && /* @__PURE__ */ React29.createElement("div", { style: { marginTop: "12px" } }, /* @__PURE__ */ React29.createElement(
5222
5896
  "p",
5223
5897
  {
5224
5898
  style: {
@@ -5235,7 +5909,7 @@ function StanceAccordion({
5235
5909
  const verdict = verdictsByQuote ? verdictsByQuote[quote.id] : void 0;
5236
5910
  const borderColor = verdict === "agreed" ? "#0e7490" : verdict === "disagreed" ? "#b45309" : "#e2e8f0";
5237
5911
  const sourceName = quote.source_name || quote.sourceName;
5238
- return /* @__PURE__ */ React27.createElement(
5912
+ return /* @__PURE__ */ React29.createElement(
5239
5913
  "div",
5240
5914
  {
5241
5915
  key: quote.id,
@@ -5247,7 +5921,7 @@ function StanceAccordion({
5247
5921
  marginBottom: "8px"
5248
5922
  }
5249
5923
  },
5250
- /* @__PURE__ */ React27.createElement(
5924
+ /* @__PURE__ */ React29.createElement(
5251
5925
  "p",
5252
5926
  {
5253
5927
  style: {
@@ -5260,7 +5934,7 @@ function StanceAccordion({
5260
5934
  },
5261
5935
  quote.text
5262
5936
  ),
5263
- verdict === "agreed" && /* @__PURE__ */ React27.createElement(
5937
+ verdict === "agreed" && /* @__PURE__ */ React29.createElement(
5264
5938
  "span",
5265
5939
  {
5266
5940
  style: {
@@ -5277,10 +5951,10 @@ function StanceAccordion({
5277
5951
  flexShrink: 0
5278
5952
  }
5279
5953
  },
5280
- /* @__PURE__ */ React27.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React27.createElement("path", { d: "M5 13l4 4L19 7" })),
5954
+ /* @__PURE__ */ React29.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React29.createElement("path", { d: "M5 13l4 4L19 7" })),
5281
5955
  "Agreed"
5282
5956
  ),
5283
- verdict === "disagreed" && /* @__PURE__ */ React27.createElement(
5957
+ verdict === "disagreed" && /* @__PURE__ */ React29.createElement(
5284
5958
  "span",
5285
5959
  {
5286
5960
  style: {
@@ -5297,10 +5971,10 @@ function StanceAccordion({
5297
5971
  flexShrink: 0
5298
5972
  }
5299
5973
  },
5300
- /* @__PURE__ */ React27.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React27.createElement("path", { d: "M6 18L18 6M6 6l12 12" })),
5974
+ /* @__PURE__ */ React29.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React29.createElement("path", { d: "M6 18L18 6M6 6l12 12" })),
5301
5975
  "Disagreed"
5302
5976
  ),
5303
- sourceName && /* @__PURE__ */ React27.createElement(
5977
+ sourceName && /* @__PURE__ */ React29.createElement(
5304
5978
  "a",
5305
5979
  {
5306
5980
  href: quote.source_url || quote.sourceUrl,
@@ -5317,10 +5991,10 @@ function StanceAccordion({
5317
5991
  sourceName
5318
5992
  )
5319
5993
  );
5320
- })), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */ React27.createElement("p", { className: "text-sm text-neutral-400 italic py-2" }, "No detailed reasoning available for this topic."))))
5994
+ })), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */ React29.createElement("p", { className: "text-sm text-neutral-400 italic py-2" }, "No detailed reasoning available for this topic."))))
5321
5995
  ));
5322
5996
  }),
5323
- hasToggle && /* @__PURE__ */ React27.createElement(
5997
+ hasToggle && /* @__PURE__ */ React29.createElement(
5324
5998
  "button",
5325
5999
  {
5326
6000
  type: "button",
@@ -5339,8 +6013,10 @@ export {
5339
6013
  CategorySection,
5340
6014
  CommitteeTable,
5341
6015
  CompassCardHorizontal,
6016
+ CompassCardVertical,
5342
6017
  CompassCoverageCallout,
5343
6018
  CompassIcon,
6019
+ CompassKey,
5344
6020
  ExpandCompassNudge,
5345
6021
  FilterSidebar,
5346
6022
  GovernmentBodySection,
@@ -5370,6 +6046,7 @@ export {
5370
6046
  defaultNavItems,
5371
6047
  duration,
5372
6048
  easing,
6049
+ evContext,
5373
6050
  focus,
5374
6051
  fontSizes,
5375
6052
  fontWeights,