feat: every EO specialist's prediction renders as a map layer
Browse filesRound-tripped the per-pixel argmax raster from the droplet so the HF
Space can vectorise it onto WGS84 polygons and the MapLibre layer
actually paints the live model output. Was: only terramind_synthesis's
local fallback path generated polygons; everything else returned
class fractions only and the map showed nothing.
Wire format: droplet's /v1/prithvi-pluvial and /v1/terramind responses
gain `pred_b64` (uint8 base64) + `pred_shape` + (terramind only)
`class_labels`. Small payload — 224x224 uint8 round-trips in ~50 KB.
HF side:
- new app/context/_polygonize.py: polygonize_class_raster() and
polygonize_binary_mask() helpers
- app/context/eo_chip_cache.py adds `bounds_4326` to chip output
- app/context/terramind_nyc lulc/buildings accept bounds_4326,
_try_remote polygonises the response and attaches polygons_geojson
- app/context/terramind_synthesis.py polygonises the remote response
- app/flood_layers/prithvi_live.py polygonises the remote water mask
- app/fsm.py threads chip.bounds_4326 to lulc + buildings calls
Frontend:
- RipMap.svelte adds prithvi-live + terramind-buildings layers; keeps
terramind-lulc for the LoRA + base synthesis (LoRA wins when both fire)
- +page.svelte populates each FC from the matching state field
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- app/context/_polygonize.py +165 -0
- app/context/eo_chip_cache.py +26 -0
- app/context/terramind_nyc.py +48 -3
- app/context/terramind_synthesis.py +23 -1
- app/flood_layers/prithvi_live.py +33 -6
- app/fsm.py +2 -0
- services/riprap-models/main.py +17 -0
- web/sveltekit/build/200.html +8 -8
- web/sveltekit/build/_app/immutable/chunks/5yhzCbvM.js +0 -1
- web/sveltekit/build/_app/immutable/chunks/BIe30OUb.js +1 -0
- web/sveltekit/build/_app/immutable/chunks/{Bsd24zeB.js → DlifwAOf.js} +1 -1
- web/sveltekit/build/_app/immutable/chunks/{C3emz_VZ.js → zVqBGhq2.js} +0 -0
- web/sveltekit/build/_app/immutable/entry/{app.CnUxdbZ2.js → app.DBibj1kM.js} +2 -2
- web/sveltekit/build/_app/immutable/entry/start.Ct-7wur6.js +0 -1
- web/sveltekit/build/_app/immutable/entry/start.FA4XFe2L.js +1 -0
- web/sveltekit/build/_app/immutable/nodes/{0.CVp297sI.js → 0.BaDkkERB.js} +1 -1
- web/sveltekit/build/_app/immutable/nodes/{1.IvTO8JRY.js → 1.D77vIaPt.js} +1 -1
- web/sveltekit/build/_app/immutable/nodes/{2.DFf9SCs7.js → 2.Bas78CjE.js} +1 -1
- web/sveltekit/build/_app/immutable/nodes/{3.DJu_XRyp.js → 3.KbM-URMV.js} +1 -1
- web/sveltekit/build/_app/immutable/nodes/{4.Bb5aYO5F.js → 4.CXYWu0_c.js} +0 -0
- web/sveltekit/build/_app/immutable/nodes/{5.CuscLKzC.js → 5.NbriEyGS.js} +1 -1
- web/sveltekit/build/_app/version.json +1 -1
- web/sveltekit/build/index.html +9 -9
- web/sveltekit/build/q/sample.html +10 -10
- web/sveltekit/src/lib/components/map/RipMap.svelte +48 -3
- web/sveltekit/src/routes/q/[queryId]/+page.svelte +38 -7
|
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Vectorize a uint8 prediction raster (binary mask or class index)
|
| 2 |
+
into an EPSG:4326 GeoJSON FeatureCollection so the frontend can paint
|
| 3 |
+
it on the MapLibre map.
|
| 4 |
+
|
| 5 |
+
The droplet's `/v1/prithvi-pluvial` and `/v1/terramind` routes return
|
| 6 |
+
their predictions as base64-encoded uint8 with a shape and (where
|
| 7 |
+
relevant) a class-label list. This module reconstructs the affine
|
| 8 |
+
transform from the chip's geographic bounds (which the HF Space
|
| 9 |
+
already knows) and walks `rasterio.features.shapes` to build polygons
|
| 10 |
+
in the chip's native CRS, then reprojects to WGS84 for the map.
|
| 11 |
+
|
| 12 |
+
Best-effort: any failure returns an empty FeatureCollection rather
|
| 13 |
+
than raising into the caller's path. The map layer is decorative —
|
| 14 |
+
the briefing is the deliverable.
|
| 15 |
+
"""
|
| 16 |
+
from __future__ import annotations
|
| 17 |
+
|
| 18 |
+
import base64
|
| 19 |
+
import logging
|
| 20 |
+
|
| 21 |
+
log = logging.getLogger("riprap.polygonize")
|
| 22 |
+
|
| 23 |
+
EMPTY: dict = {"type": "FeatureCollection", "features": []}
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
def _decode_pred(pred_b64: str, pred_shape: list[int]):
|
| 27 |
+
"""Inverse of the droplet's `base64(pred.tobytes())`. Returns a
|
| 28 |
+
uint8 numpy array of shape `pred_shape`, or None on decode error."""
|
| 29 |
+
try:
|
| 30 |
+
import numpy as np
|
| 31 |
+
raw = base64.b64decode(pred_b64)
|
| 32 |
+
return np.frombuffer(raw, dtype="uint8").reshape(pred_shape)
|
| 33 |
+
except Exception:
|
| 34 |
+
log.exception("polygonize: pred decode failed")
|
| 35 |
+
return None
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
def polygonize_class_raster(
|
| 39 |
+
pred_b64: str,
|
| 40 |
+
pred_shape: list[int],
|
| 41 |
+
class_labels: list[str] | None,
|
| 42 |
+
bounds_4326: tuple[float, float, float, float],
|
| 43 |
+
*,
|
| 44 |
+
drop_classes: tuple[int, ...] = (0,),
|
| 45 |
+
simplify_tolerance: float = 0.0,
|
| 46 |
+
) -> dict:
|
| 47 |
+
"""Vectorize a categorical prediction raster (one integer class per
|
| 48 |
+
pixel) into a FeatureCollection with one Feature per connected
|
| 49 |
+
polygon. `bounds_4326` is `(minlon, minlat, maxlon, maxlat)` of the
|
| 50 |
+
chip; the raster is assumed to span those bounds at uniform
|
| 51 |
+
pixel size. Each feature carries `class_idx` and `class_label`
|
| 52 |
+
so the frontend can color by class.
|
| 53 |
+
|
| 54 |
+
`drop_classes`: skip pixels matching these class indices (default
|
| 55 |
+
drops 0 = "Background" / "outside" / etc).
|
| 56 |
+
"""
|
| 57 |
+
pred = _decode_pred(pred_b64, pred_shape)
|
| 58 |
+
if pred is None:
|
| 59 |
+
return EMPTY
|
| 60 |
+
try:
|
| 61 |
+
from rasterio.features import shapes
|
| 62 |
+
from rasterio.transform import from_bounds
|
| 63 |
+
from shapely.geometry import shape
|
| 64 |
+
h, w = pred.shape
|
| 65 |
+
minlon, minlat, maxlon, maxlat = bounds_4326
|
| 66 |
+
# The chip is in EPSG:4326 for our use — Sentinel-2 chips are
|
| 67 |
+
# natively in their UTM zone, but we can polygonize against the
|
| 68 |
+
# WGS84 extent because the inference chip is a small bbox where
|
| 69 |
+
# the pixel-grid → lat/lon mapping is locally affine (sub-pixel
|
| 70 |
+
# error at NYC scale).
|
| 71 |
+
transform = from_bounds(minlon, minlat, maxlon, maxlat, w, h)
|
| 72 |
+
feats = []
|
| 73 |
+
for geom, value in shapes(pred, mask=pred > 0, transform=transform):
|
| 74 |
+
v = int(value)
|
| 75 |
+
if v in drop_classes:
|
| 76 |
+
continue
|
| 77 |
+
label = (class_labels[v]
|
| 78 |
+
if class_labels and 0 <= v < len(class_labels)
|
| 79 |
+
else f"class_{v}")
|
| 80 |
+
poly = shape(geom)
|
| 81 |
+
if simplify_tolerance > 0:
|
| 82 |
+
poly = poly.simplify(simplify_tolerance, preserve_topology=True)
|
| 83 |
+
if poly.is_empty:
|
| 84 |
+
continue
|
| 85 |
+
feats.append({
|
| 86 |
+
"type": "Feature",
|
| 87 |
+
"geometry": poly.__geo_interface__,
|
| 88 |
+
"properties": {
|
| 89 |
+
"class_idx": v,
|
| 90 |
+
"class_label": label,
|
| 91 |
+
"fill_color": _PALETTE.get(label.lower(), _DEFAULT_FILL),
|
| 92 |
+
},
|
| 93 |
+
})
|
| 94 |
+
return {"type": "FeatureCollection", "features": feats}
|
| 95 |
+
except Exception:
|
| 96 |
+
log.exception("polygonize: class raster vectorisation failed")
|
| 97 |
+
return EMPTY
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
def polygonize_binary_mask(
|
| 101 |
+
pred_b64: str,
|
| 102 |
+
pred_shape: list[int],
|
| 103 |
+
bounds_4326: tuple[float, float, float, float],
|
| 104 |
+
*,
|
| 105 |
+
label: str = "water",
|
| 106 |
+
fill_color: str = "#4A90E2",
|
| 107 |
+
simplify_tolerance: float = 0.0,
|
| 108 |
+
) -> dict:
|
| 109 |
+
"""Vectorize a binary prediction raster (e.g. Prithvi water mask;
|
| 110 |
+
1 = water, 0 = not). Returns one Feature per connected positive
|
| 111 |
+
region. Use this for prithvi_eo_live and the buildings LoRA."""
|
| 112 |
+
pred = _decode_pred(pred_b64, pred_shape)
|
| 113 |
+
if pred is None:
|
| 114 |
+
return EMPTY
|
| 115 |
+
try:
|
| 116 |
+
from rasterio.features import shapes
|
| 117 |
+
from rasterio.transform import from_bounds
|
| 118 |
+
from shapely.geometry import shape
|
| 119 |
+
h, w = pred.shape
|
| 120 |
+
minlon, minlat, maxlon, maxlat = bounds_4326
|
| 121 |
+
transform = from_bounds(minlon, minlat, maxlon, maxlat, w, h)
|
| 122 |
+
feats = []
|
| 123 |
+
for geom, _value in shapes(pred, mask=pred > 0, transform=transform):
|
| 124 |
+
poly = shape(geom)
|
| 125 |
+
if simplify_tolerance > 0:
|
| 126 |
+
poly = poly.simplify(simplify_tolerance, preserve_topology=True)
|
| 127 |
+
if poly.is_empty:
|
| 128 |
+
continue
|
| 129 |
+
feats.append({
|
| 130 |
+
"type": "Feature",
|
| 131 |
+
"geometry": poly.__geo_interface__,
|
| 132 |
+
"properties": {
|
| 133 |
+
"class_label": label,
|
| 134 |
+
"fill_color": fill_color,
|
| 135 |
+
},
|
| 136 |
+
})
|
| 137 |
+
return {"type": "FeatureCollection", "features": feats}
|
| 138 |
+
except Exception:
|
| 139 |
+
log.exception("polygonize: binary mask vectorisation failed")
|
| 140 |
+
return EMPTY
|
| 141 |
+
|
| 142 |
+
|
| 143 |
+
# Lightweight palette used by the LULC + buildings layers. Frontend
|
| 144 |
+
# may override via `fill_color` per feature; this is a sensible
|
| 145 |
+
# default keyed on lowercase class labels.
|
| 146 |
+
_DEFAULT_FILL = "#A0A0A0"
|
| 147 |
+
_PALETTE = {
|
| 148 |
+
# ESRI 2020 LULC schema (terramind v1 base generative)
|
| 149 |
+
"water": "#1F77B4",
|
| 150 |
+
"trees": "#2CA02C",
|
| 151 |
+
"grass": "#7FBF53",
|
| 152 |
+
"flooded vegetation": "#74C476",
|
| 153 |
+
"crops": "#E1C75A",
|
| 154 |
+
"scrub/shrub": "#A6BC44",
|
| 155 |
+
"built": "#D62728",
|
| 156 |
+
"bare ground": "#B07A4C",
|
| 157 |
+
"snow/ice": "#E0E7EC",
|
| 158 |
+
"clouds": "#CCCCCC",
|
| 159 |
+
# NYC LoRA LULC schema
|
| 160 |
+
"cropland": "#E1C75A",
|
| 161 |
+
"bare": "#B07A4C",
|
| 162 |
+
# Buildings LoRA
|
| 163 |
+
"building": "#D62728",
|
| 164 |
+
"background": _DEFAULT_FILL,
|
| 165 |
+
}
|
|
@@ -281,6 +281,32 @@ def _fetch_and_build(lat: float, lon: float, timeout_s: float) -> dict[str, Any]
|
|
| 281 |
log.exception("eo_chip: tensor build failed")
|
| 282 |
return {"ok": False,
|
| 283 |
"err": f"tensor build failed: {type(e).__name__}: {e}"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 284 |
return modalities
|
| 285 |
|
| 286 |
|
|
|
|
| 281 |
log.exception("eo_chip: tensor build failed")
|
| 282 |
return {"ok": False,
|
| 283 |
"err": f"tensor build failed: {type(e).__name__}: {e}"}
|
| 284 |
+
# Compute the chip's WGS84 bbox so downstream TerraMind specialists
|
| 285 |
+
# can polygonise their predictions onto the map. The chip is
|
| 286 |
+
# CHIP_PX × CHIP_PX at PIXEL_M (10 m) in the scene's UTM zone;
|
| 287 |
+
# reproject the four corners to EPSG:4326 and use the
|
| 288 |
+
# axis-aligned envelope.
|
| 289 |
+
try:
|
| 290 |
+
from pyproj import Transformer
|
| 291 |
+
half_m = (CHIP_PX * PIXEL_M) / 2.0
|
| 292 |
+
t_to_utm = Transformer.from_crs(
|
| 293 |
+
"EPSG:4326", f"EPSG:{modalities['epsg']}", always_xy=True)
|
| 294 |
+
t_to_4326 = Transformer.from_crs(
|
| 295 |
+
f"EPSG:{modalities['epsg']}", "EPSG:4326", always_xy=True)
|
| 296 |
+
cx, cy = t_to_utm.transform(lon, lat)
|
| 297 |
+
corners_utm = [
|
| 298 |
+
(cx - half_m, cy - half_m),
|
| 299 |
+
(cx - half_m, cy + half_m),
|
| 300 |
+
(cx + half_m, cy - half_m),
|
| 301 |
+
(cx + half_m, cy + half_m),
|
| 302 |
+
]
|
| 303 |
+
corners_ll = [t_to_4326.transform(x, y) for x, y in corners_utm]
|
| 304 |
+
lons = [c[0] for c in corners_ll]
|
| 305 |
+
lats = [c[1] for c in corners_ll]
|
| 306 |
+
modalities["bounds_4326"] = (
|
| 307 |
+
min(lons), min(lats), max(lons), max(lats))
|
| 308 |
+
except Exception:
|
| 309 |
+
log.exception("eo_chip: bounds_4326 reprojection failed")
|
| 310 |
return modalities
|
| 311 |
|
| 312 |
|
|
@@ -324,6 +324,34 @@ def _try_remote(adapter_name: str, modality_chips: dict) -> dict | None:
|
|
| 324 |
result.setdefault("adapter", adapter_name)
|
| 325 |
result.setdefault("repo", ADAPTERS_REPO)
|
| 326 |
result["compute"] = f"remote · {result.get('device', 'gpu')}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 327 |
return result
|
| 328 |
except _inf.RemoteUnreachable as e:
|
| 329 |
log.info("terramind/%s: remote unreachable (%s); local fallback",
|
|
@@ -359,7 +387,12 @@ def _run(adapter_name: str, modality_chips: dict, summarizer):
|
|
| 359 |
try:
|
| 360 |
task = _ensure_adapter(adapter_name)
|
| 361 |
spec = ADAPTER_SPECS[adapter_name]
|
| 362 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 363 |
# logits: (B, C, H, W). Argmax to per-pixel class id.
|
| 364 |
pred = logits.argmax(dim=1).squeeze(0)
|
| 365 |
result = summarizer(pred, spec["class_labels"])
|
|
@@ -390,7 +423,9 @@ def _run(adapter_name: str, modality_chips: dict, summarizer):
|
|
| 390 |
"elapsed_s": round(time.time() - t0, 2)}
|
| 391 |
|
| 392 |
|
| 393 |
-
def lulc(s2l2a, s1rtc=None, dem=None
|
|
|
|
|
|
|
| 394 |
"""5-class NYC macro land-cover.
|
| 395 |
|
| 396 |
Inputs are torch tensors. The temporal models we trained expect
|
|
@@ -398,8 +433,14 @@ def lulc(s2l2a, s1rtc=None, dem=None) -> dict[str, Any]:
|
|
| 398 |
Pass S1 and DEM if you have them — the published adapter was
|
| 399 |
trained on the full triplet and accuracy degrades when modalities
|
| 400 |
are dropped.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 401 |
"""
|
| 402 |
chips = {"S2L2A": s2l2a}
|
|
|
|
|
|
|
| 403 |
if s1rtc is not None:
|
| 404 |
chips["S1RTC"] = s1rtc
|
| 405 |
if dem is not None:
|
|
@@ -407,9 +448,13 @@ def lulc(s2l2a, s1rtc=None, dem=None) -> dict[str, Any]:
|
|
| 407 |
return _run("lulc", chips, _summarize_lulc)
|
| 408 |
|
| 409 |
|
| 410 |
-
def buildings(s2l2a, s1rtc=None, dem=None
|
|
|
|
|
|
|
| 411 |
"""Binary NYC building-footprint mask. Same input contract as lulc()."""
|
| 412 |
chips = {"S2L2A": s2l2a}
|
|
|
|
|
|
|
| 413 |
if s1rtc is not None:
|
| 414 |
chips["S1RTC"] = s1rtc
|
| 415 |
if dem is not None:
|
|
|
|
| 324 |
result.setdefault("adapter", adapter_name)
|
| 325 |
result.setdefault("repo", ADAPTERS_REPO)
|
| 326 |
result["compute"] = f"remote · {result.get('device', 'gpu')}"
|
| 327 |
+
# Polygonize the prediction raster onto the chip's bounds so
|
| 328 |
+
# the map can paint the LULC / buildings overlay. Bounds come
|
| 329 |
+
# via the modality_chips dict — the eo_chip layer threads them
|
| 330 |
+
# through. Best-effort; never raises into the FSM.
|
| 331 |
+
bounds = modality_chips.get("bounds_4326") if modality_chips else None
|
| 332 |
+
pred_b64 = result.get("pred_b64")
|
| 333 |
+
pred_shape = result.get("pred_shape")
|
| 334 |
+
class_labels = result.get("class_labels")
|
| 335 |
+
if bounds and pred_b64 and pred_shape:
|
| 336 |
+
try:
|
| 337 |
+
from app.context._polygonize import (
|
| 338 |
+
polygonize_binary_mask, polygonize_class_raster,
|
| 339 |
+
)
|
| 340 |
+
if adapter_name == "buildings":
|
| 341 |
+
polys = polygonize_binary_mask(
|
| 342 |
+
pred_b64, pred_shape, tuple(bounds),
|
| 343 |
+
label="building", fill_color="#D62728",
|
| 344 |
+
simplify_tolerance=2e-5,
|
| 345 |
+
)
|
| 346 |
+
else:
|
| 347 |
+
polys = polygonize_class_raster(
|
| 348 |
+
pred_b64, pred_shape, class_labels, tuple(bounds),
|
| 349 |
+
simplify_tolerance=2e-5,
|
| 350 |
+
)
|
| 351 |
+
result["polygons_geojson"] = polys
|
| 352 |
+
except Exception:
|
| 353 |
+
log.exception("terramind/%s: polygonize failed", adapter_name)
|
| 354 |
+
result["polygons_geojson"] = None
|
| 355 |
return result
|
| 356 |
except _inf.RemoteUnreachable as e:
|
| 357 |
log.info("terramind/%s: remote unreachable (%s); local fallback",
|
|
|
|
| 387 |
try:
|
| 388 |
task = _ensure_adapter(adapter_name)
|
| 389 |
spec = ADAPTER_SPECS[adapter_name]
|
| 390 |
+
# Strip out bounds_4326 (auxiliary metadata, not a tensor) before
|
| 391 |
+
# handing the dict to terratorch's tiled_inference, which iterates
|
| 392 |
+
# all values as modalities.
|
| 393 |
+
tensors_only = {k: v for k, v in modality_chips.items()
|
| 394 |
+
if k != "bounds_4326"}
|
| 395 |
+
logits = _tiled_predict(task, tensors_only, spec["num_classes"])
|
| 396 |
# logits: (B, C, H, W). Argmax to per-pixel class id.
|
| 397 |
pred = logits.argmax(dim=1).squeeze(0)
|
| 398 |
result = summarizer(pred, spec["class_labels"])
|
|
|
|
| 423 |
"elapsed_s": round(time.time() - t0, 2)}
|
| 424 |
|
| 425 |
|
| 426 |
+
def lulc(s2l2a, s1rtc=None, dem=None,
|
| 427 |
+
bounds_4326: tuple[float, float, float, float] | None = None,
|
| 428 |
+
) -> dict[str, Any]:
|
| 429 |
"""5-class NYC macro land-cover.
|
| 430 |
|
| 431 |
Inputs are torch tensors. The temporal models we trained expect
|
|
|
|
| 433 |
Pass S1 and DEM if you have them — the published adapter was
|
| 434 |
trained on the full triplet and accuracy degrades when modalities
|
| 435 |
are dropped.
|
| 436 |
+
|
| 437 |
+
`bounds_4326` is `(minlon, minlat, maxlon, maxlat)` of the chip
|
| 438 |
+
in WGS84; when provided, the LULC raster is polygonised onto the
|
| 439 |
+
chip's geographic extent so the map can render an overlay.
|
| 440 |
"""
|
| 441 |
chips = {"S2L2A": s2l2a}
|
| 442 |
+
if bounds_4326 is not None:
|
| 443 |
+
chips["bounds_4326"] = bounds_4326
|
| 444 |
if s1rtc is not None:
|
| 445 |
chips["S1RTC"] = s1rtc
|
| 446 |
if dem is not None:
|
|
|
|
| 448 |
return _run("lulc", chips, _summarize_lulc)
|
| 449 |
|
| 450 |
|
| 451 |
+
def buildings(s2l2a, s1rtc=None, dem=None,
|
| 452 |
+
bounds_4326: tuple[float, float, float, float] | None = None,
|
| 453 |
+
) -> dict[str, Any]:
|
| 454 |
"""Binary NYC building-footprint mask. Same input contract as lulc()."""
|
| 455 |
chips = {"S2L2A": s2l2a}
|
| 456 |
+
if bounds_4326 is not None:
|
| 457 |
+
chips["bounds_4326"] = bounds_4326
|
| 458 |
if s1rtc is not None:
|
| 459 |
chips["S1RTC"] = s1rtc
|
| 460 |
if dem is not None:
|
|
@@ -299,6 +299,28 @@ def fetch(lat: float, lon: float, timeout_s: float = 60.0) -> dict[str, Any]:
|
|
| 299 |
timeout=timeout_s)
|
| 300 |
if remote.get("ok"):
|
| 301 |
elapsed = round(time.time() - t0, 2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 302 |
out = {
|
| 303 |
"ok": True,
|
| 304 |
"synthetic_modality": True,
|
|
@@ -313,7 +335,7 @@ def fetch(lat: float, lon: float, timeout_s: float = 60.0) -> dict[str, Any]:
|
|
| 313 |
"n_classes_observed": remote.get("n_classes_observed") or 0,
|
| 314 |
"chip_shape": remote.get("shape") or [],
|
| 315 |
"bounds_4326": list(bounds_4326),
|
| 316 |
-
"polygons_geojson":
|
| 317 |
"label_schema": remote.get("label_schema") or "",
|
| 318 |
"compute": f"remote · {remote.get('device', 'gpu')}",
|
| 319 |
"elapsed_s": elapsed,
|
|
|
|
| 299 |
timeout=timeout_s)
|
| 300 |
if remote.get("ok"):
|
| 301 |
elapsed = round(time.time() - t0, 2)
|
| 302 |
+
# Polygonize the prediction raster for the map
|
| 303 |
+
# layer. The droplet returns the per-pixel argmax;
|
| 304 |
+
# we vectorize against the chip's bounds.
|
| 305 |
+
polys = None
|
| 306 |
+
pred_b64 = remote.get("pred_b64")
|
| 307 |
+
pred_shape = remote.get("pred_shape")
|
| 308 |
+
class_labels = (remote.get("class_labels")
|
| 309 |
+
or LULC_CLASSES)
|
| 310 |
+
if pred_b64 and pred_shape:
|
| 311 |
+
try:
|
| 312 |
+
from app.context._polygonize import (
|
| 313 |
+
polygonize_class_raster,
|
| 314 |
+
)
|
| 315 |
+
polys = polygonize_class_raster(
|
| 316 |
+
pred_b64, pred_shape, class_labels,
|
| 317 |
+
tuple(bounds_4326),
|
| 318 |
+
simplify_tolerance=2e-5,
|
| 319 |
+
)
|
| 320 |
+
except Exception:
|
| 321 |
+
log.exception("terramind/synthesis: "
|
| 322 |
+
"polygonize failed")
|
| 323 |
+
polys = None
|
| 324 |
out = {
|
| 325 |
"ok": True,
|
| 326 |
"synthetic_modality": True,
|
|
|
|
| 335 |
"n_classes_observed": remote.get("n_classes_observed") or 0,
|
| 336 |
"chip_shape": remote.get("shape") or [],
|
| 337 |
"bounds_4326": list(bounds_4326),
|
| 338 |
+
"polygons_geojson": polys,
|
| 339 |
"label_schema": remote.get("label_schema") or "",
|
| 340 |
"compute": f"remote · {remote.get('device', 'gpu')}",
|
| 341 |
"elapsed_s": elapsed,
|
|
@@ -402,6 +402,38 @@ def _fetch_inner(lat: float, lon: float, timeout_s: float) -> dict[str, Any]:
|
|
| 402 |
timeout=timeout_s,
|
| 403 |
)
|
| 404 |
if remote.get("ok"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 405 |
return {
|
| 406 |
"ok": True,
|
| 407 |
"item_id": item.id,
|
|
@@ -409,12 +441,7 @@ def _fetch_inner(lat: float, lon: float, timeout_s: float) -> dict[str, Any]:
|
|
| 409 |
"cloud_cover": cc,
|
| 410 |
"pct_water_full": remote.get("pct_water_full"),
|
| 411 |
"pct_water_within_500m": remote.get("pct_water_within_500m"),
|
| 412 |
-
|
| 413 |
-
# (transport size); the local fallback below produces
|
| 414 |
-
# them. For now the remote path leaves polygons null
|
| 415 |
-
# and the map renders the layer empty until the
|
| 416 |
-
# service grows a polygonisation step.
|
| 417 |
-
"polygons_geojson": None,
|
| 418 |
"compute": f"remote · {remote.get('device', 'gpu')}",
|
| 419 |
"elapsed_s": round(time.time() - t0, 2),
|
| 420 |
}
|
|
|
|
| 402 |
timeout=timeout_s,
|
| 403 |
)
|
| 404 |
if remote.get("ok"):
|
| 405 |
+
# Vectorize the remote prediction raster so the map
|
| 406 |
+
# actually renders the live water polygons. The
|
| 407 |
+
# droplet returns `pred_b64` (uint8 binary mask);
|
| 408 |
+
# we polygonize against the chip's WGS84 bounds
|
| 409 |
+
# which we know locally from `ref_da`.
|
| 410 |
+
polys = None
|
| 411 |
+
pred_b64 = remote.get("pred_b64")
|
| 412 |
+
pred_shape = remote.get("pred_shape")
|
| 413 |
+
if pred_b64 and pred_shape:
|
| 414 |
+
try:
|
| 415 |
+
xs = ref_da.x.values
|
| 416 |
+
ys = ref_da.y.values
|
| 417 |
+
from pyproj import Transformer
|
| 418 |
+
t_inv = Transformer.from_crs(
|
| 419 |
+
f"EPSG:{epsg}", "EPSG:4326",
|
| 420 |
+
always_xy=True)
|
| 421 |
+
minx, maxx = float(xs.min()), float(xs.max())
|
| 422 |
+
miny, maxy = float(ys.min()), float(ys.max())
|
| 423 |
+
minlon, minlat = t_inv.transform(minx, miny)
|
| 424 |
+
maxlon, maxlat = t_inv.transform(maxx, maxy)
|
| 425 |
+
from app.context._polygonize import (
|
| 426 |
+
polygonize_binary_mask,
|
| 427 |
+
)
|
| 428 |
+
polys = polygonize_binary_mask(
|
| 429 |
+
pred_b64, pred_shape,
|
| 430 |
+
(minlon, minlat, maxlon, maxlat),
|
| 431 |
+
label="water", fill_color="#1F77B4",
|
| 432 |
+
simplify_tolerance=2e-5,
|
| 433 |
+
)
|
| 434 |
+
except Exception:
|
| 435 |
+
log.exception("prithvi_live: remote polygonize failed")
|
| 436 |
+
polys = None
|
| 437 |
return {
|
| 438 |
"ok": True,
|
| 439 |
"item_id": item.id,
|
|
|
|
| 441 |
"cloud_cover": cc,
|
| 442 |
"pct_water_full": remote.get("pct_water_full"),
|
| 443 |
"pct_water_within_500m": remote.get("pct_water_within_500m"),
|
| 444 |
+
"polygons_geojson": polys,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 445 |
"compute": f"remote · {remote.get('device', 'gpu')}",
|
| 446 |
"elapsed_s": round(time.time() - t0, 2),
|
| 447 |
}
|
|
@@ -812,6 +812,7 @@ def step_terramind_lulc(state: State) -> State:
|
|
| 812 |
tensors.get("S2L2A"),
|
| 813 |
s1rtc=tensors.get("S1RTC"),
|
| 814 |
dem=tensors.get("DEM"),
|
|
|
|
| 815 |
)
|
| 816 |
rec["ok"] = bool(out.get("ok"))
|
| 817 |
if not rec["ok"]:
|
|
@@ -854,6 +855,7 @@ def step_terramind_buildings(state: State) -> State:
|
|
| 854 |
tensors.get("S2L2A"),
|
| 855 |
s1rtc=tensors.get("S1RTC"),
|
| 856 |
dem=tensors.get("DEM"),
|
|
|
|
| 857 |
)
|
| 858 |
rec["ok"] = bool(out.get("ok"))
|
| 859 |
if not rec["ok"]:
|
|
|
|
| 812 |
tensors.get("S2L2A"),
|
| 813 |
s1rtc=tensors.get("S1RTC"),
|
| 814 |
dem=tensors.get("DEM"),
|
| 815 |
+
bounds_4326=chip.get("bounds_4326"),
|
| 816 |
)
|
| 817 |
rec["ok"] = bool(out.get("ok"))
|
| 818 |
if not rec["ok"]:
|
|
|
|
| 855 |
tensors.get("S2L2A"),
|
| 856 |
s1rtc=tensors.get("S1RTC"),
|
| 857 |
dem=tensors.get("DEM"),
|
| 858 |
+
bounds_4326=chip.get("bounds_4326"),
|
| 859 |
)
|
| 860 |
rec["ok"] = bool(out.get("ok"))
|
| 861 |
if not rec["ok"]:
|
|
@@ -201,6 +201,11 @@ def _prithvi_pluvial(payload: PrithviIn) -> dict[str, Any]:
|
|
| 201 |
dist = np.sqrt((yy - cy) ** 2 + (xx - cx) ** 2)
|
| 202 |
mask = dist <= min(50, min(h, w) // 4)
|
| 203 |
pct_500m = float(100.0 * pred[mask].mean()) if mask.any() else pct_full
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
return {
|
| 205 |
"ok": True,
|
| 206 |
"elapsed_s": round(time.time() - t0, 2),
|
|
@@ -211,6 +216,8 @@ def _prithvi_pluvial(payload: PrithviIn) -> dict[str, Any]:
|
|
| 211 |
"scene_datetime": payload.scene_datetime,
|
| 212 |
"cloud_cover": payload.cloud_cover,
|
| 213 |
"shape": [int(h), int(w)],
|
|
|
|
|
|
|
| 214 |
}
|
| 215 |
|
| 216 |
|
|
@@ -416,6 +423,8 @@ def _terramind_synthesis_inference(payload: TerramindIn) -> dict[str, Any]:
|
|
| 416 |
key=lambda kv: kv[1], reverse=True))
|
| 417 |
dominant_class = next(iter(ordered)) if ordered else "unknown"
|
| 418 |
dominant_pct = ordered.get(dominant_class, 0.0)
|
|
|
|
|
|
|
| 419 |
return {
|
| 420 |
"ok": True,
|
| 421 |
"adapter": "synthesis",
|
|
@@ -433,6 +442,9 @@ def _terramind_synthesis_inference(payload: TerramindIn) -> dict[str, Any]:
|
|
| 433 |
"label_schema": "ESRI 2020-2022 Land Cover (tentative — TerraMind "
|
| 434 |
"tokenizer source confirms ESRI but not exact "
|
| 435 |
"label-to-index mapping)",
|
|
|
|
|
|
|
|
|
|
| 436 |
}
|
| 437 |
|
| 438 |
|
|
@@ -493,6 +505,8 @@ def _terramind_inference(payload: TerramindIn) -> dict[str, Any]:
|
|
| 493 |
except Exception:
|
| 494 |
log.debug("terramind/buildings: scipy.ndimage unavailable")
|
| 495 |
|
|
|
|
|
|
|
| 496 |
return {
|
| 497 |
"ok": True,
|
| 498 |
"adapter": payload.adapter,
|
|
@@ -507,6 +521,9 @@ def _terramind_inference(payload: TerramindIn) -> dict[str, Any]:
|
|
| 507 |
"pct_buildings": round(100.0 * float((pred == 1).sum()) / n, 2)
|
| 508 |
if payload.adapter == "buildings" else None,
|
| 509 |
"n_building_components": n_components,
|
|
|
|
|
|
|
|
|
|
| 510 |
}
|
| 511 |
|
| 512 |
|
|
|
|
| 201 |
dist = np.sqrt((yy - cy) ** 2 + (xx - cx) ** 2)
|
| 202 |
mask = dist <= min(50, min(h, w) // 4)
|
| 203 |
pct_500m = float(100.0 * pred[mask].mean()) if mask.any() else pct_full
|
| 204 |
+
# Pass the raw prediction raster back so HF can vectorise it into
|
| 205 |
+
# GeoJSON for the map layer using the chip-georef it already has
|
| 206 |
+
# locally (ref_da from _build_chip). uint8 is small enough for a
|
| 207 |
+
# base64 round-trip (~50 KB at 224x224).
|
| 208 |
+
pred_b64 = base64.b64encode(pred.tobytes()).decode("ascii")
|
| 209 |
return {
|
| 210 |
"ok": True,
|
| 211 |
"elapsed_s": round(time.time() - t0, 2),
|
|
|
|
| 216 |
"scene_datetime": payload.scene_datetime,
|
| 217 |
"cloud_cover": payload.cloud_cover,
|
| 218 |
"shape": [int(h), int(w)],
|
| 219 |
+
"pred_b64": pred_b64,
|
| 220 |
+
"pred_shape": [int(h), int(w)],
|
| 221 |
}
|
| 222 |
|
| 223 |
|
|
|
|
| 423 |
key=lambda kv: kv[1], reverse=True))
|
| 424 |
dominant_class = next(iter(ordered)) if ordered else "unknown"
|
| 425 |
dominant_pct = ordered.get(dominant_class, 0.0)
|
| 426 |
+
pred_u8 = class_idx.astype("uint8")
|
| 427 |
+
pred_b64 = base64.b64encode(pred_u8.tobytes()).decode("ascii")
|
| 428 |
return {
|
| 429 |
"ok": True,
|
| 430 |
"adapter": "synthesis",
|
|
|
|
| 442 |
"label_schema": "ESRI 2020-2022 Land Cover (tentative — TerraMind "
|
| 443 |
"tokenizer source confirms ESRI but not exact "
|
| 444 |
"label-to-index mapping)",
|
| 445 |
+
"pred_b64": pred_b64,
|
| 446 |
+
"pred_shape": [int(s) for s in pred_u8.shape],
|
| 447 |
+
"class_labels": _TERRAMIND_SPECS["synthesis"]["labels"],
|
| 448 |
}
|
| 449 |
|
| 450 |
|
|
|
|
| 505 |
except Exception:
|
| 506 |
log.debug("terramind/buildings: scipy.ndimage unavailable")
|
| 507 |
|
| 508 |
+
# Pass the per-pixel argmax raster back so HF can vectorise it.
|
| 509 |
+
pred_b64 = base64.b64encode(pred.tobytes()).decode("ascii")
|
| 510 |
return {
|
| 511 |
"ok": True,
|
| 512 |
"adapter": payload.adapter,
|
|
|
|
| 521 |
"pct_buildings": round(100.0 * float((pred == 1).sum()) / n, 2)
|
| 522 |
if payload.adapter == "buildings" else None,
|
| 523 |
"n_building_components": n_components,
|
| 524 |
+
"pred_b64": pred_b64,
|
| 525 |
+
"pred_shape": [int(s) for s in pred.shape],
|
| 526 |
+
"class_labels": spec["labels"],
|
| 527 |
}
|
| 528 |
|
| 529 |
|
|
@@ -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.FA4XFe2L.js" rel="modulepreload">
|
| 10 |
+
<link href="/_app/immutable/chunks/BIe30OUb.js" rel="modulepreload">
|
| 11 |
<link href="/_app/immutable/chunks/BTUA7_xE.js" rel="modulepreload">
|
| 12 |
+
<link href="/_app/immutable/entry/app.DBibj1kM.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.BaDkkERB.js" rel="modulepreload">
|
| 18 |
<link href="/_app/immutable/chunks/DxQlA7U2.js" rel="modulepreload">
|
| 19 |
+
<link href="/_app/immutable/chunks/DlifwAOf.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_2hdpwx = {
|
| 32 |
base: ""
|
| 33 |
};
|
| 34 |
|
| 35 |
const element = document.currentScript.parentElement;
|
| 36 |
|
| 37 |
Promise.all([
|
| 38 |
+
import("/_app/immutable/entry/start.FA4XFe2L.js"),
|
| 39 |
+
import("/_app/immutable/entry/app.DBibj1kM.js")
|
| 40 |
]).then(([kit, app]) => {
|
| 41 |
kit.start(app, element);
|
| 42 |
});
|
|
@@ -1 +0,0 @@
|
|
| 1 |
-
var rt=e=>{throw TypeError(e)};var Dt=(e,t,n)=>t.has(e)||rt("Cannot "+n);var v=(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_1fdrmyh)==null?void 0:ht.base)??"";var pt;const nn=((pt=globalThis.__sveltekit_1fdrmyh)==null?void 0:pt.assets)??U??"",rn="1778247349864",yt="sveltekit:snapshot",vt="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 ye(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(v(this,oe))}set data(t){O(v(this,oe),t)}get form(){return I(v(this,se))}set form(t){O(v(this,se),t)}get error(){return I(v(this,ie))}set error(t){O(v(this,ie),t)}get params(){return I(v(this,le))}set params(t){O(v(this,le),t)}get route(){return I(v(this,ce))}set route(t){O(v(this,ce),t)}get state(){return I(v(this,fe))}set state(t){O(v(this,fe),t)}get status(){return I(v(this,ue))}set status(t){O(v(this,ue),t)}get url(){return I(v(this,de))}set url(t){O(v(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(v(this,he))}set current(t){O(v(this,he),t)}},he=new WeakMap,mt),je=new(_t=class{constructor(){A(this,pe,T(!1))}get current(){return I(v(this,pe))}set current(t){O(v(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(vt)??{},te=wt(yt)??{},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,ve,P,Ve,S;const be=[],ke=[];let y=null;function Se(){var e;(e=y==null?void 0:y.fork)==null||e.then(t=>t==null?void 0:t.discard()),y=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_1fdrmyh&&(globalThis.__sveltekit_1fdrmyh.query,globalThis.__sveltekit_1fdrmyh.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],ve=e.nodes[1],De(),ve(),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(vt,N),It(L),ot(yt,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!==(y==null?void 0:y.id)){Se();const t={};Re.add(t),y={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 y.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 yn(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 vn({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((y==null?void 0:y.id)===e)return Re.delete(y.token),y.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=yn(_.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 vn({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 ve(),loader:ve,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&&(y==null?void 0:y.id)===p.id?y.fork:null;y!=null&&y.fork&&!b&&Se(),y=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=ye(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=ye(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=ye(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=ye(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};
|
|
|
|
|
|
|
@@ -0,0 +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_2hdpwx)==null?void 0:ht.base)??"";var pt;const nn=((pt=globalThis.__sveltekit_2hdpwx)==null?void 0:pt.assets)??U??"",rn="1778255822052",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_2hdpwx&&(globalThis.__sveltekit_2hdpwx.query,globalThis.__sveltekit_2hdpwx.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 +1 @@
|
|
| 1 |
-
import{s as e,p as r}from"./
|
|
|
|
| 1 |
+
import{s as e,p as r}from"./BIe30OUb.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};
|
|
The diff for this file is too large to render.
See raw diff
|
|
|
|
@@ -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.BaDkkERB.js","../chunks/CWw6qgC_.js","../chunks/BTUA7_xE.js","../chunks/DxQlA7U2.js","../chunks/Bd-v_9Ud.js","../chunks/CW0zSL4D.js","../chunks/DlifwAOf.js","../chunks/BIe30OUb.js","../chunks/DCD6_LXk.js","../chunks/B0XoTt7U.js","../assets/RipMark.ClxF_PAC.css","../chunks/DixtWtwq.js","../assets/0.DiQNUxm-.css","../nodes/1.D77vIaPt.js","../nodes/2.Bas78CjE.js","../chunks/cDW0xQNP.js","../chunks/25_y8TFd.js","../chunks/CXQd8Y6F.js","../chunks/D907np-5.js","../assets/2.BD53GLFY.css","../nodes/3.KbM-URMV.js","../chunks/BatqQaKj.js","../assets/Briefing.Dmn9LgiV.css","../assets/3.BZfqQRM0.css","../nodes/4.CXYWu0_c.js","../chunks/zVqBGhq2.js","../assets/stoneRegistry.bHiraU77.css","../assets/4.C9CQZyPb.css","../nodes/5.NbriEyGS.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.BaDkkERB.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url),()=>b(()=>import("../nodes/1.D77vIaPt.js"),__vite__mapDeps([13,1,2,6,7]),import.meta.url),()=>b(()=>import("../nodes/2.Bas78CjE.js"),__vite__mapDeps([14,1,2,11,15,8,9,5,10,16,7,17,18,19]),import.meta.url),()=>b(()=>import("../nodes/3.KbM-URMV.js"),__vite__mapDeps([20,1,2,4,16,15,6,7,21,5,3,9,22,23]),import.meta.url),()=>b(()=>import("../nodes/4.CXYWu0_c.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.NbriEyGS.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};
|
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{l as o,a as r}from"../chunks/5yhzCbvM.js";export{o as load_css,r as start};
|
|
|
|
|
|
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{l as o,a as r}from"../chunks/BIe30OUb.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/DlifwAOf.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/DlifwAOf.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/BIe30OUb.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/DlifwAOf.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 |
-
import{d as z,e as V,a as U,f as q,s as j}from"../chunks/CWw6qgC_.js";import{p as Z,am as X,a5 as d,a4 as l,a9 as Q,ai as $,t as J,a as ee,s as r,c as e,o as i,r as t,al as te}from"../chunks/BTUA7_xE.js";import{B as ie}from"../chunks/BatqQaKj.js";import{f as re,R as ae,M as ne,C as se,F as oe}from"../chunks/C3emz_VZ.js";import{p as de,b as M}from"../chunks/DxQlA7U2.js";const le=!0,fe=Object.freeze(Object.defineProperty({__proto__:null,prerender:le},Symbol.toStringTag,{value:"Module"})),R="80 Pioneer Street · Red Hook · Brooklyn",y={c1:{id:"c1",n:1,tier:"empirical",source:"USGS",title:"Hurricane Sandy storm tide elevations, NY-NJ Harbor",docId:"USGS-OFR-2013-1234",url:"https://pubs.usgs.gov/of/2013/1234/",vintage:"2013-05",retrieved:"2026-04-28"},c2:{id:"c2",n:2,tier:"empirical",source:"NYC OEM",title:"Hurricane Sandy Inundation Zone (2012)",docId:"NYCOEM-SIZ-2013",url:"https://data.cityofnewyork.us/dataset/sandy-inundation-zone",vintage:"2013-01",retrieved:"2026-04-28"},c3:{id:"c3",n:3,tier:"empirical",source:"FloodNet NYC",title:"Sensor BK-RH-002 — Coffey Park, monthly exceedance",docId:"FN-BK-RH-002",url:"https://floodnet.nyc/sensor/BK-RH-002",vintage:"2026-04",retrieved:"2026-05-02"},c4:{id:"c4",n:4,tier:"modeled",source:"FEMA",title:"Preliminary Flood Insurance Rate Map, panel 36047C0207G",docId:"FEMA-FIRM-36047C0207G",url:"https://msc.fema.gov/portal/search",vintage:"2024-09",retrieved:"2026-04-28"},c5:{id:"c5",n:5,tier:"modeled",source:"NYC DEP",title:"Stormwater Flood Map — Moderate Stormwater Scenario",docId:"NYCDEP-SWFM-2024",url:"https://nyc.gov/stormwater-map",vintage:"2024-06",retrieved:"2026-04-28"},c6:{id:"c6",n:6,tier:"modeled",source:"NPCC4",title:"Sea-level rise projections, 2050 90th percentile",docId:"NPCC4-Ch3-Tbl3.2",url:"https://nyas.org/npcc4",vintage:"2024-03",retrieved:"2026-04-28"},c7:{id:"c7",n:7,tier:"proxy",source:"NYC 311",title:"Flooding service requests, BK CB6 2019–2025",docId:"NYC311-FLD-CB6",url:"https://data.cityofnewyork.us/311",vintage:"2025-12",retrieved:"2026-05-01"},c8:{id:"c8",n:8,tier:"proxy",source:"FEMA NFIP",title:"National Flood Insurance Program claims, tract 36047008500",docId:"NFIP-T36047008500",url:"https://www.fema.gov/openfema",vintage:"2024-12",retrieved:"2026-04-28"},c9:{id:"c9",n:9,tier:"synthetic",source:"TerraMind v1.2",title:"Synthetic SAR backscatter for 2025-09-14 (Sentinel-1 cloud-occluded)",docId:"RIPRAP-SYN-20250914",url:"#methodology-synthetic",vintage:"2025-09",retrieved:"2026-05-02"},c10:{id:"c10",n:10,tier:"modeled",source:"NYC DCP",title:"Waterfront Revitalization Program — Coastal Risk Area",docId:"NYCDCP-WRP-2022",url:"https://nyc.gov/dcp/wrp",vintage:"2022-11",retrieved:"2026-04-28"}},x=[{kind:"status",html:'<p class="briefing-deck"><strong>80 Pioneer Street, Red Hook, Brooklyn 11231.</strong> Block 597, Lot 30. Industrial Business Zone (IBZ-RH). Queried 2026-05-02 14:22 ET. <span class="briefing-meta">Briefing v0.4.2 · 9 specialists fired · 1 silent (TidalGauge: out of range)</span></p>'},{kind:"head",n:"01",label:"Status",title:"Coastal-edge, post-Sandy, multi-hazard"},{kind:"prose",parts:[{tier:"empirical",text:"The address sits 380 ft inland of the Erie Basin bulkhead, at a ground elevation of 6.2 ft NAVD88",cite:"c1"},{text:" — within the "},{tier:"empirical",text:"2012 Sandy Inundation Zone, which recorded a peak storm tide of 11.4 ft NAVD88 at the Battery",cite:"c2"},{text:" 2.4 mi to the northwest. "},{tier:"modeled",text:"FEMA's preliminary FIRM places the parcel in Zone AE (BFE 11 ft NAVD88)",cite:"c4"},{text:", a 4.8 ft freeboard above current grade. The site is upgradient of two FloodNet sensors and three blocks from a chronic 311 cluster."}]},{kind:"head",n:"02",label:"Empirical evidence",tier:"empirical"},{kind:"prose",parts:[{tier:"empirical",text:"FloodNet sensor BK-RH-002 (Coffey Park, 1,200 ft south) recorded 7 above-curb events between 2024-06 and 2026-04",cite:"c3"},{text:", with a peak depth of 14.3 cm during the 2025-09-29 nor'easter. "},{tier:"empirical",text:"USGS post-Sandy high-water marks within 500 ft cluster between 6.8 and 8.1 ft NAVD88",cite:"c1"},{text:", consistent with 0.6–1.9 ft of standing water at the queried address during the storm."}]},{kind:"head",n:"03",label:"Modeled scenarios",tier:"modeled"},{kind:"prose",parts:[{tier:"modeled",text:"DEP's Moderate Stormwater Scenario (2.13 in/hr design storm) shows ponding ≥4 in across the western half of the lot",cite:"c5"},{text:", routed by the 1.2% slope toward Imlay St. "},{tier:"modeled",text:"Under NPCC4's 2050 90th-percentile sea-level rise (30 in)",cite:"c6"},{text:", the parcel falls within the projected daily-tidal floodplain by mid-century. "},{tier:"synthetic",text:"Synthetic SAR backscatter for 2025-09-14 (Sentinel-1 cloud-occluded) was generated by TerraMind v1.2 and is presented as a prior, not an observation",cite:"c9"},{text:"; treat with appropriate caution."}]},{kind:"head",n:"04",label:"Policy context"},{kind:"prose",parts:[{tier:"proxy",text:"311 flood complaints within the surrounding census tract total 89 calls over 2019���2025, with seasonal clustering in Aug–Oct",cite:"c7"},{text:". "},{tier:"proxy",text:"NFIP claims aggregated to tract 36047008500 total $4.1M across 47 paid losses since 2000",cite:"c8"},{text:". "},{tier:"modeled",text:"The site lies within the NYC Waterfront Revitalization Program Coastal Risk Area; CEQR §817 review applies to any discretionary action",cite:"c10"},{text:"."}]}],ce={wallSeconds:14,cacheHit:.92,cards:[{id:"fc-fema",stone:"cornerstone",tier:"modeled",variant:"headline",source:"FEMA",agency:"Federal Emergency Management Agency",vintage:"2024-09",title:"Preliminary FIRM, panel 36047C0207G",headline:"Zone AE",subhead:"BFE 11 ft NAVD88 · freeboard +4.8 ft",body:"Address sits within the regulatory 1% annual-chance floodplain. Base Flood Elevation 11.0 ft NAVD88; first floor must be at or above this datum for NFIP rating.",docId:"FEMA-FIRM-36047C0207G",citeId:"c4",mapLayer:"fema-ae"},{id:"fc-hwm",stone:"cornerstone",tier:"empirical",variant:"tabular",source:"USGS",agency:"U.S. Geological Survey",vintage:"2013-05",title:"Post-Sandy high-water marks within 500 ft",columns:["id","elev.","dist."],rows:[["HWM-NY-3081","7.4 ft NAVD88","0.18 mi"],["HWM-NY-3082","8.1 ft NAVD88","0.22 mi"],["HWM-NY-3105","6.8 ft NAVD88","0.31 mi"]],sub:"3 marks · max 8.1 ft · surveyed Nov 2012",docId:"USGS-OFR-2013-1234",citeId:"c1",mapLayer:"hwm"},{id:"fc-stormwater",stone:"cornerstone",tier:"modeled",variant:"raster",source:"NYC DEP",agency:"NYC Dept. of Environmental Protection",vintage:"2024-06",title:"Stormwater Flood Map · moderate scenario",rasterKind:"stormwater",sub:"2.13 in/hr · ponding ≥4 in W half of lot · routed toward Imlay St",docId:"NYCDEP-SWFM-2024",citeId:"c5",mapLayer:"stormwater"},{id:"fc-register-rh",stone:"keystone",tier:"empirical",variant:"register",source:"NYC OpenData",agency:"NYC OpenData · multi-agency join",vintage:"2026-05",title:"Nearby exposed assets",registers:[{reg:"MTA",tier:"empirical",label:"Smith–9 St subway entrance",detail:"0.34 mi · F · G",sourceId:"MTA-ENT-N048",vintage:"2025-11",note:null},{reg:"NYCHA",tier:"empirical",label:"Red Hook East Houses",detail:"0.41 mi · 2,878 res.",sourceId:"NYCHA-RHE",vintage:"2025-Q3",note:null},{reg:"NYCHA",tier:"empirical",label:"Red Hook West Houses",detail:"0.52 mi · 3,142 res.",sourceId:"NYCHA-RHW",vintage:"2025-Q3",note:null},{reg:"DOE",tier:"empirical",label:"PS 27 Agnes Y. Humphrey",detail:"0.29 mi · 271 K-5",sourceId:"DOE-K027",vintage:"2024-25",note:null},{reg:"DOH",tier:"empirical",label:null,detail:null,sourceId:null,vintage:null,note:"no acute-care hospital within 1.0 mi (silent)"},{reg:"PLUTO",tier:"empirical",label:"Lot 36047 / 521 / 7",detail:"BIN 3018472 · MX-1",sourceId:"PLUTO-2024v2",vintage:"2024-12",note:null}],sub:"5 of 6 registers fired · 1 silent · joined within 1.0 mi",docId:"RIPRAP-EXP-RH80",citeId:"c-reg-rh",mapLayer:"registers"},{id:"fc-floodnet",stone:"touchstone",tier:"empirical",variant:"spark",source:"FloodNet",agency:"FloodNet NYC sensor network",vintage:"2026-04",title:"Sensor BK-RH-002, monthly above-curb events",headline:"7 events",subhead:"Jun 2024 → Apr 2026 · peak 14.3 cm",spark:[0,0,1,0,2,1,0,0,3,0,1,0,0,0,2,1,0,0,1,0,2,4,1,1],sparkSub:"Sensor located 0.21 mi N at Coffey & Van Brunt. Above-curb depth in cm; events ≥2 cm.",docId:"FN-BK-RH-002",citeId:"c3",mapLayer:"floodnet"},{id:"fc-311",stone:"touchstone",tier:"proxy",variant:"histogram",source:"NYC 311",agency:"NYC 311 service requests",vintage:"2025-12",title:"Recent 311 flood complaints, BK CB6",headline:"89 calls",subhead:"2019–2025 · seasonal cluster Aug–Oct",histogram:[3,2,1,0,1,4,7,12,18,11,5,3,4,2,1,0,2,3,8,9,4,2,1,0],sparkSub:"Filtered to complaint types: Sewer (Backup), Street Flooding, Catch Basin Clogged. Within 200 m of address.",docId:"NYC311-FLD-CB6",citeId:"c7",mapLayer:"complaints"},{id:"fc-prithvi-pluvial",stone:"touchstone",tier:"modeled",variant:"raster-pred",source:"Prithvi-NYC-Pluvial",agency:"NASA-IBM Prithvi v2 · NYC fine-tune",vintage:"2026-05-02 · Sentinel-2",title:"Pluvial flood prediction · Prithvi-NYC-Pluvial",rasterKind:"prithvi",headline:"0.3% flooded",subhead:"no flooding apparent · scene 2026-05-02",sub:"Model interpretation of imagery, not real-time observation. Confidence-mean 0.84 across non-flooded pixels.",docId:"PRITHVI-NYC-PLUV-V2-20260502",citeId:"c-prithvi",illustrative:!0,mapLayer:"prithvi-pluvial"},{id:"fc-terramind-lulc",stone:"touchstone",tier:"synthetic",variant:"lulc",source:"TerraMind v1.2",agency:"IBM TerraMind v1.2 · Sentinel-2 inputs",vintage:"Sentinel-2 · 2024-09-18",title:"Land use / land cover · TerraMind v1.2",rasterKind:"lulc",classMix:[{k:"urban",pct:62,color:"#C66"},{k:"water",pct:18,color:"#5B7FB4"},{k:"vegetation",pct:12,color:"#5B8A4A"},{k:"barren",pct:6,color:"#A89A78"},{k:"wetland",pct:2,color:"#D9C75A"}],sub:"Synthetic prior. LULC palette is a layer convention, not a tier signal.",docId:"TERRAMIND-LULC-20240918",citeId:"c-tm-lulc",illustrative:!0,mapLayer:"terramind-lulc"},{id:"fc-nws",stone:"touchstone",tier:"empirical",variant:"scalars",source:"NWS KNYC",agency:"NOAA · National Weather Service",vintage:"2026-05-05",title:"Current weather, station KNYC",scalars:[{value:"0.02 in",label:"precip · last 24h"},{value:"67°F",label:"temp · current"},{value:"PC",label:"conditions"}],sub:"Observation timestamp 2026-05-05 14:18 ET. Central Park station; not point-of-query.",docId:"NWS-KNYC",citeId:"c-nws",mapLayer:"nws"},{id:"fc-ttm-surge",stone:"lodestone",tier:"modeled",variant:"timeseries",source:"Granite TTM r2 (zero-shot)",agency:"IBM Granite-TimeSeries · regional",vintage:"2026-05-05 12:00 ET",title:"Storm surge nowcast at The Battery — 9.6 h horizon (regional)",timeseries:{hours:96,peak:{x:38,y:47},peakLabel:"+47 cm @ +38h"},headline:"+47 cm",subhead:"peak surge residual · 9.6h horizon · 6-min cadence",sub:"Regional disclosure. Nowcast applies city-wide via NOAA station 8518750. Distinct from the fine-tuned Battery surge nowcast.",spatialNote:"regional · The Battery, not point-of-query",docId:"ttm_battery_surge_zeroshot",citeId:"c-ttm",mapLayer:null},{id:"fc-ttm-surge-ft",stone:"lodestone",tier:"modeled",variant:"timeseries-ft",source:"msradam/Granite-TTM-r2-Battery-Surge",agency:"Granite TTM r2 · NYC-specialized fine-tune",vintage:"2026-05-05 12:00 ET",title:"Storm surge nowcast at The Battery — 96 h horizon (NYC-specialized fine-tune)",timeseries:{hours:96,peak:{x:38,y:53},peakLabel:"+53 cm @ +38h"},headline:"+53 cm",subhead:"peak surge · 96h horizon · hourly cadence",sub:"Fine-tuned on NYC tide-gauge history. Trained on AMD MI300X.",spatialNote:"regional · The Battery, not point-of-query",docId:"ttm_battery_surge_finetune",citeId:"c-ttm-ft",mapLayer:null,hfModelCard:"huggingface.co/msradam/Granite-TTM-r2-Battery-Surge",rmse:"0.157 m",skillVsPersistence:"−35% vs persistence",hardwareBadge:"MI300X"},{id:"fc-npcc4",stone:"lodestone",tier:"modeled",variant:"forecast",source:"NPCC4",agency:"NYC Panel on Climate Change, 4th Assessment",vintage:"2024-03",title:"Sea-level rise projections, Lower NY Harbor",forecast:[{year:2030,low:4,mid:6,high:9},{year:2050,low:13,mid:22,high:30},{year:2080,low:28,mid:49,high:75},{year:2100,low:38,mid:71,high:114}],sub:"inches MSL · 17th–83rd %ile range, median line. Battery tide-gauge baseline.",docId:"NPCC4-Ch3-Tbl3.2",citeId:"c6",mapLayer:null},{id:"fc-mellea-meta",stone:"capstone",tier:"modeled",variant:"meta",source:"Mellea",agency:"Capstone synthesis · grounding check",vintage:"2026-05-05 14:22 ET",title:"Briefing reconciliation",metaRows:[{k:"mellea reroll",v:"1 reroll"},{k:"grounding checks",v:"4/4 passed"},{k:"citations resolved",v:"4"},{k:"wall-clock",v:"24.0 s"}],sub:"Capstone produces prose, not cards. This meta-card summarizes the reconciler chain that wrote the four-section briefing above.",docId:"RIPRAP-CAP-RH80",citeId:null,mapLayer:null}],stones:[{key:"cornerstone",members:[{id:"CORN-001",name:"sandy_inundation",status:"fired",tier:"empirical",ms:412},{id:"CORN-002",name:"dep_stormwater",status:"fired",tier:"modeled",ms:540},{id:"CORN-003",name:"ida_hwm_2021",status:"fired",tier:"empirical",ms:612},{id:"CORN-004",name:"prithvi_eo_v2",status:"fired",tier:"modeled",ms:980},{id:"CORN-005",name:"microtopo_lidar",status:"fired",tier:"proxy",ms:1240}]},{key:"keystone",members:[{id:"KEY-001",name:"mta_entrance_exposure",status:"silent_by_design",tier:"empirical",ms:30,note:"no entrances within radius"},{id:"KEY-002",name:"nycha_development_exposure",status:"silent_by_design",tier:"empirical",ms:28,note:"no NYCHA developments within 1.0 mi"},{id:"KEY-003",name:"doe_school_exposure",status:"silent_by_design",tier:"empirical",ms:24,note:"no DOE schools within 1.0 mi"},{id:"KEY-004",name:"doh_hospital_exposure",status:"silent_by_design",tier:"empirical",ms:22,note:"no acute-care hospitals within 1.0 mi"}]},{key:"touchstone",members:[{id:"TCH-001",name:"floodnet",status:"fired",tier:"empirical",ms:285},{id:"TCH-002",name:"nyc311",status:"fired",tier:"proxy",ms:410},{id:"TCH-003",name:"nws_obs",status:"fired",tier:"empirical",ms:240},{id:"TCH-004",name:"noaa_tides",status:"fired",tier:"empirical",ms:196},{id:"TCH-005",name:"prithvi_eo_live",status:"fired",tier:"modeled",ms:4920},{id:"TCH-006",name:"terramind_lulc",status:"fired",tier:"synthetic",ms:2100}]},{key:"lodestone",members:[{id:"LOD-001",name:"nws_alerts",status:"fired",tier:"modeled",ms:110},{id:"LOD-002",name:"ttm_forecast",status:"fired",tier:"modeled",ms:1500},{id:"LOD-003",name:"ttm_battery_surge",status:"fired",tier:"modeled",ms:1480},{id:"LOD-004",name:"floodnet_forecast",status:"silent_by_design",tier:"modeled",ms:14,note:"sensor has only 2 historical events; forecast omitted (silent-floor: 5)"},{id:"LOD-005",name:"ttm_311_forecast",status:"errored",tier:"modeled",ms:0,note:"311 history fetch failed: HTTP 503 at NYC OpenData (3 retries)"}]},{key:"capstone",members:[{id:"CAP-001",name:"rag_granite_embedding",status:"fired",tier:"proxy",ms:410},{id:"CAP-002",name:"gliner_extract",status:"fired",tier:"proxy",ms:280},{id:"CAP-003",name:"reconcile_granite41",status:"fired",tier:"modeled",ms:6240}]}].map(a=>({key:a.key,members:re(a.key,a.members)}))};var me=q('<section class="hero-band"><div class="hero-band-inner"><div class="app-shell-top is-desktop"><main id="region-briefing" class="app-region app-region-brief" aria-labelledby="brief-h1"><header class="region-head"><span class="section-label">Briefing</span> <button type="button" class="region-action" aria-label="Replay streaming">↻ replay stream</button></header> <h1 id="brief-h1" class="brief-h1">Flood-exposure briefing <span class="brief-h1-addr"> </span></h1> <!></main> <div class="app-region-side" style="grid-area: side;"><aside id="region-map" class="app-region app-region-map" aria-label="Map region"><header class="region-head"><span class="section-label">Map</span> <span class="region-head-meta">Carto Positron · z15 · 40.6776°N 74.0096°W</span></header> <div style="position: relative; flex: 1; min-height: 0;"><!> <!></div></aside> <aside id="region-cites" class="app-region app-region-cites" aria-label="Citations"><!></aside></div></div> <div class="app-shell-bottom"><section class="app-region app-region-findings" aria-label="Findings"><!></section></div></div></section>');function ye(a,T){Z(T,!0);let c=l(null),F="comfortable",B="smart",b=l(!1);X(()=>{typeof window<"u"&&d(b,new URL(window.location.href).searchParams.get("grammar")==="1")});function Y(o){d(c,o,!0)}function E(o){const s=document.getElementById("region-cites");s&&s.scrollIntoView({behavior:"smooth",block:"start"})}let n=l(Q({empirical:!0,modeled:!0,synthetic:!0,proxy:!0})),m=l(0);$(()=>(de({queryId:"sample",queryText:R,intent:"single_address",specialists:9,blocks:x,citations:y,generatedAt:new Date().toISOString(),attempts:1}),M.markReady(),()=>M.reset()));const L={label:"80 Pioneer St",lat:40.6776,lon:-74.0096},C={type:"FeatureCollection",features:[{type:"Feature",properties:{source:"sample-fixture",tier:"synthetic"},geometry:{type:"Polygon",coordinates:[[[-74.014,40.679],[-74.007,40.68],[-74.005,40.677],[-74.009,40.6755],[-74.014,40.679]]]}}]};var u=me(),N=e(u),p=e(N),h=e(p),g=e(h),D=r(e(g),2);t(g);var v=r(g,2),w=r(e(v)),H=e(w,!0);t(w),t(v);var O=r(v,2);ie(O,{get blocks(){return x},get citations(){return y},streaming:!0,get replayKey(){return i(m)}}),t(h);var I=r(h,2),f=e(I),S=r(e(f),2),k=e(S);ae(k,{get address(){return L},get activeLayers(){return i(n)},get syntheticPrior(){return C},get linkedKey(){return i(c)}});var K=r(k,2);{let o=te(()=>({empirical:0,modeled:0,synthetic:C.features.length,proxy:0}));ne(K,{get active(){return i(n)},get featureCounts(){return i(o)},onToggle:s=>d(n,{...i(n),[s]:!i(n)[s]},!0)})}t(S),t(f);var _=r(f,2),G=e(_);se(G,{get citations(){return y}}),t(_),t(I),t(p);var P=r(p,2),A=e(P),W=e(A);oe(W,{get data(){return ce},density:F,provenanceMode:B,get showGrammar(){return i(b)},get linkedKey(){return i(c)},onLink:Y,onCite:E}),t(A),t(P),t(N),t(u),J(()=>j(H,R)),V("click",D,()=>d(m,i(m)+1)),U(a,u),ee()}z(["click"]);export{ye as component,fe as universal};
|
|
|
|
| 1 |
+
import{d as z,e as V,a as U,f as q,s as j}from"../chunks/CWw6qgC_.js";import{p as Z,am as X,a5 as d,a4 as l,a9 as Q,ai as $,t as J,a as ee,s as r,c as e,o as i,r as t,al as te}from"../chunks/BTUA7_xE.js";import{B as ie}from"../chunks/BatqQaKj.js";import{f as re,R as ae,M as ne,C as se,F as oe}from"../chunks/zVqBGhq2.js";import{p as de,b as M}from"../chunks/DxQlA7U2.js";const le=!0,fe=Object.freeze(Object.defineProperty({__proto__:null,prerender:le},Symbol.toStringTag,{value:"Module"})),R="80 Pioneer Street · Red Hook · Brooklyn",y={c1:{id:"c1",n:1,tier:"empirical",source:"USGS",title:"Hurricane Sandy storm tide elevations, NY-NJ Harbor",docId:"USGS-OFR-2013-1234",url:"https://pubs.usgs.gov/of/2013/1234/",vintage:"2013-05",retrieved:"2026-04-28"},c2:{id:"c2",n:2,tier:"empirical",source:"NYC OEM",title:"Hurricane Sandy Inundation Zone (2012)",docId:"NYCOEM-SIZ-2013",url:"https://data.cityofnewyork.us/dataset/sandy-inundation-zone",vintage:"2013-01",retrieved:"2026-04-28"},c3:{id:"c3",n:3,tier:"empirical",source:"FloodNet NYC",title:"Sensor BK-RH-002 — Coffey Park, monthly exceedance",docId:"FN-BK-RH-002",url:"https://floodnet.nyc/sensor/BK-RH-002",vintage:"2026-04",retrieved:"2026-05-02"},c4:{id:"c4",n:4,tier:"modeled",source:"FEMA",title:"Preliminary Flood Insurance Rate Map, panel 36047C0207G",docId:"FEMA-FIRM-36047C0207G",url:"https://msc.fema.gov/portal/search",vintage:"2024-09",retrieved:"2026-04-28"},c5:{id:"c5",n:5,tier:"modeled",source:"NYC DEP",title:"Stormwater Flood Map — Moderate Stormwater Scenario",docId:"NYCDEP-SWFM-2024",url:"https://nyc.gov/stormwater-map",vintage:"2024-06",retrieved:"2026-04-28"},c6:{id:"c6",n:6,tier:"modeled",source:"NPCC4",title:"Sea-level rise projections, 2050 90th percentile",docId:"NPCC4-Ch3-Tbl3.2",url:"https://nyas.org/npcc4",vintage:"2024-03",retrieved:"2026-04-28"},c7:{id:"c7",n:7,tier:"proxy",source:"NYC 311",title:"Flooding service requests, BK CB6 2019–2025",docId:"NYC311-FLD-CB6",url:"https://data.cityofnewyork.us/311",vintage:"2025-12",retrieved:"2026-05-01"},c8:{id:"c8",n:8,tier:"proxy",source:"FEMA NFIP",title:"National Flood Insurance Program claims, tract 36047008500",docId:"NFIP-T36047008500",url:"https://www.fema.gov/openfema",vintage:"2024-12",retrieved:"2026-04-28"},c9:{id:"c9",n:9,tier:"synthetic",source:"TerraMind v1.2",title:"Synthetic SAR backscatter for 2025-09-14 (Sentinel-1 cloud-occluded)",docId:"RIPRAP-SYN-20250914",url:"#methodology-synthetic",vintage:"2025-09",retrieved:"2026-05-02"},c10:{id:"c10",n:10,tier:"modeled",source:"NYC DCP",title:"Waterfront Revitalization Program — Coastal Risk Area",docId:"NYCDCP-WRP-2022",url:"https://nyc.gov/dcp/wrp",vintage:"2022-11",retrieved:"2026-04-28"}},x=[{kind:"status",html:'<p class="briefing-deck"><strong>80 Pioneer Street, Red Hook, Brooklyn 11231.</strong> Block 597, Lot 30. Industrial Business Zone (IBZ-RH). Queried 2026-05-02 14:22 ET. <span class="briefing-meta">Briefing v0.4.2 · 9 specialists fired · 1 silent (TidalGauge: out of range)</span></p>'},{kind:"head",n:"01",label:"Status",title:"Coastal-edge, post-Sandy, multi-hazard"},{kind:"prose",parts:[{tier:"empirical",text:"The address sits 380 ft inland of the Erie Basin bulkhead, at a ground elevation of 6.2 ft NAVD88",cite:"c1"},{text:" — within the "},{tier:"empirical",text:"2012 Sandy Inundation Zone, which recorded a peak storm tide of 11.4 ft NAVD88 at the Battery",cite:"c2"},{text:" 2.4 mi to the northwest. "},{tier:"modeled",text:"FEMA's preliminary FIRM places the parcel in Zone AE (BFE 11 ft NAVD88)",cite:"c4"},{text:", a 4.8 ft freeboard above current grade. The site is upgradient of two FloodNet sensors and three blocks from a chronic 311 cluster."}]},{kind:"head",n:"02",label:"Empirical evidence",tier:"empirical"},{kind:"prose",parts:[{tier:"empirical",text:"FloodNet sensor BK-RH-002 (Coffey Park, 1,200 ft south) recorded 7 above-curb events between 2024-06 and 2026-04",cite:"c3"},{text:", with a peak depth of 14.3 cm during the 2025-09-29 nor'easter. "},{tier:"empirical",text:"USGS post-Sandy high-water marks within 500 ft cluster between 6.8 and 8.1 ft NAVD88",cite:"c1"},{text:", consistent with 0.6–1.9 ft of standing water at the queried address during the storm."}]},{kind:"head",n:"03",label:"Modeled scenarios",tier:"modeled"},{kind:"prose",parts:[{tier:"modeled",text:"DEP's Moderate Stormwater Scenario (2.13 in/hr design storm) shows ponding ≥4 in across the western half of the lot",cite:"c5"},{text:", routed by the 1.2% slope toward Imlay St. "},{tier:"modeled",text:"Under NPCC4's 2050 90th-percentile sea-level rise (30 in)",cite:"c6"},{text:", the parcel falls within the projected daily-tidal floodplain by mid-century. "},{tier:"synthetic",text:"Synthetic SAR backscatter for 2025-09-14 (Sentinel-1 cloud-occluded) was generated by TerraMind v1.2 and is presented as a prior, not an observation",cite:"c9"},{text:"; treat with appropriate caution."}]},{kind:"head",n:"04",label:"Policy context"},{kind:"prose",parts:[{tier:"proxy",text:"311 flood complaints within the surrounding census tract total 89 calls over 2019–2025, with seasonal clustering in Aug–Oct",cite:"c7"},{text:". "},{tier:"proxy",text:"NFIP claims aggregated to tract 36047008500 total $4.1M across 47 paid losses since 2000",cite:"c8"},{text:". "},{tier:"modeled",text:"The site lies within the NYC Waterfront Revitalization Program Coastal Risk Area; CEQR §817 review applies to any discretionary action",cite:"c10"},{text:"."}]}],ce={wallSeconds:14,cacheHit:.92,cards:[{id:"fc-fema",stone:"cornerstone",tier:"modeled",variant:"headline",source:"FEMA",agency:"Federal Emergency Management Agency",vintage:"2024-09",title:"Preliminary FIRM, panel 36047C0207G",headline:"Zone AE",subhead:"BFE 11 ft NAVD88 · freeboard +4.8 ft",body:"Address sits within the regulatory 1% annual-chance floodplain. Base Flood Elevation 11.0 ft NAVD88; first floor must be at or above this datum for NFIP rating.",docId:"FEMA-FIRM-36047C0207G",citeId:"c4",mapLayer:"fema-ae"},{id:"fc-hwm",stone:"cornerstone",tier:"empirical",variant:"tabular",source:"USGS",agency:"U.S. Geological Survey",vintage:"2013-05",title:"Post-Sandy high-water marks within 500 ft",columns:["id","elev.","dist."],rows:[["HWM-NY-3081","7.4 ft NAVD88","0.18 mi"],["HWM-NY-3082","8.1 ft NAVD88","0.22 mi"],["HWM-NY-3105","6.8 ft NAVD88","0.31 mi"]],sub:"3 marks · max 8.1 ft · surveyed Nov 2012",docId:"USGS-OFR-2013-1234",citeId:"c1",mapLayer:"hwm"},{id:"fc-stormwater",stone:"cornerstone",tier:"modeled",variant:"raster",source:"NYC DEP",agency:"NYC Dept. of Environmental Protection",vintage:"2024-06",title:"Stormwater Flood Map · moderate scenario",rasterKind:"stormwater",sub:"2.13 in/hr · ponding ≥4 in W half of lot · routed toward Imlay St",docId:"NYCDEP-SWFM-2024",citeId:"c5",mapLayer:"stormwater"},{id:"fc-register-rh",stone:"keystone",tier:"empirical",variant:"register",source:"NYC OpenData",agency:"NYC OpenData · multi-agency join",vintage:"2026-05",title:"Nearby exposed assets",registers:[{reg:"MTA",tier:"empirical",label:"Smith–9 St subway entrance",detail:"0.34 mi · F · G",sourceId:"MTA-ENT-N048",vintage:"2025-11",note:null},{reg:"NYCHA",tier:"empirical",label:"Red Hook East Houses",detail:"0.41 mi · 2,878 res.",sourceId:"NYCHA-RHE",vintage:"2025-Q3",note:null},{reg:"NYCHA",tier:"empirical",label:"Red Hook West Houses",detail:"0.52 mi · 3,142 res.",sourceId:"NYCHA-RHW",vintage:"2025-Q3",note:null},{reg:"DOE",tier:"empirical",label:"PS 27 Agnes Y. Humphrey",detail:"0.29 mi · 271 K-5",sourceId:"DOE-K027",vintage:"2024-25",note:null},{reg:"DOH",tier:"empirical",label:null,detail:null,sourceId:null,vintage:null,note:"no acute-care hospital within 1.0 mi (silent)"},{reg:"PLUTO",tier:"empirical",label:"Lot 36047 / 521 / 7",detail:"BIN 3018472 · MX-1",sourceId:"PLUTO-2024v2",vintage:"2024-12",note:null}],sub:"5 of 6 registers fired · 1 silent · joined within 1.0 mi",docId:"RIPRAP-EXP-RH80",citeId:"c-reg-rh",mapLayer:"registers"},{id:"fc-floodnet",stone:"touchstone",tier:"empirical",variant:"spark",source:"FloodNet",agency:"FloodNet NYC sensor network",vintage:"2026-04",title:"Sensor BK-RH-002, monthly above-curb events",headline:"7 events",subhead:"Jun 2024 → Apr 2026 · peak 14.3 cm",spark:[0,0,1,0,2,1,0,0,3,0,1,0,0,0,2,1,0,0,1,0,2,4,1,1],sparkSub:"Sensor located 0.21 mi N at Coffey & Van Brunt. Above-curb depth in cm; events ≥2 cm.",docId:"FN-BK-RH-002",citeId:"c3",mapLayer:"floodnet"},{id:"fc-311",stone:"touchstone",tier:"proxy",variant:"histogram",source:"NYC 311",agency:"NYC 311 service requests",vintage:"2025-12",title:"Recent 311 flood complaints, BK CB6",headline:"89 calls",subhead:"2019–2025 · seasonal cluster Aug–Oct",histogram:[3,2,1,0,1,4,7,12,18,11,5,3,4,2,1,0,2,3,8,9,4,2,1,0],sparkSub:"Filtered to complaint types: Sewer (Backup), Street Flooding, Catch Basin Clogged. Within 200 m of address.",docId:"NYC311-FLD-CB6",citeId:"c7",mapLayer:"complaints"},{id:"fc-prithvi-pluvial",stone:"touchstone",tier:"modeled",variant:"raster-pred",source:"Prithvi-NYC-Pluvial",agency:"NASA-IBM Prithvi v2 · NYC fine-tune",vintage:"2026-05-02 · Sentinel-2",title:"Pluvial flood prediction · Prithvi-NYC-Pluvial",rasterKind:"prithvi",headline:"0.3% flooded",subhead:"no flooding apparent · scene 2026-05-02",sub:"Model interpretation of imagery, not real-time observation. Confidence-mean 0.84 across non-flooded pixels.",docId:"PRITHVI-NYC-PLUV-V2-20260502",citeId:"c-prithvi",illustrative:!0,mapLayer:"prithvi-pluvial"},{id:"fc-terramind-lulc",stone:"touchstone",tier:"synthetic",variant:"lulc",source:"TerraMind v1.2",agency:"IBM TerraMind v1.2 · Sentinel-2 inputs",vintage:"Sentinel-2 · 2024-09-18",title:"Land use / land cover · TerraMind v1.2",rasterKind:"lulc",classMix:[{k:"urban",pct:62,color:"#C66"},{k:"water",pct:18,color:"#5B7FB4"},{k:"vegetation",pct:12,color:"#5B8A4A"},{k:"barren",pct:6,color:"#A89A78"},{k:"wetland",pct:2,color:"#D9C75A"}],sub:"Synthetic prior. LULC palette is a layer convention, not a tier signal.",docId:"TERRAMIND-LULC-20240918",citeId:"c-tm-lulc",illustrative:!0,mapLayer:"terramind-lulc"},{id:"fc-nws",stone:"touchstone",tier:"empirical",variant:"scalars",source:"NWS KNYC",agency:"NOAA · National Weather Service",vintage:"2026-05-05",title:"Current weather, station KNYC",scalars:[{value:"0.02 in",label:"precip · last 24h"},{value:"67°F",label:"temp · current"},{value:"PC",label:"conditions"}],sub:"Observation timestamp 2026-05-05 14:18 ET. Central Park station; not point-of-query.",docId:"NWS-KNYC",citeId:"c-nws",mapLayer:"nws"},{id:"fc-ttm-surge",stone:"lodestone",tier:"modeled",variant:"timeseries",source:"Granite TTM r2 (zero-shot)",agency:"IBM Granite-TimeSeries · regional",vintage:"2026-05-05 12:00 ET",title:"Storm surge nowcast at The Battery — 9.6 h horizon (regional)",timeseries:{hours:96,peak:{x:38,y:47},peakLabel:"+47 cm @ +38h"},headline:"+47 cm",subhead:"peak surge residual · 9.6h horizon · 6-min cadence",sub:"Regional disclosure. Nowcast applies city-wide via NOAA station 8518750. Distinct from the fine-tuned Battery surge nowcast.",spatialNote:"regional · The Battery, not point-of-query",docId:"ttm_battery_surge_zeroshot",citeId:"c-ttm",mapLayer:null},{id:"fc-ttm-surge-ft",stone:"lodestone",tier:"modeled",variant:"timeseries-ft",source:"msradam/Granite-TTM-r2-Battery-Surge",agency:"Granite TTM r2 · NYC-specialized fine-tune",vintage:"2026-05-05 12:00 ET",title:"Storm surge nowcast at The Battery — 96 h horizon (NYC-specialized fine-tune)",timeseries:{hours:96,peak:{x:38,y:53},peakLabel:"+53 cm @ +38h"},headline:"+53 cm",subhead:"peak surge · 96h horizon · hourly cadence",sub:"Fine-tuned on NYC tide-gauge history. Trained on AMD MI300X.",spatialNote:"regional · The Battery, not point-of-query",docId:"ttm_battery_surge_finetune",citeId:"c-ttm-ft",mapLayer:null,hfModelCard:"huggingface.co/msradam/Granite-TTM-r2-Battery-Surge",rmse:"0.157 m",skillVsPersistence:"−35% vs persistence",hardwareBadge:"MI300X"},{id:"fc-npcc4",stone:"lodestone",tier:"modeled",variant:"forecast",source:"NPCC4",agency:"NYC Panel on Climate Change, 4th Assessment",vintage:"2024-03",title:"Sea-level rise projections, Lower NY Harbor",forecast:[{year:2030,low:4,mid:6,high:9},{year:2050,low:13,mid:22,high:30},{year:2080,low:28,mid:49,high:75},{year:2100,low:38,mid:71,high:114}],sub:"inches MSL · 17th–83rd %ile range, median line. Battery tide-gauge baseline.",docId:"NPCC4-Ch3-Tbl3.2",citeId:"c6",mapLayer:null},{id:"fc-mellea-meta",stone:"capstone",tier:"modeled",variant:"meta",source:"Mellea",agency:"Capstone synthesis · grounding check",vintage:"2026-05-05 14:22 ET",title:"Briefing reconciliation",metaRows:[{k:"mellea reroll",v:"1 reroll"},{k:"grounding checks",v:"4/4 passed"},{k:"citations resolved",v:"4"},{k:"wall-clock",v:"24.0 s"}],sub:"Capstone produces prose, not cards. This meta-card summarizes the reconciler chain that wrote the four-section briefing above.",docId:"RIPRAP-CAP-RH80",citeId:null,mapLayer:null}],stones:[{key:"cornerstone",members:[{id:"CORN-001",name:"sandy_inundation",status:"fired",tier:"empirical",ms:412},{id:"CORN-002",name:"dep_stormwater",status:"fired",tier:"modeled",ms:540},{id:"CORN-003",name:"ida_hwm_2021",status:"fired",tier:"empirical",ms:612},{id:"CORN-004",name:"prithvi_eo_v2",status:"fired",tier:"modeled",ms:980},{id:"CORN-005",name:"microtopo_lidar",status:"fired",tier:"proxy",ms:1240}]},{key:"keystone",members:[{id:"KEY-001",name:"mta_entrance_exposure",status:"silent_by_design",tier:"empirical",ms:30,note:"no entrances within radius"},{id:"KEY-002",name:"nycha_development_exposure",status:"silent_by_design",tier:"empirical",ms:28,note:"no NYCHA developments within 1.0 mi"},{id:"KEY-003",name:"doe_school_exposure",status:"silent_by_design",tier:"empirical",ms:24,note:"no DOE schools within 1.0 mi"},{id:"KEY-004",name:"doh_hospital_exposure",status:"silent_by_design",tier:"empirical",ms:22,note:"no acute-care hospitals within 1.0 mi"}]},{key:"touchstone",members:[{id:"TCH-001",name:"floodnet",status:"fired",tier:"empirical",ms:285},{id:"TCH-002",name:"nyc311",status:"fired",tier:"proxy",ms:410},{id:"TCH-003",name:"nws_obs",status:"fired",tier:"empirical",ms:240},{id:"TCH-004",name:"noaa_tides",status:"fired",tier:"empirical",ms:196},{id:"TCH-005",name:"prithvi_eo_live",status:"fired",tier:"modeled",ms:4920},{id:"TCH-006",name:"terramind_lulc",status:"fired",tier:"synthetic",ms:2100}]},{key:"lodestone",members:[{id:"LOD-001",name:"nws_alerts",status:"fired",tier:"modeled",ms:110},{id:"LOD-002",name:"ttm_forecast",status:"fired",tier:"modeled",ms:1500},{id:"LOD-003",name:"ttm_battery_surge",status:"fired",tier:"modeled",ms:1480},{id:"LOD-004",name:"floodnet_forecast",status:"silent_by_design",tier:"modeled",ms:14,note:"sensor has only 2 historical events; forecast omitted (silent-floor: 5)"},{id:"LOD-005",name:"ttm_311_forecast",status:"errored",tier:"modeled",ms:0,note:"311 history fetch failed: HTTP 503 at NYC OpenData (3 retries)"}]},{key:"capstone",members:[{id:"CAP-001",name:"rag_granite_embedding",status:"fired",tier:"proxy",ms:410},{id:"CAP-002",name:"gliner_extract",status:"fired",tier:"proxy",ms:280},{id:"CAP-003",name:"reconcile_granite41",status:"fired",tier:"modeled",ms:6240}]}].map(a=>({key:a.key,members:re(a.key,a.members)}))};var me=q('<section class="hero-band"><div class="hero-band-inner"><div class="app-shell-top is-desktop"><main id="region-briefing" class="app-region app-region-brief" aria-labelledby="brief-h1"><header class="region-head"><span class="section-label">Briefing</span> <button type="button" class="region-action" aria-label="Replay streaming">↻ replay stream</button></header> <h1 id="brief-h1" class="brief-h1">Flood-exposure briefing <span class="brief-h1-addr"> </span></h1> <!></main> <div class="app-region-side" style="grid-area: side;"><aside id="region-map" class="app-region app-region-map" aria-label="Map region"><header class="region-head"><span class="section-label">Map</span> <span class="region-head-meta">Carto Positron · z15 · 40.6776°N 74.0096°W</span></header> <div style="position: relative; flex: 1; min-height: 0;"><!> <!></div></aside> <aside id="region-cites" class="app-region app-region-cites" aria-label="Citations"><!></aside></div></div> <div class="app-shell-bottom"><section class="app-region app-region-findings" aria-label="Findings"><!></section></div></div></section>');function ye(a,T){Z(T,!0);let c=l(null),F="comfortable",B="smart",b=l(!1);X(()=>{typeof window<"u"&&d(b,new URL(window.location.href).searchParams.get("grammar")==="1")});function Y(o){d(c,o,!0)}function E(o){const s=document.getElementById("region-cites");s&&s.scrollIntoView({behavior:"smooth",block:"start"})}let n=l(Q({empirical:!0,modeled:!0,synthetic:!0,proxy:!0})),m=l(0);$(()=>(de({queryId:"sample",queryText:R,intent:"single_address",specialists:9,blocks:x,citations:y,generatedAt:new Date().toISOString(),attempts:1}),M.markReady(),()=>M.reset()));const L={label:"80 Pioneer St",lat:40.6776,lon:-74.0096},C={type:"FeatureCollection",features:[{type:"Feature",properties:{source:"sample-fixture",tier:"synthetic"},geometry:{type:"Polygon",coordinates:[[[-74.014,40.679],[-74.007,40.68],[-74.005,40.677],[-74.009,40.6755],[-74.014,40.679]]]}}]};var u=me(),N=e(u),p=e(N),h=e(p),g=e(h),D=r(e(g),2);t(g);var v=r(g,2),w=r(e(v)),H=e(w,!0);t(w),t(v);var O=r(v,2);ie(O,{get blocks(){return x},get citations(){return y},streaming:!0,get replayKey(){return i(m)}}),t(h);var I=r(h,2),f=e(I),S=r(e(f),2),k=e(S);ae(k,{get address(){return L},get activeLayers(){return i(n)},get syntheticPrior(){return C},get linkedKey(){return i(c)}});var K=r(k,2);{let o=te(()=>({empirical:0,modeled:0,synthetic:C.features.length,proxy:0}));ne(K,{get active(){return i(n)},get featureCounts(){return i(o)},onToggle:s=>d(n,{...i(n),[s]:!i(n)[s]},!0)})}t(S),t(f);var _=r(f,2),G=e(_);se(G,{get citations(){return y}}),t(_),t(I),t(p);var P=r(p,2),A=e(P),W=e(A);oe(W,{get data(){return ce},density:F,provenanceMode:B,get showGrammar(){return i(b)},get linkedKey(){return i(c)},onLink:Y,onCite:E}),t(A),t(P),t(N),t(u),J(()=>j(H,R)),V("click",D,()=>d(m,i(m)+1)),U(a,u),ee()}z(["click"]);export{ye as component,fe as universal};
|
|
@@ -1 +1 @@
|
|
| 1 |
-
{"version":"
|
|
|
|
| 1 |
+
{"version":"1778255822052"}
|
|
@@ -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.FA4XFe2L.js" rel="modulepreload">
|
| 10 |
+
<link href="./_app/immutable/chunks/BIe30OUb.js" rel="modulepreload">
|
| 11 |
<link href="./_app/immutable/chunks/BTUA7_xE.js" rel="modulepreload">
|
| 12 |
+
<link href="./_app/immutable/entry/app.DBibj1kM.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.BaDkkERB.js" rel="modulepreload">
|
| 18 |
<link href="./_app/immutable/chunks/DxQlA7U2.js" rel="modulepreload">
|
| 19 |
+
<link href="./_app/immutable/chunks/DlifwAOf.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.Bas78CjE.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_2hdpwx = {
|
| 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.FA4XFe2L.js"),
|
| 48 |
+
import("./_app/immutable/entry/app.DBibj1kM.js")
|
| 49 |
]).then(([kit, app]) => {
|
| 50 |
kit.start(app, element, {
|
| 51 |
node_ids: [0, 2],
|
|
@@ -6,24 +6,24 @@
|
|
| 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/5.
|
| 24 |
<link href="../_app/immutable/chunks/BatqQaKj.js" rel="modulepreload">
|
| 25 |
<link href="../_app/immutable/chunks/25_y8TFd.js" rel="modulepreload">
|
| 26 |
-
<link href="../_app/immutable/chunks/
|
| 27 |
<link href="../_app/immutable/chunks/D907np-5.js" rel="modulepreload">
|
| 28 |
|
| 29 |
<link href="../_app/immutable/assets/RipMark.ClxF_PAC.css" rel="stylesheet">
|
|
@@ -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.FA4XFe2L.js" rel="modulepreload">
|
| 10 |
+
<link href="../_app/immutable/chunks/BIe30OUb.js" rel="modulepreload">
|
| 11 |
<link href="../_app/immutable/chunks/BTUA7_xE.js" rel="modulepreload">
|
| 12 |
+
<link href="../_app/immutable/entry/app.DBibj1kM.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.BaDkkERB.js" rel="modulepreload">
|
| 18 |
<link href="../_app/immutable/chunks/DxQlA7U2.js" rel="modulepreload">
|
| 19 |
+
<link href="../_app/immutable/chunks/DlifwAOf.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/5.NbriEyGS.js" rel="modulepreload">
|
| 24 |
<link href="../_app/immutable/chunks/BatqQaKj.js" rel="modulepreload">
|
| 25 |
<link href="../_app/immutable/chunks/25_y8TFd.js" rel="modulepreload">
|
| 26 |
+
<link href="../_app/immutable/chunks/zVqBGhq2.js" rel="modulepreload">
|
| 27 |
<link href="../_app/immutable/chunks/D907np-5.js" rel="modulepreload">
|
| 28 |
|
| 29 |
<link href="../_app/immutable/assets/RipMark.ClxF_PAC.css" rel="stylesheet">
|
|
|
|
| 38 |
|
| 39 |
<script>
|
| 40 |
{
|
| 41 |
+
__sveltekit_2hdpwx = {
|
| 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.FA4XFe2L.js"),
|
| 49 |
+
import("../_app/immutable/entry/app.DBibj1kM.js")
|
| 50 |
]).then(([kit, app]) => {
|
| 51 |
kit.start(app, element, {
|
| 52 |
node_ids: [0, 5],
|
|
@@ -27,10 +27,21 @@
|
|
| 27 |
* not gated by `activeLayers`. */
|
| 28 |
registerPoints?: GeoJSON.FeatureCollection;
|
| 29 |
registerPolygons?: GeoJSON.FeatureCollection;
|
| 30 |
-
/** TerraMind-
|
| 31 |
-
*
|
| 32 |
-
*
|
|
|
|
|
|
|
| 33 |
terramindLulc?: GeoJSON.FeatureCollection;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
/** USGS Ida 2021 high-water mark points. Empirical tier; amber fill.
|
| 35 |
* Controlled by EMP master toggle. */
|
| 36 |
idaHwm?: GeoJSON.FeatureCollection;
|
|
@@ -51,6 +62,8 @@
|
|
| 51 |
registerPoints,
|
| 52 |
registerPolygons,
|
| 53 |
terramindLulc,
|
|
|
|
|
|
|
| 54 |
idaHwm,
|
| 55 |
activeLayers = { empirical: true, modeled: true, synthetic: true, proxy: true },
|
| 56 |
linkedKey = null,
|
|
@@ -81,6 +94,8 @@
|
|
| 81 |
$effect(() => { setSourceData('register-points', registerPoints); });
|
| 82 |
$effect(() => { setSourceData('register-polygons', registerPolygons); });
|
| 83 |
$effect(() => { setSourceData('terramind-lulc', terramindLulc); });
|
|
|
|
|
|
|
| 84 |
$effect(() => { setSourceData('ida-hwm', idaHwm); });
|
| 85 |
|
| 86 |
$effect(() => {
|
|
@@ -93,6 +108,10 @@
|
|
| 93 |
setLayerVisibility('tier-synthetic-line', activeLayers.synthetic);
|
| 94 |
setLayerVisibility('terramind-lulc-fill', activeLayers.synthetic);
|
| 95 |
setLayerVisibility('terramind-lulc-line', activeLayers.synthetic);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
setLayerVisibility('tier-proxy-dots', activeLayers.proxy);
|
| 97 |
});
|
| 98 |
|
|
@@ -135,6 +154,8 @@
|
|
| 135 |
map.addSource('register-points', { type: 'geojson', data: registerPoints ?? fcEmpty() });
|
| 136 |
map.addSource('register-polygons', { type: 'geojson', data: registerPolygons ?? fcEmpty() });
|
| 137 |
map.addSource('terramind-lulc', { type: 'geojson', data: terramindLulc ?? fcEmpty() });
|
|
|
|
|
|
|
| 138 |
map.addSource('ida-hwm', { type: 'geojson', data: idaHwm ?? fcEmpty() });
|
| 139 |
map.addSource('queried-address', {
|
| 140 |
type: 'geojson',
|
|
@@ -206,6 +227,30 @@
|
|
| 206 |
paint: { 'line-color': ['get', 'fill_color'], 'line-width': 0.75, 'line-opacity': 0.45, 'line-dasharray': [3, 2] }
|
| 207 |
});
|
| 208 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
// Register-asset polygons (NYCHA developments only). Fill graded
|
| 210 |
// by pct_inside_sandy_2012 — denser if more of the development is
|
| 211 |
// in the 2012 zone. Outline always-on so the boundary is legible.
|
|
|
|
| 27 |
* not gated by `activeLayers`. */
|
| 28 |
registerPoints?: GeoJSON.FeatureCollection;
|
| 29 |
registerPolygons?: GeoJSON.FeatureCollection;
|
| 30 |
+
/** TerraMind-NYC LULC polygons (5-class fine-tune, Sentinel-2-driven)
|
| 31 |
+
* or, if the LoRA didn't fire, the IBM v1 base synthesis output.
|
| 32 |
+
* Carried via `state.terramind_lulc.polygons_geojson` /
|
| 33 |
+
* `state.terramind.polygons_geojson`. Categorical fill by per-feature
|
| 34 |
+
* `fill_color`; synthetic tier; controlled by the SYN master toggle. */
|
| 35 |
terramindLulc?: GeoJSON.FeatureCollection;
|
| 36 |
+
/** TerraMind-NYC Buildings polygons (binary fine-tune, Sentinel-2-
|
| 37 |
+
* driven). Carried via `state.terramind_buildings.polygons_geojson`.
|
| 38 |
+
* Red fill; modeled tier; controlled by SYN master toggle. */
|
| 39 |
+
terramindBuildings?: GeoJSON.FeatureCollection;
|
| 40 |
+
/** Prithvi-NYC-Pluvial water polygons — live Sentinel-2 segmentation
|
| 41 |
+
* via the NYC fine-tune of Prithvi-EO 2.0. Carried via
|
| 42 |
+
* `state.prithvi_live.polygons_geojson`. Blue fill; modeled tier;
|
| 43 |
+
* controlled by MOD master toggle. */
|
| 44 |
+
prithviLive?: GeoJSON.FeatureCollection;
|
| 45 |
/** USGS Ida 2021 high-water mark points. Empirical tier; amber fill.
|
| 46 |
* Controlled by EMP master toggle. */
|
| 47 |
idaHwm?: GeoJSON.FeatureCollection;
|
|
|
|
| 62 |
registerPoints,
|
| 63 |
registerPolygons,
|
| 64 |
terramindLulc,
|
| 65 |
+
terramindBuildings,
|
| 66 |
+
prithviLive,
|
| 67 |
idaHwm,
|
| 68 |
activeLayers = { empirical: true, modeled: true, synthetic: true, proxy: true },
|
| 69 |
linkedKey = null,
|
|
|
|
| 94 |
$effect(() => { setSourceData('register-points', registerPoints); });
|
| 95 |
$effect(() => { setSourceData('register-polygons', registerPolygons); });
|
| 96 |
$effect(() => { setSourceData('terramind-lulc', terramindLulc); });
|
| 97 |
+
$effect(() => { setSourceData('terramind-buildings', terramindBuildings); });
|
| 98 |
+
$effect(() => { setSourceData('prithvi-live', prithviLive); });
|
| 99 |
$effect(() => { setSourceData('ida-hwm', idaHwm); });
|
| 100 |
|
| 101 |
$effect(() => {
|
|
|
|
| 108 |
setLayerVisibility('tier-synthetic-line', activeLayers.synthetic);
|
| 109 |
setLayerVisibility('terramind-lulc-fill', activeLayers.synthetic);
|
| 110 |
setLayerVisibility('terramind-lulc-line', activeLayers.synthetic);
|
| 111 |
+
setLayerVisibility('terramind-buildings-fill', activeLayers.synthetic);
|
| 112 |
+
setLayerVisibility('terramind-buildings-line', activeLayers.synthetic);
|
| 113 |
+
setLayerVisibility('prithvi-live-fill', activeLayers.modeled);
|
| 114 |
+
setLayerVisibility('prithvi-live-line', activeLayers.modeled);
|
| 115 |
setLayerVisibility('tier-proxy-dots', activeLayers.proxy);
|
| 116 |
});
|
| 117 |
|
|
|
|
| 154 |
map.addSource('register-points', { type: 'geojson', data: registerPoints ?? fcEmpty() });
|
| 155 |
map.addSource('register-polygons', { type: 'geojson', data: registerPolygons ?? fcEmpty() });
|
| 156 |
map.addSource('terramind-lulc', { type: 'geojson', data: terramindLulc ?? fcEmpty() });
|
| 157 |
+
map.addSource('terramind-buildings', { type: 'geojson', data: terramindBuildings ?? fcEmpty() });
|
| 158 |
+
map.addSource('prithvi-live', { type: 'geojson', data: prithviLive ?? fcEmpty() });
|
| 159 |
map.addSource('ida-hwm', { type: 'geojson', data: idaHwm ?? fcEmpty() });
|
| 160 |
map.addSource('queried-address', {
|
| 161 |
type: 'geojson',
|
|
|
|
| 227 |
paint: { 'line-color': ['get', 'fill_color'], 'line-width': 0.75, 'line-opacity': 0.45, 'line-dasharray': [3, 2] }
|
| 228 |
});
|
| 229 |
|
| 230 |
+
// TerraMind-NYC Buildings LoRA polygons. Red fill (matches the
|
| 231 |
+
// _PALETTE entry for "building" in app/context/_polygonize.py),
|
| 232 |
+
// sharper outline so individual structures read distinctly.
|
| 233 |
+
map.addLayer({
|
| 234 |
+
id: 'terramind-buildings-fill', type: 'fill', source: 'terramind-buildings',
|
| 235 |
+
paint: { 'fill-color': '#D62728', 'fill-opacity': 0.32 }
|
| 236 |
+
});
|
| 237 |
+
map.addLayer({
|
| 238 |
+
id: 'terramind-buildings-line', type: 'line', source: 'terramind-buildings',
|
| 239 |
+
paint: { 'line-color': '#A31D1F', 'line-width': 0.6, 'line-opacity': 0.7 }
|
| 240 |
+
});
|
| 241 |
+
|
| 242 |
+
// Prithvi-NYC-Pluvial water polygons (live Sentinel-2 segmentation).
|
| 243 |
+
// Blue fill, slightly higher opacity than the modeled DEP layer so
|
| 244 |
+
// the live signal reads as the dominant flood overlay.
|
| 245 |
+
map.addLayer({
|
| 246 |
+
id: 'prithvi-live-fill', type: 'fill', source: 'prithvi-live',
|
| 247 |
+
paint: { 'fill-color': '#1F77B4', 'fill-opacity': 0.42 }
|
| 248 |
+
});
|
| 249 |
+
map.addLayer({
|
| 250 |
+
id: 'prithvi-live-line', type: 'line', source: 'prithvi-live',
|
| 251 |
+
paint: { 'line-color': '#0F4F7C', 'line-width': 1.0, 'line-opacity': 0.85 }
|
| 252 |
+
});
|
| 253 |
+
|
| 254 |
// Register-asset polygons (NYCHA developments only). Fill graded
|
| 255 |
// by pct_inside_sandy_2012 — denser if more of the development is
|
| 256 |
// in the 2012 zone. Outline always-on so the boundary is legible.
|
|
@@ -288,6 +288,12 @@
|
|
| 288 |
let synFc = $state<FeatureCollection | undefined>(undefined);
|
| 289 |
let proxyFc = $state<FeatureCollection | undefined>(undefined);
|
| 290 |
let terramindLulcFc = $state<FeatureCollection | undefined>(undefined);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 291 |
let idaHwmFc = $state<FeatureCollection | undefined>(undefined);
|
| 292 |
|
| 293 |
// Compare-intent: independent geocoded addresses per place.
|
|
@@ -598,14 +604,37 @@
|
|
| 598 |
const fr = f as unknown as Record<string, unknown>;
|
| 599 |
registerPointsFc = buildRegisterPointsFc(fr);
|
| 600 |
registerPolygonsFc = buildRegisterPolygonsFc(fr);
|
| 601 |
-
//
|
| 602 |
-
//
|
| 603 |
-
//
|
| 604 |
-
|
| 605 |
-
|
| 606 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 607 |
if (pg?.type === 'FeatureCollection' && (pg.features?.length ?? 0) > 0) {
|
| 608 |
-
|
| 609 |
}
|
| 610 |
}
|
| 611 |
// v0.4.2 §12 grounding failure: budget exhausted with failed checks.
|
|
@@ -792,6 +821,8 @@
|
|
| 792 |
registerPoints={registerPointsFc}
|
| 793 |
registerPolygons={registerPolygonsFc}
|
| 794 |
terramindLulc={terramindLulcFc}
|
|
|
|
|
|
|
| 795 |
{linkedKey}
|
| 796 |
/>
|
| 797 |
<MapLegend
|
|
|
|
| 288 |
let synFc = $state<FeatureCollection | undefined>(undefined);
|
| 289 |
let proxyFc = $state<FeatureCollection | undefined>(undefined);
|
| 290 |
let terramindLulcFc = $state<FeatureCollection | undefined>(undefined);
|
| 291 |
+
// Live EO polygon layers — populated from the specialist outputs in
|
| 292 |
+
// FSM `final` state when the remote inference path returns a
|
| 293 |
+
// polygonised raster. None of these go through a /api/layers fetch;
|
| 294 |
+
// they ride the SSE stream alongside the specialist results.
|
| 295 |
+
let prithviLiveFc = $state<FeatureCollection | undefined>(undefined);
|
| 296 |
+
let terramindBuildingsFc = $state<FeatureCollection | undefined>(undefined);
|
| 297 |
let idaHwmFc = $state<FeatureCollection | undefined>(undefined);
|
| 298 |
|
| 299 |
// Compare-intent: independent geocoded addresses per place.
|
|
|
|
| 604 |
const fr = f as unknown as Record<string, unknown>;
|
| 605 |
registerPointsFc = buildRegisterPointsFc(fr);
|
| 606 |
registerPolygonsFc = buildRegisterPolygonsFc(fr);
|
| 607 |
+
// EO map layers — every specialist that returns a polygon
|
| 608 |
+
// collection plumbs onto the map. terramind synthesis +
|
| 609 |
+
// terramind LULC LoRA both contribute to the synthetic-LULC
|
| 610 |
+
// overlay; LULC LoRA wins when both fire (it's the
|
| 611 |
+
// fine-tuned, Sentinel-2-driven signal). Buildings LoRA gets
|
| 612 |
+
// its own layer. Prithvi NYC Pluvial water mask is the
|
| 613 |
+
// marquee live-EO overlay.
|
| 614 |
+
const tmSyn = fr.terramind as Record<string, unknown> | null | undefined;
|
| 615 |
+
const tmLulc = fr.terramind_lulc as Record<string, unknown> | null | undefined;
|
| 616 |
+
const tmBld = fr.terramind_buildings as Record<string, unknown> | null | undefined;
|
| 617 |
+
const pl = fr.prithvi_live as Record<string, unknown> | null | undefined;
|
| 618 |
+
const lulcCandidate =
|
| 619 |
+
(tmLulc?.ok && tmLulc?.polygons_geojson)
|
| 620 |
+
? (tmLulc.polygons_geojson as FeatureCollection)
|
| 621 |
+
: (tmSyn?.ok && tmSyn?.polygons_geojson)
|
| 622 |
+
? (tmSyn.polygons_geojson as FeatureCollection)
|
| 623 |
+
: undefined;
|
| 624 |
+
if (lulcCandidate?.type === 'FeatureCollection'
|
| 625 |
+
&& (lulcCandidate.features?.length ?? 0) > 0) {
|
| 626 |
+
terramindLulcFc = lulcCandidate;
|
| 627 |
+
}
|
| 628 |
+
if (tmBld?.ok && tmBld?.polygons_geojson) {
|
| 629 |
+
const pg = tmBld.polygons_geojson as FeatureCollection;
|
| 630 |
+
if (pg?.type === 'FeatureCollection' && (pg.features?.length ?? 0) > 0) {
|
| 631 |
+
terramindBuildingsFc = pg;
|
| 632 |
+
}
|
| 633 |
+
}
|
| 634 |
+
if (pl?.ok && pl?.polygons_geojson) {
|
| 635 |
+
const pg = pl.polygons_geojson as FeatureCollection;
|
| 636 |
if (pg?.type === 'FeatureCollection' && (pg.features?.length ?? 0) > 0) {
|
| 637 |
+
prithviLiveFc = pg;
|
| 638 |
}
|
| 639 |
}
|
| 640 |
// v0.4.2 §12 grounding failure: budget exhausted with failed checks.
|
|
|
|
| 821 |
registerPoints={registerPointsFc}
|
| 822 |
registerPolygons={registerPolygonsFc}
|
| 823 |
terramindLulc={terramindLulcFc}
|
| 824 |
+
terramindBuildings={terramindBuildingsFc}
|
| 825 |
+
prithviLive={prithviLiveFc}
|
| 826 |
{linkedKey}
|
| 827 |
/>
|
| 828 |
<MapLegend
|