@aguacerowx/react-native 0.0.53 → 0.0.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/LICENSE +21 -0
  2. package/android/src/main/java/com/aguacerowx/reactnative/NexradRadarLayerView.java +14 -2
  3. package/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +77 -0
  4. package/index.js +1 -1
  5. package/ios/WeatherFrameProcessorModule.m +19 -15
  6. package/ios/WeatherFrameProcessorModule.swift +65 -0
  7. package/lib/commonjs/AguaceroContext.js +0 -4
  8. package/lib/commonjs/AguaceroContext.js.map +1 -1
  9. package/lib/commonjs/GridRenderLayer.js +62 -76
  10. package/lib/commonjs/GridRenderLayer.js.map +1 -1
  11. package/lib/commonjs/MapManager.js +110 -224
  12. package/lib/commonjs/MapManager.js.map +1 -1
  13. package/lib/commonjs/MapRegistry.js +21 -33
  14. package/lib/commonjs/MapRegistry.js.map +1 -1
  15. package/lib/commonjs/NexradRadarLayer.android.js +28 -100
  16. package/lib/commonjs/NexradRadarLayer.android.js.map +1 -1
  17. package/lib/commonjs/NexradRadarLayer.ios.js +26 -97
  18. package/lib/commonjs/NexradRadarLayer.ios.js.map +1 -1
  19. package/lib/commonjs/NexradSitesMapLayer.js +41 -61
  20. package/lib/commonjs/NexradSitesMapLayer.js.map +1 -1
  21. package/lib/commonjs/SatelliteLayer.android.js +26 -38
  22. package/lib/commonjs/SatelliteLayer.android.js.map +1 -1
  23. package/lib/commonjs/SatelliteLayer.ios.js +30 -42
  24. package/lib/commonjs/SatelliteLayer.ios.js.map +1 -1
  25. package/lib/commonjs/StyleApplicator.js +129 -175
  26. package/lib/commonjs/StyleApplicator.js.map +1 -1
  27. package/lib/commonjs/WeatherLayerManager.js +995 -1646
  28. package/lib/commonjs/WeatherLayerManager.js.map +1 -1
  29. package/lib/commonjs/aguaceroCoreDebugHooks.js +58 -130
  30. package/lib/commonjs/aguaceroCoreDebugHooks.js.map +1 -1
  31. package/lib/commonjs/aguaceroRnDebug.js +147 -288
  32. package/lib/commonjs/aguaceroRnDebug.js.map +1 -1
  33. package/lib/commonjs/cdnAuthenticatedFetch.js +104 -0
  34. package/lib/commonjs/cdnAuthenticatedFetch.js.map +1 -0
  35. package/lib/commonjs/dispatchViewManagerCommandCompat.js +51 -88
  36. package/lib/commonjs/dispatchViewManagerCommandCompat.js.map +1 -1
  37. package/lib/commonjs/gridCdnAuth.js +41 -50
  38. package/lib/commonjs/gridCdnAuth.js.map +1 -1
  39. package/lib/commonjs/index.js +14 -0
  40. package/lib/commonjs/index.js.map +1 -1
  41. package/lib/commonjs/nexrad/nexradAndroidController.js +851 -863
  42. package/lib/commonjs/nexrad/nexradAndroidController.js.map +1 -1
  43. package/lib/commonjs/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js +62 -85
  44. package/lib/commonjs/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js.map +1 -1
  45. package/lib/commonjs/nexrad/nexradDiag.js +32 -148
  46. package/lib/commonjs/nexrad/nexradDiag.js.map +1 -1
  47. package/lib/commonjs/nexrad/nexradLevel2Keys.js +261 -0
  48. package/lib/commonjs/nexrad/nexradLevel2Keys.js.map +1 -0
  49. package/lib/commonjs/nexrad/nexradLutBuild.js +64 -111
  50. package/lib/commonjs/nexrad/nexradLutBuild.js.map +1 -1
  51. package/lib/commonjs/nexrad/nexradMapboxFrameOpts.bundled.js +136 -164
  52. package/lib/commonjs/nexrad/nexradMapboxFrameOpts.bundled.js.map +1 -1
  53. package/lib/commonjs/nexrad/nexradSdkImports.js +51 -0
  54. package/lib/commonjs/nexrad/nexradSdkImports.js.map +1 -0
  55. package/lib/commonjs/nexrad/radarArchiveCore.bundled.js +2848 -4455
  56. package/lib/commonjs/nexrad/radarArchiveCore.bundled.js.map +1 -1
  57. package/lib/commonjs/nexrad/radarDecode.worker.bundled.js +445 -648
  58. package/lib/commonjs/nexrad/radarDecode.worker.bundled.js.map +1 -1
  59. package/lib/commonjs/nexrad/radarFrameGpuMatch.bundled.js +52 -68
  60. package/lib/commonjs/nexrad/radarFrameGpuMatch.bundled.js.map +1 -1
  61. package/lib/commonjs/nexradNativeCommandIds.js +24 -0
  62. package/lib/commonjs/nexradNativeCommandIds.js.map +1 -0
  63. package/lib/commonjs/nws/NwsAlertsOverlay.android.js.map +1 -1
  64. package/lib/commonjs/nws/NwsAlertsOverlay.ios.js.map +1 -1
  65. package/lib/commonjs/nws/NwsAlertsOverlay.js +3 -3
  66. package/lib/commonjs/nws/NwsAlertsOverlay.js.map +1 -1
  67. package/lib/commonjs/nws/NwsAlertsOverlay.native.js +235 -361
  68. package/lib/commonjs/nws/NwsAlertsOverlay.native.js.map +1 -1
  69. package/lib/commonjs/nws/eventSourceRnPolyfill.js +92 -146
  70. package/lib/commonjs/nws/eventSourceRnPolyfill.js.map +1 -1
  71. package/lib/commonjs/nws/nwsAndroidConstants.js +2 -8
  72. package/lib/commonjs/nws/nwsAndroidConstants.js.map +1 -1
  73. package/lib/commonjs/satellite/satelliteAndroidController.js +117 -202
  74. package/lib/commonjs/satellite/satelliteAndroidController.js.map +1 -1
  75. package/lib/commonjs/satelliteBridgeDiag.js +3 -13
  76. package/lib/commonjs/satelliteBridgeDiag.js.map +1 -1
  77. package/lib/commonjs/satelliteRnDebug.js +117 -218
  78. package/lib/commonjs/satelliteRnDebug.js.map +1 -1
  79. package/lib/module/AguaceroContext.js +2 -7
  80. package/lib/module/AguaceroContext.js.map +1 -1
  81. package/lib/module/GridRenderLayer.js +66 -80
  82. package/lib/module/GridRenderLayer.js.map +1 -1
  83. package/lib/module/MapManager.js +125 -239
  84. package/lib/module/MapManager.js.map +1 -1
  85. package/lib/module/MapRegistry.js +21 -33
  86. package/lib/module/MapRegistry.js.map +1 -1
  87. package/lib/module/NexradRadarLayer.android.js +32 -104
  88. package/lib/module/NexradRadarLayer.android.js.map +1 -1
  89. package/lib/module/NexradRadarLayer.ios.js +30 -101
  90. package/lib/module/NexradRadarLayer.ios.js.map +1 -1
  91. package/lib/module/NexradSitesMapLayer.js +44 -63
  92. package/lib/module/NexradSitesMapLayer.js.map +1 -1
  93. package/lib/module/SatelliteLayer.android.js +32 -44
  94. package/lib/module/SatelliteLayer.android.js.map +1 -1
  95. package/lib/module/SatelliteLayer.ios.js +36 -48
  96. package/lib/module/SatelliteLayer.ios.js.map +1 -1
  97. package/lib/module/StyleApplicator.js +144 -191
  98. package/lib/module/StyleApplicator.js.map +1 -1
  99. package/lib/module/WeatherLayerManager.js +1024 -1675
  100. package/lib/module/WeatherLayerManager.js.map +1 -1
  101. package/lib/module/aguaceroCoreDebugHooks.js +59 -130
  102. package/lib/module/aguaceroCoreDebugHooks.js.map +1 -1
  103. package/lib/module/aguaceroRnDebug.js +151 -292
  104. package/lib/module/aguaceroRnDebug.js.map +1 -1
  105. package/lib/module/cdnAuthenticatedFetch.js +97 -0
  106. package/lib/module/cdnAuthenticatedFetch.js.map +1 -0
  107. package/lib/module/dispatchViewManagerCommandCompat.js +52 -90
  108. package/lib/module/dispatchViewManagerCommandCompat.js.map +1 -1
  109. package/lib/module/gridCdnAuth.js +38 -50
  110. package/lib/module/gridCdnAuth.js.map +1 -1
  111. package/lib/module/index.js +9 -7
  112. package/lib/module/index.js.map +1 -1
  113. package/lib/module/nexrad/nexradAndroidController.js +865 -876
  114. package/lib/module/nexrad/nexradAndroidController.js.map +1 -1
  115. package/lib/module/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js +62 -85
  116. package/lib/module/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js.map +1 -1
  117. package/lib/module/nexrad/nexradDiag.js +31 -145
  118. package/lib/module/nexrad/nexradDiag.js.map +1 -1
  119. package/lib/module/nexrad/nexradLevel2Keys.js +245 -0
  120. package/lib/module/nexrad/nexradLevel2Keys.js.map +1 -0
  121. package/lib/module/nexrad/nexradLutBuild.js +64 -110
  122. package/lib/module/nexrad/nexradLutBuild.js.map +1 -1
  123. package/lib/module/nexrad/nexradMapboxFrameOpts.bundled.js +136 -163
  124. package/lib/module/nexrad/nexradMapboxFrameOpts.bundled.js.map +1 -1
  125. package/lib/module/nexrad/nexradSdkImports.js +4 -0
  126. package/lib/module/nexrad/nexradSdkImports.js.map +1 -0
  127. package/lib/module/nexrad/radarArchiveCore.bundled.js +2839 -4448
  128. package/lib/module/nexrad/radarArchiveCore.bundled.js.map +1 -1
  129. package/lib/module/nexrad/radarDecode.worker.bundled.js +445 -648
  130. package/lib/module/nexrad/radarDecode.worker.bundled.js.map +1 -1
  131. package/lib/module/nexrad/radarFrameGpuMatch.bundled.js +50 -66
  132. package/lib/module/nexrad/radarFrameGpuMatch.bundled.js.map +1 -1
  133. package/lib/module/nexradNativeCommandIds.js +18 -0
  134. package/lib/module/nexradNativeCommandIds.js.map +1 -0
  135. package/lib/module/nws/NwsAlertsOverlay.android.js +1 -1
  136. package/lib/module/nws/NwsAlertsOverlay.android.js.map +1 -1
  137. package/lib/module/nws/NwsAlertsOverlay.ios.js +1 -1
  138. package/lib/module/nws/NwsAlertsOverlay.ios.js.map +1 -1
  139. package/lib/module/nws/NwsAlertsOverlay.js +5 -5
  140. package/lib/module/nws/NwsAlertsOverlay.js.map +1 -1
  141. package/lib/module/nws/NwsAlertsOverlay.native.js +248 -373
  142. package/lib/module/nws/NwsAlertsOverlay.native.js.map +1 -1
  143. package/lib/module/nws/eventSourceRnPolyfill.js +92 -146
  144. package/lib/module/nws/eventSourceRnPolyfill.js.map +1 -1
  145. package/lib/module/nws/nwsAndroidConstants.js +2 -8
  146. package/lib/module/nws/nwsAndroidConstants.js.map +1 -1
  147. package/lib/module/satellite/satelliteAndroidController.js +123 -208
  148. package/lib/module/satellite/satelliteAndroidController.js.map +1 -1
  149. package/lib/module/satelliteBridgeDiag.js +3 -13
  150. package/lib/module/satelliteBridgeDiag.js.map +1 -1
  151. package/lib/module/satelliteRnDebug.js +123 -223
  152. package/lib/module/satelliteRnDebug.js.map +1 -1
  153. package/lib/typescript/AguaceroContext.d.ts +0 -4
  154. package/lib/typescript/AguaceroContext.d.ts.map +1 -1
  155. package/lib/typescript/GridRenderLayer.d.ts.map +1 -1
  156. package/lib/typescript/MapManager.d.ts +0 -12
  157. package/lib/typescript/MapManager.d.ts.map +1 -1
  158. package/lib/typescript/MapRegistry.d.ts +10 -12
  159. package/lib/typescript/MapRegistry.d.ts.map +1 -1
  160. package/lib/typescript/NexradRadarLayer.android.d.ts.map +1 -1
  161. package/lib/typescript/NexradRadarLayer.ios.d.ts.map +1 -1
  162. package/lib/typescript/NexradSitesMapLayer.d.ts +4 -10
  163. package/lib/typescript/NexradSitesMapLayer.d.ts.map +1 -1
  164. package/lib/typescript/SatelliteLayer.android.d.ts.map +1 -1
  165. package/lib/typescript/SatelliteLayer.ios.d.ts.map +1 -1
  166. package/lib/typescript/StyleApplicator.d.ts +1 -1
  167. package/lib/typescript/StyleApplicator.d.ts.map +1 -1
  168. package/lib/typescript/WeatherLayerManager.d.ts.map +1 -1
  169. package/lib/typescript/aguaceroCoreDebugHooks.d.ts +2 -9
  170. package/lib/typescript/aguaceroCoreDebugHooks.d.ts.map +1 -1
  171. package/lib/typescript/aguaceroRnDebug.d.ts +47 -66
  172. package/lib/typescript/aguaceroRnDebug.d.ts.map +1 -1
  173. package/lib/typescript/cdnAuthenticatedFetch.d.ts +10 -0
  174. package/lib/typescript/cdnAuthenticatedFetch.d.ts.map +1 -0
  175. package/lib/typescript/dispatchViewManagerCommandCompat.d.ts +1 -17
  176. package/lib/typescript/dispatchViewManagerCommandCompat.d.ts.map +1 -1
  177. package/lib/typescript/gridCdnAuth.d.ts +16 -21
  178. package/lib/typescript/gridCdnAuth.d.ts.map +1 -1
  179. package/lib/typescript/index.d.ts +1 -0
  180. package/lib/typescript/nexrad/nexradAndroidController.d.ts +39 -89
  181. package/lib/typescript/nexrad/nexradAndroidController.d.ts.map +1 -1
  182. package/lib/typescript/nexrad/nexradCrossSectionSampleAtLatLon.bundled.d.ts +2 -1
  183. package/lib/typescript/nexrad/nexradCrossSectionSampleAtLatLon.bundled.d.ts.map +1 -1
  184. package/lib/typescript/nexrad/nexradDiag.d.ts +13 -101
  185. package/lib/typescript/nexrad/nexradDiag.d.ts.map +1 -1
  186. package/lib/typescript/nexrad/nexradLevel2Keys.d.ts +36 -0
  187. package/lib/typescript/nexrad/nexradLevel2Keys.d.ts.map +1 -0
  188. package/lib/typescript/nexrad/nexradLutBuild.d.ts +3 -10
  189. package/lib/typescript/nexrad/nexradLutBuild.d.ts.map +1 -1
  190. package/lib/typescript/nexrad/nexradMapboxFrameOpts.bundled.d.ts +4 -3
  191. package/lib/typescript/nexrad/nexradMapboxFrameOpts.bundled.d.ts.map +1 -1
  192. package/lib/typescript/nexrad/nexradSdkImports.d.ts +2 -0
  193. package/lib/typescript/nexrad/nexradSdkImports.d.ts.map +1 -0
  194. package/lib/typescript/nexrad/radarArchiveCore.bundled.d.ts +12 -7
  195. package/lib/typescript/nexrad/radarArchiveCore.bundled.d.ts.map +1 -1
  196. package/lib/typescript/nexrad/radarDecode.worker.bundled.d.ts +20 -20
  197. package/lib/typescript/nexrad/radarDecode.worker.bundled.d.ts.map +1 -1
  198. package/lib/typescript/nexrad/radarFrameGpuMatch.bundled.d.ts +4 -3
  199. package/lib/typescript/nexrad/radarFrameGpuMatch.bundled.d.ts.map +1 -1
  200. package/lib/typescript/nexradNativeCommandIds.d.ts +2 -0
  201. package/lib/typescript/nexradNativeCommandIds.d.ts.map +1 -0
  202. package/lib/typescript/nws/NwsAlertsOverlay.native.d.ts +6 -17
  203. package/lib/typescript/nws/NwsAlertsOverlay.native.d.ts.map +1 -1
  204. package/lib/typescript/nws/eventSourceRnPolyfill.d.ts +0 -3
  205. package/lib/typescript/nws/eventSourceRnPolyfill.d.ts.map +1 -1
  206. package/lib/typescript/nws/nwsAndroidConstants.d.ts +0 -5
  207. package/lib/typescript/nws/nwsAndroidConstants.d.ts.map +1 -1
  208. package/lib/typescript/satellite/satelliteAndroidController.d.ts +9 -47
  209. package/lib/typescript/satellite/satelliteAndroidController.d.ts.map +1 -1
  210. package/lib/typescript/satelliteBridgeDiag.d.ts +1 -5
  211. package/lib/typescript/satelliteBridgeDiag.d.ts.map +1 -1
  212. package/lib/typescript/satelliteRnDebug.d.ts +24 -30
  213. package/lib/typescript/satelliteRnDebug.d.ts.map +1 -1
  214. package/package.json +75 -74
  215. package/src/AguaceroContext.js +1 -7
  216. package/src/GridRenderLayer.js +1 -128
  217. package/src/MapManager.js +1 -277
  218. package/src/MapRegistry.js +1 -56
  219. package/src/NexradRadarLayer.android.js +1 -121
  220. package/src/NexradRadarLayer.ios.js +1 -115
  221. package/src/NexradSitesMapLayer.js +1 -75
  222. package/src/SatelliteLayer.android.js +1 -63
  223. package/src/SatelliteLayer.ios.js +1 -70
  224. package/src/StyleApplicator.js +1 -241
  225. package/src/WeatherLayerManager.js +1 -2045
  226. package/src/aguaceroCoreDebugHooks.js +1 -142
  227. package/src/aguaceroRnDebug.js +1 -336
  228. package/src/cdnAuthenticatedFetch.js +1 -0
  229. package/src/dispatchViewManagerCommandCompat.js +1 -100
  230. package/src/gridCdnAuth.js +1 -56
  231. package/src/index.js +1 -27
  232. package/src/nexrad/nexradAndroidController.js +1 -1078
  233. package/src/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js +1 -91
  234. package/src/nexrad/nexradDiag.js +1 -150
  235. package/src/nexrad/nexradLevel2Keys.js +1 -0
  236. package/src/nexrad/nexradLutBuild.js +1 -126
  237. package/src/nexrad/nexradMapboxFrameOpts.bundled.js +1 -245
  238. package/src/nexrad/nexradSdkImports.js +1 -0
  239. package/src/nexrad/radarArchiveCore.bundled.js +1 -7085
  240. package/src/nexrad/radarDecode.worker.bundled.js +1 -813
  241. package/src/nexrad/radarFrameGpuMatch.bundled.js +1 -79
  242. package/src/nexradNativeCommandIds.js +1 -0
  243. package/src/nws/NwsAlertsOverlay.android.js +1 -1
  244. package/src/nws/NwsAlertsOverlay.ios.js +1 -1
  245. package/src/nws/NwsAlertsOverlay.js +1 -7
  246. package/src/nws/NwsAlertsOverlay.native.js +1 -463
  247. package/src/nws/eventSourceRnPolyfill.js +7 -193
  248. package/src/nws/nwsAndroidConstants.js +1 -8
  249. package/src/satellite/satelliteAndroidController.js +1 -257
  250. package/src/satelliteBridgeDiag.js +1 -15
  251. package/src/satelliteRnDebug.js +1 -269
  252. package/lib/commonjs/nexrad/nexradNativeCommandIds.js +0 -51
  253. package/lib/commonjs/nexrad/nexradNativeCommandIds.js.map +0 -1
  254. package/lib/module/nexrad/nexradNativeCommandIds.js +0 -44
  255. package/lib/module/nexrad/nexradNativeCommandIds.js.map +0 -1
  256. package/lib/typescript/nexrad/nexradNativeCommandIds.d.ts +0 -9
  257. package/lib/typescript/nexrad/nexradNativeCommandIds.d.ts.map +0 -1
  258. package/src/nexrad/nexradNativeCommandIds.js +0 -44
  259. /package/lib/commonjs/{nexrad/nexradSitesUs.json → nexradSitesUs.json} +0 -0
  260. /package/lib/module/{nexrad/nexradSitesUs.json → nexradSitesUs.json} +0 -0
  261. /package/src/{nexrad/nexradSitesUs.json → nexradSitesUs.json} +0 -0
