datasette-libfec 0.0.1a4__py3-none-any.whl → 0.0.1a6__py3-none-any.whl
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.
- datasette_libfec/__init__.py +18 -2
- datasette_libfec/libfec_client.py +225 -11
- datasette_libfec/libfec_export_rpc_client.py +358 -0
- datasette_libfec/libfec_rpc_client.py +335 -0
- datasette_libfec/libfec_search_rpc_client.py +308 -0
- datasette_libfec/manifest.json +84 -2
- datasette_libfec/page_data.py +87 -0
- datasette_libfec/router.py +24 -0
- datasette_libfec/routes_export.py +128 -0
- datasette_libfec/routes_exports.py +222 -0
- datasette_libfec/routes_pages.py +341 -0
- datasette_libfec/routes_rss.py +416 -0
- datasette_libfec/routes_search.py +78 -0
- datasette_libfec/state.py +6 -0
- datasette_libfec/static/gen/candidate-BEqDafKu.css +1 -0
- datasette_libfec/static/gen/candidate-tqxa29G-.js +3 -0
- datasette_libfec/static/gen/class-C5DDKbJD.js +2 -0
- datasette_libfec/static/gen/committee-Bmki9iKb.css +1 -0
- datasette_libfec/static/gen/committee-DY1GmylW.js +2 -0
- datasette_libfec/static/gen/contest-BbYrzKRg.js +1 -0
- datasette_libfec/static/gen/contest-D4Fj7kGA.css +1 -0
- datasette_libfec/static/gen/each-DkfQbqzj.js +1 -0
- datasette_libfec/static/gen/filing_detail-Ba6_iQwV.css +1 -0
- datasette_libfec/static/gen/filing_detail-D2ib3OM6.js +26 -0
- datasette_libfec/static/gen/index-AHqus2fd.js +9 -0
- datasette_libfec/static/gen/index-client-CDwZ_Ixa.js +1 -0
- datasette_libfec/static/gen/index-jv9_YIKt.css +1 -0
- datasette_libfec/static/gen/load-AXKAVXVj.js +1 -0
- datasette_libfec/templates/libfec_base.html +12 -0
- {datasette_libfec-0.0.1a4.dist-info → datasette_libfec-0.0.1a6.dist-info}/METADATA +2 -2
- datasette_libfec-0.0.1a6.dist-info/RECORD +37 -0
- {datasette_libfec-0.0.1a4.dist-info → datasette_libfec-0.0.1a6.dist-info}/top_level.txt +1 -0
- scripts/typegen-pagedata.py +6 -0
- datasette_libfec/routes.py +0 -189
- datasette_libfec/static/gen/index-6cjSv2YC.css +0 -1
- datasette_libfec/static/gen/index-CaTQMY-X.js +0 -1
- datasette_libfec/templates/libfec.html +0 -14
- datasette_libfec-0.0.1a4.dist-info/RECORD +0 -14
- {datasette_libfec-0.0.1a4.dist-info → datasette_libfec-0.0.1a6.dist-info}/WHEEL +0 -0
- {datasette_libfec-0.0.1a4.dist-info → datasette_libfec-0.0.1a6.dist-info}/entry_points.txt +0 -0
- {datasette_libfec-0.0.1a4.dist-info → datasette_libfec-0.0.1a6.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
from pydantic import BaseModel
|
|
2
|
+
from datasette import Response
|
|
3
|
+
from datasette_plugin_router import Body
|
|
4
|
+
from typing import Optional, List, Literal
|
|
5
|
+
import asyncio
|
|
6
|
+
|
|
7
|
+
from .router import router, check_permission
|
|
8
|
+
from .state import libfec_client, rss_watcher_state
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RssSyncRecord(BaseModel):
|
|
12
|
+
sync_id: int
|
|
13
|
+
sync_uuid: str
|
|
14
|
+
created_at: str
|
|
15
|
+
completed_at: Optional[str] = None
|
|
16
|
+
since_filter: Optional[str] = None
|
|
17
|
+
preset_filter: Optional[str] = None
|
|
18
|
+
form_type_filter: Optional[str] = None
|
|
19
|
+
committee_filter: Optional[str] = None
|
|
20
|
+
state_filter: Optional[str] = None
|
|
21
|
+
party_filter: Optional[str] = None
|
|
22
|
+
total_feed_items: Optional[int] = None
|
|
23
|
+
filtered_items: Optional[int] = None
|
|
24
|
+
new_filings_count: int
|
|
25
|
+
exported_count: int
|
|
26
|
+
cover_only: bool
|
|
27
|
+
status: str
|
|
28
|
+
error_message: Optional[str] = None
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class RssSyncFilingRecord(BaseModel):
|
|
32
|
+
filing_id: str
|
|
33
|
+
rss_pub_date: Optional[str] = None
|
|
34
|
+
rss_title: Optional[str] = None
|
|
35
|
+
committee_id: Optional[str] = None
|
|
36
|
+
form_type: Optional[str] = None
|
|
37
|
+
coverage_from: Optional[str] = None
|
|
38
|
+
coverage_through: Optional[str] = None
|
|
39
|
+
report_type: Optional[str] = None
|
|
40
|
+
export_success: bool
|
|
41
|
+
export_message: Optional[str] = None
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class ApiRssSyncsListResponse(BaseModel):
|
|
45
|
+
status: Literal['success']
|
|
46
|
+
syncs: List[RssSyncRecord]
|
|
47
|
+
message: Optional[str] = None
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class RssStartParams(BaseModel):
|
|
51
|
+
state: Optional[str] = None
|
|
52
|
+
cover_only: bool = True
|
|
53
|
+
interval: int = 60
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class RssResponse(BaseModel):
|
|
57
|
+
status: str
|
|
58
|
+
message: str
|
|
59
|
+
running: bool
|
|
60
|
+
config: Optional[dict] = None
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
async def rss_watch_loop(
|
|
64
|
+
output_db: str,
|
|
65
|
+
state: Optional[str],
|
|
66
|
+
cover_only: bool,
|
|
67
|
+
interval: int
|
|
68
|
+
):
|
|
69
|
+
"""Background task that runs RSS watch periodically"""
|
|
70
|
+
import time
|
|
71
|
+
while rss_watcher_state.running:
|
|
72
|
+
try:
|
|
73
|
+
# Reset progress state before each sync
|
|
74
|
+
rss_watcher_state.phase = "idle"
|
|
75
|
+
rss_watcher_state.exported_count = 0
|
|
76
|
+
rss_watcher_state.total_count = 0
|
|
77
|
+
rss_watcher_state.current_filing_id = None
|
|
78
|
+
rss_watcher_state.error_message = None
|
|
79
|
+
rss_watcher_state.error_code = None
|
|
80
|
+
rss_watcher_state.error_data = None
|
|
81
|
+
|
|
82
|
+
print(f"Running RSS watch: state={state}, cover_only={cover_only}, db={output_db}")
|
|
83
|
+
# Use RPC-based method with progress tracking
|
|
84
|
+
await libfec_client.rss_watch_with_progress(
|
|
85
|
+
output_db, state, cover_only, rss_watcher_state
|
|
86
|
+
)
|
|
87
|
+
print(f"RSS watch completed, sleeping {interval} seconds")
|
|
88
|
+
except Exception as e:
|
|
89
|
+
print(f"RSS watch error: {e}")
|
|
90
|
+
rss_watcher_state.phase = "error"
|
|
91
|
+
rss_watcher_state.error_message = str(e)
|
|
92
|
+
finally:
|
|
93
|
+
rss_watcher_state.next_sync_time = time.time() + interval
|
|
94
|
+
await asyncio.sleep(interval)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
@router.POST("/-/api/libfec/rss/start", output=RssResponse)
|
|
98
|
+
@check_permission()
|
|
99
|
+
async def rss_start(datasette, request, params: Body[RssStartParams]):
|
|
100
|
+
if rss_watcher_state.running:
|
|
101
|
+
return Response.json({
|
|
102
|
+
"status": "error",
|
|
103
|
+
"message": "RSS watcher is already running",
|
|
104
|
+
"running": True
|
|
105
|
+
}, status=400)
|
|
106
|
+
|
|
107
|
+
# Get output database
|
|
108
|
+
output_db = None
|
|
109
|
+
for name, db in datasette.databases.items():
|
|
110
|
+
if not db.is_memory:
|
|
111
|
+
output_db = db
|
|
112
|
+
break
|
|
113
|
+
if output_db is None:
|
|
114
|
+
return Response.json({
|
|
115
|
+
"status": "error",
|
|
116
|
+
"message": "No writable database found.",
|
|
117
|
+
"running": False
|
|
118
|
+
}, status=500)
|
|
119
|
+
|
|
120
|
+
# Validate interval
|
|
121
|
+
if params.interval < 1:
|
|
122
|
+
return Response.json({
|
|
123
|
+
"status": "error",
|
|
124
|
+
"message": "Interval must be at least 1 second",
|
|
125
|
+
"running": False
|
|
126
|
+
}, status=400)
|
|
127
|
+
|
|
128
|
+
# Start the background task
|
|
129
|
+
import time
|
|
130
|
+
rss_watcher_state.running = True
|
|
131
|
+
rss_watcher_state.state = params.state
|
|
132
|
+
rss_watcher_state.cover_only = params.cover_only
|
|
133
|
+
rss_watcher_state.interval = params.interval
|
|
134
|
+
rss_watcher_state.output_db = output_db.path
|
|
135
|
+
rss_watcher_state.next_sync_time = time.time()
|
|
136
|
+
rss_watcher_state.currently_syncing = False
|
|
137
|
+
rss_watcher_state.task = asyncio.create_task(
|
|
138
|
+
rss_watch_loop(
|
|
139
|
+
output_db.path,
|
|
140
|
+
None if params.state == "" else params.state,
|
|
141
|
+
params.cover_only,
|
|
142
|
+
params.interval
|
|
143
|
+
)
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
return Response.json(
|
|
147
|
+
RssResponse(
|
|
148
|
+
status="success",
|
|
149
|
+
message="RSS watcher started",
|
|
150
|
+
running=True,
|
|
151
|
+
config={
|
|
152
|
+
"state": params.state,
|
|
153
|
+
"cover_only": params.cover_only,
|
|
154
|
+
"interval": params.interval
|
|
155
|
+
}
|
|
156
|
+
).model_dump()
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
@router.POST("/-/api/libfec/rss/stop", output=RssResponse)
|
|
161
|
+
@check_permission()
|
|
162
|
+
async def rss_stop(datasette, request):
|
|
163
|
+
if not rss_watcher_state.running:
|
|
164
|
+
return Response.json({
|
|
165
|
+
"status": "error",
|
|
166
|
+
"message": "RSS watcher is not running",
|
|
167
|
+
"running": False
|
|
168
|
+
}, status=400)
|
|
169
|
+
|
|
170
|
+
# Cancel RPC sync if in progress
|
|
171
|
+
if rss_watcher_state.rpc_client:
|
|
172
|
+
try:
|
|
173
|
+
await rss_watcher_state.rpc_client.sync_cancel()
|
|
174
|
+
except Exception as e:
|
|
175
|
+
print(f"Error canceling RPC sync: {e}")
|
|
176
|
+
|
|
177
|
+
# Stop the background task
|
|
178
|
+
rss_watcher_state.running = False
|
|
179
|
+
if rss_watcher_state.task:
|
|
180
|
+
rss_watcher_state.task.cancel()
|
|
181
|
+
try:
|
|
182
|
+
await rss_watcher_state.task
|
|
183
|
+
except asyncio.CancelledError:
|
|
184
|
+
pass
|
|
185
|
+
rss_watcher_state.task = None
|
|
186
|
+
|
|
187
|
+
return Response.json(
|
|
188
|
+
RssResponse(
|
|
189
|
+
status="success",
|
|
190
|
+
message="RSS watcher stopped",
|
|
191
|
+
running=False
|
|
192
|
+
).model_dump()
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
@router.GET("/-/api/libfec/rss/status", output=RssResponse)
|
|
197
|
+
@check_permission()
|
|
198
|
+
async def rss_status(datasette, request):
|
|
199
|
+
config = None
|
|
200
|
+
if rss_watcher_state.running:
|
|
201
|
+
config = {
|
|
202
|
+
"state": rss_watcher_state.state,
|
|
203
|
+
"cover_only": rss_watcher_state.cover_only,
|
|
204
|
+
"interval": rss_watcher_state.interval,
|
|
205
|
+
"output_db": rss_watcher_state.output_db,
|
|
206
|
+
"next_sync_time": rss_watcher_state.next_sync_time,
|
|
207
|
+
"currently_syncing": rss_watcher_state.currently_syncing,
|
|
208
|
+
# Progress tracking fields
|
|
209
|
+
"phase": rss_watcher_state.phase,
|
|
210
|
+
"exported_count": rss_watcher_state.exported_count,
|
|
211
|
+
"total_count": rss_watcher_state.total_count,
|
|
212
|
+
"current_filing_id": rss_watcher_state.current_filing_id,
|
|
213
|
+
"feed_title": rss_watcher_state.feed_title,
|
|
214
|
+
"feed_last_modified": rss_watcher_state.feed_last_modified,
|
|
215
|
+
"error_message": rss_watcher_state.error_message,
|
|
216
|
+
"error_code": rss_watcher_state.error_code,
|
|
217
|
+
"error_data": rss_watcher_state.error_data,
|
|
218
|
+
"sync_start_time": rss_watcher_state.sync_start_time
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
return Response.json(
|
|
222
|
+
RssResponse(
|
|
223
|
+
status="success",
|
|
224
|
+
message="RSS watcher status",
|
|
225
|
+
running=rss_watcher_state.running,
|
|
226
|
+
config=config
|
|
227
|
+
).model_dump()
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
@router.GET("/-/api/libfec/rss/syncs$", output=ApiRssSyncsListResponse)
|
|
232
|
+
@check_permission()
|
|
233
|
+
async def list_rss_syncs(datasette, request):
|
|
234
|
+
"""List all RSS sync operations from the metadata tables"""
|
|
235
|
+
db = datasette.get_database()
|
|
236
|
+
|
|
237
|
+
# Check if the table exists
|
|
238
|
+
try:
|
|
239
|
+
tables = await db.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='libfec_rss_syncs'")
|
|
240
|
+
if not tables.first():
|
|
241
|
+
return Response.json({
|
|
242
|
+
"status": "success",
|
|
243
|
+
"syncs": [],
|
|
244
|
+
"message": "No RSS syncs yet"
|
|
245
|
+
})
|
|
246
|
+
except Exception as e:
|
|
247
|
+
return Response.json({
|
|
248
|
+
"status": "error",
|
|
249
|
+
"message": f"Database error: {str(e)}"
|
|
250
|
+
}, status=500)
|
|
251
|
+
|
|
252
|
+
try:
|
|
253
|
+
syncs_result = await db.execute("""
|
|
254
|
+
SELECT
|
|
255
|
+
sync_id,
|
|
256
|
+
sync_uuid,
|
|
257
|
+
created_at,
|
|
258
|
+
completed_at,
|
|
259
|
+
since_filter,
|
|
260
|
+
preset_filter,
|
|
261
|
+
form_type_filter,
|
|
262
|
+
committee_filter,
|
|
263
|
+
state_filter,
|
|
264
|
+
party_filter,
|
|
265
|
+
total_feed_items,
|
|
266
|
+
filtered_items,
|
|
267
|
+
new_filings_count,
|
|
268
|
+
exported_count,
|
|
269
|
+
cover_only,
|
|
270
|
+
status,
|
|
271
|
+
error_message
|
|
272
|
+
FROM libfec_rss_syncs
|
|
273
|
+
ORDER BY created_at DESC
|
|
274
|
+
LIMIT 50
|
|
275
|
+
""")
|
|
276
|
+
|
|
277
|
+
syncs = []
|
|
278
|
+
for row in syncs_result.rows:
|
|
279
|
+
syncs.append({
|
|
280
|
+
"sync_id": row[0],
|
|
281
|
+
"sync_uuid": row[1],
|
|
282
|
+
"created_at": row[2],
|
|
283
|
+
"completed_at": row[3],
|
|
284
|
+
"since_filter": row[4],
|
|
285
|
+
"preset_filter": row[5],
|
|
286
|
+
"form_type_filter": row[6],
|
|
287
|
+
"committee_filter": row[7],
|
|
288
|
+
"state_filter": row[8],
|
|
289
|
+
"party_filter": row[9],
|
|
290
|
+
"total_feed_items": row[10],
|
|
291
|
+
"filtered_items": row[11],
|
|
292
|
+
"new_filings_count": row[12],
|
|
293
|
+
"exported_count": row[13],
|
|
294
|
+
"cover_only": bool(row[14]),
|
|
295
|
+
"status": row[15],
|
|
296
|
+
"error_message": row[16]
|
|
297
|
+
})
|
|
298
|
+
return Response.json(ApiRssSyncsListResponse(
|
|
299
|
+
status="success",
|
|
300
|
+
syncs=syncs
|
|
301
|
+
).model_dump_json())
|
|
302
|
+
|
|
303
|
+
except Exception as e:
|
|
304
|
+
return Response.json({
|
|
305
|
+
"status": "error",
|
|
306
|
+
"message": f"Failed to fetch RSS syncs: {str(e)}"
|
|
307
|
+
}, status=500)
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
@router.GET("/-/api/libfec/rss/syncs/(?P<sync_id>\\d+)")
|
|
311
|
+
@check_permission()
|
|
312
|
+
async def get_rss_sync_detail(datasette, request, sync_id: str):
|
|
313
|
+
"""Get detailed information about a specific RSS sync"""
|
|
314
|
+
db = datasette.get_database()
|
|
315
|
+
sync_id_int = int(sync_id)
|
|
316
|
+
|
|
317
|
+
try:
|
|
318
|
+
# Get sync record
|
|
319
|
+
sync_result = await db.execute("""
|
|
320
|
+
SELECT
|
|
321
|
+
sync_id,
|
|
322
|
+
sync_uuid,
|
|
323
|
+
created_at,
|
|
324
|
+
completed_at,
|
|
325
|
+
since_filter,
|
|
326
|
+
preset_filter,
|
|
327
|
+
form_type_filter,
|
|
328
|
+
committee_filter,
|
|
329
|
+
state_filter,
|
|
330
|
+
party_filter,
|
|
331
|
+
total_feed_items,
|
|
332
|
+
filtered_items,
|
|
333
|
+
new_filings_count,
|
|
334
|
+
exported_count,
|
|
335
|
+
cover_only,
|
|
336
|
+
status,
|
|
337
|
+
error_message
|
|
338
|
+
FROM libfec_rss_syncs
|
|
339
|
+
WHERE sync_id = ?
|
|
340
|
+
""", [sync_id_int])
|
|
341
|
+
|
|
342
|
+
sync_row = sync_result.first()
|
|
343
|
+
if not sync_row:
|
|
344
|
+
return Response.json({
|
|
345
|
+
"status": "error",
|
|
346
|
+
"message": "RSS sync not found"
|
|
347
|
+
}, status=404)
|
|
348
|
+
|
|
349
|
+
sync = {
|
|
350
|
+
"sync_id": sync_row[0],
|
|
351
|
+
"sync_uuid": sync_row[1],
|
|
352
|
+
"created_at": sync_row[2],
|
|
353
|
+
"completed_at": sync_row[3],
|
|
354
|
+
"since_filter": sync_row[4],
|
|
355
|
+
"preset_filter": sync_row[5],
|
|
356
|
+
"form_type_filter": sync_row[6],
|
|
357
|
+
"committee_filter": sync_row[7],
|
|
358
|
+
"state_filter": sync_row[8],
|
|
359
|
+
"party_filter": sync_row[9],
|
|
360
|
+
"total_feed_items": sync_row[10],
|
|
361
|
+
"filtered_items": sync_row[11],
|
|
362
|
+
"new_filings_count": sync_row[12],
|
|
363
|
+
"exported_count": sync_row[13],
|
|
364
|
+
"cover_only": bool(sync_row[14]),
|
|
365
|
+
"status": sync_row[15],
|
|
366
|
+
"error_message": sync_row[16]
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
# Get filings for this sync
|
|
370
|
+
filings = []
|
|
371
|
+
try:
|
|
372
|
+
filings_result = await db.execute("""
|
|
373
|
+
SELECT
|
|
374
|
+
filing_id,
|
|
375
|
+
rss_pub_date,
|
|
376
|
+
rss_title,
|
|
377
|
+
committee_id,
|
|
378
|
+
form_type,
|
|
379
|
+
coverage_from,
|
|
380
|
+
coverage_through,
|
|
381
|
+
report_type,
|
|
382
|
+
export_success,
|
|
383
|
+
export_message
|
|
384
|
+
FROM libfec_rss_filings
|
|
385
|
+
WHERE sync_id = ?
|
|
386
|
+
ORDER BY rss_pub_date DESC
|
|
387
|
+
""", [sync_id_int])
|
|
388
|
+
|
|
389
|
+
for row in filings_result.rows:
|
|
390
|
+
filings.append({
|
|
391
|
+
"filing_id": row[0],
|
|
392
|
+
"rss_pub_date": row[1],
|
|
393
|
+
"rss_title": row[2],
|
|
394
|
+
"committee_id": row[3],
|
|
395
|
+
"form_type": row[4],
|
|
396
|
+
"coverage_from": row[5],
|
|
397
|
+
"coverage_through": row[6],
|
|
398
|
+
"report_type": row[7],
|
|
399
|
+
"export_success": bool(row[8]),
|
|
400
|
+
"export_message": row[9]
|
|
401
|
+
})
|
|
402
|
+
except Exception:
|
|
403
|
+
# Table might not exist
|
|
404
|
+
pass
|
|
405
|
+
|
|
406
|
+
return Response.json({
|
|
407
|
+
"status": "success",
|
|
408
|
+
"sync": sync,
|
|
409
|
+
"filings": filings
|
|
410
|
+
})
|
|
411
|
+
|
|
412
|
+
except Exception as e:
|
|
413
|
+
return Response.json({
|
|
414
|
+
"status": "error",
|
|
415
|
+
"message": f"Failed to fetch RSS sync detail: {str(e)}"
|
|
416
|
+
}, status=500)
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
from pydantic import BaseModel
|
|
2
|
+
from datasette import Response
|
|
3
|
+
from datasette_plugin_router import Body
|
|
4
|
+
from typing import Optional, List
|
|
5
|
+
|
|
6
|
+
from .router import router, check_permission
|
|
7
|
+
from .state import libfec_client
|
|
8
|
+
|
|
9
|
+
# Cache for search RPC clients (keyed by cycle)
|
|
10
|
+
search_clients = {}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class SearchParams(BaseModel):
|
|
14
|
+
query: str
|
|
15
|
+
cycle: Optional[int] = None
|
|
16
|
+
limit: int = 100
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class SearchResponse(BaseModel):
|
|
20
|
+
status: str
|
|
21
|
+
cycle: int
|
|
22
|
+
query: str
|
|
23
|
+
candidate_count: int
|
|
24
|
+
committee_count: int
|
|
25
|
+
candidates: List[dict]
|
|
26
|
+
committees: List[dict]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@router.POST("/-/api/libfec/search", output=SearchResponse)
|
|
30
|
+
@check_permission()
|
|
31
|
+
async def search(datasette, request, params: Body[SearchParams]):
|
|
32
|
+
"""Search for candidates and committees using libfec search --rpc"""
|
|
33
|
+
from .libfec_search_rpc_client import LibfecSearchRpcClient, RpcError
|
|
34
|
+
|
|
35
|
+
cycle = params.cycle or 2026
|
|
36
|
+
|
|
37
|
+
# Get or create search client for this cycle
|
|
38
|
+
if cycle not in search_clients:
|
|
39
|
+
try:
|
|
40
|
+
client = LibfecSearchRpcClient(str(libfec_client.libfec_path), cycle)
|
|
41
|
+
await client.start_process()
|
|
42
|
+
search_clients[cycle] = client
|
|
43
|
+
except Exception as e:
|
|
44
|
+
return Response.json({
|
|
45
|
+
"status": "error",
|
|
46
|
+
"message": f"Failed to start search process: {str(e)}"
|
|
47
|
+
}, status=500)
|
|
48
|
+
|
|
49
|
+
client = search_clients[cycle]
|
|
50
|
+
|
|
51
|
+
try:
|
|
52
|
+
result = await client.search_query(
|
|
53
|
+
query=params.query,
|
|
54
|
+
cycle=cycle,
|
|
55
|
+
limit=params.limit
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
return Response.json({
|
|
59
|
+
"status": "success",
|
|
60
|
+
"cycle": result["cycle"],
|
|
61
|
+
"query": result["query"],
|
|
62
|
+
"candidate_count": result["candidate_count"],
|
|
63
|
+
"committee_count": result["committee_count"],
|
|
64
|
+
"candidates": result["candidates"],
|
|
65
|
+
"committees": result["committees"]
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
except RpcError as e:
|
|
69
|
+
return Response.json({
|
|
70
|
+
"status": "error",
|
|
71
|
+
"message": f"Search error: {e.message}",
|
|
72
|
+
"code": e.code
|
|
73
|
+
}, status=500)
|
|
74
|
+
except Exception as e:
|
|
75
|
+
return Response.json({
|
|
76
|
+
"status": "error",
|
|
77
|
+
"message": f"Search failed: {str(e)}"
|
|
78
|
+
}, status=500)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.candidate-page.svelte-18y33ic{max-width:1200px;margin:0 auto;padding:2rem}.header.svelte-18y33ic{margin-bottom:2rem}.header.svelte-18y33ic h1:where(.svelte-18y33ic){font-size:2rem;margin-bottom:.5rem}.breadcrumb.svelte-18y33ic{font-size:.9rem;color:#666}.breadcrumb.svelte-18y33ic a:where(.svelte-18y33ic){color:#06c;text-decoration:none}.breadcrumb.svelte-18y33ic a:where(.svelte-18y33ic):hover{text-decoration:underline}.error-box.svelte-18y33ic{background:#fee;border:1px solid #c00;padding:1rem;border-radius:4px;margin-bottom:1rem;color:#900}.content-grid.svelte-18y33ic{display:grid;grid-template-columns:repeat(auto-fit,minmax(350px,1fr));gap:1.5rem;margin-bottom:1.5rem}.info-section.svelte-18y33ic{background:#fff;border:1px solid #ddd;border-radius:8px;padding:1.5rem}.info-section.svelte-18y33ic h2:where(.svelte-18y33ic){font-size:1.25rem;margin-bottom:1rem}.section-box.svelte-18y33ic{background:#f9f9f9;border:1px solid #e0e0e0;border-radius:4px;padding:1rem;margin-bottom:1rem}.section-box.svelte-18y33ic h3:where(.svelte-18y33ic){font-size:1rem;margin-bottom:.5rem}dl.svelte-18y33ic{display:grid;grid-template-columns:max-content 1fr;gap:.5rem 1rem}dt.svelte-18y33ic{font-weight:600;color:#666}dd.svelte-18y33ic{margin:0}dd.svelte-18y33ic a:where(.svelte-18y33ic){color:#06c;text-decoration:none}dd.svelte-18y33ic a:where(.svelte-18y33ic):hover{text-decoration:underline}.party.svelte-18y33ic{display:inline-block;padding:.2rem .5rem;border-radius:4px;font-size:.9rem}.party.dem.svelte-18y33ic{background:#cce5ff;color:#004085}.party.rep.svelte-18y33ic{background:#f8d7da;color:#721c24}.party.lib.svelte-18y33ic{background:#fff3cd;color:#856404}.party.gre.svelte-18y33ic{background:#d4edda;color:#155724}address.svelte-18y33ic{font-style:normal;line-height:1.6}.external-links.svelte-18y33ic{margin-top:1rem}.external-links.svelte-18y33ic a:where(.svelte-18y33ic){color:#06c;text-decoration:none}.external-links.svelte-18y33ic a:where(.svelte-18y33ic):hover{text-decoration:underline}.filings-section.svelte-18y33ic{background:#fff;border:1px solid #ddd;border-radius:8px;padding:1.5rem}.filings-section.svelte-18y33ic h2:where(.svelte-18y33ic){font-size:1.25rem;margin-bottom:1rem}.filings-table.svelte-18y33ic{width:100%;border-collapse:collapse}.filings-table.svelte-18y33ic th:where(.svelte-18y33ic),.filings-table.svelte-18y33ic td:where(.svelte-18y33ic){padding:.75rem;text-align:left;border-bottom:1px solid #e0e0e0}.filings-table.svelte-18y33ic th:where(.svelte-18y33ic){background:#f5f5f5;font-weight:600}.filings-table.svelte-18y33ic a:where(.svelte-18y33ic){color:#06c;text-decoration:none}.filings-table.svelte-18y33ic a:where(.svelte-18y33ic):hover{text-decoration:underline}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{y as ue,R as Ce,T as De,A as t,I as a,z as n,B as l,F as i,G as Ie,J as _,K as c,N as P,C as B,M as W,Q as h,d as R,U as Pe}from"./load-AXKAVXVj.js";import{e as $e,i as Ee}from"./each-DkfQbqzj.js";import{s as we}from"./class-C5DDKbJD.js";var Ne=_('→ <a class="svelte-18y33ic"> <!></a>',1),Se=_('<div class="error-box svelte-18y33ic"><strong>Error:</strong> </div>'),Fe=_('<dt class="svelte-18y33ic">Status:</dt> <dd class="svelte-18y33ic"><!></dd>',1),Ae=_(" <br/>",1),Re=_(" <br/>",1),ke=_('<div class="section-box svelte-18y33ic"><h3 class="svelte-18y33ic">Address</h3> <address class="svelte-18y33ic"><!> <!> <!> <!> <!></address></div>'),He=_('<dt class="svelte-18y33ic">Type:</dt> <dd class="svelte-18y33ic"> </dd>',1),Le=_('<dt class="svelte-18y33ic">Designation:</dt> <dd class="svelte-18y33ic"> </dd>',1),Ue=_('<section class="info-section svelte-18y33ic"><h2 class="svelte-18y33ic">Principal Committee</h2> <div class="section-box svelte-18y33ic"><dl class="svelte-18y33ic"><dt class="svelte-18y33ic">Committee Name:</dt> <dd class="svelte-18y33ic"><a class="svelte-18y33ic"> </a></dd> <dt class="svelte-18y33ic">Committee ID:</dt> <dd class="svelte-18y33ic"><a class="svelte-18y33ic"> </a></dd> <!> <!></dl></div></section>'),ze=_('<div class="content-grid svelte-18y33ic"><section class="info-section svelte-18y33ic"><h2 class="svelte-18y33ic">Candidate Information</h2> <div class="section-box svelte-18y33ic"><dl class="svelte-18y33ic"><dt class="svelte-18y33ic">Candidate ID:</dt> <dd class="svelte-18y33ic"> </dd> <dt class="svelte-18y33ic">Party:</dt> <dd class="svelte-18y33ic"><span> </span></dd> <dt class="svelte-18y33ic">Office:</dt> <dd class="svelte-18y33ic"><a class="svelte-18y33ic"> <!></a></dd> <!> <dt class="svelte-18y33ic">Election Cycle:</dt> <dd class="svelte-18y33ic"> </dd></dl></div> <!> <div class="external-links svelte-18y33ic"><a target="_blank" rel="noopener noreferrer" class="svelte-18y33ic">View on FEC.gov →</a></div></section> <!></div>'),Be=_('<div class="info-section svelte-18y33ic"><p>Candidate not found.</p></div>'),Ge=_('<tr><td class="svelte-18y33ic"><a class="svelte-18y33ic"> </a></td><td class="svelte-18y33ic"> </td><td class="svelte-18y33ic"><!></td></tr>'),Oe=_('<section class="filings-section svelte-18y33ic"><h2 class="svelte-18y33ic"> </h2> <table class="filings-table svelte-18y33ic"><thead><tr><th class="svelte-18y33ic">Filing ID</th><th class="svelte-18y33ic">Form</th><th class="svelte-18y33ic">Coverage Period</th></tr></thead><tbody></tbody></table></section>'),Me=_('<div class="candidate-page svelte-18y33ic"><div class="header svelte-18y33ic"><h1 class="svelte-18y33ic"> </h1> <div class="breadcrumb svelte-18y33ic"><a href="/-/libfec" class="svelte-18y33ic">FEC Data</a> <!> → Candidate</div></div> <!> <!> <!></div>');function Te(ie,de){ue(de,!1);const e=Ce(),X={H:"House",S:"Senate",P:"President"};function re(s){return s?{DEM:"Democrat",REP:"Republican",LIB:"Libertarian",GRE:"Green",IND:"Independent",NPA:"No Party Affiliation"}[s]||s:"Unknown"}function Y(s){const v=new URLSearchParams;return v.set("state",s.state),v.set("office",s.office),v.set("cycle",e.cycle.toString()),s.office==="H"&&s.district&&v.set("district",s.district.toString()),`/-/libfec/contest?${v.toString()}`}De();var Z=Me(),ee=a(Z),ae=a(ee),ce=a(ae),ve=t(ae,2),ne=t(a(ve),2);{var le=s=>{var v=Ne(),y=t(P(v)),C=a(y),D=t(C);{var $=I=>{var f=h();l(()=>c(f,`District ${e.candidate.district??""}`)),i(I,f)};n(D,I=>{e.candidate.office==="H"&&e.candidate.district&&I($)})}l(I=>{B(y,"href",I),c(C,`${e.candidate.state??""}
|
|
2
|
+
${(e.candidate.office?X[e.candidate.office]||e.candidate.office:"")??""} `)},[()=>Y(e.candidate)]),i(s,v)};n(ne,s=>{e.candidate&&s(le)})}var te=t(ee,2);{var oe=s=>{var v=Se(),y=t(a(v));l(()=>c(y,` ${e.error??""}`)),i(s,v)};n(te,s=>{e.error&&s(oe)})}var se=t(te,2);{var _e=s=>{var v=ze(),y=a(v),C=t(a(y),2),D=a(C),$=t(a(D),2),I=a($),f=t($,4),G=a(f),T=a(G),O=t(f,4),J=a(O),M=a(J),Q=t(M);{var V=o=>{var m=h();l(()=>c(m,`District ${e.candidate.district??""}`)),i(o,m)};n(Q,o=>{e.candidate.office==="H"&&e.candidate.district&&o(V)})}var K=t(O,2);{var j=o=>{var m=Fe(),F=t(P(m),2),k=a(F);{var H=x=>{var b=h("Incumbent");i(x,b)},A=x=>{var b=W(),L=P(b);{var U=p=>{var w=h("Challenger");i(p,w)},z=p=>{var w=W(),r=P(w);{var d=u=>{var N=h("Open Seat");i(u,N)},g=u=>{var N=h();l(()=>c(N,e.candidate.incumbent_challenger_status)),i(u,N)};n(r,u=>{e.candidate.incumbent_challenger_status==="O"?u(d):u(g,!1)},!0)}i(p,w)};n(L,p=>{e.candidate.incumbent_challenger_status==="C"?p(U):p(z,!1)},!0)}i(x,b)};n(k,x=>{e.candidate.incumbent_challenger_status==="I"?x(H):x(A,!1)})}i(o,m)};n(K,o=>{e.candidate.incumbent_challenger_status&&o(j)})}var q=t(K,4),E=a(q),S=t(C,2);{var ge=o=>{var m=ke(),F=t(a(m),2),k=a(F);{var H=r=>{var d=Ae(),g=P(d,!0);l(()=>c(g,e.candidate.address_street1)),i(r,d)};n(k,r=>{e.candidate.address_street1&&r(H)})}var A=t(k,2);{var x=r=>{var d=Re(),g=P(d,!0);l(()=>c(g,e.candidate.address_street2)),i(r,d)};n(A,r=>{e.candidate.address_street2&&r(x)})}var b=t(A,2);{var L=r=>{var d=h();l(()=>c(d,`${e.candidate.address_city??""},`)),i(r,d)};n(b,r=>{e.candidate.address_city&&r(L)})}var U=t(b,2);{var z=r=>{var d=h();l(()=>c(d,e.candidate.address_state)),i(r,d)};n(U,r=>{e.candidate.address_state&&r(z)})}var p=t(U,2);{var w=r=>{var d=h();l(()=>c(d,e.candidate.address_zip)),i(r,d)};n(p,r=>{e.candidate.address_zip&&r(w)})}i(o,m)};n(S,o=>{(e.candidate.address_street1||e.candidate.address_city)&&o(ge)})}var he=t(S,2),xe=a(he),be=t(y,2);{var pe=o=>{var m=Ue(),F=t(a(m),2),k=a(F),H=t(a(k),2),A=a(H),x=a(A),b=t(H,4),L=a(b),U=a(L),z=t(b,2);{var p=d=>{var g=He(),u=t(P(g),2),N=a(u);l(()=>c(N,e.committee.committee_type)),i(d,g)};n(z,d=>{e.committee.committee_type&&d(p)})}var w=t(z,2);{var r=d=>{var g=Le(),u=t(P(g),2),N=a(u);l(()=>c(N,e.committee.designation)),i(d,g)};n(w,d=>{e.committee.designation&&d(r)})}l(()=>{B(A,"href",`/-/libfec/committee/${e.committee.committee_id??""}?cycle=${e.cycle??""}`),c(x,e.committee.name||"Unknown"),B(L,"href",`/-/libfec/committee/${e.committee.committee_id??""}?cycle=${e.cycle??""}`),c(U,e.committee.committee_id)}),i(o,m)};n(be,o=>{e.committee&&o(pe)})}l((o,m,F)=>{c(I,e.candidate.candidate_id),we(G,1,`party ${o??""}`,"svelte-18y33ic"),c(T,m),B(J,"href",F),c(M,`${e.candidate.state??""}
|
|
3
|
+
${(e.candidate.office?X[e.candidate.office]||e.candidate.office:"")??""} `),c(E,e.cycle),B(xe,"href",`https://www.fec.gov/data/candidate/${e.candidate_id??""}/`)},[()=>e.candidate.party_affiliation?.toLowerCase(),()=>re(e.candidate.party_affiliation),()=>Y(e.candidate)]),i(s,v)},fe=s=>{var v=W(),y=P(v);{var C=D=>{var $=Be();i(D,$)};n(y,D=>{e.error||D(C)},!0)}i(s,v)};n(se,s=>{e.candidate?s(_e):s(fe,!1)})}var me=t(se,2);{var ye=s=>{var v=Oe(),y=a(v),C=a(y),D=t(y,2),$=t(a(D));$e($,5,()=>e.filings,Ee,(I,f)=>{var G=Ge(),T=a(G),O=a(T),J=a(O),M=t(T),Q=a(M),V=t(M),K=a(V);{var j=E=>{var S=h();l(()=>c(S,`${R(f).coverage_from_date??""} to ${R(f).coverage_through_date??""}`)),i(E,S)},q=E=>{var S=h("N/A");i(E,S)};n(K,E=>{R(f).coverage_from_date&&R(f).coverage_through_date?E(j):E(q,!1)})}l(()=>{B(O,"href",`/-/libfec/filing/${R(f).filing_id??""}`),c(J,`FEC-${R(f).filing_id??""}`),c(Q,R(f).cover_record_form||"N/A")}),i(I,G)}),l(()=>c(C,`Recent Filings (${e.filings.length??""})`)),i(s,v)};n(me,s=>{e.filings&&e.filings.length>0&&s(ye)})}l(()=>c(ce,e.candidate?.name||e.candidate_id)),i(ie,Z),Ie()}Pe(Te,{target:document.getElementById("app-root")});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const c=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function e(l,g,t){var n=l==null?"":""+l;if(g&&(n=n?n+" "+g:g),t){for(var f in t)if(t[f])n=n?n+" "+f:f;else if(n.length)for(var r=f.length,i=0;(i=n.indexOf(f,i))>=0;){var u=i+r;(i===0||c.includes(n[i-1]))&&(u===n.length||c.includes(n[u]))?n=(i===0?"":n.substring(0,i))+n.substring(u+1):i=u}}return n===""?null:n}function a(l,g){return l==null?null:String(l)}function v(l,g,t,n,f,r){var i=l.__className;if(i!==t||i===void 0){var u=e(t,n,r);u==null?l.removeAttribute("class"):l.className=u,l.__className=t}else if(r&&f!==r)for(var s in r){var o=!!r[s];(f==null||o!==!!f[s])&&l.classList.toggle(s,o)}return r}export{v as s,a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.committee-page.svelte-coklk8{max-width:1200px;margin:0 auto;padding:2rem}.header.svelte-coklk8{margin-bottom:2rem}.header.svelte-coklk8 h1:where(.svelte-coklk8){font-size:2rem;margin-bottom:.5rem}.breadcrumb.svelte-coklk8{font-size:.9rem;color:#666}.breadcrumb.svelte-coklk8 a:where(.svelte-coklk8){color:#06c;text-decoration:none}.breadcrumb.svelte-coklk8 a:where(.svelte-coklk8):hover{text-decoration:underline}.error-box.svelte-coklk8{background:#fee;border:1px solid #c00;padding:1rem;border-radius:4px;margin-bottom:1rem;color:#900}.content-grid.svelte-coklk8{display:grid;grid-template-columns:repeat(auto-fit,minmax(350px,1fr));gap:1.5rem;margin-bottom:1.5rem}.info-section.svelte-coklk8{background:#fff;border:1px solid #ddd;border-radius:8px;padding:1.5rem}.info-section.svelte-coklk8 h2:where(.svelte-coklk8){font-size:1.25rem;margin-bottom:1rem}.section-box.svelte-coklk8{background:#f9f9f9;border:1px solid #e0e0e0;border-radius:4px;padding:1rem;margin-bottom:1rem}.section-box.svelte-coklk8 h3:where(.svelte-coklk8){font-size:1rem;margin-bottom:.5rem}dl.svelte-coklk8{display:grid;grid-template-columns:max-content 1fr;gap:.5rem 1rem}dt.svelte-coklk8{font-weight:600;color:#666}dd.svelte-coklk8{margin:0}dd.svelte-coklk8 a:where(.svelte-coklk8){color:#06c;text-decoration:none}dd.svelte-coklk8 a:where(.svelte-coklk8):hover{text-decoration:underline}address.svelte-coklk8{font-style:normal;line-height:1.6}.external-links.svelte-coklk8{margin-top:1rem}.external-links.svelte-coklk8 a:where(.svelte-coklk8){color:#06c;text-decoration:none}.external-links.svelte-coklk8 a:where(.svelte-coklk8):hover{text-decoration:underline}.filings-section.svelte-coklk8{background:#fff;border:1px solid #ddd;border-radius:8px;padding:1.5rem}.filings-section.svelte-coklk8 h2:where(.svelte-coklk8){font-size:1.25rem;margin-bottom:1rem}.filings-table.svelte-coklk8{width:100%;border-collapse:collapse}.filings-table.svelte-coklk8 th:where(.svelte-coklk8),.filings-table.svelte-coklk8 td:where(.svelte-coklk8){padding:.75rem;text-align:left;border-bottom:1px solid #e0e0e0}.filings-table.svelte-coklk8 th:where(.svelte-coklk8){background:#f5f5f5;font-weight:600}.filings-table.svelte-coklk8 a:where(.svelte-coklk8){color:#06c;text-decoration:none}.filings-table.svelte-coklk8 a:where(.svelte-coklk8):hover{text-decoration:underline}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{y as Ne,R as De,T as Ee,A as t,I as a,z as c,B as o,F as i,G as Fe,J as m,K as s,N as p,C as N,M as Ie,Q as D,d as E,U as we}from"./load-AXKAVXVj.js";import{e as He,i as Ue}from"./each-DkfQbqzj.js";var qe=m('→ <a class="svelte-coklk8"> <!></a>',1),Se=m('→ <a class="svelte-coklk8"> </a>',1),ze=m('<div class="error-box svelte-coklk8"><strong>Error:</strong> </div>'),Le=m('<dt class="svelte-coklk8">Type:</dt> <dd class="svelte-coklk8"> </dd>',1),Qe=m('<dt class="svelte-coklk8">Designation:</dt> <dd class="svelte-coklk8"> </dd>',1),Te=m('<dt class="svelte-coklk8">Party:</dt> <dd class="svelte-coklk8"> </dd>',1),Be=m('<dt class="svelte-coklk8">Filing Frequency:</dt> <dd class="svelte-coklk8"> </dd>',1),Je=m(" <br/>",1),Re=m(" <br/>",1),Oe=m('<div class="section-box svelte-coklk8"><h3 class="svelte-coklk8">Address</h3> <address class="svelte-coklk8"><!> <!> <!> <!> <!></address></div>'),Ve=m('<div class="section-box svelte-coklk8"><h3 class="svelte-coklk8">Treasurer</h3> <p> </p></div>'),Ge=m('<dt class="svelte-coklk8">Contest:</dt> <dd class="svelte-coklk8"><a class="svelte-coklk8"> <!></a></dd>',1),Ke=m('<dt class="svelte-coklk8">Party:</dt> <dd class="svelte-coklk8"> </dd>',1),Me=m('<section class="info-section svelte-coklk8"><h2 class="svelte-coklk8">Associated Candidate</h2> <div class="section-box svelte-coklk8"><dl class="svelte-coklk8"><dt class="svelte-coklk8">Candidate Name:</dt> <dd class="svelte-coklk8"><a class="svelte-coklk8"> </a></dd> <dt class="svelte-coklk8">Candidate ID:</dt> <dd class="svelte-coklk8"><a class="svelte-coklk8"> </a></dd> <!> <!></dl></div></section>'),We=m('<div class="content-grid svelte-coklk8"><section class="info-section svelte-coklk8"><h2 class="svelte-coklk8">Committee Information</h2> <div class="section-box svelte-coklk8"><dl class="svelte-coklk8"><dt class="svelte-coklk8">Committee ID:</dt> <dd class="svelte-coklk8"> </dd> <!> <!> <!> <!> <dt class="svelte-coklk8">Election Cycle:</dt> <dd class="svelte-coklk8"> </dd></dl></div> <!> <!> <div class="external-links svelte-coklk8"><a target="_blank" rel="noopener noreferrer" class="svelte-coklk8">View on FEC.gov →</a></div></section> <!></div>'),Xe=m('<div class="info-section svelte-coklk8"><p>Committee not found.</p></div>'),Ye=m('<tr><td class="svelte-coklk8"><a class="svelte-coklk8"> </a></td><td class="svelte-coklk8"> </td><td class="svelte-coklk8"><!></td></tr>'),Ze=m('<section class="filings-section svelte-coklk8"><h2 class="svelte-coklk8"> </h2> <table class="filings-table svelte-coklk8"><thead><tr><th class="svelte-coklk8">Filing ID</th><th class="svelte-coklk8">Form</th><th class="svelte-coklk8">Coverage Period</th></tr></thead><tbody></tbody></table></section>'),je=m('<div class="committee-page svelte-coklk8"><div class="header svelte-coklk8"><h1 class="svelte-coklk8"> </h1> <div class="breadcrumb svelte-coklk8"><a href="/-/libfec" class="svelte-coklk8">FEC Data</a> <!> <!> → Committee</div></div> <!> <!> <!></div>');function et(se,ce){Ne(ce,!1);const e=De(),Y={H:"House",S:"Senate",P:"President"};function oe(d){return d?{C:"Communication Cost",D:"Delegate Committee",E:"Electioneering Communication",H:"House Campaign",I:"Independent Expenditor",N:"PAC - Nonqualified",O:"Super PAC (Independent Expenditure-Only)",P:"Presidential Campaign",Q:"PAC - Qualified",S:"Senate Campaign",U:"Single Candidate Independent Expenditure",V:"PAC with Non-Contribution Account",W:"PAC with Non-Contribution Account - Nonqualified",X:"Party - Nonqualified",Y:"Party - Qualified",Z:"National Party Nonfederal Account"}[d]||d:"Unknown"}function le(d){return d?{A:"Authorized by Candidate",B:"Lobbyist/Registrant PAC",D:"Leadership PAC",J:"Joint Fundraising Committee",P:"Principal Campaign Committee",U:"Unauthorized"}[d]||d:"Unknown"}Ee();var Z=je(),j=a(Z),ee=a(j),ve=a(ee),ne=t(ee,2),te=t(a(ne),2);{var _e=d=>{var _=qe(),f=t(p(_)),u=a(f),x=t(u);{var C=P=>{var g=D();o(()=>s(g,e.candidate.district)),i(P,g)};c(x,P=>{e.candidate.office==="H"&&e.candidate.district&&P(C)})}o(()=>{N(f,"href",`/-/libfec/contest?state=${e.candidate.state??""}&office=${e.candidate.office??""}${e.candidate.office==="H"&&e.candidate.district?"&district="+e.candidate.district:""}&cycle=${e.cycle??""}`),s(u,`${e.candidate.state??""} ${(Y[e.candidate.office]||e.candidate.office)??""} `)}),i(d,_)};c(te,d=>{e.candidate?.office&&e.candidate?.state&&d(_e)})}var me=t(te,2);{var fe=d=>{var _=Se(),f=t(p(_)),u=a(f);o(()=>{N(f,"href",`/-/libfec/candidate/${e.candidate.candidate_id??""}?cycle=${e.cycle??""}`),s(u,e.candidate.name)}),i(d,_)};c(me,d=>{e.candidate&&d(fe)})}var ae=t(j,2);{var ke=d=>{var _=ze(),f=t(a(_));o(()=>s(f,` ${e.error??""}`)),i(d,_)};c(ae,d=>{e.error&&d(ke)})}var de=t(ae,2);{var ge=d=>{var _=We(),f=a(_),u=t(a(f),2),x=a(u),C=t(a(x),2),P=a(C),g=t(C,2);{var H=r=>{var n=Le(),h=t(p(n),2),k=a(h);o($=>s(k,$),[()=>oe(e.committee.committee_type)]),i(r,n)};c(g,r=>{e.committee.committee_type&&r(H)})}var F=t(g,2);{var U=r=>{var n=Qe(),h=t(p(n),2),k=a(h);o($=>s(k,$),[()=>le(e.committee.designation)]),i(r,n)};c(F,r=>{e.committee.designation&&r(U)})}var q=t(F,2);{var S=r=>{var n=Te(),h=t(p(n),2),k=a(h);o(()=>s(k,e.committee.party_affiliation)),i(r,n)};c(q,r=>{e.committee.party_affiliation&&r(S)})}var z=t(q,2);{var R=r=>{var n=Be(),h=t(p(n),2),k=a(h);o(()=>s(k,e.committee.filing_frequency)),i(r,n)};c(z,r=>{e.committee.filing_frequency&&r(R)})}var O=t(z,4),V=a(O),L=t(u,2);{var b=r=>{var n=Oe(),h=t(a(n),2),k=a(h);{var $=v=>{var l=Je(),y=p(l,!0);o(()=>s(y,e.committee.address_street1)),i(v,l)};c(k,v=>{e.committee.address_street1&&v($)})}var I=t(k,2);{var G=v=>{var l=Re(),y=p(l,!0);o(()=>s(y,e.committee.address_street2)),i(v,l)};c(I,v=>{e.committee.address_street2&&v(G)})}var w=t(I,2);{var Q=v=>{var l=D();o(()=>s(l,`${e.committee.address_city??""},`)),i(v,l)};c(w,v=>{e.committee.address_city&&v(Q)})}var T=t(w,2);{var B=v=>{var l=D();o(()=>s(l,e.committee.address_state)),i(v,l)};c(T,v=>{e.committee.address_state&&v(B)})}var K=t(T,2);{var M=v=>{var l=D();o(()=>s(l,e.committee.address_zip)),i(v,l)};c(K,v=>{e.committee.address_zip&&v(M)})}i(r,n)};c(L,r=>{(e.committee.address_street1||e.committee.address_city)&&r(b)})}var A=t(L,2);{var xe=r=>{var n=Ve(),h=t(a(n),2),k=a(h);o(()=>s(k,e.committee.treasurer_name)),i(r,n)};c(A,r=>{e.committee.treasurer_name&&r(xe)})}var ye=t(A,2),Ce=a(ye),be=t(f,2);{var $e=r=>{var n=Me(),h=t(a(n),2),k=a(h),$=t(a(k),2),I=a($),G=a(I),w=t($,4),Q=a(w),T=a(Q),B=t(w,2);{var K=l=>{var y=Ge(),W=t(p(y),2),J=a(W),re=a(J),Pe=t(re);{var Ae=X=>{var ie=D();o(()=>s(ie,`District ${e.candidate.district??""}`)),i(X,ie)};c(Pe,X=>{e.candidate.office==="H"&&e.candidate.district&&X(Ae)})}o(()=>{N(J,"href",`/-/libfec/contest?state=${e.candidate.state??""}&office=${e.candidate.office??""}${e.candidate.office==="H"&&e.candidate.district?"&district="+e.candidate.district:""}&cycle=${e.cycle??""}`),s(re,`${e.candidate.state??""}
|
|
2
|
+
${(Y[e.candidate.office]||e.candidate.office)??""} `)}),i(l,y)};c(B,l=>{e.candidate.office&&e.candidate.state&&l(K)})}var M=t(B,2);{var v=l=>{var y=Ke(),W=t(p(y),2),J=a(W);o(()=>s(J,e.candidate.party_affiliation)),i(l,y)};c(M,l=>{e.candidate.party_affiliation&&l(v)})}o(()=>{N(I,"href",`/-/libfec/candidate/${e.candidate.candidate_id??""}?cycle=${e.cycle??""}`),s(G,e.candidate.name||"Unknown"),N(Q,"href",`/-/libfec/candidate/${e.candidate.candidate_id??""}?cycle=${e.cycle??""}`),s(T,e.candidate.candidate_id)}),i(r,n)};c(be,r=>{e.candidate&&r($e)})}o(()=>{s(P,e.committee.committee_id),s(V,e.cycle),N(Ce,"href",`https://www.fec.gov/data/committee/${e.committee_id??""}/`)}),i(d,_)},he=d=>{var _=Ie(),f=p(_);{var u=x=>{var C=Xe();i(x,C)};c(f,x=>{e.error||x(u)},!0)}i(d,_)};c(de,d=>{e.committee?d(ge):d(he,!1)})}var ue=t(de,2);{var pe=d=>{var _=Ze(),f=a(_),u=a(f),x=t(f,2),C=t(a(x));He(C,5,()=>e.filings,Ue,(P,g)=>{var H=Ye(),F=a(H),U=a(F),q=a(U),S=t(F),z=a(S),R=t(S),O=a(R);{var V=b=>{var A=D();o(()=>s(A,`${E(g).coverage_from_date??""} to ${E(g).coverage_through_date??""}`)),i(b,A)},L=b=>{var A=D("N/A");i(b,A)};c(O,b=>{E(g).coverage_from_date&&E(g).coverage_through_date?b(V):b(L,!1)})}o(()=>{N(U,"href",`/-/libfec/filing/${E(g).filing_id??""}`),s(q,`FEC-${E(g).filing_id??""}`),s(z,E(g).cover_record_form||"N/A")}),i(P,H)}),o(()=>s(u,`Recent Filings (${e.filings.length??""})`)),i(d,_)};c(ue,d=>{e.filings&&e.filings.length>0&&d(pe)})}o(()=>s(ve,e.committee?.name||e.committee_id)),i(se,Z),Fe()}we(et,{target:document.getElementById("app-root")});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{y as pe,R as ke,T as we,A as i,z as o,B as k,F as s,G as ge,I as e,J as _,K as c,d as t,C as D,N as y,Q as C,M as O,U as ue}from"./load-AXKAVXVj.js";import{e as he,i as xe}from"./each-DkfQbqzj.js";import{s as ye}from"./class-C5DDKbJD.js";var Ce=_('<div class="error-box svelte-e8kwbr"><strong>Error:</strong> </div>'),Ie=_('<p class="no-data svelte-e8kwbr">No candidates found for this contest.</p>'),De=_("<div> </div>"),Ee=_('<dt class="svelte-e8kwbr">Status:</dt> <dd class="svelte-e8kwbr"><!></dd>',1),Pe=_('<dt class="svelte-e8kwbr">Committee:</dt> <dd class="svelte-e8kwbr"><a class="svelte-e8kwbr"> </a></dd>',1),Ne=_('<div class="candidate-card svelte-e8kwbr"><div class="candidate-name svelte-e8kwbr"><a class="svelte-e8kwbr"> </a></div> <!> <dl class="candidate-details svelte-e8kwbr"><dt class="svelte-e8kwbr">Candidate ID:</dt> <dd class="svelte-e8kwbr"><a class="svelte-e8kwbr"> </a></dd> <!> <!></dl></div>'),Le=_('<div class="candidates-grid svelte-e8kwbr"></div>'),Re=_('<div class="contest-page svelte-e8kwbr"><div class="header svelte-e8kwbr"><h1 class="svelte-e8kwbr"> </h1> <div class="meta svelte-e8kwbr"><span class="cycle svelte-e8kwbr"> </span> <span class="office svelte-e8kwbr"> </span></div> <div class="breadcrumb svelte-e8kwbr"><a href="/-/libfec" class="svelte-e8kwbr">FEC Data</a> → Contest</div></div> <!> <section class="candidates-section svelte-e8kwbr"><h2 class="svelte-e8kwbr"> </h2> <!></section></div>');function Se(U,z){pe(z,!1);const v=ke(),J={H:"House",S:"Senate",P:"President"};function K(r){return r?{DEM:"Democrat",REP:"Republican",LIB:"Libertarian",GRE:"Green",IND:"Independent",NPA:"No Party Affiliation"}[r]||r:""}we();var E=Re(),P=e(E),N=e(P),Q=e(N),T=i(N,2),L=e(T),j=e(L),q=i(L,2),V=e(q),R=i(P,2);{var W=r=>{var d=Ce(),I=i(e(d));k(()=>c(I,` ${v.error??""}`)),s(r,d)};o(R,r=>{v.error&&r(W)})}var X=i(R,2),S=e(X),Y=e(S),Z=i(S,2);{var ee=r=>{var d=Ie();s(r,d)},ae=r=>{var d=Le();he(d,5,()=>v.candidates,xe,(I,a)=>{var A=Ne(),B=e(A),G=e(B),te=e(G),$=i(B,2);{var re=l=>{var n=De(),w=e(n);k((f,g)=>{ye(n,1,`party ${f??""}`,"svelte-e8kwbr"),c(w,g)},[()=>t(a).party_affiliation.toLowerCase(),()=>K(t(a).party_affiliation)]),s(l,n)};o($,l=>{t(a).party_affiliation&&l(re)})}var se=i($,2),F=i(e(se),2),H=e(F),ve=e(H),M=i(F,2);{var ie=l=>{var n=Ee(),w=i(y(n),2),f=e(w);{var g=b=>{var u=C("Incumbent");s(b,u)},ne=b=>{var u=O(),de=y(u);{var oe=m=>{var h=C("Challenger");s(m,h)},_e=m=>{var h=O(),fe=y(h);{var be=p=>{var x=C("Open Seat");s(p,x)},me=p=>{var x=C();k(()=>c(x,t(a).incumbent_challenger_status)),s(p,x)};o(fe,p=>{t(a).incumbent_challenger_status==="O"?p(be):p(me,!1)},!0)}s(m,h)};o(de,m=>{t(a).incumbent_challenger_status==="C"?m(oe):m(_e,!1)},!0)}s(b,u)};o(f,b=>{t(a).incumbent_challenger_status==="I"?b(g):b(ne,!1)})}s(l,n)};o(M,l=>{t(a).incumbent_challenger_status&&l(ie)})}var le=i(M,2);{var ce=l=>{var n=Pe(),w=i(y(n),2),f=e(w),g=e(f);k(()=>{D(f,"href",`/-/libfec/committee/${t(a).principal_campaign_committee??""}?cycle=${v.cycle??""}`),c(g,t(a).principal_campaign_committee)}),s(l,n)};o(le,l=>{t(a).principal_campaign_committee&&l(ce)})}k(()=>{D(G,"href",`/-/libfec/candidate/${t(a).candidate_id??""}?cycle=${v.cycle??""}`),c(te,t(a).name||"Unknown"),D(H,"href",`/-/libfec/candidate/${t(a).candidate_id??""}?cycle=${v.cycle??""}`),c(ve,t(a).candidate_id)}),s(I,A)}),s(r,d)};o(Z,r=>{!v.candidates||v.candidates.length===0?r(ee):r(ae,!1)})}k(()=>{c(Q,v.contest_description),c(j,`${v.cycle??""} Election Cycle`),c(V,J[v.office]||v.office),c(Y,`Candidates (${v.candidates?.length??0??""})`)}),s(U,E),ge()}ue(Se,{target:document.getElementById("app-root")});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.contest-page.svelte-e8kwbr{max-width:1200px;margin:0 auto;padding:2rem}.header.svelte-e8kwbr{margin-bottom:2rem}.header.svelte-e8kwbr h1:where(.svelte-e8kwbr){font-size:2rem;margin-bottom:.5rem}.meta.svelte-e8kwbr{display:flex;gap:1rem;margin-bottom:.5rem}.cycle.svelte-e8kwbr{background:#e0e0e0;padding:.25rem .5rem;border-radius:4px;font-size:.9rem}.office.svelte-e8kwbr{background:#d0e0f0;padding:.25rem .5rem;border-radius:4px;font-size:.9rem}.breadcrumb.svelte-e8kwbr{font-size:.9rem;color:#666}.breadcrumb.svelte-e8kwbr a:where(.svelte-e8kwbr){color:#06c;text-decoration:none}.breadcrumb.svelte-e8kwbr a:where(.svelte-e8kwbr):hover{text-decoration:underline}.error-box.svelte-e8kwbr{background:#fee;border:1px solid #c00;padding:1rem;border-radius:4px;margin-bottom:1rem;color:#900}.candidates-section.svelte-e8kwbr{background:#fff;border:1px solid #ddd;border-radius:8px;padding:1.5rem}.candidates-section.svelte-e8kwbr h2:where(.svelte-e8kwbr){font-size:1.5rem;margin-bottom:1rem}.no-data.svelte-e8kwbr{color:#666;font-style:italic}.candidates-grid.svelte-e8kwbr{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1rem}.candidate-card.svelte-e8kwbr{background:#f9f9f9;border:1px solid #e0e0e0;border-radius:8px;padding:1rem}.candidate-name.svelte-e8kwbr{font-size:1.2rem;font-weight:600;margin-bottom:.5rem}.candidate-name.svelte-e8kwbr a:where(.svelte-e8kwbr){color:#06c;text-decoration:none}.candidate-name.svelte-e8kwbr a:where(.svelte-e8kwbr):hover{text-decoration:underline}.party.svelte-e8kwbr{display:inline-block;padding:.25rem .5rem;border-radius:4px;font-size:.85rem;margin-bottom:.75rem}.party.dem.svelte-e8kwbr{background:#cce5ff;color:#004085}.party.rep.svelte-e8kwbr{background:#f8d7da;color:#721c24}.party.lib.svelte-e8kwbr{background:#fff3cd;color:#856404}.party.gre.svelte-e8kwbr{background:#d4edda;color:#155724}.candidate-details.svelte-e8kwbr{display:grid;grid-template-columns:max-content 1fr;gap:.25rem .75rem;font-size:.9rem}.candidate-details.svelte-e8kwbr dt:where(.svelte-e8kwbr){font-weight:600;color:#666}.candidate-details.svelte-e8kwbr dd:where(.svelte-e8kwbr){margin:0}.candidate-details.svelte-e8kwbr a:where(.svelte-e8kwbr){color:#06c;text-decoration:none}.candidate-details.svelte-e8kwbr a:where(.svelte-e8kwbr):hover{text-decoration:underline}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as H,$ as X,d as D,a0 as L,c as Y,a1 as k,a2 as $,v as G,i as J,a3 as F,a4 as K,a5 as O,a6 as P,a7 as Q,a8 as W,a9 as C,aa as V,ab as B,ac as U,ad as R,Y as Z,ae as j,af as y,ag as ee,ah as re}from"./load-AXKAVXVj.js";function ie(r,a){return a}function ne(r,a,i){for(var d=[],g=a.length,u,s=a.length,c=0;c<g;c++){let h=a[c];U(h,()=>{if(u){if(u.pending.delete(h),u.done.add(h),u.pending.size===0){var o=r.outrogroups;z(F(u.done)),o.delete(u),o.size===0&&(r.outrogroups=null)}}else s-=1},!1)}if(s===0){var f=d.length===0&&i!==null;if(f){var v=i,n=v.parentNode;y(n),n.append(v),r.items.clear()}z(a,!f)}else u={pending:new Set(a),done:new Set},(r.outrogroups??=new Set).add(u)}function z(r,a=!0){for(var i=0;i<r.length;i++)ee(r[i],a)}var q;function ue(r,a,i,d,g,u=null){var s=r,c=new Map,f=(a&V)!==0;if(f){var v=r;s=v.appendChild(H())}var n=null,h=G(()=>{var l=i();return J(l)?l:l==null?[]:F(l)}),o,t=!0;function S(){e.fallback=n,fe(e,o,s,a,d),n!==null&&(o.length===0?(n.f&C)===0?B(n):(n.f^=C,M(n,null,s)):U(n,()=>{n=null}))}var x=X(()=>{o=D(h);for(var l=o.length,b=new Set,m=Y,_=$(),w=0;w<l;w+=1){var T=o[w],E=d(T,w),p=t?null:c.get(E);p?(p.v&&L(p.v,T),p.i&&L(p.i,w),_&&m.skipped_effects.delete(p.e)):(p=ae(c,t?s:q??=H(),T,E,w,g,a,i),t||(p.e.f|=C),c.set(E,p)),b.add(E)}if(l===0&&u&&!n&&(t?n=k(()=>u(s)):(n=k(()=>u(q??=H())),n.f|=C)),!t)if(_){for(const[N,A]of c)b.has(N)||m.skipped_effects.add(A.e);m.oncommit(S),m.ondiscard(()=>{})}else S();D(h)}),e={effect:x,items:c,outrogroups:null,fallback:n};t=!1}function fe(r,a,i,d,g){var u=(d&j)!==0,s=a.length,c=r.items,f=r.effect.first,v,n=null,h,o=[],t=[],S,x,e,l;if(u)for(l=0;l<s;l+=1)S=a[l],x=g(S,l),e=c.get(x).e,(e.f&C)===0&&(e.nodes?.a?.measure(),(h??=new Set).add(e));for(l=0;l<s;l+=1){if(S=a[l],x=g(S,l),e=c.get(x).e,r.outrogroups!==null)for(const A of r.outrogroups)A.pending.delete(e),A.done.delete(e);if((e.f&C)!==0)if(e.f^=C,e===f)M(e,null,i);else{var b=n?n.next:f;e===r.effect.last&&(r.effect.last=e.prev),e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),I(r,n,e),I(r,e,b),M(e,b,i),n=e,o=[],t=[],f=n.next;continue}if((e.f&R)!==0&&(B(e),u&&(e.nodes?.a?.unfix(),(h??=new Set).delete(e))),e!==f){if(v!==void 0&&v.has(e)){if(o.length<t.length){var m=t[0],_;n=m.prev;var w=o[0],T=o[o.length-1];for(_=0;_<o.length;_+=1)M(o[_],m,i);for(_=0;_<t.length;_+=1)v.delete(t[_]);I(r,w.prev,T.next),I(r,n,w),I(r,T,m),f=m,n=T,l-=1,o=[],t=[]}else v.delete(e),M(e,f,i),I(r,e.prev,e.next),I(r,e,n===null?r.effect.first:n.next),I(r,n,e),n=e;continue}for(o=[],t=[];f!==null&&f!==e;)(v??=new Set).add(f),t.push(f),f=f.next;if(f===null)continue}(e.f&C)===0&&o.push(e),n=e,f=e.next}if(r.outrogroups!==null){for(const A of r.outrogroups)A.pending.size===0&&(z(F(A.done)),r.outrogroups?.delete(A));r.outrogroups.size===0&&(r.outrogroups=null)}if(f!==null||v!==void 0){var E=[];if(v!==void 0)for(e of v)(e.f&R)===0&&E.push(e);for(;f!==null;)(f.f&R)===0&&f!==r.fallback&&E.push(f),f=f.next;var p=E.length;if(p>0){var N=(d&V)!==0&&s===0?i:null;if(u){for(l=0;l<p;l+=1)E[l].nodes?.a?.measure();for(l=0;l<p;l+=1)E[l].nodes?.a?.fix()}ne(r,E,N)}}u&&Z(()=>{if(h!==void 0)for(e of h)e.nodes?.a?.apply()})}function ae(r,a,i,d,g,u,s,c){var f=(s&P)!==0?(s&Q)===0?W(i,!1,!1):O(i):null,v=(s&K)!==0?O(g):null;return{v:f,i:v,e:k(()=>(u(a,f??i,v??g,c),()=>{r.delete(d)}))}}function M(r,a,i){if(r.nodes)for(var d=r.nodes.start,g=r.nodes.end,u=a&&(a.f&C)===0?a.nodes.start:i;d!==null;){var s=re(d);if(u.before(d),d===g)return;d=s}}function I(r,a,i){a===null?r.effect.first=i:a.next=i,i===null?r.effect.last=a:i.prev=a}export{ue as e,ie as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.alert-box.svelte-56ac3r{background:#fff3cd;border:1px solid #ffc107;border-radius:4px;padding:1rem;margin-top:1rem}.alert-box.svelte-56ac3r p:where(.svelte-56ac3r){margin:0;color:#856404}.text-content.svelte-q9c4pz{background:#f9f9f9;padding:1rem;border-left:3px solid #007bff;white-space:pre-wrap;font-family:inherit;line-height:1.6}.filing-detail.svelte-10ase3{max-width:1200px;margin:0 auto;padding:2rem}.header.svelte-10ase3{margin-bottom:2rem}.header.svelte-10ase3 h1:where(.svelte-10ase3){font-size:2rem;margin-bottom:.5rem}.filer-info.svelte-10ase3{margin-bottom:.75rem;font-size:1.1rem}.filer-name.svelte-10ase3 a:where(.svelte-10ase3){color:#06c;text-decoration:none}.filer-name.svelte-10ase3 a:where(.svelte-10ase3):hover{text-decoration:underline}.filer-id.svelte-10ase3{color:#666;font-size:.9rem}.links.svelte-10ase3{display:flex;gap:1rem;flex-wrap:wrap}.links.svelte-10ase3 a:where(.svelte-10ase3){color:#06c;text-decoration:none}.links.svelte-10ase3 a:where(.svelte-10ase3):hover{text-decoration:underline}.info-section.svelte-10ase3{background:#fff;border:1px solid #ddd;border-radius:8px;padding:1.5rem}.info-section.svelte-10ase3 h2:where(.svelte-10ase3){font-size:1.5rem;margin-bottom:1rem}.form-content.svelte-10ase3 h3:where(.svelte-10ase3){font-size:1.25rem;margin-bottom:1rem}.section-box.svelte-10ase3{background:#f9f9f9;border:1px solid #e0e0e0;border-radius:4px;padding:1rem;margin-bottom:1.5rem}.section-box.svelte-10ase3 h4:where(.svelte-10ase3){font-size:1.1rem;margin-bottom:.75rem;font-weight:600}.form-content .section-box{background:#f9f9f9;border:1px solid #e0e0e0;border-radius:4px;padding:1rem;margin-bottom:1.5rem}.form-content .section-box h4{font-size:1.1rem;margin-bottom:.75rem;font-weight:600}.form-content address{font-style:normal;line-height:1.6}.form-content dl{display:grid;grid-template-columns:max-content 1fr;gap:.5rem 1rem}.form-content dt{font-weight:600}.form-content dd{margin:0}dl.svelte-10ase3{display:grid;grid-template-columns:max-content 1fr;gap:.5rem 1rem}dt.svelte-10ase3{font-weight:600}dd.svelte-10ase3{margin:0}details.svelte-10ase3{margin-top:1rem}pre.svelte-10ase3{background:#f5f5f5;padding:1rem;border-radius:4px;overflow-x:auto}
|