@burdenoff/microfe-theglobalfuel 2026.804.2 → 2026.827.1

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.
@@ -11,25 +11,25 @@ import { EmptyState as v } from "../../components/EmptyState.js";
11
11
  import { chartPalette as ee } from "../../components/viz/lib/palette.js";
12
12
  import { Sparkline as y } from "../../components/viz/Sparkline.js";
13
13
  import { AreaChart as te } from "../../components/viz/AreaChart.js";
14
- import { DonutChart as b } from "../../components/viz/DonutChart.js";
14
+ import { DonutChart as ne } from "../../components/viz/DonutChart.js";
15
15
  import "../../components/viz/index.js";
16
16
  import "../../context/index.js";
17
- import { useTheAssets as ne, useTheComplianceCerts as re, useTheContracts as ie, useTheEmissionRecords as ae, useTheInventoryLots as oe, useTheProductionRecords as se, useTheShipments as ce } from "../../hooks/useTheGlobalFuelApi.js";
18
- import { useThePageView as le } from "../../hooks/useThePageView.js";
19
- import { useTheTranslation as ue } from "../../hooks/useTheTranslation.js";
17
+ import { useTheAssets as re, useTheComplianceCerts as ie, useTheContracts as ae, useTheEmissionRecords as oe, useTheInventoryLots as se, useTheProductionRecords as ce, useTheReserveEstimates as le, useTheShipments as ue } from "../../hooks/useTheGlobalFuelApi.js";
18
+ import { useThePageView as de } from "../../hooks/useThePageView.js";
19
+ import { useTheTranslation as fe } from "../../hooks/useTheTranslation.js";
20
20
  import "../../hooks/index.js";
21
- import { useMemo as x } from "react";
22
- import { Activity as de, ArrowRight as S, ArrowUpRight as C, Boxes as fe, ClipboardList as pe, Factory as me, Fuel as he, Gauge as ge, GitBranch as _e, Layers as ve, ScrollText as ye, ShieldCheck as be, Ship as xe } from "lucide-react";
23
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
24
- import { GlassCard as E, Spinner as D } from "@burdenoff/fe-libs/ui";
21
+ import { useMemo as b } from "react";
22
+ import { Activity as pe, ArrowRight as x, ArrowUpRight as S, Boxes as me, ClipboardList as he, Factory as ge, Fuel as _e, Gauge as ve, GitBranch as ye, Layers as be, ScrollText as xe, ShieldCheck as Se, Ship as Ce } from "lucide-react";
23
+ import { Fragment as we, jsx as C, jsxs as w } from "react/jsx-runtime";
24
+ import { GlassCard as T, Spinner as E } from "@burdenoff/fe-libs/ui";
25
25
  //#region src/theglobalfuel/pages/dashboard/DashboardPage.tsx
