@burdenoff/microfe-theglobalfuel 2026.709.1 → 2026.709.2

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 (231) hide show
  1. package/README.md +3 -0
  2. package/dist/dev/main.d.ts +2 -0
  3. package/dist/dev/main.d.ts.map +1 -0
  4. package/dist/generated/global-operations.d.ts +2 -0
  5. package/dist/generated/global-operations.d.ts.map +1 -0
  6. package/dist/generated/global-types.d.ts +18199 -0
  7. package/dist/generated/global-types.d.ts.map +1 -0
  8. package/dist/generated/wspace-operations.d.ts +2 -0
  9. package/dist/generated/wspace-operations.d.ts.map +1 -0
  10. package/dist/generated/wspace-types.d.ts +43046 -0
  11. package/dist/generated/wspace-types.d.ts.map +1 -0
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts +5 -0
  15. package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts.map +1 -0
  16. package/dist/theglobalfuel/TheGlobalFuelRoot.js +106 -104
  17. package/dist/theglobalfuel/TheGlobalFuelRoot.js.map +1 -1
  18. package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts +4 -0
  19. package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts.map +1 -0
  20. package/dist/theglobalfuel/TheGlobalFuelRoutes.js +60 -38
  21. package/dist/theglobalfuel/TheGlobalFuelRoutes.js.map +1 -1
  22. package/dist/theglobalfuel/components/DataTable.d.ts +30 -0
  23. package/dist/theglobalfuel/components/DataTable.d.ts.map +1 -0
  24. package/dist/theglobalfuel/components/DataTable.js.map +1 -1
  25. package/dist/theglobalfuel/components/EmptyState.d.ts +18 -0
  26. package/dist/theglobalfuel/components/EmptyState.d.ts.map +1 -0
  27. package/dist/theglobalfuel/components/EvidenceUpload.d.ts +14 -0
  28. package/dist/theglobalfuel/components/EvidenceUpload.d.ts.map +1 -0
  29. package/dist/theglobalfuel/components/FileLink.d.ts +15 -0
  30. package/dist/theglobalfuel/components/FileLink.d.ts.map +1 -0
  31. package/dist/theglobalfuel/components/FilterTabs.d.ts +18 -0
  32. package/dist/theglobalfuel/components/FilterTabs.d.ts.map +1 -0
  33. package/dist/theglobalfuel/components/MetricsCard.d.ts +23 -0
  34. package/dist/theglobalfuel/components/MetricsCard.d.ts.map +1 -0
  35. package/dist/theglobalfuel/components/MiniBar.d.ts +16 -0
  36. package/dist/theglobalfuel/components/MiniBar.d.ts.map +1 -0
  37. package/dist/theglobalfuel/components/PageLayout.d.ts +18 -0
  38. package/dist/theglobalfuel/components/PageLayout.d.ts.map +1 -0
  39. package/dist/theglobalfuel/components/PageLayout.js +2 -1
  40. package/dist/theglobalfuel/components/PageLayout.js.map +1 -1
  41. package/dist/theglobalfuel/components/Pagination.d.ts +22 -0
  42. package/dist/theglobalfuel/components/Pagination.d.ts.map +1 -0
  43. package/dist/theglobalfuel/components/StateViews.d.ts +24 -0
  44. package/dist/theglobalfuel/components/StateViews.d.ts.map +1 -0
  45. package/dist/theglobalfuel/components/StatusBadge.d.ts +9 -0
  46. package/dist/theglobalfuel/components/StatusBadge.d.ts.map +1 -0
  47. package/dist/theglobalfuel/components/Tabs.d.ts +17 -0
  48. package/dist/theglobalfuel/components/Tabs.d.ts.map +1 -0
  49. package/dist/theglobalfuel/components/TheDiscussion.d.ts +18 -0
  50. package/dist/theglobalfuel/components/TheDiscussion.d.ts.map +1 -0
  51. package/dist/theglobalfuel/components/TheTags.d.ts +17 -0
  52. package/dist/theglobalfuel/components/TheTags.d.ts.map +1 -0
  53. package/dist/theglobalfuel/components/WorldMap.d.ts +18 -0
  54. package/dist/theglobalfuel/components/WorldMap.d.ts.map +1 -0
  55. package/dist/theglobalfuel/components/WorldMap.js.map +1 -1
  56. package/dist/theglobalfuel/components/index.d.ts +21 -0
  57. package/dist/theglobalfuel/components/index.d.ts.map +1 -0
  58. package/dist/theglobalfuel/components/viz/AllocationBar.d.ts +21 -0
  59. package/dist/theglobalfuel/components/viz/AllocationBar.d.ts.map +1 -0
  60. package/dist/theglobalfuel/components/viz/AreaChart.d.ts +18 -0
  61. package/dist/theglobalfuel/components/viz/AreaChart.d.ts.map +1 -0
  62. package/dist/theglobalfuel/components/viz/AvatarStack.d.ts +13 -0
  63. package/dist/theglobalfuel/components/viz/AvatarStack.d.ts.map +1 -0
  64. package/dist/theglobalfuel/components/viz/BarChart.d.ts +17 -0
  65. package/dist/theglobalfuel/components/viz/BarChart.d.ts.map +1 -0
  66. package/dist/theglobalfuel/components/viz/CertificateCard.d.ts +14 -0
  67. package/dist/theglobalfuel/components/viz/CertificateCard.d.ts.map +1 -0
  68. package/dist/theglobalfuel/components/viz/DonutChart.d.ts +20 -0
  69. package/dist/theglobalfuel/components/viz/DonutChart.d.ts.map +1 -0
  70. package/dist/theglobalfuel/components/viz/HBarFunnel.d.ts +17 -0
  71. package/dist/theglobalfuel/components/viz/HBarFunnel.d.ts.map +1 -0
  72. package/dist/theglobalfuel/components/viz/Heatmap.d.ts +26 -0
  73. package/dist/theglobalfuel/components/viz/Heatmap.d.ts.map +1 -0
  74. package/dist/theglobalfuel/components/viz/KanbanBoard.d.ts +17 -0
  75. package/dist/theglobalfuel/components/viz/KanbanBoard.d.ts.map +1 -0
  76. package/dist/theglobalfuel/components/viz/LineChart.d.ts +20 -0
  77. package/dist/theglobalfuel/components/viz/LineChart.d.ts.map +1 -0
  78. package/dist/theglobalfuel/components/viz/OrgTree.d.ts +14 -0
  79. package/dist/theglobalfuel/components/viz/OrgTree.d.ts.map +1 -0
  80. package/dist/theglobalfuel/components/viz/PathSteps.d.ts +17 -0
  81. package/dist/theglobalfuel/components/viz/PathSteps.d.ts.map +1 -0
  82. package/dist/theglobalfuel/components/viz/ProgressRing.d.ts +20 -0
  83. package/dist/theglobalfuel/components/viz/ProgressRing.d.ts.map +1 -0
  84. package/dist/theglobalfuel/components/viz/RatingStars.d.ts +14 -0
  85. package/dist/theglobalfuel/components/viz/RatingStars.d.ts.map +1 -0
  86. package/dist/theglobalfuel/components/viz/SegmentedTabs.d.ts +26 -0
  87. package/dist/theglobalfuel/components/viz/SegmentedTabs.d.ts.map +1 -0
  88. package/dist/theglobalfuel/components/viz/SkillBar.d.ts +17 -0
  89. package/dist/theglobalfuel/components/viz/SkillBar.d.ts.map +1 -0
  90. package/dist/theglobalfuel/components/viz/Sparkline.d.ts +16 -0
  91. package/dist/theglobalfuel/components/viz/Sparkline.d.ts.map +1 -0
  92. package/dist/theglobalfuel/components/viz/StatCard.d.ts +22 -0
  93. package/dist/theglobalfuel/components/viz/StatCard.d.ts.map +1 -0
  94. package/dist/theglobalfuel/components/viz/StepProgress.d.ts +17 -0
  95. package/dist/theglobalfuel/components/viz/StepProgress.d.ts.map +1 -0
  96. package/dist/theglobalfuel/components/viz/Timeline.d.ts +21 -0
  97. package/dist/theglobalfuel/components/viz/Timeline.d.ts.map +1 -0
  98. package/dist/theglobalfuel/components/viz/index.d.ts +35 -0
  99. package/dist/theglobalfuel/components/viz/index.d.ts.map +1 -0
  100. package/dist/theglobalfuel/components/viz/lib/Avatar.d.ts +15 -0
  101. package/dist/theglobalfuel/components/viz/lib/Avatar.d.ts.map +1 -0
  102. package/dist/theglobalfuel/components/viz/lib/CartesianFrame.d.ts +44 -0
  103. package/dist/theglobalfuel/components/viz/lib/CartesianFrame.d.ts.map +1 -0
  104. package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.d.ts +27 -0
  105. package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.d.ts.map +1 -0
  106. package/dist/theglobalfuel/components/viz/lib/format.d.ts +10 -0
  107. package/dist/theglobalfuel/components/viz/lib/format.d.ts.map +1 -0
  108. package/dist/theglobalfuel/components/viz/lib/geometry.d.ts +41 -0
  109. package/dist/theglobalfuel/components/viz/lib/geometry.d.ts.map +1 -0
  110. package/dist/theglobalfuel/components/viz/lib/hooks.d.ts +18 -0
  111. package/dist/theglobalfuel/components/viz/lib/hooks.d.ts.map +1 -0
  112. package/dist/theglobalfuel/components/viz/lib/palette.d.ts +31 -0
  113. package/dist/theglobalfuel/components/viz/lib/palette.d.ts.map +1 -0
  114. package/dist/theglobalfuel/components/viz/lib/types.d.ts +27 -0
  115. package/dist/theglobalfuel/components/viz/lib/types.d.ts.map +1 -0
  116. package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts +16 -0
  117. package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts.map +1 -0
  118. package/dist/theglobalfuel/context/index.d.ts +6 -0
  119. package/dist/theglobalfuel/context/index.d.ts.map +1 -0
  120. package/dist/theglobalfuel/hooks/index.d.ts +15 -0
  121. package/dist/theglobalfuel/hooks/index.d.ts.map +1 -0
  122. package/dist/theglobalfuel/hooks/index.js +3 -0
  123. package/dist/theglobalfuel/hooks/useCursorPager.d.ts +26 -0
  124. package/dist/theglobalfuel/hooks/useCursorPager.d.ts.map +1 -0
  125. package/dist/theglobalfuel/hooks/useNotify.d.ts +23 -0
  126. package/dist/theglobalfuel/hooks/useNotify.d.ts.map +1 -0
  127. package/dist/theglobalfuel/hooks/useTheAnalytics.d.ts +38 -0
  128. package/dist/theglobalfuel/hooks/useTheAnalytics.d.ts.map +1 -0
  129. package/dist/theglobalfuel/hooks/useTheAnalytics.js +1 -0
  130. package/dist/theglobalfuel/hooks/useTheAnalytics.js.map +1 -1
  131. package/dist/theglobalfuel/hooks/useTheComments.d.ts +36 -0
  132. package/dist/theglobalfuel/hooks/useTheComments.d.ts.map +1 -0
  133. package/dist/theglobalfuel/hooks/useTheFiles.d.ts +47 -0
  134. package/dist/theglobalfuel/hooks/useTheFiles.d.ts.map +1 -0
  135. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts +79 -0
  136. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts.map +1 -0
  137. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js +2 -9
  138. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js.map +1 -1
  139. package/dist/theglobalfuel/hooks/useTheNativeControls.d.ts +20 -0
  140. package/dist/theglobalfuel/hooks/useTheNativeControls.d.ts.map +1 -0
  141. package/dist/theglobalfuel/hooks/useTheNativeControls.js +22 -0
  142. package/dist/theglobalfuel/hooks/useTheNativeControls.js.map +1 -0
  143. package/dist/theglobalfuel/hooks/useThePageView.d.ts +10 -0
  144. package/dist/theglobalfuel/hooks/useThePageView.d.ts.map +1 -0
  145. package/dist/theglobalfuel/hooks/useThePageView.js +13 -0
  146. package/dist/theglobalfuel/hooks/useThePageView.js.map +1 -0
  147. package/dist/theglobalfuel/hooks/useTheTags.d.ts +44 -0
  148. package/dist/theglobalfuel/hooks/useTheTags.d.ts.map +1 -0
  149. package/dist/theglobalfuel/hooks/useTheTranslation.d.ts +4 -0
  150. package/dist/theglobalfuel/hooks/useTheTranslation.d.ts.map +1 -0
  151. package/dist/theglobalfuel/hooks/useTheTranslation.js +12 -0
  152. package/dist/theglobalfuel/hooks/useTheTranslation.js.map +1 -0
  153. package/dist/theglobalfuel/index.d.ts +11 -0
  154. package/dist/theglobalfuel/index.d.ts.map +1 -0
  155. package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts +13 -0
  156. package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts.map +1 -0
  157. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js +452 -415
  158. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js.map +1 -1
  159. package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts +10 -0
  160. package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts.map +1 -0
  161. package/dist/theglobalfuel/pages/assets/AssetsPage.js +138 -135
  162. package/dist/theglobalfuel/pages/assets/AssetsPage.js.map +1 -1
  163. package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts +11 -0
  164. package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts.map +1 -0
  165. package/dist/theglobalfuel/pages/compliance/CompliancePage.js +233 -229
  166. package/dist/theglobalfuel/pages/compliance/CompliancePage.js.map +1 -1
  167. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts +9 -0
  168. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts.map +1 -0
  169. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js +410 -389
  170. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js.map +1 -1
  171. package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts +8 -0
  172. package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts.map +1 -0
  173. package/dist/theglobalfuel/pages/contracts/ContractsPage.js +140 -137
  174. package/dist/theglobalfuel/pages/contracts/ContractsPage.js.map +1 -1
  175. package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts +17 -0
  176. package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts.map +1 -0
  177. package/dist/theglobalfuel/pages/dashboard/DashboardPage.js +83 -83
  178. package/dist/theglobalfuel/pages/dashboard/DashboardPage.js.map +1 -1
  179. package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts +13 -0
  180. package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts.map +1 -0
  181. package/dist/theglobalfuel/pages/emissions/EmissionsPage.js +154 -150
  182. package/dist/theglobalfuel/pages/emissions/EmissionsPage.js.map +1 -1
  183. package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts +11 -0
  184. package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts.map +1 -0
  185. package/dist/theglobalfuel/pages/inventory/InventoryPage.js +151 -147
  186. package/dist/theglobalfuel/pages/inventory/InventoryPage.js.map +1 -1
  187. package/dist/theglobalfuel/pages/production/ProductionPage.d.ts +11 -0
  188. package/dist/theglobalfuel/pages/production/ProductionPage.d.ts.map +1 -0
  189. package/dist/theglobalfuel/pages/production/ProductionPage.js +175 -171
  190. package/dist/theglobalfuel/pages/production/ProductionPage.js.map +1 -1
  191. package/dist/theglobalfuel/pages/provenance/ProvenancePage.d.ts +23 -0
  192. package/dist/theglobalfuel/pages/provenance/ProvenancePage.d.ts.map +1 -0
  193. package/dist/theglobalfuel/pages/provenance/ProvenancePage.js +153 -146
  194. package/dist/theglobalfuel/pages/provenance/ProvenancePage.js.map +1 -1
  195. package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts +10 -0
  196. package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts.map +1 -0
  197. package/dist/theglobalfuel/pages/reserves/ReservesPage.js +168 -164
  198. package/dist/theglobalfuel/pages/reserves/ReservesPage.js.map +1 -1
  199. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts +11 -0
  200. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts.map +1 -0
  201. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js +179 -175
  202. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js.map +1 -1
  203. package/dist/theglobalfuel/services/assistantApi.d.ts +25 -0
  204. package/dist/theglobalfuel/services/assistantApi.d.ts.map +1 -0
  205. package/dist/theglobalfuel/services/assistantApi.js.map +1 -1
  206. package/dist/theglobalfuel/services/createSandboxAssistantTransport.d.ts +38 -0
  207. package/dist/theglobalfuel/services/createSandboxAssistantTransport.d.ts.map +1 -0
  208. package/dist/theglobalfuel/services/createSandboxAssistantTransport.js.map +1 -1
  209. package/dist/theglobalfuel/services/index.d.ts +7 -0
  210. package/dist/theglobalfuel/services/index.d.ts.map +1 -0
  211. package/dist/theglobalfuel/types/assistant.d.ts +65 -0
  212. package/dist/theglobalfuel/types/assistant.d.ts.map +1 -0
  213. package/dist/theglobalfuel/types/index.d.ts +376 -0
  214. package/dist/theglobalfuel/types/index.d.ts.map +1 -0
  215. package/dist/theglobalfuel/utils/cn.d.ts +4 -0
  216. package/dist/theglobalfuel/utils/cn.d.ts.map +1 -0
  217. package/dist/theglobalfuel/utils/formatters.d.ts +44 -0
  218. package/dist/theglobalfuel/utils/formatters.d.ts.map +1 -0
  219. package/dist/theglobalfuel/utils/i18n.d.ts +5 -0
  220. package/dist/theglobalfuel/utils/i18n.d.ts.map +1 -0
  221. package/dist/theglobalfuel/utils/i18n.js +15 -0
  222. package/dist/theglobalfuel/utils/i18n.js.map +1 -0
  223. package/dist/theglobalfuel/utils/index.d.ts +10 -0
  224. package/dist/theglobalfuel/utils/index.d.ts.map +1 -0
  225. package/dist/theglobalfuel/utils/navigation.d.ts +14 -0
  226. package/dist/theglobalfuel/utils/navigation.d.ts.map +1 -0
  227. package/dist/theglobalfuel/utils/pageContext.d.ts +26 -0
  228. package/dist/theglobalfuel/utils/pageContext.d.ts.map +1 -0
  229. package/dist/theglobalfuel/utils/transitions.d.ts +17 -0
  230. package/dist/theglobalfuel/utils/transitions.d.ts.map +1 -0
  231. package/package.json +1 -1
