feat: register specialists read pre-built JSON catalogs
Browse filesstep_nycha hung the FSM for 8+ minutes per query because
summary_for_point did 20 polygon×polygon intersections (5 nearest
developments × 4 layers) every time. Refactor to read pre-computed
exposure flags from data/registers/nycha.json — the bake script
already runs that math citywide once. Per-query work is haversine
+ dict lookup, sub-millisecond.
Same pattern for step_doe_schools (reads data/registers/schools.json,
~1ms). Hospitals have no pre-built catalog (~150 entries; would have
required a new build script + LLM-budget bake) so they read the
30 KB hospitals.geojson directly and sample the Cornerstone baked
rasters per hit (~10ms first call, sub-ms after).
Schema change for NYCHA per-query view: drop pct_inside_sandy_2012
and pct_in_dep_extreme_2080 floats (polygon-overlap percentages
weren't in the prebuilt catalog), replace with binary
inside_sandy_2012 + dep_*_class/dep_*_label to match the schools
and hospitals shape. NYCHA developments are now reported with
"centroid is inside Sandy zone" instead of "85% of footprint inside
Sandy zone." Honest given the data we actually have pre-computed.
Updated downstream consumers:
- app/fsm.py step_nycha result dict (n_inside_sandy_2012,
n_in_dep_extreme_2080)
- app/reconcile.py NYCHA briefing prompt (binary statements + DEP
depth class instead of pct interpolation)
- web/sveltekit/src/lib/client/registerAdapter.ts adaptNycha
(inundLabel(inside) instead of inundLabel(undefined, pct))
- web/sveltekit/src/routes/q/[queryId]/+page.svelte (step keys for
not-invoked rendering; map circle props for NYCHA dev pins)
web/main.py:_warm_caches no longer pre-loads the 91 MB Sandy
GeoJSON for NYCHA — the prebuilt JSON catalog has everything the
specialists need at boot.
Verified locally on 4 canonical addresses (Beach Channel, Coney
Island I, Carleton Manor, Pioneer St): all 3 register specialists
return real data in <100ms total, replacing what previously timed
out at 8+ min on the HF Space.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- app/fsm.py +2 -2
- app/reconcile.py +19 -15
- app/registers/_loader.py +69 -0
- app/registers/doe_schools.py +41 -28
- app/registers/doh_hospitals.py +43 -3
- app/registers/nycha.py +68 -45
- web/main.py +12 -8
- web/sveltekit/build/200.html +8 -8
- web/sveltekit/build/_app/immutable/chunks/{B-yumwKg.js → 3HH2ymBC.js} +1 -1
- web/sveltekit/build/_app/immutable/chunks/{BRRh3tKo.js → D30NfLoU.js} +1 -1
- web/sveltekit/build/_app/immutable/entry/{app.C74wsJjh.js → app.COZFJ2px.js} +2 -2
- web/sveltekit/build/_app/immutable/entry/start.CJsf30jm.js +1 -0
- web/sveltekit/build/_app/immutable/entry/start.D9d5J30B.js +0 -1
- web/sveltekit/build/_app/immutable/nodes/{0.WjwQ9Jo9.js → 0.C7EsZXea.js} +1 -1
- web/sveltekit/build/_app/immutable/nodes/{1.DFlTxVC8.js → 1.BfugAG4h.js} +1 -1
- web/sveltekit/build/_app/immutable/nodes/{2.jyZRUUOQ.js → 2._YbGDT13.js} +1 -1
- web/sveltekit/build/_app/immutable/nodes/{3.D-7M_E8S.js → 3.7DONSlfO.js} +1 -1
- web/sveltekit/build/_app/immutable/nodes/{4.ChLTC4vz.js → 4.D_QEjY63.js} +0 -0
- web/sveltekit/build/_app/version.json +1 -1
- web/sveltekit/build/index.html +9 -9
- web/sveltekit/build/q/sample.html +8 -8
- web/sveltekit/src/lib/client/registerAdapter.ts +6 -5
- web/sveltekit/src/routes/q/[queryId]/+page.svelte +7 -10
|
@@ -646,8 +646,8 @@ def step_nycha(state: State) -> State:
|
|
| 646 |
rec["ok"] = True
|
| 647 |
rec["result"] = {
|
| 648 |
"n_developments": s["n_developments"],
|
| 649 |
-
"
|
| 650 |
-
"
|
| 651 |
}
|
| 652 |
return state.update(nycha_developments=s, trace=trace)
|
| 653 |
except Exception as e:
|
|
|
|
| 646 |
rec["ok"] = True
|
| 647 |
rec["result"] = {
|
| 648 |
"n_developments": s["n_developments"],
|
| 649 |
+
"n_inside_sandy_2012": s["n_inside_sandy_2012"],
|
| 650 |
+
"n_in_dep_extreme_2080": s["n_in_dep_extreme_2080"],
|
| 651 |
}
|
| 652 |
return state.update(nycha_developments=s, trace=trace)
|
| 653 |
except Exception as e:
|
|
@@ -586,27 +586,31 @@ def build_documents(state: dict[str, Any]) -> list[dict]:
|
|
| 586 |
for d in nycha.get("developments", [])[:4]:
|
| 587 |
tds = d.get("tds_num")
|
| 588 |
body = [
|
| 589 |
-
"Source: NYC Open Data NYCHA Developments
|
| 590 |
-
"
|
| 591 |
-
"+ NYC DEP Stormwater Flood Maps + USGS 3DEP DEM.",
|
| 592 |
(f"NYCHA development {d.get('development')} (TDS {tds}, "
|
| 593 |
-
f"{d.get('borough')}),
|
| 594 |
-
f"{d.get('distance_m')} m from query."),
|
| 595 |
(f"Representative-point elevation {d.get('rep_elevation_m')} m, "
|
| 596 |
f"HAND {d.get('rep_hand_m')} m."),
|
| 597 |
-
(f"{d.get('pct_inside_sandy_2012')}% of footprint inside the "
|
| 598 |
-
"2012 Sandy Inundation Zone (empirical)."),
|
| 599 |
]
|
| 600 |
-
if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 601 |
body.append(
|
| 602 |
-
f"
|
| 603 |
-
"
|
| 604 |
-
|
| 605 |
-
|
| 606 |
-
if (d.get("pct_in_dep_moderate_2050") or 0) > 0:
|
| 607 |
body.append(
|
| 608 |
-
f"
|
| 609 |
-
"
|
| 610 |
docs.append(_doc_message(f"nycha_dev_{tds}", body))
|
| 611 |
|
| 612 |
schools = state.get("doe_schools")
|
|
|
|
| 586 |
for d in nycha.get("developments", [])[:4]:
|
| 587 |
tds = d.get("tds_num")
|
| 588 |
body = [
|
| 589 |
+
"Source: pre-computed from NYC Open Data NYCHA Developments "
|
| 590 |
+
"(phvi-damg) joined to NYC OEM Sandy 2012 Inundation Zone "
|
| 591 |
+
"(5xsi-dfpx) + NYC DEP Stormwater Flood Maps + USGS 3DEP DEM.",
|
| 592 |
(f"NYCHA development {d.get('development')} (TDS {tds}, "
|
| 593 |
+
f"{d.get('borough')}), {d.get('distance_m')} m from query."),
|
|
|
|
| 594 |
(f"Representative-point elevation {d.get('rep_elevation_m')} m, "
|
| 595 |
f"HAND {d.get('rep_hand_m')} m."),
|
|
|
|
|
|
|
| 596 |
]
|
| 597 |
+
if d.get("inside_sandy_2012"):
|
| 598 |
+
body.append(
|
| 599 |
+
"Centroid is inside the 2012 Sandy Inundation Zone "
|
| 600 |
+
"(empirical).")
|
| 601 |
+
else:
|
| 602 |
+
body.append(
|
| 603 |
+
"Centroid is outside the 2012 Sandy Inundation Zone.")
|
| 604 |
+
c2080 = d.get("dep_extreme_2080_class") or 0
|
| 605 |
+
if c2080 > 0:
|
| 606 |
body.append(
|
| 607 |
+
f"DEP Extreme-2080 scenario at this development: "
|
| 608 |
+
f"{d.get('dep_extreme_2080_label')} (depth class {c2080}).")
|
| 609 |
+
c2050 = d.get("dep_moderate_2050_class") or 0
|
| 610 |
+
if c2050 > 0:
|
|
|
|
| 611 |
body.append(
|
| 612 |
+
f"DEP Moderate-2050 scenario at this development: "
|
| 613 |
+
f"{d.get('dep_moderate_2050_label')} (depth class {c2050}).")
|
| 614 |
docs.append(_doc_message(f"nycha_dev_{tds}", body))
|
| 615 |
|
| 616 |
schools = state.get("doe_schools")
|
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Shared loader for pre-built register JSONs in data/registers/.
|
| 2 |
+
|
| 3 |
+
Each register specialist (`nycha`, `doe_schools`, `doh_hospitals`,
|
| 4 |
+
`mta_entrances`) has a pre-computed JSON catalog of every Tier 1-3
|
| 5 |
+
exposed asset. The catalog is built once by scripts/build_*_register.py
|
| 6 |
+
running the full polygon-overlap math; per-query specialists used to
|
| 7 |
+
recompute that math against multi-million-polygon GDB layers, which
|
| 8 |
+
on the HF Space CPU made `step_nycha` hang for minutes.
|
| 9 |
+
|
| 10 |
+
This module provides O(1) cached load + haversine-on-prebuilt-rows
|
| 11 |
+
nearest-N retrieval. Per-query latency drops from minutes to ~ms
|
| 12 |
+
without losing the exposure semantics — the per-asset flags
|
| 13 |
+
(snap.sandy, snap.dep[scen].depth_class, snap.microtopo) were already
|
| 14 |
+
computed during the bake.
|
| 15 |
+
|
| 16 |
+
Asset classes outside this catalog (truly unexposed assets, tier 0)
|
| 17 |
+
are intentionally not surfaced: a Carleton Manor query that returns
|
| 18 |
+
"no NYCHA developments at risk within 1 mi" is a more useful
|
| 19 |
+
result than "we found 5 inland NYCHA developments with 0% Sandy
|
| 20 |
+
overlap."
|
| 21 |
+
"""
|
| 22 |
+
from __future__ import annotations
|
| 23 |
+
|
| 24 |
+
import json
|
| 25 |
+
import math
|
| 26 |
+
from functools import lru_cache
|
| 27 |
+
from pathlib import Path
|
| 28 |
+
|
| 29 |
+
REGISTERS_DIR = Path(__file__).resolve().parents[2] / "data" / "registers"
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
@lru_cache(maxsize=8)
|
| 33 |
+
def load_register(asset_class: str) -> list[dict]:
|
| 34 |
+
"""Return the rows list from data/registers/<asset_class>.json. The
|
| 35 |
+
caller treats each row as opaque except for the lat/lon fields."""
|
| 36 |
+
p = REGISTERS_DIR / f"{asset_class}.json"
|
| 37 |
+
if not p.exists():
|
| 38 |
+
return []
|
| 39 |
+
with open(p) as f:
|
| 40 |
+
d = json.load(f)
|
| 41 |
+
return list(d.get("rows", []))
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
def haversine_m(lat1: float, lon1: float, lat2: float, lon2: float) -> float:
|
| 45 |
+
R = 6371000.0
|
| 46 |
+
p1, p2 = math.radians(lat1), math.radians(lat2)
|
| 47 |
+
dp = math.radians(lat2 - lat1); dl = math.radians(lon2 - lon1)
|
| 48 |
+
a = math.sin(dp / 2) ** 2 + math.cos(p1) * math.cos(p2) * math.sin(dl / 2) ** 2
|
| 49 |
+
return 2 * R * math.asin(math.sqrt(a))
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
def nearest_n(asset_class: str, lat: float, lon: float,
|
| 53 |
+
radius_m: float, n: int) -> list[tuple[float, dict]]:
|
| 54 |
+
"""Return up to N rows within radius_m of (lat, lon), sorted by
|
| 55 |
+
distance ascending. Each entry is (distance_m, row)."""
|
| 56 |
+
rows = load_register(asset_class)
|
| 57 |
+
if not rows:
|
| 58 |
+
return []
|
| 59 |
+
candidates: list[tuple[float, dict]] = []
|
| 60 |
+
for r in rows:
|
| 61 |
+
rlat = r.get("lat")
|
| 62 |
+
rlon = r.get("lon")
|
| 63 |
+
if rlat is None or rlon is None:
|
| 64 |
+
continue
|
| 65 |
+
d = haversine_m(lat, lon, float(rlat), float(rlon))
|
| 66 |
+
if d <= radius_m:
|
| 67 |
+
candidates.append((d, r))
|
| 68 |
+
candidates.sort(key=lambda t: t[0])
|
| 69 |
+
return candidates[:n]
|
|
@@ -127,38 +127,50 @@ def _dep_class(lat: float, lon: float, scenario: str):
|
|
| 127 |
def summary_for_point(lat: float, lon: float,
|
| 128 |
radius_m: float = DEFAULT_RADIUS_M,
|
| 129 |
max_schools: int = DEFAULT_MAX_PER_QUERY) -> dict:
|
| 130 |
-
|
| 131 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
return {"available": False,
|
| 133 |
"n_schools": 0,
|
| 134 |
"radius_m": radius_m,
|
| 135 |
"schools": []}
|
| 136 |
|
| 137 |
-
near = near.head(max_schools)
|
| 138 |
findings: list[SchoolFinding] = []
|
| 139 |
-
for
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
findings.append(SchoolFinding(
|
| 148 |
-
loc_code=str(row
|
| 149 |
-
loc_name=str(row
|
| 150 |
-
address=str(row
|
| 151 |
-
borough=
|
| 152 |
-
bin=str(row
|
| 153 |
-
bbl=str(row
|
| 154 |
-
managed_by=
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
inside_sandy_2012=in_sandy,
|
| 162 |
dep_extreme_2080_class=d80c,
|
| 163 |
dep_extreme_2080_label=d80l,
|
| 164 |
dep_moderate_2050_class=d50c,
|
|
@@ -176,9 +188,10 @@ def summary_for_point(lat: float, lon: float,
|
|
| 176 |
"n_inside_sandy_2012": n_in_sandy,
|
| 177 |
"n_in_dep_extreme_2080": n_dep_2080,
|
| 178 |
"schools": [vars(f) for f in findings],
|
| 179 |
-
"citation": ("NYC DOE Locations Points
|
| 180 |
-
"Inundation Zone (5xsi-dfpx) +
|
| 181 |
-
"Flood Maps + USGS 3DEP DEM"
|
|
|
|
| 182 |
}
|
| 183 |
|
| 184 |
|
|
|
|
| 127 |
def summary_for_point(lat: float, lon: float,
|
| 128 |
radius_m: float = DEFAULT_RADIUS_M,
|
| 129 |
max_schools: int = DEFAULT_MAX_PER_QUERY) -> dict:
|
| 130 |
+
"""N nearest tier-1-3 DOE schools to (lat, lon), with pre-computed
|
| 131 |
+
exposure flags read from data/registers/schools.json. The bake
|
| 132 |
+
script runs the buffered point-in-polygon math citywide once;
|
| 133 |
+
per-query work is haversine + dict lookup."""
|
| 134 |
+
from app.registers._loader import nearest_n
|
| 135 |
+
hits = nearest_n("schools", lat, lon, radius_m, max_schools)
|
| 136 |
+
if not hits:
|
| 137 |
return {"available": False,
|
| 138 |
"n_schools": 0,
|
| 139 |
"radius_m": radius_m,
|
| 140 |
"schools": []}
|
| 141 |
|
|
|
|
| 142 |
findings: list[SchoolFinding] = []
|
| 143 |
+
for distance_m, row in hits:
|
| 144 |
+
snap = row.get("snap") or {}
|
| 145 |
+
dep = snap.get("dep") or {}
|
| 146 |
+
microtopo = snap.get("microtopo") or {}
|
| 147 |
+
|
| 148 |
+
def _depth(scen: str) -> tuple[int | None, str | None]:
|
| 149 |
+
d = dep.get(scen) or {}
|
| 150 |
+
cls = d.get("depth_class")
|
| 151 |
+
lbl = d.get("depth_label")
|
| 152 |
+
return (int(cls) if cls is not None else None,
|
| 153 |
+
str(lbl) if lbl else None)
|
| 154 |
+
|
| 155 |
+
d80c, d80l = _depth("dep_extreme_2080")
|
| 156 |
+
d50c, d50l = _depth("dep_moderate_2050")
|
| 157 |
+
elev = microtopo.get("point_elev_m")
|
| 158 |
+
hand = microtopo.get("aoi_hand_m") or microtopo.get("hand_m")
|
| 159 |
+
|
| 160 |
findings.append(SchoolFinding(
|
| 161 |
+
loc_code=str(row.get("loc_code", "")),
|
| 162 |
+
loc_name=str(row.get("name", "")),
|
| 163 |
+
address=str(row.get("address", "")).strip(),
|
| 164 |
+
borough=str(row.get("borough", "")),
|
| 165 |
+
bin=str(row.get("bin", "")),
|
| 166 |
+
bbl=str(row.get("bbl", "")),
|
| 167 |
+
managed_by="DOE-managed",
|
| 168 |
+
school_lat=round(float(row["lat"]), 5),
|
| 169 |
+
school_lon=round(float(row["lon"]), 5),
|
| 170 |
+
distance_m=round(distance_m, 1),
|
| 171 |
+
elevation_m=round(float(elev), 2) if elev is not None else None,
|
| 172 |
+
hand_m=round(float(hand), 2) if hand is not None else None,
|
| 173 |
+
inside_sandy_2012=bool(snap.get("sandy")),
|
|
|
|
| 174 |
dep_extreme_2080_class=d80c,
|
| 175 |
dep_extreme_2080_label=d80l,
|
| 176 |
dep_moderate_2050_class=d50c,
|
|
|
|
| 188 |
"n_inside_sandy_2012": n_in_sandy,
|
| 189 |
"n_in_dep_extreme_2080": n_dep_2080,
|
| 190 |
"schools": [vars(f) for f in findings],
|
| 191 |
+
"citation": ("Pre-computed from NYC DOE Locations Points joined "
|
| 192 |
+
"to Sandy 2012 Inundation Zone (5xsi-dfpx) + "
|
| 193 |
+
"NYC DEP Stormwater Flood Maps + USGS 3DEP DEM. "
|
| 194 |
+
"See data/registers/schools.json."),
|
| 195 |
}
|
| 196 |
|
| 197 |
|
|
@@ -121,9 +121,49 @@ def _dep_class(lat: float, lon: float, scenario: str):
|
|
| 121 |
return dep_class_buffered(lat, lon, BUFFER_DOH_HOSPITAL_M, scenario)
|
| 122 |
|
| 123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
def summary_for_point(lat: float, lon: float,
|
| 125 |
radius_m: float = DEFAULT_RADIUS_M,
|
| 126 |
max_hospitals: int = DEFAULT_MAX_PER_QUERY) -> dict:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
near = _hospitals_near(lat, lon, radius_m)
|
| 128 |
if near.empty:
|
| 129 |
return {"available": False,
|
|
@@ -137,9 +177,9 @@ def summary_for_point(lat: float, lon: float,
|
|
| 137 |
hlat, hlon = float(row["lat"]), float(row["lon"])
|
| 138 |
elev = _sample_raster(DATA / "nyc_dem_30m.tif", hlat, hlon)
|
| 139 |
hand = _sample_raster(DATA / "hand.tif", hlat, hlon)
|
| 140 |
-
in_sandy =
|
| 141 |
-
d80c, d80l =
|
| 142 |
-
d50c, d50l =
|
| 143 |
findings.append(HospitalFinding(
|
| 144 |
fac_id=str(row["fac_id"]),
|
| 145 |
facility_name=str(row["facility_name"]),
|
|
|
|
| 121 |
return dep_class_buffered(lat, lon, BUFFER_DOH_HOSPITAL_M, scenario)
|
| 122 |
|
| 123 |
|
| 124 |
+
_DEPTH_LABEL = {
|
| 125 |
+
0: "outside",
|
| 126 |
+
1: "Nuisance (>4 in to 1 ft)",
|
| 127 |
+
2: "Deep & Contiguous (1-4 ft)",
|
| 128 |
+
3: "Deep Contiguous (>4 ft)",
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
def _exposure_at(lat: float, lon: float) -> tuple[bool, dict]:
|
| 133 |
+
"""Use baked Cornerstone rasters for fast per-point exposure lookup.
|
| 134 |
+
Returns (inside_sandy, {scen: (depth_class, depth_label)}). Falls
|
| 135 |
+
back to the legacy buffered GDB join if rasters absent."""
|
| 136 |
+
try:
|
| 137 |
+
import geopandas as gpd
|
| 138 |
+
from shapely.geometry import Point
|
| 139 |
+
|
| 140 |
+
from app.flood_layers import dep_stormwater, sandy_inundation
|
| 141 |
+
pt = (gpd.GeoDataFrame(geometry=[Point(lon, lat)], crs="EPSG:4326")
|
| 142 |
+
.to_crs("EPSG:2263").iloc[0].geometry)
|
| 143 |
+
in_sandy = sandy_inundation.inside_raster(pt)
|
| 144 |
+
deps = {}
|
| 145 |
+
for scen in ("dep_extreme_2080", "dep_moderate_2050"):
|
| 146 |
+
cls = dep_stormwater.join_raster(pt, scen)
|
| 147 |
+
deps[scen] = (cls, _DEPTH_LABEL.get(cls, "outside"))
|
| 148 |
+
return in_sandy, deps
|
| 149 |
+
except Exception:
|
| 150 |
+
log.exception("raster exposure lookup failed; falling back")
|
| 151 |
+
in_sandy = _inside_sandy(lat, lon)
|
| 152 |
+
d80c, d80l = _dep_class(lat, lon, "dep_extreme_2080")
|
| 153 |
+
d50c, d50l = _dep_class(lat, lon, "dep_moderate_2050")
|
| 154 |
+
return in_sandy, {
|
| 155 |
+
"dep_extreme_2080": (d80c, d80l),
|
| 156 |
+
"dep_moderate_2050": (d50c, d50l),
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
|
| 160 |
def summary_for_point(lat: float, lon: float,
|
| 161 |
radius_m: float = DEFAULT_RADIUS_M,
|
| 162 |
max_hospitals: int = DEFAULT_MAX_PER_QUERY) -> dict:
|
| 163 |
+
"""N nearest hospitals to (lat, lon), with exposure flags computed
|
| 164 |
+
via Cornerstone baked rasters. Hospitals have no pre-built register
|
| 165 |
+
(small enough at ~150 entries to not need one), so we read the
|
| 166 |
+
full GeoJSON and sample the rasters per-hit. Sub-ms per query."""
|
| 167 |
near = _hospitals_near(lat, lon, radius_m)
|
| 168 |
if near.empty:
|
| 169 |
return {"available": False,
|
|
|
|
| 177 |
hlat, hlon = float(row["lat"]), float(row["lon"])
|
| 178 |
elev = _sample_raster(DATA / "nyc_dem_30m.tif", hlat, hlon)
|
| 179 |
hand = _sample_raster(DATA / "hand.tif", hlat, hlon)
|
| 180 |
+
in_sandy, deps = _exposure_at(hlat, hlon)
|
| 181 |
+
d80c, d80l = deps["dep_extreme_2080"]
|
| 182 |
+
d50c, d50l = deps["dep_moderate_2050"]
|
| 183 |
findings.append(HospitalFinding(
|
| 184 |
fac_id=str(row["fac_id"]),
|
| 185 |
facility_name=str(row["facility_name"]),
|
|
@@ -59,13 +59,15 @@ class DevelopmentFinding:
|
|
| 59 |
centroid_lat: float
|
| 60 |
centroid_lon: float
|
| 61 |
distance_m: float
|
| 62 |
-
footprint_km2: float
|
| 63 |
rep_elevation_m: float | None
|
| 64 |
rep_hand_m: float | None
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
|
| 71 |
@lru_cache(maxsize=1)
|
|
@@ -192,64 +194,85 @@ def _dep_overlap(geom_2263, scenario: str) -> tuple[float, float]:
|
|
| 192 |
return pct_any, pct_deep
|
| 193 |
|
| 194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
def summary_for_point(lat: float, lon: float,
|
| 196 |
radius_m: float = DEFAULT_RADIUS_M,
|
| 197 |
max_developments: int = DEFAULT_MAX_PER_QUERY) -> dict:
|
| 198 |
-
|
| 199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 200 |
return {"available": False,
|
| 201 |
"n_developments": 0,
|
| 202 |
"radius_m": radius_m,
|
| 203 |
"developments": []}
|
| 204 |
|
| 205 |
-
near = near.head(max_developments)
|
| 206 |
-
sandy_2263 = _load_sandy_2263()
|
| 207 |
-
|
| 208 |
findings: list[DevelopmentFinding] = []
|
| 209 |
-
for
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
|
| 225 |
findings.append(DevelopmentFinding(
|
| 226 |
-
development=str(row
|
| 227 |
-
tds_num=str(row
|
| 228 |
-
borough=str(row
|
| 229 |
-
centroid_lat=round(float(row["
|
| 230 |
-
centroid_lon=round(float(row["
|
| 231 |
-
distance_m=round(
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
|
|
|
|
|
|
| 239 |
))
|
| 240 |
|
| 241 |
-
|
| 242 |
-
|
| 243 |
return {
|
| 244 |
"available": True,
|
| 245 |
"n_developments": len(findings),
|
| 246 |
"radius_m": radius_m,
|
| 247 |
-
"
|
| 248 |
-
"
|
| 249 |
"developments": [vars(f) for f in findings],
|
| 250 |
-
"citation": ("NYC Open Data NYCHA Developments
|
| 251 |
-
"
|
| 252 |
-
"NYC DEP Stormwater Flood Maps +
|
|
|
|
| 253 |
}
|
| 254 |
|
| 255 |
|
|
|
|
| 59 |
centroid_lat: float
|
| 60 |
centroid_lon: float
|
| 61 |
distance_m: float
|
|
|
|
| 62 |
rep_elevation_m: float | None
|
| 63 |
rep_hand_m: float | None
|
| 64 |
+
inside_sandy_2012: bool
|
| 65 |
+
dep_extreme_2080_class: int # 0=outside, 1/2/3 = depth class
|
| 66 |
+
dep_extreme_2080_label: str
|
| 67 |
+
dep_moderate_2050_class: int
|
| 68 |
+
dep_moderate_2050_label: str
|
| 69 |
+
dep_moderate_current_class: int
|
| 70 |
+
dep_moderate_current_label: str
|
| 71 |
|
| 72 |
|
| 73 |
@lru_cache(maxsize=1)
|
|
|
|
| 194 |
return pct_any, pct_deep
|
| 195 |
|
| 196 |
|
| 197 |
+
_DEPTH_LABEL = {
|
| 198 |
+
0: "outside",
|
| 199 |
+
1: "Nuisance (>4 in to 1 ft)",
|
| 200 |
+
2: "Deep & Contiguous (1-4 ft)",
|
| 201 |
+
3: "Deep Contiguous (>4 ft)",
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
|
| 205 |
def summary_for_point(lat: float, lon: float,
|
| 206 |
radius_m: float = DEFAULT_RADIUS_M,
|
| 207 |
max_developments: int = DEFAULT_MAX_PER_QUERY) -> dict:
|
| 208 |
+
"""Return the N nearest tier-1-3 NYCHA developments to (lat, lon)
|
| 209 |
+
within radius_m, with their pre-computed exposure flags from the
|
| 210 |
+
register catalog at data/registers/nycha.json.
|
| 211 |
+
|
| 212 |
+
The catalog is the source of truth for which developments are
|
| 213 |
+
flood-exposed (the bake script ran the polygon-overlap math once,
|
| 214 |
+
citywide). Per-query work is haversine + dict lookup — sub-ms even
|
| 215 |
+
on the HF Space CPU. Developments outside the tier-1-3 catalog
|
| 216 |
+
(truly unexposed inland sites) are intentionally not surfaced;
|
| 217 |
+
"no NYCHA developments at risk within 1 mi" is the honest answer
|
| 218 |
+
for low-exposure queries.
|
| 219 |
+
"""
|
| 220 |
+
from app.registers._loader import nearest_n
|
| 221 |
+
hits = nearest_n("nycha", lat, lon, radius_m, max_developments)
|
| 222 |
+
if not hits:
|
| 223 |
return {"available": False,
|
| 224 |
"n_developments": 0,
|
| 225 |
"radius_m": radius_m,
|
| 226 |
"developments": []}
|
| 227 |
|
|
|
|
|
|
|
|
|
|
| 228 |
findings: list[DevelopmentFinding] = []
|
| 229 |
+
for distance_m, row in hits:
|
| 230 |
+
snap = row.get("snap") or {}
|
| 231 |
+
dep = snap.get("dep") or {}
|
| 232 |
+
microtopo = snap.get("microtopo") or {}
|
| 233 |
+
|
| 234 |
+
def _dep_class(scen: str) -> int:
|
| 235 |
+
d = dep.get(scen) or {}
|
| 236 |
+
return int(d.get("depth_class") or 0)
|
| 237 |
+
|
| 238 |
+
c2080 = _dep_class("dep_extreme_2080")
|
| 239 |
+
c2050 = _dep_class("dep_moderate_2050")
|
| 240 |
+
ccur = _dep_class("dep_moderate_current")
|
| 241 |
+
|
| 242 |
+
elev = microtopo.get("point_elev_m")
|
| 243 |
+
hand = microtopo.get("aoi_hand_m") or microtopo.get("hand_m")
|
| 244 |
|
| 245 |
findings.append(DevelopmentFinding(
|
| 246 |
+
development=str(row.get("name", "")),
|
| 247 |
+
tds_num=str(row.get("tds_num", "")),
|
| 248 |
+
borough=str(row.get("borough", "")),
|
| 249 |
+
centroid_lat=round(float(row["lat"]), 5),
|
| 250 |
+
centroid_lon=round(float(row["lon"]), 5),
|
| 251 |
+
distance_m=round(distance_m, 1),
|
| 252 |
+
rep_elevation_m=round(float(elev), 2) if elev is not None else None,
|
| 253 |
+
rep_hand_m=round(float(hand), 2) if hand is not None else None,
|
| 254 |
+
inside_sandy_2012=bool(snap.get("sandy")),
|
| 255 |
+
dep_extreme_2080_class=c2080,
|
| 256 |
+
dep_extreme_2080_label=_DEPTH_LABEL.get(c2080, "outside"),
|
| 257 |
+
dep_moderate_2050_class=c2050,
|
| 258 |
+
dep_moderate_2050_label=_DEPTH_LABEL.get(c2050, "outside"),
|
| 259 |
+
dep_moderate_current_class=ccur,
|
| 260 |
+
dep_moderate_current_label=_DEPTH_LABEL.get(ccur, "outside"),
|
| 261 |
))
|
| 262 |
|
| 263 |
+
n_in_sandy = sum(1 for f in findings if f.inside_sandy_2012)
|
| 264 |
+
n_in_2080 = sum(1 for f in findings if f.dep_extreme_2080_class > 0)
|
| 265 |
return {
|
| 266 |
"available": True,
|
| 267 |
"n_developments": len(findings),
|
| 268 |
"radius_m": radius_m,
|
| 269 |
+
"n_inside_sandy_2012": n_in_sandy,
|
| 270 |
+
"n_in_dep_extreme_2080": n_in_2080,
|
| 271 |
"developments": [vars(f) for f in findings],
|
| 272 |
+
"citation": ("Pre-computed from NYC Open Data NYCHA Developments "
|
| 273 |
+
"(phvi-damg) joined to Sandy 2012 Inundation Zone "
|
| 274 |
+
"(5xsi-dfpx) + NYC DEP Stormwater Flood Maps + "
|
| 275 |
+
"USGS 3DEP DEM. See data/registers/nycha.json."),
|
| 276 |
}
|
| 277 |
|
| 278 |
|
|
@@ -145,18 +145,22 @@ def _warm_caches():
|
|
| 145 |
dep_stormwater.load(scen)
|
| 146 |
print("[startup] flood layers ready", flush=True)
|
| 147 |
if os.environ.get("RIPRAP_NYCHA_REGISTERS", "0").lower() in ("1", "true", "yes"):
|
| 148 |
-
print("[startup] pre-
|
| 149 |
try:
|
| 150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 151 |
from app.registers import doh_hospitals as _r_hospitals
|
| 152 |
-
from app.registers import nycha as _r_nycha
|
| 153 |
-
_r_nycha._load_nycha()
|
| 154 |
-
_r_nycha._load_sandy_2263()
|
| 155 |
-
_r_schools._load_schools()
|
| 156 |
_r_hospitals._load_hospitals()
|
| 157 |
-
print("[startup]
|
| 158 |
except Exception as _e:
|
| 159 |
-
print(f"[startup]
|
| 160 |
print("[startup] warming RAG (Granite Embedding 278M + 5 PDFs)...", flush=True)
|
| 161 |
# RAG warm loads sentence-transformers, which on some HF Space rebuilds
|
| 162 |
# has hit transformers-lazy-import edge cases (CodeCarbonCallback). The
|
|
|
|
| 145 |
dep_stormwater.load(scen)
|
| 146 |
print("[startup] flood layers ready", flush=True)
|
| 147 |
if os.environ.get("RIPRAP_NYCHA_REGISTERS", "0").lower() in ("1", "true", "yes"):
|
| 148 |
+
print("[startup] pre-loading register catalogs...", flush=True)
|
| 149 |
try:
|
| 150 |
+
# NYCHA + DOE schools read from pre-built JSON catalogs at
|
| 151 |
+
# data/registers/{nycha,schools}.json — sub-ms per query.
|
| 152 |
+
from app.registers._loader import load_register
|
| 153 |
+
n_nycha = len(load_register("nycha"))
|
| 154 |
+
n_schools = len(load_register("schools"))
|
| 155 |
+
print(f"[startup] catalogs ready: nycha={n_nycha} rows, "
|
| 156 |
+
f"schools={n_schools} rows", flush=True)
|
| 157 |
+
# DOH hospitals has no pre-built catalog (~150 entries; we
|
| 158 |
+
# read the GeoJSON directly and sample baked rasters per hit).
|
| 159 |
from app.registers import doh_hospitals as _r_hospitals
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
_r_hospitals._load_hospitals()
|
| 161 |
+
print("[startup] hospitals geojson loaded", flush=True)
|
| 162 |
except Exception as _e:
|
| 163 |
+
print(f"[startup] register warm failed (non-fatal): {_e}", flush=True)
|
| 164 |
print("[startup] warming RAG (Granite Embedding 278M + 5 PDFs)...", flush=True)
|
| 165 |
# RAG warm loads sentence-transformers, which on some HF Space rebuilds
|
| 166 |
# has hit transformers-lazy-import edge cases (CodeCarbonCallback). The
|
|
@@ -6,17 +6,17 @@
|
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 7 |
<meta name="description" content="Riprap — citation-grounded NYC flood-exposure briefings." />
|
| 8 |
<title>Riprap — flood-exposure briefing</title>
|
| 9 |
-
<link href="/_app/immutable/entry/start.
|
| 10 |
-
<link href="/_app/immutable/chunks/
|
| 11 |
<link href="/_app/immutable/chunks/BTUA7_xE.js" rel="modulepreload">
|
| 12 |
-
<link href="/_app/immutable/entry/app.
|
| 13 |
<link href="/_app/immutable/chunks/CXQd8Y6F.js" rel="modulepreload">
|
| 14 |
<link href="/_app/immutable/chunks/CWw6qgC_.js" rel="modulepreload">
|
| 15 |
<link href="/_app/immutable/chunks/Bd-v_9Ud.js" rel="modulepreload">
|
| 16 |
<link href="/_app/immutable/chunks/CW0zSL4D.js" rel="modulepreload">
|
| 17 |
-
<link href="/_app/immutable/nodes/0.
|
| 18 |
<link href="/_app/immutable/chunks/DxQlA7U2.js" rel="modulepreload">
|
| 19 |
-
<link href="/_app/immutable/chunks/
|
| 20 |
<link href="/_app/immutable/chunks/DCD6_LXk.js" rel="modulepreload">
|
| 21 |
<link href="/_app/immutable/chunks/B0XoTt7U.js" rel="modulepreload">
|
| 22 |
<link href="/_app/immutable/chunks/DixtWtwq.js" rel="modulepreload">
|
|
@@ -28,15 +28,15 @@
|
|
| 28 |
<div style="display: contents">
|
| 29 |
<script>
|
| 30 |
{
|
| 31 |
-
|
| 32 |
base: ""
|
| 33 |
};
|
| 34 |
|
| 35 |
const element = document.currentScript.parentElement;
|
| 36 |
|
| 37 |
Promise.all([
|
| 38 |
-
import("/_app/immutable/entry/start.
|
| 39 |
-
import("/_app/immutable/entry/app.
|
| 40 |
]).then(([kit, app]) => {
|
| 41 |
kit.start(app, element);
|
| 42 |
});
|
|
|
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 7 |
<meta name="description" content="Riprap — citation-grounded NYC flood-exposure briefings." />
|
| 8 |
<title>Riprap — flood-exposure briefing</title>
|
| 9 |
+
<link href="/_app/immutable/entry/start.CJsf30jm.js" rel="modulepreload">
|
| 10 |
+
<link href="/_app/immutable/chunks/D30NfLoU.js" rel="modulepreload">
|
| 11 |
<link href="/_app/immutable/chunks/BTUA7_xE.js" rel="modulepreload">
|
| 12 |
+
<link href="/_app/immutable/entry/app.COZFJ2px.js" rel="modulepreload">
|
| 13 |
<link href="/_app/immutable/chunks/CXQd8Y6F.js" rel="modulepreload">
|
| 14 |
<link href="/_app/immutable/chunks/CWw6qgC_.js" rel="modulepreload">
|
| 15 |
<link href="/_app/immutable/chunks/Bd-v_9Ud.js" rel="modulepreload">
|
| 16 |
<link href="/_app/immutable/chunks/CW0zSL4D.js" rel="modulepreload">
|
| 17 |
+
<link href="/_app/immutable/nodes/0.C7EsZXea.js" rel="modulepreload">
|
| 18 |
<link href="/_app/immutable/chunks/DxQlA7U2.js" rel="modulepreload">
|
| 19 |
+
<link href="/_app/immutable/chunks/3HH2ymBC.js" rel="modulepreload">
|
| 20 |
<link href="/_app/immutable/chunks/DCD6_LXk.js" rel="modulepreload">
|
| 21 |
<link href="/_app/immutable/chunks/B0XoTt7U.js" rel="modulepreload">
|
| 22 |
<link href="/_app/immutable/chunks/DixtWtwq.js" rel="modulepreload">
|
|
|
|
| 28 |
<div style="display: contents">
|
| 29 |
<script>
|
| 30 |
{
|
| 31 |
+
__sveltekit_whg5iw = {
|
| 32 |
base: ""
|
| 33 |
};
|
| 34 |
|
| 35 |
const element = document.currentScript.parentElement;
|
| 36 |
|
| 37 |
Promise.all([
|
| 38 |
+
import("/_app/immutable/entry/start.CJsf30jm.js"),
|
| 39 |
+
import("/_app/immutable/entry/app.COZFJ2px.js")
|
| 40 |
]).then(([kit, app]) => {
|
| 41 |
kit.start(app, element);
|
| 42 |
});
|
|
@@ -1 +1 @@
|
|
| 1 |
-
import{s as e,p as r}from"./
|
|
|
|
| 1 |
+
import{s as e,p as r}from"./D30NfLoU.js";const t={get error(){return r.error},get params(){return r.params},get status(){return r.status},get url(){return r.url}};e.updated.check;const a=t;export{a as p};
|
|
@@ -1 +1 @@
|
|
| 1 |
-
var rt=e=>{throw TypeError(e)};var Dt=(e,t,n)=>t.has(e)||rt("Cannot "+n);var y=(e,t,n)=>(Dt(e,t,"read from private field"),n?n.call(e):t.get(e)),A=(e,t,n)=>t.has(e)?rt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);import{bf as Pe,bg as Vt,ai as at,a4 as T,o as I,a5 as O,ar as we,bh as Bt}from"./BTUA7_xE.js";const M=[];function Ke(e,t=Pe){let n=null;const a=new Set;function r(o){if(Vt(e,o)&&(e=o,n)){const l=!M.length;for(const c of a)c[1](),M.push(c,e);if(l){for(let c=0;c<M.length;c+=2)M[c][0](M[c+1]);M.length=0}}}function i(o){r(o(e))}function s(o,l=Pe){const c=[o,l];return a.add(c),a.size===1&&(n=t(r,i)||Pe),o(e),()=>{a.delete(c),a.size===0&&n&&(n(),n=null)}}return{set:r,update:i,subscribe:s}}class Me{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class ze{constructor(t,n){try{new Headers({location:n})}catch{throw new Error(`Invalid redirect location ${JSON.stringify(n)}: this string contains characters that cannot be used in HTTP headers`)}this.status=t,this.location=n}}class Fe extends Error{constructor(t,n,a){super(a),this.status=t,this.text=n}}new URL("sveltekit-internal://");function Kt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function Mt(e){return e.split("%25").map(decodeURI).join("%25")}function zt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function $e({href:e}){return e.split("#")[0]}function C(){}function Ft(...e){let t=5381;for(const n of e)if(typeof n=="string"){let a=n.length;for(;a;)t=t*33^n.charCodeAt(--a)}else if(ArrayBuffer.isView(n)){const a=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let r=a.length;for(;r;)t=t*33^a[--r]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;function Gt(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return n}const Ht=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:(t==null?void 0:t.method)||"GET")!=="GET"&&X.delete(Ge(e)),Ht(e,t));const X=new Map;function Wt(e,t){const n=Ge(e,t),a=document.querySelector(n);if(a!=null&&a.textContent){a.remove();let{body:r,...i}=JSON.parse(a.textContent);const s=a.getAttribute("data-ttl");return s&&X.set(n,{body:r,init:i,ttl:1e3*Number(s)}),a.getAttribute("data-b64")!==null&&(r=Gt(r)),Promise.resolve(new Response(r,i))}return window.fetch(e,t)}function Jt(e,t,n){if(X.size>0){const a=Ge(e,n),r=X.get(a);if(r){if(performance.now()<r.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(r.body,r.init);X.delete(a)}}return window.fetch(t,n)}function Ge(e,t){let a=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t!=null&&t.headers||t!=null&&t.body){const r=[];t.headers&&r.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&r.push(t.body),a+=`[data-hash="${Ft(...r)}"]`}return a}const Yt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Xt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Zt(e).map(a=>{const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(r)return t.push({name:r[1],matcher:r[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const s=a.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return Ce(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return Ce(String.fromCharCode(...l.slice(2).split("-").map(m=>parseInt(m,16))));const d=Yt.exec(l),[,u,w,p,f]=d;return t.push({name:p,matcher:f,optional:!!u,rest:!!w,chained:w?c===1&&s[0]==="":!1}),w?"([^]*?)":u?"([^/]*)?":"([^/]+?)"}return Ce(l)}).join("")}).join("")}/?$`),params:t}}function Qt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Zt(e){return e.slice(1).split("/").filter(Qt)}function en(e,t,n){const a={},r=e.slice(1),i=r.filter(o=>o!==void 0);let s=0;for(let o=0;o<t.length;o+=1){const l=t[o];let c=r[o-s];if(l.chained&&l.rest&&s&&(c=r.slice(o-s,o+1).filter(d=>d).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){a[l.name]=c;const d=t[o+1],u=r[o+1];d&&!d.rest&&d.optional&&u&&l.chained&&(s=0),!d&&!u&&Object.keys(a).length===i.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return a}function Ce(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function tn({nodes:e,server_loads:t,dictionary:n,matchers:a}){const r=new Set(t);return Object.entries(n).map(([o,[l,c,d]])=>{const{pattern:u,params:w}=Xt(o),p={id:o,exec:f=>{const m=u.exec(f);if(m)return en(m,w,a)},errors:[1,...d||[]].map(f=>e[f]),layouts:[0,...c||[]].map(s),leaf:i(l)};return p.errors.length=p.layouts.length=Math.max(p.errors.length,p.layouts.length),p});function i(o){const l=o<0;return l&&(o=~o),[l,e[o]]}function s(o){return o===void 0?o:[r.has(o),e[o]]}}function wt(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function ot(e,t,n=JSON.stringify){const a=n(t);try{sessionStorage[e]=a}catch{}}var ht;const U=((ht=globalThis.__sveltekit_yivtrn)==null?void 0:ht.base)??"";var pt;const nn=((pt=globalThis.__sveltekit_yivtrn)==null?void 0:pt.assets)??U??"",rn="1778242964734",vt="sveltekit:snapshot",yt="sveltekit:scroll",bt="sveltekit:states",an="sveltekit:pageurl",F="sveltekit:history",Z="sveltekit:navigation",D={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Ue=location.origin;function He(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function B(){return{x:pageXOffset,y:pageYOffset}}function z(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const st={...D,"":D.hover};function kt(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function St(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=kt(e)}}function qe(e,t,n){let a;try{if(a=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&a.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";a.hash=`#${o}${a.hash}`}}catch{}const r=e instanceof SVGAElement?e.target.baseVal:e.target,i=!a||!!r||Ae(a,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=(a==null?void 0:a.origin)===Ue&&e.hasAttribute("download");return{url:a,external:i,target:r,download:s}}function ve(e){let t=null,n=null,a=null,r=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)a===null&&(a=z(o,"preload-code")),r===null&&(r=z(o,"preload-data")),t===null&&(t=z(o,"keepfocus")),n===null&&(n=z(o,"noscroll")),i===null&&(i=z(o,"reload")),s===null&&(s=z(o,"replacestate")),o=kt(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:st[a??"off"],preload_data:st[r??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function it(e){const t=Ke(e);let n=!0;function a(){n=!0,t.update(s=>s)}function r(s){n=!1,t.set(s)}function i(s){let o;return t.subscribe(l=>{(o===void 0||n&&l!==o)&&s(o=l)})}return{notify:a,set:r,subscribe:i}}const Et={v:C};function on(){const{set:e,subscribe:t}=Ke(!1);let n;async function a(){clearTimeout(n);try{const r=await fetch(`${nn}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const s=(await r.json()).version!==rn;return s&&(e(!0),Et.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:a}}function Ae(e,t,n){return e.origin!==Ue||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Pn(e){}const Rt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...Rt];const sn=new Set([...Rt]);[...sn];function ln(e){return e.filter(t=>t!=null)}function me(e,t){return e+"/"+t}function We(e){return e instanceof Me||e instanceof Fe?e.status:500}function cn(e){return e instanceof Fe?e.text:"Internal Error"}let R,ee,je;const fn=at.toString().includes("$$")||/function \w+\(\) \{\}/.test(at.toString()),lt="a:";var oe,se,ie,le,ce,fe,ue,de,gt,he,mt,pe,_t;fn?(R={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(lt)},ee={current:null},je={current:!1}):(R=new(gt=class{constructor(){A(this,oe,T({}));A(this,se,T(null));A(this,ie,T(null));A(this,le,T({}));A(this,ce,T({id:null}));A(this,fe,T({}));A(this,ue,T(-1));A(this,de,T(new URL(lt)))}get data(){return I(y(this,oe))}set data(t){O(y(this,oe),t)}get form(){return I(y(this,se))}set form(t){O(y(this,se),t)}get error(){return I(y(this,ie))}set error(t){O(y(this,ie),t)}get params(){return I(y(this,le))}set params(t){O(y(this,le),t)}get route(){return I(y(this,ce))}set route(t){O(y(this,ce),t)}get state(){return I(y(this,fe))}set state(t){O(y(this,fe),t)}get status(){return I(y(this,ue))}set status(t){O(y(this,ue),t)}get url(){return I(y(this,de))}set url(t){O(y(this,de),t)}},oe=new WeakMap,se=new WeakMap,ie=new WeakMap,le=new WeakMap,ce=new WeakMap,fe=new WeakMap,ue=new WeakMap,de=new WeakMap,gt),ee=new(mt=class{constructor(){A(this,he,T(null))}get current(){return I(y(this,he))}set current(t){O(y(this,he),t)}},he=new WeakMap,mt),je=new(_t=class{constructor(){A(this,pe,T(!1))}get current(){return I(y(this,pe))}set current(t){O(y(this,pe),t)}},pe=new WeakMap,_t),Et.v=()=>je.current=!0);function un(e){Object.assign(R,e)}const dn=new Set(["icon","shortcut icon","apple-touch-icon"]);let J=null;const N=wt(yt)??{},te=wt(vt)??{},j={url:it({}),page:it({}),navigating:Ke(null),updated:on()};function Je(e){N[e]=B()}function hn(e,t){let n=e+1;for(;N[n];)delete N[n],n+=1;for(n=t+1;te[n];)delete te[n],n+=1}function ne(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(C)}async function xt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(U||"/");e&&await e.update()}}let Ye,De,ye,P,Ve,S;const be=[],ke=[];let v=null;function Se(){var e;(e=v==null?void 0:v.fork)==null||e.then(t=>t==null?void 0:t.discard()),v=null}const _e=new Map,Lt=new Set,pn=new Set,Q=new Set;let _={branch:[],error:null,url:null},Ut=!1,Ee=!1,ct=!0,re=!1,Y=!1,At=!1,Xe=!1,Tt,k,L,V;const Re=new Set,ft=new Map,ut=new Map;async function Nn(e,t,n){var i,s,o,l;globalThis.__sveltekit_yivtrn&&(globalThis.__sveltekit_yivtrn.query,globalThis.__sveltekit_yivtrn.prerender),document.URL!==location.href&&(location.href=location.href),S=e,await((s=(i=e.hooks).init)==null?void 0:s.call(i)),Ye=tn(e),P=document.documentElement,Ve=t,De=e.nodes[0],ye=e.nodes[1],De(),ye(),k=(o=history.state)==null?void 0:o[F],L=(l=history.state)==null?void 0:l[Z],k||(k=L=Date.now(),history.replaceState({...history.state,[F]:k,[Z]:L},""));const a=N[k];function r(){a&&(history.scrollRestoration="manual",scrollTo(a.x,a.y))}n?(r(),await Ln(Ve,n)):(await G({type:"enter",url:He(S.hash?Tn(new URL(location.href)):location.href),replace_state:!0}),r()),xn()}function gn(){be.length=0,Xe=!1}function It(e){ke.some(t=>t==null?void 0:t.snapshot)&&(te[e]=ke.map(t=>{var n;return(n=t==null?void 0:t.snapshot)==null?void 0:n.capture()}))}function Ot(e){var t;(t=te[e])==null||t.forEach((n,a)=>{var r,i;(i=(r=ke[a])==null?void 0:r.snapshot)==null||i.restore(n)})}function dt(){Je(k),ot(yt,N),It(L),ot(vt,te)}async function Pt(e,t,n,a){let r,i;t.invalidateAll&&Se(),await G({type:"goto",url:He(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:a,accept:()=>{if(t.invalidateAll){Xe=!0,r=new Set;for(const[s,o]of ft)for(const l of o.keys())r.add(me(s,l));i=new Set;for(const[s,o]of ut)for(const l of o.keys())i.add(me(s,l))}t.invalidate&&t.invalidate.forEach(Rn)}}),t.invalidateAll&&we().then(we).then(()=>{for(const[s,o]of ft)for(const[l,{resource:c}]of o)r!=null&&r.has(me(s,l))&&c.refresh();for(const[s,o]of ut)for(const[l,{resource:c}]of o)i!=null&&i.has(me(s,l))&&c.reconnect()})}async function mn(e){if(e.id!==(v==null?void 0:v.id)){Se();const t={};Re.add(t),v={id:e.id,token:t,promise:Ct({...e,preload:t}).then(n=>(Re.delete(t),n.type==="loaded"&&n.state.error&&Se(),n)),fork:null}}return v.promise}async function Ne(e){var n;const t=(n=await Te(e,!1))==null?void 0:n.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(a=>a[1]()))}async function $t(e,t,n){var i;const a={params:_.params,route:{id:((i=_.route)==null?void 0:i.id)??null},url:new URL(location.href)};_={...e.state,nav:a};const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(R,e.props.page),Tt=new S.root({target:t,props:{...e.props,stores:j,components:ke},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),Ot(L),n){const s={from:null,to:{...a,scroll:N[k]??B()},willUnload:!1,type:"enter",complete:Promise.resolve()};Q.forEach(o=>o(s))}Ee=!0}async function xe({url:e,params:t,branch:n,errors:a,status:r,error:i,route:s,form:o}){let l="never";if(U&&(e.pathname===U||e.pathname===U+"/"))l="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(l=f.slash);e.pathname=Kt(e.pathname,l),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:i,route:s},props:{constructors:ln(n).map(f=>f.node.component),page:nt(R)}};o!==void 0&&(c.props.form=o);let d={},u=!R,w=0;for(let f=0;f<Math.max(n.length,_.branch.length);f+=1){const m=n[f],h=_.branch[f];(m==null?void 0:m.data)!==(h==null?void 0:h.data)&&(u=!0),m&&(d={...d,...m.data},u&&(c.props[`data_${w}`]=d),w+=1)}return(!_.url||e.href!==_.url.href||_.error!==i||o!==void 0&&o!==R.form||u)&&(c.props.page={error:i,params:t,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(e),form:o??null,data:u?d:R.data}),c}async function Qe({loader:e,parent:t,url:n,params:a,route:r,server_data_node:i}){var c,d;let s=null;const o={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();return{node:l,loader:e,server:i,universal:(c=l.universal)!=null&&c.load?{type:"data",data:s,uses:o}:null,data:s??(i==null?void 0:i.data)??null,slash:((d=l.universal)==null?void 0:d.trailingSlash)??(i==null?void 0:i.slash)}}function _n(e,t,n){let a=e instanceof Request?e.url:e;const r=new URL(a,n);r.origin===n.origin&&(a=r.href.slice(n.origin.length));const i=Ee?Jt(a,r.href,t):Wt(a,t);return{resolved:r,promise:i}}function wn(e,t,n,a,r,i){if(Xe)return!0;if(!r)return!1;if(r.parent&&e||r.route&&t||r.url&&n)return!0;for(const s of r.search_params)if(a.has(s))return!0;for(const s of r.params)if(i[s]!==_.params[s])return!0;for(const s of r.dependencies)if(be.some(o=>o(new URL(s))))return!0;return!1}function Ze(e,t){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?t??null:null}function vn(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const a of n){const r=e.searchParams.getAll(a),i=t.searchParams.getAll(a);r.every(s=>i.includes(s))&&i.every(s=>r.includes(s))&&n.delete(a)}return n}function yn({error:e,url:t,route:n,params:a}){return{type:"loaded",state:{error:e,url:t,route:n,params:a,branch:[]},props:{page:nt(R),constructors:[]}}}async function Ct({id:e,invalidating:t,url:n,params:a,route:r,preload:i}){if((v==null?void 0:v.id)===e)return Re.delete(v.token),v.promise;const{errors:s,layouts:o,leaf:l}=r,c=[...o,l];s.forEach(h=>h==null?void 0:h().catch(C)),c.forEach(h=>h==null?void 0:h[1]().catch(C));const d=_.url?e!==Le(_.url):!1,u=_.route?r.id!==_.route.id:!1,w=vn(_.url,n);let p=!1;const f=c.map(async(h,g)=>{var $;if(!h)return;const b=_.branch[g];return h[1]===(b==null?void 0:b.loader)&&!wn(p,u,d,w,($=b.universal)==null?void 0:$.uses,a)?b:(p=!0,Qe({loader:h[1],url:n,params:a,route:r,parent:async()=>{var ge;const q={};for(let K=0;K<g;K+=1)Object.assign(q,(ge=await f[K])==null?void 0:ge.data);return q},server_data_node:Ze(h[0]?{type:"skip"}:null,h[0]?b==null?void 0:b.server:void 0)}))});for(const h of f)h.catch(C);const m=[];for(let h=0;h<c.length;h+=1)if(c[h])try{m.push(await f[h])}catch(g){if(g instanceof ze)return{type:"redirect",location:g.location};if(Re.has(i))return yn({error:await ae(g,{params:a,url:n,route:{id:r.id}}),url:n,params:a,route:r});let b=We(g),x;if(g instanceof Me)x=g.body;else{if(await j.updated.check())return await xt(),await ne(n);x=await ae(g,{params:a,url:n,route:{id:r.id}})}const $=await bn(h,m,s);return $?xe({url:n,params:a,branch:m.slice(0,$.idx).concat($.node),errors:s,status:b,error:x,route:r}):await Nt(n,{id:r.id},x,b)}else m.push(void 0);return xe({url:n,params:a,branch:m,errors:s,status:200,error:null,route:r,form:t?void 0:null})}async function bn(e,t,n){for(;e--;)if(n[e]){let a=e;for(;!t[a];)a-=1;try{return{idx:a+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function et({status:e,error:t,url:n,route:a}){const r={};let i=null;try{const s=await Qe({loader:De,url:n,params:r,route:a,parent:()=>Promise.resolve({}),server_data_node:Ze(i)}),o={node:await ye(),loader:ye,universal:null,server:null,data:null};return xe({url:n,params:r,branch:[s,o],status:e,error:t,errors:[],route:null})}catch(s){if(s instanceof ze)return Pt(new URL(s.location,location.href),{},0);throw s}}async function kn(e){const t=e.href;if(_e.has(t))return _e.get(t);let n;try{const a=(async()=>{let r=await S.hooks.reroute({url:new URL(e),fetch:async(i,s)=>_n(i,s,e).promise})??e;if(typeof r=="string"){const i=new URL(e);S.hash?i.hash=r:i.pathname=r,r=i}return r})();_e.set(t,a),n=await a}catch{_e.delete(t);return}return n}async function Te(e,t){if(e&&!Ae(e,U,S.hash)){const n=await kn(e);if(!n)return;const a=Sn(n);for(const r of Ye){const i=r.exec(a);if(i)return{id:Le(e),invalidating:t,route:r,params:zt(i),url:e}}}}function Sn(e){return Mt(S.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(U.length))||"/"}function Le(e){return(S.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function jt({url:e,type:t,intent:n,delta:a,event:r,scroll:i}){let s=!1;const o=tt(_,n,e,t,i??null);a!==void 0&&(o.navigation.delta=a),r!==void 0&&(o.navigation.event=r);const l={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return re||Lt.forEach(c=>c(l)),s?null:o}async function G({type:e,url:t,popped:n,keepfocus:a,noscroll:r,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=C,block:d=C,event:u}){var K;const w=V;V=l;const p=await Te(t,!1),f=e==="enter"?tt(_,p,t,e):jt({url:t,type:e,delta:n==null?void 0:n.delta,intent:p,scroll:n==null?void 0:n.scroll,event:u});if(!f){d(),V===l&&(V=w);return}const m=k,h=L;c(),re=!0,Ee&&f.navigation.type!=="enter"&&j.navigating.set(ee.current=f.navigation);let g=p&&await Ct(p);if(!g){if(Ae(t,U,S.hash))return await ne(t,i);g=await Nt(t,{id:null},await ae(new Fe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=(p==null?void 0:p.url)||t,V!==l)return f.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(o<20){await G({type:e,url:new URL(g.location,t),popped:n,keepfocus:a,noscroll:r,replace_state:i,state:s,redirect_count:o+1,nav_token:l}),f.fulfil(void 0);return}g=await et({status:500,error:await ae(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await j.updated.check()&&(await xt(),await ne(t,i));if(gn(),Je(m),It(h),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const E=i?0:1,H={[F]:k+=E,[Z]:L+=E,[bt]:s};(i?history.replaceState:history.pushState).call(history,H,"",t),i||hn(k,L)}const b=p&&(v==null?void 0:v.id)===p.id?v.fork:null;v!=null&&v.fork&&!b&&Se(),v=null,g.props.page.state=s;let x;if(Ee){const E=(await Promise.all(Array.from(pn,W=>W(f.navigation)))).filter(W=>typeof W=="function");if(E.length>0){let W=function(){E.forEach(Oe=>{Q.delete(Oe)})};E.push(W),E.forEach(Oe=>{Q.add(Oe)})}const H=f.navigation.to;_={...g.state,nav:{params:H.params,route:H.route,url:H.url}},g.props.page&&(g.props.page.url=t);const Ie=b&&await b;Ie?x=Ie.commit():(J=null,Tt.$set(g.props),J&&Object.assign(g.props.page,J),un(g.props.page),x=(K=Bt)==null?void 0:K()),At=!0}else await $t(g,Ve,!1);const{activeElement:$}=document;await x,await we(),await we();let q=null;if(ct){const E=n?n.scroll:r?B():null;E?scrollTo(E.x,E.y):(q=t.hash&&document.getElementById(qt(t)))?q.scrollIntoView():scrollTo(0,0)}const ge=document.activeElement!==$&&document.activeElement!==document.body;!a&&!ge&&An(t,!q),ct=!0,g.props.page&&(J&&Object.assign(g.props.page,J),Object.assign(R,g.props.page)),re=!1,e==="popstate"&&Ot(L),f.fulfil(void 0),f.navigation.to&&(f.navigation.to.scroll=B()),Q.forEach(E=>E(f.navigation)),j.navigating.set(ee.current=null)}async function Nt(e,t,n,a,r){return e.origin===Ue&&e.pathname===location.pathname&&!Ut?await et({status:a,error:n,url:e,route:t}):await ne(e,r)}function En(){let e,t={element:void 0,href:void 0},n;P.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(e),e=setTimeout(()=>{i(l,D.hover)},20)});function a(o){o.defaultPrevented||i(o.composedPath()[0],D.tap)}P.addEventListener("mousedown",a),P.addEventListener("touchstart",a,{passive:!0});const r=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(Ne(new URL(l.target.href)),r.unobserve(l.target))},{threshold:0});async function i(o,l){const c=St(o,P),d=c===t.element&&(c==null?void 0:c.href)===t.href&&l>=n;if(!c||d)return;const{url:u,external:w,download:p}=qe(c,U,S.hash);if(w||p)return;const f=ve(c),m=u&&Le(_.url)===Le(u);if(!(f.reload||m))if(l<=f.preload_data){t={element:c,href:c.href},n=D.tap;const h=await Te(u,!1);if(!h)return;mn(h)}else l<=f.preload_code&&(t={element:c,href:c.href},n=l,Ne(u))}function s(){r.disconnect();for(const o of P.querySelectorAll("a")){const{url:l,external:c,download:d}=qe(o,U,S.hash);if(c||d)continue;const u=ve(o);u.reload||(u.preload_code===D.viewport&&r.observe(o),u.preload_code===D.eager&&Ne(l))}}Q.add(s),s()}function ae(e,t){if(e instanceof Me)return e.body;const n=We(e),a=cn(e);return S.hooks.handleError({error:e,event:t,status:n,message:a})??{message:a}}function qn(e,t={}){return e=new URL(He(e)),e.origin!==Ue?Promise.reject(new Error("goto: invalid URL")):Pt(e,t,0)}function Rn(e){if(typeof e=="function")be.push(e);else{const{href:t}=new URL(e,location.href);be.push(n=>n.href===t)}}function xn(){var t;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let a=!1;if(dt(),!re){const r=tt(_,void 0,null,"leave"),i={...r.navigation,cancel:()=>{a=!0,r.reject(new Error("navigation cancelled"))}};Lt.forEach(s=>s(i))}a?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&dt()}),(t=navigator.connection)!=null&&t.saveData||En(),P.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const a=St(n.composedPath()[0],P);if(!a)return;const{url:r,external:i,target:s,download:o}=qe(a,U,S.hash);if(!r)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const l=ve(a);if(!(a instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||o)return;const[d,u]=(S.hash?r.hash.replace(/^#/,""):r.href).split("#"),w=d===$e(location);if(i||l.reload&&(!w||!u)){jt({url:r,type:"link",event:n})?re=!0:n.preventDefault();return}if(u!==void 0&&w){const[,p]=_.url.href.split("#");if(p===u){if(n.preventDefault(),u===""||u==="top"&&a.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const f=a.ownerDocument.getElementById(decodeURIComponent(u));f&&(f.scrollIntoView(),f.focus())}return}if(Y=!0,Je(k),e(r),!l.replace_state)return;Y=!1}n.preventDefault(),await new Promise(p=>{requestAnimationFrame(()=>{setTimeout(p,0)}),setTimeout(p,100)}),await G({type:"link",url:r,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??r.href===location.href,event:n})}),P.addEventListener("submit",n=>{if(n.defaultPrevented)return;const a=HTMLFormElement.prototype.cloneNode.call(n.target),r=n.submitter;if(((r==null?void 0:r.formTarget)||a.target)==="_blank"||((r==null?void 0:r.formMethod)||a.method)!=="get")return;const o=new URL((r==null?void 0:r.hasAttribute("formaction"))&&(r==null?void 0:r.formAction)||a.action);if(Ae(o,U,!1))return;const l=n.target,c=ve(l);if(c.reload)return;n.preventDefault(),n.stopPropagation();const d=new FormData(l,r);o.search=new URLSearchParams(d).toString(),G({type:"form",url:o,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??o.href===location.href,event:n})}),addEventListener("popstate",async n=>{var a;if(!Be){if((a=n.state)!=null&&a[F]){const r=n.state[F];if(V={},r===k)return;const i=N[r],s=n.state[bt]??{},o=new URL(n.state[an]??location.href),l=n.state[Z],c=_.url?$e(location)===$e(_.url):!1;if(l===L&&(At||c)){s!==R.state&&(R.state=s),e(o),N[k]=B(),i&&scrollTo(i.x,i.y),k=r;return}const u=r-k;await G({type:"popstate",url:o,popped:{state:s,scroll:i,delta:u},accept:()=>{k=r,L=l},block:()=>{history.go(-u)},nav_token:V,event:n})}else if(!Y){const r=new URL(location.href);e(r),S.hash&&location.reload()}}}),addEventListener("hashchange",()=>{Y&&(Y=!1,history.replaceState({...history.state,[F]:++k,[Z]:L},"",location.href))});for(const n of document.querySelectorAll("link"))dn.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&j.navigating.set(ee.current=null)});function e(n){_.url=R.url=n,j.page.set(nt(R)),j.page.notify()}}async function Ln(e,{status:t=200,error:n,node_ids:a,params:r,route:i,server_route:s,data:o,form:l}){Ut=!0;const c=new URL(location.href);let d;({params:r={},route:i={id:null}}=await Te(c,!1)||{}),d=Ye.find(({id:p})=>p===i.id);let u,w=!0;try{const p=a.map(async(m,h)=>{const g=o[h];return g!=null&&g.uses&&(g.uses=Un(g.uses)),Qe({loader:S.nodes[m],url:c,params:r,route:i,parent:async()=>{const b={};for(let x=0;x<h;x+=1)Object.assign(b,(await p[x]).data);return b},server_data_node:Ze(g)})}),f=await Promise.all(p);if(d){const m=d.layouts;for(let h=0;h<m.length;h++)m[h]||f.splice(h,0,void 0)}u=await xe({url:c,params:r,branch:f,status:t,error:n,errors:d==null?void 0:d.errors,form:l,route:d??null})}catch(p){if(p instanceof ze){await ne(new URL(p.location,location.href));return}u=await et({status:We(p),error:await ae(p,{url:c,params:r,route:i}),url:c,route:i}),e.textContent="",w=!1}finally{}u.props.page&&(u.props.page.state={}),await $t(u,e,w)}function Un(e){return{dependencies:new Set((e==null?void 0:e.dependencies)??[]),params:new Set((e==null?void 0:e.params)??[]),parent:!!(e!=null&&e.parent),route:!!(e!=null&&e.route),url:!!(e!=null&&e.url),search_params:new Set((e==null?void 0:e.search_params)??[])}}let Be=!1;function An(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const a=qt(e);if(a&&document.getElementById(a)){const{x:i,y:s}=B();setTimeout(()=>{const o=history.state;Be=!0,location.replace(new URL(`#${a}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),Be=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const i=[];for(let s=0;s<r.rangeCount;s+=1)i.push(r.getRangeAt(s));setTimeout(()=>{if(r.rangeCount===i.length){for(let s=0;s<r.rangeCount;s+=1){const o=i[s],l=r.getRangeAt(s);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}r.removeAllRanges()}})}}}function tt(e,t,n,a,r=null){var c,d;let i,s;const o=new Promise((u,w)=>{i=u,s=w});return o.catch(C),{navigation:{from:{params:e.params,route:{id:((c=e.route)==null?void 0:c.id)??null},url:e.url,scroll:B()},to:n&&{params:(t==null?void 0:t.params)??null,route:{id:((d=t==null?void 0:t.route)==null?void 0:d.id)??null},url:n,scroll:r},willUnload:!t,type:a,complete:o},fulfil:i,reject:s}}function nt(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Tn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function qt(e){let t;if(S.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Nn as a,qn as g,Pn as l,R as p,j as s};
|
|
|
|
| 1 |
+
var rt=e=>{throw TypeError(e)};var Dt=(e,t,n)=>t.has(e)||rt("Cannot "+n);var y=(e,t,n)=>(Dt(e,t,"read from private field"),n?n.call(e):t.get(e)),A=(e,t,n)=>t.has(e)?rt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);import{bf as Pe,bg as Vt,ai as at,a4 as T,o as I,a5 as O,ar as we,bh as Bt}from"./BTUA7_xE.js";const M=[];function Ke(e,t=Pe){let n=null;const a=new Set;function r(o){if(Vt(e,o)&&(e=o,n)){const l=!M.length;for(const c of a)c[1](),M.push(c,e);if(l){for(let c=0;c<M.length;c+=2)M[c][0](M[c+1]);M.length=0}}}function i(o){r(o(e))}function s(o,l=Pe){const c=[o,l];return a.add(c),a.size===1&&(n=t(r,i)||Pe),o(e),()=>{a.delete(c),a.size===0&&n&&(n(),n=null)}}return{set:r,update:i,subscribe:s}}class Me{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class ze{constructor(t,n){try{new Headers({location:n})}catch{throw new Error(`Invalid redirect location ${JSON.stringify(n)}: this string contains characters that cannot be used in HTTP headers`)}this.status=t,this.location=n}}class Fe extends Error{constructor(t,n,a){super(a),this.status=t,this.text=n}}new URL("sveltekit-internal://");function Kt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function Mt(e){return e.split("%25").map(decodeURI).join("%25")}function zt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function $e({href:e}){return e.split("#")[0]}function C(){}function Ft(...e){let t=5381;for(const n of e)if(typeof n=="string"){let a=n.length;for(;a;)t=t*33^n.charCodeAt(--a)}else if(ArrayBuffer.isView(n)){const a=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let r=a.length;for(;r;)t=t*33^a[--r]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;function Gt(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return n}const Ht=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:(t==null?void 0:t.method)||"GET")!=="GET"&&X.delete(Ge(e)),Ht(e,t));const X=new Map;function Wt(e,t){const n=Ge(e,t),a=document.querySelector(n);if(a!=null&&a.textContent){a.remove();let{body:r,...i}=JSON.parse(a.textContent);const s=a.getAttribute("data-ttl");return s&&X.set(n,{body:r,init:i,ttl:1e3*Number(s)}),a.getAttribute("data-b64")!==null&&(r=Gt(r)),Promise.resolve(new Response(r,i))}return window.fetch(e,t)}function Jt(e,t,n){if(X.size>0){const a=Ge(e,n),r=X.get(a);if(r){if(performance.now()<r.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(r.body,r.init);X.delete(a)}}return window.fetch(t,n)}function Ge(e,t){let a=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t!=null&&t.headers||t!=null&&t.body){const r=[];t.headers&&r.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&r.push(t.body),a+=`[data-hash="${Ft(...r)}"]`}return a}const Yt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Xt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Zt(e).map(a=>{const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(r)return t.push({name:r[1],matcher:r[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const s=a.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return Ce(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return Ce(String.fromCharCode(...l.slice(2).split("-").map(m=>parseInt(m,16))));const d=Yt.exec(l),[,u,w,p,f]=d;return t.push({name:p,matcher:f,optional:!!u,rest:!!w,chained:w?c===1&&s[0]==="":!1}),w?"([^]*?)":u?"([^/]*)?":"([^/]+?)"}return Ce(l)}).join("")}).join("")}/?$`),params:t}}function Qt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Zt(e){return e.slice(1).split("/").filter(Qt)}function en(e,t,n){const a={},r=e.slice(1),i=r.filter(o=>o!==void 0);let s=0;for(let o=0;o<t.length;o+=1){const l=t[o];let c=r[o-s];if(l.chained&&l.rest&&s&&(c=r.slice(o-s,o+1).filter(d=>d).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){a[l.name]=c;const d=t[o+1],u=r[o+1];d&&!d.rest&&d.optional&&u&&l.chained&&(s=0),!d&&!u&&Object.keys(a).length===i.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return a}function Ce(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function tn({nodes:e,server_loads:t,dictionary:n,matchers:a}){const r=new Set(t);return Object.entries(n).map(([o,[l,c,d]])=>{const{pattern:u,params:w}=Xt(o),p={id:o,exec:f=>{const m=u.exec(f);if(m)return en(m,w,a)},errors:[1,...d||[]].map(f=>e[f]),layouts:[0,...c||[]].map(s),leaf:i(l)};return p.errors.length=p.layouts.length=Math.max(p.errors.length,p.layouts.length),p});function i(o){const l=o<0;return l&&(o=~o),[l,e[o]]}function s(o){return o===void 0?o:[r.has(o),e[o]]}}function wt(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function ot(e,t,n=JSON.stringify){const a=n(t);try{sessionStorage[e]=a}catch{}}var ht;const U=((ht=globalThis.__sveltekit_whg5iw)==null?void 0:ht.base)??"";var pt;const nn=((pt=globalThis.__sveltekit_whg5iw)==null?void 0:pt.assets)??U??"",rn="1778247242661",vt="sveltekit:snapshot",yt="sveltekit:scroll",bt="sveltekit:states",an="sveltekit:pageurl",F="sveltekit:history",Z="sveltekit:navigation",D={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Ue=location.origin;function He(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function B(){return{x:pageXOffset,y:pageYOffset}}function z(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const st={...D,"":D.hover};function kt(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function St(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=kt(e)}}function qe(e,t,n){let a;try{if(a=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&a.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";a.hash=`#${o}${a.hash}`}}catch{}const r=e instanceof SVGAElement?e.target.baseVal:e.target,i=!a||!!r||Ae(a,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=(a==null?void 0:a.origin)===Ue&&e.hasAttribute("download");return{url:a,external:i,target:r,download:s}}function ve(e){let t=null,n=null,a=null,r=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)a===null&&(a=z(o,"preload-code")),r===null&&(r=z(o,"preload-data")),t===null&&(t=z(o,"keepfocus")),n===null&&(n=z(o,"noscroll")),i===null&&(i=z(o,"reload")),s===null&&(s=z(o,"replacestate")),o=kt(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:st[a??"off"],preload_data:st[r??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function it(e){const t=Ke(e);let n=!0;function a(){n=!0,t.update(s=>s)}function r(s){n=!1,t.set(s)}function i(s){let o;return t.subscribe(l=>{(o===void 0||n&&l!==o)&&s(o=l)})}return{notify:a,set:r,subscribe:i}}const Et={v:C};function on(){const{set:e,subscribe:t}=Ke(!1);let n;async function a(){clearTimeout(n);try{const r=await fetch(`${nn}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const s=(await r.json()).version!==rn;return s&&(e(!0),Et.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:a}}function Ae(e,t,n){return e.origin!==Ue||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Pn(e){}const Rt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...Rt];const sn=new Set([...Rt]);[...sn];function ln(e){return e.filter(t=>t!=null)}function me(e,t){return e+"/"+t}function We(e){return e instanceof Me||e instanceof Fe?e.status:500}function cn(e){return e instanceof Fe?e.text:"Internal Error"}let R,ee,je;const fn=at.toString().includes("$$")||/function \w+\(\) \{\}/.test(at.toString()),lt="a:";var oe,se,ie,le,ce,fe,ue,de,gt,he,mt,pe,_t;fn?(R={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(lt)},ee={current:null},je={current:!1}):(R=new(gt=class{constructor(){A(this,oe,T({}));A(this,se,T(null));A(this,ie,T(null));A(this,le,T({}));A(this,ce,T({id:null}));A(this,fe,T({}));A(this,ue,T(-1));A(this,de,T(new URL(lt)))}get data(){return I(y(this,oe))}set data(t){O(y(this,oe),t)}get form(){return I(y(this,se))}set form(t){O(y(this,se),t)}get error(){return I(y(this,ie))}set error(t){O(y(this,ie),t)}get params(){return I(y(this,le))}set params(t){O(y(this,le),t)}get route(){return I(y(this,ce))}set route(t){O(y(this,ce),t)}get state(){return I(y(this,fe))}set state(t){O(y(this,fe),t)}get status(){return I(y(this,ue))}set status(t){O(y(this,ue),t)}get url(){return I(y(this,de))}set url(t){O(y(this,de),t)}},oe=new WeakMap,se=new WeakMap,ie=new WeakMap,le=new WeakMap,ce=new WeakMap,fe=new WeakMap,ue=new WeakMap,de=new WeakMap,gt),ee=new(mt=class{constructor(){A(this,he,T(null))}get current(){return I(y(this,he))}set current(t){O(y(this,he),t)}},he=new WeakMap,mt),je=new(_t=class{constructor(){A(this,pe,T(!1))}get current(){return I(y(this,pe))}set current(t){O(y(this,pe),t)}},pe=new WeakMap,_t),Et.v=()=>je.current=!0);function un(e){Object.assign(R,e)}const dn=new Set(["icon","shortcut icon","apple-touch-icon"]);let J=null;const N=wt(yt)??{},te=wt(vt)??{},j={url:it({}),page:it({}),navigating:Ke(null),updated:on()};function Je(e){N[e]=B()}function hn(e,t){let n=e+1;for(;N[n];)delete N[n],n+=1;for(n=t+1;te[n];)delete te[n],n+=1}function ne(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(C)}async function xt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(U||"/");e&&await e.update()}}let Ye,De,ye,P,Ve,S;const be=[],ke=[];let v=null;function Se(){var e;(e=v==null?void 0:v.fork)==null||e.then(t=>t==null?void 0:t.discard()),v=null}const _e=new Map,Lt=new Set,pn=new Set,Q=new Set;let _={branch:[],error:null,url:null},Ut=!1,Ee=!1,ct=!0,re=!1,Y=!1,At=!1,Xe=!1,Tt,k,L,V;const Re=new Set,ft=new Map,ut=new Map;async function Nn(e,t,n){var i,s,o,l;globalThis.__sveltekit_whg5iw&&(globalThis.__sveltekit_whg5iw.query,globalThis.__sveltekit_whg5iw.prerender),document.URL!==location.href&&(location.href=location.href),S=e,await((s=(i=e.hooks).init)==null?void 0:s.call(i)),Ye=tn(e),P=document.documentElement,Ve=t,De=e.nodes[0],ye=e.nodes[1],De(),ye(),k=(o=history.state)==null?void 0:o[F],L=(l=history.state)==null?void 0:l[Z],k||(k=L=Date.now(),history.replaceState({...history.state,[F]:k,[Z]:L},""));const a=N[k];function r(){a&&(history.scrollRestoration="manual",scrollTo(a.x,a.y))}n?(r(),await Ln(Ve,n)):(await G({type:"enter",url:He(S.hash?Tn(new URL(location.href)):location.href),replace_state:!0}),r()),xn()}function gn(){be.length=0,Xe=!1}function It(e){ke.some(t=>t==null?void 0:t.snapshot)&&(te[e]=ke.map(t=>{var n;return(n=t==null?void 0:t.snapshot)==null?void 0:n.capture()}))}function Ot(e){var t;(t=te[e])==null||t.forEach((n,a)=>{var r,i;(i=(r=ke[a])==null?void 0:r.snapshot)==null||i.restore(n)})}function dt(){Je(k),ot(yt,N),It(L),ot(vt,te)}async function Pt(e,t,n,a){let r,i;t.invalidateAll&&Se(),await G({type:"goto",url:He(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:a,accept:()=>{if(t.invalidateAll){Xe=!0,r=new Set;for(const[s,o]of ft)for(const l of o.keys())r.add(me(s,l));i=new Set;for(const[s,o]of ut)for(const l of o.keys())i.add(me(s,l))}t.invalidate&&t.invalidate.forEach(Rn)}}),t.invalidateAll&&we().then(we).then(()=>{for(const[s,o]of ft)for(const[l,{resource:c}]of o)r!=null&&r.has(me(s,l))&&c.refresh();for(const[s,o]of ut)for(const[l,{resource:c}]of o)i!=null&&i.has(me(s,l))&&c.reconnect()})}async function mn(e){if(e.id!==(v==null?void 0:v.id)){Se();const t={};Re.add(t),v={id:e.id,token:t,promise:Ct({...e,preload:t}).then(n=>(Re.delete(t),n.type==="loaded"&&n.state.error&&Se(),n)),fork:null}}return v.promise}async function Ne(e){var n;const t=(n=await Te(e,!1))==null?void 0:n.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(a=>a[1]()))}async function $t(e,t,n){var i;const a={params:_.params,route:{id:((i=_.route)==null?void 0:i.id)??null},url:new URL(location.href)};_={...e.state,nav:a};const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(R,e.props.page),Tt=new S.root({target:t,props:{...e.props,stores:j,components:ke},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),Ot(L),n){const s={from:null,to:{...a,scroll:N[k]??B()},willUnload:!1,type:"enter",complete:Promise.resolve()};Q.forEach(o=>o(s))}Ee=!0}async function xe({url:e,params:t,branch:n,errors:a,status:r,error:i,route:s,form:o}){let l="never";if(U&&(e.pathname===U||e.pathname===U+"/"))l="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(l=f.slash);e.pathname=Kt(e.pathname,l),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:i,route:s},props:{constructors:ln(n).map(f=>f.node.component),page:nt(R)}};o!==void 0&&(c.props.form=o);let d={},u=!R,w=0;for(let f=0;f<Math.max(n.length,_.branch.length);f+=1){const m=n[f],h=_.branch[f];(m==null?void 0:m.data)!==(h==null?void 0:h.data)&&(u=!0),m&&(d={...d,...m.data},u&&(c.props[`data_${w}`]=d),w+=1)}return(!_.url||e.href!==_.url.href||_.error!==i||o!==void 0&&o!==R.form||u)&&(c.props.page={error:i,params:t,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(e),form:o??null,data:u?d:R.data}),c}async function Qe({loader:e,parent:t,url:n,params:a,route:r,server_data_node:i}){var c,d;let s=null;const o={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();return{node:l,loader:e,server:i,universal:(c=l.universal)!=null&&c.load?{type:"data",data:s,uses:o}:null,data:s??(i==null?void 0:i.data)??null,slash:((d=l.universal)==null?void 0:d.trailingSlash)??(i==null?void 0:i.slash)}}function _n(e,t,n){let a=e instanceof Request?e.url:e;const r=new URL(a,n);r.origin===n.origin&&(a=r.href.slice(n.origin.length));const i=Ee?Jt(a,r.href,t):Wt(a,t);return{resolved:r,promise:i}}function wn(e,t,n,a,r,i){if(Xe)return!0;if(!r)return!1;if(r.parent&&e||r.route&&t||r.url&&n)return!0;for(const s of r.search_params)if(a.has(s))return!0;for(const s of r.params)if(i[s]!==_.params[s])return!0;for(const s of r.dependencies)if(be.some(o=>o(new URL(s))))return!0;return!1}function Ze(e,t){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?t??null:null}function vn(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const a of n){const r=e.searchParams.getAll(a),i=t.searchParams.getAll(a);r.every(s=>i.includes(s))&&i.every(s=>r.includes(s))&&n.delete(a)}return n}function yn({error:e,url:t,route:n,params:a}){return{type:"loaded",state:{error:e,url:t,route:n,params:a,branch:[]},props:{page:nt(R),constructors:[]}}}async function Ct({id:e,invalidating:t,url:n,params:a,route:r,preload:i}){if((v==null?void 0:v.id)===e)return Re.delete(v.token),v.promise;const{errors:s,layouts:o,leaf:l}=r,c=[...o,l];s.forEach(h=>h==null?void 0:h().catch(C)),c.forEach(h=>h==null?void 0:h[1]().catch(C));const d=_.url?e!==Le(_.url):!1,u=_.route?r.id!==_.route.id:!1,w=vn(_.url,n);let p=!1;const f=c.map(async(h,g)=>{var $;if(!h)return;const b=_.branch[g];return h[1]===(b==null?void 0:b.loader)&&!wn(p,u,d,w,($=b.universal)==null?void 0:$.uses,a)?b:(p=!0,Qe({loader:h[1],url:n,params:a,route:r,parent:async()=>{var ge;const q={};for(let K=0;K<g;K+=1)Object.assign(q,(ge=await f[K])==null?void 0:ge.data);return q},server_data_node:Ze(h[0]?{type:"skip"}:null,h[0]?b==null?void 0:b.server:void 0)}))});for(const h of f)h.catch(C);const m=[];for(let h=0;h<c.length;h+=1)if(c[h])try{m.push(await f[h])}catch(g){if(g instanceof ze)return{type:"redirect",location:g.location};if(Re.has(i))return yn({error:await ae(g,{params:a,url:n,route:{id:r.id}}),url:n,params:a,route:r});let b=We(g),x;if(g instanceof Me)x=g.body;else{if(await j.updated.check())return await xt(),await ne(n);x=await ae(g,{params:a,url:n,route:{id:r.id}})}const $=await bn(h,m,s);return $?xe({url:n,params:a,branch:m.slice(0,$.idx).concat($.node),errors:s,status:b,error:x,route:r}):await Nt(n,{id:r.id},x,b)}else m.push(void 0);return xe({url:n,params:a,branch:m,errors:s,status:200,error:null,route:r,form:t?void 0:null})}async function bn(e,t,n){for(;e--;)if(n[e]){let a=e;for(;!t[a];)a-=1;try{return{idx:a+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function et({status:e,error:t,url:n,route:a}){const r={};let i=null;try{const s=await Qe({loader:De,url:n,params:r,route:a,parent:()=>Promise.resolve({}),server_data_node:Ze(i)}),o={node:await ye(),loader:ye,universal:null,server:null,data:null};return xe({url:n,params:r,branch:[s,o],status:e,error:t,errors:[],route:null})}catch(s){if(s instanceof ze)return Pt(new URL(s.location,location.href),{},0);throw s}}async function kn(e){const t=e.href;if(_e.has(t))return _e.get(t);let n;try{const a=(async()=>{let r=await S.hooks.reroute({url:new URL(e),fetch:async(i,s)=>_n(i,s,e).promise})??e;if(typeof r=="string"){const i=new URL(e);S.hash?i.hash=r:i.pathname=r,r=i}return r})();_e.set(t,a),n=await a}catch{_e.delete(t);return}return n}async function Te(e,t){if(e&&!Ae(e,U,S.hash)){const n=await kn(e);if(!n)return;const a=Sn(n);for(const r of Ye){const i=r.exec(a);if(i)return{id:Le(e),invalidating:t,route:r,params:zt(i),url:e}}}}function Sn(e){return Mt(S.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(U.length))||"/"}function Le(e){return(S.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function jt({url:e,type:t,intent:n,delta:a,event:r,scroll:i}){let s=!1;const o=tt(_,n,e,t,i??null);a!==void 0&&(o.navigation.delta=a),r!==void 0&&(o.navigation.event=r);const l={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return re||Lt.forEach(c=>c(l)),s?null:o}async function G({type:e,url:t,popped:n,keepfocus:a,noscroll:r,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=C,block:d=C,event:u}){var K;const w=V;V=l;const p=await Te(t,!1),f=e==="enter"?tt(_,p,t,e):jt({url:t,type:e,delta:n==null?void 0:n.delta,intent:p,scroll:n==null?void 0:n.scroll,event:u});if(!f){d(),V===l&&(V=w);return}const m=k,h=L;c(),re=!0,Ee&&f.navigation.type!=="enter"&&j.navigating.set(ee.current=f.navigation);let g=p&&await Ct(p);if(!g){if(Ae(t,U,S.hash))return await ne(t,i);g=await Nt(t,{id:null},await ae(new Fe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=(p==null?void 0:p.url)||t,V!==l)return f.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(o<20){await G({type:e,url:new URL(g.location,t),popped:n,keepfocus:a,noscroll:r,replace_state:i,state:s,redirect_count:o+1,nav_token:l}),f.fulfil(void 0);return}g=await et({status:500,error:await ae(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await j.updated.check()&&(await xt(),await ne(t,i));if(gn(),Je(m),It(h),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const E=i?0:1,H={[F]:k+=E,[Z]:L+=E,[bt]:s};(i?history.replaceState:history.pushState).call(history,H,"",t),i||hn(k,L)}const b=p&&(v==null?void 0:v.id)===p.id?v.fork:null;v!=null&&v.fork&&!b&&Se(),v=null,g.props.page.state=s;let x;if(Ee){const E=(await Promise.all(Array.from(pn,W=>W(f.navigation)))).filter(W=>typeof W=="function");if(E.length>0){let W=function(){E.forEach(Oe=>{Q.delete(Oe)})};E.push(W),E.forEach(Oe=>{Q.add(Oe)})}const H=f.navigation.to;_={...g.state,nav:{params:H.params,route:H.route,url:H.url}},g.props.page&&(g.props.page.url=t);const Ie=b&&await b;Ie?x=Ie.commit():(J=null,Tt.$set(g.props),J&&Object.assign(g.props.page,J),un(g.props.page),x=(K=Bt)==null?void 0:K()),At=!0}else await $t(g,Ve,!1);const{activeElement:$}=document;await x,await we(),await we();let q=null;if(ct){const E=n?n.scroll:r?B():null;E?scrollTo(E.x,E.y):(q=t.hash&&document.getElementById(qt(t)))?q.scrollIntoView():scrollTo(0,0)}const ge=document.activeElement!==$&&document.activeElement!==document.body;!a&&!ge&&An(t,!q),ct=!0,g.props.page&&(J&&Object.assign(g.props.page,J),Object.assign(R,g.props.page)),re=!1,e==="popstate"&&Ot(L),f.fulfil(void 0),f.navigation.to&&(f.navigation.to.scroll=B()),Q.forEach(E=>E(f.navigation)),j.navigating.set(ee.current=null)}async function Nt(e,t,n,a,r){return e.origin===Ue&&e.pathname===location.pathname&&!Ut?await et({status:a,error:n,url:e,route:t}):await ne(e,r)}function En(){let e,t={element:void 0,href:void 0},n;P.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(e),e=setTimeout(()=>{i(l,D.hover)},20)});function a(o){o.defaultPrevented||i(o.composedPath()[0],D.tap)}P.addEventListener("mousedown",a),P.addEventListener("touchstart",a,{passive:!0});const r=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(Ne(new URL(l.target.href)),r.unobserve(l.target))},{threshold:0});async function i(o,l){const c=St(o,P),d=c===t.element&&(c==null?void 0:c.href)===t.href&&l>=n;if(!c||d)return;const{url:u,external:w,download:p}=qe(c,U,S.hash);if(w||p)return;const f=ve(c),m=u&&Le(_.url)===Le(u);if(!(f.reload||m))if(l<=f.preload_data){t={element:c,href:c.href},n=D.tap;const h=await Te(u,!1);if(!h)return;mn(h)}else l<=f.preload_code&&(t={element:c,href:c.href},n=l,Ne(u))}function s(){r.disconnect();for(const o of P.querySelectorAll("a")){const{url:l,external:c,download:d}=qe(o,U,S.hash);if(c||d)continue;const u=ve(o);u.reload||(u.preload_code===D.viewport&&r.observe(o),u.preload_code===D.eager&&Ne(l))}}Q.add(s),s()}function ae(e,t){if(e instanceof Me)return e.body;const n=We(e),a=cn(e);return S.hooks.handleError({error:e,event:t,status:n,message:a})??{message:a}}function qn(e,t={}){return e=new URL(He(e)),e.origin!==Ue?Promise.reject(new Error("goto: invalid URL")):Pt(e,t,0)}function Rn(e){if(typeof e=="function")be.push(e);else{const{href:t}=new URL(e,location.href);be.push(n=>n.href===t)}}function xn(){var t;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let a=!1;if(dt(),!re){const r=tt(_,void 0,null,"leave"),i={...r.navigation,cancel:()=>{a=!0,r.reject(new Error("navigation cancelled"))}};Lt.forEach(s=>s(i))}a?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&dt()}),(t=navigator.connection)!=null&&t.saveData||En(),P.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const a=St(n.composedPath()[0],P);if(!a)return;const{url:r,external:i,target:s,download:o}=qe(a,U,S.hash);if(!r)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const l=ve(a);if(!(a instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||o)return;const[d,u]=(S.hash?r.hash.replace(/^#/,""):r.href).split("#"),w=d===$e(location);if(i||l.reload&&(!w||!u)){jt({url:r,type:"link",event:n})?re=!0:n.preventDefault();return}if(u!==void 0&&w){const[,p]=_.url.href.split("#");if(p===u){if(n.preventDefault(),u===""||u==="top"&&a.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const f=a.ownerDocument.getElementById(decodeURIComponent(u));f&&(f.scrollIntoView(),f.focus())}return}if(Y=!0,Je(k),e(r),!l.replace_state)return;Y=!1}n.preventDefault(),await new Promise(p=>{requestAnimationFrame(()=>{setTimeout(p,0)}),setTimeout(p,100)}),await G({type:"link",url:r,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??r.href===location.href,event:n})}),P.addEventListener("submit",n=>{if(n.defaultPrevented)return;const a=HTMLFormElement.prototype.cloneNode.call(n.target),r=n.submitter;if(((r==null?void 0:r.formTarget)||a.target)==="_blank"||((r==null?void 0:r.formMethod)||a.method)!=="get")return;const o=new URL((r==null?void 0:r.hasAttribute("formaction"))&&(r==null?void 0:r.formAction)||a.action);if(Ae(o,U,!1))return;const l=n.target,c=ve(l);if(c.reload)return;n.preventDefault(),n.stopPropagation();const d=new FormData(l,r);o.search=new URLSearchParams(d).toString(),G({type:"form",url:o,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??o.href===location.href,event:n})}),addEventListener("popstate",async n=>{var a;if(!Be){if((a=n.state)!=null&&a[F]){const r=n.state[F];if(V={},r===k)return;const i=N[r],s=n.state[bt]??{},o=new URL(n.state[an]??location.href),l=n.state[Z],c=_.url?$e(location)===$e(_.url):!1;if(l===L&&(At||c)){s!==R.state&&(R.state=s),e(o),N[k]=B(),i&&scrollTo(i.x,i.y),k=r;return}const u=r-k;await G({type:"popstate",url:o,popped:{state:s,scroll:i,delta:u},accept:()=>{k=r,L=l},block:()=>{history.go(-u)},nav_token:V,event:n})}else if(!Y){const r=new URL(location.href);e(r),S.hash&&location.reload()}}}),addEventListener("hashchange",()=>{Y&&(Y=!1,history.replaceState({...history.state,[F]:++k,[Z]:L},"",location.href))});for(const n of document.querySelectorAll("link"))dn.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&j.navigating.set(ee.current=null)});function e(n){_.url=R.url=n,j.page.set(nt(R)),j.page.notify()}}async function Ln(e,{status:t=200,error:n,node_ids:a,params:r,route:i,server_route:s,data:o,form:l}){Ut=!0;const c=new URL(location.href);let d;({params:r={},route:i={id:null}}=await Te(c,!1)||{}),d=Ye.find(({id:p})=>p===i.id);let u,w=!0;try{const p=a.map(async(m,h)=>{const g=o[h];return g!=null&&g.uses&&(g.uses=Un(g.uses)),Qe({loader:S.nodes[m],url:c,params:r,route:i,parent:async()=>{const b={};for(let x=0;x<h;x+=1)Object.assign(b,(await p[x]).data);return b},server_data_node:Ze(g)})}),f=await Promise.all(p);if(d){const m=d.layouts;for(let h=0;h<m.length;h++)m[h]||f.splice(h,0,void 0)}u=await xe({url:c,params:r,branch:f,status:t,error:n,errors:d==null?void 0:d.errors,form:l,route:d??null})}catch(p){if(p instanceof ze){await ne(new URL(p.location,location.href));return}u=await et({status:We(p),error:await ae(p,{url:c,params:r,route:i}),url:c,route:i}),e.textContent="",w=!1}finally{}u.props.page&&(u.props.page.state={}),await $t(u,e,w)}function Un(e){return{dependencies:new Set((e==null?void 0:e.dependencies)??[]),params:new Set((e==null?void 0:e.params)??[]),parent:!!(e!=null&&e.parent),route:!!(e!=null&&e.route),url:!!(e!=null&&e.url),search_params:new Set((e==null?void 0:e.search_params)??[])}}let Be=!1;function An(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const a=qt(e);if(a&&document.getElementById(a)){const{x:i,y:s}=B();setTimeout(()=>{const o=history.state;Be=!0,location.replace(new URL(`#${a}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),Be=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const i=[];for(let s=0;s<r.rangeCount;s+=1)i.push(r.getRangeAt(s));setTimeout(()=>{if(r.rangeCount===i.length){for(let s=0;s<r.rangeCount;s+=1){const o=i[s],l=r.getRangeAt(s);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}r.removeAllRanges()}})}}}function tt(e,t,n,a,r=null){var c,d;let i,s;const o=new Promise((u,w)=>{i=u,s=w});return o.catch(C),{navigation:{from:{params:e.params,route:{id:((c=e.route)==null?void 0:c.id)??null},url:e.url,scroll:B()},to:n&&{params:(t==null?void 0:t.params)??null,route:{id:((d=t==null?void 0:t.route)==null?void 0:d.id)??null},url:n,scroll:r},willUnload:!t,type:a,complete:o},fulfil:i,reject:s}}function nt(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Tn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function qt(e){let t;if(S.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Nn as a,qn as g,Pn as l,R as p,j as s};
|
|
@@ -1,2 +1,2 @@
|
|
| 1 |
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.
|
| 2 |
-
var S=e=>{throw TypeError(e)};var M=(e,t,r)=>t.has(e)||S("Cannot "+r);var c=(e,t,r)=>(M(e,t,"read from private field"),r?r.call(e):t.get(e)),p=(e,t,r)=>t.has(e)?S("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),I=(e,t,r,n)=>(M(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);import{b as L,_ as b}from"../chunks/CXQd8Y6F.js";import{h as N,n as W,d as X,a3 as Z,q as $,v as tt,i as et,e as B,an as rt,j as at,a5 as A,ah as st,o as l,ao as nt,ap as ot,L as it,p as ct,aq as ut,am as dt,ai as mt,ar as _t,f as x,s as lt,a as ft,a4 as j,c as ht,r as vt,t as gt,al as k}from"../chunks/BTUA7_xE.js";import{h as yt,m as Et,u as bt,a as R,c as w,f as F,t as Rt,s as Pt}from"../chunks/CWw6qgC_.js";import{B as Ot,i as D}from"../chunks/Bd-v_9Ud.js";import{p as q}from"../chunks/CW0zSL4D.js";function V(e,t,r){var n;N&&(n=at,W());var o=new Ot(e);X(()=>{var i=t()??null;if(N){var a=$(n),s=a===rt,_=i!==null;if(s!==_){var P=tt();et(P),o.anchor=P,B(!1),o.ensure(i,i&&(y=>r(y,i))),B(!0);return}}o.ensure(i,i&&(y=>r(y,i)))},Z)}function Tt(e){return class extends xt{constructor(t){super({component:e,...t})}}}var f,d;class xt{constructor(t){p(this,f);p(this,d);var i;var r=new Map,n=(a,s)=>{var _=it(s,!1,!1);return r.set(a,_),_};const o=new Proxy({...t.props||{},$$events:{}},{get(a,s){return l(r.get(s)??n(s,Reflect.get(a,s)))},has(a,s){return s===st?!0:(l(r.get(s)??n(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,_){return A(r.get(s)??n(s,_),_),Reflect.set(a,s,_)}});I(this,d,(t.hydrate?yt:Et)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),(!((i=t==null?void 0:t.props)!=null&&i.$$host)||t.sync===!1)&&nt(),I(this,f,o.$$events);for(const a of Object.keys(c(this,d)))a==="$set"||a==="$destroy"||a==="$on"||ot(this,a,{get(){return c(this,d)[a]},set(s){c(this,d)[a]=s},enumerable:!0});c(this,d).$set=a=>{Object.assign(o,a)},c(this,d).$destroy=()=>{bt(c(this,d))}}$set(t){c(this,d).$set(t)}$on(t,r){c(this,f)[t]=c(this,f)[t]||[];const n=(...o)=>r.call(this,...o);return c(this,f)[t].push(n),()=>{c(this,f)[t]=c(this,f)[t].filter(o=>o!==n)}}$destroy(){c(this,d).$destroy()}}f=new WeakMap,d=new WeakMap;const St={};var At=F('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),pt=F("<!> <!>",1);function It(e,t){ct(t,!0);let r=q(t,"components",23,()=>[]),n=q(t,"data_0",3,null),o=q(t,"data_1",3,null);ut(()=>t.stores.page.set(t.page)),dt(()=>{t.stores,t.page,t.constructors,r(),t.form,n(),o(),t.stores.page.notify()});let i=j(!1),a=j(!1),s=j(null);mt(()=>{const u=t.stores.page.subscribe(()=>{l(i)&&(A(a,!0),_t().then(()=>{A(s,document.title||"untitled page",!0)}))});return A(i,!0),u});const _=k(()=>t.constructors[1]);var P=pt(),y=x(P);{var G=u=>{const h=k(()=>t.constructors[0]);var v=w(),O=x(v);V(O,()=>l(h),(g,E)=>{L(E(g,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(m,jt)=>{var C=w(),K=x(C);V(K,()=>l(_),(Q,U)=>{L(U(Q,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),T=>r()[1]=T,()=>{var T;return(T=r())==null?void 0:T[1]})}),R(m,C)},$$slots:{default:!0}}),m=>r()[0]=m,()=>{var m;return(m=r())==null?void 0:m[0]})}),R(u,v)},H=u=>{const h=k(()=>t.constructors[0]);var v=w(),O=x(v);V(O,()=>l(h),(g,E)=>{L(E(g,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),m=>r()[0]=m,()=>{var m;return(m=r())==null?void 0:m[0]})}),R(u,v)};D(y,u=>{t.constructors[1]?u(G):u(H,-1)})}var z=lt(y,2);{var J=u=>{var h=At(),v=ht(h);{var O=g=>{var E=Rt();gt(()=>Pt(E,l(s))),R(g,E)};D(v,g=>{l(a)&&g(O)})}vt(h),R(u,h)};D(z,u=>{l(i)&&u(J)})}R(e,P),ft()}const Mt=Tt(It),Nt=[()=>b(()=>import("../nodes/0.
|
|
|
|
| 1 |
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.C7EsZXea.js","../chunks/CWw6qgC_.js","../chunks/BTUA7_xE.js","../chunks/DxQlA7U2.js","../chunks/Bd-v_9Ud.js","../chunks/CW0zSL4D.js","../chunks/3HH2ymBC.js","../chunks/D30NfLoU.js","../chunks/DCD6_LXk.js","../chunks/B0XoTt7U.js","../assets/RipMark.ClxF_PAC.css","../chunks/DixtWtwq.js","../assets/0.DiQNUxm-.css","../nodes/1.BfugAG4h.js","../nodes/2._YbGDT13.js","../chunks/cDW0xQNP.js","../chunks/25_y8TFd.js","../chunks/CXQd8Y6F.js","../chunks/D907np-5.js","../assets/2.BD53GLFY.css","../nodes/3.7DONSlfO.js","../chunks/BatqQaKj.js","../assets/Briefing.Dmn9LgiV.css","../assets/3.BZfqQRM0.css","../nodes/4.D_QEjY63.js","../chunks/C3emz_VZ.js","../assets/stoneRegistry.bHiraU77.css","../assets/4.C9CQZyPb.css","../nodes/5.CuscLKzC.js"])))=>i.map(i=>d[i]);
|
| 2 |
+
var S=e=>{throw TypeError(e)};var M=(e,t,r)=>t.has(e)||S("Cannot "+r);var c=(e,t,r)=>(M(e,t,"read from private field"),r?r.call(e):t.get(e)),p=(e,t,r)=>t.has(e)?S("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),I=(e,t,r,n)=>(M(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);import{b as L,_ as b}from"../chunks/CXQd8Y6F.js";import{h as N,n as W,d as X,a3 as Z,q as $,v as tt,i as et,e as B,an as rt,j as at,a5 as A,ah as st,o as l,ao as nt,ap as ot,L as it,p as ct,aq as ut,am as dt,ai as mt,ar as _t,f as x,s as lt,a as ft,a4 as j,c as ht,r as vt,t as gt,al as k}from"../chunks/BTUA7_xE.js";import{h as yt,m as Et,u as bt,a as R,c as w,f as F,t as Rt,s as Pt}from"../chunks/CWw6qgC_.js";import{B as Ot,i as D}from"../chunks/Bd-v_9Ud.js";import{p as q}from"../chunks/CW0zSL4D.js";function V(e,t,r){var n;N&&(n=at,W());var o=new Ot(e);X(()=>{var i=t()??null;if(N){var a=$(n),s=a===rt,_=i!==null;if(s!==_){var P=tt();et(P),o.anchor=P,B(!1),o.ensure(i,i&&(y=>r(y,i))),B(!0);return}}o.ensure(i,i&&(y=>r(y,i)))},Z)}function Tt(e){return class extends xt{constructor(t){super({component:e,...t})}}}var f,d;class xt{constructor(t){p(this,f);p(this,d);var i;var r=new Map,n=(a,s)=>{var _=it(s,!1,!1);return r.set(a,_),_};const o=new Proxy({...t.props||{},$$events:{}},{get(a,s){return l(r.get(s)??n(s,Reflect.get(a,s)))},has(a,s){return s===st?!0:(l(r.get(s)??n(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,_){return A(r.get(s)??n(s,_),_),Reflect.set(a,s,_)}});I(this,d,(t.hydrate?yt:Et)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),(!((i=t==null?void 0:t.props)!=null&&i.$$host)||t.sync===!1)&&nt(),I(this,f,o.$$events);for(const a of Object.keys(c(this,d)))a==="$set"||a==="$destroy"||a==="$on"||ot(this,a,{get(){return c(this,d)[a]},set(s){c(this,d)[a]=s},enumerable:!0});c(this,d).$set=a=>{Object.assign(o,a)},c(this,d).$destroy=()=>{bt(c(this,d))}}$set(t){c(this,d).$set(t)}$on(t,r){c(this,f)[t]=c(this,f)[t]||[];const n=(...o)=>r.call(this,...o);return c(this,f)[t].push(n),()=>{c(this,f)[t]=c(this,f)[t].filter(o=>o!==n)}}$destroy(){c(this,d).$destroy()}}f=new WeakMap,d=new WeakMap;const St={};var At=F('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),pt=F("<!> <!>",1);function It(e,t){ct(t,!0);let r=q(t,"components",23,()=>[]),n=q(t,"data_0",3,null),o=q(t,"data_1",3,null);ut(()=>t.stores.page.set(t.page)),dt(()=>{t.stores,t.page,t.constructors,r(),t.form,n(),o(),t.stores.page.notify()});let i=j(!1),a=j(!1),s=j(null);mt(()=>{const u=t.stores.page.subscribe(()=>{l(i)&&(A(a,!0),_t().then(()=>{A(s,document.title||"untitled page",!0)}))});return A(i,!0),u});const _=k(()=>t.constructors[1]);var P=pt(),y=x(P);{var G=u=>{const h=k(()=>t.constructors[0]);var v=w(),O=x(v);V(O,()=>l(h),(g,E)=>{L(E(g,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(m,jt)=>{var C=w(),K=x(C);V(K,()=>l(_),(Q,U)=>{L(U(Q,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),T=>r()[1]=T,()=>{var T;return(T=r())==null?void 0:T[1]})}),R(m,C)},$$slots:{default:!0}}),m=>r()[0]=m,()=>{var m;return(m=r())==null?void 0:m[0]})}),R(u,v)},H=u=>{const h=k(()=>t.constructors[0]);var v=w(),O=x(v);V(O,()=>l(h),(g,E)=>{L(E(g,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),m=>r()[0]=m,()=>{var m;return(m=r())==null?void 0:m[0]})}),R(u,v)};D(y,u=>{t.constructors[1]?u(G):u(H,-1)})}var z=lt(y,2);{var J=u=>{var h=At(),v=ht(h);{var O=g=>{var E=Rt();gt(()=>Pt(E,l(s))),R(g,E)};D(v,g=>{l(a)&&g(O)})}vt(h),R(u,h)};D(z,u=>{l(i)&&u(J)})}R(e,P),ft()}const Mt=Tt(It),Nt=[()=>b(()=>import("../nodes/0.C7EsZXea.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url),()=>b(()=>import("../nodes/1.BfugAG4h.js"),__vite__mapDeps([13,1,2,6,7]),import.meta.url),()=>b(()=>import("../nodes/2._YbGDT13.js"),__vite__mapDeps([14,1,2,11,15,8,9,5,10,16,7,17,18,19]),import.meta.url),()=>b(()=>import("../nodes/3.7DONSlfO.js"),__vite__mapDeps([20,1,2,4,16,15,6,7,21,5,3,9,22,23]),import.meta.url),()=>b(()=>import("../nodes/4.D_QEjY63.js"),__vite__mapDeps([24,1,2,4,6,7,21,16,5,3,9,22,25,17,18,26,11,27]),import.meta.url),()=>b(()=>import("../nodes/5.CuscLKzC.js"),__vite__mapDeps([28,1,2,21,4,16,5,3,9,22,25,17,18,26]),import.meta.url)],Bt=[],Ft={"/":[2],"/print/[queryId]":[3],"/q/sample":[5],"/q/[queryId]":[4]},Y={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},Lt=Object.fromEntries(Object.entries(Y.transport).map(([e,t])=>[e,t.decode])),Yt=Object.fromEntries(Object.entries(Y.transport).map(([e,t])=>[e,t.encode])),Gt=!1,Ht=(e,t)=>Lt[e](t);export{Ht as decode,Lt as decoders,Ft as dictionary,Yt as encoders,Gt as hash,Y as hooks,St as matchers,Nt as nodes,Mt as root,Bt as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{l as o,a as r}from"../chunks/D30NfLoU.js";export{o as load_css,r as start};
|
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{l as o,a as r}from"../chunks/BRRh3tKo.js";export{o as load_css,r as start};
|
|
|
|
|
|
|
@@ -1,2 +1,2 @@
|
|
| 1 |
-
import{c as E,a as u,s as M,f as v,d as z,e as H}from"../chunks/CWw6qgC_.js";import{p as O,f as R,o as p,a as $,al as f,s as t,c as o,r as i,t as P,aR as L}from"../chunks/BTUA7_xE.js";import{b as r,s as W}from"../chunks/DxQlA7U2.js";import{i as x}from"../chunks/Bd-v_9Ud.js";import{p as B}from"../chunks/CW0zSL4D.js";import{p as D}from"../chunks/
|
| 2 |
For residents, see <a href="https://www.floodhelpny.org">FloodHelpNY</a> · <a href="https://www.floodnet.nyc">FloodNet NYC</a>.</p> <p class="app-footer-build">All foundation models Apache-2.0 · All data from public-record federal, state, and city sources · No commercial APIs contacted at runtime · Riprap v0.5.0 · build 2026-05-07</p> <p class="app-footer-credits">Dam mark: <a href="https://thenounproject.com/icon/dam-4516918/">"Dam" by Chintuza</a> via the Noun Project, CC-BY 3.0.</p></div></footer>`);function ie(h){var l=oe();u(h,l)}var pe=v('<a href="#region-briefing" class="skip-link">Skip to briefing</a> <a href="#region-map" class="skip-link" style="left: -9999px;">Skip to map</a> <a href="#region-trace" class="skip-link" style="left: -9999px;">Skip to trace</a>',1);function le(h){var l=pe();L(4),u(h,l)}var de=v("<!> <!>",1),ce=v('<!> <main class="svelte-12qhfyh"><!></main> <!>',1);function ke(h,l){O(l,!0);let N=f(()=>()=>{const e=D.params.queryId;if(!e)return null;try{return decodeURIComponent(e)}catch{return e}}),T=f(()=>D.url.pathname.startsWith("/print/")),k=f(()=>D.url.pathname==="/"),g=f(()=>p(T)||p(k));var m=ce(),w=R(m);{var A=e=>{var C=de(),S=R(C);le(S);var s=t(S,2);{let c=f(()=>p(N)());ne(s,{get query(){return p(c)},onResetCold:()=>window.location.href="/"})}u(e,C)};x(w,e=>{p(g)||e(A)})}var _=t(w,2),j=o(_);W(j,()=>l.children),i(_);var a=t(_,2);{var d=e=>{ie(e)};x(a,e=>{p(g)||e(d)})}u(h,m),$()}export{ke as component,xe as universal};
|
|
|
|
| 1 |
+
import{c as E,a as u,s as M,f as v,d as z,e as H}from"../chunks/CWw6qgC_.js";import{p as O,f as R,o as p,a as $,al as f,s as t,c as o,r as i,t as P,aR as L}from"../chunks/BTUA7_xE.js";import{b as r,s as W}from"../chunks/DxQlA7U2.js";import{i as x}from"../chunks/Bd-v_9Ud.js";import{p as B}from"../chunks/CW0zSL4D.js";import{p as D}from"../chunks/3HH2ymBC.js";import{R as U}from"../chunks/DCD6_LXk.js";import{s as G}from"../chunks/B0XoTt7U.js";import"../chunks/DixtWtwq.js";const V=!0,J=!0,K="never",xe=Object.freeze(Object.defineProperty({__proto__:null,prerender:V,ssr:J,trailingSlash:K},Symbol.toStringTag,{value:"Module"}));var Q=v('<span class="status-sep svelte-1bjixce">·</span> <span class="status-step svelte-1bjixce"> </span>',1),X=v('<span class="status-sep svelte-1bjixce">·</span> <span class="status-progress svelte-1bjixce"> </span>',1),Z=v('<span class="status-sep svelte-1bjixce">·</span> <span class="status-err svelte-1bjixce"> </span>',1),ee=v('<span class="status svelte-1bjixce" aria-live="polite" aria-atomic="true"><span class="status-dot svelte-1bjixce" aria-hidden="true"></span> <span class="status-phase svelte-1bjixce"> </span> <!> <!> <!></span>');function ae(h,l){O(l,!0);const N={geocode:"geocoding",nta_resolve:"resolving NTA",sandy_inundation:"Sandy 2012",dep_stormwater:"DEP scenarios",floodnet:"FloodNet sensors",nyc311:"NYC 311 history",noaa_tides:"NOAA tides",nws_alerts:"NWS alerts",nws_obs:"NWS hourly obs",ttm_forecast:"TTM r2 surge (zero-shot)",ttm_311_forecast:"TTM r2 weekly 311",ttm_battery_surge:"TTM Battery (NYC fine-tune)",floodnet_forecast:"FloodNet recurrence forecast",ida_hwm_2021:"Ida 2021 HWMs",prithvi_eo_v2:"Ida 2021 polygons (baked lookup)",prithvi_eo_live:"Prithvi-NYC-Pluvial v2 segmentation",microtopo_lidar:"LiDAR microtopo",mta_entrance_exposure:"MTA entrances",nycha_development_exposure:"NYCHA developments",doe_school_exposure:"DOE schools",doh_hospital_exposure:"NYS DOH hospitals",terramind_synthesis:"TerraMind v1 synthesis",terramind_lulc:"TerraMind LULC",terramind_buildings:"TerraMind Buildings",eo_chip_fetch:"fetching S2/S1/DEM chip",rag_granite_embedding:"RAG retrieval",gliner_extract:"GLiNER typed extraction"};let T=f(()=>r.phase!=="idle"&&r.phase!=="done"),k=f(()=>{switch(r.phase){case"planning":return"planning intent";case"specialists":return"gathering evidence";case"reconciling":return"reconciling";case"streaming":return r.attempt>1?`writing (reroll ${r.attempt-1})`:"writing briefing";case"error":return"error";default:return""}}),g=f(()=>{const a=r.activeStep;return a?N[a]??a:null}),m=f(()=>{if(r.phase!=="specialists"&&r.phase!=="reconciling")return null;const a=r.firedCount,d=r.totalSpecialists;return d?`${a}/${d}`:a>0?`${a}`:null}),w=f(()=>r.phase==="error"?"err":"live");var A=E(),_=R(A);{var j=a=>{var d=ee(),e=t(o(d),2),C=o(e,!0);i(e);var S=t(e,2);{var s=n=>{var b=Q(),y=t(R(b),2),q=o(y,!0);i(y),P(()=>M(q,p(g))),u(n,b)};x(S,n=>{p(g)&&n(s)})}var c=t(S,2);{var F=n=>{var b=X(),y=t(R(b),2),q=o(y,!0);i(y),P(()=>M(q,p(m))),u(n,b)};x(c,n=>{p(m)&&n(F)})}var Y=t(c,2);{var I=n=>{var b=Z(),y=t(R(b),2),q=o(y,!0);i(y),P(()=>M(q,r.errorMessage)),u(n,b)};x(Y,n=>{r.phase==="error"&&r.errorMessage&&n(I)})}i(d),P(()=>{G(d,"data-kind",p(w)),M(C,p(k))}),u(a,d)};x(_,a=>{p(T)&&a(j)})}u(h,A),$()}var re=v('<button type="button" class="app-header-query" aria-label="Edit query"><span class="app-header-query-icon" aria-hidden="true">⌕</span> <span class="app-header-query-text"> </span> <span class="app-header-query-edit">edit</span></button>'),te=v('<button type="button" class="app-header-link app-header-link-button svelte-f1belb" aria-label="Open curated PDF view of completed briefing in new tab">export PDF</button>'),se=v('<header class="app-header no-print" data-screen-label="App header"><div class="app-header-inner"><div class="app-header-left"><a href="/" class="riprap-wordmark" aria-label="Riprap — home"><!>riprap</a> <span class="app-header-sep">/</span> <span class="app-header-context">flood-exposure briefing</span></div> <div class="app-header-mid"><!></div> <div class="app-header-right"><a class="app-header-link" href="#methodology">methodology</a> <!> <!></div></div></header>');function ne(h,l){O(l,!0);let N=B(l,"query",3,null);function T(){if(typeof window>"u")return;const s=D.params.queryId??(D.url.pathname==="/q/sample"?"sample":"");s&&window.open(`/print/${encodeURIComponent(s)}`,"_blank","noopener")}var k=se(),g=o(k),m=o(g),w=o(m),A=o(w);U(A,{size:20}),L(),i(w),L(4),i(m);var _=t(m,2),j=o(_);{var a=s=>{var c=re(),F=t(o(c),2),Y=o(F,!0);i(F),L(2),i(c),P(()=>M(Y,N())),H("click",c,function(...I){var n;(n=l.onResetCold)==null||n.apply(this,I)}),u(s,c)};x(j,s=>{N()&&s(a)})}i(_);var d=t(_,2),e=t(o(d),2);{var C=s=>{var c=te();H("click",c,T),u(s,c)};x(e,s=>{r.ready&&s(C)})}var S=t(e,2);ae(S,{}),i(d),i(g),i(k),u(h,k),$()}z(["click"]);var oe=v(`<footer class="app-footer no-print"><div class="app-footer-inner"><p class="app-footer-guard"><strong>Riprap does not predict damage.</strong> This tool is for professional analytical work, not personal property decisions.
|
| 2 |
For residents, see <a href="https://www.floodhelpny.org">FloodHelpNY</a> · <a href="https://www.floodnet.nyc">FloodNet NYC</a>.</p> <p class="app-footer-build">All foundation models Apache-2.0 · All data from public-record federal, state, and city sources · No commercial APIs contacted at runtime · Riprap v0.5.0 · build 2026-05-07</p> <p class="app-footer-credits">Dam mark: <a href="https://thenounproject.com/icon/dam-4516918/">"Dam" by Chintuza</a> via the Noun Project, CC-BY 3.0.</p></div></footer>`);function ie(h){var l=oe();u(h,l)}var pe=v('<a href="#region-briefing" class="skip-link">Skip to briefing</a> <a href="#region-map" class="skip-link" style="left: -9999px;">Skip to map</a> <a href="#region-trace" class="skip-link" style="left: -9999px;">Skip to trace</a>',1);function le(h){var l=pe();L(4),u(h,l)}var de=v("<!> <!>",1),ce=v('<!> <main class="svelte-12qhfyh"><!></main> <!>',1);function ke(h,l){O(l,!0);let N=f(()=>()=>{const e=D.params.queryId;if(!e)return null;try{return decodeURIComponent(e)}catch{return e}}),T=f(()=>D.url.pathname.startsWith("/print/")),k=f(()=>D.url.pathname==="/"),g=f(()=>p(T)||p(k));var m=ce(),w=R(m);{var A=e=>{var C=de(),S=R(C);le(S);var s=t(S,2);{let c=f(()=>p(N)());ne(s,{get query(){return p(c)},onResetCold:()=>window.location.href="/"})}u(e,C)};x(w,e=>{p(g)||e(A)})}var _=t(w,2),j=o(_);W(j,()=>l.children),i(_);var a=t(_,2);{var d=e=>{ie(e)};x(a,e=>{p(g)||e(d)})}u(h,m),$()}export{ke as component,xe as universal};
|
|
@@ -1 +1 @@
|
|
| 1 |
-
import{a as c,f as u,s as e}from"../chunks/CWw6qgC_.js";import{p as v,f as l,t as _,a as g,c as p,r as o,s as x}from"../chunks/BTUA7_xE.js";import{p as m}from"../chunks/
|
|
|
|
| 1 |
+
import{a as c,f as u,s as e}from"../chunks/CWw6qgC_.js";import{p as v,f as l,t as _,a as g,c as p,r as o,s as x}from"../chunks/BTUA7_xE.js";import{p as m}from"../chunks/3HH2ymBC.js";var d=u("<h1> </h1> <p> </p>",1);function k(f,i){v(i,!0);var t=d(),r=l(t),h=p(r,!0);o(r);var a=x(r,2),n=p(a,!0);o(a),_(()=>{var s;e(h,m.status),e(n,(s=m.error)==null?void 0:s.message)}),c(f,t),g()}export{k as component};
|
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{a as m,f as w,d as D,l as I,e as G,s as g}from"../chunks/CWw6qgC_.js";import"../chunks/DixtWtwq.js";import{b9 as U,y as S,ar as K,$ as R,_ as V,h as Q,Y as Z,aq as J,am as E,ba as q,bb as X,o as d,bc as ee,af as ae,c,aR as k,r as o,p as P,a5 as N,a as M,a4 as A,s as f,t as T,ai as se,Z as te,ak as re}from"../chunks/BTUA7_xE.js";import{h as ne}from"../chunks/cDW0xQNP.js";import{R as le}from"../chunks/DCD6_LXk.js";import{e as $}from"../chunks/25_y8TFd.js";import{r as ie,a as oe,s as de,b as ce}from"../chunks/B0XoTt7U.js";import{g as B}from"../chunks/
|
| 2 |
with Sandy high-water marks recorded <span class="land-preview-cite svelte-1anw2jf">4.7 ft above grade <sup class="svelte-1anw2jf">[c1]</sup></span>.
|
| 3 |
FloodNet FN-BK-018 has logged <span class="land-preview-cite svelte-1anw2jf">14 nuisance floods since 2023 <sup class="svelte-1anw2jf">[c2]</sup></span>.</p> <div class="land-preview-cites svelte-1anw2jf"><div class="land-preview-cite-row svelte-1anw2jf"><span class="land-preview-cite-pin svelte-1anw2jf">[c1]</span> <span class="land-preview-cite-src svelte-1anw2jf">USGS HWM · Sandy 2012</span> <span class="land-preview-cite-tier svelte-1anw2jf">empirical</span></div> <div class="land-preview-cite-row svelte-1anw2jf"><span class="land-preview-cite-pin svelte-1anw2jf">[c2]</span> <span class="land-preview-cite-src svelte-1anw2jf">FloodNet FN-BK-018</span> <span class="land-preview-cite-tier svelte-1anw2jf">empirical</span></div> <div class="land-preview-cite-row svelte-1anw2jf"><span class="land-preview-cite-pin svelte-1anw2jf">[c3]</span> <span class="land-preview-cite-src svelte-1anw2jf">FEMA NFHL · 36047C0207</span> <span class="land-preview-cite-tier svelte-1anw2jf">modeled</span></div></div></div> <div class="land-preview-pane land-preview-pane-cards svelte-1anw2jf"><div class="land-preview-eyebrow svelte-1anw2jf">Evidence cards</div> <div class="land-evcard-grid svelte-1anw2jf"><article class="land-evcard land-evcard-empirical svelte-1anw2jf"><header class="land-evcard-head svelte-1anw2jf"><span class="land-evcard-tier svelte-1anw2jf">empirical</span> <span class="land-evcard-id svelte-1anw2jf">e1</span></header> <div class="land-evcard-claim svelte-1anw2jf">4.7 ft Sandy storm-surge HWM at address</div> <div class="land-evcard-source svelte-1anw2jf">USGS High-Water Mark database · 2012</div></article> <article class="land-evcard land-evcard-empirical svelte-1anw2jf"><header class="land-evcard-head svelte-1anw2jf"><span class="land-evcard-tier svelte-1anw2jf">empirical</span> <span class="land-evcard-id svelte-1anw2jf">e2</span></header> <div class="land-evcard-claim svelte-1anw2jf">14 nuisance-flood events, 2023–2026</div> <div class="land-evcard-source svelte-1anw2jf">FloodNet FN-BK-018 · 2 blocks north</div></article> <article class="land-evcard land-evcard-modeled svelte-1anw2jf"><header class="land-evcard-head svelte-1anw2jf"><span class="land-evcard-tier svelte-1anw2jf">modeled</span> <span class="land-evcard-id svelte-1anw2jf">e3</span></header> <div class="land-evcard-claim svelte-1anw2jf">FEMA 1% annual-chance (AE) flood zone</div> <div class="land-evcard-source svelte-1anw2jf">FEMA NFHL · panel 36047C0207</div></article> <article class="land-evcard land-evcard-modeled svelte-1anw2jf"><header class="land-evcard-head svelte-1anw2jf"><span class="land-evcard-tier svelte-1anw2jf">modeled</span> <span class="land-evcard-id svelte-1anw2jf">e5</span></header> <div class="land-evcard-claim svelte-1anw2jf">+30 in MSL by 2070 (NPCC4 high)</div> <div class="land-evcard-source svelte-1anw2jf">NPCC4 SLR projection · 2024</div></article></div></div> <div class="land-preview-pane land-preview-pane-map svelte-1anw2jf"><div class="land-preview-eyebrow svelte-1anw2jf">Map</div> <!> <div class="land-preview-mapmeta svelte-1anw2jf">80 Pioneer St, Red Hook · z14.5 · Carto Positron</div></div></div></section>`);function ke(e){var s=Se(),r=f(c(s),2),t=f(c(r),4),a=f(c(t),2);_e(a,{}),k(2),o(t),o(r),o(s),m(e,s)}var Fe=w('<article class="land-stones-detail-cell svelte-1v6nt1t"><div class="land-stones-detail-num svelte-1v6nt1t"> </div> <h3 class="land-stones-detail-name svelte-1v6nt1t"> </h3> <div class="land-stones-detail-role svelte-1v6nt1t"> </div> <p class="land-stones-detail-tag svelte-1v6nt1t"> </p> <div class="land-stones-detail-sources svelte-1v6nt1t"> </div></article>'),xe=w(`<section class="land-section-stones-detail svelte-1v6nt1t" id="methodology"><div class="land-page svelte-1v6nt1t"><div class="land-section-head svelte-1v6nt1t"><span class="section-label">How Riprap reads a place</span> <span class="land-section-meta svelte-1v6nt1t">Five Stones · one taxonomy · every briefing</span></div> <p class="land-stones-deck svelte-1v6nt1t">Each briefing routes through a fixed taxonomy of public-record specialists. Each Stone is a class of evidence.
|
| 4 |
Together they form the briefing, and every claim in the output traces back to the Stone that produced it.</p> <div class="land-stones-detail svelte-1v6nt1t"></div></div></section>`);function Le(e,s){P(s,!1);const r=[{name:"Cornerstone",role:"the hazard reader",tag:"what NYC's ground remembers",sources:"USGS HWMs · FEMA NFHL · DEP stormwater · Prithvi historical",tint:"var(--stone-cornerstone)"},{name:"Keystone",role:"the asset register",tag:"what's exposed",sources:"MTA · NYCHA · DOE · DOH · PLUTO",tint:"var(--stone-keystone)"},{name:"Touchstone",role:"the live observer",tag:"what's happening now",sources:"FloodNet sensors · 311 complaints · NWS · NOAA tide gauges",tint:"var(--stone-touchstone)"},{name:"Lodestone",role:"the projector",tag:"what's coming",sources:"NPCC4 · Granite TTM (zero-shot + NYC fine-tune) · NWS alerts",tint:"var(--stone-lodestone)"},{name:"Capstone",role:"the synthesizer",tag:"writes it all down",sources:"Granite 4.1 composer · Mellea grounding-check · WeasyPrint",tint:"var(--stone-capstone)"}];me();var t=xe(),a=c(t),n=f(c(a),4);$(n,7,()=>r,u=>u.name,(u,l,v)=>{var i=Fe();let j;var y=c(i),p=c(y,!0);o(y);var b=f(y,2),F=c(b,!0);o(b);var h=f(b,2),x=c(h,!0);o(h);var _=f(h,2),O=c(_,!0);o(_);var z=f(_,2),W=c(z,!0);o(z),o(i),T(Y=>{j=ce(i,"",j,{"--stone-tint":d(l).tint}),g(p,Y),g(F,d(l).name),g(x,d(l).role),g(O,d(l).tag),g(W,d(l).sources)},[()=>String(d(v)+1).padStart(2,"0")]),m(u,i)}),o(n),o(a),o(t),m(e,t),M()}var Ce=w('<footer class="land-footer svelte-1dcj612"><span class="land-footer-tiers svelte-1dcj612"><span class="land-footer-tier svelte-1dcj612"><span class="lm-sw lm-sw-emp svelte-1dcj612"></span>empirical</span> <span class="land-footer-tier svelte-1dcj612"><span class="lm-sw lm-sw-mod svelte-1dcj612"></span>modeled</span> <span class="land-footer-tier svelte-1dcj612"><span class="lm-sw lm-sw-prx svelte-1dcj612"></span>proxy</span> <span class="land-footer-tier svelte-1dcj612"><span class="lm-sw lm-sw-syn svelte-1dcj612"></span>synthetic</span></span> <span class="land-footer-build">Riprap v0.4.6 · NYC OpenData · FEMA NFHL · USGS · NPCC4 · Dam mark by Chintuza, Noun Project (CC-BY)</span></footer>');function Ee(e){var s=Ce();m(e,s)}var Ne=w('<meta name="description" content="A citation-grounded flood-exposure briefing tool for any address, neighborhood, or BBL in New York City."/>'),Ae=w('<div class="land svelte-1uha8ag"><!> <div class="land-page svelte-1uha8ag"><!> <!></div> <!> <!></div>');function We(e){var s=Ae();ne("1uha8ag",v=>{var i=Ne();te(()=>{re.title="Riprap — Flood Exposure Briefing for NYC"}),m(v,i)});var r=c(s);he(r);var t=f(r,2),a=c(t);je(a,{});var n=f(a,2);ke(n),o(t);var u=f(t,2);Le(u,{});var l=f(u,2);Ee(l),o(s),m(e,s)}export{We as component};
|
|
|
|
| 1 |
+
import{a as m,f as w,d as D,l as I,e as G,s as g}from"../chunks/CWw6qgC_.js";import"../chunks/DixtWtwq.js";import{b9 as U,y as S,ar as K,$ as R,_ as V,h as Q,Y as Z,aq as J,am as E,ba as q,bb as X,o as d,bc as ee,af as ae,c,aR as k,r as o,p as P,a5 as N,a as M,a4 as A,s as f,t as T,ai as se,Z as te,ak as re}from"../chunks/BTUA7_xE.js";import{h as ne}from"../chunks/cDW0xQNP.js";import{R as le}from"../chunks/DCD6_LXk.js";import{e as $}from"../chunks/25_y8TFd.js";import{r as ie,a as oe,s as de,b as ce}from"../chunks/B0XoTt7U.js";import{g as B}from"../chunks/D30NfLoU.js";import{b as ve,_ as pe}from"../chunks/CXQd8Y6F.js";import{P as fe}from"../chunks/D907np-5.js";function ue(e,s,r=s){var t=new WeakSet;U(e,"input",async a=>{var n=a?e.defaultValue:e.value;if(n=L(e)?C(n):n,r(n),S!==null&&t.add(S),await K(),n!==(n=s())){var u=e.selectionStart,l=e.selectionEnd,v=e.value.length;if(e.value=n??"",l!==null){var i=e.value.length;u===l&&l===v&&i>v?(e.selectionStart=i,e.selectionEnd=i):(e.selectionStart=u,e.selectionEnd=Math.min(l,i))}}}),(Q&&e.defaultValue!==e.value||R(s)==null&&e.value)&&(r(L(e)?C(e.value):e.value),S!==null&&t.add(S)),V(()=>{var a=s();if(e===document.activeElement){var n=S;if(t.has(n))return}L(e)&&a===C(e.value)||e.type==="date"&&!a&&!e.value||a!==e.value&&(e.value=a??"")})}function L(e){var s=e.type;return s==="number"||s==="range"}function C(e){return e===""?null:+e}function me(e=!1){const s=Z,r=s.l.u;if(!r)return;let t=()=>ee(s.s);if(e){let a=0,n={};const u=ae(()=>{let l=!1;const v=s.s;for(const i in v)v[i]!==n[i]&&(n[i]=v[i],l=!0);return l&&a++,a});t=()=>d(u)}r.b.length&&J(()=>{H(s,t),q(r.b)}),E(()=>{const a=R(()=>r.m.map(X));return()=>{for(const n of a)typeof n=="function"&&n()}}),r.a.length&&E(()=>{H(s,t),q(r.a)})}function H(e,s){if(e.l.s)for(const r of e.l.s)d(r);s()}var we=w('<header class="land-header svelte-1ct2rgk"><span class="riprap-wordmark"><!>riprap</span> <span class="land-header-sep svelte-1ct2rgk">/</span> <span class="land-header-context svelte-1ct2rgk">Flood Exposure Briefing · NYC</span> <nav class="land-header-nav svelte-1ct2rgk"><a href="#methodology" class="svelte-1ct2rgk">Methodology</a> <a href="#sources" class="svelte-1ct2rgk">Sources</a></nav></header>');function he(e){var s=we(),r=c(s),t=c(r);le(t,{size:22}),k(),o(r),k(6),o(s),m(e,s)}var ye=w("<span> </span>"),ge=w('<main class="land-hero svelte-drzq4r"><h1 class="land-hero-h1 svelte-drzq4r"><span class="land-hero-headline svelte-drzq4r">A flood exposure briefing<br/> for <em class="svelte-drzq4r">any place</em> in New York City.</span> <span class="land-hero-deck svelte-drzq4r">Type an address. Get a written briefing where every numeric claim links to its primary public-record source.</span></h1> <form class="land-query svelte-drzq4r" role="search"><span class="land-query-prompt svelte-drzq4r" aria-hidden="true">›</span> <input type="text" placeholder="Address, neighborhood, or BBL. e.g. 80 Pioneer Street, Red Hook" class="land-query-input svelte-drzq4r" aria-label="Query an address, neighborhood, or BBL"/> <button type="submit" class="land-query-submit svelte-drzq4r">Brief this place →</button></form> <div class="land-cycling svelte-drzq4r" aria-live="polite"><span class="land-cycling-label svelte-drzq4r">Try:</span> <button type="button" class="land-cycling-rail svelte-drzq4r" title="Run this example"></button></div></main>');function je(e,s){P(s,!0);const r=["80 Pioneer Street, Red Hook","Coney Island Hospital","PS 188, Lower East Side","Hammels Houses, Rockaway","Bowling Green station","555 W 57th Street"];let t=A(""),a=A(0);E(()=>{if(typeof window>"u")return;const p=setInterval(()=>{N(a,(d(a)+1)%r.length)},2200);return()=>clearInterval(p)});function n(){const p=d(t).trim();p&&B(`/q/${encodeURIComponent(p)}`)}function u(){const p=r[d(a)];B(`/q/${encodeURIComponent(p)}`)}var l=ge(),v=f(c(l),2),i=f(c(v),2);ie(i),k(2),o(v);var j=f(v,2),y=f(c(j),2);$(y,22,()=>r,p=>p,(p,b,F)=>{var h=ye();let x;var _=c(h,!0);o(h),T(()=>{x=oe(h,1,"land-cycling-item svelte-drzq4r",null,x,{"is-active":d(F)===d(a)}),de(h,"aria-hidden",d(F)!==d(a)),g(_,b)}),m(p,h)}),o(y),o(j),o(l),I("submit",v,p=>{p.preventDefault(),n()}),ue(i,()=>d(t),p=>N(t,p)),G("click",y,u),m(e,l),M()}D(["click"]);var be=w('<div class="land-mapmini svelte-1g1r73s" role="img" aria-label="Live mini-map preview of Red Hook flood exposure layers"><div class="land-mapmini-canvas svelte-1g1r73s"></div> <div class="land-mapmini-legend svelte-1g1r73s"><span class="svelte-1g1r73s"><span class="lm-sw lm-sw-emp svelte-1g1r73s"></span>empirical</span> <span class="svelte-1g1r73s"><span class="lm-sw lm-sw-mod svelte-1g1r73s"></span>modeled</span> <span class="svelte-1g1r73s"><span class="lm-sw lm-sw-prx svelte-1g1r73s"></span>proxy</span></div></div>');function _e(e,s){P(s,!0);const r=[-74.0096,40.6776];let t=A(null),a=null;se(()=>{let l=!1;return(async()=>{if(!d(t)||l)return;const v=await pe(()=>import("../chunks/D4L2lGt1.js").then(i=>i.m),[],import.meta.url);l||!d(t)||(a=new v.Map({container:d(t),style:fe,center:r,zoom:14.5,interactive:!1,attributionControl:!1}),a.on("load",()=>{a&&(a.addSource("fema-ae",{type:"geojson",data:{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[-74.014,40.679],[-74.007,40.68],[-74.005,40.677],[-74.009,40.6755],[-74.014,40.679]]]}}]}}),a.addLayer({id:"fema-ae-fill",type:"fill",source:"fema-ae",paint:{"fill-color":"#2A6FA8","fill-opacity":.22}}),a.addLayer({id:"fema-ae-line",type:"line",source:"fema-ae",paint:{"line-color":"#2A6FA8","line-width":1,"line-dasharray":[3,2]}}),a.addSource("hwm-contour",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"LineString",coordinates:[[-74.0125,40.679],[-74.0105,40.6792],[-74.008,40.679],[-74.006,40.6786]]}}}),a.addLayer({id:"hwm-contour-line",type:"line",source:"hwm-contour",paint:{"line-color":"#0B5394","line-width":1.4}}),a.addSource("proxy-311",{type:"geojson",data:{type:"FeatureCollection",features:[[-74.0118,40.677],[-74.0114,40.6767],[-74.0121,40.6772]].map(i=>({type:"Feature",properties:{},geometry:{type:"Point",coordinates:i}}))}}),a.addLayer({id:"proxy-311-circle",type:"circle",source:"proxy-311",paint:{"circle-radius":3,"circle-color":"transparent","circle-stroke-color":"#6B6B6B","circle-stroke-width":1}}),a.addSource("floodnet",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"Point",coordinates:[-74.0103,40.6788]}}}),a.addLayer({id:"floodnet-pin",type:"circle",source:"floodnet",paint:{"circle-radius":4,"circle-color":"#0B5394","circle-stroke-color":"#FFFFFF","circle-stroke-width":1}}),a.addSource("addr",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"Point",coordinates:r}}}),a.addLayer({id:"addr-ring",type:"circle",source:"addr",paint:{"circle-radius":9,"circle-color":"transparent","circle-stroke-color":"#0F172A","circle-stroke-width":1.4}}),a.addLayer({id:"addr-dot",type:"circle",source:"addr",paint:{"circle-radius":3,"circle-color":"#0F172A"}}))}))})(),()=>{l=!0,a&&(a.remove(),a=null)}});var n=be(),u=c(n);ve(u,l=>N(t,l),()=>d(t)),k(2),o(n),m(e,n),M()}var Se=w(`<section class="land-section svelte-1anw2jf"><div class="land-section-head svelte-1anw2jf"><span class="section-label">What you'll get back</span> <span class="land-section-meta svelte-1anw2jf">A grounded paragraph with citations, not a chatbot answer.</span></div> <div class="land-preview-grid svelte-1anw2jf"><div class="land-preview-pane land-preview-pane-excerpt svelte-1anw2jf"><div class="land-preview-eyebrow svelte-1anw2jf">Briefing excerpt</div> <p class="land-preview-body svelte-1anw2jf">The lot sits inside the FEMA <span class="land-preview-cite svelte-1anw2jf">1% AE flood zone <sup class="svelte-1anw2jf">[c3]</sup></span>,
|
| 2 |
with Sandy high-water marks recorded <span class="land-preview-cite svelte-1anw2jf">4.7 ft above grade <sup class="svelte-1anw2jf">[c1]</sup></span>.
|
| 3 |
FloodNet FN-BK-018 has logged <span class="land-preview-cite svelte-1anw2jf">14 nuisance floods since 2023 <sup class="svelte-1anw2jf">[c2]</sup></span>.</p> <div class="land-preview-cites svelte-1anw2jf"><div class="land-preview-cite-row svelte-1anw2jf"><span class="land-preview-cite-pin svelte-1anw2jf">[c1]</span> <span class="land-preview-cite-src svelte-1anw2jf">USGS HWM · Sandy 2012</span> <span class="land-preview-cite-tier svelte-1anw2jf">empirical</span></div> <div class="land-preview-cite-row svelte-1anw2jf"><span class="land-preview-cite-pin svelte-1anw2jf">[c2]</span> <span class="land-preview-cite-src svelte-1anw2jf">FloodNet FN-BK-018</span> <span class="land-preview-cite-tier svelte-1anw2jf">empirical</span></div> <div class="land-preview-cite-row svelte-1anw2jf"><span class="land-preview-cite-pin svelte-1anw2jf">[c3]</span> <span class="land-preview-cite-src svelte-1anw2jf">FEMA NFHL · 36047C0207</span> <span class="land-preview-cite-tier svelte-1anw2jf">modeled</span></div></div></div> <div class="land-preview-pane land-preview-pane-cards svelte-1anw2jf"><div class="land-preview-eyebrow svelte-1anw2jf">Evidence cards</div> <div class="land-evcard-grid svelte-1anw2jf"><article class="land-evcard land-evcard-empirical svelte-1anw2jf"><header class="land-evcard-head svelte-1anw2jf"><span class="land-evcard-tier svelte-1anw2jf">empirical</span> <span class="land-evcard-id svelte-1anw2jf">e1</span></header> <div class="land-evcard-claim svelte-1anw2jf">4.7 ft Sandy storm-surge HWM at address</div> <div class="land-evcard-source svelte-1anw2jf">USGS High-Water Mark database · 2012</div></article> <article class="land-evcard land-evcard-empirical svelte-1anw2jf"><header class="land-evcard-head svelte-1anw2jf"><span class="land-evcard-tier svelte-1anw2jf">empirical</span> <span class="land-evcard-id svelte-1anw2jf">e2</span></header> <div class="land-evcard-claim svelte-1anw2jf">14 nuisance-flood events, 2023–2026</div> <div class="land-evcard-source svelte-1anw2jf">FloodNet FN-BK-018 · 2 blocks north</div></article> <article class="land-evcard land-evcard-modeled svelte-1anw2jf"><header class="land-evcard-head svelte-1anw2jf"><span class="land-evcard-tier svelte-1anw2jf">modeled</span> <span class="land-evcard-id svelte-1anw2jf">e3</span></header> <div class="land-evcard-claim svelte-1anw2jf">FEMA 1% annual-chance (AE) flood zone</div> <div class="land-evcard-source svelte-1anw2jf">FEMA NFHL · panel 36047C0207</div></article> <article class="land-evcard land-evcard-modeled svelte-1anw2jf"><header class="land-evcard-head svelte-1anw2jf"><span class="land-evcard-tier svelte-1anw2jf">modeled</span> <span class="land-evcard-id svelte-1anw2jf">e5</span></header> <div class="land-evcard-claim svelte-1anw2jf">+30 in MSL by 2070 (NPCC4 high)</div> <div class="land-evcard-source svelte-1anw2jf">NPCC4 SLR projection · 2024</div></article></div></div> <div class="land-preview-pane land-preview-pane-map svelte-1anw2jf"><div class="land-preview-eyebrow svelte-1anw2jf">Map</div> <!> <div class="land-preview-mapmeta svelte-1anw2jf">80 Pioneer St, Red Hook · z14.5 · Carto Positron</div></div></div></section>`);function ke(e){var s=Se(),r=f(c(s),2),t=f(c(r),4),a=f(c(t),2);_e(a,{}),k(2),o(t),o(r),o(s),m(e,s)}var Fe=w('<article class="land-stones-detail-cell svelte-1v6nt1t"><div class="land-stones-detail-num svelte-1v6nt1t"> </div> <h3 class="land-stones-detail-name svelte-1v6nt1t"> </h3> <div class="land-stones-detail-role svelte-1v6nt1t"> </div> <p class="land-stones-detail-tag svelte-1v6nt1t"> </p> <div class="land-stones-detail-sources svelte-1v6nt1t"> </div></article>'),xe=w(`<section class="land-section-stones-detail svelte-1v6nt1t" id="methodology"><div class="land-page svelte-1v6nt1t"><div class="land-section-head svelte-1v6nt1t"><span class="section-label">How Riprap reads a place</span> <span class="land-section-meta svelte-1v6nt1t">Five Stones · one taxonomy · every briefing</span></div> <p class="land-stones-deck svelte-1v6nt1t">Each briefing routes through a fixed taxonomy of public-record specialists. Each Stone is a class of evidence.
|
| 4 |
Together they form the briefing, and every claim in the output traces back to the Stone that produced it.</p> <div class="land-stones-detail svelte-1v6nt1t"></div></div></section>`);function Le(e,s){P(s,!1);const r=[{name:"Cornerstone",role:"the hazard reader",tag:"what NYC's ground remembers",sources:"USGS HWMs · FEMA NFHL · DEP stormwater · Prithvi historical",tint:"var(--stone-cornerstone)"},{name:"Keystone",role:"the asset register",tag:"what's exposed",sources:"MTA · NYCHA · DOE · DOH · PLUTO",tint:"var(--stone-keystone)"},{name:"Touchstone",role:"the live observer",tag:"what's happening now",sources:"FloodNet sensors · 311 complaints · NWS · NOAA tide gauges",tint:"var(--stone-touchstone)"},{name:"Lodestone",role:"the projector",tag:"what's coming",sources:"NPCC4 · Granite TTM (zero-shot + NYC fine-tune) · NWS alerts",tint:"var(--stone-lodestone)"},{name:"Capstone",role:"the synthesizer",tag:"writes it all down",sources:"Granite 4.1 composer · Mellea grounding-check · WeasyPrint",tint:"var(--stone-capstone)"}];me();var t=xe(),a=c(t),n=f(c(a),4);$(n,7,()=>r,u=>u.name,(u,l,v)=>{var i=Fe();let j;var y=c(i),p=c(y,!0);o(y);var b=f(y,2),F=c(b,!0);o(b);var h=f(b,2),x=c(h,!0);o(h);var _=f(h,2),O=c(_,!0);o(_);var z=f(_,2),W=c(z,!0);o(z),o(i),T(Y=>{j=ce(i,"",j,{"--stone-tint":d(l).tint}),g(p,Y),g(F,d(l).name),g(x,d(l).role),g(O,d(l).tag),g(W,d(l).sources)},[()=>String(d(v)+1).padStart(2,"0")]),m(u,i)}),o(n),o(a),o(t),m(e,t),M()}var Ce=w('<footer class="land-footer svelte-1dcj612"><span class="land-footer-tiers svelte-1dcj612"><span class="land-footer-tier svelte-1dcj612"><span class="lm-sw lm-sw-emp svelte-1dcj612"></span>empirical</span> <span class="land-footer-tier svelte-1dcj612"><span class="lm-sw lm-sw-mod svelte-1dcj612"></span>modeled</span> <span class="land-footer-tier svelte-1dcj612"><span class="lm-sw lm-sw-prx svelte-1dcj612"></span>proxy</span> <span class="land-footer-tier svelte-1dcj612"><span class="lm-sw lm-sw-syn svelte-1dcj612"></span>synthetic</span></span> <span class="land-footer-build">Riprap v0.4.6 · NYC OpenData · FEMA NFHL · USGS · NPCC4 · Dam mark by Chintuza, Noun Project (CC-BY)</span></footer>');function Ee(e){var s=Ce();m(e,s)}var Ne=w('<meta name="description" content="A citation-grounded flood-exposure briefing tool for any address, neighborhood, or BBL in New York City."/>'),Ae=w('<div class="land svelte-1uha8ag"><!> <div class="land-page svelte-1uha8ag"><!> <!></div> <!> <!></div>');function We(e){var s=Ae();ne("1uha8ag",v=>{var i=Ne();te(()=>{re.title="Riprap — Flood Exposure Briefing for NYC"}),m(v,i)});var r=c(s);he(r);var t=f(r,2),a=c(t);je(a,{});var n=f(a,2);ke(n),o(t);var u=f(t,2);Le(u,{});var l=f(u,2);Ee(l),o(s),m(e,s)}export{We as component};
|
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{d as ge,c as he,a as v,s as l,e as xe,f as p}from"../chunks/CWw6qgC_.js";import{p as ye,ai as we,f as $e,a as ke,aj as qe,o as e,a5 as F,ak as je,al as d,a4 as I,c as a,s,r as t,t as M}from"../chunks/BTUA7_xE.js";import{i as O}from"../chunks/Bd-v_9Ud.js";import{e as Se}from"../chunks/25_y8TFd.js";import{h as Fe}from"../chunks/cDW0xQNP.js";import{p as Ie}from"../chunks/
|
| 2 |
use <strong>export PDF</strong> from the header to open this view.
|
| 3 |
Snapshots are stored per-browser and persist between runs of the same query.</p></div>`),Be=p('<div class="curl svelte-uialbm"> </div>'),De=p('<li class="svelte-uialbm"><span class="cn svelte-uialbm"> </span> <span class="cglyph svelte-uialbm"><!></span> <span class="csrc svelte-uialbm"> </span> <span class="cvint svelte-uialbm"> </span> <div class="ctitle svelte-uialbm"> </div> <!> <div class="cdocid svelte-uialbm">doc_id <code> </code></div></li>'),Ge=p('<section class="print-citations svelte-uialbm"><h2 class="svelte-uialbm">Citations</h2> <ol class="svelte-uialbm"></ol></section>'),ze=p('<article class="print-doc svelte-uialbm"><header class="print-head svelte-uialbm"><div class="print-head-top svelte-uialbm"><span class="wordmark svelte-uialbm">riprap</span> <span class="meta"> </span></div> <h1 class="print-title svelte-uialbm"> </h1> <div class="print-sub svelte-uialbm">intent <strong> </strong> </div></header> <div class="print-controls no-print svelte-uialbm"><button type="button" class="svelte-uialbm">print / save as PDF</button> <span class="hint svelte-uialbm"> </span></div> <!> <!> <footer class="print-foot svelte-uialbm"> </footer></article>'),Le=p('<div class="empty svelte-uialbm"><p>Loading…</p></div>');function Ve(Q,U){ye(U,!0);let V=d(()=>Ie.params.queryId??""),i=I(null),T=I(!1),P=I(!1);we(()=>{const r=Te(e(V));if(!r){F(T,!0);return}F(i,r,!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{typeof window<"u"&&(window.print(),F(P,!0))})})});function X(){typeof window<"u"&&window.print()}let R=d(()=>e(i)?Object.values(e(i).citations).sort((r,n)=>r.n-n.n):[]),A=d(()=>e(i)?new Date(e(i).generatedAt).toISOString().slice(0,10):"");var B=he();Fe("uialbm",r=>{qe(()=>{var n;je.title=`Riprap briefing — ${((n=e(i))==null?void 0:n.queryText)??"export"??""}`})});var Y=$e(B);{var Z=r=>{var n=Ae();v(r,n)},ee=r=>{var n=ze(),c=a(n),u=a(c),D=s(a(u),2),ae=a(D);t(D),t(u);var m=s(u,2),se=a(m,!0);t(m);var G=s(m,2),f=s(a(G)),re=a(f,!0);t(f);var ie=s(f);t(G),t(c);var b=s(c,2),z=a(b),L=s(z,2),ne=a(L,!0);t(L),t(b);var N=s(b,2);Me(N,{get blocks(){return e(i).blocks},get citations(){return e(i).citations},streaming:!1});var C=s(N,2);{var le=_=>{var g=Ge(),W=s(a(g),2);Se(W,21,()=>e(R),h=>h.id,(h,o)=>{var x=De(),y=a(x),ve=a(y);t(y);var w=s(y,2),pe=a(w);Oe(pe,{get tier(){return e(o).tier},size:9,get color(){return`var(--tier-${e(o).tier??""})`}}),t(w);var $=s(w,2),de=a($,!0);t($);var k=s($,2),ce=a(k);t(k);var q=s(k,2),ue=a(q,!0);t(q);var H=s(q,2);{var me=j=>{var S=Be(),_e=a(S,!0);t(S),M(()=>l(_e,e(o).url)),v(j,S)},fe=d(()=>e(o).url&&e(o).url.startsWith("http"));O(H,j=>{e(fe)&&j(me)})}var J=s(H,2),K=s(a(J)),be=a(K,!0);t(K),t(J),t(x),M(()=>{l(ve,`[${e(o).n??""}]`),l(de,e(o).source),l(ce,`v. ${e(o).vintage??""}`),l(ue,e(o).title),l(be,e(o).docId)}),v(h,x)}),t(W),t(g),v(_,g)};O(C,_=>{e(R).length&&_(le)})}var E=s(C,2),oe=a(E);t(E),t(n),M(()=>{l(ae,`flood-exposure briefing · v0.4.2 · ${e(A)??""}`),l(se,e(i).queryText),l(re,e(i).intent??"briefing"),l(ie,` · ${e(i).specialists??""} specialists
|
| 4 |
· ${e(i).attempts??1??""} reconcile${(e(i).attempts??1)===1?"":"s"}
|
|
|
|
| 1 |
+
import{d as ge,c as he,a as v,s as l,e as xe,f as p}from"../chunks/CWw6qgC_.js";import{p as ye,ai as we,f as $e,a as ke,aj as qe,o as e,a5 as F,ak as je,al as d,a4 as I,c as a,s,r as t,t as M}from"../chunks/BTUA7_xE.js";import{i as O}from"../chunks/Bd-v_9Ud.js";import{e as Se}from"../chunks/25_y8TFd.js";import{h as Fe}from"../chunks/cDW0xQNP.js";import{p as Ie}from"../chunks/3HH2ymBC.js";import{B as Me,T as Oe}from"../chunks/BatqQaKj.js";import{l as Te}from"../chunks/DxQlA7U2.js";const Pe=!1,Re=!1,Ue=Object.freeze(Object.defineProperty({__proto__:null,prerender:Pe,ssr:Re},Symbol.toStringTag,{value:"Module"}));var Ae=p(`<div class="empty svelte-uialbm"><h1 class="svelte-uialbm">No briefing snapshot found</h1> <p>Run a briefing first at <a href="/" class="svelte-uialbm">riprap home</a>; once it finishes,
|
| 2 |
use <strong>export PDF</strong> from the header to open this view.
|
| 3 |
Snapshots are stored per-browser and persist between runs of the same query.</p></div>`),Be=p('<div class="curl svelte-uialbm"> </div>'),De=p('<li class="svelte-uialbm"><span class="cn svelte-uialbm"> </span> <span class="cglyph svelte-uialbm"><!></span> <span class="csrc svelte-uialbm"> </span> <span class="cvint svelte-uialbm"> </span> <div class="ctitle svelte-uialbm"> </div> <!> <div class="cdocid svelte-uialbm">doc_id <code> </code></div></li>'),Ge=p('<section class="print-citations svelte-uialbm"><h2 class="svelte-uialbm">Citations</h2> <ol class="svelte-uialbm"></ol></section>'),ze=p('<article class="print-doc svelte-uialbm"><header class="print-head svelte-uialbm"><div class="print-head-top svelte-uialbm"><span class="wordmark svelte-uialbm">riprap</span> <span class="meta"> </span></div> <h1 class="print-title svelte-uialbm"> </h1> <div class="print-sub svelte-uialbm">intent <strong> </strong> </div></header> <div class="print-controls no-print svelte-uialbm"><button type="button" class="svelte-uialbm">print / save as PDF</button> <span class="hint svelte-uialbm"> </span></div> <!> <!> <footer class="print-foot svelte-uialbm"> </footer></article>'),Le=p('<div class="empty svelte-uialbm"><p>Loading…</p></div>');function Ve(Q,U){ye(U,!0);let V=d(()=>Ie.params.queryId??""),i=I(null),T=I(!1),P=I(!1);we(()=>{const r=Te(e(V));if(!r){F(T,!0);return}F(i,r,!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{typeof window<"u"&&(window.print(),F(P,!0))})})});function X(){typeof window<"u"&&window.print()}let R=d(()=>e(i)?Object.values(e(i).citations).sort((r,n)=>r.n-n.n):[]),A=d(()=>e(i)?new Date(e(i).generatedAt).toISOString().slice(0,10):"");var B=he();Fe("uialbm",r=>{qe(()=>{var n;je.title=`Riprap briefing — ${((n=e(i))==null?void 0:n.queryText)??"export"??""}`})});var Y=$e(B);{var Z=r=>{var n=Ae();v(r,n)},ee=r=>{var n=ze(),c=a(n),u=a(c),D=s(a(u),2),ae=a(D);t(D),t(u);var m=s(u,2),se=a(m,!0);t(m);var G=s(m,2),f=s(a(G)),re=a(f,!0);t(f);var ie=s(f);t(G),t(c);var b=s(c,2),z=a(b),L=s(z,2),ne=a(L,!0);t(L),t(b);var N=s(b,2);Me(N,{get blocks(){return e(i).blocks},get citations(){return e(i).citations},streaming:!1});var C=s(N,2);{var le=_=>{var g=Ge(),W=s(a(g),2);Se(W,21,()=>e(R),h=>h.id,(h,o)=>{var x=De(),y=a(x),ve=a(y);t(y);var w=s(y,2),pe=a(w);Oe(pe,{get tier(){return e(o).tier},size:9,get color(){return`var(--tier-${e(o).tier??""})`}}),t(w);var $=s(w,2),de=a($,!0);t($);var k=s($,2),ce=a(k);t(k);var q=s(k,2),ue=a(q,!0);t(q);var H=s(q,2);{var me=j=>{var S=Be(),_e=a(S,!0);t(S),M(()=>l(_e,e(o).url)),v(j,S)},fe=d(()=>e(o).url&&e(o).url.startsWith("http"));O(H,j=>{e(fe)&&j(me)})}var J=s(H,2),K=s(a(J)),be=a(K,!0);t(K),t(J),t(x),M(()=>{l(ve,`[${e(o).n??""}]`),l(de,e(o).source),l(ce,`v. ${e(o).vintage??""}`),l(ue,e(o).title),l(be,e(o).docId)}),v(h,x)}),t(W),t(g),v(_,g)};O(C,_=>{e(R).length&&_(le)})}var E=s(C,2),oe=a(E);t(E),t(n),M(()=>{l(ae,`flood-exposure briefing · v0.4.2 · ${e(A)??""}`),l(se,e(i).queryText),l(re,e(i).intent??"briefing"),l(ie,` · ${e(i).specialists??""} specialists
|
| 4 |
· ${e(i).attempts??1??""} reconcile${(e(i).attempts??1)===1?"":"s"}
|
|
The diff for this file is too large to render.
See raw diff
|
|
|
|
@@ -1 +1 @@
|
|
| 1 |
-
{"version":"
|
|
|
|
| 1 |
+
{"version":"1778247242661"}
|
|
@@ -6,21 +6,21 @@
|
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 7 |
<meta name="description" content="Riprap — citation-grounded NYC flood-exposure briefings." />
|
| 8 |
<title>Riprap — flood-exposure briefing</title>
|
| 9 |
-
<link href="./_app/immutable/entry/start.
|
| 10 |
-
<link href="./_app/immutable/chunks/
|
| 11 |
<link href="./_app/immutable/chunks/BTUA7_xE.js" rel="modulepreload">
|
| 12 |
-
<link href="./_app/immutable/entry/app.
|
| 13 |
<link href="./_app/immutable/chunks/CXQd8Y6F.js" rel="modulepreload">
|
| 14 |
<link href="./_app/immutable/chunks/CWw6qgC_.js" rel="modulepreload">
|
| 15 |
<link href="./_app/immutable/chunks/Bd-v_9Ud.js" rel="modulepreload">
|
| 16 |
<link href="./_app/immutable/chunks/CW0zSL4D.js" rel="modulepreload">
|
| 17 |
-
<link href="./_app/immutable/nodes/0.
|
| 18 |
<link href="./_app/immutable/chunks/DxQlA7U2.js" rel="modulepreload">
|
| 19 |
-
<link href="./_app/immutable/chunks/
|
| 20 |
<link href="./_app/immutable/chunks/DCD6_LXk.js" rel="modulepreload">
|
| 21 |
<link href="./_app/immutable/chunks/B0XoTt7U.js" rel="modulepreload">
|
| 22 |
<link href="./_app/immutable/chunks/DixtWtwq.js" rel="modulepreload">
|
| 23 |
-
<link href="./_app/immutable/nodes/2.
|
| 24 |
<link href="./_app/immutable/chunks/cDW0xQNP.js" rel="modulepreload">
|
| 25 |
<link href="./_app/immutable/chunks/25_y8TFd.js" rel="modulepreload">
|
| 26 |
<link href="./_app/immutable/chunks/D907np-5.js" rel="modulepreload">
|
|
@@ -37,15 +37,15 @@
|
|
| 37 |
|
| 38 |
<script>
|
| 39 |
{
|
| 40 |
-
|
| 41 |
base: new URL(".", location).pathname.slice(0, -1)
|
| 42 |
};
|
| 43 |
|
| 44 |
const element = document.currentScript.parentElement;
|
| 45 |
|
| 46 |
Promise.all([
|
| 47 |
-
import("./_app/immutable/entry/start.
|
| 48 |
-
import("./_app/immutable/entry/app.
|
| 49 |
]).then(([kit, app]) => {
|
| 50 |
kit.start(app, element, {
|
| 51 |
node_ids: [0, 2],
|
|
|
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 7 |
<meta name="description" content="Riprap — citation-grounded NYC flood-exposure briefings." />
|
| 8 |
<title>Riprap — flood-exposure briefing</title>
|
| 9 |
+
<link href="./_app/immutable/entry/start.CJsf30jm.js" rel="modulepreload">
|
| 10 |
+
<link href="./_app/immutable/chunks/D30NfLoU.js" rel="modulepreload">
|
| 11 |
<link href="./_app/immutable/chunks/BTUA7_xE.js" rel="modulepreload">
|
| 12 |
+
<link href="./_app/immutable/entry/app.COZFJ2px.js" rel="modulepreload">
|
| 13 |
<link href="./_app/immutable/chunks/CXQd8Y6F.js" rel="modulepreload">
|
| 14 |
<link href="./_app/immutable/chunks/CWw6qgC_.js" rel="modulepreload">
|
| 15 |
<link href="./_app/immutable/chunks/Bd-v_9Ud.js" rel="modulepreload">
|
| 16 |
<link href="./_app/immutable/chunks/CW0zSL4D.js" rel="modulepreload">
|
| 17 |
+
<link href="./_app/immutable/nodes/0.C7EsZXea.js" rel="modulepreload">
|
| 18 |
<link href="./_app/immutable/chunks/DxQlA7U2.js" rel="modulepreload">
|
| 19 |
+
<link href="./_app/immutable/chunks/3HH2ymBC.js" rel="modulepreload">
|
| 20 |
<link href="./_app/immutable/chunks/DCD6_LXk.js" rel="modulepreload">
|
| 21 |
<link href="./_app/immutable/chunks/B0XoTt7U.js" rel="modulepreload">
|
| 22 |
<link href="./_app/immutable/chunks/DixtWtwq.js" rel="modulepreload">
|
| 23 |
+
<link href="./_app/immutable/nodes/2._YbGDT13.js" rel="modulepreload">
|
| 24 |
<link href="./_app/immutable/chunks/cDW0xQNP.js" rel="modulepreload">
|
| 25 |
<link href="./_app/immutable/chunks/25_y8TFd.js" rel="modulepreload">
|
| 26 |
<link href="./_app/immutable/chunks/D907np-5.js" rel="modulepreload">
|
|
|
|
| 37 |
|
| 38 |
<script>
|
| 39 |
{
|
| 40 |
+
__sveltekit_whg5iw = {
|
| 41 |
base: new URL(".", location).pathname.slice(0, -1)
|
| 42 |
};
|
| 43 |
|
| 44 |
const element = document.currentScript.parentElement;
|
| 45 |
|
| 46 |
Promise.all([
|
| 47 |
+
import("./_app/immutable/entry/start.CJsf30jm.js"),
|
| 48 |
+
import("./_app/immutable/entry/app.COZFJ2px.js")
|
| 49 |
]).then(([kit, app]) => {
|
| 50 |
kit.start(app, element, {
|
| 51 |
node_ids: [0, 2],
|
|
@@ -6,17 +6,17 @@
|
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 7 |
<meta name="description" content="Riprap — citation-grounded NYC flood-exposure briefings." />
|
| 8 |
<title>Riprap — flood-exposure briefing</title>
|
| 9 |
-
<link href="../_app/immutable/entry/start.
|
| 10 |
-
<link href="../_app/immutable/chunks/
|
| 11 |
<link href="../_app/immutable/chunks/BTUA7_xE.js" rel="modulepreload">
|
| 12 |
-
<link href="../_app/immutable/entry/app.
|
| 13 |
<link href="../_app/immutable/chunks/CXQd8Y6F.js" rel="modulepreload">
|
| 14 |
<link href="../_app/immutable/chunks/CWw6qgC_.js" rel="modulepreload">
|
| 15 |
<link href="../_app/immutable/chunks/Bd-v_9Ud.js" rel="modulepreload">
|
| 16 |
<link href="../_app/immutable/chunks/CW0zSL4D.js" rel="modulepreload">
|
| 17 |
-
<link href="../_app/immutable/nodes/0.
|
| 18 |
<link href="../_app/immutable/chunks/DxQlA7U2.js" rel="modulepreload">
|
| 19 |
-
<link href="../_app/immutable/chunks/
|
| 20 |
<link href="../_app/immutable/chunks/DCD6_LXk.js" rel="modulepreload">
|
| 21 |
<link href="../_app/immutable/chunks/B0XoTt7U.js" rel="modulepreload">
|
| 22 |
<link href="../_app/immutable/chunks/DixtWtwq.js" rel="modulepreload">
|
|
@@ -38,15 +38,15 @@
|
|
| 38 |
|
| 39 |
<script>
|
| 40 |
{
|
| 41 |
-
|
| 42 |
base: new URL("..", location).pathname.slice(0, -1)
|
| 43 |
};
|
| 44 |
|
| 45 |
const element = document.currentScript.parentElement;
|
| 46 |
|
| 47 |
Promise.all([
|
| 48 |
-
import("../_app/immutable/entry/start.
|
| 49 |
-
import("../_app/immutable/entry/app.
|
| 50 |
]).then(([kit, app]) => {
|
| 51 |
kit.start(app, element, {
|
| 52 |
node_ids: [0, 5],
|
|
|
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 7 |
<meta name="description" content="Riprap — citation-grounded NYC flood-exposure briefings." />
|
| 8 |
<title>Riprap — flood-exposure briefing</title>
|
| 9 |
+
<link href="../_app/immutable/entry/start.CJsf30jm.js" rel="modulepreload">
|
| 10 |
+
<link href="../_app/immutable/chunks/D30NfLoU.js" rel="modulepreload">
|
| 11 |
<link href="../_app/immutable/chunks/BTUA7_xE.js" rel="modulepreload">
|
| 12 |
+
<link href="../_app/immutable/entry/app.COZFJ2px.js" rel="modulepreload">
|
| 13 |
<link href="../_app/immutable/chunks/CXQd8Y6F.js" rel="modulepreload">
|
| 14 |
<link href="../_app/immutable/chunks/CWw6qgC_.js" rel="modulepreload">
|
| 15 |
<link href="../_app/immutable/chunks/Bd-v_9Ud.js" rel="modulepreload">
|
| 16 |
<link href="../_app/immutable/chunks/CW0zSL4D.js" rel="modulepreload">
|
| 17 |
+
<link href="../_app/immutable/nodes/0.C7EsZXea.js" rel="modulepreload">
|
| 18 |
<link href="../_app/immutable/chunks/DxQlA7U2.js" rel="modulepreload">
|
| 19 |
+
<link href="../_app/immutable/chunks/3HH2ymBC.js" rel="modulepreload">
|
| 20 |
<link href="../_app/immutable/chunks/DCD6_LXk.js" rel="modulepreload">
|
| 21 |
<link href="../_app/immutable/chunks/B0XoTt7U.js" rel="modulepreload">
|
| 22 |
<link href="../_app/immutable/chunks/DixtWtwq.js" rel="modulepreload">
|
|
|
|
| 38 |
|
| 39 |
<script>
|
| 40 |
{
|
| 41 |
+
__sveltekit_whg5iw = {
|
| 42 |
base: new URL("..", location).pathname.slice(0, -1)
|
| 43 |
};
|
| 44 |
|
| 45 |
const element = document.currentScript.parentElement;
|
| 46 |
|
| 47 |
Promise.all([
|
| 48 |
+
import("../_app/immutable/entry/start.CJsf30jm.js"),
|
| 49 |
+
import("../_app/immutable/entry/app.COZFJ2px.js")
|
| 50 |
]).then(([kit, app]) => {
|
| 51 |
kit.start(app, element, {
|
| 52 |
node_ids: [0, 5],
|
|
@@ -107,17 +107,18 @@ function adaptNycha(s: BaseFinding): RegisterData | null {
|
|
| 107 |
if (!s.available) return null;
|
| 108 |
const list = (s.developments ?? []) as BaseFinding[];
|
| 109 |
const rows: RegisterRow[] = list.map((d) => {
|
| 110 |
-
const
|
| 111 |
-
const
|
|
|
|
| 112 |
return {
|
| 113 |
name: `${d.development ?? '?'}${d.borough ? ` · ${d.borough}` : ''}`,
|
| 114 |
elev: feetLabel(d.rep_elevation_m as number | null | undefined),
|
| 115 |
ada: false, // NYCHA developments don't carry an ADA flag
|
| 116 |
fema: '—',
|
| 117 |
-
sandy: inundLabel(
|
| 118 |
-
dep: depLabel(
|
| 119 |
asset: 'nycha',
|
| 120 |
-
primaryTier:
|
| 121 |
};
|
| 122 |
});
|
| 123 |
return {
|
|
|
|
| 107 |
if (!s.available) return null;
|
| 108 |
const list = (s.developments ?? []) as BaseFinding[];
|
| 109 |
const rows: RegisterRow[] = list.map((d) => {
|
| 110 |
+
const inSandy = d.inside_sandy_2012 as boolean | undefined;
|
| 111 |
+
const depLbl = d.dep_extreme_2080_label as string | null | undefined;
|
| 112 |
+
const depCls = d.dep_extreme_2080_class as number | null | undefined;
|
| 113 |
return {
|
| 114 |
name: `${d.development ?? '?'}${d.borough ? ` · ${d.borough}` : ''}`,
|
| 115 |
elev: feetLabel(d.rep_elevation_m as number | null | undefined),
|
| 116 |
ada: false, // NYCHA developments don't carry an ADA flag
|
| 117 |
fema: '—',
|
| 118 |
+
sandy: inundLabel(inSandy),
|
| 119 |
+
dep: depLabel(depLbl, depCls),
|
| 120 |
asset: 'nycha',
|
| 121 |
+
primaryTier: inSandy ? 'empirical' : 'modeled'
|
| 122 |
};
|
| 123 |
});
|
| 124 |
return {
|
|
@@ -138,7 +138,7 @@
|
|
| 138 |
prithvi_eo_live: ['scene_date', 'pct_water_500m'],
|
| 139 |
microtopo_lidar: ['elev_m', 'pct_200m', 'relief_m'],
|
| 140 |
mta_entrance_exposure: ['n_entrances', 'n_inside_sandy_2012', 'n_in_dep_extreme_2080'],
|
| 141 |
-
nycha_development_exposure: ['n_developments', '
|
| 142 |
doe_school_exposure: ['n_schools', 'n_inside_sandy_2012'],
|
| 143 |
doh_hospital_exposure: ['n_hospitals', 'n_inside_sandy_2012'],
|
| 144 |
floodnet_forecast: ['sensor_id', 'distance_m', 'forecast_28d', 'accelerating'],
|
|
@@ -207,16 +207,14 @@
|
|
| 207 |
}
|
| 208 |
const ny = fr['nycha_developments'] as Record<string, unknown> | null | undefined;
|
| 209 |
if (ny && Array.isArray(ny['developments'])) {
|
| 210 |
-
// NYCHA findings carry centroid_lat/lon; the
|
| 211 |
-
//
|
| 212 |
-
//
|
| 213 |
-
//
|
| 214 |
-
// Polygon-fill rendering is a morning tightening once
|
| 215 |
-
// geometry_geojson lands in the dataclass.
|
| 216 |
for (const d of ny['developments'] as Record<string, unknown>[]) {
|
| 217 |
const lat = Number(d['centroid_lat']); const lon = Number(d['centroid_lon']);
|
| 218 |
if (!Number.isFinite(lat) || !Number.isFinite(lon)) continue;
|
| 219 |
-
const
|
| 220 |
features.push({
|
| 221 |
type: 'Feature',
|
| 222 |
geometry: { type: 'Point', coordinates: [lon, lat] },
|
|
@@ -224,8 +222,7 @@
|
|
| 224 |
kind: 'nycha',
|
| 225 |
name: String(d['development'] ?? '?'),
|
| 226 |
doc_id: `nycha_dev_${d['tds_num'] ?? ''}`,
|
| 227 |
-
inside_sandy_2012:
|
| 228 |
-
pct_inside_sandy: pct
|
| 229 |
}
|
| 230 |
});
|
| 231 |
}
|
|
|
|
| 138 |
prithvi_eo_live: ['scene_date', 'pct_water_500m'],
|
| 139 |
microtopo_lidar: ['elev_m', 'pct_200m', 'relief_m'],
|
| 140 |
mta_entrance_exposure: ['n_entrances', 'n_inside_sandy_2012', 'n_in_dep_extreme_2080'],
|
| 141 |
+
nycha_development_exposure: ['n_developments', 'n_inside_sandy_2012', 'n_in_dep_extreme_2080'],
|
| 142 |
doe_school_exposure: ['n_schools', 'n_inside_sandy_2012'],
|
| 143 |
doh_hospital_exposure: ['n_hospitals', 'n_inside_sandy_2012'],
|
| 144 |
floodnet_forecast: ['sensor_id', 'distance_m', 'forecast_28d', 'accelerating'],
|
|
|
|
| 207 |
}
|
| 208 |
const ny = fr['nycha_developments'] as Record<string, unknown> | null | undefined;
|
| 209 |
if (ny && Array.isArray(ny['developments'])) {
|
| 210 |
+
// NYCHA findings carry centroid_lat/lon; the development polygon
|
| 211 |
+
// is not serialized in the SSE payload. Render as larger filled
|
| 212 |
+
// circles colored by Sandy-zone membership (binary, from the
|
| 213 |
+
// pre-built catalog at data/registers/nycha.json).
|
|
|
|
|
|
|
| 214 |
for (const d of ny['developments'] as Record<string, unknown>[]) {
|
| 215 |
const lat = Number(d['centroid_lat']); const lon = Number(d['centroid_lon']);
|
| 216 |
if (!Number.isFinite(lat) || !Number.isFinite(lon)) continue;
|
| 217 |
+
const inSandy = Boolean(d['inside_sandy_2012']);
|
| 218 |
features.push({
|
| 219 |
type: 'Feature',
|
| 220 |
geometry: { type: 'Point', coordinates: [lon, lat] },
|
|
|
|
| 222 |
kind: 'nycha',
|
| 223 |
name: String(d['development'] ?? '?'),
|
| 224 |
doc_id: `nycha_dev_${d['tds_num'] ?? ''}`,
|
| 225 |
+
inside_sandy_2012: inSandy
|
|
|
|
| 226 |
}
|
| 227 |
});
|
| 228 |
}
|