26
- var O = 1440 * 60 * 1e3, k = 30, A = (e) => {
26
+ var D = 1440 * 60 * 1e3, O = 30, k = (e) => {
27
27
  if (!e) return !1;
28
28
  let t = new Date(e).getTime();
29
29
  if (Number.isNaN(t)) return !1;
30
30
  let n = t - Date.now();
31
- return n >= 0 && n <= k * O;
32
- }, Se = {
31
+ return n >= 0 && n <= O * D;
32
+ }, Te = {
33
33
  EXPLORATION: "bg-[var(--color-accent-indigo)]",
34
34
  APPRAISAL: "bg-[var(--color-accent-blue)]",
35
35
  DEVELOPMENT: "bg-[var(--color-accent-teal)]",
@@ -37,32 +37,32 @@ var O = 1440 * 60 * 1e3, k = 30, A = (e) => {
37
37
  SUSPENDED: "bg-status-warning-text",
38
38
  DECOMMISSIONING: "bg-status-error-text",
39
39
  RETIRED: "bg-[var(--color-text-tertiary)]"
40
- }, Ce = {
40
+ }, Ee = {
41
41
  SCOPE_1: "var(--color-status-error-text)",
42
42
  SCOPE_2: "var(--color-status-warning-text)",
43
43
  SCOPE_3: "var(--color-accent-blue)"
44
- }, we = [
44
+ }, De = [
45
45
  "SCOPE_1",
46
46
  "SCOPE_2",
47
47
  "SCOPE_3"
48
- ], j = (e) => `${e.getUTCFullYear()}-${String(e.getUTCMonth() + 1).padStart(2, "0")}`, M = new Intl.DateTimeFormat(void 0, {
48
+ ], A = (e) => `${e.getUTCFullYear()}-${String(e.getUTCMonth() + 1).padStart(2, "0")}`, j = new Intl.DateTimeFormat(void 0, {
49
49
  month: "short",
50
50
  year: "2-digit",
51
51
  timeZone: "UTC"
52
- }), N = (e, t) => M.format(new Date(Date.UTC(e, t - 1, 1)));
53
- function Te(e, t, n) {
52
+ }), M = (e, t) => j.format(new Date(Date.UTC(e, t - 1, 1)));
53
+ function Oe(e, t, n) {
54
54
  let r = /* @__PURE__ */ new Map();
55
55
  for (let i of e) {
56
56
  let e = t(i);
57
57
  if (!e) continue;
58
58
  let a = new Date(e);
59
59
  if (Number.isNaN(a.getTime())) continue;
60
- let o = j(a);
60
+ let o = A(a);
61
61
  r.set(o, (r.get(o) ?? 0) + n(i));
62
62
  }
63
63
  return r;
64
64
  }
65
- function P(e, t = 18) {
65
+ function N(e, t = 18) {
66
66
  let n = [...e.keys()].sort();
67
67
  if (n.length === 0) return [];
68
68
  let r = (e) => {
@@ -70,12 +70,12 @@ function P(e, t = 18) {
70
70
  return [Number(t), Number(n)];
71
71
  }, [i, a] = r(n[n.length - 1]), [o, s] = r(n[0]), c = [], l = 0;
72
72
  for (; (o < i || o === i && s <= a) && l < 240;) c.push({
73
- label: N(o, s),
73
+ label: M(o, s),
74
74
  value: e.get(`${o}-${String(s).padStart(2, "0")}`) ?? 0
75
75
  }), s += 1, s > 12 && (s = 1, o += 1), l += 1;
76
76
  return c.length > t ? c.slice(c.length - t) : c;
77
77
  }
78
- function F(e, t) {
78
+ function P(e, t) {
79
79
  let n = /* @__PURE__ */ new Map();
80
80
  for (let r of e) {
81
81
  let e = t(r);
@@ -88,186 +88,186 @@ function F(e, t) {
88
88
  pct: r ? t / r * 100 : 0
89
89
  }));
90
90
  }
91
- function Ee({ title: e, description: n, icon: r, linkLabel: i, onLink: a, isLoading: o, isError: c, onRetry: l, emptyLabel: u, bars: d, footer: f, className: m }) {
92
- return /* @__PURE__ */ T(E, {
91
+ function ke({ title: e, description: n, icon: r, linkLabel: i, onLink: a, isLoading: o, isError: c, onRetry: l, emptyLabel: u, bars: d, footer: f, className: m }) {
92
+ return /* @__PURE__ */ w(T, {
93
93
  treatment: "glass",
94
94
  className: t("flex flex-col p-5", m),
95
- children: [/* @__PURE__ */ T("div", {
95
+ children: [/* @__PURE__ */ w("div", {
96
96
  className: "mb-4 flex items-start justify-between gap-3",
97
- children: [/* @__PURE__ */ T("div", {
97
+ children: [/* @__PURE__ */ w("div", {
98
98
  className: "flex min-w-0 items-start gap-2.5",
99
- children: [/* @__PURE__ */ w("span", {
99
+ children: [/* @__PURE__ */ C("span", {
100
100
  className: "mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-action-primary-bg",
101
101
  children: r
102
- }), /* @__PURE__ */ T("div", {
102
+ }), /* @__PURE__ */ w("div", {
103
103
  className: "min-w-0",
104
- children: [/* @__PURE__ */ w("h2", {
104
+ children: [/* @__PURE__ */ C("h2", {
105
105
  className: "text-base font-semibold text-text-primary",
106
106
  children: e
107
- }), /* @__PURE__ */ w("p", {
107
+ }), /* @__PURE__ */ C("p", {
108
108
  className: "mt-0.5 text-xs text-text-tertiary",
109
109
  children: n
110
110
  })]
111
111
  })]
112
- }), /* @__PURE__ */ T("button", {
112
+ }), /* @__PURE__ */ w("button", {
113
113
  type: "button",
114
114
  onClick: a,
115
115
  className: "inline-flex shrink-0 items-center gap-1 text-sm font-medium text-action-primary-bg hover:underline",
116
116
  children: [
117
117
  i,
118
118
  " ",
119
- /* @__PURE__ */ w(S, { className: "h-4 w-4" })
119
+ /* @__PURE__ */ C(x, { className: "h-4 w-4" })
120
120
  ]
121
121
  })]
122
- }), o ? /* @__PURE__ */ T("div", {
122
+ }), o ? /* @__PURE__ */ w("div", {
123
123
  className: "flex items-center gap-2 py-8 text-sm text-text-secondary",
124
- children: [/* @__PURE__ */ w(D, { size: "sm" }), " Loading…"]
125
- }) : c ? /* @__PURE__ */ T("div", {
124
+ children: [/* @__PURE__ */ C(E, { size: "sm" }), " Loading…"]
125
+ }) : c ? /* @__PURE__ */ w("div", {
126
126
  className: "flex flex-col items-start gap-2 py-6",
127
- children: [/* @__PURE__ */ T("p", {
127
+ children: [/* @__PURE__ */ w("p", {
128
128
  className: "text-sm text-status-error-text",
129
129
  children: [
130
130
  "Couldn't load ",
131
131
  e.toLowerCase(),
132
132
  "."
133
133
  ]
134
- }), /* @__PURE__ */ w("button", {
134
+ }), /* @__PURE__ */ C("button", {
135
135
  type: "button",
136
136
  onClick: l,
137
137
  className: "rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
138
138
  children: "Retry"
139
139
  })]
140
- }) : d.length === 0 ? /* @__PURE__ */ w("div", {
140
+ }) : d.length === 0 ? /* @__PURE__ */ C("div", {
141
141
  className: "flex flex-1 flex-col items-center justify-center rounded-xl border border-dashed border-border-seam py-8 text-center",
142
- children: /* @__PURE__ */ w("p", {
142
+ children: /* @__PURE__ */ C("p", {
143
143
  className: "text-sm text-text-secondary",
144
144
  children: u
145
145
  })
146
- }) : /* @__PURE__ */ T("div", {
146
+ }) : /* @__PURE__ */ w("div", {
147
147
  className: "flex flex-1 flex-col justify-between gap-4",
148
- children: [/* @__PURE__ */ w("div", {
148
+ children: [/* @__PURE__ */ C("div", {
149
149
  className: "space-y-3",
150
- children: d.map((e) => /* @__PURE__ */ T("div", {
150
+ children: d.map((e) => /* @__PURE__ */ w("div", {
151
151
  className: "flex items-center gap-3",
152
152
  children: [
153
- /* @__PURE__ */ w("div", {
153
+ /* @__PURE__ */ C("div", {
154
154
  className: "w-24 shrink-0 truncate text-sm text-text-secondary sm:w-28",
155
155
  children: e.label
156
156
  }),
157
- /* @__PURE__ */ w(p, {
157
+ /* @__PURE__ */ C(p, {
158
158
  value: e.pct,
159
159
  barClassName: e.barClassName,
160
160
  className: "flex-1",
161
161
  height: 8
162
162
  }),
163
- /* @__PURE__ */ w("span", {
163
+ /* @__PURE__ */ C("span", {
164
164
  className: "w-16 shrink-0 whitespace-nowrap text-right text-sm font-medium tabular-nums text-text-primary",
165
165
  children: e.value
166
166
  }),
167
- /* @__PURE__ */ w("span", {
167
+ /* @__PURE__ */ C("span", {
168
168
  className: "hidden w-11 shrink-0 text-right text-xs tabular-nums text-text-tertiary sm:inline",
169
169
  children: s(e.pct)
170
170
  })
171
171
  ]
172
172
  }, e.key))
173
- }), f && /* @__PURE__ */ w("p", {
173
+ }), f && /* @__PURE__ */ C("p", {
174
174
  className: "border-t border-border-seam/70 pt-3 text-xs text-text-tertiary",
175
175
  children: f
176
176
  })]
177
177
  })]
178
178
  });
179
179
  }
180
- function I({ title: e, caption: n, icon: r, link: i, isLoading: a, isError: o, onRetry: s, isEmpty: c, emptyLabel: l, footer: u, className: d, children: f }) {
181
- return /* @__PURE__ */ T(E, {
180
+ function F({ title: e, caption: n, icon: r, link: i, isLoading: a, isError: o, onRetry: s, isEmpty: c, emptyLabel: l, footer: u, className: d, children: f }) {
181
+ return /* @__PURE__ */ w(T, {
182
182
  treatment: "glass",
183
183
  className: t("flex flex-col p-5", d),
184
- children: [/* @__PURE__ */ T("div", {
184
+ children: [/* @__PURE__ */ w("div", {
185
185
  className: "mb-4 flex items-start justify-between gap-3",
186
- children: [/* @__PURE__ */ T("div", {
186
+ children: [/* @__PURE__ */ w("div", {
187
187
  className: "flex min-w-0 items-start gap-2.5",
188
- children: [/* @__PURE__ */ w("span", {
188
+ children: [/* @__PURE__ */ C("span", {
189
189
  className: "mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-action-primary-bg",
190
190
  children: r
191
- }), /* @__PURE__ */ T("div", {
191
+ }), /* @__PURE__ */ w("div", {
192
192
  className: "min-w-0",
193
- children: [/* @__PURE__ */ w("h2", {
193
+ children: [/* @__PURE__ */ C("h2", {
194
194
  className: "text-base font-semibold text-text-primary",
195
195
  children: e
196
- }), /* @__PURE__ */ w("p", {
196
+ }), /* @__PURE__ */ C("p", {
197
197
  className: "mt-0.5 text-xs text-text-tertiary",
198
198
  children: n
199
199
  })]
200
200
  })]
201
- }), i ? /* @__PURE__ */ T("button", {
201
+ }), i ? /* @__PURE__ */ w("button", {
202
202
  type: "button",
203
203
  onClick: i.onClick,
204
204
  className: "inline-flex shrink-0 items-center gap-1 text-sm font-medium text-action-primary-bg hover:underline",
205
205
  children: [
206
206
  i.label,
207
207
  " ",
208
- /* @__PURE__ */ w(S, { className: "h-4 w-4" })
208
+ /* @__PURE__ */ C(x, { className: "h-4 w-4" })
209
209
  ]
210
210
  }) : null]
211
- }), a ? /* @__PURE__ */ T("div", {
211
+ }), a ? /* @__PURE__ */ w("div", {
212
212
  className: "flex flex-1 items-center gap-2 py-8 text-sm text-text-secondary",
213
- children: [/* @__PURE__ */ w(D, { size: "sm" }), " Loading…"]
214
- }) : o ? /* @__PURE__ */ T("div", {
213
+ children: [/* @__PURE__ */ C(E, { size: "sm" }), " Loading…"]
214
+ }) : o ? /* @__PURE__ */ w("div", {
215
215
  className: "flex flex-1 flex-col items-start gap-2 py-6",
216
- children: [/* @__PURE__ */ T("p", {
216
+ children: [/* @__PURE__ */ w("p", {
217
217
  className: "text-sm text-status-error-text",
218
218
  children: [
219
219
  "Couldn't load ",
220
220
  e.toLowerCase(),
221
221
  "."
222
222
  ]
223
- }), /* @__PURE__ */ w("button", {
223
+ }), /* @__PURE__ */ C("button", {
224
224
  type: "button",
225
225
  onClick: s,
226
226
  className: "rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
227
227
  children: "Retry"
228
228
  })]
229
- }) : c ? /* @__PURE__ */ w("div", {
229
+ }) : c ? /* @__PURE__ */ C("div", {
230
230
  className: "flex flex-1 flex-col items-center justify-center rounded-xl border border-dashed border-border-seam py-10 text-center",
231
- children: /* @__PURE__ */ w("p", {
231
+ children: /* @__PURE__ */ C("p", {
232
232
  className: "text-sm text-text-secondary",
233
233
  children: l
234
234
  })
235
- }) : /* @__PURE__ */ T("div", {
235
+ }) : /* @__PURE__ */ w("div", {
236
236
  className: "flex flex-1 flex-col justify-between gap-4",
237
- children: [/* @__PURE__ */ w("div", {
237
+ children: [/* @__PURE__ */ C("div", {
238
238
  className: "flex-1",
239
239
  children: f
240
- }), u ? /* @__PURE__ */ w("p", {
240
+ }), u ? /* @__PURE__ */ C("p", {
241
241
  className: "border-t border-border-seam/70 pt-3 text-xs text-text-tertiary",
242
242
  children: u
243
243
  }) : null]
244
244
  })]
245
245
  });
246
246
  }
247
- function De({ card: e, onOpen: t }) {
248
- return /* @__PURE__ */ w(E, {
247
+ function Ae({ card: e, onOpen: t }) {
248
+ return /* @__PURE__ */ C(T, {
249
249
  treatment: "metric",
250
250
  className: "p-0",
251
- children: /* @__PURE__ */ T("button", {
251
+ children: /* @__PURE__ */ w("button", {
252
252
  type: "button",
253
253
  onClick: t,
254
254
  "aria-label": `Open ${e.name} assets`,
255
255
  className: "flex w-full flex-col gap-4 rounded-[var(--radius-card)] p-5 text-left outline-none transition-transform duration-200 hover:-translate-y-0.5 focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
256
256
  children: [
257
- /* @__PURE__ */ T("div", {
257
+ /* @__PURE__ */ w("div", {
258
258
  className: "flex items-start justify-between gap-2",
259
- children: [/* @__PURE__ */ T("div", {
259
+ children: [/* @__PURE__ */ w("div", {
260
260
  className: "flex min-w-0 items-center gap-2.5",
261
- children: [/* @__PURE__ */ w("span", {
261
+ children: [/* @__PURE__ */ C("span", {
262
262
  "aria-hidden": "true",
263
263
  className: "size-2.5 shrink-0 rounded-full",
264
264
  style: { backgroundColor: e.color }
265
- }), /* @__PURE__ */ T("div", {
265
+ }), /* @__PURE__ */ w("div", {
266
266
  className: "min-w-0",
267
- children: [/* @__PURE__ */ w("p", {
267
+ children: [/* @__PURE__ */ C("p", {
268
268
  className: "truncate text-sm font-semibold text-text-primary",
269
269
  children: e.name
270
- }), /* @__PURE__ */ T("p", {
270
+ }), /* @__PURE__ */ w("p", {
271
271
  className: "text-xs text-text-tertiary",
272
272
  children: [
273
273
  e.assetCount,
@@ -276,46 +276,60 @@ function De({ card: e, onOpen: t }) {
276
276
  ]
277
277
  })]
278
278
  })]
279
- }), /* @__PURE__ */ w(C, { className: "h-4 w-4 shrink-0 text-text-tertiary" })]
279
+ }), /* @__PURE__ */ C(S, { className: "h-4 w-4 shrink-0 text-text-tertiary" })]
280
280
  }),
281
- /* @__PURE__ */ T("div", {
282
- className: "grid grid-cols-2 gap-3",
283
- children: [/* @__PURE__ */ T("div", {
284
- className: "min-w-0",
285
- children: [/* @__PURE__ */ w("p", {
286
- className: "text-[11px] uppercase tracking-wide text-text-tertiary",
287
- children: "Capacity/day"
288
- }), /* @__PURE__ */ w("p", {
289
- className: "mt-0.5 truncate text-sm font-semibold tabular-nums text-text-primary",
290
- children: e.capacity > 0 ? u(e.capacity, e.unit) : "—"
291
- })]
292
- }), /* @__PURE__ */ T("div", {
293
- className: "min-w-0",
294
- children: [/* @__PURE__ */ w("p", {
295
- className: "text-[11px] uppercase tracking-wide text-text-tertiary",
296
- children: "Producing"
297
- }), /* @__PURE__ */ T("p", {
298
- className: "mt-0.5 text-sm font-semibold tabular-nums text-text-primary",
299
- children: [
300
- e.producing,
301
- " ",
302
- /* @__PURE__ */ T("span", {
303
- className: "text-xs font-normal text-text-tertiary",
304
- children: ["of ", e.assetCount]
305
- })
306
- ]
307
- })]
308
- })]
281
+ /* @__PURE__ */ w("div", {
282
+ className: "grid grid-cols-3 gap-3",
283
+ children: [
284
+ /* @__PURE__ */ w("div", {
285
+ className: "min-w-0",
286
+ children: [/* @__PURE__ */ C("p", {
287
+ className: "text-[11px] uppercase tracking-wide text-text-tertiary",
288
+ children: "Capacity/day"
289
+ }), /* @__PURE__ */ C("p", {
290
+ className: "mt-0.5 truncate text-sm font-semibold tabular-nums text-text-primary",
291
+ children: e.capacity > 0 ? u(e.capacity, e.unit) : "—"
292
+ })]
293
+ }),
294
+ /* @__PURE__ */ w("div", {
295
+ className: "min-w-0",
296
+ children: [/* @__PURE__ */ C("p", {
297
+ className: "text-[11px] uppercase tracking-wide text-text-tertiary",
298
+ children: "Proved"
299
+ }), /* @__PURE__ */ C("p", {
300
+ className: "mt-0.5 truncate text-sm font-semibold tabular-nums text-text-primary",
301
+ title: e.reserves == null ? "No proved reserves booked" : `Latest proved estimate across ${e.reserveAssets} ${e.reserveAssets === 1 ? "asset" : "assets"}`,
302
+ children: e.reserves == null ? "—" : u(e.reserves, e.reserveUnit)
303
+ })]
304
+ }),
305
+ /* @__PURE__ */ w("div", {
306
+ className: "min-w-0",
307
+ children: [/* @__PURE__ */ C("p", {
308
+ className: "text-[11px] uppercase tracking-wide text-text-tertiary",
309
+ children: "Producing"
310
+ }), /* @__PURE__ */ w("p", {
311
+ className: "mt-0.5 text-sm font-semibold tabular-nums text-text-primary",
312
+ children: [
313
+ e.producing,
314
+ " ",
315
+ /* @__PURE__ */ w("span", {
316
+ className: "text-xs font-normal text-text-tertiary",
317
+ children: ["of ", e.assetCount]
318
+ })
319
+ ]
320
+ })]
321
+ })
322
+ ]
309
323
  }),
310
- e.spark.length >= 2 ? /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w(y, {
324
+ e.spark.length >= 2 ? /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C(y, {
311
325
  data: e.spark,
312
326
  variant: "area",
313
327
  height: 40,
314
328
  label: `${e.name} monthly production`
315
- }), /* @__PURE__ */ w("p", {
329
+ }), /* @__PURE__ */ C("p", {
316
330
  className: "mt-1 text-[11px] text-text-tertiary",
317
331
  children: "Monthly output"
318
- })] }) : /* @__PURE__ */ w("p", {
332
+ })] }) : /* @__PURE__ */ C("p", {
319
333
  className: "text-xs text-text-tertiary",
320
334
  children: "No production logged yet."
321
335
  })
@@ -323,16 +337,16 @@ function De({ card: e, onOpen: t }) {
323
337
  })
324
338
  });
325
339
  }
326
- function L() {
327
- le("dashboard");
328
- let { navigateTo: t, currentUser: s } = e(), y = ne({ pagination: { limit: 200 } }), C = ie({ pagination: { limit: 50 } }), E = ce(void 0, "IN_TRANSIT"), D = ae({ pagination: { limit: 200 } }), O = oe({ pagination: { limit: 50 } }), k = re(), M = se({ pagination: { limit: 200 } }), N = x(() => y.data?.items ?? [], [y.data]), L = x(() => C.data?.items ?? [], [C.data]), R = x(() => E.data?.items ?? [], [E.data]), z = x(() => D.data?.items ?? [], [D.data]), B = x(() => O.data?.items ?? [], [O.data]), V = x(() => k.data?.items ?? [], [k.data]), H = x(() => M.data?.items ?? [], [M.data]), U = N.filter((e) => e.status === "PRODUCING").length, W = L.filter((e) => e.status === "ACTIVE").length, G = z.reduce((e, t) => e + (t.co2eTonnes ?? 0), 0), Oe = z.filter((e) => e.verified).length, ke = B.filter((e) => e.status === "AVAILABLE").length, Ae = H.reduce((e, t) => e + (t.volume ?? 0), 0), je = V.filter((e) => e.status === "PENDING").length, Me = V.filter((e) => e.expiresAt != null && (d(e.expiresAt) || A(e.expiresAt))).length, K = V.filter((e) => e.status === "PENDING" || e.expiresAt != null && (d(e.expiresAt) || A(e.expiresAt))).length, q = (e, t) => t ? `${e.length}+` : o(e.length), J = x(() => P(Te(H, (e) => e.periodEnd, (e) => e.volume ?? 0)), [H]), Y = x(() => F(N, (e) => e.commodity), [N]), X = x(() => {
340
+ function I() {
341
+ de("dashboard");
342
+ let { navigateTo: t, currentUser: s } = e(), y = re({ pagination: { limit: 200 } }), S = ae({ pagination: { limit: 50 } }), T = ue(void 0, "IN_TRANSIT"), E = oe({ pagination: { limit: 200 } }), D = se({ pagination: { limit: 50 } }), O = ie(), j = ce({ pagination: { limit: 200 } }), M = le(void 0, "PROVED", { limit: 200 }), I = b(() => y.data?.items ?? [], [y.data]), L = b(() => S.data?.items ?? [], [S.data]), R = b(() => T.data?.items ?? [], [T.data]), z = b(() => E.data?.items ?? [], [E.data]), B = b(() => D.data?.items ?? [], [D.data]), V = b(() => O.data?.items ?? [], [O.data]), H = b(() => j.data?.items ?? [], [j.data]), U = b(() => M.data?.items ?? [], [M.data]), W = I.filter((e) => e.status === "PRODUCING").length, je = L.filter((e) => e.status === "ACTIVE").length, G = z.reduce((e, t) => e + (t.co2eTonnes ?? 0), 0), Me = z.filter((e) => e.verified).length, Ne = B.filter((e) => e.status === "AVAILABLE").length, Pe = H.reduce((e, t) => e + (t.volume ?? 0), 0), Fe = V.filter((e) => e.status === "PENDING").length, Ie = V.filter((e) => e.expiresAt != null && (d(e.expiresAt) || k(e.expiresAt))).length, K = V.filter((e) => e.status === "PENDING" || e.expiresAt != null && (d(e.expiresAt) || k(e.expiresAt))).length, q = (e, t) => t ? `${e.length}+` : o(e.length), J = b(() => N(Oe(H, (e) => e.periodEnd, (e) => e.volume ?? 0)), [H]), Y = b(() => P(I, (e) => e.commodity), [I]), X = b(() => {
329
343
  let e = ee(Y.length), t = /* @__PURE__ */ new Map();
330
344
  return Y.forEach((n, r) => t.set(n.key, e[r])), t;
331
- }, [Y]), Z = x(() => Y.map((e) => ({
345
+ }, [Y]), Z = b(() => Y.map((e) => ({
332
346
  label: a(e.key),
333
347
  value: e.count,
334
348
  color: X.get(e.key)
335
- })), [Y, X]), Ne = x(() => {
349
+ })), [Y, X]), Le = b(() => {
336
350
  if (z.length === 0) return [];
337
351
  let e = {
338
352
  SCOPE_1: 0,
@@ -340,25 +354,60 @@ function L() {
340
354
  SCOPE_3: 0
341
355
  };
342
356
  for (let t of z) e[t.scope] += t.co2eTonnes ?? 0;
343
- return we.filter((t) => e[t] > 0).map((t) => ({
357
+ return De.filter((t) => e[t] > 0).map((t) => ({
344
358
  label: a(t),
345
359
  value: e[t],
346
- color: Ce[t]
360
+ color: Ee[t]
347
361
  }));
348
- }, [z]), Pe = x(() => F(N, (e) => e.status).map((e) => ({
362
+ }, [z]), Re = b(() => P(I, (e) => e.status).map((e) => ({
349
363
  key: e.key,
350
- label: /* @__PURE__ */ w(f, { status: e.key }),
364
+ label: /* @__PURE__ */ C(f, { status: e.key }),
351
365
  value: o(e.count),
352
366
  pct: e.pct,
353
- barClassName: Se[e.key] ?? "bg-action-primary-bg"
354
- })), [N]), Fe = x(() => {
367
+ barClassName: Te[e.key] ?? "bg-action-primary-bg"
368
+ })), [I]), Q = b(() => {
355
369
  let e = /* @__PURE__ */ new Map();
356
- for (let t of N) e.set(t.id, t.commodity);
370
+ for (let t of I) e.set(t.id, t.commodity);
357
371
  return e;
358
- }, [N]), Ie = x(() => {
372
+ }, [I]), ze = b(() => {
373
+ let e = /* @__PURE__ */ new Map();
374
+ for (let t of U) {
375
+ let n = new Date(t.asOfDate).getTime();
376
+ if (Number.isNaN(n)) continue;
377
+ let r = e.get(t.assetId);
378
+ r && r.at >= n || e.set(t.assetId, {
379
+ recoverable: t.recoverable ?? 0,
380
+ unit: t.unit,
381
+ at: n
382
+ });
383
+ }
384
+ let t = /* @__PURE__ */ new Map();
385
+ for (let [n, r] of e) {
386
+ let e = Q.get(n);
387
+ if (!e) continue;
388
+ let i = t.get(e);
389
+ i || (i = /* @__PURE__ */ new Map(), t.set(e, i));
390
+ let a = i.get(r.unit) ?? {
391
+ total: 0,
392
+ assets: 0
393
+ };
394
+ a.total += r.recoverable, a.assets += 1, i.set(r.unit, a);
395
+ }
396
+ let n = /* @__PURE__ */ new Map();
397
+ for (let [e, r] of t) {
398
+ let t = null;
399
+ for (let [e, n] of r) (!t || n.assets > t.assets || n.assets === t.assets && n.total > t.total) && (t = {
400
+ total: n.total,
401
+ unit: e,
402
+ assets: n.assets
403
+ });
404
+ t && n.set(e, t);
405
+ }
406
+ return n;
407
+ }, [U, Q]), Be = b(() => {
359
408
  if (Y.length === 0) return [];
360
409
  let e = /* @__PURE__ */ new Map();
361
- for (let t of N) {
410
+ for (let t of I) {
362
411
  let n = e.get(t.commodity) ?? {
363
412
  count: 0,
364
413
  producing: 0,
@@ -369,11 +418,11 @@ function L() {
369
418
  }
370
419
  let t = /* @__PURE__ */ new Map();
371
420
  for (let e of H) {
372
- let n = Fe.get(e.assetId);
421
+ let n = Q.get(e.assetId);
373
422
  if (!n) continue;
374
423
  let r = new Date(e.periodEnd);
375
424
  if (Number.isNaN(r.getTime())) continue;
376
- let i = j(r), a = t.get(n);
425
+ let i = A(r), a = t.get(n);
377
426
  a || (a = /* @__PURE__ */ new Map(), t.set(n, a)), a.set(i, (a.get(i) ?? 0) + (e.volume ?? 0));
378
427
  }
379
428
  let n = (e) => {
@@ -387,7 +436,7 @@ function L() {
387
436
  producing: 0,
388
437
  capacity: 0,
389
438
  units: /* @__PURE__ */ new Map()
390
- }, o = t.get(r.key), s = o ? P(o, 12).map((e) => e.value) : [];
439
+ }, o = t.get(r.key), s = o ? N(o, 12).map((e) => e.value) : [], c = ze.get(r.key);
391
440
  return {
392
441
  key: r.key,
393
442
  name: a(r.key),
@@ -396,24 +445,28 @@ function L() {
396
445
  producing: i.producing,
397
446
  capacity: i.capacity,
398
447
  unit: n(i.units),
448
+ reserves: c ? c.total : null,
449
+ reserveUnit: c?.unit ?? "",
450
+ reserveAssets: c?.assets ?? 0,
399
451
  spark: s
400
452
  };
401
453
  });
402
454
  }, [
403
- N,
455
+ I,
404
456
  H,
405
- Fe,
457
+ Q,
406
458
  Y,
407
- X
408
- ]), Le = x(() => {
459
+ X,
460
+ ze
461
+ ]), Ve = b(() => {
409
462
  let e = /* @__PURE__ */ new Map();
410
- for (let t of N) e.set(t.id, t.name);
463
+ for (let t of I) e.set(t.id, t.name);
411
464
  return e;
412
- }, [N]), Re = x(() => [...L].sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime()).slice(0, 6), [L]), Q = x(() => [...H].sort((e, t) => new Date(t.periodEnd).getTime() - new Date(e.periodEnd).getTime()).slice(0, 6), [H]), ze = [
465
+ }, [I]), He = b(() => [...L].sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime()).slice(0, 6), [L]), Ue = b(() => [...H].sort((e, t) => new Date(t.periodEnd).getTime() - new Date(e.periodEnd).getTime()).slice(0, 6), [H]), We = [
413
466
  {
414
467
  key: "reference",
415
468
  header: "Reference",
416
- render: (e) => /* @__PURE__ */ w("span", {
469
+ render: (e) => /* @__PURE__ */ C("span", {
417
470
  className: "font-medium text-text-primary",
418
471
  children: e.reference
419
472
  })
@@ -422,7 +475,7 @@ function L() {
422
475
  key: "counterparty",
423
476
  header: "Counterparty",
424
477
  hideOnMobile: !0,
425
- render: (e) => /* @__PURE__ */ w("span", {
478
+ render: (e) => /* @__PURE__ */ C("span", {
426
479
  className: "text-text-secondary",
427
480
  children: e.counterparty
428
481
  })
@@ -431,7 +484,7 @@ function L() {
431
484
  key: "commodity",
432
485
  header: "Commodity",
433
486
  hideOnMobile: !0,
434
- render: (e) => /* @__PURE__ */ w("span", {
487
+ render: (e) => /* @__PURE__ */ C("span", {
435
488
  className: "text-text-secondary",
436
489
  children: a(e.commodity)
437
490
  })
@@ -439,14 +492,14 @@ function L() {
439
492
  {
440
493
  key: "side",
441
494
  header: "Side",
442
- render: (e) => /* @__PURE__ */ w(f, { status: e.side })
495
+ render: (e) => /* @__PURE__ */ C(f, { status: e.side })
443
496
  },
444
497
  {
445
498
  key: "volume",
446
499
  header: "Volume",
447
500
  align: "right",
448
501
  hideOnMobile: !0,
449
- render: (e) => /* @__PURE__ */ w("span", {
502
+ render: (e) => /* @__PURE__ */ C("span", {
450
503
  className: "tabular-nums text-text-secondary",
451
504
  children: u(e.contractedVolume, e.unit)
452
505
  })
@@ -454,32 +507,32 @@ function L() {
454
507
  {
455
508
  key: "status",
456
509
  header: "Status",
457
- render: (e) => /* @__PURE__ */ w(f, { status: e.status })
510
+ render: (e) => /* @__PURE__ */ C(f, { status: e.status })
458
511
  },
459
512
  {
460
513
  key: "created",
461
514
  header: "Created",
462
515
  align: "right",
463
516
  hideOnMobile: !0,
464
- render: (e) => /* @__PURE__ */ w("span", {
517
+ render: (e) => /* @__PURE__ */ C("span", {
465
518
  className: "text-text-tertiary",
466
519
  children: c(e.createdAt)
467
520
  })
468
521
  }
469
- ], Be = [
522
+ ], Ge = [
470
523
  {
471
524
  key: "asset",
472
525
  header: "Asset",
473
- render: (e) => /* @__PURE__ */ w("span", {
526
+ render: (e) => /* @__PURE__ */ C("span", {
474
527
  className: "font-medium text-text-primary",
475
- children: Le.get(e.assetId) ?? "Unknown asset"
528
+ children: Ve.get(e.assetId) ?? "Unknown asset"
476
529
  })
477
530
  },
478
531
  {
479
532
  key: "period",
480
533
  header: "Period",
481
534
  hideOnMobile: !0,
482
- render: (e) => /* @__PURE__ */ T("span", {
535
+ render: (e) => /* @__PURE__ */ w("span", {
483
536
  className: "text-text-secondary",
484
537
  children: [
485
538
  i(e.periodStart),
@@ -492,7 +545,7 @@ function L() {
492
545
  key: "volume",
493
546
  header: "Volume",
494
547
  align: "right",
495
- render: (e) => /* @__PURE__ */ w("span", {
548
+ render: (e) => /* @__PURE__ */ C("span", {
496
549
  className: "tabular-nums font-medium text-text-primary",
497
550
  children: u(e.volume, e.unit)
498
551
  })
@@ -502,7 +555,7 @@ function L() {
502
555
  header: "Downtime",
503
556
  align: "right",
504
557
  hideOnMobile: !0,
505
- render: (e) => /* @__PURE__ */ T("span", {
558
+ render: (e) => /* @__PURE__ */ w("span", {
506
559
  className: "tabular-nums text-text-secondary",
507
560
  children: [o(e.downtimeHours), " h"]
508
561
  })
@@ -512,93 +565,93 @@ function L() {
512
565
  header: "Logged",
513
566
  align: "right",
514
567
  hideOnMobile: !0,
515
- render: (e) => /* @__PURE__ */ w("span", {
568
+ render: (e) => /* @__PURE__ */ C("span", {
516
569
  className: "text-text-tertiary",
517
570
  children: c(e.createdAt)
518
571
  })
519
572
  }
520
- ], Ve = s?.firstName || s?.name || "there", He = ue(), Ue = He("theglobalfuel.pages.dashboard.subtitle", "Welcome back, {name} — your energy, mineral & commodity resource control room.", { name: Ve }), We = y.isLoading && C.isLoading && D.isLoading && O.isLoading && k.isLoading, $ = He("theglobalfuel.pages.dashboard.title", "TheGlobalFuel");
521
- return We ? /* @__PURE__ */ w(n, {
573
+ ], Ke = s?.firstName || s?.name || "there", qe = fe(), Je = qe("theglobalfuel.pages.dashboard.subtitle", "Welcome back, {name} — your energy, mineral & commodity resource control room.", { name: Ke }), Ye = y.isLoading && S.isLoading && E.isLoading && D.isLoading && O.isLoading, $ = qe("theglobalfuel.pages.dashboard.title", "TheGlobalFuel");
574
+ return Ye ? /* @__PURE__ */ C(n, {
522
575
  title: $,
523
576
  titleGradient: !0,
524
577
  aurora: !0,
525
- description: Ue,
578
+ description: Je,
526
579
  dataTour: "theglobalfuel-dashboard-page",
527
- children: /* @__PURE__ */ w(g, { label: "Loading your resource portfolio…" })
528
- }) : /* @__PURE__ */ T(n, {
580
+ children: /* @__PURE__ */ C(g, { label: "Loading your resource portfolio…" })
581
+ }) : /* @__PURE__ */ w(n, {
529
582
  title: $,
530
583
  titleGradient: !0,
531
584
  aurora: !0,
532
- description: Ue,
585
+ description: Je,
533
586
  dataTour: "theglobalfuel-dashboard-page",
534
587
  children: [
535
- /* @__PURE__ */ T("div", {
588
+ /* @__PURE__ */ w("div", {
536
589
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6",
537
590
  children: [
538
- /* @__PURE__ */ w(r, {
539
- icon: /* @__PURE__ */ w(ve, { className: "h-5 w-5" }),
540
- value: q(N, y.data?.pageInfo?.hasMore),
591
+ /* @__PURE__ */ C(r, {
592
+ icon: /* @__PURE__ */ C(be, { className: "h-5 w-5" }),
593
+ value: q(I, y.data?.pageInfo?.hasMore),
541
594
  label: "Resource assets",
542
595
  featured: !0,
543
- footer: /* @__PURE__ */ T("div", {
596
+ footer: /* @__PURE__ */ w("div", {
544
597
  className: "space-y-2",
545
- children: [/* @__PURE__ */ w(p, {
546
- value: N.length ? U / N.length * 100 : 0,
598
+ children: [/* @__PURE__ */ C(p, {
599
+ value: I.length ? W / I.length * 100 : 0,
547
600
  height: 4,
548
601
  barClassName: "bg-status-success-text"
549
- }), /* @__PURE__ */ T("p", {
602
+ }), /* @__PURE__ */ w("p", {
550
603
  className: "text-xs text-text-tertiary",
551
- children: [/* @__PURE__ */ w("span", {
604
+ children: [/* @__PURE__ */ C("span", {
552
605
  className: "tabular-nums text-text-secondary",
553
- children: U
606
+ children: W
554
607
  }), " producing"]
555
608
  })]
556
609
  })
557
610
  }),
558
- /* @__PURE__ */ w(r, {
559
- icon: /* @__PURE__ */ w(ye, { className: "h-5 w-5" }),
560
- value: q(L, C.data?.pageInfo?.hasMore),
611
+ /* @__PURE__ */ C(r, {
612
+ icon: /* @__PURE__ */ C(xe, { className: "h-5 w-5" }),
613
+ value: q(L, S.data?.pageInfo?.hasMore),
561
614
  label: "Offtake contracts",
562
- footer: /* @__PURE__ */ T("div", {
615
+ footer: /* @__PURE__ */ w("div", {
563
616
  className: "space-y-2",
564
- children: [/* @__PURE__ */ w(p, {
565
- value: L.length ? W / L.length * 100 : 0,
617
+ children: [/* @__PURE__ */ C(p, {
618
+ value: L.length ? je / L.length * 100 : 0,
566
619
  height: 4,
567
620
  barClassName: "bg-action-primary-bg"
568
- }), /* @__PURE__ */ T("p", {
621
+ }), /* @__PURE__ */ w("p", {
569
622
  className: "text-xs text-text-tertiary",
570
- children: [/* @__PURE__ */ w("span", {
623
+ children: [/* @__PURE__ */ C("span", {
571
624
  className: "tabular-nums text-text-secondary",
572
- children: W
625
+ children: je
573
626
  }), " active"]
574
627
  })]
575
628
  })
576
629
  }),
577
- /* @__PURE__ */ w(r, {
578
- icon: /* @__PURE__ */ w(xe, { className: "h-5 w-5" }),
579
- value: E.isError ? "—" : o(R.length),
630
+ /* @__PURE__ */ C(r, {
631
+ icon: /* @__PURE__ */ C(Ce, { className: "h-5 w-5" }),
632
+ value: T.isError ? "—" : o(R.length),
580
633
  label: "Shipments in transit",
581
- footer: /* @__PURE__ */ w("p", {
634
+ footer: /* @__PURE__ */ C("p", {
582
635
  className: "text-xs text-text-tertiary",
583
636
  children: R.length > 0 ? "In motion across carriers" : "No active movements"
584
637
  })
585
638
  }),
586
- /* @__PURE__ */ w(r, {
587
- icon: /* @__PURE__ */ w(me, { className: "h-5 w-5" }),
588
- value: D.isError ? "—" : l(G),
639
+ /* @__PURE__ */ C(r, {
640
+ icon: /* @__PURE__ */ C(ge, { className: "h-5 w-5" }),
641
+ value: E.isError ? "—" : l(G),
589
642
  label: "Emissions logged",
590
- footer: /* @__PURE__ */ T("div", {
643
+ footer: /* @__PURE__ */ w("div", {
591
644
  className: "space-y-2",
592
- children: [/* @__PURE__ */ w(p, {
593
- value: z.length ? Oe / z.length * 100 : 0,
645
+ children: [/* @__PURE__ */ C(p, {
646
+ value: z.length ? Me / z.length * 100 : 0,
594
647
  height: 4,
595
648
  barClassName: "bg-status-success-text"
596
- }), /* @__PURE__ */ T("p", {
649
+ }), /* @__PURE__ */ w("p", {
597
650
  className: "text-xs text-text-tertiary",
598
651
  children: [
599
- /* @__PURE__ */ w("span", {
652
+ /* @__PURE__ */ C("span", {
600
653
  className: "tabular-nums text-text-secondary",
601
- children: Oe
654
+ children: Me
602
655
  }),
603
656
  " ",
604
657
  "verified"
@@ -606,22 +659,22 @@ function L() {
606
659
  })]
607
660
  })
608
661
  }),
609
- /* @__PURE__ */ w(r, {
610
- icon: /* @__PURE__ */ w(fe, { className: "h-5 w-5" }),
611
- value: O.isError ? "—" : o(ke),
662
+ /* @__PURE__ */ C(r, {
663
+ icon: /* @__PURE__ */ C(me, { className: "h-5 w-5" }),
664
+ value: D.isError ? "—" : o(Ne),
612
665
  label: "Inventory available",
613
- footer: /* @__PURE__ */ T("div", {
666
+ footer: /* @__PURE__ */ w("div", {
614
667
  className: "space-y-2",
615
- children: [/* @__PURE__ */ w(p, {
616
- value: B.length ? ke / B.length * 100 : 0,
668
+ children: [/* @__PURE__ */ C(p, {
669
+ value: B.length ? Ne / B.length * 100 : 0,
617
670
  height: 4,
618
671
  barClassName: "bg-action-primary-bg"
619
- }), /* @__PURE__ */ T("p", {
672
+ }), /* @__PURE__ */ w("p", {
620
673
  className: "text-xs text-text-tertiary",
621
674
  children: [
622
- /* @__PURE__ */ w("span", {
675
+ /* @__PURE__ */ C("span", {
623
676
  className: "tabular-nums text-text-secondary",
624
- children: q(B, O.data?.pageInfo?.hasMore)
677
+ children: q(B, D.data?.pageInfo?.hasMore)
625
678
  }),
626
679
  " ",
627
680
  "lots total"
@@ -629,44 +682,44 @@ function L() {
629
682
  })]
630
683
  })
631
684
  }),
632
- /* @__PURE__ */ w(r, {
633
- icon: /* @__PURE__ */ w(be, { className: "h-5 w-5" }),
634
- value: k.isError ? "—" : o(K),
685
+ /* @__PURE__ */ C(r, {
686
+ icon: /* @__PURE__ */ C(Se, { className: "h-5 w-5" }),
687
+ value: O.isError ? "—" : o(K),
635
688
  label: "Certs need attention",
636
689
  accent: K > 0 ? "warning" : V.length > 0 ? "success" : void 0,
637
- footer: /* @__PURE__ */ w("p", {
690
+ footer: /* @__PURE__ */ C("p", {
638
691
  className: K > 0 ? "text-xs font-medium text-status-warning-text" : "text-xs text-text-tertiary",
639
- children: V.length === 0 ? "No certifications tracked yet" : K > 0 ? `${je} pending · ${Me} expiring` : "All certifications current"
692
+ children: V.length === 0 ? "No certifications tracked yet" : K > 0 ? `${Fe} pending · ${Ie} expiring` : "All certifications current"
640
693
  })
641
694
  })
642
695
  ]
643
696
  }),
644
- /* @__PURE__ */ T("div", {
697
+ /* @__PURE__ */ w("div", {
645
698
  className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
646
- children: [/* @__PURE__ */ w(I, {
699
+ children: [/* @__PURE__ */ C(F, {
647
700
  className: "lg:col-span-2",
648
701
  title: "Production trend",
649
702
  caption: "Metered output aggregated by month across your producing assets.",
650
- icon: /* @__PURE__ */ w(de, { className: "h-4 w-4" }),
703
+ icon: /* @__PURE__ */ C(pe, { className: "h-4 w-4" }),
651
704
  link: {
652
705
  label: "Production",
653
706
  onClick: () => t("production")
654
707
  },
655
- isLoading: M.isLoading,
656
- isError: M.isError,
657
- onRetry: () => M.refetch(),
708
+ isLoading: j.isLoading,
709
+ isError: j.isError,
710
+ onRetry: () => j.refetch(),
658
711
  isEmpty: J.length === 0,
659
712
  emptyLabel: "No production logged yet — record output to build the trend.",
660
- footer: J.length > 0 ? `${o(Ae, { maximumFractionDigits: 0 })} total volume across ${q(H, M.data?.pageInfo?.hasMore)} records` : void 0,
661
- children: /* @__PURE__ */ w(te, {
713
+ footer: J.length > 0 ? `${o(Pe, { maximumFractionDigits: 0 })} total volume across ${q(H, j.data?.pageInfo?.hasMore)} records` : void 0,
714
+ children: /* @__PURE__ */ C(te, {
662
715
  series: J,
663
716
  height: 220,
664
717
  title: "Monthly production volume"
665
718
  })
666
- }), /* @__PURE__ */ w(I, {
719
+ }), /* @__PURE__ */ C(F, {
667
720
  title: "Commodity mix",
668
721
  caption: "Share of assets across your commodity streams.",
669
- icon: /* @__PURE__ */ w(he, { className: "h-4 w-4" }),
722
+ icon: /* @__PURE__ */ C(_e, { className: "h-4 w-4" }),
670
723
  link: {
671
724
  label: "Assets",
672
725
  onClick: () => t("assets")
@@ -676,13 +729,13 @@ function L() {
676
729
  onRetry: () => y.refetch(),
677
730
  isEmpty: Z.length === 0,
678
731
  emptyLabel: "No assets registered yet.",
679
- footer: Z.length > 0 ? `${q(N, y.data?.pageInfo?.hasMore)} assets · ${Z.length} ${Z.length === 1 ? "commodity" : "commodities"}` : void 0,
680
- children: /* @__PURE__ */ w("div", {
732
+ footer: Z.length > 0 ? `${q(I, y.data?.pageInfo?.hasMore)} assets · ${Z.length} ${Z.length === 1 ? "commodity" : "commodities"}` : void 0,
733
+ children: /* @__PURE__ */ C("div", {
681
734
  className: "flex items-center justify-center py-2",
682
- children: /* @__PURE__ */ w(b, {
735
+ children: /* @__PURE__ */ C(ne, {
683
736
  segments: Z,
684
737
  size: 168,
685
- centerLabel: o(N.length),
738
+ centerLabel: o(I.length),
686
739
  centerCaption: "assets",
687
740
  valueFormatter: (e) => o(e),
688
741
  title: "Assets by commodity"
@@ -690,57 +743,60 @@ function L() {
690
743
  })
691
744
  })]
692
745
  }),
693
- /* @__PURE__ */ w(_, {
746
+ /* @__PURE__ */ C(_, {
694
747
  title: "Commodity portfolio",
695
- description: "One model, every commodity — assets, capacity and output across your book.",
696
- children: y.isLoading ? /* @__PURE__ */ w(g, { label: "Loading commodities…" }) : y.isError ? /* @__PURE__ */ w(h, {
748
+ description: "One model, every commodity — assets, capacity, booked proved reserves and output across your book.",
749
+ children: y.isLoading ? /* @__PURE__ */ C(g, { label: "Loading commodities…" }) : y.isError ? /* @__PURE__ */ C(h, {
697
750
  message: "Couldn't load your commodity portfolio.",
698
751
  onRetry: () => y.refetch()
699
- }) : Ie.length === 0 ? /* @__PURE__ */ w(v, {
752
+ }) : Be.length === 0 ? /* @__PURE__ */ C(v, {
700
753
  illustration: "empty-data",
701
- icon: /* @__PURE__ */ w(ve, { className: "h-10 w-10" }),
754
+ icon: /* @__PURE__ */ C(be, { className: "h-10 w-10" }),
702
755
  title: "No commodities yet",
703
756
  description: "Register your first resource asset to build out your commodity portfolio."
704
- }) : /* @__PURE__ */ w("div", {
757
+ }) : /* @__PURE__ */ w(we, { children: [/* @__PURE__ */ C("div", {
705
758
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4",
706
- children: Ie.map((e) => /* @__PURE__ */ w(De, {
759
+ children: Be.map((e) => /* @__PURE__ */ C(Ae, {
707
760
  card: e,
708
761
  onOpen: () => t("assets")
709
762
  }, e.key))
710
- })
763
+ }), /* @__PURE__ */ C("p", {
764
+ className: "mt-3 text-xs text-text-tertiary",
765
+ children: M.isError ? "Proved reserves could not be loaded, so the proved column is blank — it is not a zero position." : M.isLoading ? "Loading booked proved reserves…" : "Proved reserves use the latest estimate booked per asset, totalled only within a single unit of measure."
766
+ })] })
711
767
  }),
712
- /* @__PURE__ */ T("div", {
768
+ /* @__PURE__ */ w("div", {
713
769
  className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-2",
714
- children: [/* @__PURE__ */ w(Ee, {
770
+ children: [/* @__PURE__ */ C(ke, {
715
771
  title: "Assets by lifecycle",
716
772
  description: "Where the portfolio sits from exploration to retirement.",
717
- icon: /* @__PURE__ */ w(_e, { className: "h-4 w-4" }),
773
+ icon: /* @__PURE__ */ C(ye, { className: "h-4 w-4" }),
718
774
  linkLabel: "Assets",
719
775
  onLink: () => t("assets"),
720
776
  isLoading: y.isLoading,
721
777
  isError: y.isError,
722
778
  onRetry: () => y.refetch(),
723
779
  emptyLabel: "No assets to profile yet.",
724
- bars: Pe,
725
- footer: N.length > 0 ? `${U} of ${q(N, y.data?.pageInfo?.hasMore)} currently producing` : void 0
726
- }), /* @__PURE__ */ w(I, {
780
+ bars: Re,
781
+ footer: I.length > 0 ? `${W} of ${q(I, y.data?.pageInfo?.hasMore)} currently producing` : void 0
782
+ }), /* @__PURE__ */ C(F, {
727
783
  title: "Emissions by scope",
728
784
  caption: "GHG Protocol Scope 1 / 2 / 3 — tonnes CO₂e logged.",
729
- icon: /* @__PURE__ */ w(ge, { className: "h-4 w-4" }),
785
+ icon: /* @__PURE__ */ C(ve, { className: "h-4 w-4" }),
730
786
  link: {
731
787
  label: "Emissions",
732
788
  onClick: () => t("emissions")
733
789
  },
734
- isLoading: D.isLoading,
735
- isError: D.isError,
736
- onRetry: () => D.refetch(),
737
- isEmpty: Ne.length === 0,
790
+ isLoading: E.isLoading,
791
+ isError: E.isError,
792
+ onRetry: () => E.refetch(),
793
+ isEmpty: Le.length === 0,
738
794
  emptyLabel: "No emission records logged yet.",
739
- footer: z.length > 0 ? `${l(G)} across ${q(z, D.data?.pageInfo?.hasMore)} records` : void 0,
740
- children: /* @__PURE__ */ w("div", {
795
+ footer: z.length > 0 ? `${l(G)} across ${q(z, E.data?.pageInfo?.hasMore)} records` : void 0,
796
+ children: /* @__PURE__ */ C("div", {
741
797
  className: "flex items-center justify-center py-2",
742
- children: /* @__PURE__ */ w(b, {
743
- segments: Ne,
798
+ children: /* @__PURE__ */ C(ne, {
799
+ segments: Le,
744
800
  size: 168,
745
801
  centerLabel: o(G, {
746
802
  notation: "compact",
@@ -753,60 +809,60 @@ function L() {
753
809
  })
754
810
  })]
755
811
  }),
756
- /* @__PURE__ */ w(_, {
812
+ /* @__PURE__ */ C(_, {
757
813
  title: "Recent offtake contracts",
758
814
  description: "Latest buy/sell agreements across your commodity book.",
759
- action: /* @__PURE__ */ T("button", {
815
+ action: /* @__PURE__ */ w("button", {
760
816
  type: "button",
761
817
  onClick: () => t("contracts"),
762
818
  className: "inline-flex items-center gap-1 text-sm font-medium text-action-primary-bg hover:underline",
763
- children: ["All contracts ", /* @__PURE__ */ w(S, { className: "h-4 w-4" })]
819
+ children: ["All contracts ", /* @__PURE__ */ C(x, { className: "h-4 w-4" })]
764
820
  }),
765
- children: C.isLoading ? /* @__PURE__ */ w(g, { label: "Loading contracts…" }) : C.isError ? /* @__PURE__ */ w(h, {
821
+ children: S.isLoading ? /* @__PURE__ */ C(g, { label: "Loading contracts…" }) : S.isError ? /* @__PURE__ */ C(h, {
766
822
  message: "Couldn't load contracts.",
767
- onRetry: () => C.refetch()
768
- }) : Re.length === 0 ? /* @__PURE__ */ w(v, {
823
+ onRetry: () => S.refetch()
824
+ }) : He.length === 0 ? /* @__PURE__ */ C(v, {
769
825
  illustration: "empty-data",
770
- icon: /* @__PURE__ */ w(ye, { className: "h-10 w-10" }),
826
+ icon: /* @__PURE__ */ C(xe, { className: "h-10 w-10" }),
771
827
  title: "No contracts yet",
772
828
  description: "Draft your first offtake contract to start tracking commodity trade."
773
- }) : /* @__PURE__ */ w(m, {
774
- columns: ze,
775
- rows: Re,
829
+ }) : /* @__PURE__ */ C(m, {
830
+ columns: We,
831
+ rows: He,
776
832
  rowKey: (e) => e.id,
777
833
  onRowClick: (e) => t(`contracts/${e.id}`),
778
834
  rowLabel: (e) => `Open contract ${e.reference}`
779
835
  })
780
836
  }),
781
- /* @__PURE__ */ w(_, {
837
+ /* @__PURE__ */ C(_, {
782
838
  title: "Recent production",
783
839
  description: "Latest metered output captured against your producing assets.",
784
- action: /* @__PURE__ */ T("button", {
840
+ action: /* @__PURE__ */ w("button", {
785
841
  type: "button",
786
842
  onClick: () => t("production"),
787
843
  className: "inline-flex items-center gap-1 text-sm font-medium text-action-primary-bg hover:underline",
788
- children: ["All production ", /* @__PURE__ */ w(S, { className: "h-4 w-4" })]
844
+ children: ["All production ", /* @__PURE__ */ C(x, { className: "h-4 w-4" })]
789
845
  }),
790
- children: M.isLoading ? /* @__PURE__ */ w(g, { label: "Loading production…" }) : M.isError ? /* @__PURE__ */ w(h, {
846
+ children: j.isLoading ? /* @__PURE__ */ C(g, { label: "Loading production…" }) : j.isError ? /* @__PURE__ */ C(h, {
791
847
  message: "Couldn't load production records.",
792
- onRetry: () => M.refetch()
793
- }) : Q.length === 0 ? /* @__PURE__ */ w(v, {
848
+ onRetry: () => j.refetch()
849
+ }) : Ue.length === 0 ? /* @__PURE__ */ C(v, {
794
850
  illustration: "empty-data",
795
- icon: /* @__PURE__ */ w(pe, { className: "h-10 w-10" }),
851
+ icon: /* @__PURE__ */ C(he, { className: "h-10 w-10" }),
796
852
  title: "No production logged yet",
797
853
  description: "Record production against an asset to build its output history."
798
- }) : /* @__PURE__ */ w(m, {
799
- columns: Be,
800
- rows: Q,
854
+ }) : /* @__PURE__ */ C(m, {
855
+ columns: Ge,
856
+ rows: Ue,
801
857
  rowKey: (e) => e.id,
802
858
  onRowClick: (e) => t(`assets/${e.assetId}`),
803
- rowLabel: (e) => `Open ${Le.get(e.assetId) ?? "asset"}`
859
+ rowLabel: (e) => `Open ${Ve.get(e.assetId) ?? "asset"}`
804
860
  })
805
861
  })
806
862
  ]
807
863
  });
808
864
  }
809
865
  //#endregion
810
- export { L as DashboardPage };
866
+ export { I as DashboardPage };
811
867
 
812
868
  //# sourceMappingURL=DashboardPage.js.map