@@ -1,29 +1,33 @@
1
1
  import { useTheGlobalFuel as e } from "../../context/TheGlobalFuelContext.js";
2
2
  import { PageLayout as t } from "../../components/PageLayout.js";
3
3
  import { MetricsCard as n } from "../../components/MetricsCard.js";
4
- import { formatCoords as r, formatDate as i, formatEnumLabel as a, formatNumber as ee, formatPercent as o, formatRelativeTime as s, formatTonnesCo2e as te, formatVolume as c, toBackendDate as l } from "../../utils/formatters.js";
5
- import { StatusBadge as u } from "../../components/StatusBadge.js";
6
- import { DataTable as d } from "../../components/DataTable.js";
7
- import { ErrorView as f, LoadingView as ne, Section as p } from "../../components/StateViews.js";
4
+ import { formatCoords as ee, formatDate as r, formatEnumLabel as i, formatNumber as te, formatPercent as a, formatRelativeTime as o, formatTonnesCo2e as ne, formatVolume as s, toBackendDate as c } from "../../utils/formatters.js";
5
+ import { StatusBadge as l } from "../../components/StatusBadge.js";
6
+ import { DataTable as u } from "../../components/DataTable.js";
7
+ import { ErrorView as d, LoadingView as f, Section as p } from "../../components/StateViews.js";
8
8
  import { EmptyState as m } from "../../components/EmptyState.js";
9
9
  import "../../context/index.js";
10
- import { useTheAsset as re, useTheCreateReserveEstimate as ie, useTheEmissionRecords as ae, useTheRecordProduction as oe, useTheRetireAsset as se, useTheTransitionAsset as ce } from "../../hooks/useTheGlobalFuelApi.js";
11
- import { useNotify as le } from "../../hooks/useNotify.js";
12
- import { useTheAnalytics as ue } from "../../hooks/useTheAnalytics.js";
10
+ import { useTheAsset as re, useTheCreateReserveEstimate as ie, useTheEmissionRecords as ae, useTheProductionRecords as oe, useTheRecordProduction as se, useTheReserveEstimates as ce, useTheRetireAsset as le, useTheTransitionAsset as ue } from "../../hooks/useTheGlobalFuelApi.js";
11
+ import { useCursorPager as de } from "../../hooks/useCursorPager.js";
12
+ import { useNotify as fe } from "../../hooks/useNotify.js";
13
+ import { useTheAnalytics as pe } from "../../hooks/useTheAnalytics.js";
14
+ import { useThePageView as me } from "../../hooks/useThePageView.js";
15
+ import { useTheNativeControls as he } from "../../hooks/useTheNativeControls.js";
13
16
  import "../../hooks/index.js";
14
- import { ASSET_TRANSITIONS as de, nextStatuses as fe } from "../../utils/transitions.js";
15
- import { Tabs as pe } from "../../components/Tabs.js";
16
- import { TheDiscussion as me } from "../../components/TheDiscussion.js";
17
- import { TheTags as he } from "../../components/TheTags.js";
18
- import { WorldMap as ge } from "../../components/WorldMap.js";
17
+ import { ASSET_TRANSITIONS as ge, nextStatuses as _e } from "../../utils/transitions.js";
18
+ import { Tabs as ve } from "../../components/Tabs.js";
19
+ import { Pagination as ye } from "../../components/Pagination.js";
20
+ import { TheDiscussion as be } from "../../components/TheDiscussion.js";
21
+ import { TheTags as xe } from "../../components/TheTags.js";
22
+ import { WorldMap as Se } from "../../components/WorldMap.js";
19
23
  import "../../components/index.js";
20
24
  import { useState as h } from "react";
