@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.js CHANGED
@@ -35,8 +35,10 @@ __export(index_exports, {
35
35
  CategorySection: () => CategorySection,
36
36
  CommitteeTable: () => CommitteeTable,
37
37
  CompassCardHorizontal: () => CompassCardHorizontal,
38
+ CompassCardVertical: () => CompassCardVertical,
38
39
  CompassCoverageCallout: () => CompassCoverageCallout,
39
40
  CompassIcon: () => CompassIcon,
41
+ CompassKey: () => CompassKey,
40
42
  ExpandCompassNudge: () => ExpandCompassNudge,
41
43
  FilterSidebar: () => FilterSidebar,
42
44
  GovernmentBodySection: () => GovernmentBodySection,
@@ -66,6 +68,7 @@ __export(index_exports, {
66
68
  defaultNavItems: () => defaultNavItems,
67
69
  duration: () => duration,
68
70
  easing: () => easing,
71
+ evContext: () => evContext,
69
72
  focus: () => focus,
70
73
  fontSizes: () => fontSizes,
71
74
  fontWeights: () => fontWeights,
@@ -101,7 +104,8 @@ function RadarChartCore({
101
104
  size = 400,
102
105
  labelFontSize = 18,
103
106
  padding = 80,
104
- labelOffset = 20
107
+ labelOffset = 20,
108
+ tightFit = false
105
109
  }) {
106
110
  const radius = size / 2 - 40;
107
111
  const centerX = size / 2;
@@ -200,6 +204,20 @@ function RadarChartCore({
200
204
  const leftPadding = symmetricPadding;
201
205
  const rightPadding = symmetricPadding;
202
206
  const verticalPadding = padding;
207
+ let tightTop = -verticalPadding;
208
+ let tightHeight = size + verticalPadding * 2;
209
+ if (tightFit && numSpokes > 0) {
210
+ let yMin = Infinity, yMax = -Infinity;
211
+ for (let i = 0; i < numSpokes; i++) {
212
+ const angle = 2 * Math.PI * i / numSpokes;
213
+ const y = centerY - radius * Math.cos(angle);
214
+ if (y < yMin) yMin = y;
215
+ if (y > yMax) yMax = y;
216
+ }
217
+ const labelMargin = labelOffset + labelFontSize * 1.4 + labelFontSize * 1.1;
218
+ tightTop = yMin - labelMargin;
219
+ tightHeight = yMax + labelMargin - tightTop;
220
+ }
203
221
  const guidePolygons = [];
204
222
  for (let level = 1; level <= 5; level++) {
205
223
  const scale = level / 5;
@@ -218,7 +236,7 @@ function RadarChartCore({
218
236
  "svg",
219
237
  {
220
238
  className: "w-full h-auto max-h-full",
221
- viewBox: `-${leftPadding} -${verticalPadding} ${size + leftPadding + rightPadding} ${size + verticalPadding * 2}`,
239
+ viewBox: `-${leftPadding} ${tightTop} ${size + leftPadding + rightPadding} ${tightHeight}`,
222
240
  preserveAspectRatio: "xMidYMid meet"
223
241
  },
224
242
  guidePolygons,
@@ -276,6 +294,7 @@ function RadarChartCore({
276
294
  fill: isUnansweredLabel ? "#9ca3af" : void 0,
277
295
  style: { cursor: "pointer", userSelect: "none", fontSize: fSize }
278
296
  },
297
+ isUnansweredLabel && /* @__PURE__ */ import_react.default.createElement("title", null, "No stance on file for this topic."),
279
298
  lines.map((ln, idx) => /* @__PURE__ */ import_react.default.createElement("tspan", { key: idx, x: labelX, dy: idx === 0 ? "0" : `${lineHeight}` }, ln))
280
299
  );
281
300
  }),
@@ -302,18 +321,25 @@ function RadarChartCore({
302
321
  }
303
322
  }
304
323
  ),
305
- pointsArr.map(([cx, cy], i) => /* @__PURE__ */ import_react.default.createElement(
306
- "circle",
307
- {
308
- key: `user-dot-${i}`,
309
- cx,
310
- cy,
311
- r: 5,
312
- fill: "#7C6B9E",
313
- stroke: "#FFFFFF",
314
- strokeWidth: 2
315
- }
316
- )),
324
+ pointsArr.map(([cx, cy], i) => {
325
+ const shortTitle = spokes[i][0];
326
+ const userVal = spokes[i][1];
327
+ if (!userVal || Number(userVal) === 0) return null;
328
+ const compareVal = compareData[shortTitle];
329
+ const matches = hasCompareData && userVal !== 0 && compareVal !== 0 && compareVal != null && Number(userVal) === Number(compareVal);
330
+ return /* @__PURE__ */ import_react.default.createElement(
331
+ "circle",
332
+ {
333
+ key: `user-dot-${i}`,
334
+ cx,
335
+ cy,
336
+ r: matches ? 8 : 7,
337
+ fill: matches ? "#fed12e" : "#7C6B9E",
338
+ stroke: "#FFFFFF",
339
+ strokeWidth: 3
340
+ }
341
+ );
342
+ }),
317
343
  hasCompareData && comparePoints ? countChanged || compareJustAppeared ? /* @__PURE__ */ import_react.default.createElement(
318
344
  "polygon",
319
345
  {
@@ -337,18 +363,25 @@ function RadarChartCore({
337
363
  }
338
364
  }
339
365
  ) : null,
340
- hasCompareData && compareCoords && compareCoords.map(([cx, cy], i) => /* @__PURE__ */ import_react.default.createElement(
341
- "circle",
342
- {
343
- key: `compare-dot-${i}`,
344
- cx,
345
- cy,
346
- r: 4,
347
- fill: "#5A9A6E",
348
- stroke: "#FFFFFF",
349
- strokeWidth: 2
350
- }
351
- )),
366
+ hasCompareData && compareCoords && compareCoords.map(([cx, cy], i) => {
367
+ const shortTitle = spokes[i][0];
368
+ const userVal = spokes[i][1];
369
+ const compareVal = compareData[shortTitle];
370
+ if (!compareVal || Number(compareVal) === 0) return null;
371
+ const matches = userVal !== 0 && compareVal !== 0 && compareVal != null && Number(userVal) === Number(compareVal);
372
+ return /* @__PURE__ */ import_react.default.createElement(
373
+ "circle",
374
+ {
375
+ key: `compare-dot-${i}`,
376
+ cx,
377
+ cy,
378
+ r: matches ? 8 : 7,
379
+ fill: matches ? "#fed12e" : "#5A9A6E",
380
+ stroke: "#FFFFFF",
381
+ strokeWidth: 3
382
+ }
383
+ );
384
+ }),
352
385
  spokes.map(([shortTitle], i) => {
353
386
  const angle = 2 * Math.PI * i / numSpokes;
354
387
  const x = centerX + radius * Math.sin(angle);
@@ -2149,7 +2182,7 @@ function CompassCardHorizontalMeta({
2149
2182
  IconOverlay,
2150
2183
  {
2151
2184
  ballot: politician.ballot || null,
2152
- hasStances: Boolean(userAnswers && userAnswers.length > 0) || Boolean(politician.hasStances),
2185
+ hasStances: false,
2153
2186
  branch: politician.branch || null
2154
2187
  }
2155
2188
  ));
@@ -2180,11 +2213,12 @@ function buildAnswerMapByShortTitle(allTopics, allAnswers, allowedShorts) {
2180
2213
  }
2181
2214
 
2182
2215
  // src/CompassCardHorizontal.jsx
2183
- var RADAR_SIZE = 250;
2184
- var SLOT_WIDTH = 260;
2216
+ var RADAR_SIZE = 400;
2217
+ var SLOT_WIDTH = 420;
2185
2218
  function CompassCardHorizontal({
2186
2219
  politician,
2187
2220
  userAnswers = null,
2221
+ invertedSpokes = {},
2188
2222
  tierVisuals = null,
2189
2223
  view = "compass",
2190
2224
  surface = "representatives",
@@ -2268,7 +2302,7 @@ function CompassCardHorizontal({
2268
2302
  topics,
2269
2303
  data,
2270
2304
  compareData,
2271
- invertedSpokes: {},
2305
+ invertedSpokes: invertedSpokes || {},
2272
2306
  onToggleInversion: () => {
2273
2307
  },
2274
2308
  onReplaceTopic: () => {
@@ -2445,8 +2479,644 @@ function CompassCardHorizontal({
2445
2479
  );
2446
2480
  }
2447
2481
 
2448
- // src/CategorySection.jsx
2482
+ // src/CompassCardVertical.jsx
2449
2483
  var import_react14 = __toESM(require("react"));
2484
+ var RADAR_SIZE2 = 400;
2485
+ function CompassCardVertical({
2486
+ politician,
2487
+ userAnswers = null,
2488
+ invertedSpokes = {},
2489
+ tierVisuals = null,
2490
+ view = "compass",
2491
+ surface = "representatives",
2492
+ variant = "compass",
2493
+ onBuildCompass = null,
2494
+ onClick
2495
+ }) {
2496
+ var _a;
2497
+ const [hovered, setHovered] = (0, import_react14.useState)(false);
2498
+ const [focused, setFocused] = (0, import_react14.useState)(false);
2499
+ const [imgError, setImgError] = (0, import_react14.useState)(false);
2500
+ const [emptyCtaHovered, setEmptyCtaHovered] = (0, import_react14.useState)(false);
2501
+ (0, import_react14.useEffect)(() => {
2502
+ setImgError(false);
2503
+ }, [politician == null ? void 0 : politician.photo_origin_url]);
2504
+ const cardStyle = {
2505
+ position: "relative",
2506
+ display: "flex",
2507
+ flexDirection: "column",
2508
+ height: "100%",
2509
+ backgroundColor: (_a = tierVisuals == null ? void 0 : tierVisuals.bg) != null ? _a : colors.bgWhite,
2510
+ border: `1px solid ${colors.borderLight}`,
2511
+ borderRadius: borderRadius.xl,
2512
+ overflow: "hidden",
2513
+ boxShadow: focused ? focus.ring : hovered ? shadows.cardHover : shadows.md,
2514
+ transform: hovered ? "translateY(-2px)" : "none",
2515
+ transition: `box-shadow ${duration.normal} ease, transform ${duration.normal} ease`,
2516
+ cursor: onClick ? "pointer" : "default",
2517
+ fontFamily: fonts.primary,
2518
+ outline: "none"
2519
+ };
2520
+ const titleText = surface === "elections" ? politician.office_running_for : politician.office_title;
2521
+ function renderCompass() {
2522
+ var _a2, _b, _c;
2523
+ if (!userAnswers || userAnswers.length === 0) {
2524
+ return /* @__PURE__ */ import_react14.default.createElement(PlaceholderRadar, { size: RADAR_SIZE2, name: (politician == null ? void 0 : politician.full_name) || "" });
2525
+ }
2526
+ let topics = [];
2527
+ let data = {};
2528
+ let compareData = {};
2529
+ try {
2530
+ if (Array.isArray(userAnswers) && userAnswers.length > 0) {
2531
+ const hasEmbeddedTopics = (_b = (_a2 = userAnswers[0]) == null ? void 0 : _a2.topic) == null ? void 0 : _b.short_title;
2532
+ if (hasEmbeddedTopics) {
2533
+ const allowedShorts = userAnswers.map((a) => a.topic.short_title);
2534
+ const allTopics = userAnswers.map((a) => a.topic);
2535
+ const { topicsFiltered, answersByShort } = buildAnswerMapByShortTitle(
2536
+ allTopics,
2537
+ userAnswers,
2538
+ allowedShorts
2539
+ );
2540
+ topics = topicsFiltered;
2541
+ data = answersByShort;
2542
+ } else {
2543
+ if (!Array.isArray(userAnswers[0])) {
2544
+ 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 }));
2545
+ data = {};
2546
+ for (const a of userAnswers) {
2547
+ if (a.short_title) data[a.short_title] = (_c = a.value) != null ? _c : 0;
2548
+ }
2549
+ }
2550
+ }
2551
+ }
2552
+ if ((politician == null ? void 0 : politician.stances) && typeof politician.stances === "object") {
2553
+ compareData = Array.isArray(politician.stances) ? politician.stances.reduce((acc, s) => {
2554
+ var _a3;
2555
+ if (s.short_title) acc[s.short_title] = (_a3 = s.value) != null ? _a3 : 0;
2556
+ return acc;
2557
+ }, {}) : politician.stances;
2558
+ }
2559
+ if (topics.length === 0) {
2560
+ return /* @__PURE__ */ import_react14.default.createElement(PlaceholderRadar, { size: RADAR_SIZE2, name: (politician == null ? void 0 : politician.full_name) || "" });
2561
+ }
2562
+ } catch {
2563
+ return /* @__PURE__ */ import_react14.default.createElement(PlaceholderRadar, { size: RADAR_SIZE2, name: (politician == null ? void 0 : politician.full_name) || "" });
2564
+ }
2565
+ const unansweredSpokes = {};
2566
+ for (const t of topics) {
2567
+ const v = compareData[t.short_title];
2568
+ if (!v || Number(v) === 0) unansweredSpokes[t.short_title] = true;
2569
+ }
2570
+ return /* @__PURE__ */ import_react14.default.createElement("div", { style: { width: RADAR_SIZE2 + 240, maxWidth: "100%", flexShrink: 0 } }, /* @__PURE__ */ import_react14.default.createElement(
2571
+ RadarChartCore,
2572
+ {
2573
+ topics,
2574
+ data,
2575
+ compareData,
2576
+ invertedSpokes: invertedSpokes || {},
2577
+ unansweredSpokes,
2578
+ onToggleInversion: () => {
2579
+ },
2580
+ onReplaceTopic: () => {
2581
+ },
2582
+ size: RADAR_SIZE2,
2583
+ padding: 40,
2584
+ labelOffset: 5,
2585
+ labelFontSize: 18,
2586
+ tightFit: true
2587
+ }
2588
+ ));
2589
+ }
2590
+ function renderAvatar() {
2591
+ var _a2, _b, _c;
2592
+ 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;
2593
+ const baseStyle = {
2594
+ width: 88,
2595
+ height: 110,
2596
+ flexShrink: 0,
2597
+ overflow: "hidden",
2598
+ borderRadius: borderRadius.md,
2599
+ backgroundColor: colors.evMutedBlue,
2600
+ display: "flex",
2601
+ alignItems: "center",
2602
+ justifyContent: "center"
2603
+ };
2604
+ if (imageSrc && !imgError) {
2605
+ return /* @__PURE__ */ import_react14.default.createElement("div", { style: baseStyle }, /* @__PURE__ */ import_react14.default.createElement(
2606
+ "img",
2607
+ {
2608
+ src: imageSrc,
2609
+ alt: `${politician.full_name} portrait`,
2610
+ onError: () => setImgError(true),
2611
+ style: {
2612
+ width: "100%",
2613
+ height: "100%",
2614
+ objectFit: "cover",
2615
+ objectPosition: (_b = politician.imageFocalPoint) != null ? _b : "center 20%",
2616
+ display: "block"
2617
+ }
2618
+ }
2619
+ ));
2620
+ }
2621
+ const parts = ((politician == null ? void 0 : politician.full_name) || "").split(" ").filter(Boolean);
2622
+ const initials = (parts.length >= 2 ? parts[0][0] + parts[parts.length - 1][0] : ((_c = parts[0]) == null ? void 0 : _c[0]) || "?").toUpperCase();
2623
+ return /* @__PURE__ */ import_react14.default.createElement("div", { style: baseStyle }, /* @__PURE__ */ import_react14.default.createElement("span", { style: {
2624
+ color: colors.textWhite,
2625
+ fontFamily: fonts.primary,
2626
+ fontWeight: fontWeights.bold,
2627
+ fontSize: fontSizes["2xl"]
2628
+ } }, initials));
2629
+ }
2630
+ function renderPortrait() {
2631
+ var _a2, _b, _c;
2632
+ 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;
2633
+ if (imageSrc && !imgError) {
2634
+ return /* @__PURE__ */ import_react14.default.createElement(
2635
+ "img",
2636
+ {
2637
+ src: imageSrc,
2638
+ alt: `${politician.full_name} portrait`,
2639
+ style: {
2640
+ width: RADAR_SIZE2,
2641
+ height: RADAR_SIZE2,
2642
+ objectFit: "cover",
2643
+ objectPosition: (_b = politician.imageFocalPoint) != null ? _b : "center 20%",
2644
+ display: "block",
2645
+ borderRadius: borderRadius.md
2646
+ },
2647
+ onError: () => setImgError(true)
2648
+ }
2649
+ );
2650
+ }
2651
+ const parts = ((politician == null ? void 0 : politician.full_name) || "").split(" ").filter(Boolean);
2652
+ const initials = (parts.length >= 2 ? parts[0][0] + parts[parts.length - 1][0] : ((_c = parts[0]) == null ? void 0 : _c[0]) || "?").toUpperCase();
2653
+ return /* @__PURE__ */ import_react14.default.createElement("div", { style: {
2654
+ width: RADAR_SIZE2,
2655
+ height: RADAR_SIZE2,
2656
+ backgroundColor: colors.evMutedBlue,
2657
+ color: colors.textWhite,
2658
+ display: "flex",
2659
+ alignItems: "center",
2660
+ justifyContent: "center",
2661
+ fontFamily: fonts.primary,
2662
+ fontWeight: fontWeights.bold,
2663
+ fontSize: fontSizes["5xl"],
2664
+ borderRadius: borderRadius.md
2665
+ } }, initials);
2666
+ }
2667
+ function renderEmptyVariant() {
2668
+ return /* @__PURE__ */ import_react14.default.createElement("div", { style: {
2669
+ width: "100%",
2670
+ height: "100%",
2671
+ flex: 1,
2672
+ display: "flex",
2673
+ flexDirection: "column",
2674
+ alignItems: "center",
2675
+ justifyContent: "center",
2676
+ gap: "12px",
2677
+ padding: "20px",
2678
+ boxSizing: "border-box",
2679
+ backgroundColor: colorScales.teal["050"],
2680
+ borderRadius: borderRadius.md
2681
+ } }, /* @__PURE__ */ import_react14.default.createElement(PlaceholderRadar, { size: 220, name: (politician == null ? void 0 : politician.full_name) || "" }), /* @__PURE__ */ import_react14.default.createElement("p", { style: {
2682
+ margin: 0,
2683
+ fontSize: fontSizes.sm,
2684
+ color: colors.textMuted,
2685
+ textAlign: "center",
2686
+ lineHeight: 1.4,
2687
+ fontFamily: fonts.primary
2688
+ } }, "Calibrate your compass to see how you align with ", (politician == null ? void 0 : politician.full_name) || "this official"), /* @__PURE__ */ import_react14.default.createElement(
2689
+ "button",
2690
+ {
2691
+ type: "button",
2692
+ onClick: onBuildCompass || void 0,
2693
+ onMouseEnter: () => setEmptyCtaHovered(true),
2694
+ onMouseLeave: () => setEmptyCtaHovered(false),
2695
+ style: {
2696
+ minWidth: "180px",
2697
+ height: "44px",
2698
+ padding: "0 20px",
2699
+ backgroundColor: emptyCtaHovered ? semanticTokens.light.buttonPrimary.background.hovered : semanticTokens.light.buttonPrimary.background.default,
2700
+ color: colors.textWhite,
2701
+ fontSize: fontSizes.sm,
2702
+ fontWeight: fontWeights.semibold,
2703
+ fontFamily: fonts.primary,
2704
+ borderRadius: borderRadius.full,
2705
+ border: "none",
2706
+ cursor: onBuildCompass ? "pointer" : "default",
2707
+ transition: `background ${duration.normal} ease`
2708
+ }
2709
+ },
2710
+ "Calibrate your compass"
2711
+ ));
2712
+ }
2713
+ function renderUnavailablePlate(message) {
2714
+ return /* @__PURE__ */ import_react14.default.createElement("div", { style: {
2715
+ width: "100%",
2716
+ height: "100%",
2717
+ flex: 1,
2718
+ backgroundColor: colorScales.teal["050"],
2719
+ borderRadius: borderRadius.md,
2720
+ display: "flex",
2721
+ alignItems: "center",
2722
+ justifyContent: "center",
2723
+ padding: spacing[6],
2724
+ boxSizing: "border-box"
2725
+ } }, /* @__PURE__ */ import_react14.default.createElement("p", { style: {
2726
+ fontSize: fontSizes.base,
2727
+ fontWeight: fontWeights.semibold,
2728
+ lineHeight: 1.4,
2729
+ color: colors.textMuted,
2730
+ textAlign: "center",
2731
+ margin: 0,
2732
+ fontFamily: fonts.primary
2733
+ } }, message));
2734
+ }
2735
+ function renderSlotContent() {
2736
+ if (view === "portrait") return renderPortrait();
2737
+ if (variant === "empty") return renderEmptyVariant();
2738
+ if (variant === "administrative" || variant === "judicial") {
2739
+ return renderUnavailablePlate("Compass currently unavailable for this role.");
2740
+ }
2741
+ if (variant === "no-stances") {
2742
+ return renderUnavailablePlate(`No compass stances on file for ${(politician == null ? void 0 : politician.full_name) || "this official"} yet.`);
2743
+ }
2744
+ return renderCompass();
2745
+ }
2746
+ return /* @__PURE__ */ import_react14.default.createElement(
2747
+ "div",
2748
+ {
2749
+ role: "article",
2750
+ "aria-label": `${politician.full_name}, ${politician.office_title || ""}`,
2751
+ tabIndex: 0,
2752
+ style: cardStyle,
2753
+ onClick,
2754
+ onKeyDown: (e) => {
2755
+ if (onClick && (e.key === "Enter" || e.key === " ")) {
2756
+ e.preventDefault();
2757
+ onClick();
2758
+ }
2759
+ },
2760
+ onMouseEnter: () => setHovered(true),
2761
+ onMouseLeave: () => setHovered(false),
2762
+ onFocus: () => setFocused(true),
2763
+ onBlur: () => setFocused(false)
2764
+ },
2765
+ /* @__PURE__ */ import_react14.default.createElement("div", { style: { padding: spacing[4], paddingBottom: spacing[3], display: "flex", alignItems: "stretch", gap: spacing[3], flexShrink: 0 } }, renderAvatar(), /* @__PURE__ */ import_react14.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: spacing[1], minWidth: 0, flex: 1 } }, /* @__PURE__ */ import_react14.default.createElement("p", { style: {
2766
+ fontFamily: fonts.primary,
2767
+ fontSize: fontSizes.xl,
2768
+ fontWeight: fontWeights.semibold,
2769
+ lineHeight: 1.3,
2770
+ color: colors.evMutedBlue,
2771
+ margin: 0
2772
+ } }, politician.full_name), /* @__PURE__ */ import_react14.default.createElement("p", { style: {
2773
+ fontFamily: fonts.primary,
2774
+ fontSize: fontSizes.sm,
2775
+ fontWeight: fontWeights.semibold,
2776
+ lineHeight: 1.4,
2777
+ color: colors.textSecondary,
2778
+ margin: 0
2779
+ } }, titleText || ""), politician.district_label && /* @__PURE__ */ import_react14.default.createElement("p", { style: {
2780
+ fontFamily: fonts.primary,
2781
+ fontSize: fontSizes.sm,
2782
+ fontWeight: fontWeights.regular,
2783
+ lineHeight: 1.5,
2784
+ color: colors.textMuted,
2785
+ margin: 0,
2786
+ overflow: "hidden",
2787
+ textOverflow: "ellipsis",
2788
+ whiteSpace: "nowrap"
2789
+ } }, politician.district_label), /* @__PURE__ */ import_react14.default.createElement("div", { style: { marginTop: "auto" } }, /* @__PURE__ */ import_react14.default.createElement(
2790
+ IconOverlay,
2791
+ {
2792
+ ballot: politician.ballot || null,
2793
+ hasStances: false,
2794
+ branch: politician.branch || null
2795
+ }
2796
+ )))),
2797
+ surface === "elections" && politician.withdrawn && /* @__PURE__ */ import_react14.default.createElement("div", { style: {
2798
+ margin: `0 ${spacing[4]} ${spacing[3]}`,
2799
+ backgroundColor: "rgba(120,0,0,0.85)",
2800
+ color: "#fff",
2801
+ fontSize: "12px",
2802
+ fontWeight: 700,
2803
+ letterSpacing: "0.4px",
2804
+ textAlign: "center",
2805
+ textTransform: "uppercase",
2806
+ padding: "6px 0",
2807
+ borderRadius: borderRadius.sm
2808
+ } }, "Withdrawn"),
2809
+ surface === "elections" && !politician.withdrawn && politician.running_unopposed && /* @__PURE__ */ import_react14.default.createElement("div", { style: {
2810
+ margin: `0 ${spacing[4]} ${spacing[3]}`,
2811
+ backgroundColor: "rgba(0,0,0,0.75)",
2812
+ color: "#fff",
2813
+ fontSize: "12px",
2814
+ fontWeight: 700,
2815
+ letterSpacing: "0.4px",
2816
+ textAlign: "center",
2817
+ textTransform: "uppercase",
2818
+ padding: "6px 0",
2819
+ borderRadius: borderRadius.sm
2820
+ } }, "Running Unopposed"),
2821
+ /* @__PURE__ */ import_react14.default.createElement("div", { style: {
2822
+ flex: 1,
2823
+ padding: spacing[4],
2824
+ paddingTop: 0,
2825
+ display: "flex",
2826
+ alignItems: "center",
2827
+ justifyContent: "center",
2828
+ position: "relative",
2829
+ minHeight: 0
2830
+ } }, renderSlotContent())
2831
+ );
2832
+ }
2833
+
2834
+ // src/CompassKey.jsx
2835
+ var import_react15 = __toESM(require("react"));
2836
+
2837
+ // src/evContext.js
2838
+ var DEFAULT_BROKER_URL = "https://ev-context.empowered.vote/";
2839
+ var brokerUrl = DEFAULT_BROKER_URL;
2840
+ var iframe = null;
2841
+ var readyPromise = null;
2842
+ var pendingRequests = /* @__PURE__ */ new Map();
2843
+ var subscribers = /* @__PURE__ */ new Set();
2844
+ var lastValue = null;
2845
+ var nextRequestId = 1;
2846
+ function brokerOrigin() {
2847
+ try {
2848
+ return new URL(brokerUrl).origin;
2849
+ } catch {
2850
+ return "";
2851
+ }
2852
+ }
2853
+ function ensureMounted() {
2854
+ if (typeof window === "undefined" || typeof document === "undefined") return null;
2855
+ if (iframe) return iframe;
2856
+ iframe = document.createElement("iframe");
2857
+ iframe.src = brokerUrl;
2858
+ iframe.setAttribute("aria-hidden", "true");
2859
+ iframe.setAttribute("tabindex", "-1");
2860
+ iframe.style.position = "absolute";
2861
+ iframe.style.width = "1px";
2862
+ iframe.style.height = "1px";
2863
+ iframe.style.border = "0";
2864
+ iframe.style.opacity = "0";
2865
+ iframe.style.pointerEvents = "none";
2866
+ iframe.style.top = "-9999px";
2867
+ iframe.style.left = "-9999px";
2868
+ window.addEventListener("message", onMessage);
2869
+ (document.body || document.documentElement).appendChild(iframe);
2870
+ readyPromise = new Promise((resolve) => {
2871
+ const onReady = (e) => {
2872
+ if (e.origin !== brokerOrigin()) return;
2873
+ if (!e.data || e.data.type !== "ev-context:ready") return;
2874
+ window.removeEventListener("message", onReady);
2875
+ resolve();
2876
+ };
2877
+ window.addEventListener("message", onReady);
2878
+ iframe.addEventListener("load", () => {
2879
+ setTimeout(() => resolve(), 50);
2880
+ });
2881
+ });
2882
+ return iframe;
2883
+ }
2884
+ function onMessage(event) {
2885
+ var _a, _b, _c;
2886
+ if (event.origin !== brokerOrigin()) return;
2887
+ const data = event.data;
2888
+ if (!data || typeof data !== "object") return;
2889
+ if (data.type === "ev-context:value" || data.type === "ev-context:ack") {
2890
+ const id = data.requestId;
2891
+ if (id && pendingRequests.has(id)) {
2892
+ const { resolve, timeout } = pendingRequests.get(id);
2893
+ clearTimeout(timeout);
2894
+ pendingRequests.delete(id);
2895
+ resolve(data.type === "ev-context:value" ? (_a = data.value) != null ? _a : null : data.ok);
2896
+ }
2897
+ if (data.type === "ev-context:value") {
2898
+ lastValue = (_b = data.value) != null ? _b : null;
2899
+ notifySubscribers();
2900
+ }
2901
+ } else if (data.type === "ev-context:update") {
2902
+ lastValue = (_c = data.value) != null ? _c : null;
2903
+ notifySubscribers();
2904
+ }
2905
+ }
2906
+ function notifySubscribers() {
2907
+ for (const fn of subscribers) {
2908
+ try {
2909
+ fn(lastValue);
2910
+ } catch {
2911
+ }
2912
+ }
2913
+ }
2914
+ function send(message, { expectReply = true, timeoutMs = 4e3 } = {}) {
2915
+ ensureMounted();
2916
+ return readyPromise.then(() => new Promise((resolve, reject) => {
2917
+ if (!iframe || !iframe.contentWindow) {
2918
+ reject(new Error("evContext broker iframe not ready"));
2919
+ return;
2920
+ }
2921
+ const requestId = expectReply ? `req-${nextRequestId++}` : void 0;
2922
+ if (expectReply) {
2923
+ const timeout = setTimeout(() => {
2924
+ pendingRequests.delete(requestId);
2925
+ reject(new Error("evContext request timed out"));
2926
+ }, timeoutMs);
2927
+ pendingRequests.set(requestId, { resolve, reject, timeout });
2928
+ }
2929
+ try {
2930
+ iframe.contentWindow.postMessage({ ...message, requestId }, brokerOrigin());
2931
+ if (!expectReply) resolve(true);
2932
+ } catch (err) {
2933
+ if (expectReply) {
2934
+ const entry = pendingRequests.get(requestId);
2935
+ if (entry) {
2936
+ clearTimeout(entry.timeout);
2937
+ pendingRequests.delete(requestId);
2938
+ }
2939
+ }
2940
+ reject(err);
2941
+ }
2942
+ }));
2943
+ }
2944
+ var evContext = {
2945
+ /**
2946
+ * Override the broker URL. Call once at app startup before any get/set.
2947
+ * Defaults to https://ev-context.empowered.vote/ for prod.
2948
+ */
2949
+ configure({ brokerUrl: url } = {}) {
2950
+ if (url) brokerUrl = url;
2951
+ },
2952
+ /** Mount the iframe immediately (optional — get/set will mount lazily). */
2953
+ preload() {
2954
+ ensureMounted();
2955
+ return readyPromise;
2956
+ },
2957
+ /** Read the current shared context. Resolves to the stored value or null. */
2958
+ async get() {
2959
+ return send({ type: "ev-context:get" });
2960
+ },
2961
+ /** Overwrite the shared context. */
2962
+ async set(value) {
2963
+ return send({ type: "ev-context:set", value });
2964
+ },
2965
+ /** Clear the shared context. */
2966
+ async clear() {
2967
+ return send({ type: "ev-context:clear" });
2968
+ },
2969
+ /**
2970
+ * Subscribe to live updates. Fires when this tab or any other tab
2971
+ * (any subdomain) writes to the store. Returns an unsubscribe function.
2972
+ */
2973
+ subscribe(fn) {
2974
+ subscribers.add(fn);
2975
+ send({ type: "ev-context:subscribe" }).then((value) => {
2976
+ lastValue = value != null ? value : lastValue;
2977
+ try {
2978
+ fn(lastValue);
2979
+ } catch {
2980
+ }
2981
+ }).catch(() => {
2982
+ });
2983
+ return () => {
2984
+ subscribers.delete(fn);
2985
+ };
2986
+ }
2987
+ };
2988
+
2989
+ // src/CompassKey.jsx
2990
+ function CompassKey({ compact = false } = {}) {
2991
+ const [dismissed, setDismissed] = (0, import_react15.useState)(false);
2992
+ const [loaded, setLoaded] = (0, import_react15.useState)(false);
2993
+ (0, import_react15.useEffect)(() => {
2994
+ let cancelled = false;
2995
+ evContext.get().then((shared) => {
2996
+ if (cancelled) return;
2997
+ setDismissed(Boolean(shared == null ? void 0 : shared.compassKeyDismissed));
2998
+ setLoaded(true);
2999
+ }).catch(() => {
3000
+ if (!cancelled) setLoaded(true);
3001
+ });
3002
+ return () => {
3003
+ cancelled = true;
3004
+ };
3005
+ }, []);
3006
+ function persistDismissed(value) {
3007
+ evContext.get().then((current) => {
3008
+ const next = { ...current || {}, compassKeyDismissed: value };
3009
+ evContext.set(next).catch(() => {
3010
+ });
3011
+ }).catch(() => {
3012
+ });
3013
+ }
3014
+ function handleDismiss() {
3015
+ setDismissed(true);
3016
+ persistDismissed(true);
3017
+ }
3018
+ function handleReopen() {
3019
+ setDismissed(false);
3020
+ persistDismissed(false);
3021
+ }
3022
+ if (!loaded) return null;
3023
+ const Swatch = ({ color, label, ring }) => /* @__PURE__ */ import_react15.default.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: spacing[1] } }, /* @__PURE__ */ import_react15.default.createElement("span", { style: {
3024
+ display: "inline-block",
3025
+ width: 12,
3026
+ height: 12,
3027
+ borderRadius: "50%",
3028
+ background: color,
3029
+ border: `2px solid ${ring || "#fff"}`,
3030
+ boxShadow: "0 0 0 1px rgba(0,0,0,0.08)"
3031
+ } }), /* @__PURE__ */ import_react15.default.createElement("span", { style: { fontSize: fontSizes.xs, color: colors.textSecondary, fontFamily: fonts.primary } }, label));
3032
+ if (dismissed) {
3033
+ return /* @__PURE__ */ import_react15.default.createElement(
3034
+ "button",
3035
+ {
3036
+ type: "button",
3037
+ onClick: handleReopen,
3038
+ "aria-label": "Show compass legend",
3039
+ style: {
3040
+ display: "inline-flex",
3041
+ alignItems: "center",
3042
+ gap: spacing[1],
3043
+ padding: "4px 10px",
3044
+ borderRadius: borderRadius.full,
3045
+ background: "transparent",
3046
+ border: `1px solid ${colors.borderLight}`,
3047
+ color: colors.textMuted,
3048
+ fontFamily: fonts.primary,
3049
+ fontSize: fontSizes.xs,
3050
+ fontWeight: fontWeights.semibold,
3051
+ cursor: "pointer"
3052
+ }
3053
+ },
3054
+ /* @__PURE__ */ import_react15.default.createElement("span", { "aria-hidden": "true" }, "?"),
3055
+ " Compass key"
3056
+ );
3057
+ }
3058
+ return /* @__PURE__ */ import_react15.default.createElement(
3059
+ "div",
3060
+ {
3061
+ role: "region",
3062
+ "aria-label": "Compass legend",
3063
+ style: {
3064
+ display: "inline-flex",
3065
+ alignItems: "center",
3066
+ flexWrap: "wrap",
3067
+ gap: compact ? spacing[2] : spacing[3],
3068
+ padding: compact ? `${spacing[1]} ${spacing[2]}` : `${spacing[2]} ${spacing[3]}`,
3069
+ background: "#fff",
3070
+ border: `1px solid ${colors.borderLight}`,
3071
+ borderRadius: borderRadius.md,
3072
+ fontFamily: fonts.primary,
3073
+ maxWidth: "100%",
3074
+ boxSizing: "border-box"
3075
+ }
3076
+ },
3077
+ !compact && /* @__PURE__ */ import_react15.default.createElement("span", { style: {
3078
+ fontSize: fontSizes.xs,
3079
+ fontWeight: fontWeights.semibold,
3080
+ color: colors.textMuted,
3081
+ textTransform: "uppercase",
3082
+ letterSpacing: "0.5px"
3083
+ } }, "Compass key"),
3084
+ /* @__PURE__ */ import_react15.default.createElement(Swatch, { color: "#7C6B9E", label: "You" }),
3085
+ /* @__PURE__ */ import_react15.default.createElement(Swatch, { color: "#5A9A6E", label: "Politician" }),
3086
+ /* @__PURE__ */ import_react15.default.createElement(Swatch, { color: "#fed12e", label: "Match" }),
3087
+ /* @__PURE__ */ import_react15.default.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: spacing[1] } }, /* @__PURE__ */ import_react15.default.createElement("span", { style: {
3088
+ fontSize: fontSizes.xs,
3089
+ fontWeight: fontWeights.semibold,
3090
+ color: "#9ca3af",
3091
+ fontFamily: fonts.primary,
3092
+ textDecoration: "underline",
3093
+ textDecorationStyle: "dashed",
3094
+ textUnderlineOffset: "3px"
3095
+ } }, "Topic"), /* @__PURE__ */ import_react15.default.createElement("span", { style: { fontSize: fontSizes.xs, color: colors.textSecondary, fontFamily: fonts.primary } }, "= no stance")),
3096
+ /* @__PURE__ */ import_react15.default.createElement(
3097
+ "button",
3098
+ {
3099
+ type: "button",
3100
+ onClick: handleDismiss,
3101
+ "aria-label": "Hide compass legend",
3102
+ style: {
3103
+ marginLeft: spacing[2],
3104
+ padding: "2px 6px",
3105
+ border: "none",
3106
+ background: "transparent",
3107
+ color: colors.textMuted,
3108
+ fontSize: "16px",
3109
+ lineHeight: 1,
3110
+ cursor: "pointer"
3111
+ }
3112
+ },
3113
+ "\xD7"
3114
+ )
3115
+ );
3116
+ }
3117
+
3118
+ // src/CategorySection.jsx
3119
+ var import_react16 = __toESM(require("react"));
2450
3120
  function CategorySection({
2451
3121
  title,
2452
3122
  infoTooltip,
@@ -2456,7 +3126,7 @@ function CategorySection({
2456
3126
  tier
2457
3127
  }) {
2458
3128
  var _a, _b;
2459
- const [showTooltip, setShowTooltip] = (0, import_react14.useState)(false);
3129
+ const [showTooltip, setShowTooltip] = (0, import_react16.useState)(false);
2460
3130
  const tierStyle = tier ? tierColors[tier] : null;
2461
3131
  const styles2 = {
2462
3132
  section: {
@@ -2524,7 +3194,7 @@ function CategorySection({
2524
3194
  gap: spacing[4]
2525
3195
  }
2526
3196
  };
2527
- return /* @__PURE__ */ import_react14.default.createElement("section", { style: styles2.section, className: "ev-category-section" }, /* @__PURE__ */ import_react14.default.createElement("div", { style: styles2.header }, /* @__PURE__ */ import_react14.default.createElement("span", { style: styles2.titlePill }, title), infoTooltip && /* @__PURE__ */ import_react14.default.createElement(
3197
+ return /* @__PURE__ */ import_react16.default.createElement("section", { style: styles2.section, className: "ev-category-section" }, /* @__PURE__ */ import_react16.default.createElement("div", { style: styles2.header }, /* @__PURE__ */ import_react16.default.createElement("span", { style: styles2.titlePill }, title), infoTooltip && /* @__PURE__ */ import_react16.default.createElement(
2528
3198
  "button",
2529
3199
  {
2530
3200
  type: "button",
@@ -2536,8 +3206,8 @@ function CategorySection({
2536
3206
  "aria-label": `Info about ${title}`
2537
3207
  },
2538
3208
  "i",
2539
- showTooltip && /* @__PURE__ */ import_react14.default.createElement("div", { style: styles2.tooltip, role: "tooltip" }, infoTooltip)
2540
- ), websiteUrl && /* @__PURE__ */ import_react14.default.createElement(
3209
+ showTooltip && /* @__PURE__ */ import_react16.default.createElement("div", { style: styles2.tooltip, role: "tooltip" }, infoTooltip)
3210
+ ), websiteUrl && /* @__PURE__ */ import_react16.default.createElement(
2541
3211
  "a",
2542
3212
  {
2543
3213
  href: websiteUrl,
@@ -2546,7 +3216,7 @@ function CategorySection({
2546
3216
  style: styles2.externalLink,
2547
3217
  "aria-label": `Visit official website for ${title}`
2548
3218
  },
2549
- /* @__PURE__ */ import_react14.default.createElement(
3219
+ /* @__PURE__ */ import_react16.default.createElement(
2550
3220
  "svg",
2551
3221
  {
2552
3222
  viewBox: "0 0 24 24",
@@ -2554,7 +3224,7 @@ function CategorySection({
2554
3224
  xmlns: "http://www.w3.org/2000/svg",
2555
3225
  style: { width: "14px", height: "14px" }
2556
3226
  },
2557
- /* @__PURE__ */ import_react14.default.createElement(
3227
+ /* @__PURE__ */ import_react16.default.createElement(
2558
3228
  "path",
2559
3229
  {
2560
3230
  d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",
@@ -2565,12 +3235,12 @@ function CategorySection({
2565
3235
  }
2566
3236
  )
2567
3237
  )
2568
- )), /* @__PURE__ */ import_react14.default.createElement("div", { style: styles2.grid, className: "ev-category-grid" }, children));
3238
+ )), /* @__PURE__ */ import_react16.default.createElement("div", { style: styles2.grid, className: "ev-category-grid" }, children));
2569
3239
  }
2570
3240
 
2571
3241
  // src/SubGroupSection.jsx
2572
- var import_react15 = __toESM(require("react"));
2573
- function SubGroupSection({ title, websiteUrl, children }) {
3242
+ var import_react17 = __toESM(require("react"));
3243
+ function SubGroupSection({ title, websiteUrl, children, gridTemplateColumns, gap, justifyContent }) {
2574
3244
  const styles2 = {
2575
3245
  section: {
2576
3246
  marginBottom: spacing[4]
@@ -2598,11 +3268,13 @@ function SubGroupSection({ title, websiteUrl, children }) {
2598
3268
  },
2599
3269
  grid: {
2600
3270
  display: "grid",
2601
- gridTemplateColumns: "repeat(auto-fill, minmax(min(250px, 100%), 1fr))",
2602
- gap: spacing[2]
3271
+ gridTemplateColumns: gridTemplateColumns || "repeat(auto-fill, minmax(min(250px, 100%), 1fr))",
3272
+ gap: gap || spacing[2],
3273
+ justifyContent: justifyContent || void 0,
3274
+ width: "100%"
2603
3275
  }
2604
3276
  };
2605
- return /* @__PURE__ */ import_react15.default.createElement("div", { style: styles2.section }, title && /* @__PURE__ */ import_react15.default.createElement("div", { style: styles2.header }, /* @__PURE__ */ import_react15.default.createElement("span", { style: styles2.label }, title), websiteUrl && /* @__PURE__ */ import_react15.default.createElement(
3277
+ return /* @__PURE__ */ import_react17.default.createElement("div", { style: styles2.section }, title && /* @__PURE__ */ import_react17.default.createElement("div", { style: styles2.header }, /* @__PURE__ */ import_react17.default.createElement("span", { style: styles2.label }, title), websiteUrl && /* @__PURE__ */ import_react17.default.createElement(
2606
3278
  "a",
2607
3279
  {
2608
3280
  href: websiteUrl,
@@ -2610,12 +3282,12 @@ function SubGroupSection({ title, websiteUrl, children }) {
2610
3282
  rel: "noopener noreferrer",
2611
3283
  style: styles2.link
2612
3284
  },
2613
- /* @__PURE__ */ import_react15.default.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: "12px", height: "12px" } }, /* @__PURE__ */ import_react15.default.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react15.default.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" }))
2614
- )), /* @__PURE__ */ import_react15.default.createElement("div", { style: styles2.grid, className: "ev-subgroup-grid" }, children));
3285
+ /* @__PURE__ */ import_react17.default.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: "12px", height: "12px" } }, /* @__PURE__ */ import_react17.default.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react17.default.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" }))
3286
+ )), /* @__PURE__ */ import_react17.default.createElement("div", { style: styles2.grid, className: "ev-subgroup-grid" }, children));
2615
3287
  }
2616
3288
 
2617
3289
  // src/GovernmentBodySection.jsx
2618
- var import_react16 = __toESM(require("react"));
3290
+ var import_react18 = __toESM(require("react"));
2619
3291
  function GovernmentBodySection({
2620
3292
  title,
2621
3293
  websiteUrl,
@@ -2624,7 +3296,7 @@ function GovernmentBodySection({
2624
3296
  children
2625
3297
  }) {
2626
3298
  var _a;
2627
- const [expanded, setExpanded] = (0, import_react16.useState)(defaultExpanded);
3299
+ const [expanded, setExpanded] = (0, import_react18.useState)(defaultExpanded);
2628
3300
  const tierStyle = tier ? tierColors[tier] : null;
2629
3301
  const accentColor = (_a = tierStyle == null ? void 0 : tierStyle.accent) != null ? _a : colors.borderMedium;
2630
3302
  const styles2 = {
@@ -2664,7 +3336,7 @@ function GovernmentBodySection({
2664
3336
  display: expanded ? "block" : "none"
2665
3337
  }
2666
3338
  };
2667
- return /* @__PURE__ */ import_react16.default.createElement("section", { style: styles2.section, className: "ev-gov-body-section" }, /* @__PURE__ */ import_react16.default.createElement(
3339
+ return /* @__PURE__ */ import_react18.default.createElement("section", { style: styles2.section, className: "ev-gov-body-section" }, /* @__PURE__ */ import_react18.default.createElement(
2668
3340
  "div",
2669
3341
  {
2670
3342
  style: styles2.header,
@@ -2680,8 +3352,8 @@ function GovernmentBodySection({
2680
3352
  "aria-expanded": expanded,
2681
3353
  "aria-label": `${expanded ? "Collapse" : "Expand"} ${title}`
2682
3354
  },
2683
- /* @__PURE__ */ import_react16.default.createElement("span", { style: styles2.title }, title),
2684
- websiteUrl && /* @__PURE__ */ import_react16.default.createElement(
3355
+ /* @__PURE__ */ import_react18.default.createElement("span", { style: styles2.title }, title),
3356
+ websiteUrl && /* @__PURE__ */ import_react18.default.createElement(
2685
3357
  "a",
2686
3358
  {
2687
3359
  href: websiteUrl,
@@ -2691,14 +3363,14 @@ function GovernmentBodySection({
2691
3363
  onClick: (e) => e.stopPropagation(),
2692
3364
  "aria-label": `Visit ${title} website`
2693
3365
  },
2694
- /* @__PURE__ */ import_react16.default.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: "14px", height: "14px" } }, /* @__PURE__ */ import_react16.default.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react16.default.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" }))
3366
+ /* @__PURE__ */ import_react18.default.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: "14px", height: "14px" } }, /* @__PURE__ */ import_react18.default.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react18.default.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" }))
2695
3367
  ),
2696
- /* @__PURE__ */ import_react16.default.createElement("span", { style: styles2.toggle, "aria-hidden": "true" }, "\u25BC")
2697
- ), /* @__PURE__ */ import_react16.default.createElement("div", { style: styles2.content }, children));
3368
+ /* @__PURE__ */ import_react18.default.createElement("span", { style: styles2.toggle, "aria-hidden": "true" }, "\u25BC")
3369
+ ), /* @__PURE__ */ import_react18.default.createElement("div", { style: styles2.content }, children));
2698
3370
  }
2699
3371
 
2700
3372
  // src/SocialLinks.jsx
2701
- var import_react17 = __toESM(require("react"));
3373
+ var import_react19 = __toESM(require("react"));
2702
3374
  var SOCIAL_PLATFORMS = [
2703
3375
  { test: /facebook\.com/i, platform: "facebook" },
2704
3376
  { test: /twitter\.com|x\.com/i, platform: "twitter" },
@@ -2769,7 +3441,7 @@ function SocialLinks({
2769
3441
  }
2770
3442
  };
2771
3443
  const platformIconMap = {
2772
- twitter: /* @__PURE__ */ import_react17.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react17.default.createElement(
3444
+ twitter: /* @__PURE__ */ import_react19.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react19.default.createElement(
2773
3445
  "path",
2774
3446
  {
2775
3447
  d: "M4 4L10.5 12.5M20 20L13.5 11.5M10.5 12.5L4 20H8L13.5 11.5M10.5 12.5L16 4H20L13.5 11.5",
@@ -2779,7 +3451,7 @@ function SocialLinks({
2779
3451
  strokeLinejoin: "round"
2780
3452
  }
2781
3453
  )),
2782
- facebook: /* @__PURE__ */ import_react17.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react17.default.createElement(
3454
+ facebook: /* @__PURE__ */ import_react19.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react19.default.createElement(
2783
3455
  "path",
2784
3456
  {
2785
3457
  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",
@@ -2789,8 +3461,8 @@ function SocialLinks({
2789
3461
  strokeLinejoin: "round"
2790
3462
  }
2791
3463
  )),
2792
- instagram: /* @__PURE__ */ import_react17.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react17.default.createElement("rect", { x: "2", y: "2", width: "20", height: "20", rx: "5", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react17.default.createElement("circle", { cx: "12", cy: "12", r: "4", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react17.default.createElement("circle", { cx: "18", cy: "6", r: "1", fill: "currentColor" })),
2793
- linkedin: /* @__PURE__ */ import_react17.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react17.default.createElement(
3464
+ instagram: /* @__PURE__ */ import_react19.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react19.default.createElement("rect", { x: "2", y: "2", width: "20", height: "20", rx: "5", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react19.default.createElement("circle", { cx: "12", cy: "12", r: "4", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react19.default.createElement("circle", { cx: "18", cy: "6", r: "1", fill: "currentColor" })),
3465
+ linkedin: /* @__PURE__ */ import_react19.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react19.default.createElement(
2794
3466
  "path",
2795
3467
  {
2796
3468
  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",
@@ -2799,8 +3471,8 @@ function SocialLinks({
2799
3471
  strokeLinecap: "round",
2800
3472
  strokeLinejoin: "round"
2801
3473
  }
2802
- ), /* @__PURE__ */ import_react17.default.createElement("rect", { x: "2", y: "9", width: "4", height: "12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ import_react17.default.createElement("circle", { cx: "4", cy: "4", r: "2", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })),
2803
- youtube: /* @__PURE__ */ import_react17.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react17.default.createElement("rect", { x: "2", y: "5", width: "20", height: "14", rx: "3", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react17.default.createElement("polygon", { points: "10,9 16,12 10,15", fill: "currentColor" }))
3474
+ ), /* @__PURE__ */ import_react19.default.createElement("rect", { x: "2", y: "9", width: "4", height: "12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ import_react19.default.createElement("circle", { cx: "4", cy: "4", r: "2", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })),
3475
+ youtube: /* @__PURE__ */ import_react19.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react19.default.createElement("rect", { x: "2", y: "5", width: "20", height: "14", rx: "3", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react19.default.createElement("polygon", { points: "10,9 16,12 10,15", fill: "currentColor" }))
2804
3476
  };
2805
3477
  const links = [
2806
3478
  {
@@ -2826,7 +3498,7 @@ function SocialLinks({
2826
3498
  {
2827
3499
  href: website,
2828
3500
  label: "Website",
2829
- icon: /* @__PURE__ */ import_react17.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react17.default.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react17.default.createElement(
3501
+ icon: /* @__PURE__ */ import_react19.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react19.default.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react19.default.createElement(
2830
3502
  "path",
2831
3503
  {
2832
3504
  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",
@@ -2856,7 +3528,7 @@ function SocialLinks({
2856
3528
  if (links.length === 0) {
2857
3529
  return null;
2858
3530
  }
2859
- return /* @__PURE__ */ import_react17.default.createElement("div", { style: styles2.container, className: "ev-social-links" }, links.map((link) => /* @__PURE__ */ import_react17.default.createElement(
3531
+ return /* @__PURE__ */ import_react19.default.createElement("div", { style: styles2.container, className: "ev-social-links" }, links.map((link) => /* @__PURE__ */ import_react19.default.createElement(
2860
3532
  "a",
2861
3533
  {
2862
3534
  key: link.label,
@@ -2879,7 +3551,7 @@ function SocialLinks({
2879
3551
  }
2880
3552
 
2881
3553
  // src/IssueTags.jsx
2882
- var import_react18 = __toESM(require("react"));
3554
+ var import_react20 = __toESM(require("react"));
2883
3555
  function IssueTags({
2884
3556
  tags = [],
2885
3557
  selectedTags = [],
@@ -2922,9 +3594,9 @@ function IssueTags({
2922
3594
  onTagClick(tag.value);
2923
3595
  }
2924
3596
  };
2925
- return /* @__PURE__ */ import_react18.default.createElement("div", { style: styles2.container, className: "ev-issue-tags", role: "list" }, tags.map((tag) => {
3597
+ return /* @__PURE__ */ import_react20.default.createElement("div", { style: styles2.container, className: "ev-issue-tags", role: "list" }, tags.map((tag) => {
2926
3598
  const isSelected = selectedTags.includes(tag.value);
2927
- return /* @__PURE__ */ import_react18.default.createElement(
3599
+ return /* @__PURE__ */ import_react20.default.createElement(
2928
3600
  "span",
2929
3601
  {
2930
3602
  key: tag.value,
@@ -2953,7 +3625,7 @@ function IssueTags({
2953
3625
  }
2954
3626
 
2955
3627
  // src/CommitteeTable.jsx
2956
- var import_react19 = __toESM(require("react"));
3628
+ var import_react21 = __toESM(require("react"));
2957
3629
  var ROLE_ORDER = {
2958
3630
  "chair": 0,
2959
3631
  "co-chair": 1,
@@ -2980,7 +3652,7 @@ function CommitteeTable({
2980
3652
  maxVisible = 6,
2981
3653
  style = {}
2982
3654
  }) {
2983
- const [showAll, setShowAll] = (0, import_react19.useState)(false);
3655
+ const [showAll, setShowAll] = (0, import_react21.useState)(false);
2984
3656
  if (committees.length === 0) {
2985
3657
  return null;
2986
3658
  }
@@ -3042,7 +3714,7 @@ function CommitteeTable({
3042
3714
  cursor: "pointer"
3043
3715
  }
3044
3716
  };
3045
- return /* @__PURE__ */ import_react19.default.createElement("div", { style: styles2.container, className: "ev-committee-table" }, /* @__PURE__ */ import_react19.default.createElement("h4", { style: styles2.heading }, /* @__PURE__ */ import_react19.default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react19.default.createElement("path", { d: "M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2" }), /* @__PURE__ */ import_react19.default.createElement("circle", { cx: "9", cy: "7", r: "4" }), /* @__PURE__ */ import_react19.default.createElement("path", { d: "M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75" })), title), /* @__PURE__ */ import_react19.default.createElement("table", { style: styles2.table }, /* @__PURE__ */ import_react19.default.createElement("tbody", null, visible.map((committee, index) => /* @__PURE__ */ import_react19.default.createElement("tr", { key: index, style: styles2.row }, /* @__PURE__ */ import_react19.default.createElement("td", { style: { ...styles2.cell, ...styles2.nameCell } }, committee.url ? /* @__PURE__ */ import_react19.default.createElement(
3717
+ return /* @__PURE__ */ import_react21.default.createElement("div", { style: styles2.container, className: "ev-committee-table" }, /* @__PURE__ */ import_react21.default.createElement("h4", { style: styles2.heading }, /* @__PURE__ */ import_react21.default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react21.default.createElement("path", { d: "M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2" }), /* @__PURE__ */ import_react21.default.createElement("circle", { cx: "9", cy: "7", r: "4" }), /* @__PURE__ */ import_react21.default.createElement("path", { d: "M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75" })), title), /* @__PURE__ */ import_react21.default.createElement("table", { style: styles2.table }, /* @__PURE__ */ import_react21.default.createElement("tbody", null, visible.map((committee, index) => /* @__PURE__ */ import_react21.default.createElement("tr", { key: index, style: styles2.row }, /* @__PURE__ */ import_react21.default.createElement("td", { style: { ...styles2.cell, ...styles2.nameCell } }, committee.url ? /* @__PURE__ */ import_react21.default.createElement(
3046
3718
  "a",
3047
3719
  {
3048
3720
  href: committee.url,
@@ -3057,7 +3729,7 @@ function CommitteeTable({
3057
3729
  }
3058
3730
  },
3059
3731
  committee.name
3060
- ) : committee.name), /* @__PURE__ */ import_react19.default.createElement("td", { style: { ...styles2.cell, ...styles2.positionCell } }, formatPosition(committee.position)))))), hasMore && /* @__PURE__ */ import_react19.default.createElement(
3732
+ ) : committee.name), /* @__PURE__ */ import_react21.default.createElement("td", { style: { ...styles2.cell, ...styles2.positionCell } }, formatPosition(committee.position)))))), hasMore && /* @__PURE__ */ import_react21.default.createElement(
3061
3733
  "button",
3062
3734
  {
3063
3735
  type: "button",
@@ -3065,7 +3737,7 @@ function CommitteeTable({
3065
3737
  onClick: () => setShowAll(!showAll)
3066
3738
  },
3067
3739
  showAll ? "Show less" : `Show all ${sorted.length} committees`,
3068
- /* @__PURE__ */ import_react19.default.createElement(
3740
+ /* @__PURE__ */ import_react21.default.createElement(
3069
3741
  "svg",
3070
3742
  {
3071
3743
  width: "14",
@@ -3078,16 +3750,16 @@ function CommitteeTable({
3078
3750
  strokeLinejoin: "round",
3079
3751
  style: { transform: showAll ? "rotate(180deg)" : "none", transition: "transform 0.2s" }
3080
3752
  },
3081
- /* @__PURE__ */ import_react19.default.createElement("polyline", { points: "6 9 12 15 18 9" })
3753
+ /* @__PURE__ */ import_react21.default.createElement("polyline", { points: "6 9 12 15 18 9" })
3082
3754
  )
3083
3755
  ));
3084
3756
  }
3085
3757
 
3086
3758
  // src/PoliticianProfile.jsx
3087
- var import_react22 = __toESM(require("react"));
3759
+ var import_react24 = __toESM(require("react"));
3088
3760
 
3089
3761
  // src/LegislativeInlineSummary.jsx
3090
- var import_react20 = __toESM(require("react"));
3762
+ var import_react22 = __toESM(require("react"));
3091
3763
  function normalizePosition(pos) {
3092
3764
  if (!pos) return "";
3093
3765
  return pos.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
@@ -3195,7 +3867,7 @@ function LegislativeInlineSummary({ summary, politicianId, onNavigateToRecord })
3195
3867
  fontSize: fontSizes.sm,
3196
3868
  fontWeight: fontWeights.medium
3197
3869
  };
3198
- return /* @__PURE__ */ import_react20.default.createElement("div", { style: card }, stats.length > 0 && /* @__PURE__ */ import_react20.default.createElement("div", { style: statsRow }, stats.map((s, i) => /* @__PURE__ */ import_react20.default.createElement("div", { key: i, style: statItem }, /* @__PURE__ */ import_react20.default.createElement("span", { style: statValue }, s.value), s.label && /* @__PURE__ */ import_react20.default.createElement("span", { style: statLabel }, s.label)))), mostRecentAction && /* @__PURE__ */ import_react20.default.createElement("div", { style: actionLine, title: mostRecentAction }, mostRecentAction), /* @__PURE__ */ import_react20.default.createElement("div", null), /* @__PURE__ */ import_react20.default.createElement("div", { style: footerRow }, /* @__PURE__ */ import_react20.default.createElement(
3870
+ return /* @__PURE__ */ import_react22.default.createElement("div", { style: card }, stats.length > 0 && /* @__PURE__ */ import_react22.default.createElement("div", { style: statsRow }, stats.map((s, i) => /* @__PURE__ */ import_react22.default.createElement("div", { key: i, style: statItem }, /* @__PURE__ */ import_react22.default.createElement("span", { style: statValue }, s.value), s.label && /* @__PURE__ */ import_react22.default.createElement("span", { style: statLabel }, s.label)))), mostRecentAction && /* @__PURE__ */ import_react22.default.createElement("div", { style: actionLine, title: mostRecentAction }, mostRecentAction), /* @__PURE__ */ import_react22.default.createElement("div", null), /* @__PURE__ */ import_react22.default.createElement("div", { style: footerRow }, /* @__PURE__ */ import_react22.default.createElement(
3199
3871
  "button",
3200
3872
  {
3201
3873
  onClick: () => {
@@ -3220,12 +3892,12 @@ function LegislativeInlineSummary({ summary, politicianId, onNavigateToRecord })
3220
3892
  }
3221
3893
  },
3222
3894
  "View Full Legislative Record",
3223
- /* @__PURE__ */ import_react20.default.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__ */ import_react20.default.createElement("path", { d: "M9 18l6-6-6-6" }))
3895
+ /* @__PURE__ */ import_react22.default.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__ */ import_react22.default.createElement("path", { d: "M9 18l6-6-6-6" }))
3224
3896
  )));
3225
3897
  }
3226
3898
 
3227
3899
  // src/JudicialScorecard.jsx
3228
- var import_react21 = __toESM(require("react"));
3900
+ var import_react23 = __toESM(require("react"));
3229
3901
 
3230
3902
  // src/judicialUtils.js
3231
3903
  function formatDate(dateStr) {
@@ -3343,7 +4015,7 @@ function JudicialScorecard({ judicialRecord, politicianId, onNavigateToRecord })
3343
4015
  onNavigateToRecord(`/politician/${politicianId}/judicial-record`);
3344
4016
  }
3345
4017
  };
3346
- return /* @__PURE__ */ import_react21.default.createElement("section", { style: sectionStyle }, /* @__PURE__ */ import_react21.default.createElement("h3", { style: headingStyle }, "Judicial Record"), evaluations.length > 0 && /* @__PURE__ */ import_react21.default.createElement("div", { style: { marginBottom: "16px" } }, evaluations.slice(0, 3).map((ev, i) => /* @__PURE__ */ import_react21.default.createElement("span", { key: i, style: evalChipStyle }, ev.rating, /* @__PURE__ */ import_react21.default.createElement("span", { style: { fontWeight: 400, color: "#4a90a4", fontSize: "11px" } }, "\u2014 ", ev.source)))), metrics.length > 0 && /* @__PURE__ */ import_react21.default.createElement("div", { style: cardGridStyle }, metrics.slice(0, 4).map((m, i) => /* @__PURE__ */ import_react21.default.createElement("div", { key: i, style: metricCardStyle }, /* @__PURE__ */ import_react21.default.createElement("div", { style: metricLabelStyle }, METRIC_LABELS[m.metric_type] || m.metric_type.replace(/_/g, " ")), /* @__PURE__ */ import_react21.default.createElement("div", { style: metricValueStyle }, formatMetricValue(m.metric_type, m.value)), m.context_label && /* @__PURE__ */ import_react21.default.createElement("div", { style: metricContextStyle }, m.context_label)))), disciplinary.length > 0 && /* @__PURE__ */ import_react21.default.createElement("div", { style: { marginBottom: "12px" } }, disciplinary.slice(0, 2).map((d, i) => /* @__PURE__ */ import_react21.default.createElement("div", { key: i, style: disciplinaryStyle }, /* @__PURE__ */ import_react21.default.createElement("strong", null, d.record_type), " \u2014 ", formatDate(d.record_date), d.description && /* @__PURE__ */ import_react21.default.createElement("div", { style: { marginTop: "4px" } }, d.description)))), /* @__PURE__ */ import_react21.default.createElement("a", { href: `/politician/${politicianId}/judicial-record`, onClick: handleNavigate, style: linkStyle }, "View Full Judicial Record \u2192"));
4018
+ return /* @__PURE__ */ import_react23.default.createElement("section", { style: sectionStyle }, /* @__PURE__ */ import_react23.default.createElement("h3", { style: headingStyle }, "Judicial Record"), evaluations.length > 0 && /* @__PURE__ */ import_react23.default.createElement("div", { style: { marginBottom: "16px" } }, evaluations.slice(0, 3).map((ev, i) => /* @__PURE__ */ import_react23.default.createElement("span", { key: i, style: evalChipStyle }, ev.rating, /* @__PURE__ */ import_react23.default.createElement("span", { style: { fontWeight: 400, color: "#4a90a4", fontSize: "11px" } }, "\u2014 ", ev.source)))), metrics.length > 0 && /* @__PURE__ */ import_react23.default.createElement("div", { style: cardGridStyle }, metrics.slice(0, 4).map((m, i) => /* @__PURE__ */ import_react23.default.createElement("div", { key: i, style: metricCardStyle }, /* @__PURE__ */ import_react23.default.createElement("div", { style: metricLabelStyle }, METRIC_LABELS[m.metric_type] || m.metric_type.replace(/_/g, " ")), /* @__PURE__ */ import_react23.default.createElement("div", { style: metricValueStyle }, formatMetricValue(m.metric_type, m.value)), m.context_label && /* @__PURE__ */ import_react23.default.createElement("div", { style: metricContextStyle }, m.context_label)))), disciplinary.length > 0 && /* @__PURE__ */ import_react23.default.createElement("div", { style: { marginBottom: "12px" } }, disciplinary.slice(0, 2).map((d, i) => /* @__PURE__ */ import_react23.default.createElement("div", { key: i, style: disciplinaryStyle }, /* @__PURE__ */ import_react23.default.createElement("strong", null, d.record_type), " \u2014 ", formatDate(d.record_date), d.description && /* @__PURE__ */ import_react23.default.createElement("div", { style: { marginTop: "4px" } }, d.description)))), /* @__PURE__ */ import_react23.default.createElement("a", { href: `/politician/${politicianId}/judicial-record`, onClick: handleNavigate, style: linkStyle }, "View Full Judicial Record \u2192"));
3347
4019
  }
3348
4020
 
3349
4021
  // src/PoliticianProfile.jsx
@@ -3494,13 +4166,13 @@ function formatAddress(addr) {
3494
4166
  if (cityStateZip) lines.push(cityStateZip);
3495
4167
  return lines;
3496
4168
  }
3497
- var CalendarIcon = ({ size = 16 }) => /* @__PURE__ */ import_react22.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react22.default.createElement("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }), /* @__PURE__ */ import_react22.default.createElement("line", { x1: "16", y1: "2", x2: "16", y2: "6" }), /* @__PURE__ */ import_react22.default.createElement("line", { x1: "8", y1: "2", x2: "8", y2: "6" }), /* @__PURE__ */ import_react22.default.createElement("line", { x1: "3", y1: "10", x2: "21", y2: "10" }));
3498
- var ClockIcon = ({ size = 16 }) => /* @__PURE__ */ import_react22.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react22.default.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ import_react22.default.createElement("polyline", { points: "12 6 12 12 16 14" }));
3499
- var MapPinIcon = ({ size = 16 }) => /* @__PURE__ */ import_react22.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react22.default.createElement("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z" }), /* @__PURE__ */ import_react22.default.createElement("circle", { cx: "12", cy: "10", r: "3" }));
3500
- var PhoneIcon = ({ size = 16 }) => /* @__PURE__ */ import_react22.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react22.default.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" }));
3501
- var MailIcon = ({ size = 16 }) => /* @__PURE__ */ import_react22.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react22.default.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__ */ import_react22.default.createElement("path", { d: "M22 6L12 13L2 6" }));
3502
- var GlobeIcon = ({ size = 16 }) => /* @__PURE__ */ import_react22.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react22.default.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ import_react22.default.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" }));
3503
- var ExternalLinkIcon = ({ size = 16 }) => /* @__PURE__ */ import_react22.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react22.default.createElement("path", { d: "M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6" }), /* @__PURE__ */ import_react22.default.createElement("polyline", { points: "15 3 21 3 21 9" }), /* @__PURE__ */ import_react22.default.createElement("line", { x1: "10", y1: "14", x2: "21", y2: "3" }));
4169
+ var CalendarIcon = ({ size = 16 }) => /* @__PURE__ */ import_react24.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react24.default.createElement("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }), /* @__PURE__ */ import_react24.default.createElement("line", { x1: "16", y1: "2", x2: "16", y2: "6" }), /* @__PURE__ */ import_react24.default.createElement("line", { x1: "8", y1: "2", x2: "8", y2: "6" }), /* @__PURE__ */ import_react24.default.createElement("line", { x1: "3", y1: "10", x2: "21", y2: "10" }));
4170
+ var ClockIcon = ({ size = 16 }) => /* @__PURE__ */ import_react24.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react24.default.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ import_react24.default.createElement("polyline", { points: "12 6 12 12 16 14" }));
4171
+ var MapPinIcon = ({ size = 16 }) => /* @__PURE__ */ import_react24.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react24.default.createElement("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z" }), /* @__PURE__ */ import_react24.default.createElement("circle", { cx: "12", cy: "10", r: "3" }));
4172
+ var PhoneIcon = ({ size = 16 }) => /* @__PURE__ */ import_react24.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react24.default.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" }));
4173
+ var MailIcon = ({ size = 16 }) => /* @__PURE__ */ import_react24.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react24.default.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__ */ import_react24.default.createElement("path", { d: "M22 6L12 13L2 6" }));
4174
+ var GlobeIcon = ({ size = 16 }) => /* @__PURE__ */ import_react24.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react24.default.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ import_react24.default.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" }));
4175
+ var ExternalLinkIcon = ({ size = 16 }) => /* @__PURE__ */ import_react24.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react24.default.createElement("path", { d: "M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6" }), /* @__PURE__ */ import_react24.default.createElement("polyline", { points: "15 3 21 3 21 9" }), /* @__PURE__ */ import_react24.default.createElement("line", { x1: "10", y1: "14", x2: "21", y2: "3" }));
3504
4176
  function PoliticianProfile({
3505
4177
  politician = {},
3506
4178
  onBack,
@@ -3527,8 +4199,8 @@ function PoliticianProfile({
3527
4199
  return pol.photo_origin_url;
3528
4200
  })();
3529
4201
  const initials = [pol.first_name, pol.last_name].filter(Boolean).map((n) => n[0]).join("");
3530
- const [imgError, setImgError] = (0, import_react22.useState)(false);
3531
- (0, import_react22.useEffect)(() => {
4202
+ const [imgError, setImgError] = (0, import_react24.useState)(false);
4203
+ (0, import_react24.useEffect)(() => {
3532
4204
  setImgError(false);
3533
4205
  }, [profileImageUrl]);
3534
4206
  const getSocialHandle = (type) => {
@@ -3828,7 +4500,7 @@ function PoliticianProfile({
3828
4500
  borderRadius: borderRadius.full
3829
4501
  }
3830
4502
  };
3831
- return /* @__PURE__ */ import_react22.default.createElement("div", { style: styles2.container, className: "ev-politician-profile" }, onBack && /* @__PURE__ */ import_react22.default.createElement(
4503
+ return /* @__PURE__ */ import_react24.default.createElement("div", { style: styles2.container, className: "ev-politician-profile" }, onBack && /* @__PURE__ */ import_react24.default.createElement(
3832
4504
  "button",
3833
4505
  {
3834
4506
  type: "button",
@@ -3841,9 +4513,9 @@ function PoliticianProfile({
3841
4513
  e.currentTarget.style.textDecoration = "none";
3842
4514
  }
3843
4515
  },
3844
- /* @__PURE__ */ import_react22.default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react22.default.createElement("path", { d: "M15 19l-7-7 7-7" })),
4516
+ /* @__PURE__ */ import_react24.default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react24.default.createElement("path", { d: "M15 19l-7-7 7-7" })),
3845
4517
  label
3846
- ), /* @__PURE__ */ import_react22.default.createElement("div", { style: styles2.card }, /* @__PURE__ */ import_react22.default.createElement("div", { style: styles2.heroRow }, /* @__PURE__ */ import_react22.default.createElement("div", { style: styles2.photoWrap }, profileImageUrl && !imgError ? /* @__PURE__ */ import_react22.default.createElement(
4518
+ ), /* @__PURE__ */ import_react24.default.createElement("div", { style: styles2.card }, /* @__PURE__ */ import_react24.default.createElement("div", { style: styles2.heroRow }, /* @__PURE__ */ import_react24.default.createElement("div", { style: styles2.photoWrap }, profileImageUrl && !imgError ? /* @__PURE__ */ import_react24.default.createElement(
3847
4519
  "img",
3848
4520
  {
3849
4521
  src: profileImageUrl,
@@ -3851,7 +4523,7 @@ function PoliticianProfile({
3851
4523
  style: styles2.photo,
3852
4524
  onError: () => setImgError(true)
3853
4525
  }
3854
- ) : /* @__PURE__ */ import_react22.default.createElement("div", { style: styles2.placeholder }, initials || "?")), /* @__PURE__ */ import_react22.default.createElement("div", { style: styles2.infoCol }, styles2.tierBadge && /* @__PURE__ */ import_react22.default.createElement("div", { style: styles2.tierBadge }, tier), /* @__PURE__ */ import_react22.default.createElement("h1", { style: styles2.name }, displayName), banner, /* @__PURE__ */ import_react22.default.createElement("p", { style: styles2.roleLine }, roleLine), pol.office_description && /* @__PURE__ */ import_react22.default.createElement("p", { style: styles2.officeDesc }, pol.office_description), pol.bio_text && /* @__PURE__ */ import_react22.default.createElement("p", { style: styles2.bioText }, pol.bio_text), (termLine || pol.total_years_in_office > 0) && /* @__PURE__ */ import_react22.default.createElement("div", { style: styles2.metaRow }, termLine && /* @__PURE__ */ import_react22.default.createElement("span", { style: styles2.metaItem }, /* @__PURE__ */ import_react22.default.createElement(CalendarIcon, { size: 14 }), termLine), pol.total_years_in_office > 0 && /* @__PURE__ */ import_react22.default.createElement("span", { style: styles2.metaItem }, /* @__PURE__ */ import_react22.default.createElement(ClockIcon, { size: 14 }), pol.total_years_in_office, " ", pol.total_years_in_office === 1 ? "year" : "years", " in office")), pol.web_form_url && /* @__PURE__ */ import_react22.default.createElement(
4526
+ ) : /* @__PURE__ */ import_react24.default.createElement("div", { style: styles2.placeholder }, initials || "?")), /* @__PURE__ */ import_react24.default.createElement("div", { style: styles2.infoCol }, styles2.tierBadge && /* @__PURE__ */ import_react24.default.createElement("div", { style: styles2.tierBadge }, tier), /* @__PURE__ */ import_react24.default.createElement("h1", { style: styles2.name }, displayName), banner, /* @__PURE__ */ import_react24.default.createElement("p", { style: styles2.roleLine }, roleLine), pol.office_description && /* @__PURE__ */ import_react24.default.createElement("p", { style: styles2.officeDesc }, pol.office_description), pol.bio_text && /* @__PURE__ */ import_react24.default.createElement("p", { style: styles2.bioText }, pol.bio_text), (termLine || pol.total_years_in_office > 0) && /* @__PURE__ */ import_react24.default.createElement("div", { style: styles2.metaRow }, termLine && /* @__PURE__ */ import_react24.default.createElement("span", { style: styles2.metaItem }, /* @__PURE__ */ import_react24.default.createElement(CalendarIcon, { size: 14 }), termLine), pol.total_years_in_office > 0 && /* @__PURE__ */ import_react24.default.createElement("span", { style: styles2.metaItem }, /* @__PURE__ */ import_react24.default.createElement(ClockIcon, { size: 14 }), pol.total_years_in_office, " ", pol.total_years_in_office === 1 ? "year" : "years", " in office")), pol.web_form_url && /* @__PURE__ */ import_react24.default.createElement(
3855
4527
  "a",
3856
4528
  {
3857
4529
  href: pol.web_form_url,
@@ -3865,9 +4537,9 @@ function PoliticianProfile({
3865
4537
  e.currentTarget.style.background = colors.evTeal;
3866
4538
  }
3867
4539
  },
3868
- /* @__PURE__ */ import_react22.default.createElement(ExternalLinkIcon, { size: 14 }),
4540
+ /* @__PURE__ */ import_react24.default.createElement(ExternalLinkIcon, { size: 14 }),
3869
4541
  "Submit a Message"
3870
- ))), hasContactInfo && /* @__PURE__ */ import_react22.default.createElement(import_react22.default.Fragment, null, /* @__PURE__ */ import_react22.default.createElement("div", { style: divider }), /* @__PURE__ */ import_react22.default.createElement("div", { style: sectionHeading }, /* @__PURE__ */ import_react22.default.createElement(MailIcon, { size: 20 }), "Contact Information"), /* @__PURE__ */ import_react22.default.createElement("div", { style: styles2.contactGrid }, hasAddresses && /* @__PURE__ */ import_react22.default.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ import_react22.default.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ import_react22.default.createElement(MapPinIcon, { size: 12 }), "Addresses"), addresses.map((addr, i) => /* @__PURE__ */ import_react22.default.createElement("div", { key: `addr-${i}` }, /* @__PURE__ */ import_react22.default.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, addr.type), /* @__PURE__ */ import_react22.default.createElement("p", { style: styles2.contactValue }, addr.lines.map((line, j) => /* @__PURE__ */ import_react22.default.createElement(import_react22.default.Fragment, { key: j }, line, j < addr.lines.length - 1 && /* @__PURE__ */ import_react22.default.createElement("br", null))))))), hasPhones && /* @__PURE__ */ import_react22.default.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ import_react22.default.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ import_react22.default.createElement(PhoneIcon, { size: 12 }), "Phone"), Object.entries(phonesByType).map(([type, phones], i) => /* @__PURE__ */ import_react22.default.createElement("div", { key: `phone-${type}` }, /* @__PURE__ */ import_react22.default.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, type), phones.map((phone, j) => /* @__PURE__ */ import_react22.default.createElement("p", { key: j, style: styles2.contactValue }, /* @__PURE__ */ import_react22.default.createElement(
4542
+ ))), hasContactInfo && /* @__PURE__ */ import_react24.default.createElement(import_react24.default.Fragment, null, /* @__PURE__ */ import_react24.default.createElement("div", { style: divider }), /* @__PURE__ */ import_react24.default.createElement("div", { style: sectionHeading }, /* @__PURE__ */ import_react24.default.createElement(MailIcon, { size: 20 }), "Contact Information"), /* @__PURE__ */ import_react24.default.createElement("div", { style: styles2.contactGrid }, hasAddresses && /* @__PURE__ */ import_react24.default.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ import_react24.default.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ import_react24.default.createElement(MapPinIcon, { size: 12 }), "Addresses"), addresses.map((addr, i) => /* @__PURE__ */ import_react24.default.createElement("div", { key: `addr-${i}` }, /* @__PURE__ */ import_react24.default.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, addr.type), /* @__PURE__ */ import_react24.default.createElement("p", { style: styles2.contactValue }, addr.lines.map((line, j) => /* @__PURE__ */ import_react24.default.createElement(import_react24.default.Fragment, { key: j }, line, j < addr.lines.length - 1 && /* @__PURE__ */ import_react24.default.createElement("br", null))))))), hasPhones && /* @__PURE__ */ import_react24.default.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ import_react24.default.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ import_react24.default.createElement(PhoneIcon, { size: 12 }), "Phone"), Object.entries(phonesByType).map(([type, phones], i) => /* @__PURE__ */ import_react24.default.createElement("div", { key: `phone-${type}` }, /* @__PURE__ */ import_react24.default.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, type), phones.map((phone, j) => /* @__PURE__ */ import_react24.default.createElement("p", { key: j, style: styles2.contactValue }, /* @__PURE__ */ import_react24.default.createElement(
3871
4543
  "a",
3872
4544
  {
3873
4545
  href: `tel:${phone}`,
@@ -3880,7 +4552,7 @@ function PoliticianProfile({
3880
4552
  }
3881
4553
  },
3882
4554
  phone
3883
- )))))), hasEmails && /* @__PURE__ */ import_react22.default.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ import_react22.default.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ import_react22.default.createElement(MailIcon, { size: 12 }), "Email"), Object.entries(emailsByType).filter(([, emails]) => emails.some((e) => e && e.trim())).map(([type, emails], i) => /* @__PURE__ */ import_react22.default.createElement("div", { key: `email-${type}` }, /* @__PURE__ */ import_react22.default.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, type), emails.filter((e) => e && e.trim()).map((email, j) => /* @__PURE__ */ import_react22.default.createElement("p", { key: j, style: styles2.contactValue }, /* @__PURE__ */ import_react22.default.createElement(
4555
+ )))))), hasEmails && /* @__PURE__ */ import_react24.default.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ import_react24.default.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ import_react24.default.createElement(MailIcon, { size: 12 }), "Email"), Object.entries(emailsByType).filter(([, emails]) => emails.some((e) => e && e.trim())).map(([type, emails], i) => /* @__PURE__ */ import_react24.default.createElement("div", { key: `email-${type}` }, /* @__PURE__ */ import_react24.default.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, type), emails.filter((e) => e && e.trim()).map((email, j) => /* @__PURE__ */ import_react24.default.createElement("p", { key: j, style: styles2.contactValue }, /* @__PURE__ */ import_react24.default.createElement(
3884
4556
  "a",
3885
4557
  {
3886
4558
  href: `mailto:${email}`,
@@ -3893,7 +4565,7 @@ function PoliticianProfile({
3893
4565
  }
3894
4566
  },
3895
4567
  email
3896
- )))))), hasWebsitesCol && /* @__PURE__ */ import_react22.default.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ import_react22.default.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ import_react22.default.createElement(GlobeIcon, { size: 12 }), "Websites"), allWebsites.map((url, i) => /* @__PURE__ */ import_react22.default.createElement("p", { key: i, style: styles2.contactValue }, /* @__PURE__ */ import_react22.default.createElement(
4568
+ )))))), hasWebsitesCol && /* @__PURE__ */ import_react24.default.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ import_react24.default.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ import_react24.default.createElement(GlobeIcon, { size: 12 }), "Websites"), allWebsites.map((url, i) => /* @__PURE__ */ import_react24.default.createElement("p", { key: i, style: styles2.contactValue }, /* @__PURE__ */ import_react24.default.createElement(
3897
4569
  "a",
3898
4570
  {
3899
4571
  href: url,
@@ -3908,7 +4580,7 @@ function PoliticianProfile({
3908
4580
  }
3909
4581
  },
3910
4582
  extractDomain(url)
3911
- ))), (hasSocial || socialWebsiteUrls.length > 0) && /* @__PURE__ */ import_react22.default.createElement(
4583
+ ))), (hasSocial || socialWebsiteUrls.length > 0) && /* @__PURE__ */ import_react24.default.createElement(
3912
4584
  SocialLinks,
3913
4585
  {
3914
4586
  twitter,
@@ -3919,14 +4591,14 @@ function PoliticianProfile({
3919
4591
  size: "sm",
3920
4592
  style: { marginTop: allWebsites.length > 0 ? "8px" : 0 }
3921
4593
  }
3922
- )))), committees.length > 0 && /* @__PURE__ */ import_react22.default.createElement(import_react22.default.Fragment, null, /* @__PURE__ */ import_react22.default.createElement("div", { style: divider }), /* @__PURE__ */ import_react22.default.createElement(CommitteeTable, { committees })), pol.is_judicial ? /* @__PURE__ */ import_react22.default.createElement(
4594
+ )))), committees.length > 0 && /* @__PURE__ */ import_react24.default.createElement(import_react24.default.Fragment, null, /* @__PURE__ */ import_react24.default.createElement("div", { style: divider }), /* @__PURE__ */ import_react24.default.createElement(CommitteeTable, { committees })), pol.is_judicial ? /* @__PURE__ */ import_react24.default.createElement(
3923
4595
  JudicialScorecard,
3924
4596
  {
3925
4597
  judicialRecord,
3926
4598
  politicianId,
3927
4599
  onNavigateToRecord
3928
4600
  }
3929
- ) : /* @__PURE__ */ import_react22.default.createElement(
4601
+ ) : /* @__PURE__ */ import_react24.default.createElement(
3930
4602
  LegislativeInlineSummary,
3931
4603
  {
3932
4604
  summary: legislativeSummary,
@@ -3937,7 +4609,7 @@ function PoliticianProfile({
3937
4609
  }
3938
4610
 
3939
4611
  // src/LegislativeRecord.jsx
3940
- var import_react23 = __toESM(require("react"));
4612
+ var import_react25 = __toESM(require("react"));
3941
4613
  var DEFAULT_LIMIT = 25;
3942
4614
  function normalizeText(str) {
3943
4615
  if (!str) return "";
@@ -4017,7 +4689,7 @@ function getPositionBadge(position) {
4017
4689
  return { bg: colors.borderLight, text: colors.textSecondary };
4018
4690
  }
4019
4691
  function Badge({ label, bg, text }) {
4020
- return /* @__PURE__ */ import_react23.default.createElement("span", { style: {
4692
+ return /* @__PURE__ */ import_react25.default.createElement("span", { style: {
4021
4693
  display: "inline-block",
4022
4694
  background: bg,
4023
4695
  color: text,
@@ -4030,18 +4702,18 @@ function Badge({ label, bg, text }) {
4030
4702
  } }, label);
4031
4703
  }
4032
4704
  function SectionHeader({ title, yearFilter, years, onYearChange }) {
4033
- return /* @__PURE__ */ import_react23.default.createElement("div", { style: {
4705
+ return /* @__PURE__ */ import_react25.default.createElement("div", { style: {
4034
4706
  display: "flex",
4035
4707
  alignItems: "center",
4036
4708
  justifyContent: "space-between",
4037
4709
  marginBottom: spacing[4]
4038
- } }, /* @__PURE__ */ import_react23.default.createElement("h2", { style: {
4710
+ } }, /* @__PURE__ */ import_react25.default.createElement("h2", { style: {
4039
4711
  fontFamily: fonts.primary,
4040
4712
  fontSize: fontSizes.xl,
4041
4713
  fontWeight: fontWeights.bold,
4042
4714
  color: colors.evTeal,
4043
4715
  margin: 0
4044
- } }, title), years && years.length > 0 && /* @__PURE__ */ import_react23.default.createElement(
4716
+ } }, title), years && years.length > 0 && /* @__PURE__ */ import_react25.default.createElement(
4045
4717
  "select",
4046
4718
  {
4047
4719
  value: yearFilter,
@@ -4057,13 +4729,13 @@ function SectionHeader({ title, yearFilter, years, onYearChange }) {
4057
4729
  cursor: "pointer"
4058
4730
  }
4059
4731
  },
4060
- /* @__PURE__ */ import_react23.default.createElement("option", { value: "All" }, "All years"),
4061
- years.map((y) => /* @__PURE__ */ import_react23.default.createElement("option", { key: y, value: y }, y))
4732
+ /* @__PURE__ */ import_react25.default.createElement("option", { value: "All" }, "All years"),
4733
+ years.map((y) => /* @__PURE__ */ import_react25.default.createElement("option", { key: y, value: y }, y))
4062
4734
  ));
4063
4735
  }
4064
4736
  function ShowAllLink({ totalCount, visibleCount, onClick }) {
4065
4737
  if (totalCount <= visibleCount) return null;
4066
- return /* @__PURE__ */ import_react23.default.createElement("div", { style: { textAlign: "center", marginTop: spacing[3] } }, /* @__PURE__ */ import_react23.default.createElement(
4738
+ return /* @__PURE__ */ import_react25.default.createElement("div", { style: { textAlign: "center", marginTop: spacing[3] } }, /* @__PURE__ */ import_react25.default.createElement(
4067
4739
  "button",
4068
4740
  {
4069
4741
  type: "button",
@@ -4091,7 +4763,7 @@ function ShowAllLink({ totalCount, visibleCount, onClick }) {
4091
4763
  ));
4092
4764
  }
4093
4765
  function EmptyState({ message }) {
4094
- return /* @__PURE__ */ import_react23.default.createElement("p", { style: {
4766
+ return /* @__PURE__ */ import_react25.default.createElement("p", { style: {
4095
4767
  fontFamily: fonts.primary,
4096
4768
  fontSize: fontSizes.sm,
4097
4769
  color: colors.textMuted,
@@ -4101,24 +4773,24 @@ function EmptyState({ message }) {
4101
4773
  } }, message);
4102
4774
  }
4103
4775
  function Spinner() {
4104
- return /* @__PURE__ */ import_react23.default.createElement("div", { style: {
4776
+ return /* @__PURE__ */ import_react25.default.createElement("div", { style: {
4105
4777
  display: "flex",
4106
4778
  justifyContent: "center",
4107
4779
  alignItems: "center",
4108
4780
  padding: spacing[10]
4109
- } }, /* @__PURE__ */ import_react23.default.createElement("div", { style: {
4781
+ } }, /* @__PURE__ */ import_react25.default.createElement("div", { style: {
4110
4782
  width: "40px",
4111
4783
  height: "40px",
4112
4784
  borderRadius: borderRadius.full,
4113
4785
  border: `3px solid ${colors.borderLight}`,
4114
4786
  borderTopColor: colors.evTeal,
4115
4787
  animation: "ev-spin 0.8s linear infinite"
4116
- } }), /* @__PURE__ */ import_react23.default.createElement("style", null, `@keyframes ev-spin { to { transform: rotate(360deg); } }`));
4788
+ } }), /* @__PURE__ */ import_react25.default.createElement("style", null, `@keyframes ev-spin { to { transform: rotate(360deg); } }`));
4117
4789
  }
4118
4790
  function CommitteesSection({ committees, leadership }) {
4119
- const [showAll, setShowAll] = (0, import_react23.useState)(false);
4791
+ const [showAll, setShowAll] = (0, import_react25.useState)(false);
4120
4792
  const visible = showAll ? committees : committees.slice(0, DEFAULT_LIMIT);
4121
- return /* @__PURE__ */ import_react23.default.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ import_react23.default.createElement(SectionHeader, { title: "Committees & Leadership" }), leadership && leadership.length > 0 && /* @__PURE__ */ import_react23.default.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: spacing[2], marginBottom: spacing[4] } }, leadership.map((role, i) => /* @__PURE__ */ import_react23.default.createElement("div", { key: i, style: {
4793
+ return /* @__PURE__ */ import_react25.default.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ import_react25.default.createElement(SectionHeader, { title: "Committees & Leadership" }), leadership && leadership.length > 0 && /* @__PURE__ */ import_react25.default.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: spacing[2], marginBottom: spacing[4] } }, leadership.map((role, i) => /* @__PURE__ */ import_react25.default.createElement("div", { key: i, style: {
4122
4794
  display: "inline-flex",
4123
4795
  alignItems: "center",
4124
4796
  gap: spacing[1],
@@ -4129,23 +4801,23 @@ function CommitteesSection({ committees, leadership }) {
4129
4801
  fontFamily: fonts.primary,
4130
4802
  fontSize: fontSizes.sm,
4131
4803
  fontWeight: fontWeights.semibold
4132
- } }, role.title, role.chamber && /* @__PURE__ */ import_react23.default.createElement("span", { style: { fontWeight: fontWeights.regular, opacity: 0.85 } }, "(", role.chamber, ")")))), committees.length === 0 ? /* @__PURE__ */ import_react23.default.createElement(EmptyState, { message: "Committee information is not available for this office." }) : /* @__PURE__ */ import_react23.default.createElement(import_react23.default.Fragment, null, /* @__PURE__ */ import_react23.default.createElement("div", null, visible.map((c, i) => {
4804
+ } }, role.title, role.chamber && /* @__PURE__ */ import_react25.default.createElement("span", { style: { fontWeight: fontWeights.regular, opacity: 0.85 } }, "(", role.chamber, ")")))), committees.length === 0 ? /* @__PURE__ */ import_react25.default.createElement(EmptyState, { message: "Committee information is not available for this office." }) : /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, /* @__PURE__ */ import_react25.default.createElement("div", null, visible.map((c, i) => {
4133
4805
  const badge = getRoleBadge(c.role);
4134
- return /* @__PURE__ */ import_react23.default.createElement("div", { key: i, style: {
4806
+ return /* @__PURE__ */ import_react25.default.createElement("div", { key: i, style: {
4135
4807
  display: "flex",
4136
4808
  alignItems: "center",
4137
4809
  justifyContent: "space-between",
4138
4810
  padding: `${spacing[3]} 0`,
4139
4811
  borderBottom: `1px solid ${colors.borderLight}`,
4140
4812
  gap: spacing[3]
4141
- } }, /* @__PURE__ */ import_react23.default.createElement("span", { style: {
4813
+ } }, /* @__PURE__ */ import_react25.default.createElement("span", { style: {
4142
4814
  fontFamily: fonts.primary,
4143
4815
  fontSize: fontSizes.sm,
4144
4816
  color: colors.textSecondary,
4145
4817
  flex: 1,
4146
4818
  minWidth: 0
4147
- } }, c.committee_name, c.parent_name && /* @__PURE__ */ import_react23.default.createElement("span", { style: { color: colors.textMuted, marginLeft: spacing[1] } }, "(", c.parent_name, ")")), /* @__PURE__ */ import_react23.default.createElement(Badge, { label: badge.label, bg: badge.bg, text: badge.text }));
4148
- })), !showAll && /* @__PURE__ */ import_react23.default.createElement(
4819
+ } }, c.committee_name, c.parent_name && /* @__PURE__ */ import_react25.default.createElement("span", { style: { color: colors.textMuted, marginLeft: spacing[1] } }, "(", c.parent_name, ")")), /* @__PURE__ */ import_react25.default.createElement(Badge, { label: badge.label, bg: badge.bg, text: badge.text }));
4820
+ })), !showAll && /* @__PURE__ */ import_react25.default.createElement(
4149
4821
  ShowAllLink,
4150
4822
  {
4151
4823
  totalCount: committees.length,
@@ -4156,15 +4828,15 @@ function CommitteesSection({ committees, leadership }) {
4156
4828
  }
4157
4829
  function LegislationSection({ bills, isMobile }) {
4158
4830
  const years = getYears(bills, "introduced_at");
4159
- const [yearFilter, setYearFilter] = (0, import_react23.useState)("All");
4160
- const [showAll, setShowAll] = (0, import_react23.useState)(false);
4831
+ const [yearFilter, setYearFilter] = (0, import_react25.useState)("All");
4832
+ const [showAll, setShowAll] = (0, import_react25.useState)(false);
4161
4833
  const handleYearChange = (y) => {
4162
4834
  setYearFilter(y);
4163
4835
  setShowAll(false);
4164
4836
  };
4165
4837
  const filtered = yearFilter === "All" ? bills : bills.filter((b) => extractYear(b.introduced_at) === yearFilter);
4166
4838
  const visible = showAll ? filtered : filtered.slice(0, DEFAULT_LIMIT);
4167
- return /* @__PURE__ */ import_react23.default.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ import_react23.default.createElement(
4839
+ return /* @__PURE__ */ import_react25.default.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ import_react25.default.createElement(
4168
4840
  SectionHeader,
4169
4841
  {
4170
4842
  title: "Sponsored Legislation",
@@ -4172,42 +4844,42 @@ function LegislationSection({ bills, isMobile }) {
4172
4844
  years,
4173
4845
  onYearChange: handleYearChange
4174
4846
  }
4175
- ), bills.length === 0 ? /* @__PURE__ */ import_react23.default.createElement(EmptyState, { message: "Sponsored legislation data is not available for this office." }) : /* @__PURE__ */ import_react23.default.createElement(import_react23.default.Fragment, null, /* @__PURE__ */ import_react23.default.createElement("div", null, visible.map((bill, i) => {
4847
+ ), bills.length === 0 ? /* @__PURE__ */ import_react25.default.createElement(EmptyState, { message: "Sponsored legislation data is not available for this office." }) : /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, /* @__PURE__ */ import_react25.default.createElement("div", null, visible.map((bill, i) => {
4176
4848
  const statusBadge = getStatusBadge(bill.status_label);
4177
- return /* @__PURE__ */ import_react23.default.createElement("div", { key: i, style: {
4849
+ return /* @__PURE__ */ import_react25.default.createElement("div", { key: i, style: {
4178
4850
  display: "flex",
4179
4851
  flexDirection: isMobile ? "column" : "row",
4180
4852
  alignItems: isMobile ? "flex-start" : "center",
4181
4853
  gap: isMobile ? spacing[1] : spacing[3],
4182
4854
  padding: `${spacing[3]} 0`,
4183
4855
  borderBottom: `1px solid ${colors.borderLight}`
4184
- } }, /* @__PURE__ */ import_react23.default.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ import_react23.default.createElement("span", { style: {
4856
+ } }, /* @__PURE__ */ import_react25.default.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ import_react25.default.createElement("span", { style: {
4185
4857
  fontFamily: fonts.primary,
4186
4858
  fontSize: fontSizes.xs,
4187
4859
  fontWeight: fontWeights.bold,
4188
4860
  color: colors.textSecondary,
4189
4861
  marginRight: spacing[2]
4190
- } }, bill.number), /* @__PURE__ */ import_react23.default.createElement("span", { style: {
4862
+ } }, bill.number), /* @__PURE__ */ import_react25.default.createElement("span", { style: {
4191
4863
  fontFamily: fonts.primary,
4192
4864
  fontSize: fontSizes.sm,
4193
4865
  color: colors.textSecondary
4194
- } }, bill.title)), /* @__PURE__ */ import_react23.default.createElement("div", { style: {
4866
+ } }, bill.title)), /* @__PURE__ */ import_react25.default.createElement("div", { style: {
4195
4867
  display: "flex",
4196
4868
  alignItems: "center",
4197
4869
  gap: spacing[2],
4198
4870
  flexShrink: 0,
4199
4871
  flexWrap: "wrap"
4200
- } }, /* @__PURE__ */ import_react23.default.createElement(Badge, { label: bill.status_label || "Unknown", bg: statusBadge.bg, text: statusBadge.text }), bill.introduced_at && /* @__PURE__ */ import_react23.default.createElement("span", { style: {
4872
+ } }, /* @__PURE__ */ import_react25.default.createElement(Badge, { label: bill.status_label || "Unknown", bg: statusBadge.bg, text: statusBadge.text }), bill.introduced_at && /* @__PURE__ */ import_react25.default.createElement("span", { style: {
4201
4873
  fontFamily: fonts.primary,
4202
4874
  fontSize: fontSizes.xs,
4203
4875
  color: colors.textMuted
4204
- } }, formatDate2(bill.introduced_at)), /* @__PURE__ */ import_react23.default.createElement("span", { style: {
4876
+ } }, formatDate2(bill.introduced_at)), /* @__PURE__ */ import_react25.default.createElement("span", { style: {
4205
4877
  fontFamily: fonts.primary,
4206
4878
  fontSize: fontSizes.xs,
4207
4879
  color: colors.textMuted,
4208
4880
  fontStyle: "italic"
4209
4881
  } }, bill.is_sponsor ? "Sponsored" : "Cosponsored")));
4210
- })), !showAll && /* @__PURE__ */ import_react23.default.createElement(
4882
+ })), !showAll && /* @__PURE__ */ import_react25.default.createElement(
4211
4883
  ShowAllLink,
4212
4884
  {
4213
4885
  totalCount: filtered.length,
@@ -4218,15 +4890,15 @@ function LegislationSection({ bills, isMobile }) {
4218
4890
  }
4219
4891
  function VotingSection({ votes, isMobile }) {
4220
4892
  const years = getYears(votes, "vote_date");
4221
- const [yearFilter, setYearFilter] = (0, import_react23.useState)("All");
4222
- const [showAll, setShowAll] = (0, import_react23.useState)(false);
4893
+ const [yearFilter, setYearFilter] = (0, import_react25.useState)("All");
4894
+ const [showAll, setShowAll] = (0, import_react25.useState)(false);
4223
4895
  const handleYearChange = (y) => {
4224
4896
  setYearFilter(y);
4225
4897
  setShowAll(false);
4226
4898
  };
4227
4899
  const filtered = yearFilter === "All" ? votes : votes.filter((v) => extractYear(v.vote_date) === yearFilter);
4228
4900
  const visible = showAll ? filtered : filtered.slice(0, DEFAULT_LIMIT);
4229
- return /* @__PURE__ */ import_react23.default.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ import_react23.default.createElement(
4901
+ return /* @__PURE__ */ import_react25.default.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ import_react25.default.createElement(
4230
4902
  SectionHeader,
4231
4903
  {
4232
4904
  title: "Voting Record",
@@ -4234,38 +4906,38 @@ function VotingSection({ votes, isMobile }) {
4234
4906
  years,
4235
4907
  onYearChange: handleYearChange
4236
4908
  }
4237
- ), votes.length === 0 ? /* @__PURE__ */ import_react23.default.createElement(EmptyState, { message: "Voting records are not available for this office." }) : /* @__PURE__ */ import_react23.default.createElement(import_react23.default.Fragment, null, /* @__PURE__ */ import_react23.default.createElement("div", null, visible.map((vote, i) => {
4909
+ ), votes.length === 0 ? /* @__PURE__ */ import_react25.default.createElement(EmptyState, { message: "Voting records are not available for this office." }) : /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, /* @__PURE__ */ import_react25.default.createElement("div", null, visible.map((vote, i) => {
4238
4910
  const positionBadge = getPositionBadge(vote.position);
4239
4911
  const normPosition = normalizeText(vote.position);
4240
4912
  const topic = vote.bill_title || vote.vote_question;
4241
4913
  const sourceUrl = vote.bill_url;
4242
- return /* @__PURE__ */ import_react23.default.createElement("div", { key: i, style: {
4914
+ return /* @__PURE__ */ import_react25.default.createElement("div", { key: i, style: {
4243
4915
  display: "flex",
4244
4916
  flexDirection: isMobile ? "column" : "row",
4245
4917
  alignItems: isMobile ? "flex-start" : "center",
4246
4918
  gap: isMobile ? spacing[1] : spacing[3],
4247
4919
  padding: `${spacing[3]} 0`,
4248
4920
  borderBottom: `1px solid ${colors.borderLight}`
4249
- } }, /* @__PURE__ */ import_react23.default.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ import_react23.default.createElement("span", { style: {
4921
+ } }, /* @__PURE__ */ import_react25.default.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ import_react25.default.createElement("span", { style: {
4250
4922
  fontFamily: fonts.primary,
4251
4923
  fontSize: fontSizes.sm,
4252
4924
  color: colors.textSecondary
4253
- } }, topic)), /* @__PURE__ */ import_react23.default.createElement("div", { style: {
4925
+ } }, topic)), /* @__PURE__ */ import_react25.default.createElement("div", { style: {
4254
4926
  display: "flex",
4255
4927
  alignItems: "center",
4256
4928
  gap: spacing[2],
4257
4929
  flexShrink: 0,
4258
4930
  flexWrap: "wrap"
4259
- } }, vote.vote_date && /* @__PURE__ */ import_react23.default.createElement("span", { style: {
4931
+ } }, vote.vote_date && /* @__PURE__ */ import_react25.default.createElement("span", { style: {
4260
4932
  fontFamily: fonts.primary,
4261
4933
  fontSize: fontSizes.xs,
4262
4934
  color: colors.textMuted
4263
- } }, formatDate2(vote.vote_date)), /* @__PURE__ */ import_react23.default.createElement(Badge, { label: normPosition || "Unknown", bg: positionBadge.bg, text: positionBadge.text }), vote.result && /* @__PURE__ */ import_react23.default.createElement("span", { style: {
4935
+ } }, formatDate2(vote.vote_date)), /* @__PURE__ */ import_react25.default.createElement(Badge, { label: normPosition || "Unknown", bg: positionBadge.bg, text: positionBadge.text }), vote.result && /* @__PURE__ */ import_react25.default.createElement("span", { style: {
4264
4936
  fontFamily: fonts.primary,
4265
4937
  fontSize: fontSizes.xs,
4266
4938
  color: vote.result === "Passed" ? colors.success : colors.textMuted,
4267
4939
  fontWeight: fontWeights.medium
4268
- } }, vote.result), sourceUrl && /* @__PURE__ */ import_react23.default.createElement(
4940
+ } }, vote.result), sourceUrl && /* @__PURE__ */ import_react25.default.createElement(
4269
4941
  "a",
4270
4942
  {
4271
4943
  href: sourceUrl,
@@ -4286,7 +4958,7 @@ function VotingSection({ votes, isMobile }) {
4286
4958
  },
4287
4959
  "Source"
4288
4960
  )));
4289
- })), !showAll && /* @__PURE__ */ import_react23.default.createElement(
4961
+ })), !showAll && /* @__PURE__ */ import_react25.default.createElement(
4290
4962
  ShowAllLink,
4291
4963
  {
4292
4964
  totalCount: filtered.length,
@@ -4305,20 +4977,20 @@ function LegislativeRecord({
4305
4977
  }) {
4306
4978
  const isMobile = useMediaQuery("(max-width: 768px)");
4307
4979
  if (loading) {
4308
- return /* @__PURE__ */ import_react23.default.createElement(Spinner, null);
4980
+ return /* @__PURE__ */ import_react25.default.createElement(Spinner, null);
4309
4981
  }
4310
- return /* @__PURE__ */ import_react23.default.createElement("div", { style: { fontFamily: fonts.primary } }, politicianName && /* @__PURE__ */ import_react23.default.createElement("h1", { style: {
4982
+ return /* @__PURE__ */ import_react25.default.createElement("div", { style: { fontFamily: fonts.primary } }, politicianName && /* @__PURE__ */ import_react25.default.createElement("h1", { style: {
4311
4983
  fontFamily: fonts.primary,
4312
4984
  fontSize: isMobile ? fontSizes["2xl"] : fontSizes["4xl"],
4313
4985
  fontWeight: fontWeights.bold,
4314
4986
  color: colors.evTeal,
4315
4987
  marginBottom: spacing[8],
4316
4988
  marginTop: 0
4317
- } }, "Legislative Record: ", politicianName), /* @__PURE__ */ import_react23.default.createElement(CommitteesSection, { committees, leadership }), /* @__PURE__ */ import_react23.default.createElement(LegislationSection, { bills, isMobile }), /* @__PURE__ */ import_react23.default.createElement(VotingSection, { votes, isMobile }));
4989
+ } }, "Legislative Record: ", politicianName), /* @__PURE__ */ import_react25.default.createElement(CommitteesSection, { committees, leadership }), /* @__PURE__ */ import_react25.default.createElement(LegislationSection, { bills, isMobile }), /* @__PURE__ */ import_react25.default.createElement(VotingSection, { votes, isMobile }));
4318
4990
  }
4319
4991
 
4320
4992
  // src/JudicialRecordDetail.jsx
4321
- var import_react24 = __toESM(require("react"));
4993
+ var import_react26 = __toESM(require("react"));
4322
4994
  var containerStyle = {
4323
4995
  fontFamily: "'Manrope', sans-serif",
4324
4996
  maxWidth: "800px"
@@ -4403,7 +5075,7 @@ var emptyStateStyle = {
4403
5075
  function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
4404
5076
  var _a;
4405
5077
  if (!judicialRecord) {
4406
- return /* @__PURE__ */ import_react24.default.createElement("div", { style: containerStyle }, /* @__PURE__ */ import_react24.default.createElement("button", { style: backBtnStyle, onClick: onBack }, "\u2190 Back to Profile"), /* @__PURE__ */ import_react24.default.createElement("div", { style: emptyStateStyle }, "No judicial record data available."));
5078
+ return /* @__PURE__ */ import_react26.default.createElement("div", { style: containerStyle }, /* @__PURE__ */ import_react26.default.createElement("button", { style: backBtnStyle, onClick: onBack }, "\u2190 Back to Profile"), /* @__PURE__ */ import_react26.default.createElement("div", { style: emptyStateStyle }, "No judicial record data available."));
4407
5079
  }
4408
5080
  const {
4409
5081
  judge_detail: detail,
@@ -4412,13 +5084,13 @@ function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
4412
5084
  disciplinary_records: disciplinary = []
4413
5085
  } = judicialRecord;
4414
5086
  const displayName = politician.full_name || `${politician.first_name || ""} ${politician.last_name || ""}`.trim();
4415
- return /* @__PURE__ */ import_react24.default.createElement("div", { style: containerStyle }, /* @__PURE__ */ import_react24.default.createElement("button", { style: backBtnStyle, onClick: onBack }, "\u2190 Back to Profile"), /* @__PURE__ */ import_react24.default.createElement("h1", { style: nameStyle }, displayName), /* @__PURE__ */ import_react24.default.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__ */ import_react24.default.createElement(import_react24.default.Fragment, null, /* @__PURE__ */ import_react24.default.createElement("h2", { style: sectionHeadingStyle }, "Background"), detail.appointed_by && /* @__PURE__ */ import_react24.default.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ import_react24.default.createElement("span", { style: detailLabelStyle }, "Appointed by"), /* @__PURE__ */ import_react24.default.createElement("span", { style: detailValueStyle }, detail.appointed_by, " (", detail.appointing_president_party, ")")), detail.confirmation_vote && /* @__PURE__ */ import_react24.default.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ import_react24.default.createElement("span", { style: detailLabelStyle }, "Confirmation Vote"), /* @__PURE__ */ import_react24.default.createElement("span", { style: detailValueStyle }, detail.confirmation_vote)), detail.election_type && /* @__PURE__ */ import_react24.default.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ import_react24.default.createElement("span", { style: detailLabelStyle }, "Election Type"), /* @__PURE__ */ import_react24.default.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__ */ import_react24.default.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ import_react24.default.createElement("span", { style: detailLabelStyle }, "Areas of Focus"), /* @__PURE__ */ import_react24.default.createElement("span", { style: detailValueStyle }, detail.areas_of_focus.join(", ")))), /* @__PURE__ */ import_react24.default.createElement("h2", { style: sectionHeadingStyle }, "Performance Evaluations"), evaluations.length === 0 ? /* @__PURE__ */ import_react24.default.createElement("div", { style: emptyStateStyle }, "No evaluation data available yet.") : /* @__PURE__ */ import_react24.default.createElement("table", { style: tableStyle }, /* @__PURE__ */ import_react24.default.createElement("thead", null, /* @__PURE__ */ import_react24.default.createElement("tr", null, /* @__PURE__ */ import_react24.default.createElement("th", { style: thStyle }, "Source"), /* @__PURE__ */ import_react24.default.createElement("th", { style: thStyle }, "Rating"), /* @__PURE__ */ import_react24.default.createElement("th", { style: thStyle }, "Date"))), /* @__PURE__ */ import_react24.default.createElement("tbody", null, evaluations.map((ev, i) => /* @__PURE__ */ import_react24.default.createElement("tr", { key: i }, /* @__PURE__ */ import_react24.default.createElement("td", { style: tdStyle }, ev.source_url ? /* @__PURE__ */ import_react24.default.createElement("a", { href: ev.source_url, target: "_blank", rel: "noopener noreferrer", style: { color: "#319795" } }, ev.source) : ev.source), /* @__PURE__ */ import_react24.default.createElement("td", { style: { ...tdStyle, fontWeight: 600 } }, ev.rating), /* @__PURE__ */ import_react24.default.createElement("td", { style: tdStyle }, formatDate(ev.rating_date)))))), /* @__PURE__ */ import_react24.default.createElement("h2", { style: sectionHeadingStyle }, "Performance Metrics"), metrics.length === 0 ? /* @__PURE__ */ import_react24.default.createElement("div", { style: emptyStateStyle }, "No performance metric data available yet.") : /* @__PURE__ */ import_react24.default.createElement("table", { style: tableStyle }, /* @__PURE__ */ import_react24.default.createElement("thead", null, /* @__PURE__ */ import_react24.default.createElement("tr", null, /* @__PURE__ */ import_react24.default.createElement("th", { style: thStyle }, "Metric"), /* @__PURE__ */ import_react24.default.createElement("th", { style: thStyle }, "Value"), /* @__PURE__ */ import_react24.default.createElement("th", { style: thStyle }, "Context"), /* @__PURE__ */ import_react24.default.createElement("th", { style: thStyle }, "Period"))), /* @__PURE__ */ import_react24.default.createElement("tbody", null, metrics.map((m, i) => /* @__PURE__ */ import_react24.default.createElement("tr", { key: i }, /* @__PURE__ */ import_react24.default.createElement("td", { style: { ...tdStyle, fontWeight: 600 } }, METRIC_LABELS[m.metric_type] || m.metric_type.replace(/_/g, " ")), /* @__PURE__ */ import_react24.default.createElement("td", { style: tdStyle }, formatMetricValue(m.metric_type, m.value)), /* @__PURE__ */ import_react24.default.createElement("td", { style: { ...tdStyle, color: "#718096", fontSize: "13px" } }, m.context_label), /* @__PURE__ */ import_react24.default.createElement("td", { style: tdStyle }, m.time_period))))), disciplinary.length > 0 && /* @__PURE__ */ import_react24.default.createElement(import_react24.default.Fragment, null, /* @__PURE__ */ import_react24.default.createElement("h2", { style: sectionHeadingStyle }, "Disciplinary History"), disciplinary.map((d, i) => /* @__PURE__ */ import_react24.default.createElement("div", { key: i, style: {
5087
+ return /* @__PURE__ */ import_react26.default.createElement("div", { style: containerStyle }, /* @__PURE__ */ import_react26.default.createElement("button", { style: backBtnStyle, onClick: onBack }, "\u2190 Back to Profile"), /* @__PURE__ */ import_react26.default.createElement("h1", { style: nameStyle }, displayName), /* @__PURE__ */ import_react26.default.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__ */ import_react26.default.createElement(import_react26.default.Fragment, null, /* @__PURE__ */ import_react26.default.createElement("h2", { style: sectionHeadingStyle }, "Background"), detail.appointed_by && /* @__PURE__ */ import_react26.default.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ import_react26.default.createElement("span", { style: detailLabelStyle }, "Appointed by"), /* @__PURE__ */ import_react26.default.createElement("span", { style: detailValueStyle }, detail.appointed_by, " (", detail.appointing_president_party, ")")), detail.confirmation_vote && /* @__PURE__ */ import_react26.default.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ import_react26.default.createElement("span", { style: detailLabelStyle }, "Confirmation Vote"), /* @__PURE__ */ import_react26.default.createElement("span", { style: detailValueStyle }, detail.confirmation_vote)), detail.election_type && /* @__PURE__ */ import_react26.default.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ import_react26.default.createElement("span", { style: detailLabelStyle }, "Election Type"), /* @__PURE__ */ import_react26.default.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__ */ import_react26.default.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ import_react26.default.createElement("span", { style: detailLabelStyle }, "Areas of Focus"), /* @__PURE__ */ import_react26.default.createElement("span", { style: detailValueStyle }, detail.areas_of_focus.join(", ")))), /* @__PURE__ */ import_react26.default.createElement("h2", { style: sectionHeadingStyle }, "Performance Evaluations"), evaluations.length === 0 ? /* @__PURE__ */ import_react26.default.createElement("div", { style: emptyStateStyle }, "No evaluation data available yet.") : /* @__PURE__ */ import_react26.default.createElement("table", { style: tableStyle }, /* @__PURE__ */ import_react26.default.createElement("thead", null, /* @__PURE__ */ import_react26.default.createElement("tr", null, /* @__PURE__ */ import_react26.default.createElement("th", { style: thStyle }, "Source"), /* @__PURE__ */ import_react26.default.createElement("th", { style: thStyle }, "Rating"), /* @__PURE__ */ import_react26.default.createElement("th", { style: thStyle }, "Date"))), /* @__PURE__ */ import_react26.default.createElement("tbody", null, evaluations.map((ev, i) => /* @__PURE__ */ import_react26.default.createElement("tr", { key: i }, /* @__PURE__ */ import_react26.default.createElement("td", { style: tdStyle }, ev.source_url ? /* @__PURE__ */ import_react26.default.createElement("a", { href: ev.source_url, target: "_blank", rel: "noopener noreferrer", style: { color: "#319795" } }, ev.source) : ev.source), /* @__PURE__ */ import_react26.default.createElement("td", { style: { ...tdStyle, fontWeight: 600 } }, ev.rating), /* @__PURE__ */ import_react26.default.createElement("td", { style: tdStyle }, formatDate(ev.rating_date)))))), /* @__PURE__ */ import_react26.default.createElement("h2", { style: sectionHeadingStyle }, "Performance Metrics"), metrics.length === 0 ? /* @__PURE__ */ import_react26.default.createElement("div", { style: emptyStateStyle }, "No performance metric data available yet.") : /* @__PURE__ */ import_react26.default.createElement("table", { style: tableStyle }, /* @__PURE__ */ import_react26.default.createElement("thead", null, /* @__PURE__ */ import_react26.default.createElement("tr", null, /* @__PURE__ */ import_react26.default.createElement("th", { style: thStyle }, "Metric"), /* @__PURE__ */ import_react26.default.createElement("th", { style: thStyle }, "Value"), /* @__PURE__ */ import_react26.default.createElement("th", { style: thStyle }, "Context"), /* @__PURE__ */ import_react26.default.createElement("th", { style: thStyle }, "Period"))), /* @__PURE__ */ import_react26.default.createElement("tbody", null, metrics.map((m, i) => /* @__PURE__ */ import_react26.default.createElement("tr", { key: i }, /* @__PURE__ */ import_react26.default.createElement("td", { style: { ...tdStyle, fontWeight: 600 } }, METRIC_LABELS[m.metric_type] || m.metric_type.replace(/_/g, " ")), /* @__PURE__ */ import_react26.default.createElement("td", { style: tdStyle }, formatMetricValue(m.metric_type, m.value)), /* @__PURE__ */ import_react26.default.createElement("td", { style: { ...tdStyle, color: "#718096", fontSize: "13px" } }, m.context_label), /* @__PURE__ */ import_react26.default.createElement("td", { style: tdStyle }, m.time_period))))), disciplinary.length > 0 && /* @__PURE__ */ import_react26.default.createElement(import_react26.default.Fragment, null, /* @__PURE__ */ import_react26.default.createElement("h2", { style: sectionHeadingStyle }, "Disciplinary History"), disciplinary.map((d, i) => /* @__PURE__ */ import_react26.default.createElement("div", { key: i, style: {
4416
5088
  borderLeft: "3px solid #fc8181",
4417
5089
  backgroundColor: "#fff5f5",
4418
5090
  borderRadius: "0 6px 6px 0",
4419
5091
  padding: "12px 16px",
4420
5092
  marginBottom: "10px"
4421
- } }, /* @__PURE__ */ import_react24.default.createElement("div", { style: { fontWeight: 700, color: "#742a2a", fontSize: "14px" } }, d.record_type, " \u2014 ", formatDate(d.record_date)), d.description && /* @__PURE__ */ import_react24.default.createElement("div", { style: { color: "#9b2c2c", fontSize: "13px", marginTop: "4px" } }, d.description), d.source_url && /* @__PURE__ */ import_react24.default.createElement(
5093
+ } }, /* @__PURE__ */ import_react26.default.createElement("div", { style: { fontWeight: 700, color: "#742a2a", fontSize: "14px" } }, d.record_type, " \u2014 ", formatDate(d.record_date)), d.description && /* @__PURE__ */ import_react26.default.createElement("div", { style: { color: "#9b2c2c", fontSize: "13px", marginTop: "4px" } }, d.description), d.source_url && /* @__PURE__ */ import_react26.default.createElement(
4422
5094
  "a",
4423
5095
  {
4424
5096
  href: d.source_url,
@@ -4431,7 +5103,7 @@ function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
4431
5103
  }
4432
5104
 
4433
5105
  // src/AuthForm.jsx
4434
- var import_react25 = __toESM(require("react"));
5106
+ var import_react27 = __toESM(require("react"));
4435
5107
  function AuthForm({
4436
5108
  logoSrc = "/EVLogo.svg",
4437
5109
  appName = "Empowered Vote",
@@ -4442,11 +5114,11 @@ function AuthForm({
4442
5114
  error = null,
4443
5115
  submitting = false
4444
5116
  }) {
4445
- const [username, setUsername] = (0, import_react25.useState)("");
4446
- const [password, setPassword] = (0, import_react25.useState)("");
4447
- const [confirmPassword, setConfirmPassword] = (0, import_react25.useState)("");
4448
- const [showPasswords, setShowPasswords] = (0, import_react25.useState)(false);
4449
- const [passwordMismatch, setPasswordMismatch] = (0, import_react25.useState)(false);
5117
+ const [username, setUsername] = (0, import_react27.useState)("");
5118
+ const [password, setPassword] = (0, import_react27.useState)("");
5119
+ const [confirmPassword, setConfirmPassword] = (0, import_react27.useState)("");
5120
+ const [showPasswords, setShowPasswords] = (0, import_react27.useState)(false);
5121
+ const [passwordMismatch, setPasswordMismatch] = (0, import_react27.useState)(false);
4450
5122
  const isLogin = mode === "login";
4451
5123
  const handleSubmit = (e) => {
4452
5124
  e.preventDefault();
@@ -4458,7 +5130,7 @@ function AuthForm({
4458
5130
  setPasswordMismatch(false);
4459
5131
  onSubmit == null ? void 0 : onSubmit(username.trim(), password);
4460
5132
  };
4461
- const EyeOpen = () => /* @__PURE__ */ import_react25.default.createElement(
5133
+ const EyeOpen = () => /* @__PURE__ */ import_react27.default.createElement(
4462
5134
  "svg",
4463
5135
  {
4464
5136
  xmlns: "http://www.w3.org/2000/svg",
@@ -4468,7 +5140,7 @@ function AuthForm({
4468
5140
  stroke: "currentColor",
4469
5141
  style: { width: "20px", height: "20px" }
4470
5142
  },
4471
- /* @__PURE__ */ import_react25.default.createElement(
5143
+ /* @__PURE__ */ import_react27.default.createElement(
4472
5144
  "path",
4473
5145
  {
4474
5146
  strokeLinecap: "round",
@@ -4476,7 +5148,7 @@ function AuthForm({
4476
5148
  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"
4477
5149
  }
4478
5150
  ),
4479
- /* @__PURE__ */ import_react25.default.createElement(
5151
+ /* @__PURE__ */ import_react27.default.createElement(
4480
5152
  "path",
4481
5153
  {
4482
5154
  strokeLinecap: "round",
@@ -4485,7 +5157,7 @@ function AuthForm({
4485
5157
  }
4486
5158
  )
4487
5159
  );
4488
- const EyeClosed = () => /* @__PURE__ */ import_react25.default.createElement(
5160
+ const EyeClosed = () => /* @__PURE__ */ import_react27.default.createElement(
4489
5161
  "svg",
4490
5162
  {
4491
5163
  xmlns: "http://www.w3.org/2000/svg",
@@ -4495,7 +5167,7 @@ function AuthForm({
4495
5167
  stroke: "currentColor",
4496
5168
  style: { width: "20px", height: "20px" }
4497
5169
  },
4498
- /* @__PURE__ */ import_react25.default.createElement(
5170
+ /* @__PURE__ */ import_react27.default.createElement(
4499
5171
  "path",
4500
5172
  {
4501
5173
  strokeLinecap: "round",
@@ -4504,17 +5176,17 @@ function AuthForm({
4504
5176
  }
4505
5177
  )
4506
5178
  );
4507
- const PasswordToggle = () => /* @__PURE__ */ import_react25.default.createElement(
5179
+ const PasswordToggle = () => /* @__PURE__ */ import_react27.default.createElement(
4508
5180
  "button",
4509
5181
  {
4510
5182
  type: "button",
4511
5183
  onClick: () => setShowPasswords((prev) => !prev),
4512
5184
  style: styles.passwordToggle
4513
5185
  },
4514
- showPasswords ? /* @__PURE__ */ import_react25.default.createElement(EyeOpen, null) : /* @__PURE__ */ import_react25.default.createElement(EyeClosed, null)
5186
+ showPasswords ? /* @__PURE__ */ import_react27.default.createElement(EyeOpen, null) : /* @__PURE__ */ import_react27.default.createElement(EyeClosed, null)
4515
5187
  );
4516
5188
  const displayError = passwordMismatch ? "Passwords do not match." : error;
4517
- return /* @__PURE__ */ import_react25.default.createElement("div", { style: styles.wrapper }, /* @__PURE__ */ import_react25.default.createElement("div", { style: styles.container }, /* @__PURE__ */ import_react25.default.createElement("div", { style: styles.header }, logoSrc && /* @__PURE__ */ import_react25.default.createElement("img", { src: logoSrc, alt: appName, style: styles.logo }), appName && /* @__PURE__ */ import_react25.default.createElement("h1", { style: styles.appName }, appName), appSubtitle && /* @__PURE__ */ import_react25.default.createElement("p", { style: styles.appSubtitle }, appSubtitle)), /* @__PURE__ */ import_react25.default.createElement("form", { onSubmit: handleSubmit, style: styles.card }, /* @__PURE__ */ import_react25.default.createElement("h2", { style: styles.cardTitle }, isLogin ? "Welcome Back" : "Create Account"), /* @__PURE__ */ import_react25.default.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ import_react25.default.createElement("label", { style: styles.label }, "Username"), /* @__PURE__ */ import_react25.default.createElement(
5189
+ return /* @__PURE__ */ import_react27.default.createElement("div", { style: styles.wrapper }, /* @__PURE__ */ import_react27.default.createElement("div", { style: styles.container }, /* @__PURE__ */ import_react27.default.createElement("div", { style: styles.header }, logoSrc && /* @__PURE__ */ import_react27.default.createElement("img", { src: logoSrc, alt: appName, style: styles.logo }), appName && /* @__PURE__ */ import_react27.default.createElement("h1", { style: styles.appName }, appName), appSubtitle && /* @__PURE__ */ import_react27.default.createElement("p", { style: styles.appSubtitle }, appSubtitle)), /* @__PURE__ */ import_react27.default.createElement("form", { onSubmit: handleSubmit, style: styles.card }, /* @__PURE__ */ import_react27.default.createElement("h2", { style: styles.cardTitle }, isLogin ? "Welcome Back" : "Create Account"), /* @__PURE__ */ import_react27.default.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ import_react27.default.createElement("label", { style: styles.label }, "Username"), /* @__PURE__ */ import_react27.default.createElement(
4518
5190
  "input",
4519
5191
  {
4520
5192
  type: "text",
@@ -4531,7 +5203,7 @@ function AuthForm({
4531
5203
  },
4532
5204
  required: true
4533
5205
  }
4534
- )), /* @__PURE__ */ import_react25.default.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ import_react25.default.createElement("label", { style: styles.label }, "Password"), /* @__PURE__ */ import_react25.default.createElement("div", { style: styles.passwordWrapper }, /* @__PURE__ */ import_react25.default.createElement(
5206
+ )), /* @__PURE__ */ import_react27.default.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ import_react27.default.createElement("label", { style: styles.label }, "Password"), /* @__PURE__ */ import_react27.default.createElement("div", { style: styles.passwordWrapper }, /* @__PURE__ */ import_react27.default.createElement(
4535
5207
  "input",
4536
5208
  {
4537
5209
  type: showPasswords ? "text" : "password",
@@ -4547,7 +5219,7 @@ function AuthForm({
4547
5219
  },
4548
5220
  required: true
4549
5221
  }
4550
- ), /* @__PURE__ */ import_react25.default.createElement(PasswordToggle, null))), !isLogin && /* @__PURE__ */ import_react25.default.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ import_react25.default.createElement("label", { style: styles.label }, "Confirm Password"), /* @__PURE__ */ import_react25.default.createElement("div", { style: styles.passwordWrapper }, /* @__PURE__ */ import_react25.default.createElement(
5222
+ ), /* @__PURE__ */ import_react27.default.createElement(PasswordToggle, null))), !isLogin && /* @__PURE__ */ import_react27.default.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ import_react27.default.createElement("label", { style: styles.label }, "Confirm Password"), /* @__PURE__ */ import_react27.default.createElement("div", { style: styles.passwordWrapper }, /* @__PURE__ */ import_react27.default.createElement(
4551
5223
  "input",
4552
5224
  {
4553
5225
  type: showPasswords ? "text" : "password",
@@ -4563,7 +5235,7 @@ function AuthForm({
4563
5235
  },
4564
5236
  required: true
4565
5237
  }
4566
- ), /* @__PURE__ */ import_react25.default.createElement(PasswordToggle, null))), displayError && /* @__PURE__ */ import_react25.default.createElement("div", { style: styles.errorBox }, /* @__PURE__ */ import_react25.default.createElement("p", { style: styles.errorText }, displayError)), /* @__PURE__ */ import_react25.default.createElement(
5238
+ ), /* @__PURE__ */ import_react27.default.createElement(PasswordToggle, null))), displayError && /* @__PURE__ */ import_react27.default.createElement("div", { style: styles.errorBox }, /* @__PURE__ */ import_react27.default.createElement("p", { style: styles.errorText }, displayError)), /* @__PURE__ */ import_react27.default.createElement(
4567
5239
  "button",
4568
5240
  {
4569
5241
  type: "submit",
@@ -4581,7 +5253,7 @@ function AuthForm({
4581
5253
  }
4582
5254
  },
4583
5255
  submitting ? isLogin ? "Signing In..." : "Creating Account..." : isLogin ? "Sign In" : "Create Account"
4584
- ), onModeSwitch && /* @__PURE__ */ import_react25.default.createElement("div", { style: styles.modeSwitch }, /* @__PURE__ */ import_react25.default.createElement("p", { style: styles.modeSwitchText }, isLogin ? "Don't have an account?" : "Already have an account?"), /* @__PURE__ */ import_react25.default.createElement(
5256
+ ), onModeSwitch && /* @__PURE__ */ import_react27.default.createElement("div", { style: styles.modeSwitch }, /* @__PURE__ */ import_react27.default.createElement("p", { style: styles.modeSwitchText }, isLogin ? "Don't have an account?" : "Already have an account?"), /* @__PURE__ */ import_react27.default.createElement(
4585
5257
  "button",
4586
5258
  {
4587
5259
  type: "button",
@@ -4754,9 +5426,9 @@ var styles = {
4754
5426
  };
4755
5427
 
4756
5428
  // src/TopicTierBadge.jsx
4757
- var import_react26 = __toESM(require("react"));
5429
+ var import_react28 = __toESM(require("react"));
4758
5430
  function LandmarkIcon({ size = 14 }) {
4759
- return /* @__PURE__ */ import_react26.default.createElement(
5431
+ return /* @__PURE__ */ import_react28.default.createElement(
4760
5432
  "svg",
4761
5433
  {
4762
5434
  width: size,
@@ -4770,16 +5442,16 @@ function LandmarkIcon({ size = 14 }) {
4770
5442
  xmlns: "http://www.w3.org/2000/svg",
4771
5443
  "aria-hidden": "true"
4772
5444
  },
4773
- /* @__PURE__ */ import_react26.default.createElement("path", { d: "M10 18v-7" }),
4774
- /* @__PURE__ */ import_react26.default.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" }),
4775
- /* @__PURE__ */ import_react26.default.createElement("path", { d: "M14 18v-7" }),
4776
- /* @__PURE__ */ import_react26.default.createElement("path", { d: "M18 18v-7" }),
4777
- /* @__PURE__ */ import_react26.default.createElement("path", { d: "M3 22h18" }),
4778
- /* @__PURE__ */ import_react26.default.createElement("path", { d: "M6 18v-7" })
5445
+ /* @__PURE__ */ import_react28.default.createElement("path", { d: "M10 18v-7" }),
5446
+ /* @__PURE__ */ import_react28.default.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" }),
5447
+ /* @__PURE__ */ import_react28.default.createElement("path", { d: "M14 18v-7" }),
5448
+ /* @__PURE__ */ import_react28.default.createElement("path", { d: "M18 18v-7" }),
5449
+ /* @__PURE__ */ import_react28.default.createElement("path", { d: "M3 22h18" }),
5450
+ /* @__PURE__ */ import_react28.default.createElement("path", { d: "M6 18v-7" })
4779
5451
  );
4780
5452
  }
4781
5453
  function Building2Icon({ size = 14 }) {
4782
- return /* @__PURE__ */ import_react26.default.createElement(
5454
+ return /* @__PURE__ */ import_react28.default.createElement(
4783
5455
  "svg",
4784
5456
  {
4785
5457
  width: size,
@@ -4793,17 +5465,17 @@ function Building2Icon({ size = 14 }) {
4793
5465
  xmlns: "http://www.w3.org/2000/svg",
4794
5466
  "aria-hidden": "true"
4795
5467
  },
4796
- /* @__PURE__ */ import_react26.default.createElement("path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }),
4797
- /* @__PURE__ */ import_react26.default.createElement("path", { d: "M6 12H4a2 2 0 0 0-2 2v8h4" }),
4798
- /* @__PURE__ */ import_react26.default.createElement("path", { d: "M18 9h2a2 2 0 0 1 2 2v11h-4" }),
4799
- /* @__PURE__ */ import_react26.default.createElement("path", { d: "M10 6h4" }),
4800
- /* @__PURE__ */ import_react26.default.createElement("path", { d: "M10 10h4" }),
4801
- /* @__PURE__ */ import_react26.default.createElement("path", { d: "M10 14h4" }),
4802
- /* @__PURE__ */ import_react26.default.createElement("path", { d: "M10 18h4" })
5468
+ /* @__PURE__ */ import_react28.default.createElement("path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }),
5469
+ /* @__PURE__ */ import_react28.default.createElement("path", { d: "M6 12H4a2 2 0 0 0-2 2v8h4" }),
5470
+ /* @__PURE__ */ import_react28.default.createElement("path", { d: "M18 9h2a2 2 0 0 1 2 2v11h-4" }),
5471
+ /* @__PURE__ */ import_react28.default.createElement("path", { d: "M10 6h4" }),
5472
+ /* @__PURE__ */ import_react28.default.createElement("path", { d: "M10 10h4" }),
5473
+ /* @__PURE__ */ import_react28.default.createElement("path", { d: "M10 14h4" }),
5474
+ /* @__PURE__ */ import_react28.default.createElement("path", { d: "M10 18h4" })
4803
5475
  );
4804
5476
  }
4805
5477
  function HomeIcon({ size = 14 }) {
4806
- return /* @__PURE__ */ import_react26.default.createElement(
5478
+ return /* @__PURE__ */ import_react28.default.createElement(
4807
5479
  "svg",
4808
5480
  {
4809
5481
  width: size,
@@ -4817,8 +5489,8 @@ function HomeIcon({ size = 14 }) {
4817
5489
  xmlns: "http://www.w3.org/2000/svg",
4818
5490
  "aria-hidden": "true"
4819
5491
  },
4820
- /* @__PURE__ */ import_react26.default.createElement("path", { d: "m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }),
4821
- /* @__PURE__ */ import_react26.default.createElement("polyline", { points: "9 22 9 12 15 12 15 22" })
5492
+ /* @__PURE__ */ import_react28.default.createElement("path", { d: "m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }),
5493
+ /* @__PURE__ */ import_react28.default.createElement("polyline", { points: "9 22 9 12 15 12 15 22" })
4822
5494
  );
4823
5495
  }
4824
5496
  var TIER_INFO = {
@@ -4878,7 +5550,7 @@ function TopicTierBadge({
4878
5550
  userSelect: "none"
4879
5551
  };
4880
5552
  };
4881
- return /* @__PURE__ */ import_react26.default.createElement(
5553
+ return /* @__PURE__ */ import_react28.default.createElement(
4882
5554
  "span",
4883
5555
  {
4884
5556
  className: "ev-topic-tier-badge",
@@ -4888,13 +5560,13 @@ function TopicTierBadge({
4888
5560
  },
4889
5561
  effectiveTiers.map((tier) => {
4890
5562
  const { label, Icon } = TIER_INFO[tier];
4891
- return /* @__PURE__ */ import_react26.default.createElement("span", { key: tier, style: itemStyle(tier) }, /* @__PURE__ */ import_react26.default.createElement(Icon, { size: sizeStyle.iconSize }), !iconOnly && /* @__PURE__ */ import_react26.default.createElement("span", null, label));
5563
+ return /* @__PURE__ */ import_react28.default.createElement("span", { key: tier, style: itemStyle(tier) }, /* @__PURE__ */ import_react28.default.createElement(Icon, { size: sizeStyle.iconSize }), !iconOnly && /* @__PURE__ */ import_react28.default.createElement("span", null, label));
4892
5564
  })
4893
5565
  );
4894
5566
  }
4895
5567
 
4896
5568
  // src/CompassCoverageCallout.jsx
4897
- var import_react27 = __toESM(require("react"));
5569
+ var import_react29 = __toESM(require("react"));
4898
5570
  var TIER_LABELS = {
4899
5571
  federal: "federal",
4900
5572
  state: "state",
@@ -4907,7 +5579,7 @@ function CompassCoverageCallout({
4907
5579
  compassUrl,
4908
5580
  onDismiss
4909
5581
  }) {
4910
- const [dismissed, setDismissed] = (0, import_react27.useState)(false);
5582
+ const [dismissed, setDismissed] = (0, import_react29.useState)(false);
4911
5583
  if (dismissed) return null;
4912
5584
  const tierLabel = TIER_LABELS[tier] || tier;
4913
5585
  const tierStyle = tierColors[tier] || tierColors.federal;
@@ -4958,15 +5630,15 @@ function CompassCoverageCallout({
4958
5630
  setDismissed(true);
4959
5631
  if (onDismiss) onDismiss();
4960
5632
  };
4961
- return /* @__PURE__ */ import_react27.default.createElement(
5633
+ return /* @__PURE__ */ import_react29.default.createElement(
4962
5634
  "div",
4963
5635
  {
4964
5636
  className: "ev-compass-coverage-callout",
4965
5637
  role: "status",
4966
5638
  style: containerStyle2
4967
5639
  },
4968
- /* @__PURE__ */ import_react27.default.createElement("div", { style: textStyle }, /* @__PURE__ */ import_react27.default.createElement("div", { style: headlineStyle }, "Your compass covers ", tierLabel, " issues lightly"), /* @__PURE__ */ import_react27.default.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__ */ import_react27.default.createElement("a", { href: compassUrl, style: ctaStyle }, "Add ", tierLabel, " topics \u2192")),
4969
- onDismiss !== void 0 && /* @__PURE__ */ import_react27.default.createElement(
5640
+ /* @__PURE__ */ import_react29.default.createElement("div", { style: textStyle }, /* @__PURE__ */ import_react29.default.createElement("div", { style: headlineStyle }, "Your compass covers ", tierLabel, " issues lightly"), /* @__PURE__ */ import_react29.default.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__ */ import_react29.default.createElement("a", { href: compassUrl, style: ctaStyle }, "Add ", tierLabel, " topics \u2192")),
5641
+ onDismiss !== void 0 && /* @__PURE__ */ import_react29.default.createElement(
4970
5642
  "button",
4971
5643
  {
4972
5644
  onClick: handleDismiss,
@@ -4979,7 +5651,7 @@ function CompassCoverageCallout({
4979
5651
  }
4980
5652
 
4981
5653
  // src/ExpandCompassNudge.jsx
4982
- var import_react28 = __toESM(require("react"));
5654
+ var import_react30 = __toESM(require("react"));
4983
5655
  function ExpandCompassNudge({
4984
5656
  politicianName,
4985
5657
  missingCount,
@@ -5026,7 +5698,7 @@ function ExpandCompassNudge({
5026
5698
  };
5027
5699
  const topicsLabel = missingCount === 1 ? "topic" : "topics";
5028
5700
  const speakerName = politicianName || "This politician";
5029
- return /* @__PURE__ */ import_react28.default.createElement("div", { className: "ev-expand-compass-nudge", style: containerStyle2, role: "region" }, /* @__PURE__ */ import_react28.default.createElement("p", { style: headlineStyle }, "Want a richer comparison?"), /* @__PURE__ */ import_react28.default.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__ */ import_react28.default.createElement("a", { href: compassUrl, style: ctaStyle }, "Expand my compass \u2192"));
5701
+ return /* @__PURE__ */ import_react30.default.createElement("div", { className: "ev-expand-compass-nudge", style: containerStyle2, role: "region" }, /* @__PURE__ */ import_react30.default.createElement("p", { style: headlineStyle }, "Want a richer comparison?"), /* @__PURE__ */ import_react30.default.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__ */ import_react30.default.createElement("a", { href: compassUrl, style: ctaStyle }, "Expand my compass \u2192"));
5030
5702
  }
5031
5703
 
5032
5704
  // src/computeTierCoverage.js
@@ -5047,14 +5719,14 @@ function computeTierCoverage(topics) {
5047
5719
  }
5048
5720
 
5049
5721
  // src/StanceAccordion.jsx
5050
- var import_react30 = __toESM(require("react"));
5722
+ var import_react32 = __toESM(require("react"));
5051
5723
 
5052
5724
  // src/Favicon.jsx
5053
- var import_react29 = __toESM(require("react"));
5725
+ var import_react31 = __toESM(require("react"));
5054
5726
  function Favicon({ url, size = 16 }) {
5055
5727
  try {
5056
5728
  const domain = new URL(url).hostname;
5057
- return /* @__PURE__ */ import_react29.default.createElement(
5729
+ return /* @__PURE__ */ import_react31.default.createElement(
5058
5730
  "img",
5059
5731
  {
5060
5732
  src: `https://www.google.com/s2/favicons?sz=${size}&domain=${domain}`,
@@ -5065,7 +5737,7 @@ function Favicon({ url, size = 16 }) {
5065
5737
  }
5066
5738
  );
5067
5739
  } catch {
5068
- return /* @__PURE__ */ import_react29.default.createElement(
5740
+ return /* @__PURE__ */ import_react31.default.createElement(
5069
5741
  "svg",
5070
5742
  {
5071
5743
  width: size,
@@ -5076,8 +5748,8 @@ function Favicon({ url, size = 16 }) {
5076
5748
  strokeWidth: "1.5",
5077
5749
  style: { verticalAlign: "middle", flexShrink: 0 }
5078
5750
  },
5079
- /* @__PURE__ */ import_react29.default.createElement("circle", { cx: "12", cy: "12", r: "10" }),
5080
- /* @__PURE__ */ import_react29.default.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" })
5751
+ /* @__PURE__ */ import_react31.default.createElement("circle", { cx: "12", cy: "12", r: "10" }),
5752
+ /* @__PURE__ */ import_react31.default.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" })
5081
5753
  );
5082
5754
  }
5083
5755
  }
@@ -5108,11 +5780,11 @@ function StanceAccordion({
5108
5780
  apiUrl = "https://api.empowered.vote"
5109
5781
  }) {
5110
5782
  var _a;
5111
- const [expandedTopicId, setExpandedTopicId] = (0, import_react30.useState)(null);
5112
- const [loadingId, setLoadingId] = (0, import_react30.useState)(null);
5113
- const [showAll, setShowAll] = (0, import_react30.useState)(false);
5114
- const contextCache = (0, import_react30.useRef)(/* @__PURE__ */ new Map());
5115
- const quotesCache = (0, import_react30.useRef)(null);
5783
+ const [expandedTopicId, setExpandedTopicId] = (0, import_react32.useState)(null);
5784
+ const [loadingId, setLoadingId] = (0, import_react32.useState)(null);
5785
+ const [showAll, setShowAll] = (0, import_react32.useState)(false);
5786
+ const contextCache = (0, import_react32.useRef)(/* @__PURE__ */ new Map());
5787
+ const quotesCache = (0, import_react32.useRef)(null);
5116
5788
  const polAnswerMap = {};
5117
5789
  if (polAnswers) {
5118
5790
  polAnswers.forEach((a) => {
@@ -5171,7 +5843,7 @@ function StanceAccordion({
5171
5843
  quotesCache.current = [];
5172
5844
  }
5173
5845
  }
5174
- const handleToggle = (0, import_react30.useCallback)(
5846
+ const handleToggle = (0, import_react32.useCallback)(
5175
5847
  async (topicId) => {
5176
5848
  if (expandedTopicId === topicId) {
5177
5849
  setExpandedTopicId(null);
@@ -5188,7 +5860,7 @@ function StanceAccordion({
5188
5860
  },
5189
5861
  [expandedTopicId, politicianId, apiUrl]
5190
5862
  );
5191
- (0, import_react30.useEffect)(() => {
5863
+ (0, import_react32.useEffect)(() => {
5192
5864
  if (initialExpandedTopicId && topics && topics.length > 0) {
5193
5865
  handleToggle(String(initialExpandedTopicId));
5194
5866
  }
@@ -5204,13 +5876,13 @@ function StanceAccordion({
5204
5876
  visibleTopics = [pinned, ...baseTopics.filter((t) => String(t.id) !== String(initialExpandedTopicId))];
5205
5877
  }
5206
5878
  }
5207
- return /* @__PURE__ */ import_react30.default.createElement(
5879
+ return /* @__PURE__ */ import_react32.default.createElement(
5208
5880
  "div",
5209
5881
  {
5210
5882
  className: "flex flex-col",
5211
5883
  style: { fontFamily: "'Manrope', sans-serif" }
5212
5884
  },
5213
- /* @__PURE__ */ import_react30.default.createElement(
5885
+ /* @__PURE__ */ import_react32.default.createElement(
5214
5886
  "h3",
5215
5887
  {
5216
5888
  className: "text-sm font-semibold text-neutral-400 uppercase tracking-wider mb-2",
@@ -5232,15 +5904,15 @@ function StanceAccordion({
5232
5904
  if (topic.topic_key) return q.issue === topic.topic_key;
5233
5905
  return topic.short_title && q.issue.toLowerCase() === topic.short_title.toLowerCase();
5234
5906
  }) : [];
5235
- return /* @__PURE__ */ import_react30.default.createElement("div", { key: topicId, className: "border-b border-neutral-100" }, /* @__PURE__ */ import_react30.default.createElement(
5907
+ return /* @__PURE__ */ import_react32.default.createElement("div", { key: topicId, className: "border-b border-neutral-100" }, /* @__PURE__ */ import_react32.default.createElement(
5236
5908
  "button",
5237
5909
  {
5238
5910
  type: "button",
5239
5911
  onClick: () => handleToggle(topicId),
5240
5912
  className: "w-full flex items-center justify-between py-3 px-2 text-left cursor-pointer hover:bg-neutral-50 transition-colors"
5241
5913
  },
5242
- /* @__PURE__ */ import_react30.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react30.default.createElement("span", { className: "text-sm font-medium text-neutral-800 truncate" }, topic.short_title), questionText && /* @__PURE__ */ import_react30.default.createElement("span", { className: "text-xs text-neutral-400 mt-0.5" }, questionText), /* @__PURE__ */ import_react30.default.createElement("span", { className: "text-xs text-neutral-500 mt-0.5" }, label)),
5243
- /* @__PURE__ */ import_react30.default.createElement(
5914
+ /* @__PURE__ */ import_react32.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react32.default.createElement("span", { className: "text-sm font-medium text-neutral-800 truncate" }, topic.short_title), questionText && /* @__PURE__ */ import_react32.default.createElement("span", { className: "text-xs text-neutral-400 mt-0.5" }, questionText), /* @__PURE__ */ import_react32.default.createElement("span", { className: "text-xs text-neutral-500 mt-0.5" }, label)),
5915
+ /* @__PURE__ */ import_react32.default.createElement(
5244
5916
  "svg",
5245
5917
  {
5246
5918
  width: "16",
@@ -5257,9 +5929,9 @@ function StanceAccordion({
5257
5929
  transition: "transform 0.2s ease"
5258
5930
  }
5259
5931
  },
5260
- /* @__PURE__ */ import_react30.default.createElement("polyline", { points: "9 18 15 12 9 6" })
5932
+ /* @__PURE__ */ import_react32.default.createElement("polyline", { points: "9 18 15 12 9 6" })
5261
5933
  )
5262
- ), /* @__PURE__ */ import_react30.default.createElement(
5934
+ ), /* @__PURE__ */ import_react32.default.createElement(
5263
5935
  "div",
5264
5936
  {
5265
5937
  style: {
@@ -5268,7 +5940,7 @@ function StanceAccordion({
5268
5940
  transition: "grid-template-rows 0.25s ease"
5269
5941
  }
5270
5942
  },
5271
- /* @__PURE__ */ import_react30.default.createElement("div", { style: { overflow: "hidden" } }, /* @__PURE__ */ import_react30.default.createElement("div", { className: "px-2 pb-4" }, isLoading && /* @__PURE__ */ import_react30.default.createElement("div", { className: "flex items-center py-3" }, /* @__PURE__ */ import_react30.default.createElement(
5943
+ /* @__PURE__ */ import_react32.default.createElement("div", { style: { overflow: "hidden" } }, /* @__PURE__ */ import_react32.default.createElement("div", { className: "px-2 pb-4" }, isLoading && /* @__PURE__ */ import_react32.default.createElement("div", { className: "flex items-center py-3" }, /* @__PURE__ */ import_react32.default.createElement(
5272
5944
  "div",
5273
5945
  {
5274
5946
  style: {
@@ -5280,14 +5952,14 @@ function StanceAccordion({
5280
5952
  animation: "ev-spin 0.8s linear infinite"
5281
5953
  }
5282
5954
  }
5283
- )), !isLoading && cached && /* @__PURE__ */ import_react30.default.createElement(import_react30.default.Fragment, null, cached.reasoning ? /* @__PURE__ */ import_react30.default.createElement(
5955
+ )), !isLoading && cached && /* @__PURE__ */ import_react32.default.createElement(import_react32.default.Fragment, null, cached.reasoning ? /* @__PURE__ */ import_react32.default.createElement(
5284
5956
  "p",
5285
5957
  {
5286
5958
  className: "text-sm text-neutral-700 mb-3",
5287
5959
  style: { whiteSpace: "pre-wrap", lineHeight: 1.6 }
5288
5960
  },
5289
5961
  cached.reasoning
5290
- ) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */ import_react30.default.createElement("div", { className: "mt-2" }, /* @__PURE__ */ import_react30.default.createElement("p", { className: "text-xs font-semibold text-neutral-500 uppercase tracking-wider mb-1.5" }, "References"), /* @__PURE__ */ import_react30.default.createElement("ol", { className: "list-decimal list-inside space-y-1" }, cached.sources.map((src, i) => /* @__PURE__ */ import_react30.default.createElement("li", { key: i, className: "text-xs text-neutral-600" }, /* @__PURE__ */ import_react30.default.createElement(
5962
+ ) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */ import_react32.default.createElement("div", { className: "mt-2" }, /* @__PURE__ */ import_react32.default.createElement("p", { className: "text-xs font-semibold text-neutral-500 uppercase tracking-wider mb-1.5" }, "References"), /* @__PURE__ */ import_react32.default.createElement("ol", { className: "list-decimal list-inside space-y-1" }, cached.sources.map((src, i) => /* @__PURE__ */ import_react32.default.createElement("li", { key: i, className: "text-xs text-neutral-600" }, /* @__PURE__ */ import_react32.default.createElement(
5291
5963
  "a",
5292
5964
  {
5293
5965
  href: src,
@@ -5295,9 +5967,9 @@ function StanceAccordion({
5295
5967
  rel: "noreferrer",
5296
5968
  className: "inline-flex items-center gap-1.5 hover:text-[#00657c] transition-colors"
5297
5969
  },
5298
- /* @__PURE__ */ import_react30.default.createElement(Favicon, { url: src }),
5299
- /* @__PURE__ */ import_react30.default.createElement("span", { className: "underline underline-offset-2" }, getDisplayUrl(src))
5300
- ))))), topicQuotes.length > 0 && /* @__PURE__ */ import_react30.default.createElement("div", { style: { marginTop: "12px" } }, /* @__PURE__ */ import_react30.default.createElement(
5970
+ /* @__PURE__ */ import_react32.default.createElement(Favicon, { url: src }),
5971
+ /* @__PURE__ */ import_react32.default.createElement("span", { className: "underline underline-offset-2" }, getDisplayUrl(src))
5972
+ ))))), topicQuotes.length > 0 && /* @__PURE__ */ import_react32.default.createElement("div", { style: { marginTop: "12px" } }, /* @__PURE__ */ import_react32.default.createElement(
5301
5973
  "p",
5302
5974
  {
5303
5975
  style: {
@@ -5314,7 +5986,7 @@ function StanceAccordion({
5314
5986
  const verdict = verdictsByQuote ? verdictsByQuote[quote.id] : void 0;
5315
5987
  const borderColor = verdict === "agreed" ? "#0e7490" : verdict === "disagreed" ? "#b45309" : "#e2e8f0";
5316
5988
  const sourceName = quote.source_name || quote.sourceName;
5317
- return /* @__PURE__ */ import_react30.default.createElement(
5989
+ return /* @__PURE__ */ import_react32.default.createElement(
5318
5990
  "div",
5319
5991
  {
5320
5992
  key: quote.id,
@@ -5326,7 +5998,7 @@ function StanceAccordion({
5326
5998
  marginBottom: "8px"
5327
5999
  }
5328
6000
  },
5329
- /* @__PURE__ */ import_react30.default.createElement(
6001
+ /* @__PURE__ */ import_react32.default.createElement(
5330
6002
  "p",
5331
6003
  {
5332
6004
  style: {
@@ -5339,7 +6011,7 @@ function StanceAccordion({
5339
6011
  },
5340
6012
  quote.text
5341
6013
  ),
5342
- verdict === "agreed" && /* @__PURE__ */ import_react30.default.createElement(
6014
+ verdict === "agreed" && /* @__PURE__ */ import_react32.default.createElement(
5343
6015
  "span",
5344
6016
  {
5345
6017
  style: {
@@ -5356,10 +6028,10 @@ function StanceAccordion({
5356
6028
  flexShrink: 0
5357
6029
  }
5358
6030
  },
5359
- /* @__PURE__ */ import_react30.default.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react30.default.createElement("path", { d: "M5 13l4 4L19 7" })),
6031
+ /* @__PURE__ */ import_react32.default.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react32.default.createElement("path", { d: "M5 13l4 4L19 7" })),
5360
6032
  "Agreed"
5361
6033
  ),
5362
- verdict === "disagreed" && /* @__PURE__ */ import_react30.default.createElement(
6034
+ verdict === "disagreed" && /* @__PURE__ */ import_react32.default.createElement(
5363
6035
  "span",
5364
6036
  {
5365
6037
  style: {
@@ -5376,10 +6048,10 @@ function StanceAccordion({
5376
6048
  flexShrink: 0
5377
6049
  }
5378
6050
  },
5379
- /* @__PURE__ */ import_react30.default.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react30.default.createElement("path", { d: "M6 18L18 6M6 6l12 12" })),
6051
+ /* @__PURE__ */ import_react32.default.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react32.default.createElement("path", { d: "M6 18L18 6M6 6l12 12" })),
5380
6052
  "Disagreed"
5381
6053
  ),
5382
- sourceName && /* @__PURE__ */ import_react30.default.createElement(
6054
+ sourceName && /* @__PURE__ */ import_react32.default.createElement(
5383
6055
  "a",
5384
6056
  {
5385
6057
  href: quote.source_url || quote.sourceUrl,
@@ -5396,10 +6068,10 @@ function StanceAccordion({
5396
6068
  sourceName
5397
6069
  )
5398
6070
  );
5399
- })), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */ import_react30.default.createElement("p", { className: "text-sm text-neutral-400 italic py-2" }, "No detailed reasoning available for this topic."))))
6071
+ })), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */ import_react32.default.createElement("p", { className: "text-sm text-neutral-400 italic py-2" }, "No detailed reasoning available for this topic."))))
5400
6072
  ));
5401
6073
  }),
5402
- hasToggle && /* @__PURE__ */ import_react30.default.createElement(
6074
+ hasToggle && /* @__PURE__ */ import_react32.default.createElement(
5403
6075
  "button",
5404
6076
  {
5405
6077
  type: "button",
@@ -5419,8 +6091,10 @@ function StanceAccordion({
5419
6091
  CategorySection,
5420
6092
  CommitteeTable,
5421
6093
  CompassCardHorizontal,
6094
+ CompassCardVertical,
5422
6095
  CompassCoverageCallout,
5423
6096
  CompassIcon,
6097
+ CompassKey,
5424
6098
  ExpandCompassNudge,
5425
6099
  FilterSidebar,
5426
6100
  GovernmentBodySection,
@@ -5450,6 +6124,7 @@ function StanceAccordion({
5450
6124
  defaultNavItems,
5451
6125
  duration,
5452
6126
  easing,
6127
+ evContext,
5453
6128
  focus,
5454
6129
  fontSizes,
5455
6130
  fontWeights,