@@ -1,165 +1,98 @@
1
- /**
2
- * NWS watches/warnings for React Native (iOS + Android) parity with {@link NwsWatchesWarningsOverlay}
3
- * (archived / slider time via {@link NwsWatchesWarningsOverlay#syncWithMode}, same customization options).
4
- *
5
- * Uses the javascript-sdk NWS overlay engine with a stub Mapbox GL object; GeoJSON + layers render via @rnmapbox/maps.
6
- */
7
-
8
- import './eventSourceRnPolyfill.js';
9
- import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
10
- import Mapbox from '@rnmapbox/maps';
11
- /** Subpath imports avoid Metro/barrel init ordering where the package root can yield undefined named exports during RN startup. */
12
- import { NwsWatchesWarningsOverlay, NWS_DEFAULT_LINE_BEFORE_LAYER_ID } from '@aguacerowx/javascript-sdk/nws/NwsWatchesWarningsOverlay.js';
13
- import { buildNwsLineDasharrayLiteralExpression } from '@aguacerowx/javascript-sdk/nws/nwsSdkConstants.js';
14
- import { buildAlertClickPayload, normalizeFeatureCollectionForMapboxGl } from '@aguacerowx/javascript-sdk/nws/nwsAlertsSupport.js';
15
- import { computeNwsAlertsFetchHoursFromAguaceroState } from '@aguacerowx/javascript-sdk/nws/nwsAlertsFetchSpec.js';
16
- import { mapRegistry } from '../MapRegistry';
17
- import { AGUACERO_NEXRAD_MAP_LAYER_ID, AGUACERO_SATELLITE_MAP_LAYER_ID } from './nwsAndroidConstants.js';
18
- const SOURCE_ID = 'aguacero-nws-alerts-source';
19
- const FILL_ID = 'aguacero-nws-alerts-fill';
20
- const LINE_CASING_ID = 'aguacero-nws-alerts-line-casing';
21
- const LINE_CORE_ID = 'aguacero-nws-alerts-line-core';
22
- class AndroidNwsOverlay extends NwsWatchesWarningsOverlay {
23
- /**
24
- * @param {object} map
25
- * @param {object} options
26
- * @param {(paint: object) => void} onPaint
27
- */
28
- constructor(map, options, onPaint) {
29
- super(map, options);
30
- this._onPaint = onPaint;
1
+ import "./eventSourceRnPolyfill.js";
2
+ import I, { useCallback as K, useEffect as g, useLayoutEffect as X, useMemo as V, useRef as b, useState as A } from "react";
3
+ import x from "@rnmapbox/maps";
4
+ import { NwsWatchesWarningsOverlay as z, NWS_DEFAULT_LINE_BEFORE_LAYER_ID as Y } from "@aguacerowx/javascript-sdk/nws/NwsWatchesWarningsOverlay.js";
5
+ import { buildNwsLineDasharrayLiteralExpression as Q } from "@aguacerowx/javascript-sdk/nws/nwsSdkConstants.js";
6
+ import { buildAlertClickPayload as Z, normalizeFeatureCollectionForMapboxGl as $ } from "@aguacerowx/javascript-sdk/nws/nwsAlertsSupport.js";
7
+ import { computeNwsAlertsFetchHoursFromAguaceroState as ee } from "@aguacerowx/javascript-sdk/nws/nwsAlertsFetchSpec.js";
8
+ import { mapRegistry as P } from "../MapRegistry";
9
+ import { AGUACERO_NEXRAD_MAP_LAYER_ID as te, AGUACERO_SATELLITE_MAP_LAYER_ID as re } from "./nwsAndroidConstants.js";
10
+ const O = "aguacero-nws-alerts-source",
11
+ m = "aguacero-nws-alerts-fill",
12
+ h = "aguacero-nws-alerts-line-casing",
13
+ L = "aguacero-nws-alerts-line-core";
14
+ class ae extends z {
15
+ constructor(t, a, n) {
16
+ super(t, a), this._onPaint = n;
31
17
  }
32
-
33
- /**
34
- * @rnmapbox/maps does not support data-driven `line-dasharray` (match on `event_name`).
35
- * Keep web parity for colors; dash style follows {@link NwsWatchesWarningsOverlay} default `lineDash` only on RN.
36
- */
37
18
  _buildPaint() {
38
- const p = super._buildPaint();
39
- const mode = this._nwsAlertSettings?.lineDash ?? 'solid';
19
+ const t = super._buildPaint(),
20
+ a = this._nwsAlertSettings?.lineDash ?? "solid";
40
21
  return {
41
- ...p,
42
- lineDashExpr: buildNwsLineDasharrayLiteralExpression(mode),
43
- fillOpacityExpr: Array.isArray(p.fillOpacityExpr) && p.fillOpacityExpr.length > 2 ? p.fillOpacityExpr[2] : p.fillOpacityExpr,
44
- lineOpacityExpr: Array.isArray(p.lineOpacityExpr) && p.lineOpacityExpr.length > 2 ? p.lineOpacityExpr[2] : p.lineOpacityExpr
22
+ ...t,
23
+ lineDashExpr: Q(a),
24
+ fillOpacityExpr: Array.isArray(t.fillOpacityExpr) && t.fillOpacityExpr.length > 2 ? t.fillOpacityExpr[2] : t.fillOpacityExpr,
25
+ lineOpacityExpr: Array.isArray(t.lineOpacityExpr) && t.lineOpacityExpr.length > 2 ? t.lineOpacityExpr[2] : t.lineOpacityExpr
45
26
  };
46
27
  }
47
-
48
- /**
49
- * RN renders ShapeSource + layers declaratively (same ids). Only sync GeoJSON + paint; skip imperative addLayer.
50
- */
51
28
  _ensureLayers() {
52
- const m = this.map;
53
- if (!m?.addSource) return;
54
- const paint = this._buildPaint();
55
- if (this._onPaint) this._onPaint(paint);
56
- const sourceData = normalizeFeatureCollectionForMapboxGl(this._workingFc);
57
- if (!m.getSource(this._sourceId)) {
58
- m.addSource(this._sourceId, {
59
- type: 'geojson',
60
- data: sourceData
61
- });
62
- } else {
63
- m.getSource(this._sourceId).setData(sourceData);
64
- }
29
+ const t = this.map;
30
+ if (!t?.addSource) return;
31
+ const a = this._buildPaint();
32
+ this._onPaint && this._onPaint(a);
33
+ const n = $(this._workingFc);
34
+ t.getSource(this._sourceId) ? t.getSource(this._sourceId).setData(n) : t.addSource(this._sourceId, {
35
+ type: "geojson",
36
+ data: n
37
+ });
65
38
  }
66
39
  _refreshPaint() {
67
- if (this._onPaint) this._onPaint(this._buildPaint());
40
+ this._onPaint && this._onPaint(this._buildPaint());
68
41
  }
69
42
  _applyLayerOrder() {}
70
43
  _syncClickHandler() {}
71
44
  }
72
-
73
- /**
74
- * @param {object} handlers
75
- * @param {() => import('@rnmapbox/maps').default | null} handlers.getMapboxMapView
76
- * @param {(shape: object) => void} handlers.onShape
77
- * @param {() => void} [handlers.onLayersCleared]
78
- */
79
- function createFeatureStateBatcher(handlers) {
80
- /** @type {Map<string, object>} */
81
- const pendingStates = new Map();
82
- let rafId = null;
83
- function flush() {
84
- rafId = null;
85
- if (handlers.onFeatureStates) {
86
- const activeIds = [];
87
- for (const [fid, state] of pendingStates) {
88
- if (state && state.active !== false) {
89
- activeIds.push(fid);
90
- }
91
- }
92
- handlers.onFeatureStates(activeIds);
45
+ function ne(l) {
46
+ const t = new Map();
47
+ let a = null;
48
+ function n() {
49
+ if (a = null, l.onFeatureStates) {
50
+ const i = [];
51
+ for (const [s, p] of t) p && p.active !== !1 && i.push(s);
52
+ l.onFeatureStates(i);
93
53
  }
94
54
  }
95
55
  return {
96
- push(fid, state, sid) {
97
- pendingStates.set(fid, state);
98
- if (rafId == null) {
99
- rafId = requestAnimationFrame(flush);
100
- }
56
+ push(i, s, p) {
57
+ t.set(i, s), a == null && (a = requestAnimationFrame(n));
101
58
  },
102
59
  clear() {
103
- pendingStates.clear();
104
- if (rafId != null) {
105
- cancelAnimationFrame(rafId);
106
- rafId = null;
107
- }
108
- if (handlers.onFeatureStates) {
109
- handlers.onFeatureStates(null);
110
- }
60
+ t.clear(), a != null && (cancelAnimationFrame(a), a = null), l.onFeatureStates && l.onFeatureStates(null);
111
61
  }
112
62
  };
113
63
  }
114
- function createAndroidNwsStubMap(handlers) {
115
- let sourceAdded = false;
116
- /** Declarative RN layers use the same ids — treat as present after first {@link AndroidNwsOverlay#_ensureLayers}. */
117
- let declarativeLayersReady = false;
118
- const featureStateBatcher = createFeatureStateBatcher(handlers);
64
+ function ie(l) {
65
+ let t = !1,
66
+ a = !1;
67
+ const n = ne(l);
119
68
  return {
120
- isStyleLoaded: () => true,
121
- once(ev, fn) {
122
- if (ev === 'style.load') {
123
- queueMicrotask(() => fn({
124
- target: {}
125
- }));
126
- }
69
+ isStyleLoaded: () => !0,
70
+ once(i, s) {
71
+ i === "style.load" && queueMicrotask(() => s({
72
+ target: {}
73
+ }));
127
74
  },
128
75
  __markDeclarativeLayersReady() {
129
- declarativeLayersReady = true;
76
+ a = !0;
130
77
  },
131
- addSource(id, spec) {
132
- if (id === SOURCE_ID) {
133
- sourceAdded = true;
134
- if (spec?.data) handlers.onShape(spec.data);
135
- }
78
+ addSource(i, s) {
79
+ i === O && (t = !0, s?.data && l.onShape(s.data));
136
80
  },
137
- getSource(id) {
138
- if (!sourceAdded || id !== SOURCE_ID) return null;
139
- return {
140
- setData: geojson => handlers.onShape(geojson)
81
+ getSource(i) {
82
+ return !t || i !== O ? null : {
83
+ setData: s => l.onShape(s)
141
84
  };
142
85
  },
143
86
  addLayer() {},
144
- removeLayer(id) {
145
- if ([FILL_ID, LINE_CASING_ID, LINE_CORE_ID].includes(id)) {
146
- declarativeLayersReady = false;
147
- featureStateBatcher.clear();
148
- handlers.onLayersCleared?.();
149
- }
87
+ removeLayer(i) {
88
+ [m, h, L].includes(i) && (a = !1, n.clear(), l.onLayersCleared?.());
150
89
  },
151
- removeSource(id) {
152
- if (id === SOURCE_ID) {
153
- sourceAdded = false;
154
- declarativeLayersReady = false;
155
- featureStateBatcher.clear();
156
- handlers.onLayersCleared?.();
157
- }
90
+ removeSource(i) {
91
+ i === O && (t = !1, a = !1, n.clear(), l.onLayersCleared?.());
158
92
  },
159
- getLayer(id) {
160
- if (!declarativeLayersReady) return null;
161
- return [FILL_ID, LINE_CASING_ID, LINE_CORE_ID].includes(id) ? {
162
- id
93
+ getLayer(i) {
94
+ return a && [m, h, L].includes(i) ? {
95
+ id: i
163
96
  } : null;
164
97
  },
165
98
  getStyle() {
@@ -172,261 +105,203 @@ function createAndroidNwsStubMap(handlers) {
172
105
  on() {},
173
106
  off() {},
174
107
  fire() {},
175
- setFeatureState(target, state) {
176
- const sid = target?.source;
177
- const fid = target?.id;
178
- if (sid !== SOURCE_ID || fid == null) return;
179
- try {
180
- featureStateBatcher.push(fid, state, sid);
181
- } catch {
182
- /* ignore */
183
- }
108
+ setFeatureState(i, s) {
109
+ const p = i?.source,
110
+ f = i?.id;
111
+ if (!(p !== O || f == null)) try {
112
+ n.push(f, s, p);
113
+ } catch {}
184
114
  }
185
115
  };
186
116
  }
187
-
188
- /**
189
- * @param {object} state - {@link AguaceroCore} state
190
- * @param {object} wopt - watches/warnings options (same shape as mapsgl {@link WeatherLayerManager#configureWatchesWarnings})
191
- * @returns {{ weatherLayerId: string | null, fillBelowId: string | null, lineBelowId: string }}
192
- */
193
- export function resolveNwsAndroidLayerAnchors(state, wopt) {
194
- const manualFill = Object.prototype.hasOwnProperty.call(wopt, 'fillBeforeLayerId') ? wopt.fillBeforeLayerId ?? null : null;
195
- let weatherLayerId = null;
196
- if (state?.isNexrad) {
197
- weatherLayerId = AGUACERO_NEXRAD_MAP_LAYER_ID;
198
- } else if (state?.isSatellite) {
199
- weatherLayerId = AGUACERO_SATELLITE_MAP_LAYER_ID;
200
- } else if (state?.isMRMS && state?.variable) {
201
- weatherLayerId = 'aguacero-weather-grid-custom';
202
- }
203
- const fillBelowId = manualFill != null && String(manualFill) !== '' ? String(manualFill) : weatherLayerId || NWS_DEFAULT_LINE_BEFORE_LAYER_ID;
204
- const lineBelowId = wopt.lineBeforeLayerId || NWS_DEFAULT_LINE_BEFORE_LAYER_ID;
117
+ export function resolveNwsAndroidLayerAnchors(l, t) {
118
+ const a = Object.prototype.hasOwnProperty.call(t, "fillBeforeLayerId") ? t.fillBeforeLayerId ?? null : null;
119
+ let n = null;
120
+ l?.isNexrad ? n = te : l?.isSatellite ? n = re : l?.isMRMS && l?.variable && (n = "aguacero-weather-grid-custom");
121
+ const i = a != null && String(a) !== "" ? String(a) : n || Y,
122
+ s = t.lineBeforeLayerId || Y;
205
123
  return {
206
- weatherLayerId,
207
- fillBelowId,
208
- lineBelowId
124
+ weatherLayerId: n,
125
+ fillBelowId: i,
126
+ lineBelowId: s
209
127
  };
210
128
  }
211
-
212
- /**
213
- * @param {object} props
214
- * @param {import('@aguacerowx/javascript-sdk').AguaceroCore} props.core
215
- * @param {object} props.watchesWarnings - merged options ({ enabled, alertsBaseUrl, nwsAlertSettings, ... })
216
- * @param {(payload: object) => void} [props.onNwsAlertClick]
217
- */
218
- export default function NwsAlertsOverlay({
219
- core,
220
- watchesWarnings,
221
- onNwsAlertClick
129
+ export default function le({
130
+ core: l,
131
+ watchesWarnings: t,
132
+ onNwsAlertClick: a
222
133
  }) {
223
- const [aguaceroState, setAguaceroState] = useState(() => core?.state);
224
- useEffect(() => {
225
- if (!core) return undefined;
226
- const h = s => setAguaceroState(s);
227
- core.on('state:change', h);
228
- return () => core.off('state:change', h);
229
- }, [core]);
230
- const [shape, setShape] = useState({
231
- type: 'FeatureCollection',
232
- features: []
233
- });
234
- const [paint, setPaint] = useState(null);
235
- const [activeIds, setActiveIds] = useState(null);
236
- const overlayRef = useRef(null);
237
- const stubRef = useRef(null);
238
- const watchesRef = useRef(watchesWarnings);
239
- const optsKeyRef = useRef('');
240
- watchesRef.current = watchesWarnings;
241
- const getMapboxMapView = useCallback(() => mapRegistry.getMap(), []);
242
- const anchors = useMemo(() => resolveNwsAndroidLayerAnchors(aguaceroState, watchesWarnings || {}), [aguaceroState, watchesWarnings]);
243
- useEffect(() => {
244
- const onPaint = p => setPaint(p);
245
- const stub = createAndroidNwsStubMap({
246
- getMapboxMapView,
247
- onShape: g => setShape(g),
248
- onFeatureStates: ids => setActiveIds(ids),
249
- onLayersCleared: () => {
250
- setPaint(null);
251
- setActiveIds(null);
252
- }
253
- });
254
- stubRef.current = stub;
255
- const w0 = watchesRef.current || {};
256
- const overlay = new AndroidNwsOverlay(stub, w0, onPaint);
257
- overlayRef.current = overlay;
258
- return () => {
259
- overlay.destroy();
260
- overlayRef.current = null;
261
- stubRef.current = null;
262
- };
263
- }, [getMapboxMapView]);
264
- useEffect(() => {
265
- const ov = overlayRef.current;
266
- if (!ov) return;
267
- const wopt = watchesWarnings || {};
268
- const nwsAlertSettingsForOpts = {
269
- ...(wopt.nwsAlertSettings ?? {}),
270
- ...(wopt.activeOnlyRealtime !== undefined ? {
271
- activeOnlyRealtime: wopt.activeOnlyRealtime
272
- } : {})
134
+ const [n, i] = A(() => l?.state);
135
+ g(() => {
136
+ if (!l) return;
137
+ const o = e => i(e);
138
+ return l.on("state:change", o), () => l.off("state:change", o);
139
+ }, [l]);
140
+ const [s, p] = A({
141
+ type: "FeatureCollection",
142
+ features: []
143
+ }),
144
+ [f, R] = A(null),
145
+ [D, C] = A(null),
146
+ _ = b(null),
147
+ F = b(null),
148
+ B = b(t),
149
+ T = b("");
150
+ B.current = t;
151
+ const N = K(() => P.getMap(), []),
152
+ w = V(() => resolveNwsAndroidLayerAnchors(n, t || {}), [n, t]);
153
+ if (g(() => {
154
+ const o = r => R(r),
155
+ e = ie({
156
+ getMapboxMapView: N,
157
+ onShape: r => p(r),
158
+ onFeatureStates: r => C(r),
159
+ onLayersCleared: () => {
160
+ R(null), C(null);
161
+ }
162
+ });
163
+ F.current = e;
164
+ const u = B.current || {},
165
+ c = new ae(e, u, o);
166
+ return _.current = c, () => {
167
+ c.destroy(), _.current = null, F.current = null;
273
168
  };
274
- const weatherLayerId = anchors.weatherLayerId;
275
- const fillBeforeLayerId = Object.prototype.hasOwnProperty.call(wopt, 'fillBeforeLayerId') ? wopt.fillBeforeLayerId ?? null : null;
276
- const nwsOptsKey = JSON.stringify({
277
- weatherLayerId,
278
- fillBeforeLayerId,
279
- lineBeforeLayerId: wopt.lineBeforeLayerId,
280
- alertsBaseUrl: wopt.alertsBaseUrl,
281
- alertInteractionEnabled: wopt.alertInteractionEnabled,
282
- deltaDebounceMs: wopt.deltaDebounceMs,
283
- fillOpacity: wopt.fillOpacity,
284
- lineOpacity: wopt.lineOpacity,
285
- lineWidth: wopt.lineWidth,
286
- nwsAlertSettings: nwsAlertSettingsForOpts
287
- });
288
- if (optsKeyRef.current !== nwsOptsKey) {
289
- optsKeyRef.current = nwsOptsKey;
290
- ov.updateOptions({
291
- alertsBaseUrl: wopt.alertsBaseUrl,
292
- alertInteractionEnabled: wopt.alertInteractionEnabled,
293
- deltaDebounceMs: wopt.deltaDebounceMs,
294
- fillOpacity: wopt.fillOpacity,
295
- lineOpacity: wopt.lineOpacity,
296
- lineWidth: wopt.lineWidth,
297
- weatherLayerId,
298
- fillBeforeLayerId,
299
- lineBeforeLayerId: wopt.lineBeforeLayerId,
300
- nwsAlertSettings: nwsAlertSettingsForOpts
169
+ }, [N]), g(() => {
170
+ const o = _.current;
171
+ if (!o) return;
172
+ const e = t || {},
173
+ u = {
174
+ ...(e.nwsAlertSettings ?? {}),
175
+ ...(e.activeOnlyRealtime !== void 0 ? {
176
+ activeOnlyRealtime: e.activeOnlyRealtime
177
+ } : {})
178
+ },
179
+ c = w.weatherLayerId,
180
+ r = Object.prototype.hasOwnProperty.call(e, "fillBeforeLayerId") ? e.fillBeforeLayerId ?? null : null,
181
+ y = JSON.stringify({
182
+ weatherLayerId: c,
183
+ fillBeforeLayerId: r,
184
+ lineBeforeLayerId: e.lineBeforeLayerId,
185
+ alertsBaseUrl: e.alertsBaseUrl,
186
+ alertInteractionEnabled: e.alertInteractionEnabled,
187
+ deltaDebounceMs: e.deltaDebounceMs,
188
+ fillOpacity: e.fillOpacity,
189
+ lineOpacity: e.lineOpacity,
190
+ lineWidth: e.lineWidth,
191
+ nwsAlertSettings: u
301
192
  });
302
- }
303
- }, [watchesWarnings, anchors.weatherLayerId]);
304
- useEffect(() => {
305
- const ov = overlayRef.current;
306
- if (!ov || !aguaceroState) return;
307
- const wopt = watchesWarnings || {};
308
- const masterEnabled = wopt.enabled === true;
309
- const enabled = masterEnabled;
310
- let timelineUnix = null;
311
- let timelineTimes = null;
312
- const st = aguaceroState;
313
- if (st.isSatellite) {
314
- timelineUnix = st.satelliteTimestamp == null ? null : Number(st.satelliteTimestamp);
315
- timelineTimes = st.availableSatelliteTimestamps;
316
- } else if (st.isNexrad) {
317
- timelineUnix = st.nexradTimestamp == null ? null : Number(st.nexradTimestamp);
318
- timelineTimes = st.availableNexradTimestamps;
319
- } else if (st.isMRMS) {
320
- timelineUnix = st.mrmsTimestamp == null ? null : Number(st.mrmsTimestamp);
321
- timelineTimes = st.availableTimestamps;
322
- }
323
- const hasObservationTimeline = !!(st.isSatellite || st.isNexrad || st.isMRMS);
324
- const alertsFetchHours = computeNwsAlertsFetchHoursFromAguaceroState(st);
325
- ov.syncWithMode({
326
- enabled,
327
- timelineUnix,
328
- timelineTimes,
329
- hasObservationTimeline,
330
- alertsFetchHours
193
+ T.current !== y && (T.current = y, o.updateOptions({
194
+ alertsBaseUrl: e.alertsBaseUrl,
195
+ alertInteractionEnabled: e.alertInteractionEnabled,
196
+ deltaDebounceMs: e.deltaDebounceMs,
197
+ fillOpacity: e.fillOpacity,
198
+ lineOpacity: e.lineOpacity,
199
+ lineWidth: e.lineWidth,
200
+ weatherLayerId: c,
201
+ fillBeforeLayerId: r,
202
+ lineBeforeLayerId: e.lineBeforeLayerId,
203
+ nwsAlertSettings: u
204
+ }));
205
+ }, [t, w.weatherLayerId]), g(() => {
206
+ const o = _.current;
207
+ if (!o || !n) return;
208
+ const e = (t || {}).enabled === !0;
209
+ let u = null,
210
+ c = null;
211
+ const r = n;
212
+ r.isSatellite ? (u = r.satelliteTimestamp == null ? null : Number(r.satelliteTimestamp), c = r.availableSatelliteTimestamps) : r.isNexrad ? (u = r.nexradTimestamp == null ? null : Number(r.nexradTimestamp), c = r.availableNexradTimestamps) : r.isMRMS && (u = r.mrmsTimestamp == null ? null : Number(r.mrmsTimestamp), c = r.availableTimestamps);
213
+ const y = !!(r.isSatellite || r.isNexrad || r.isMRMS),
214
+ E = ee(r);
215
+ o.syncWithMode({
216
+ enabled: e,
217
+ timelineUnix: u,
218
+ timelineTimes: c,
219
+ hasObservationTimeline: y,
220
+ alertsFetchHours: E
331
221
  });
332
- }, [aguaceroState, watchesWarnings]);
333
- useLayoutEffect(() => {
334
- const stub = stubRef.current;
335
- const ov = overlayRef.current;
336
- if (!stub || !ov || !paint) return;
337
- stub.__markDeclarativeLayersReady();
338
- try {
339
- ov._applyTimeFilters();
340
- } catch {
341
- /* ignore */
222
+ }, [n, t]), X(() => {
223
+ const o = F.current,
224
+ e = _.current;
225
+ if (!(!o || !e || !f)) {
226
+ o.__markDeclarativeLayersReady();
227
+ try {
228
+ e._applyTimeFilters();
229
+ } catch {}
342
230
  }
343
- }, [paint, shape, aguaceroState?.nexradTimestamp, aguaceroState?.mrmsTimestamp, aguaceroState?.satelliteTimestamp]);
344
- useEffect(() => {
345
- if (!onNwsAlertClick) return undefined;
346
- const handler = async payload => {
347
- const wopt = watchesRef.current || {};
348
- if (!wopt.enabled || wopt.alertInteractionEnabled === false) return;
349
- const mapView = mapRegistry.getMap();
350
- if (!mapView?.queryRenderedFeaturesAtPoint) return;
351
- let screenPoint = null;
352
- if (payload?.properties?.screenPointX != null && payload?.properties?.screenPointY != null) {
353
- screenPoint = [payload.properties.screenPointX, payload.properties.screenPointY];
354
- } else if (payload?.point != null && Array.isArray(payload.point)) {
355
- screenPoint = payload.point;
231
+ }, [f, s, n?.nexradTimestamp, n?.mrmsTimestamp, n?.satelliteTimestamp]), g(() => {
232
+ if (!a) return;
233
+ const o = async e => {
234
+ const u = B.current || {};
235
+ if (!u.enabled || u.alertInteractionEnabled === !1) return;
236
+ const c = P.getMap();
237
+ if (!c?.queryRenderedFeaturesAtPoint) return;
238
+ let r = null;
239
+ if (e?.properties?.screenPointX != null && e?.properties?.screenPointY != null ? r = [e.properties.screenPointX, e.properties.screenPointY] : e?.point != null && Array.isArray(e.point) && (r = e.point), !r) return;
240
+ let y = await c.queryRenderedFeaturesAtPoint(r, void 0, [m, h, L]);
241
+ if (!y?.length && e?.coordinates) {
242
+ const S = e.coordinates,
243
+ q = await c.getPointInView(S);
244
+ q && (y = await c.queryRenderedFeaturesAtPoint(q, void 0, [m, h, L]));
356
245
  }
357
- if (!screenPoint) return;
358
- let feats = await mapView.queryRenderedFeaturesAtPoint(screenPoint, undefined, [FILL_ID, LINE_CASING_ID, LINE_CORE_ID]);
359
- if (!feats?.length && payload?.coordinates) {
360
- const coord = payload.coordinates;
361
- const pt = await mapView.getPointInView(coord);
362
- if (pt) feats = await mapView.queryRenderedFeaturesAtPoint(pt, undefined, [FILL_ID, LINE_CASING_ID, LINE_CORE_ID]);
363
- }
364
- const hit = feats?.find(f => [FILL_ID, LINE_CASING_ID, LINE_CORE_ID].includes(f?.layer?.id));
365
- if (!hit?.properties) return;
366
- try {
367
- const built = buildAlertClickPayload(hit);
368
- onNwsAlertClick({
369
- ...built,
370
- feature: hit
246
+ const E = y?.find(S => [m, h, L].includes(S?.layer?.id));
247
+ if (E?.properties) try {
248
+ const S = Z(E);
249
+ a({
250
+ ...S,
251
+ feature: E
371
252
  });
372
- } catch {
373
- /* ignore */
374
- }
253
+ } catch {}
375
254
  };
376
- mapRegistry.addPressListener(handler);
377
- return () => mapRegistry.removePressListener(handler);
378
- }, [onNwsAlertClick]);
379
- if (!paint) {
380
- return null;
381
- }
382
- const p = paint;
383
- const lineLayout = p.lineLayout ?? {};
384
- const lineCap = lineLayout['line-cap'] ?? 'round';
385
- const lineJoin = lineLayout['line-join'] ?? 'round';
386
- const lineSortKey = lineLayout['line-sort-key'] ?? ['coalesce', ['get', '_nws_render_priority'], 0];
387
- const fillSortKey = ['coalesce', ['get', '_nws_render_priority'], 0];
388
- const fillStyle = {
389
- fillColor: p.fillColorExpr,
390
- fillOpacity: p.fillOpacityExpr,
391
- fillSortKey
392
- };
393
- const casingStyle = {
394
- lineColor: p.dualLine.casingColor,
395
- lineWidth: p.dualLine.casingWidth,
396
- lineOpacity: p.lineOpacityExpr,
397
- lineDasharray: p.lineDashExpr,
398
- lineCap,
399
- lineJoin,
400
- lineSortKey
401
- };
402
- const coreStyle = {
403
- lineColor: p.dualLine.coreColor,
404
- lineWidth: p.dualLine.coreWidth,
405
- lineOpacity: p.lineOpacityExpr,
406
- lineDasharray: p.lineDashExpr,
407
- lineCap,
408
- lineJoin,
409
- lineSortKey
410
- };
411
- const activeFilter = activeIds ? activeIds.length > 0 ? ['in', ['id'], ['literal', activeIds]] : ['==', ['id'], -1] : ['==', ['id'], -1];
412
- return /*#__PURE__*/React.createElement(Mapbox.ShapeSource, {
413
- id: SOURCE_ID,
414
- shape: shape
415
- }, /*#__PURE__*/React.createElement(Mapbox.FillLayer, {
416
- id: FILL_ID,
417
- belowLayerID: anchors.fillBelowId,
418
- style: fillStyle,
419
- filter: activeFilter
420
- }), /*#__PURE__*/React.createElement(Mapbox.LineLayer, {
421
- id: LINE_CASING_ID,
422
- belowLayerID: anchors.lineBelowId,
423
- style: casingStyle,
424
- filter: activeFilter
425
- }), /*#__PURE__*/React.createElement(Mapbox.LineLayer, {
426
- id: LINE_CORE_ID,
427
- belowLayerID: anchors.lineBelowId,
428
- style: coreStyle,
429
- filter: activeFilter
255
+ return P.addPressListener(o), () => P.removePressListener(o);
256
+ }, [a]), !f) return null;
257
+ const d = f,
258
+ M = d.lineLayout ?? {},
259
+ W = M["line-cap"] ?? "round",
260
+ k = M["line-join"] ?? "round",
261
+ U = M["line-sort-key"] ?? ["coalesce", ["get", "_nws_render_priority"], 0],
262
+ j = ["coalesce", ["get", "_nws_render_priority"], 0],
263
+ G = {
264
+ fillColor: d.fillColorExpr,
265
+ fillOpacity: d.fillOpacityExpr,
266
+ fillSortKey: j
267
+ },
268
+ H = {
269
+ lineColor: d.dualLine.casingColor,
270
+ lineWidth: d.dualLine.casingWidth,
271
+ lineOpacity: d.lineOpacityExpr,
272
+ lineDasharray: d.lineDashExpr,
273
+ lineCap: W,
274
+ lineJoin: k,
275
+ lineSortKey: U
276
+ },
277
+ J = {
278
+ lineColor: d.dualLine.coreColor,
279
+ lineWidth: d.dualLine.coreWidth,
280
+ lineOpacity: d.lineOpacityExpr,
281
+ lineDasharray: d.lineDashExpr,
282
+ lineCap: W,
283
+ lineJoin: k,
284
+ lineSortKey: U
285
+ },
286
+ v = D ? D.length > 0 ? ["in", ["id"], ["literal", D]] : ["==", ["id"], -1] : ["==", ["id"], -1];
287
+ return /*#__PURE__*/I.createElement(x.ShapeSource, {
288
+ id: O,
289
+ shape: s
290
+ }, /*#__PURE__*/I.createElement(x.FillLayer, {
291
+ id: m,
292
+ belowLayerID: w.fillBelowId,
293
+ style: G,
294
+ filter: v
295
+ }), /*#__PURE__*/I.createElement(x.LineLayer, {
296
+ id: h,
297
+ belowLayerID: w.lineBelowId,
298
+ style: H,
299
+ filter: v
300
+ }), /*#__PURE__*/I.createElement(x.LineLayer, {
301
+ id: L,
302
+ belowLayerID: w.lineBelowId,
303
+ style: J,
304
+ filter: v
430
305
  }));
431
306
  }
432
307
  //# sourceMappingURL=NwsAlertsOverlay.native.js.map