@empoweredvote/ev-ui 0.5.1 → 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);
@@ -2075,7 +2105,7 @@ function CompassCardHorizontalMeta({
2075
2105
  IconOverlay,
2076
2106
  {
2077
2107
  ballot: politician.ballot || null,
2078
- hasStances: Boolean(userAnswers && userAnswers.length > 0) || Boolean(politician.hasStances),
2108
+ hasStances: false,
2079
2109
  branch: politician.branch || null
2080
2110
  }
2081
2111
  ));
@@ -2106,11 +2136,12 @@ function buildAnswerMapByShortTitle(allTopics, allAnswers, allowedShorts) {
2106
2136
  }
2107
2137
 
2108
2138
  // src/CompassCardHorizontal.jsx
2109
- var RADAR_SIZE = 250;
2110
- var SLOT_WIDTH = 260;
2139
+ var RADAR_SIZE = 400;
2140
+ var SLOT_WIDTH = 420;
2111
2141
  function CompassCardHorizontal({
2112
2142
  politician,
2113
2143
  userAnswers = null,
2144
+ invertedSpokes = {},
2114
2145
  tierVisuals = null,
2115
2146
  view = "compass",
2116
2147
  surface = "representatives",
@@ -2194,7 +2225,7 @@ function CompassCardHorizontal({
2194
2225
  topics,
2195
2226
  data,
2196
2227
  compareData,
2197
- invertedSpokes: {},
2228
+ invertedSpokes: invertedSpokes || {},
2198
2229
  onToggleInversion: () => {
2199
2230
  },
2200
2231
  onReplaceTopic: () => {
@@ -2371,8 +2402,644 @@ function CompassCardHorizontal({
2371
2402
  );
2372
2403
  }
2373
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
+
2374
3041
  // src/CategorySection.jsx
2375
- import React11, { useState as useState6 } from "react";
3042
+ import React13, { useState as useState8 } from "react";
2376
3043
  function CategorySection({
2377
3044
  title,
2378
3045
  infoTooltip,
@@ -2382,7 +3049,7 @@ function CategorySection({
2382
3049
  tier
2383
3050
  }) {
2384
3051
  var _a, _b;
2385
- const [showTooltip, setShowTooltip] = useState6(false);
3052
+ const [showTooltip, setShowTooltip] = useState8(false);
2386
3053
  const tierStyle = tier ? tierColors[tier] : null;
2387
3054
  const styles2 = {
2388
3055
  section: {
@@ -2450,7 +3117,7 @@ function CategorySection({
2450
3117
  gap: spacing[4]
2451
3118
  }
2452
3119
  };
2453
- 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(
2454
3121
  "button",
2455
3122
  {
2456
3123
  type: "button",
@@ -2462,8 +3129,8 @@ function CategorySection({
2462
3129
  "aria-label": `Info about ${title}`
2463
3130
  },
2464
3131
  "i",
2465
- showTooltip && /* @__PURE__ */ React11.createElement("div", { style: styles2.tooltip, role: "tooltip" }, infoTooltip)
2466
- ), websiteUrl && /* @__PURE__ */ React11.createElement(
3132
+ showTooltip && /* @__PURE__ */ React13.createElement("div", { style: styles2.tooltip, role: "tooltip" }, infoTooltip)
3133
+ ), websiteUrl && /* @__PURE__ */ React13.createElement(
2467
3134
  "a",
2468
3135
  {
2469
3136
  href: websiteUrl,
@@ -2472,7 +3139,7 @@ function CategorySection({
2472
3139
  style: styles2.externalLink,
2473
3140
  "aria-label": `Visit official website for ${title}`
2474
3141
  },
2475
- /* @__PURE__ */ React11.createElement(
3142
+ /* @__PURE__ */ React13.createElement(
2476
3143
  "svg",
2477
3144
  {
2478
3145
  viewBox: "0 0 24 24",
@@ -2480,7 +3147,7 @@ function CategorySection({
2480
3147
  xmlns: "http://www.w3.org/2000/svg",
2481
3148
  style: { width: "14px", height: "14px" }
2482
3149
  },
2483
- /* @__PURE__ */ React11.createElement(
3150
+ /* @__PURE__ */ React13.createElement(
2484
3151
  "path",
2485
3152
  {
2486
3153
  d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",
@@ -2491,12 +3158,12 @@ function CategorySection({
2491
3158
  }
2492
3159
  )
2493
3160
  )
2494
- )), /* @__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));
2495
3162
  }
2496
3163
 
2497
3164
  // src/SubGroupSection.jsx
2498
- import React12 from "react";
2499
- function SubGroupSection({ title, websiteUrl, children }) {
3165
+ import React14 from "react";
3166
+ function SubGroupSection({ title, websiteUrl, children, gridTemplateColumns, gap, justifyContent }) {
2500
3167
  const styles2 = {
2501
3168
  section: {
2502
3169
  marginBottom: spacing[4]
@@ -2524,11 +3191,13 @@ function SubGroupSection({ title, websiteUrl, children }) {
2524
3191
  },
2525
3192
  grid: {
2526
3193
  display: "grid",
2527
- gridTemplateColumns: "repeat(auto-fill, minmax(min(250px, 100%), 1fr))",
2528
- 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%"
2529
3198
  }
2530
3199
  };
2531
- 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(
2532
3201
  "a",
2533
3202
  {
2534
3203
  href: websiteUrl,
@@ -2536,12 +3205,12 @@ function SubGroupSection({ title, websiteUrl, children }) {
2536
3205
  rel: "noopener noreferrer",
2537
3206
  style: styles2.link
2538
3207
  },
2539
- /* @__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" }))
2540
- )), /* @__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));
2541
3210
  }
2542
3211
 
2543
3212
  // src/GovernmentBodySection.jsx
2544
- import React13, { useState as useState7 } from "react";
3213
+ import React15, { useState as useState9 } from "react";
2545
3214
  function GovernmentBodySection({
2546
3215
  title,
2547
3216
  websiteUrl,
@@ -2550,7 +3219,7 @@ function GovernmentBodySection({
2550
3219
  children
2551
3220
  }) {
2552
3221
  var _a;
2553
- const [expanded, setExpanded] = useState7(defaultExpanded);
3222
+ const [expanded, setExpanded] = useState9(defaultExpanded);
2554
3223
  const tierStyle = tier ? tierColors[tier] : null;
2555
3224
  const accentColor = (_a = tierStyle == null ? void 0 : tierStyle.accent) != null ? _a : colors.borderMedium;
2556
3225
  const styles2 = {
@@ -2590,7 +3259,7 @@ function GovernmentBodySection({
2590
3259
  display: expanded ? "block" : "none"
2591
3260
  }
2592
3261
  };
2593
- 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(
2594
3263
  "div",
2595
3264
  {
2596
3265
  style: styles2.header,
@@ -2606,8 +3275,8 @@ function GovernmentBodySection({
2606
3275
  "aria-expanded": expanded,
2607
3276
  "aria-label": `${expanded ? "Collapse" : "Expand"} ${title}`
2608
3277
  },
2609
- /* @__PURE__ */ React13.createElement("span", { style: styles2.title }, title),
2610
- websiteUrl && /* @__PURE__ */ React13.createElement(
3278
+ /* @__PURE__ */ React15.createElement("span", { style: styles2.title }, title),
3279
+ websiteUrl && /* @__PURE__ */ React15.createElement(
2611
3280
  "a",
2612
3281
  {
2613
3282
  href: websiteUrl,
@@ -2617,14 +3286,14 @@ function GovernmentBodySection({
2617
3286
  onClick: (e) => e.stopPropagation(),
2618
3287
  "aria-label": `Visit ${title} website`
2619
3288
  },
2620
- /* @__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" }))
2621
3290
  ),
2622
- /* @__PURE__ */ React13.createElement("span", { style: styles2.toggle, "aria-hidden": "true" }, "\u25BC")
2623
- ), /* @__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));
2624
3293
  }
2625
3294
 
2626
3295
  // src/SocialLinks.jsx
2627
- import React14 from "react";
3296
+ import React16 from "react";
2628
3297
  var SOCIAL_PLATFORMS = [
2629
3298
  { test: /facebook\.com/i, platform: "facebook" },
2630
3299
  { test: /twitter\.com|x\.com/i, platform: "twitter" },
@@ -2695,7 +3364,7 @@ function SocialLinks({
2695
3364
  }
2696
3365
  };
2697
3366
  const platformIconMap = {
2698
- 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(
2699
3368
  "path",
2700
3369
  {
2701
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",
@@ -2705,7 +3374,7 @@ function SocialLinks({
2705
3374
  strokeLinejoin: "round"
2706
3375
  }
2707
3376
  )),
2708
- 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(
2709
3378
  "path",
2710
3379
  {
2711
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",
@@ -2715,8 +3384,8 @@ function SocialLinks({
2715
3384
  strokeLinejoin: "round"
2716
3385
  }
2717
3386
  )),
2718
- 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" })),
2719
- 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(
2720
3389
  "path",
2721
3390
  {
2722
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",
@@ -2725,8 +3394,8 @@ function SocialLinks({
2725
3394
  strokeLinecap: "round",
2726
3395
  strokeLinejoin: "round"
2727
3396
  }
2728
- ), /* @__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" })),
2729
- 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" }))
2730
3399
  };
2731
3400
  const links = [
2732
3401
  {
@@ -2752,7 +3421,7 @@ function SocialLinks({
2752
3421
  {
2753
3422
  href: website,
2754
3423
  label: "Website",
2755
- 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(
2756
3425
  "path",
2757
3426
  {
2758
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",
@@ -2782,7 +3451,7 @@ function SocialLinks({
2782
3451
  if (links.length === 0) {
2783
3452
  return null;
2784
3453
  }
2785
- 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(
2786
3455
  "a",
2787
3456
  {
2788
3457
  key: link.label,
@@ -2805,7 +3474,7 @@ function SocialLinks({
2805
3474
  }
2806
3475
 
2807
3476
  // src/IssueTags.jsx
2808
- import React15 from "react";
3477
+ import React17 from "react";
2809
3478
  function IssueTags({
2810
3479
  tags = [],
2811
3480
  selectedTags = [],
@@ -2848,9 +3517,9 @@ function IssueTags({
2848
3517
  onTagClick(tag.value);
2849
3518
  }
2850
3519
  };
2851
- 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) => {
2852
3521
  const isSelected = selectedTags.includes(tag.value);
2853
- return /* @__PURE__ */ React15.createElement(
3522
+ return /* @__PURE__ */ React17.createElement(
2854
3523
  "span",
2855
3524
  {
2856
3525
  key: tag.value,
@@ -2879,7 +3548,7 @@ function IssueTags({
2879
3548
  }
2880
3549
 
2881
3550
  // src/CommitteeTable.jsx
2882
- import React16, { useState as useState8 } from "react";
3551
+ import React18, { useState as useState10 } from "react";
2883
3552
  var ROLE_ORDER = {
2884
3553
  "chair": 0,
2885
3554
  "co-chair": 1,
@@ -2906,7 +3575,7 @@ function CommitteeTable({
2906
3575
  maxVisible = 6,
2907
3576
  style = {}
2908
3577
  }) {
2909
- const [showAll, setShowAll] = useState8(false);
3578
+ const [showAll, setShowAll] = useState10(false);
2910
3579
  if (committees.length === 0) {
2911
3580
  return null;
2912
3581
  }
@@ -2968,7 +3637,7 @@ function CommitteeTable({
2968
3637
  cursor: "pointer"
2969
3638
  }
2970
3639
  };
2971
- 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(
2972
3641
  "a",
2973
3642
  {
2974
3643
  href: committee.url,
@@ -2983,7 +3652,7 @@ function CommitteeTable({
2983
3652
  }
2984
3653
  },
2985
3654
  committee.name
2986
- ) : 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(
2987
3656
  "button",
2988
3657
  {
2989
3658
  type: "button",
@@ -2991,7 +3660,7 @@ function CommitteeTable({
2991
3660
  onClick: () => setShowAll(!showAll)
2992
3661
  },
2993
3662
  showAll ? "Show less" : `Show all ${sorted.length} committees`,
2994
- /* @__PURE__ */ React16.createElement(
3663
+ /* @__PURE__ */ React18.createElement(
2995
3664
  "svg",
2996
3665
  {
2997
3666
  width: "14",
@@ -3004,16 +3673,16 @@ function CommitteeTable({
3004
3673
  strokeLinejoin: "round",
3005
3674
  style: { transform: showAll ? "rotate(180deg)" : "none", transition: "transform 0.2s" }
3006
3675
  },
3007
- /* @__PURE__ */ React16.createElement("polyline", { points: "6 9 12 15 18 9" })
3676
+ /* @__PURE__ */ React18.createElement("polyline", { points: "6 9 12 15 18 9" })
3008
3677
  )
3009
3678
  ));
3010
3679
  }
3011
3680
 
3012
3681
  // src/PoliticianProfile.jsx
3013
- import React19, { useState as useState9, useEffect as useEffect6 } from "react";
3682
+ import React21, { useState as useState11, useEffect as useEffect8 } from "react";
3014
3683
 
3015
3684
  // src/LegislativeInlineSummary.jsx
3016
- import React17 from "react";
3685
+ import React19 from "react";
3017
3686
  function normalizePosition(pos) {
3018
3687
  if (!pos) return "";
3019
3688
  return pos.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
@@ -3121,7 +3790,7 @@ function LegislativeInlineSummary({ summary, politicianId, onNavigateToRecord })
3121
3790
  fontSize: fontSizes.sm,
3122
3791
  fontWeight: fontWeights.medium
3123
3792
  };
3124
- 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(
3125
3794
  "button",
3126
3795
  {
3127
3796
  onClick: () => {
@@ -3146,12 +3815,12 @@ function LegislativeInlineSummary({ summary, politicianId, onNavigateToRecord })
3146
3815
  }
3147
3816
  },
3148
3817
  "View Full Legislative Record",
3149
- /* @__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" }))
3150
3819
  )));
3151
3820
  }
3152
3821
 
3153
3822
  // src/JudicialScorecard.jsx
3154
- import React18 from "react";
3823
+ import React20 from "react";
3155
3824
 
3156
3825
  // src/judicialUtils.js
3157
3826
  function formatDate(dateStr) {
@@ -3269,7 +3938,7 @@ function JudicialScorecard({ judicialRecord, politicianId, onNavigateToRecord })
3269
3938
  onNavigateToRecord(`/politician/${politicianId}/judicial-record`);
3270
3939
  }
3271
3940
  };
3272
- 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"));
3273
3942
  }
3274
3943
 
3275
3944
  // src/PoliticianProfile.jsx
@@ -3420,13 +4089,13 @@ function formatAddress(addr) {
3420
4089
  if (cityStateZip) lines.push(cityStateZip);
3421
4090
  return lines;
3422
4091
  }
3423
- 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" }));
3424
- 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" }));
3425
- 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" }));
3426
- 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" }));
3427
- 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" }));
3428
- 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" }));
3429
- 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" }));
3430
4099
  function PoliticianProfile({
3431
4100
  politician = {},
3432
4101
  onBack,
@@ -3453,8 +4122,8 @@ function PoliticianProfile({
3453
4122
  return pol.photo_origin_url;
3454
4123
  })();
3455
4124
  const initials = [pol.first_name, pol.last_name].filter(Boolean).map((n) => n[0]).join("");
3456
- const [imgError, setImgError] = useState9(false);
3457
- useEffect6(() => {
4125
+ const [imgError, setImgError] = useState11(false);
4126
+ useEffect8(() => {
3458
4127
  setImgError(false);
3459
4128
  }, [profileImageUrl]);
3460
4129
  const getSocialHandle = (type) => {
@@ -3754,7 +4423,7 @@ function PoliticianProfile({
3754
4423
  borderRadius: borderRadius.full
3755
4424
  }
3756
4425
  };
3757
- 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(
3758
4427
  "button",
3759
4428
  {
3760
4429
  type: "button",
@@ -3767,9 +4436,9 @@ function PoliticianProfile({
3767
4436
  e.currentTarget.style.textDecoration = "none";
3768
4437
  }
3769
4438
  },
3770
- /* @__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" })),
3771
4440
  label
3772
- ), /* @__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(
3773
4442
  "img",
3774
4443
  {
3775
4444
  src: profileImageUrl,
@@ -3777,7 +4446,7 @@ function PoliticianProfile({
3777
4446
  style: styles2.photo,
3778
4447
  onError: () => setImgError(true)
3779
4448
  }
3780
- ) : /* @__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(
3781
4450
  "a",
3782
4451
  {
3783
4452
  href: pol.web_form_url,
@@ -3791,9 +4460,9 @@ function PoliticianProfile({
3791
4460
  e.currentTarget.style.background = colors.evTeal;
3792
4461
  }
3793
4462
  },
3794
- /* @__PURE__ */ React19.createElement(ExternalLinkIcon, { size: 14 }),
4463
+ /* @__PURE__ */ React21.createElement(ExternalLinkIcon, { size: 14 }),
3795
4464
  "Submit a Message"
3796
- ))), 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(
3797
4466
  "a",
3798
4467
  {
3799
4468
  href: `tel:${phone}`,
@@ -3806,7 +4475,7 @@ function PoliticianProfile({
3806
4475
  }
3807
4476
  },
3808
4477
  phone
3809
- )))))), 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(
3810
4479
  "a",
3811
4480
  {
3812
4481
  href: `mailto:${email}`,
@@ -3819,7 +4488,7 @@ function PoliticianProfile({
3819
4488
  }
3820
4489
  },
3821
4490
  email
3822
- )))))), 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(
3823
4492
  "a",
3824
4493
  {
3825
4494
  href: url,
@@ -3834,7 +4503,7 @@ function PoliticianProfile({
3834
4503
  }
3835
4504
  },
3836
4505
  extractDomain(url)
3837
- ))), (hasSocial || socialWebsiteUrls.length > 0) && /* @__PURE__ */ React19.createElement(
4506
+ ))), (hasSocial || socialWebsiteUrls.length > 0) && /* @__PURE__ */ React21.createElement(
3838
4507
  SocialLinks,
3839
4508
  {
3840
4509
  twitter,
@@ -3845,14 +4514,14 @@ function PoliticianProfile({
3845
4514
  size: "sm",
3846
4515
  style: { marginTop: allWebsites.length > 0 ? "8px" : 0 }
3847
4516
  }
3848
- )))), 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(
3849
4518
  JudicialScorecard,
3850
4519
  {
3851
4520
  judicialRecord,
3852
4521
  politicianId,
3853
4522
  onNavigateToRecord
3854
4523
  }
3855
- ) : /* @__PURE__ */ React19.createElement(
4524
+ ) : /* @__PURE__ */ React21.createElement(
3856
4525
  LegislativeInlineSummary,
3857
4526
  {
3858
4527
  summary: legislativeSummary,
@@ -3863,7 +4532,7 @@ function PoliticianProfile({
3863
4532
  }
3864
4533
 
3865
4534
  // src/LegislativeRecord.jsx
3866
- import React20, { useState as useState10 } from "react";
4535
+ import React22, { useState as useState12 } from "react";
3867
4536
  var DEFAULT_LIMIT = 25;
3868
4537
  function normalizeText(str) {
3869
4538
  if (!str) return "";
@@ -3943,7 +4612,7 @@ function getPositionBadge(position) {
3943
4612
  return { bg: colors.borderLight, text: colors.textSecondary };
3944
4613
  }
3945
4614
  function Badge({ label, bg, text }) {
3946
- return /* @__PURE__ */ React20.createElement("span", { style: {
4615
+ return /* @__PURE__ */ React22.createElement("span", { style: {
3947
4616
  display: "inline-block",
3948
4617
  background: bg,
3949
4618
  color: text,
@@ -3956,18 +4625,18 @@ function Badge({ label, bg, text }) {
3956
4625
  } }, label);
3957
4626
  }
3958
4627
  function SectionHeader({ title, yearFilter, years, onYearChange }) {
3959
- return /* @__PURE__ */ React20.createElement("div", { style: {
4628
+ return /* @__PURE__ */ React22.createElement("div", { style: {
3960
4629
  display: "flex",
3961
4630
  alignItems: "center",
3962
4631
  justifyContent: "space-between",
3963
4632
  marginBottom: spacing[4]
3964
- } }, /* @__PURE__ */ React20.createElement("h2", { style: {
4633
+ } }, /* @__PURE__ */ React22.createElement("h2", { style: {
3965
4634
  fontFamily: fonts.primary,
3966
4635
  fontSize: fontSizes.xl,
3967
4636
  fontWeight: fontWeights.bold,
3968
4637
  color: colors.evTeal,
3969
4638
  margin: 0
3970
- } }, title), years && years.length > 0 && /* @__PURE__ */ React20.createElement(
4639
+ } }, title), years && years.length > 0 && /* @__PURE__ */ React22.createElement(
3971
4640
  "select",
3972
4641
  {
3973
4642
  value: yearFilter,
@@ -3983,13 +4652,13 @@ function SectionHeader({ title, yearFilter, years, onYearChange }) {
3983
4652
  cursor: "pointer"
3984
4653
  }
3985
4654
  },
3986
- /* @__PURE__ */ React20.createElement("option", { value: "All" }, "All years"),
3987
- 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))
3988
4657
  ));
3989
4658
  }
3990
4659
  function ShowAllLink({ totalCount, visibleCount, onClick }) {
3991
4660
  if (totalCount <= visibleCount) return null;
3992
- 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(
3993
4662
  "button",
3994
4663
  {
3995
4664
  type: "button",
@@ -4017,7 +4686,7 @@ function ShowAllLink({ totalCount, visibleCount, onClick }) {
4017
4686
  ));
4018
4687
  }
4019
4688
  function EmptyState({ message }) {
4020
- return /* @__PURE__ */ React20.createElement("p", { style: {
4689
+ return /* @__PURE__ */ React22.createElement("p", { style: {
4021
4690
  fontFamily: fonts.primary,
4022
4691
  fontSize: fontSizes.sm,
4023
4692
  color: colors.textMuted,
@@ -4027,24 +4696,24 @@ function EmptyState({ message }) {
4027
4696
  } }, message);
4028
4697
  }
4029
4698
  function Spinner() {
4030
- return /* @__PURE__ */ React20.createElement("div", { style: {
4699
+ return /* @__PURE__ */ React22.createElement("div", { style: {
4031
4700
  display: "flex",
4032
4701
  justifyContent: "center",
4033
4702
  alignItems: "center",
4034
4703
  padding: spacing[10]
4035
- } }, /* @__PURE__ */ React20.createElement("div", { style: {
4704
+ } }, /* @__PURE__ */ React22.createElement("div", { style: {
4036
4705
  width: "40px",
4037
4706
  height: "40px",
4038
4707
  borderRadius: borderRadius.full,
4039
4708
  border: `3px solid ${colors.borderLight}`,
4040
4709
  borderTopColor: colors.evTeal,
4041
4710
  animation: "ev-spin 0.8s linear infinite"
4042
- } }), /* @__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); } }`));
4043
4712
  }
4044
4713
  function CommitteesSection({ committees, leadership }) {
4045
- const [showAll, setShowAll] = useState10(false);
4714
+ const [showAll, setShowAll] = useState12(false);
4046
4715
  const visible = showAll ? committees : committees.slice(0, DEFAULT_LIMIT);
4047
- 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: {
4048
4717
  display: "inline-flex",
4049
4718
  alignItems: "center",
4050
4719
  gap: spacing[1],
@@ -4055,23 +4724,23 @@ function CommitteesSection({ committees, leadership }) {
4055
4724
  fontFamily: fonts.primary,
4056
4725
  fontSize: fontSizes.sm,
4057
4726
  fontWeight: fontWeights.semibold
4058
- } }, 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) => {
4059
4728
  const badge = getRoleBadge(c.role);
4060
- return /* @__PURE__ */ React20.createElement("div", { key: i, style: {
4729
+ return /* @__PURE__ */ React22.createElement("div", { key: i, style: {
4061
4730
  display: "flex",
4062
4731
  alignItems: "center",
4063
4732
  justifyContent: "space-between",
4064
4733
  padding: `${spacing[3]} 0`,
4065
4734
  borderBottom: `1px solid ${colors.borderLight}`,
4066
4735
  gap: spacing[3]
4067
- } }, /* @__PURE__ */ React20.createElement("span", { style: {
4736
+ } }, /* @__PURE__ */ React22.createElement("span", { style: {
4068
4737
  fontFamily: fonts.primary,
4069
4738
  fontSize: fontSizes.sm,
4070
4739
  color: colors.textSecondary,
4071
4740
  flex: 1,
4072
4741
  minWidth: 0
4073
- } }, 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 }));
4074
- })), !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(
4075
4744
  ShowAllLink,
4076
4745
  {
4077
4746
  totalCount: committees.length,
@@ -4082,15 +4751,15 @@ function CommitteesSection({ committees, leadership }) {
4082
4751
  }
4083
4752
  function LegislationSection({ bills, isMobile }) {
4084
4753
  const years = getYears(bills, "introduced_at");
4085
- const [yearFilter, setYearFilter] = useState10("All");
4086
- const [showAll, setShowAll] = useState10(false);
4754
+ const [yearFilter, setYearFilter] = useState12("All");
4755
+ const [showAll, setShowAll] = useState12(false);
4087
4756
  const handleYearChange = (y) => {
4088
4757
  setYearFilter(y);
4089
4758
  setShowAll(false);
4090
4759
  };
4091
4760
  const filtered = yearFilter === "All" ? bills : bills.filter((b) => extractYear(b.introduced_at) === yearFilter);
4092
4761
  const visible = showAll ? filtered : filtered.slice(0, DEFAULT_LIMIT);
4093
- 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(
4094
4763
  SectionHeader,
4095
4764
  {
4096
4765
  title: "Sponsored Legislation",
@@ -4098,42 +4767,42 @@ function LegislationSection({ bills, isMobile }) {
4098
4767
  years,
4099
4768
  onYearChange: handleYearChange
4100
4769
  }
4101
- ), 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) => {
4102
4771
  const statusBadge = getStatusBadge(bill.status_label);
4103
- return /* @__PURE__ */ React20.createElement("div", { key: i, style: {
4772
+ return /* @__PURE__ */ React22.createElement("div", { key: i, style: {
4104
4773
  display: "flex",
4105
4774
  flexDirection: isMobile ? "column" : "row",
4106
4775
  alignItems: isMobile ? "flex-start" : "center",
4107
4776
  gap: isMobile ? spacing[1] : spacing[3],
4108
4777
  padding: `${spacing[3]} 0`,
4109
4778
  borderBottom: `1px solid ${colors.borderLight}`
4110
- } }, /* @__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: {
4111
4780
  fontFamily: fonts.primary,
4112
4781
  fontSize: fontSizes.xs,
4113
4782
  fontWeight: fontWeights.bold,
4114
4783
  color: colors.textSecondary,
4115
4784
  marginRight: spacing[2]
4116
- } }, bill.number), /* @__PURE__ */ React20.createElement("span", { style: {
4785
+ } }, bill.number), /* @__PURE__ */ React22.createElement("span", { style: {
4117
4786
  fontFamily: fonts.primary,
4118
4787
  fontSize: fontSizes.sm,
4119
4788
  color: colors.textSecondary
4120
- } }, bill.title)), /* @__PURE__ */ React20.createElement("div", { style: {
4789
+ } }, bill.title)), /* @__PURE__ */ React22.createElement("div", { style: {
4121
4790
  display: "flex",
4122
4791
  alignItems: "center",
4123
4792
  gap: spacing[2],
4124
4793
  flexShrink: 0,
4125
4794
  flexWrap: "wrap"
4126
- } }, /* @__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: {
4127
4796
  fontFamily: fonts.primary,
4128
4797
  fontSize: fontSizes.xs,
4129
4798
  color: colors.textMuted
4130
- } }, formatDate2(bill.introduced_at)), /* @__PURE__ */ React20.createElement("span", { style: {
4799
+ } }, formatDate2(bill.introduced_at)), /* @__PURE__ */ React22.createElement("span", { style: {
4131
4800
  fontFamily: fonts.primary,
4132
4801
  fontSize: fontSizes.xs,
4133
4802
  color: colors.textMuted,
4134
4803
  fontStyle: "italic"
4135
4804
  } }, bill.is_sponsor ? "Sponsored" : "Cosponsored")));
4136
- })), !showAll && /* @__PURE__ */ React20.createElement(
4805
+ })), !showAll && /* @__PURE__ */ React22.createElement(
4137
4806
  ShowAllLink,
4138
4807
  {
4139
4808
  totalCount: filtered.length,
@@ -4144,15 +4813,15 @@ function LegislationSection({ bills, isMobile }) {
4144
4813
  }
4145
4814
  function VotingSection({ votes, isMobile }) {
4146
4815
  const years = getYears(votes, "vote_date");
4147
- const [yearFilter, setYearFilter] = useState10("All");
4148
- const [showAll, setShowAll] = useState10(false);
4816
+ const [yearFilter, setYearFilter] = useState12("All");
4817
+ const [showAll, setShowAll] = useState12(false);
4149
4818
  const handleYearChange = (y) => {
4150
4819
  setYearFilter(y);
4151
4820
  setShowAll(false);
4152
4821
  };
4153
4822
  const filtered = yearFilter === "All" ? votes : votes.filter((v) => extractYear(v.vote_date) === yearFilter);
4154
4823
  const visible = showAll ? filtered : filtered.slice(0, DEFAULT_LIMIT);
4155
- 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(
4156
4825
  SectionHeader,
4157
4826
  {
4158
4827
  title: "Voting Record",
@@ -4160,38 +4829,38 @@ function VotingSection({ votes, isMobile }) {
4160
4829
  years,
4161
4830
  onYearChange: handleYearChange
4162
4831
  }
4163
- ), 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) => {
4164
4833
  const positionBadge = getPositionBadge(vote.position);
4165
4834
  const normPosition = normalizeText(vote.position);
4166
4835
  const topic = vote.bill_title || vote.vote_question;
4167
4836
  const sourceUrl = vote.bill_url;
4168
- return /* @__PURE__ */ React20.createElement("div", { key: i, style: {
4837
+ return /* @__PURE__ */ React22.createElement("div", { key: i, style: {
4169
4838
  display: "flex",
4170
4839
  flexDirection: isMobile ? "column" : "row",
4171
4840
  alignItems: isMobile ? "flex-start" : "center",
4172
4841
  gap: isMobile ? spacing[1] : spacing[3],
4173
4842
  padding: `${spacing[3]} 0`,
4174
4843
  borderBottom: `1px solid ${colors.borderLight}`
4175
- } }, /* @__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: {
4176
4845
  fontFamily: fonts.primary,
4177
4846
  fontSize: fontSizes.sm,
4178
4847
  color: colors.textSecondary
4179
- } }, topic)), /* @__PURE__ */ React20.createElement("div", { style: {
4848
+ } }, topic)), /* @__PURE__ */ React22.createElement("div", { style: {
4180
4849
  display: "flex",
4181
4850
  alignItems: "center",
4182
4851
  gap: spacing[2],
4183
4852
  flexShrink: 0,
4184
4853
  flexWrap: "wrap"
4185
- } }, vote.vote_date && /* @__PURE__ */ React20.createElement("span", { style: {
4854
+ } }, vote.vote_date && /* @__PURE__ */ React22.createElement("span", { style: {
4186
4855
  fontFamily: fonts.primary,
4187
4856
  fontSize: fontSizes.xs,
4188
4857
  color: colors.textMuted
4189
- } }, 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: {
4190
4859
  fontFamily: fonts.primary,
4191
4860
  fontSize: fontSizes.xs,
4192
4861
  color: vote.result === "Passed" ? colors.success : colors.textMuted,
4193
4862
  fontWeight: fontWeights.medium
4194
- } }, vote.result), sourceUrl && /* @__PURE__ */ React20.createElement(
4863
+ } }, vote.result), sourceUrl && /* @__PURE__ */ React22.createElement(
4195
4864
  "a",
4196
4865
  {
4197
4866
  href: sourceUrl,
@@ -4212,7 +4881,7 @@ function VotingSection({ votes, isMobile }) {
4212
4881
  },
4213
4882
  "Source"
4214
4883
  )));
4215
- })), !showAll && /* @__PURE__ */ React20.createElement(
4884
+ })), !showAll && /* @__PURE__ */ React22.createElement(
4216
4885
  ShowAllLink,
4217
4886
  {
4218
4887
  totalCount: filtered.length,
@@ -4231,20 +4900,20 @@ function LegislativeRecord({
4231
4900
  }) {
4232
4901
  const isMobile = useMediaQuery("(max-width: 768px)");
4233
4902
  if (loading) {
4234
- return /* @__PURE__ */ React20.createElement(Spinner, null);
4903
+ return /* @__PURE__ */ React22.createElement(Spinner, null);
4235
4904
  }
4236
- 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: {
4237
4906
  fontFamily: fonts.primary,
4238
4907
  fontSize: isMobile ? fontSizes["2xl"] : fontSizes["4xl"],
4239
4908
  fontWeight: fontWeights.bold,
4240
4909
  color: colors.evTeal,
4241
4910
  marginBottom: spacing[8],
4242
4911
  marginTop: 0
4243
- } }, "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 }));
4244
4913
  }
4245
4914
 
4246
4915
  // src/JudicialRecordDetail.jsx
4247
- import React21 from "react";
4916
+ import React23 from "react";
4248
4917
  var containerStyle = {
4249
4918
  fontFamily: "'Manrope', sans-serif",
4250
4919
  maxWidth: "800px"
@@ -4329,7 +4998,7 @@ var emptyStateStyle = {
4329
4998
  function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
4330
4999
  var _a;
4331
5000
  if (!judicialRecord) {
4332
- 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."));
4333
5002
  }
4334
5003
  const {
4335
5004
  judge_detail: detail,
@@ -4338,13 +5007,13 @@ function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
4338
5007
  disciplinary_records: disciplinary = []
4339
5008
  } = judicialRecord;
4340
5009
  const displayName = politician.full_name || `${politician.first_name || ""} ${politician.last_name || ""}`.trim();
4341
- 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: {
4342
5011
  borderLeft: "3px solid #fc8181",
4343
5012
  backgroundColor: "#fff5f5",
4344
5013
  borderRadius: "0 6px 6px 0",
4345
5014
  padding: "12px 16px",
4346
5015
  marginBottom: "10px"
4347
- } }, /* @__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(
4348
5017
  "a",
4349
5018
  {
4350
5019
  href: d.source_url,
@@ -4357,7 +5026,7 @@ function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
4357
5026
  }
4358
5027
 
4359
5028
  // src/AuthForm.jsx
4360
- import React22, { useState as useState11 } from "react";
5029
+ import React24, { useState as useState13 } from "react";
4361
5030
  function AuthForm({
4362
5031
  logoSrc = "/EVLogo.svg",
4363
5032
  appName = "Empowered Vote",
@@ -4368,11 +5037,11 @@ function AuthForm({
4368
5037
  error = null,
4369
5038
  submitting = false
4370
5039
  }) {
4371
- const [username, setUsername] = useState11("");
4372
- const [password, setPassword] = useState11("");
4373
- const [confirmPassword, setConfirmPassword] = useState11("");
4374
- const [showPasswords, setShowPasswords] = useState11(false);
4375
- 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);
4376
5045
  const isLogin = mode === "login";
4377
5046
  const handleSubmit = (e) => {
4378
5047
  e.preventDefault();
@@ -4384,7 +5053,7 @@ function AuthForm({
4384
5053
  setPasswordMismatch(false);
4385
5054
  onSubmit == null ? void 0 : onSubmit(username.trim(), password);
4386
5055
  };
4387
- const EyeOpen = () => /* @__PURE__ */ React22.createElement(
5056
+ const EyeOpen = () => /* @__PURE__ */ React24.createElement(
4388
5057
  "svg",
4389
5058
  {
4390
5059
  xmlns: "http://www.w3.org/2000/svg",
@@ -4394,7 +5063,7 @@ function AuthForm({
4394
5063
  stroke: "currentColor",
4395
5064
  style: { width: "20px", height: "20px" }
4396
5065
  },
4397
- /* @__PURE__ */ React22.createElement(
5066
+ /* @__PURE__ */ React24.createElement(
4398
5067
  "path",
4399
5068
  {
4400
5069
  strokeLinecap: "round",
@@ -4402,7 +5071,7 @@ function AuthForm({
4402
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"
4403
5072
  }
4404
5073
  ),
4405
- /* @__PURE__ */ React22.createElement(
5074
+ /* @__PURE__ */ React24.createElement(
4406
5075
  "path",
4407
5076
  {
4408
5077
  strokeLinecap: "round",
@@ -4411,7 +5080,7 @@ function AuthForm({
4411
5080
  }
4412
5081
  )
4413
5082
  );
4414
- const EyeClosed = () => /* @__PURE__ */ React22.createElement(
5083
+ const EyeClosed = () => /* @__PURE__ */ React24.createElement(
4415
5084
  "svg",
4416
5085
  {
4417
5086
  xmlns: "http://www.w3.org/2000/svg",
@@ -4421,7 +5090,7 @@ function AuthForm({
4421
5090
  stroke: "currentColor",
4422
5091
  style: { width: "20px", height: "20px" }
4423
5092
  },
4424
- /* @__PURE__ */ React22.createElement(
5093
+ /* @__PURE__ */ React24.createElement(
4425
5094
  "path",
4426
5095
  {
4427
5096
  strokeLinecap: "round",
@@ -4430,17 +5099,17 @@ function AuthForm({
4430
5099
  }
4431
5100
  )
4432
5101
  );
4433
- const PasswordToggle = () => /* @__PURE__ */ React22.createElement(
5102
+ const PasswordToggle = () => /* @__PURE__ */ React24.createElement(
4434
5103
  "button",
4435
5104
  {
4436
5105
  type: "button",
4437
5106
  onClick: () => setShowPasswords((prev) => !prev),
4438
5107
  style: styles.passwordToggle
4439
5108
  },
4440
- showPasswords ? /* @__PURE__ */ React22.createElement(EyeOpen, null) : /* @__PURE__ */ React22.createElement(EyeClosed, null)
5109
+ showPasswords ? /* @__PURE__ */ React24.createElement(EyeOpen, null) : /* @__PURE__ */ React24.createElement(EyeClosed, null)
4441
5110
  );
4442
5111
  const displayError = passwordMismatch ? "Passwords do not match." : error;
4443
- 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(
4444
5113
  "input",
4445
5114
  {
4446
5115
  type: "text",
@@ -4457,7 +5126,7 @@ function AuthForm({
4457
5126
  },
4458
5127
  required: true
4459
5128
  }
4460
- )), /* @__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(
4461
5130
  "input",
4462
5131
  {
4463
5132
  type: showPasswords ? "text" : "password",
@@ -4473,7 +5142,7 @@ function AuthForm({
4473
5142
  },
4474
5143
  required: true
4475
5144
  }
4476
- ), /* @__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(
4477
5146
  "input",
4478
5147
  {
4479
5148
  type: showPasswords ? "text" : "password",
@@ -4489,7 +5158,7 @@ function AuthForm({
4489
5158
  },
4490
5159
  required: true
4491
5160
  }
4492
- ), /* @__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(
4493
5162
  "button",
4494
5163
  {
4495
5164
  type: "submit",
@@ -4507,7 +5176,7 @@ function AuthForm({
4507
5176
  }
4508
5177
  },
4509
5178
  submitting ? isLogin ? "Signing In..." : "Creating Account..." : isLogin ? "Sign In" : "Create Account"
4510
- ), 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(
4511
5180
  "button",
4512
5181
  {
4513
5182
  type: "button",
@@ -4680,9 +5349,9 @@ var styles = {
4680
5349
  };
4681
5350
 
4682
5351
  // src/TopicTierBadge.jsx
4683
- import React23 from "react";
5352
+ import React25 from "react";
4684
5353
  function LandmarkIcon({ size = 14 }) {
4685
- return /* @__PURE__ */ React23.createElement(
5354
+ return /* @__PURE__ */ React25.createElement(
4686
5355
  "svg",
4687
5356
  {
4688
5357
  width: size,
@@ -4696,16 +5365,16 @@ function LandmarkIcon({ size = 14 }) {
4696
5365
  xmlns: "http://www.w3.org/2000/svg",
4697
5366
  "aria-hidden": "true"
4698
5367
  },
4699
- /* @__PURE__ */ React23.createElement("path", { d: "M10 18v-7" }),
4700
- /* @__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" }),
4701
- /* @__PURE__ */ React23.createElement("path", { d: "M14 18v-7" }),
4702
- /* @__PURE__ */ React23.createElement("path", { d: "M18 18v-7" }),
4703
- /* @__PURE__ */ React23.createElement("path", { d: "M3 22h18" }),
4704
- /* @__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" })
4705
5374
  );
4706
5375
  }
4707
5376
  function Building2Icon({ size = 14 }) {
4708
- return /* @__PURE__ */ React23.createElement(
5377
+ return /* @__PURE__ */ React25.createElement(
4709
5378
  "svg",
4710
5379
  {
4711
5380
  width: size,
@@ -4719,17 +5388,17 @@ function Building2Icon({ size = 14 }) {
4719
5388
  xmlns: "http://www.w3.org/2000/svg",
4720
5389
  "aria-hidden": "true"
4721
5390
  },
4722
- /* @__PURE__ */ React23.createElement("path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }),
4723
- /* @__PURE__ */ React23.createElement("path", { d: "M6 12H4a2 2 0 0 0-2 2v8h4" }),
4724
- /* @__PURE__ */ React23.createElement("path", { d: "M18 9h2a2 2 0 0 1 2 2v11h-4" }),
4725
- /* @__PURE__ */ React23.createElement("path", { d: "M10 6h4" }),
4726
- /* @__PURE__ */ React23.createElement("path", { d: "M10 10h4" }),
4727
- /* @__PURE__ */ React23.createElement("path", { d: "M10 14h4" }),
4728
- /* @__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" })
4729
5398
  );
4730
5399
  }
4731
5400
  function HomeIcon({ size = 14 }) {
4732
- return /* @__PURE__ */ React23.createElement(
5401
+ return /* @__PURE__ */ React25.createElement(
4733
5402
  "svg",
4734
5403
  {
4735
5404
  width: size,
@@ -4743,8 +5412,8 @@ function HomeIcon({ size = 14 }) {
4743
5412
  xmlns: "http://www.w3.org/2000/svg",
4744
5413
  "aria-hidden": "true"
4745
5414
  },
4746
- /* @__PURE__ */ React23.createElement("path", { d: "m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }),
4747
- /* @__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" })
4748
5417
  );
4749
5418
  }
4750
5419
  var TIER_INFO = {
@@ -4804,7 +5473,7 @@ function TopicTierBadge({
4804
5473
  userSelect: "none"
4805
5474
  };
4806
5475
  };
4807
- return /* @__PURE__ */ React23.createElement(
5476
+ return /* @__PURE__ */ React25.createElement(
4808
5477
  "span",
4809
5478
  {
4810
5479
  className: "ev-topic-tier-badge",
@@ -4814,13 +5483,13 @@ function TopicTierBadge({
4814
5483
  },
4815
5484
  effectiveTiers.map((tier) => {
4816
5485
  const { label, Icon } = TIER_INFO[tier];
4817
- 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));
4818
5487
  })
4819
5488
  );
4820
5489
  }
4821
5490
 
4822
5491
  // src/CompassCoverageCallout.jsx
4823
- import React24, { useState as useState12 } from "react";
5492
+ import React26, { useState as useState14 } from "react";
4824
5493
  var TIER_LABELS = {
4825
5494
  federal: "federal",
4826
5495
  state: "state",
@@ -4833,7 +5502,7 @@ function CompassCoverageCallout({
4833
5502
  compassUrl,
4834
5503
  onDismiss
4835
5504
  }) {
4836
- const [dismissed, setDismissed] = useState12(false);
5505
+ const [dismissed, setDismissed] = useState14(false);
4837
5506
  if (dismissed) return null;
4838
5507
  const tierLabel = TIER_LABELS[tier] || tier;
4839
5508
  const tierStyle = tierColors[tier] || tierColors.federal;
@@ -4884,15 +5553,15 @@ function CompassCoverageCallout({
4884
5553
  setDismissed(true);
4885
5554
  if (onDismiss) onDismiss();
4886
5555
  };
4887
- return /* @__PURE__ */ React24.createElement(
5556
+ return /* @__PURE__ */ React26.createElement(
4888
5557
  "div",
4889
5558
  {
4890
5559
  className: "ev-compass-coverage-callout",
4891
5560
  role: "status",
4892
5561
  style: containerStyle2
4893
5562
  },
4894
- /* @__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")),
4895
- 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(
4896
5565
  "button",
4897
5566
  {
4898
5567
  onClick: handleDismiss,
@@ -4905,7 +5574,7 @@ function CompassCoverageCallout({
4905
5574
  }
4906
5575
 
4907
5576
  // src/ExpandCompassNudge.jsx
4908
- import React25 from "react";
5577
+ import React27 from "react";
4909
5578
  function ExpandCompassNudge({
4910
5579
  politicianName,
4911
5580
  missingCount,
@@ -4952,7 +5621,7 @@ function ExpandCompassNudge({
4952
5621
  };
4953
5622
  const topicsLabel = missingCount === 1 ? "topic" : "topics";
4954
5623
  const speakerName = politicianName || "This politician";
4955
- 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"));
4956
5625
  }
4957
5626
 
4958
5627
  // src/computeTierCoverage.js
@@ -4973,14 +5642,14 @@ function computeTierCoverage(topics) {
4973
5642
  }
4974
5643
 
4975
5644
  // src/StanceAccordion.jsx
4976
- 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";
4977
5646
 
4978
5647
  // src/Favicon.jsx
4979
- import React26 from "react";
5648
+ import React28 from "react";
4980
5649
  function Favicon({ url, size = 16 }) {
4981
5650
  try {
4982
5651
  const domain = new URL(url).hostname;
4983
- return /* @__PURE__ */ React26.createElement(
5652
+ return /* @__PURE__ */ React28.createElement(
4984
5653
  "img",
4985
5654
  {
4986
5655
  src: `https://www.google.com/s2/favicons?sz=${size}&domain=${domain}`,
@@ -4991,7 +5660,7 @@ function Favicon({ url, size = 16 }) {
4991
5660
  }
4992
5661
  );
4993
5662
  } catch {
4994
- return /* @__PURE__ */ React26.createElement(
5663
+ return /* @__PURE__ */ React28.createElement(
4995
5664
  "svg",
4996
5665
  {
4997
5666
  width: size,
@@ -5002,8 +5671,8 @@ function Favicon({ url, size = 16 }) {
5002
5671
  strokeWidth: "1.5",
5003
5672
  style: { verticalAlign: "middle", flexShrink: 0 }
5004
5673
  },
5005
- /* @__PURE__ */ React26.createElement("circle", { cx: "12", cy: "12", r: "10" }),
5006
- /* @__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" })
5007
5676
  );
5008
5677
  }
5009
5678
  }
@@ -5034,9 +5703,9 @@ function StanceAccordion({
5034
5703
  apiUrl = "https://api.empowered.vote"
5035
5704
  }) {
5036
5705
  var _a;
5037
- const [expandedTopicId, setExpandedTopicId] = useState13(null);
5038
- const [loadingId, setLoadingId] = useState13(null);
5039
- const [showAll, setShowAll] = useState13(false);
5706
+ const [expandedTopicId, setExpandedTopicId] = useState15(null);
5707
+ const [loadingId, setLoadingId] = useState15(null);
5708
+ const [showAll, setShowAll] = useState15(false);
5040
5709
  const contextCache = useRef3(/* @__PURE__ */ new Map());
5041
5710
  const quotesCache = useRef3(null);
5042
5711
  const polAnswerMap = {};
@@ -5114,7 +5783,7 @@ function StanceAccordion({
5114
5783
  },
5115
5784
  [expandedTopicId, politicianId, apiUrl]
5116
5785
  );
5117
- useEffect7(() => {
5786
+ useEffect9(() => {
5118
5787
  if (initialExpandedTopicId && topics && topics.length > 0) {
5119
5788
  handleToggle(String(initialExpandedTopicId));
5120
5789
  }
@@ -5130,13 +5799,13 @@ function StanceAccordion({
5130
5799
  visibleTopics = [pinned, ...baseTopics.filter((t) => String(t.id) !== String(initialExpandedTopicId))];
5131
5800
  }
5132
5801
  }
5133
- return /* @__PURE__ */ React27.createElement(
5802
+ return /* @__PURE__ */ React29.createElement(
5134
5803
  "div",
5135
5804
  {
5136
5805
  className: "flex flex-col",
5137
5806
  style: { fontFamily: "'Manrope', sans-serif" }
5138
5807
  },
5139
- /* @__PURE__ */ React27.createElement(
5808
+ /* @__PURE__ */ React29.createElement(
5140
5809
  "h3",
5141
5810
  {
5142
5811
  className: "text-sm font-semibold text-neutral-400 uppercase tracking-wider mb-2",
@@ -5158,15 +5827,15 @@ function StanceAccordion({
5158
5827
  if (topic.topic_key) return q.issue === topic.topic_key;
5159
5828
  return topic.short_title && q.issue.toLowerCase() === topic.short_title.toLowerCase();
5160
5829
  }) : [];
5161
- 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(
5162
5831
  "button",
5163
5832
  {
5164
5833
  type: "button",
5165
5834
  onClick: () => handleToggle(topicId),
5166
5835
  className: "w-full flex items-center justify-between py-3 px-2 text-left cursor-pointer hover:bg-neutral-50 transition-colors"
5167
5836
  },
5168
- /* @__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)),
5169
- /* @__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(
5170
5839
  "svg",
5171
5840
  {
5172
5841
  width: "16",
@@ -5183,9 +5852,9 @@ function StanceAccordion({
5183
5852
  transition: "transform 0.2s ease"
5184
5853
  }
5185
5854
  },
5186
- /* @__PURE__ */ React27.createElement("polyline", { points: "9 18 15 12 9 6" })
5855
+ /* @__PURE__ */ React29.createElement("polyline", { points: "9 18 15 12 9 6" })
5187
5856
  )
5188
- ), /* @__PURE__ */ React27.createElement(
5857
+ ), /* @__PURE__ */ React29.createElement(
5189
5858
  "div",
5190
5859
  {
5191
5860
  style: {
@@ -5194,7 +5863,7 @@ function StanceAccordion({
5194
5863
  transition: "grid-template-rows 0.25s ease"
5195
5864
  }
5196
5865
  },
5197
- /* @__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(
5198
5867
  "div",
5199
5868
  {
5200
5869
  style: {
@@ -5206,14 +5875,14 @@ function StanceAccordion({
5206
5875
  animation: "ev-spin 0.8s linear infinite"
5207
5876
  }
5208
5877
  }
5209
- )), !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(
5210
5879
  "p",
5211
5880
  {
5212
5881
  className: "text-sm text-neutral-700 mb-3",
5213
5882
  style: { whiteSpace: "pre-wrap", lineHeight: 1.6 }
5214
5883
  },
5215
5884
  cached.reasoning
5216
- ) : 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(
5217
5886
  "a",
5218
5887
  {
5219
5888
  href: src,
@@ -5221,9 +5890,9 @@ function StanceAccordion({
5221
5890
  rel: "noreferrer",
5222
5891
  className: "inline-flex items-center gap-1.5 hover:text-[#00657c] transition-colors"
5223
5892
  },
5224
- /* @__PURE__ */ React27.createElement(Favicon, { url: src }),
5225
- /* @__PURE__ */ React27.createElement("span", { className: "underline underline-offset-2" }, getDisplayUrl(src))
5226
- ))))), 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(
5227
5896
  "p",
5228
5897
  {
5229
5898
  style: {
@@ -5240,7 +5909,7 @@ function StanceAccordion({
5240
5909
  const verdict = verdictsByQuote ? verdictsByQuote[quote.id] : void 0;
5241
5910
  const borderColor = verdict === "agreed" ? "#0e7490" : verdict === "disagreed" ? "#b45309" : "#e2e8f0";
5242
5911
  const sourceName = quote.source_name || quote.sourceName;
5243
- return /* @__PURE__ */ React27.createElement(
5912
+ return /* @__PURE__ */ React29.createElement(
5244
5913
  "div",
5245
5914
  {
5246
5915
  key: quote.id,
@@ -5252,7 +5921,7 @@ function StanceAccordion({
5252
5921
  marginBottom: "8px"
5253
5922
  }
5254
5923
  },
5255
- /* @__PURE__ */ React27.createElement(
5924
+ /* @__PURE__ */ React29.createElement(
5256
5925
  "p",
5257
5926
  {
5258
5927
  style: {
@@ -5265,7 +5934,7 @@ function StanceAccordion({
5265
5934
  },
5266
5935
  quote.text
5267
5936
  ),
5268
- verdict === "agreed" && /* @__PURE__ */ React27.createElement(
5937
+ verdict === "agreed" && /* @__PURE__ */ React29.createElement(
5269
5938
  "span",
5270
5939
  {
5271
5940
  style: {
@@ -5282,10 +5951,10 @@ function StanceAccordion({
5282
5951
  flexShrink: 0
5283
5952
  }
5284
5953
  },
5285
- /* @__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" })),
5286
5955
  "Agreed"
5287
5956
  ),
5288
- verdict === "disagreed" && /* @__PURE__ */ React27.createElement(
5957
+ verdict === "disagreed" && /* @__PURE__ */ React29.createElement(
5289
5958
  "span",
5290
5959
  {
5291
5960
  style: {
@@ -5302,10 +5971,10 @@ function StanceAccordion({
5302
5971
  flexShrink: 0
5303
5972
  }
5304
5973
  },
5305
- /* @__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" })),
5306
5975
  "Disagreed"
5307
5976
  ),
5308
- sourceName && /* @__PURE__ */ React27.createElement(
5977
+ sourceName && /* @__PURE__ */ React29.createElement(
5309
5978
  "a",
5310
5979
  {
5311
5980
  href: quote.source_url || quote.sourceUrl,
@@ -5322,10 +5991,10 @@ function StanceAccordion({
5322
5991
  sourceName
5323
5992
  )
5324
5993
  );
5325
- })), !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."))))
5326
5995
  ));
5327
5996
  }),
5328
- hasToggle && /* @__PURE__ */ React27.createElement(
5997
+ hasToggle && /* @__PURE__ */ React29.createElement(
5329
5998
  "button",
5330
5999
  {
5331
6000
  type: "button",
@@ -5344,8 +6013,10 @@ export {
5344
6013
  CategorySection,
5345
6014
  CommitteeTable,
5346
6015
  CompassCardHorizontal,
6016
+ CompassCardVertical,
5347
6017
  CompassCoverageCallout,
5348
6018
  CompassIcon,
6019
+ CompassKey,
5349
6020
  ExpandCompassNudge,
5350
6021
  FilterSidebar,
5351
6022
  GovernmentBodySection,
@@ -5375,6 +6046,7 @@ export {
5375
6046
  defaultNavItems,
5376
6047
  duration,
5377
6048
  easing,
6049
+ evContext,
5378
6050
  focus,
5379
6051
  fontSizes,
5380
6052
  fontWeights,