21
- import { Activity as _e, Archive as ve, ArrowLeft as ye, CalendarClock as be, Factory as xe, Fuel as Se, Gauge as Ce, Layers as we, MapPin as Te, MessageSquare as Ee, Percent as De, Plus as g, Tag as Oe } from "lucide-react";
22
- import { useParams as ke } from "react-router-dom";
23
- import { Fragment as Ae, jsx as _, jsxs as v } from "react/jsx-runtime";
24
- import { Button as y, GlassCard as b, Input as x, Label as S, ResponsiveDialog as C, ResponsiveDialogContent as w, ResponsiveDialogDescription as T, ResponsiveDialogFooter as je, ResponsiveDialogHeader as Me, ResponsiveDialogTitle as Ne, Select as E, SelectContent as D, SelectItem as O, SelectTrigger as k, SelectValue as A, Textarea as Pe } from "@burdenoff/fe-libs/ui";
25
+ import { Activity as Ce, Archive as we, ArrowLeft as Te, CalendarClock as Ee, Factory as De, Fuel as Oe, Gauge as ke, Layers as Ae, MapPin as je, MessageSquare as Me, Percent as Ne, Plus as g, Tag as Pe } from "lucide-react";
26
+ import { useParams as Fe } from "react-router-dom";
27
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
28
+ import { Button as b, GlassCard as x, Input as S, Label as C, ResponsiveDialog as Ie, ResponsiveDialogContent as Le, ResponsiveDialogDescription as Re, ResponsiveDialogFooter as ze, ResponsiveDialogHeader as Be, ResponsiveDialogTitle as Ve, Select as w, SelectContent as T, SelectItem as E, SelectTrigger as D, SelectValue as O, Textarea as He } from "@burdenoff/fe-libs/ui";
25
29
  //#region src/theglobalfuel/pages/assets/AssetDetailPage.tsx
26
- var Fe = [
30
+ var k = 25, Ue = [
27
31
  "BARRELS",
28
32
  "CUBIC_METERS",
29
33
  "TONNES",
@@ -31,27 +35,38 @@ var Fe = [
31
35
  "MWH",
32
36
  "GJ",
33
37
  "MCF"
34
- ], Ie = [
38
+ ], We = [
35
39
  "PROVED",
36
40
  "PROBABLE",
37
41
  "POSSIBLE",
38
42
  "CONTINGENT",
39
43
  "PROSPECTIVE"
40
- ], j = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
41
- function M({ label: e, value: t }) {
42
- return /* @__PURE__ */ v("div", {
44
+ ], A = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
45
+ function j({ label: e, value: t }) {
46
+ return /* @__PURE__ */ y("div", {
43
47
  className: "flex flex-col gap-0.5 border-b border-border-seam/60 py-2.5 last:border-b-0",
44
- children: [/* @__PURE__ */ _("dt", {
48
+ children: [/* @__PURE__ */ v("dt", {
45
49
  className: "text-xs font-medium uppercase tracking-wide text-text-tertiary",
46
50
  children: e
47
- }), /* @__PURE__ */ _("dd", {
51
+ }), /* @__PURE__ */ v("dd", {
48
52
  className: "truncate text-sm text-text-primary",
49
53
  children: t
50
54
  })]
51
55
  });
52
56
  }
53
- function N() {
54
- let { id: N } = ke(), { navigateTo: P } = e(), F = le(), { data: I, isLoading: Le, isError: Re, refetch: ze } = re(N), L = ae({ assetId: N }), { trackProductionRecordClicked: Be, trackProductionRecorded: Ve, trackReserveCreateClicked: He, trackReserveCreated: Ue } = ue(), We = ce(), Ge = se(), R = oe(), z = ie(), [B, Ke] = h("production"), [V, H] = h(null), [qe, U] = h(!1), [W, G] = h({
57
+ function M() {
58
+ let { id: M } = Fe(), { navigateTo: N } = e(), P = fe();
59
+ me("asset-detail");
60
+ let { haptic: Ge, confirm: Ke } = he(), { data: F, isLoading: qe, isError: Je, refetch: Ye } = re(M), I = ae({ assetId: M }), L = de(), R = de(), z = oe({
61
+ assetId: M,
62
+ pagination: {
63
+ limit: k,
64
+ offset: L.page * k
65
+ }
66
+ }), B = ce(M, void 0, {
67
+ limit: k,
68
+ offset: R.page * k
69
+ }), { trackProductionRecordClicked: Xe, trackProductionRecorded: Ze, trackReserveCreateClicked: Qe, trackReserveCreated: $e } = pe(), et = ue(), tt = le(), V = se(), H = ie(), [U, nt] = h("production"), [W, G] = h(null), [rt, K] = h(!1), [q, J] = h({
55
70
  periodStart: "",
56
71
  periodEnd: "",
57
72
  volume: "",
@@ -59,7 +74,7 @@ function N() {
59
74
  grade: "",
60
75
  downtimeHours: "",
61
76
  notes: ""
62
- }), [Je, K] = h(!1), [q, J] = h({
77
+ }), [it, at] = h(!1), [Y, X] = h({
63
78
  category: "PROVED",
64
79
  asOfDate: "",
65
80
  recoverable: "",
@@ -68,58 +83,60 @@ function N() {
68
83
  methodology: "",
69
84
  notes: ""
70
85
  });
71
- if (Le) return /* @__PURE__ */ _(t, {
86
+ if (qe) return /* @__PURE__ */ v(t, {
72
87
  title: "Asset",
73
- children: /* @__PURE__ */ _(ne, { label: "Loading asset…" })
88
+ dataTour: "theglobalfuel-asset-detail-page",
89
+ children: /* @__PURE__ */ v(f, { label: "Loading asset…" })
74
90
  });
75
- if (Re || !I) return /* @__PURE__ */ _(t, {
91
+ if (Je || !F) return /* @__PURE__ */ v(t, {
76
92
  title: "Asset",
77
- actions: /* @__PURE__ */ v(y, {
93
+ dataTour: "theglobalfuel-asset-detail-page",
94
+ actions: /* @__PURE__ */ y(b, {
78
95
  variant: "ghost",
79
- onClick: () => P("assets"),
80
- children: [/* @__PURE__ */ _(ye, { className: "mr-1.5 h-4 w-4" }), " Back"]
96
+ onClick: () => N("assets"),
97
+ children: [/* @__PURE__ */ v(Te, { className: "mr-1.5 h-4 w-4" }), " Back"]
81
98
  }),
82
- children: Re ? /* @__PURE__ */ _(f, {
99
+ children: Je ? /* @__PURE__ */ v(d, {
83
100
  message: "This asset could not be loaded.",
84
- onRetry: () => ze()
85
- }) : /* @__PURE__ */ _(m, {
101
+ onRetry: () => Ye()
102
+ }) : /* @__PURE__ */ v(m, {
86
103
  illustration: "empty-search",
87
- icon: /* @__PURE__ */ _(Se, { className: "h-10 w-10" }),
104
+ icon: /* @__PURE__ */ v(Oe, { className: "h-10 w-10" }),
88
105
  title: "Asset not found",
89
106
  description: "This asset may have been retired or you may not have access to it.",
90
- action: /* @__PURE__ */ _(y, {
91
- onClick: () => P("assets"),
107
+ action: /* @__PURE__ */ v(b, {
108
+ onClick: () => N("assets"),
92
109
  children: "Back to assets"
93
110
  })
94
111
  })
95
112
  });
96
- let Y = I.productionRecords ?? [], X = I.reserveEstimates ?? [], Z = L.data?.items ?? [], Ye = I.status === "RETIRED", Xe = fe(de, I.status), Ze = typeof I.latitude == "number" && typeof I.longitude == "number" ? {
97
- lat: I.latitude,
98
- lng: I.longitude,
99
- label: I.name,
113
+ let Z = z.data?.items ?? [], Q = B.data?.items ?? [], ot = I.data?.items ?? [], st = F.status === "RETIRED", ct = _e(ge, F.status), lt = typeof F.latitude == "number" && typeof F.longitude == "number" ? {
114
+ lat: F.latitude,
115
+ lng: F.longitude,
116
+ label: F.name,
100
117
  primary: !0
101
- } : null, Qe = () => {
102
- H(null), Be(), G({
103
- periodStart: j(),
104
- periodEnd: j(),
118
+ } : null, ut = () => {
119
+ G(null), Ge("light"), Xe(), J({
120
+ periodStart: A(),
121
+ periodEnd: A(),
105
122
  volume: "",
106
- unit: I.capacityUnit,
123
+ unit: F.capacityUnit,
107
124
  grade: "",
108
125
  downtimeHours: "",
109
126
  notes: ""
110
- }), U(!0);
111
- }, $e = () => {
112
- H(null), He(), J({
127
+ }), K(!0);
128
+ }, dt = () => {
129
+ G(null), Ge("light"), Qe(), X({
113
130
  category: "PROVED",
114
- asOfDate: j(),
131
+ asOfDate: A(),
115
132
  recoverable: "",
116
133
  recoveryFactor: "",
117
- unit: I.capacityUnit,
134
+ unit: F.capacityUnit,
118
135
  methodology: "",
119
136
  notes: ""
120
- }), K(!0);
121
- }, Q = () => {
122
- U(!1), H(null), G({
137
+ }), at(!0);
138
+ }, ft = () => {
139
+ K(!1), G(null), J({
123
140
  periodStart: "",
124
141
  periodEnd: "",
125
142
  volume: "",
@@ -129,7 +146,7 @@ function N() {
129
146
  notes: ""
130
147
  });
131
148
  }, $ = () => {
132
- K(!1), H(null), J({
149
+ at(!1), G(null), X({
133
150
  category: "PROVED",
134
151
  asOfDate: "",
135
152
  recoverable: "",
@@ -138,92 +155,97 @@ function N() {
138
155
  methodology: "",
139
156
  notes: ""
140
157
  });
141
- }, et = async (e) => {
142
- if (!(!N || e === I.status)) {
143
- H(null);
158
+ }, pt = async (e) => {
159
+ if (!(!M || e === F.status)) {
160
+ G(null);
144
161
  try {
145
- await We.mutateAsync({
146
- id: N,
162
+ await et.mutateAsync({
163
+ id: M,
147
164
  status: e
148
- }), F.success(`Status changed to ${a(e)}`);
165
+ }), P.success(`Status changed to ${i(e)}`);
149
166
  } catch (e) {
150
- F.fromError(e), H(e instanceof Error ? e.message : "Failed to change asset status.");
167
+ P.fromError(e), G(e instanceof Error ? e.message : "Failed to change asset status.");
151
168
  }
152
169
  }
153
- }, tt = async () => {
154
- if (N && window.confirm(`Retire ${I.name}? This marks the asset as decommissioned.`)) {
155
- H(null);
170
+ }, mt = async () => {
171
+ if (M && await Ke({
172
+ title: `Retire ${F.name}?`,
173
+ message: "This marks the asset as decommissioned.",
174
+ okButtonTitle: "Retire",
175
+ cancelButtonTitle: "Cancel"
176
+ })) {
177
+ G(null);
156
178
  try {
157
- await Ge.mutateAsync(N), F.success("Asset retired"), P("assets");
179
+ await tt.mutateAsync(M), P.success("Asset retired"), N("assets");
158
180
  } catch (e) {
159
- F.fromError(e), H(e instanceof Error ? e.message : "Failed to retire asset.");
181
+ P.fromError(e), G(e instanceof Error ? e.message : "Failed to retire asset.");
160
182
  }
161
183
  }
162
- }, nt = async () => {
163
- let e = l(W.periodStart), t = l(W.periodEnd);
164
- if (!N || !e || !t) {
165
- H("Period start and period end are required.");
184
+ }, ht = async () => {
185
+ let e = c(q.periodStart), t = c(q.periodEnd);
186
+ if (!M || !e || !t) {
187
+ G("Period start and period end are required.");
166
188
  return;
167
189
  }
168
- let n = Number(W.volume);
169
- if (!W.volume || !Number.isFinite(n) || n <= 0) {
190
+ let n = Number(q.volume);
191
+ if (!q.volume || !Number.isFinite(n) || n <= 0) {
170
192
  let e = "Volume must be greater than zero.";
171
- H(e), F.error(e);
193
+ G(e), P.error(e);
172
194
  return;
173
195
  }
174
- H(null);
196
+ G(null);
175
197
  try {
176
- Ve((await R.mutateAsync({
177
- assetId: N,
198
+ Ze((await V.mutateAsync({
199
+ assetId: M,
178
200
  periodStart: e,
179
201
  periodEnd: t,
180
202
  volume: n,
181
- unit: W.unit,
182
- grade: W.grade ? Number(W.grade) : null,
183
- downtimeHours: W.downtimeHours ? Number(W.downtimeHours) : null,
184
- notes: W.notes.trim() || null
185
- })).id), F.success("Production recorded"), Q();
203
+ unit: q.unit,
204
+ grade: q.grade ? Number(q.grade) : null,
205
+ downtimeHours: q.downtimeHours ? Number(q.downtimeHours) : null,
206
+ notes: q.notes.trim() || null
207
+ })).id), P.success("Production recorded"), ft();
186
208
  } catch (e) {
187
- F.fromError(e), H(e instanceof Error ? e.message : "Failed to record production.");
209
+ P.fromError(e), G(e instanceof Error ? e.message : "Failed to record production.");
188
210
  }
189
- }, rt = async () => {
190
- let e = l(q.asOfDate);
191
- if (!N || !e) {
192
- H("As-of date is required.");
211
+ }, gt = async () => {
212
+ let e = c(Y.asOfDate);
213
+ if (!M || !e) {
214
+ G("As-of date is required.");
193
215
  return;
194
216
  }
195
- let t = Number(q.recoverable);
196
- if (!q.recoverable || !Number.isFinite(t) || t <= 0) {
217
+ let t = Number(Y.recoverable);
218
+ if (!Y.recoverable || !Number.isFinite(t) || t <= 0) {
197
219
  let e = "Recoverable volume must be greater than zero.";
198
- H(e), F.error(e);
220
+ G(e), P.error(e);
199
221
  return;
200
222
  }
201
- H(null);
223
+ G(null);
202
224
  try {
203
- Ue((await z.mutateAsync({
204
- assetId: N,
205
- category: q.category,
225
+ $e((await H.mutateAsync({
226
+ assetId: M,
227
+ category: Y.category,
206
228
  asOfDate: e,
207
229
  recoverable: t,
208
- recoveryFactor: q.recoveryFactor ? Number(q.recoveryFactor) : null,
209
- unit: q.unit,
210
- methodology: q.methodology.trim() || null,
211
- notes: q.notes.trim() || null
212
- })).id), F.success("Reserve estimate added"), $();
230
+ recoveryFactor: Y.recoveryFactor ? Number(Y.recoveryFactor) : null,
231
+ unit: Y.unit,
232
+ methodology: Y.methodology.trim() || null,
233
+ notes: Y.notes.trim() || null
234
+ })).id), P.success("Reserve estimate added"), $();
213
235
  } catch (e) {
214
- F.fromError(e), H(e instanceof Error ? e.message : "Failed to add reserve estimate.");
236
+ P.fromError(e), G(e instanceof Error ? e.message : "Failed to add reserve estimate.");
215
237
  }
216
- }, it = [
238
+ }, _t = [
217
239
  {
218
240
  key: "period",
219
241
  header: "Period",
220
242
  sortValue: (e) => new Date(e.periodEnd || e.createdAt).getTime(),
221
- render: (e) => /* @__PURE__ */ v("span", {
243
+ render: (e) => /* @__PURE__ */ y("span", {
222
244
  className: "font-medium text-text-primary",
223
245
  children: [
224
- i(e.periodStart),
246
+ r(e.periodStart),
225
247
  " – ",
226
- i(e.periodEnd)
248
+ r(e.periodEnd)
227
249
  ]
228
250
  })
229
251
  },
@@ -232,9 +254,9 @@ function N() {
232
254
  header: "Volume",
233
255
  align: "right",
234
256
  sortValue: (e) => e.volume,
235
- render: (e) => /* @__PURE__ */ _("span", {
257
+ render: (e) => /* @__PURE__ */ v("span", {
236
258
  className: "tabular-nums font-medium text-text-primary",
237
- children: c(e.volume, e.unit)
259
+ children: s(e.volume, e.unit)
238
260
  })
239
261
  },
240
262
  {
@@ -242,12 +264,12 @@ function N() {
242
264
  header: "Grade",
243
265
  align: "right",
244
266
  hideOnMobile: !0,
245
- render: (e) => e.grade == null ? /* @__PURE__ */ _("span", {
267
+ render: (e) => e.grade == null ? /* @__PURE__ */ v("span", {
246
268
  className: "text-text-tertiary",
247
269
  children: "—"
248
- }) : /* @__PURE__ */ _("span", {
270
+ }) : /* @__PURE__ */ v("span", {
249
271
  className: "tabular-nums text-text-secondary",
250
- children: ee(e.grade)
272
+ children: te(e.grade)
251
273
  })
252
274
  },
253
275
  {
@@ -256,19 +278,19 @@ function N() {
256
278
  align: "right",
257
279
  hideOnMobile: !0,
258
280
  sortValue: (e) => e.downtimeHours,
259
- render: (e) => /* @__PURE__ */ v("span", {
281
+ render: (e) => /* @__PURE__ */ y("span", {
260
282
  className: "tabular-nums text-text-secondary",
261
- children: [ee(e.downtimeHours), " h"]
283
+ children: [te(e.downtimeHours), " h"]
262
284
  })
263
285
  },
264
286
  {
265
287
  key: "notes",
266
288
  header: "Notes",
267
289
  hideOnMobile: !0,
268
- render: (e) => e.notes ? /* @__PURE__ */ _("span", {
290
+ render: (e) => e.notes ? /* @__PURE__ */ v("span", {
269
291
  className: "block max-w-[16rem] truncate text-text-secondary",
270
292
  children: e.notes
271
- }) : /* @__PURE__ */ _("span", {
293
+ }) : /* @__PURE__ */ v("span", {
272
294
  className: "text-text-tertiary",
273
295
  children: "—"
274
296
  })
@@ -278,23 +300,23 @@ function N() {
278
300
  header: "Recorded",
279
301
  align: "right",
280
302
  hideOnMobile: !0,
281
- render: (e) => /* @__PURE__ */ _("span", {
303
+ render: (e) => /* @__PURE__ */ v("span", {
282
304
  className: "text-text-tertiary",
283
- children: s(e.createdAt)
305
+ children: o(e.createdAt)
284
306
  })
285
307
  }
286
- ], at = [
308
+ ], vt = [
287
309
  {
288
310
  key: "category",
289
311
  header: "Category",
290
- render: (e) => /* @__PURE__ */ _(u, { status: e.category })
312
+ render: (e) => /* @__PURE__ */ v(l, { status: e.category })
291
313
  },
292
314
  {
293
315
  key: "asOf",
294
316
  header: "As of",
295
- render: (e) => /* @__PURE__ */ _("span", {
317
+ render: (e) => /* @__PURE__ */ v("span", {
296
318
  className: "text-text-secondary",
297
- children: i(e.asOfDate)
319
+ children: r(e.asOfDate)
298
320
  })
299
321
  },
300
322
  {
@@ -302,9 +324,9 @@ function N() {
302
324
  header: "Recoverable",
303
325
  align: "right",
304
326
  sortValue: (e) => e.recoverable,
305
- render: (e) => /* @__PURE__ */ _("span", {
327
+ render: (e) => /* @__PURE__ */ v("span", {
306
328
  className: "tabular-nums font-medium text-text-primary",
307
- children: c(e.recoverable, e.unit)
329
+ children: s(e.recoverable, e.unit)
308
330
  })
309
331
  },
310
332
  {
@@ -312,22 +334,22 @@ function N() {
312
334
  header: "Recovery factor",
313
335
  align: "right",
314
336
  hideOnMobile: !0,
315
- render: (e) => e.recoveryFactor == null ? /* @__PURE__ */ _("span", {
337
+ render: (e) => e.recoveryFactor == null ? /* @__PURE__ */ v("span", {
316
338
  className: "text-text-tertiary",
317
339
  children: "—"
318
- }) : /* @__PURE__ */ _("span", {
340
+ }) : /* @__PURE__ */ v("span", {
319
341
  className: "tabular-nums text-text-secondary",
320
- children: o(e.recoveryFactor)
342
+ children: a(e.recoveryFactor)
321
343
  })
322
344
  },
323
345
  {
324
346
  key: "methodology",
325
347
  header: "Methodology",
326
348
  hideOnMobile: !0,
327
- render: (e) => e.methodology ? /* @__PURE__ */ _("span", {
349
+ render: (e) => e.methodology ? /* @__PURE__ */ v("span", {
328
350
  className: "block max-w-[14rem] truncate text-text-secondary",
329
351
  children: e.methodology
330
- }) : /* @__PURE__ */ _("span", {
352
+ }) : /* @__PURE__ */ v("span", {
331
353
  className: "text-text-tertiary",
332
354
  children: "—"
333
355
  })
@@ -337,37 +359,37 @@ function N() {
337
359
  header: "Added",
338
360
  align: "right",
339
361
  hideOnMobile: !0,
340
- render: (e) => /* @__PURE__ */ _("span", {
362
+ render: (e) => /* @__PURE__ */ v("span", {
341
363
  className: "text-text-tertiary",
342
- children: s(e.createdAt)
364
+ children: o(e.createdAt)
343
365
  })
344
366
  }
345
- ], ot = [
367
+ ], yt = [
346
368
  {
347
369
  key: "scope",
348
370
  header: "Scope",
349
- render: (e) => /* @__PURE__ */ _(u, { status: e.scope })
371
+ render: (e) => /* @__PURE__ */ v(l, { status: e.scope })
350
372
  },
351
373
  {
352
374
  key: "co2e",
353
375
  header: "CO₂e",
354
376
  align: "right",
355
377
  sortValue: (e) => e.co2eTonnes,
356
- render: (e) => /* @__PURE__ */ _("span", {
378
+ render: (e) => /* @__PURE__ */ v("span", {
357
379
  className: "tabular-nums font-medium text-text-primary",
358
- children: te(e.co2eTonnes)
380
+ children: ne(e.co2eTonnes)
359
381
  })
360
382
  },
361
383
  {
362
384
  key: "period",
363
385
  header: "Period",
364
386
  hideOnMobile: !0,
365
- render: (e) => /* @__PURE__ */ v("span", {
387
+ render: (e) => /* @__PURE__ */ y("span", {
366
388
  className: "text-text-secondary",
367
389
  children: [
368
- i(e.periodStart),
390
+ r(e.periodStart),
369
391
  " – ",
370
- i(e.periodEnd)
392
+ r(e.periodEnd)
371
393
  ]
372
394
  })
373
395
  },
@@ -375,7 +397,7 @@ function N() {
375
397
  key: "source",
376
398
  header: "Source",
377
399
  hideOnMobile: !0,
378
- render: (e) => /* @__PURE__ */ _("span", {
400
+ render: (e) => /* @__PURE__ */ v("span", {
379
401
  className: "text-text-secondary",
380
402
  children: e.source ?? "—"
381
403
  })
@@ -383,10 +405,10 @@ function N() {
383
405
  {
384
406
  key: "verified",
385
407
  header: "Verified",
386
- render: (e) => e.verified ? /* @__PURE__ */ _("span", {
408
+ render: (e) => e.verified ? /* @__PURE__ */ v("span", {
387
409
  className: "text-sm font-medium text-status-success-text",
388
410
  children: "Verified"
389
- }) : /* @__PURE__ */ _("span", {
411
+ }) : /* @__PURE__ */ v("span", {
390
412
  className: "text-sm text-text-tertiary",
391
413
  children: "Unverified"
392
414
  })
@@ -396,579 +418,594 @@ function N() {
396
418
  header: "Recorded",
397
419
  align: "right",
398
420
  hideOnMobile: !0,
399
- render: (e) => /* @__PURE__ */ _("span", {
421
+ render: (e) => /* @__PURE__ */ v("span", {
400
422
  className: "text-text-tertiary",
401
- children: s(e.createdAt)
423
+ children: o(e.createdAt)
402
424
  })
403
425
  }
404
- ], st = [
426
+ ], bt = [
405
427
  {
406
428
  value: "production",
407
429
  label: "Production",
408
- icon: /* @__PURE__ */ _(_e, { className: "h-4 w-4" }),
409
- count: Y.length
430
+ icon: /* @__PURE__ */ v(Ce, { className: "h-4 w-4" }),
431
+ count: Z.length
410
432
  },
411
433
  {
412
434
  value: "reserves",
413
435
  label: "Reserves",
414
- icon: /* @__PURE__ */ _(we, { className: "h-4 w-4" }),
415
- count: X.length
436
+ icon: /* @__PURE__ */ v(Ae, { className: "h-4 w-4" }),
437
+ count: Q.length
416
438
  },
417
439
  {
418
440
  value: "emissions",
419
441
  label: "Emissions",
420
- icon: /* @__PURE__ */ _(xe, { className: "h-4 w-4" }),
421
- count: Z.length
442
+ icon: /* @__PURE__ */ v(De, { className: "h-4 w-4" }),
443
+ count: ot.length
422
444
  },
423
445
  {
424
446
  value: "tags",
425
447
  label: "Tags",
426
- icon: /* @__PURE__ */ _(Oe, { className: "h-4 w-4" })
448
+ icon: /* @__PURE__ */ v(Pe, { className: "h-4 w-4" })
427
449
  },
428
450
  {
429
451
  value: "discussion",
430
452
  label: "Discussion",
431
- icon: /* @__PURE__ */ _(Ee, { className: "h-4 w-4" })
453
+ icon: /* @__PURE__ */ v(Me, { className: "h-4 w-4" })
432
454
  }
433
455
  ];
434
- return /* @__PURE__ */ v(t, {
435
- title: I.name,
436
- description: [I.code, a(I.kind)].filter(Boolean).join(" · "),
437
- actions: /* @__PURE__ */ v(Ae, { children: [
438
- /* @__PURE__ */ _(u, { status: I.status }),
439
- !Ye && Xe.length > 0 && /* @__PURE__ */ v(E, {
440
- value: I.status,
441
- onValueChange: (e) => et(e),
442
- children: [/* @__PURE__ */ _(k, {
456
+ return /* @__PURE__ */ y(t, {
457
+ title: F.name,
458
+ description: [F.code, i(F.kind)].filter(Boolean).join(" · "),
459
+ dataTour: "theglobalfuel-asset-detail-page",
460
+ actions: /* @__PURE__ */ y(_, { children: [
461
+ /* @__PURE__ */ v(l, { status: F.status }),
462
+ !st && ct.length > 0 && /* @__PURE__ */ y(w, {
463
+ value: F.status,
464
+ onValueChange: (e) => pt(e),
465
+ children: [/* @__PURE__ */ v(D, {
443
466
  className: "h-9 w-44",
444
467
  "aria-label": "Change asset status",
445
- children: /* @__PURE__ */ _(A, { placeholder: "Change status" })
446
- }), /* @__PURE__ */ v(D, { children: [/* @__PURE__ */ _(O, {
447
- value: I.status,
468
+ children: /* @__PURE__ */ v(O, { placeholder: "Change status" })
469
+ }), /* @__PURE__ */ y(T, { children: [/* @__PURE__ */ v(E, {
470
+ value: F.status,
448
471
  disabled: !0,
449
- children: a(I.status)
450
- }), Xe.map((e) => /* @__PURE__ */ _(O, {
472
+ children: i(F.status)
473
+ }), ct.map((e) => /* @__PURE__ */ v(E, {
451
474
  value: e,
452
- children: a(e)
475
+ children: i(e)
453
476
  }, e))] })]
454
477
  }),
455
- !Ye && /* @__PURE__ */ v(y, {
478
+ !st && /* @__PURE__ */ y(b, {
456
479
  variant: "ghost",
457
- onClick: tt,
458
- disabled: Ge.isPending,
480
+ onClick: mt,
481
+ disabled: tt.isPending,
459
482
  className: "text-status-error-text hover:text-status-error-text",
460
- children: [/* @__PURE__ */ _(ve, { className: "mr-1.5 h-4 w-4" }), " Retire"]
483
+ children: [/* @__PURE__ */ v(we, { className: "mr-1.5 h-4 w-4" }), " Retire"]
461
484
  }),
462
- /* @__PURE__ */ v(y, {
485
+ /* @__PURE__ */ y(b, {
463
486
  variant: "ghost",
464
- onClick: () => P("assets"),
465
- children: [/* @__PURE__ */ _(ye, { className: "mr-1.5 h-4 w-4" }), " Back"]
487
+ onClick: () => N("assets"),
488
+ children: [/* @__PURE__ */ v(Te, { className: "mr-1.5 h-4 w-4" }), " Back"]
466
489
  })
467
490
  ] }),
468
491
  children: [
469
- /* @__PURE__ */ v("div", {
492
+ /* @__PURE__ */ y("div", {
470
493
  className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-5",
471
494
  children: [
472
- /* @__PURE__ */ _(n, {
473
- icon: /* @__PURE__ */ _(Ce, { className: "h-5 w-5" }),
474
- value: I.capacityPerDay > 0 ? `${c(I.capacityPerDay, I.capacityUnit)}/day` : "—",
495
+ /* @__PURE__ */ v(n, {
496
+ icon: /* @__PURE__ */ v(ke, { className: "h-5 w-5" }),
497
+ value: F.capacityPerDay > 0 ? `${s(F.capacityPerDay, F.capacityUnit)}/day` : "—",
475
498
  label: "Capacity"
476
499
  }),
477
- /* @__PURE__ */ _(n, {
478
- icon: /* @__PURE__ */ _(De, { className: "h-5 w-5" }),
479
- value: o(I.workingInterestPct),
500
+ /* @__PURE__ */ v(n, {
501
+ icon: /* @__PURE__ */ v(Ne, { className: "h-5 w-5" }),
502
+ value: a(F.workingInterestPct),
480
503
  label: "Working interest"
481
504
  }),
482
- /* @__PURE__ */ _(n, {
483
- icon: /* @__PURE__ */ _(Se, { className: "h-5 w-5" }),
484
- value: a(I.commodity),
505
+ /* @__PURE__ */ v(n, {
506
+ icon: /* @__PURE__ */ v(Oe, { className: "h-5 w-5" }),
507
+ value: i(F.commodity),
485
508
  label: "Commodity"
486
509
  }),
487
- /* @__PURE__ */ _(n, {
488
- icon: /* @__PURE__ */ _(be, { className: "h-5 w-5" }),
489
- value: i(I.commissionedAt),
510
+ /* @__PURE__ */ v(n, {
511
+ icon: /* @__PURE__ */ v(Ee, { className: "h-5 w-5" }),
512
+ value: r(F.commissionedAt),
490
513
  label: "Commissioned"
491
514
  }),
492
- /* @__PURE__ */ _(n, {
493
- icon: /* @__PURE__ */ _(Te, { className: "h-5 w-5" }),
494
- value: r(I.latitude, I.longitude),
515
+ /* @__PURE__ */ v(n, {
516
+ icon: /* @__PURE__ */ v(je, { className: "h-5 w-5" }),
517
+ value: ee(F.latitude, F.longitude),
495
518
  label: "Location",
496
- footer: I.location ? /* @__PURE__ */ _("p", {
519
+ footer: F.location ? /* @__PURE__ */ v("p", {
497
520
  className: "truncate text-xs text-text-tertiary",
498
- children: I.location
521
+ children: F.location
499
522
  }) : void 0
500
523
  })
501
524
  ]
502
525
  }),
503
- /* @__PURE__ */ v("div", {
526
+ /* @__PURE__ */ y("div", {
504
527
  className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
505
- children: [/* @__PURE__ */ v(b, {
528
+ children: [/* @__PURE__ */ y(x, {
506
529
  treatment: "glass",
507
530
  className: "p-6 lg:col-span-2",
508
- children: [/* @__PURE__ */ _("h2", {
531
+ children: [/* @__PURE__ */ v("h2", {
509
532
  className: "mb-2 text-base font-semibold text-text-primary",
510
533
  children: "Asset details"
511
- }), /* @__PURE__ */ v("dl", {
534
+ }), /* @__PURE__ */ y("dl", {
512
535
  className: "grid grid-cols-1 gap-x-8 sm:grid-cols-2",
513
536
  children: [
514
- /* @__PURE__ */ _(M, {
537
+ /* @__PURE__ */ v(j, {
515
538
  label: "Asset code",
516
- value: I.code || "—"
539
+ value: F.code || "—"
517
540
  }),
518
- /* @__PURE__ */ _(M, {
541
+ /* @__PURE__ */ v(j, {
519
542
  label: "Kind",
520
- value: a(I.kind)
543
+ value: i(F.kind)
521
544
  }),
522
- /* @__PURE__ */ _(M, {
545
+ /* @__PURE__ */ v(j, {
523
546
  label: "Commodity",
524
- value: a(I.commodity)
547
+ value: i(F.commodity)
525
548
  }),
526
- /* @__PURE__ */ _(M, {
549
+ /* @__PURE__ */ v(j, {
527
550
  label: "Status",
528
- value: /* @__PURE__ */ _(u, { status: I.status })
551
+ value: /* @__PURE__ */ v(l, { status: F.status })
529
552
  }),
530
- /* @__PURE__ */ _(M, {
553
+ /* @__PURE__ */ v(j, {
531
554
  label: "Capacity / day",
532
- value: I.capacityPerDay > 0 ? `${c(I.capacityPerDay, I.capacityUnit)}/day` : "—"
555
+ value: F.capacityPerDay > 0 ? `${s(F.capacityPerDay, F.capacityUnit)}/day` : "—"
533
556
  }),
534
- /* @__PURE__ */ _(M, {
557
+ /* @__PURE__ */ v(j, {
535
558
  label: "Working interest",
536
- value: o(I.workingInterestPct)
559
+ value: a(F.workingInterestPct)
537
560
  }),
538
- /* @__PURE__ */ _(M, {
561
+ /* @__PURE__ */ v(j, {
539
562
  label: "Operator lead",
540
- value: I.operatorLeadId ? /* @__PURE__ */ _("span", {
563
+ value: F.operatorLeadId ? /* @__PURE__ */ v("span", {
541
564
  className: "font-mono text-xs",
542
- title: I.operatorLeadId,
543
- children: I.operatorLeadId
565
+ title: F.operatorLeadId,
566
+ children: F.operatorLeadId
544
567
  }) : "—"
545
568
  }),
546
- /* @__PURE__ */ _(M, {
569
+ /* @__PURE__ */ v(j, {
547
570
  label: "Location",
548
- value: I.location || "—"
571
+ value: F.location || "—"
549
572
  }),
550
- /* @__PURE__ */ _(M, {
573
+ /* @__PURE__ */ v(j, {
551
574
  label: "Coordinates",
552
- value: r(I.latitude, I.longitude)
575
+ value: ee(F.latitude, F.longitude)
553
576
  }),
554
- /* @__PURE__ */ _(M, {
577
+ /* @__PURE__ */ v(j, {
555
578
  label: "Commissioned",
556
- value: i(I.commissionedAt)
579
+ value: r(F.commissionedAt)
557
580
  }),
558
- /* @__PURE__ */ _(M, {
581
+ /* @__PURE__ */ v(j, {
559
582
  label: "Decommissioned",
560
- value: i(I.decommissionedAt)
583
+ value: r(F.decommissionedAt)
561
584
  }),
562
- /* @__PURE__ */ _(M, {
585
+ /* @__PURE__ */ v(j, {
563
586
  label: "Registered",
564
- value: /* @__PURE__ */ _("span", {
565
- title: i(I.createdAt),
566
- children: s(I.createdAt)
587
+ value: /* @__PURE__ */ v("span", {
588
+ title: r(F.createdAt),
589
+ children: o(F.createdAt)
567
590
  })
568
591
  }),
569
- /* @__PURE__ */ _(M, {
592
+ /* @__PURE__ */ v(j, {
570
593
  label: "Last updated",
571
- value: /* @__PURE__ */ _("span", {
572
- title: i(I.updatedAt),
573
- children: s(I.updatedAt)
594
+ value: /* @__PURE__ */ v("span", {
595
+ title: r(F.updatedAt),
596
+ children: o(F.updatedAt)
574
597
  })
575
598
  })
576
599
  ]
577
600
  })]
578
- }), /* @__PURE__ */ v(b, {
601
+ }), /* @__PURE__ */ y(x, {
579
602
  treatment: "glass",
580
603
  className: "flex flex-col gap-3 p-6",
581
604
  children: [
582
- /* @__PURE__ */ v("div", {
605
+ /* @__PURE__ */ y("div", {
583
606
  className: "flex items-center gap-2",
584
- children: [/* @__PURE__ */ _(Te, { className: "h-4 w-4 text-accent" }), /* @__PURE__ */ _("h2", {
607
+ children: [/* @__PURE__ */ v(je, { className: "h-4 w-4 text-accent" }), /* @__PURE__ */ v("h2", {
585
608
  className: "text-base font-semibold text-text-primary",
586
609
  children: "Location"
587
610
  })]
588
611
  }),
589
- Ze ? /* @__PURE__ */ _(ge, { points: [Ze] }) : /* @__PURE__ */ _("div", {
612
+ lt ? /* @__PURE__ */ v(Se, { points: [lt] }) : /* @__PURE__ */ v("div", {
590
613
  className: "flex flex-1 items-center justify-center rounded-xl border border-dashed border-border-seam py-10 text-center text-sm text-text-secondary",
591
614
  children: "No coordinates recorded for this asset."
592
615
  }),
593
- I.location && /* @__PURE__ */ _("p", {
616
+ F.location && /* @__PURE__ */ v("p", {
594
617
  className: "text-xs text-text-tertiary",
595
- children: I.location
618
+ children: F.location
596
619
  })
597
620
  ]
598
621
  })]
599
622
  }),
600
- V && /* @__PURE__ */ _("p", {
623
+ W && /* @__PURE__ */ v("p", {
601
624
  className: "mt-4 text-sm text-status-error-text",
602
- children: V
625
+ children: W
603
626
  }),
604
- /* @__PURE__ */ _("div", {
627
+ /* @__PURE__ */ v("div", {
605
628
  className: "mt-6",
606
- children: /* @__PURE__ */ _(pe, {
607
- items: st,
608
- value: B,
609
- onChange: Ke
629
+ children: /* @__PURE__ */ v(ve, {
630
+ items: bt,
631
+ value: U,
632
+ onChange: nt
610
633
  })
611
634
  }),
612
- B === "production" && /* @__PURE__ */ _(p, {
635
+ U === "production" && /* @__PURE__ */ v(p, {
613
636
  title: "Production",
614
637
  description: "Volumes produced per reporting period, with grade & downtime.",
615
- action: /* @__PURE__ */ v(y, {
638
+ action: /* @__PURE__ */ y(b, {
616
639
  size: "sm",
617
- onClick: Qe,
618
- "data-rybbit-event": "theglobalfuel.production.record_clicked",
619
- children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " Record production"]
640
+ onClick: ut,
641
+ children: [/* @__PURE__ */ v(g, { className: "mr-1.5 h-4 w-4" }), " Record production"]
620
642
  }),
621
- children: Y.length === 0 ? /* @__PURE__ */ _(m, {
643
+ children: z.isLoading ? /* @__PURE__ */ v(f, { label: "Loading production…" }) : z.isError ? /* @__PURE__ */ v(d, {
644
+ message: "Couldn't load production records.",
645
+ onRetry: () => z.refetch()
646
+ }) : Z.length === 0 ? /* @__PURE__ */ v(m, {
622
647
  illustration: "empty-data",
623
- icon: /* @__PURE__ */ _(_e, { className: "h-10 w-10" }),
648
+ icon: /* @__PURE__ */ v(Ce, { className: "h-10 w-10" }),
624
649
  title: "No production recorded",
625
650
  description: "Record a production period to start tracking volumes for this asset.",
626
- action: /* @__PURE__ */ v(y, {
627
- onClick: Qe,
628
- "data-rybbit-event": "theglobalfuel.production.record_clicked",
629
- children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " Record production"]
651
+ action: /* @__PURE__ */ y(b, {
652
+ onClick: ut,
653
+ children: [/* @__PURE__ */ v(g, { className: "mr-1.5 h-4 w-4" }), " Record production"]
630
654
  })
631
- }) : /* @__PURE__ */ _(d, {
632
- columns: it,
633
- rows: Y,
655
+ }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(u, {
656
+ columns: _t,
657
+ rows: Z,
634
658
  rowKey: (e) => e.id,
635
659
  defaultSort: {
636
660
  key: "period",
637
661
  dir: "desc"
638
662
  }
639
- })
663
+ }), /* @__PURE__ */ v(ye, {
664
+ page: L.page,
665
+ pageSize: k,
666
+ itemCount: Z.length,
667
+ hasMore: z.data?.pageInfo?.hasMore ?? !1,
668
+ onPageChange: L.onPageChange
669
+ })] })
640
670
  }),
641
- B === "reserves" && /* @__PURE__ */ _(p, {
671
+ U === "reserves" && /* @__PURE__ */ v(p, {
642
672
  title: "Reserve estimates",
643
673
  description: "Recoverable volumes by SPE-PRMS reserve category & as-of date.",
644
- action: /* @__PURE__ */ v(y, {
674
+ action: /* @__PURE__ */ y(b, {
645
675
  size: "sm",
646
- onClick: $e,
647
- "data-rybbit-event": "theglobalfuel.reserve.create_clicked",
648
- children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " Add reserve estimate"]
676
+ onClick: dt,
677
+ children: [/* @__PURE__ */ v(g, { className: "mr-1.5 h-4 w-4" }), " Add reserve estimate"]
649
678
  }),
650
- children: X.length === 0 ? /* @__PURE__ */ _(m, {
679
+ children: B.isLoading ? /* @__PURE__ */ v(f, { label: "Loading reserve estimates…" }) : B.isError ? /* @__PURE__ */ v(d, {
680
+ message: "Couldn't load reserve estimates.",
681
+ onRetry: () => B.refetch()
682
+ }) : Q.length === 0 ? /* @__PURE__ */ v(m, {
651
683
  illustration: "empty-data",
652
- icon: /* @__PURE__ */ _(we, { className: "h-10 w-10" }),
684
+ icon: /* @__PURE__ */ v(Ae, { className: "h-10 w-10" }),
653
685
  title: "No reserve estimates",
654
686
  description: "Add a reserve estimate to record recoverable volumes for this asset.",
655
- action: /* @__PURE__ */ v(y, {
656
- onClick: $e,
657
- "data-rybbit-event": "theglobalfuel.reserve.create_clicked",
658
- children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " Add reserve estimate"]
687
+ action: /* @__PURE__ */ y(b, {
688
+ onClick: dt,
689
+ children: [/* @__PURE__ */ v(g, { className: "mr-1.5 h-4 w-4" }), " Add reserve estimate"]
659
690
  })
660
- }) : /* @__PURE__ */ _(d, {
661
- columns: at,
662
- rows: X,
691
+ }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(u, {
692
+ columns: vt,
693
+ rows: Q,
663
694
  rowKey: (e) => e.id
664
- })
695
+ }), /* @__PURE__ */ v(ye, {
696
+ page: R.page,
697
+ pageSize: k,
698
+ itemCount: Q.length,
699
+ hasMore: B.data?.pageInfo?.hasMore ?? !1,
700
+ onPageChange: R.onPageChange
701
+ })] })
665
702
  }),
666
- B === "emissions" && /* @__PURE__ */ _(p, {
703
+ U === "emissions" && /* @__PURE__ */ v(p, {
667
704
  title: "Emissions",
668
705
  description: "GHG emission records attributed to this asset (Scope 1 / 2 / 3).",
669
- children: L.isLoading ? /* @__PURE__ */ _(ne, { label: "Loading emissions…" }) : L.isError ? /* @__PURE__ */ _(f, {
706
+ children: I.isLoading ? /* @__PURE__ */ v(f, { label: "Loading emissions…" }) : I.isError ? /* @__PURE__ */ v(d, {
670
707
  message: "Couldn't load emission records.",
671
- onRetry: () => L.refetch()
672
- }) : Z.length === 0 ? /* @__PURE__ */ _(m, {
708
+ onRetry: () => I.refetch()
709
+ }) : ot.length === 0 ? /* @__PURE__ */ v(m, {
673
710
  illustration: "empty-data",
674
- icon: /* @__PURE__ */ _(xe, { className: "h-10 w-10" }),
711
+ icon: /* @__PURE__ */ v(De, { className: "h-10 w-10" }),
675
712
  title: "No emissions recorded",
676
713
  description: "Emission records attributed to this asset will appear here."
677
- }) : /* @__PURE__ */ _(d, {
678
- columns: ot,
679
- rows: Z,
714
+ }) : /* @__PURE__ */ v(u, {
715
+ columns: yt,
716
+ rows: ot,
680
717
  rowKey: (e) => e.id
681
718
  })
682
719
  }),
683
- B === "tags" && /* @__PURE__ */ _(p, {
720
+ U === "tags" && /* @__PURE__ */ v(p, {
684
721
  title: "Tags",
685
722
  description: "Label this asset for search, grouping & reporting.",
686
- children: /* @__PURE__ */ _(b, {
723
+ children: /* @__PURE__ */ v(x, {
687
724
  treatment: "glass",
688
725
  className: "p-6",
689
- children: /* @__PURE__ */ _(he, {
726
+ children: /* @__PURE__ */ v(xe, {
690
727
  entityType: "theglobalfuel-asset",
691
- entityId: I.id
728
+ entityId: F.id
692
729
  })
693
730
  })
694
731
  }),
695
- B === "discussion" && /* @__PURE__ */ _("div", {
732
+ U === "discussion" && /* @__PURE__ */ v("div", {
696
733
  className: "mt-8",
697
- children: /* @__PURE__ */ _(me, {
734
+ children: /* @__PURE__ */ v(be, {
698
735
  entityType: "theglobalfuel-asset",
699
- entityId: I.id,
736
+ entityId: F.id,
700
737
  title: "Discussion",
701
738
  description: "Notes & coordination for this asset."
702
739
  })
703
740
  }),
704
- /* @__PURE__ */ _(C, {
705
- open: qe,
706
- onOpenChange: (e) => e ? U(!0) : Q(),
707
- children: /* @__PURE__ */ v(w, { children: [
708
- /* @__PURE__ */ v(Me, { children: [/* @__PURE__ */ _(Ne, { children: "Record production" }), /* @__PURE__ */ v(T, { children: [
741
+ /* @__PURE__ */ v(Ie, {
742
+ open: rt,
743
+ onOpenChange: (e) => e ? K(!0) : ft(),
744
+ children: /* @__PURE__ */ y(Le, { children: [
745
+ /* @__PURE__ */ y(Be, { children: [/* @__PURE__ */ v(Ve, { children: "Record production" }), /* @__PURE__ */ y(Re, { children: [
709
746
  "Log a production period for ",
710
- I.name,
747
+ F.name,
711
748
  "."
712
749
  ] })] }),
713
- /* @__PURE__ */ v("form", {
750
+ /* @__PURE__ */ y("form", {
714
751
  id: "recordProductionForm",
715
752
  onSubmit: (e) => {
716
- e.preventDefault(), nt();
753
+ e.preventDefault(), ht();
717
754
  },
718
755
  className: "grid gap-4 py-2",
719
756
  children: [
720
- /* @__PURE__ */ v("div", {
757
+ /* @__PURE__ */ y("div", {
721
758
  className: "grid gap-2 sm:grid-cols-2",
722
- children: [/* @__PURE__ */ v("div", {
759
+ children: [/* @__PURE__ */ y("div", {
723
760
  className: "grid gap-1.5",
724
- children: [/* @__PURE__ */ _(S, {
761
+ children: [/* @__PURE__ */ v(C, {
725
762
  htmlFor: "prodStart",
726
763
  children: "Period start *"
727
- }), /* @__PURE__ */ _(x, {
764
+ }), /* @__PURE__ */ v(S, {
728
765
  id: "prodStart",
729
766
  type: "date",
730
- value: W.periodStart,
731
- onChange: (e) => G({
732
- ...W,
767
+ value: q.periodStart,
768
+ onChange: (e) => J({
769
+ ...q,
733
770
  periodStart: e.target.value
734
771
  })
735
772
  })]
736
- }), /* @__PURE__ */ v("div", {
773
+ }), /* @__PURE__ */ y("div", {
737
774
  className: "grid gap-1.5",
738
- children: [/* @__PURE__ */ _(S, {
775
+ children: [/* @__PURE__ */ v(C, {
739
776
  htmlFor: "prodEnd",
740
777
  children: "Period end *"
741
- }), /* @__PURE__ */ _(x, {
778
+ }), /* @__PURE__ */ v(S, {
742
779
  id: "prodEnd",
743
780
  type: "date",
744
- value: W.periodEnd,
745
- onChange: (e) => G({
746
- ...W,
781
+ value: q.periodEnd,
782
+ onChange: (e) => J({
783
+ ...q,
747
784
  periodEnd: e.target.value
748
785
  })
749
786
  })]
750
787
  })]
751
788
  }),
752
- /* @__PURE__ */ v("div", {
789
+ /* @__PURE__ */ y("div", {
753
790
  className: "grid gap-2 sm:grid-cols-2",
754
- children: [/* @__PURE__ */ v("div", {
791
+ children: [/* @__PURE__ */ y("div", {
755
792
  className: "grid gap-1.5",
756
- children: [/* @__PURE__ */ _(S, {
793
+ children: [/* @__PURE__ */ v(C, {
757
794
  htmlFor: "prodVolume",
758
795
  children: "Volume *"
759
- }), /* @__PURE__ */ _(x, {
796
+ }), /* @__PURE__ */ v(S, {
760
797
  id: "prodVolume",
761
798
  type: "number",
762
799
  min: "0",
763
800
  step: "any",
764
- value: W.volume,
765
- onChange: (e) => G({
766
- ...W,
801
+ value: q.volume,
802
+ onChange: (e) => J({
803
+ ...q,
767
804
  volume: e.target.value
768
805
  }),
769
806
  placeholder: "118500"
770
807
  })]
771
- }), /* @__PURE__ */ v("div", {
808
+ }), /* @__PURE__ */ y("div", {
772
809
  className: "grid gap-1.5",
773
- children: [/* @__PURE__ */ _(S, {
810
+ children: [/* @__PURE__ */ v(C, {
774
811
  htmlFor: "prodUnit",
775
812
  children: "Unit"
776
- }), /* @__PURE__ */ v(E, {
777
- value: W.unit,
778
- onValueChange: (e) => G({
779
- ...W,
813
+ }), /* @__PURE__ */ y(w, {
814
+ value: q.unit,
815
+ onValueChange: (e) => J({
816
+ ...q,
780
817
  unit: e
781
818
  }),
782
- children: [/* @__PURE__ */ _(k, {
819
+ children: [/* @__PURE__ */ v(D, {
783
820
  id: "prodUnit",
784
- children: /* @__PURE__ */ _(A, {})
785
- }), /* @__PURE__ */ _(D, { children: Fe.map((e) => /* @__PURE__ */ _(O, {
821
+ children: /* @__PURE__ */ v(O, {})
822
+ }), /* @__PURE__ */ v(T, { children: Ue.map((e) => /* @__PURE__ */ v(E, {
786
823
  value: e,
787
- children: a(e)
824
+ children: i(e)
788
825
  }, e)) })]
789
826
  })]
790
827
  })]
791
828
  }),
792
- /* @__PURE__ */ v("div", {
829
+ /* @__PURE__ */ y("div", {
793
830
  className: "grid gap-2 sm:grid-cols-2",
794
- children: [/* @__PURE__ */ v("div", {
831
+ children: [/* @__PURE__ */ y("div", {
795
832
  className: "grid gap-1.5",
796
- children: [/* @__PURE__ */ _(S, {
833
+ children: [/* @__PURE__ */ v(C, {
797
834
  htmlFor: "prodGrade",
798
835
  children: "Grade"
799
- }), /* @__PURE__ */ _(x, {
836
+ }), /* @__PURE__ */ v(S, {
800
837
  id: "prodGrade",
801
838
  type: "number",
802
839
  step: "any",
803
- value: W.grade,
804
- onChange: (e) => G({
805
- ...W,
840
+ value: q.grade,
841
+ onChange: (e) => J({
842
+ ...q,
806
843
  grade: e.target.value
807
844
  }),
808
845
  placeholder: "Optional (e.g. API / assay)"
809
846
  })]
810
- }), /* @__PURE__ */ v("div", {
847
+ }), /* @__PURE__ */ y("div", {
811
848
  className: "grid gap-1.5",
812
- children: [/* @__PURE__ */ _(S, {
849
+ children: [/* @__PURE__ */ v(C, {
813
850
  htmlFor: "prodDowntime",
814
851
  children: "Downtime (hours)"
815
- }), /* @__PURE__ */ _(x, {
852
+ }), /* @__PURE__ */ v(S, {
816
853
  id: "prodDowntime",
817
854
  type: "number",
818
855
  min: "0",
819
856
  step: "any",
820
- value: W.downtimeHours,
821
- onChange: (e) => G({
822
- ...W,
857
+ value: q.downtimeHours,
858
+ onChange: (e) => J({
859
+ ...q,
823
860
  downtimeHours: e.target.value
824
861
  }),
825
862
  placeholder: "0"
826
863
  })]
827
864
  })]
828
865
  }),
829
- /* @__PURE__ */ v("div", {
866
+ /* @__PURE__ */ y("div", {
830
867
  className: "grid gap-1.5",
831
- children: [/* @__PURE__ */ _(S, {
868
+ children: [/* @__PURE__ */ v(C, {
832
869
  htmlFor: "prodNotes",
833
870
  children: "Notes"
834
- }), /* @__PURE__ */ _(Pe, {
871
+ }), /* @__PURE__ */ v(He, {
835
872
  id: "prodNotes",
836
873
  rows: 2,
837
- value: W.notes,
838
- onChange: (e) => G({
839
- ...W,
874
+ value: q.notes,
875
+ onChange: (e) => J({
876
+ ...q,
840
877
  notes: e.target.value
841
878
  }),
842
879
  placeholder: "Optional context about this period."
843
880
  })]
844
881
  }),
845
- V && qe && /* @__PURE__ */ _("p", {
882
+ W && rt && /* @__PURE__ */ v("p", {
846
883
  className: "text-sm text-status-error-text",
847
- children: V
884
+ children: W
848
885
  })
849
886
  ]
850
887
  }),
851
- /* @__PURE__ */ v(je, { children: [/* @__PURE__ */ _(y, {
888
+ /* @__PURE__ */ y(ze, { children: [/* @__PURE__ */ v(b, {
852
889
  variant: "outline",
853
890
  type: "button",
854
- onClick: Q,
891
+ onClick: ft,
855
892
  children: "Cancel"
856
- }), /* @__PURE__ */ _(y, {
893
+ }), /* @__PURE__ */ v(b, {
857
894
  type: "submit",
858
895
  form: "recordProductionForm",
859
- disabled: R.isPending,
860
- children: R.isPending ? "Recording…" : "Record production"
896
+ disabled: V.isPending,
897
+ children: V.isPending ? "Recording…" : "Record production"
861
898
  })] })
862
899
  ] })
863
900
  }),
864
- /* @__PURE__ */ _(C, {
865
- open: Je,
866
- onOpenChange: (e) => e ? K(!0) : $(),
867
- children: /* @__PURE__ */ v(w, { children: [
868
- /* @__PURE__ */ v(Me, { children: [/* @__PURE__ */ _(Ne, { children: "Add reserve estimate" }), /* @__PURE__ */ v(T, { children: [
901
+ /* @__PURE__ */ v(Ie, {
902
+ open: it,
903
+ onOpenChange: (e) => e ? at(!0) : $(),
904
+ children: /* @__PURE__ */ y(Le, { children: [
905
+ /* @__PURE__ */ y(Be, { children: [/* @__PURE__ */ v(Ve, { children: "Add reserve estimate" }), /* @__PURE__ */ y(Re, { children: [
869
906
  "Record a recoverable-volume estimate for ",
870
- I.name,
907
+ F.name,
871
908
  "."
872
909
  ] })] }),
873
- /* @__PURE__ */ v("form", {
910
+ /* @__PURE__ */ y("form", {
874
911
  id: "reserveEstimateForm",
875
912
  onSubmit: (e) => {
876
- e.preventDefault(), rt();
913
+ e.preventDefault(), gt();
877
914
  },
878
915
  className: "grid gap-4 py-2",
879
916
  children: [
880
- /* @__PURE__ */ v("div", {
917
+ /* @__PURE__ */ y("div", {
881
918
  className: "grid gap-2 sm:grid-cols-2",
882
- children: [/* @__PURE__ */ v("div", {
919
+ children: [/* @__PURE__ */ y("div", {
883
920
  className: "grid gap-1.5",
884
- children: [/* @__PURE__ */ _(S, {
921
+ children: [/* @__PURE__ */ v(C, {
885
922
  htmlFor: "resCategory",
886
923
  children: "Category"
887
- }), /* @__PURE__ */ v(E, {
888
- value: q.category,
889
- onValueChange: (e) => J({
890
- ...q,
924
+ }), /* @__PURE__ */ y(w, {
925
+ value: Y.category,
926
+ onValueChange: (e) => X({
927
+ ...Y,
891
928
  category: e
892
929
  }),
893
- children: [/* @__PURE__ */ _(k, {
930
+ children: [/* @__PURE__ */ v(D, {
894
931
  id: "resCategory",
895
- children: /* @__PURE__ */ _(A, {})
896
- }), /* @__PURE__ */ _(D, { children: Ie.map((e) => /* @__PURE__ */ _(O, {
932
+ children: /* @__PURE__ */ v(O, {})
933
+ }), /* @__PURE__ */ v(T, { children: We.map((e) => /* @__PURE__ */ v(E, {
897
934
  value: e,
898
- children: a(e)
935
+ children: i(e)
899
936
  }, e)) })]
900
937
  })]
901
- }), /* @__PURE__ */ v("div", {
938
+ }), /* @__PURE__ */ y("div", {
902
939
  className: "grid gap-1.5",
903
- children: [/* @__PURE__ */ _(S, {
940
+ children: [/* @__PURE__ */ v(C, {
904
941
  htmlFor: "resAsOf",
905
942
  children: "As-of date *"
906
- }), /* @__PURE__ */ _(x, {
943
+ }), /* @__PURE__ */ v(S, {
907
944
  id: "resAsOf",
908
945
  type: "date",
909
- value: q.asOfDate,
910
- onChange: (e) => J({
911
- ...q,
946
+ value: Y.asOfDate,
947
+ onChange: (e) => X({
948
+ ...Y,
912
949
  asOfDate: e.target.value
913
950
  })
914
951
  })]
915
952
  })]
916
953
  }),
917
- /* @__PURE__ */ v("div", {
954
+ /* @__PURE__ */ y("div", {
918
955
  className: "grid gap-2 sm:grid-cols-3",
919
956
  children: [
920
- /* @__PURE__ */ v("div", {
957
+ /* @__PURE__ */ y("div", {
921
958
  className: "grid gap-1.5",
922
- children: [/* @__PURE__ */ _(S, {
959
+ children: [/* @__PURE__ */ v(C, {
923
960
  htmlFor: "resRecoverable",
924
961
  children: "Recoverable *"
925
- }), /* @__PURE__ */ _(x, {
962
+ }), /* @__PURE__ */ v(S, {
926
963
  id: "resRecoverable",
927
964
  type: "number",
928
965
  min: "0",
929
966
  step: "any",
930
- value: q.recoverable,
931
- onChange: (e) => J({
932
- ...q,
967
+ value: Y.recoverable,
968
+ onChange: (e) => X({
969
+ ...Y,
933
970
  recoverable: e.target.value
934
971
  }),
935
972
  placeholder: "2400000"
936
973
  })]
937
974
  }),
938
- /* @__PURE__ */ v("div", {
975
+ /* @__PURE__ */ y("div", {
939
976
  className: "grid gap-1.5",
940
- children: [/* @__PURE__ */ _(S, {
977
+ children: [/* @__PURE__ */ v(C, {
941
978
  htmlFor: "resUnit",
942
979
  children: "Unit"
943
- }), /* @__PURE__ */ v(E, {
944
- value: q.unit,
945
- onValueChange: (e) => J({
946
- ...q,
980
+ }), /* @__PURE__ */ y(w, {
981
+ value: Y.unit,
982
+ onValueChange: (e) => X({
983
+ ...Y,
947
984
  unit: e
948
985
  }),
949
- children: [/* @__PURE__ */ _(k, {
986
+ children: [/* @__PURE__ */ v(D, {
950
987
  id: "resUnit",
951
- children: /* @__PURE__ */ _(A, {})
952
- }), /* @__PURE__ */ _(D, { children: Fe.map((e) => /* @__PURE__ */ _(O, {
988
+ children: /* @__PURE__ */ v(O, {})
989
+ }), /* @__PURE__ */ v(T, { children: Ue.map((e) => /* @__PURE__ */ v(E, {
953
990
  value: e,
954
- children: a(e)
991
+ children: i(e)
955
992
  }, e)) })]
956
993
  })]
957
994
  }),
958
- /* @__PURE__ */ v("div", {
995
+ /* @__PURE__ */ y("div", {
959
996
  className: "grid gap-1.5",
960
- children: [/* @__PURE__ */ _(S, {
997
+ children: [/* @__PURE__ */ v(C, {
961
998
  htmlFor: "resFactor",
962
999
  children: "Recovery factor (%)"
963
- }), /* @__PURE__ */ _(x, {
1000
+ }), /* @__PURE__ */ v(S, {
964
1001
  id: "resFactor",
965
1002
  type: "number",
966
1003
  min: "0",
967
1004
  max: "100",
968
1005
  step: "any",
969
- value: q.recoveryFactor,
970
- onChange: (e) => J({
971
- ...q,
1006
+ value: Y.recoveryFactor,
1007
+ onChange: (e) => X({
1008
+ ...Y,
972
1009
  recoveryFactor: e.target.value
973
1010
  }),
974
1011
  placeholder: "35"
@@ -976,53 +1013,53 @@ function N() {
976
1013
  })
977
1014
  ]
978
1015
  }),
979
- /* @__PURE__ */ v("div", {
1016
+ /* @__PURE__ */ y("div", {
980
1017
  className: "grid gap-1.5",
981
- children: [/* @__PURE__ */ _(S, {
1018
+ children: [/* @__PURE__ */ v(C, {
982
1019
  htmlFor: "resMethodology",
983
1020
  children: "Methodology"
984
- }), /* @__PURE__ */ _(x, {
1021
+ }), /* @__PURE__ */ v(S, {
985
1022
  id: "resMethodology",
986
- value: q.methodology,
987
- onChange: (e) => J({
988
- ...q,
1023
+ value: Y.methodology,
1024
+ onChange: (e) => X({
1025
+ ...Y,
989
1026
  methodology: e.target.value
990
1027
  }),
991
1028
  placeholder: "Volumetric / material balance / decline curve"
992
1029
  })]
993
1030
  }),
994
- /* @__PURE__ */ v("div", {
1031
+ /* @__PURE__ */ y("div", {
995
1032
  className: "grid gap-1.5",
996
- children: [/* @__PURE__ */ _(S, {
1033
+ children: [/* @__PURE__ */ v(C, {
997
1034
  htmlFor: "resNotes",
998
1035
  children: "Notes"
999
- }), /* @__PURE__ */ _(Pe, {
1036
+ }), /* @__PURE__ */ v(He, {
1000
1037
  id: "resNotes",
1001
1038
  rows: 2,
1002
- value: q.notes,
1003
- onChange: (e) => J({
1004
- ...q,
1039
+ value: Y.notes,
1040
+ onChange: (e) => X({
1041
+ ...Y,
1005
1042
  notes: e.target.value
1006
1043
  }),
1007
1044
  placeholder: "Optional context about this estimate."
1008
1045
  })]
1009
1046
  }),
1010
- V && Je && /* @__PURE__ */ _("p", {
1047
+ W && it && /* @__PURE__ */ v("p", {
1011
1048
  className: "text-sm text-status-error-text",
1012
- children: V
1049
+ children: W
1013
1050
  })
1014
1051
  ]
1015
1052
  }),
1016
- /* @__PURE__ */ v(je, { children: [/* @__PURE__ */ _(y, {
1053
+ /* @__PURE__ */ y(ze, { children: [/* @__PURE__ */ v(b, {
1017
1054
  variant: "outline",
1018
1055
  type: "button",
1019
1056
  onClick: $,
1020
1057
  children: "Cancel"
1021
- }), /* @__PURE__ */ _(y, {
1058
+ }), /* @__PURE__ */ v(b, {
1022
1059
  type: "submit",
1023
1060
  form: "reserveEstimateForm",
1024
- disabled: z.isPending,
1025
- children: z.isPending ? "Adding…" : "Add estimate"
1061
+ disabled: H.isPending,
1062
+ children: H.isPending ? "Adding…" : "Add estimate"
1026
1063
  })] })
1027
1064
  ] })
1028
1065
  })
@@ -1030,6 +1067,6 @@ function N() {
1030
1067
  });
1031
1068
  }
1032
1069
  //#endregion
1033
- export { N as AssetDetailPage };
1070
+ export { M as AssetDetailPage };
1034
1071
 
1035
1072
  //# sourceMappingURL=AssetDetailPage.js.map