@optifye/dashboard-core 5.0.0 → 6.0.0

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.
package/dist/index.js CHANGED
@@ -79,12 +79,15 @@ var DEFAULT_DATABASE_CONFIG = {
79
79
  }
80
80
  };
81
81
  var DEFAULT_ENTITY_CONFIG = {
82
- companyId: void 0,
83
- factoryId: void 0,
84
- defaultLineId: void 0,
85
- secondaryLineId: void 0,
82
+ companyId: "87ca8ebc-ef29-4543-9e12-efc526a9b669",
83
+ factoryId: "b3e44be4-730e-4276-b2ce-701c79d66ffa",
84
+ defaultLineId: "98a2287e-8d55-4020-b00d-b9940437e3e1",
85
+ secondaryLineId: "d93997bb-ecac-4478-a4a6-008d536b724c",
86
86
  factoryViewId: "factory",
87
- lineNames: {}
87
+ lineNames: {
88
+ "98a2287e-8d55-4020-b00d-b9940437e3e1": "Cell 8",
89
+ "d93997bb-ecac-4478-a4a6-008d536b724c": "Cell 7"
90
+ }
88
91
  };
89
92
  var DEFAULT_SHIFT_CONFIG = {
90
93
  dayShift: {
@@ -101,9 +104,12 @@ var DEFAULT_SHIFT_CONFIG = {
101
104
  };
102
105
  var DEFAULT_WORKSPACE_CONFIG = {
103
106
  displayNames: {
104
- "WS01": "fillin",
105
- "WS02": "Capping Station",
106
- "WS03": "Filling station"
107
+ "Cell 8 WS1": "Swaging 1",
108
+ "Cell 8 WS2": "Bond Testing 1",
109
+ "Cell 8 WS3": "QA Check 1",
110
+ "Cell 7 WS1": "Swaging 2",
111
+ "Cell 7 WS2": "Bond Testing 2",
112
+ "Cell 7 WS3": "QA Check 2"
107
113
  },
108
114
  specialWorkspaces: {
109
115
  startId: 19,
@@ -160,7 +166,8 @@ var DEFAULT_VIDEO_CONFIG = {
160
166
  useRAF: true
161
167
  }
162
168
  };
163
- var LINE_1_UUID = "910a224b-0abc-459a-babb-4c899824cfe7";
169
+ var LINE_1_UUID = "98a2287e-8d55-4020-b00d-b9940437e3e1";
170
+ var LINE_2_UUID = "d93997bb-ecac-4478-a4a6-008d536b724c";
164
171
  var DEFAULT_CONFIG = {
165
172
  apiBaseUrl: void 0,
166
173
  // No default base URL
@@ -3392,6 +3399,9 @@ var useDashboardMetrics = ({ onLineMetricsUpdate, lineId }) => {
3392
3399
  const databaseConfig = useDatabaseConfig();
3393
3400
  const dateTimeConfig = useDateTimeConfig();
3394
3401
  const shiftConfig = useShiftConfig();
3402
+ const defaultTimezone = dateTimeConfig?.defaultTimezone || "UTC";
3403
+ const configuredLineMetricsTable = databaseConfig?.tables?.lineMetrics ?? "line_metrics";
3404
+ const schema = databaseConfig?.schema ?? "public";
3395
3405
  const supabase = useSupabase();
3396
3406
  const [metrics2, setMetrics] = React14.useState(() => getCache(lineId) || { workspaceMetrics: [], lineMetrics: [] });
3397
3407
  const [isLoading, setIsLoading] = React14.useState(() => !getCache(lineId));
@@ -3404,9 +3414,6 @@ var useDashboardMetrics = ({ onLineMetricsUpdate, lineId }) => {
3404
3414
  () => getCompanyMetricsTableName(entityConfig.companyId, "performance_metrics"),
3405
3415
  [entityConfig.companyId]
3406
3416
  );
3407
- const configuredLineMetricsTable = databaseConfig.tables?.lineMetrics ?? "line_metrics";
3408
- const schema = databaseConfig.schema ?? "public";
3409
- const defaultTimezone = dateTimeConfig.defaultTimezone || "UTC";
3410
3417
  React14.useEffect(() => {
3411
3418
  lineIdRef.current = lineId;
3412
3419
  const cachedData = getCache(lineId);
@@ -3416,7 +3423,7 @@ var useDashboardMetrics = ({ onLineMetricsUpdate, lineId }) => {
3416
3423
  const fetchAllMetrics = React14.useCallback(async () => {
3417
3424
  const currentLineIdToUse = lineIdRef.current;
3418
3425
  if (!currentLineIdToUse || !supabase || isFetchingRef.current || companySpecificMetricsTable.includes("unknown_company")) {
3419
- if (!metrics2.workspaceMetrics.length && !metrics2.lineMetrics.length) setIsLoading(false);
3426
+ if (!metrics2?.workspaceMetrics?.length && !metrics2?.lineMetrics?.length) setIsLoading(false);
3420
3427
  if (companySpecificMetricsTable.includes("unknown_company") && !error) {
3421
3428
  setError({ message: "Company ID not configured for metrics table.", code: "CONFIG_ERROR" });
3422
3429
  }
@@ -3437,7 +3444,12 @@ var useDashboardMetrics = ({ onLineMetricsUpdate, lineId }) => {
3437
3444
  if (targetLineIds.length === 0) {
3438
3445
  throw new Error("No target line IDs available for fetching metrics.");
3439
3446
  }
3440
- const { data: workspaceData, error: workspaceError } = await supabase.from(companySpecificMetricsTable).select("company_id,line_id,shift_id,date,workspace_id,workspace_name,total_output,avg_pph,performance_score,avg_cycle_time,trend_score,ideal_output,efficiency,total_day_output").eq("date", operationalDate).eq("shift_id", currentShiftDetails.shiftId).in("line_id", targetLineIds);
3447
+ const isFactoryView = currentLineIdToUse === (entityConfig.factoryViewId || "factory");
3448
+ let workspaceQuery = supabase.from(companySpecificMetricsTable).select("company_id,line_id,shift_id,date,workspace_id,workspace_name,total_output,avg_pph,performance_score,avg_cycle_time,trend_score,ideal_output,efficiency,total_day_output").eq("date", operationalDate).eq("shift_id", currentShiftDetails.shiftId);
3449
+ if (!isFactoryView) {
3450
+ workspaceQuery = workspaceQuery.in("line_id", targetLineIds);
3451
+ }
3452
+ const { data: workspaceData, error: workspaceError } = await workspaceQuery;
3441
3453
  if (workspaceError) {
3442
3454
  throw workspaceError;
3443
3455
  }
@@ -3468,7 +3480,11 @@ var useDashboardMetrics = ({ onLineMetricsUpdate, lineId }) => {
3468
3480
  const wsNumB = parseInt(b.workspace_name?.replace(/[^0-9]/g, "") || "0");
3469
3481
  return wsNumA - wsNumB;
3470
3482
  });
3471
- const { data: lineData, error: lineError } = await supabase.from(configuredLineMetricsTable).select("*").eq("date", operationalDate).eq("shift_id", currentShiftDetails.shiftId).in("line_id", targetLineIds);
3483
+ let lineMetricsQuery = supabase.from(configuredLineMetricsTable).select("*").eq("date", operationalDate).eq("shift_id", currentShiftDetails.shiftId);
3484
+ if (!isFactoryView) {
3485
+ lineMetricsQuery = lineMetricsQuery.in("line_id", targetLineIds);
3486
+ }
3487
+ const { data: lineData, error: lineError } = await lineMetricsQuery;
3472
3488
  if (lineError) {
3473
3489
  throw lineError;
3474
3490
  }
@@ -3488,9 +3504,9 @@ var useDashboardMetrics = ({ onLineMetricsUpdate, lineId }) => {
3488
3504
  }
3489
3505
  }, [
3490
3506
  supabase,
3491
- metrics2.workspaceMetrics.length,
3507
+ metrics2?.workspaceMetrics?.length || 0,
3492
3508
  // To re-evaluate setIsLoading in fetchAllMetrics if called directly
3493
- metrics2.lineMetrics.length,
3509
+ metrics2?.lineMetrics?.length || 0,
3494
3510
  // To re-evaluate setIsLoading in fetchAllMetrics if called directly
3495
3511
  companySpecificMetricsTable,
3496
3512
  configuredLineMetricsTable,
@@ -3578,8 +3594,8 @@ var useDashboardMetrics = ({ onLineMetricsUpdate, lineId }) => {
3578
3594
  // Add lineId from props to re-run effect if it changes, managed by lineIdRef inside effect
3579
3595
  ]);
3580
3596
  return {
3581
- workspaceMetrics: metrics2.workspaceMetrics,
3582
- lineMetrics: metrics2.lineMetrics,
3597
+ workspaceMetrics: metrics2?.workspaceMetrics || [],
3598
+ lineMetrics: metrics2?.lineMetrics || [],
3583
3599
  isLoading,
3584
3600
  error,
3585
3601
  refetch: fetchAllMetrics
@@ -3612,6 +3628,7 @@ var setCache2 = (lineId, data) => {
3612
3628
  var useLineKPIs = ({ lineId }) => {
3613
3629
  useDashboardConfig();
3614
3630
  const entityConfig = useEntityConfig();
3631
+ const isFactoryView = lineId === (entityConfig.factoryViewId || "factory");
3615
3632
  const databaseConfig = useDatabaseConfig();
3616
3633
  const dateTimeConfig = useDateTimeConfig();
3617
3634
  const shiftConfig = useShiftConfig();
@@ -3669,7 +3686,7 @@ var useLineKPIs = ({ lineId }) => {
3669
3686
  isFetchingRef.current = false;
3670
3687
  updateQueueRef.current = false;
3671
3688
  }
3672
- }, [dashboardServiceInstance, kpis, defaultTimezone, shiftConfig, entityConfig.companyId]);
3689
+ }, [dashboardServiceInstance, kpis, defaultTimezone, shiftConfig, entityConfig.companyId, isFactoryView]);
3673
3690
  const queueUpdate = React14.useCallback(() => {
3674
3691
  if (updateQueueRef.current) return;
3675
3692
  updateQueueRef.current = true;
@@ -3744,7 +3761,7 @@ var useLineKPIs = ({ lineId }) => {
3744
3761
  }
3745
3762
  activeChannels.forEach((ch) => supabase.removeChannel(ch).catch((err) => console.error("[useLineKPIs] Error removing KPI channel:", err)));
3746
3763
  };
3747
- }, [supabase, lineId, fetchKPIs, queueUpdate, dashboardServiceInstance, entityConfig, schema, lineMetricsTable, companySpecificMetricsTable, defaultTimezone, shiftConfig, kpis]);
3764
+ }, [supabase, lineId, fetchKPIs, queueUpdate, dashboardServiceInstance, entityConfig, schema, lineMetricsTable, companySpecificMetricsTable, defaultTimezone, shiftConfig, kpis, isFactoryView]);
3748
3765
  return {
3749
3766
  kpis,
3750
3767
  isLoading,
@@ -5180,6 +5197,120 @@ var useActiveBreaks = (lineIds) => {
5180
5197
  error
5181
5198
  };
5182
5199
  };
5200
+ var useAllWorkspaceMetrics = (options) => {
5201
+ const entityConfig = useEntityConfig();
5202
+ const databaseConfig = useDatabaseConfig();
5203
+ const dateTimeConfig = useDateTimeConfig();
5204
+ const shiftConfig = useShiftConfig();
5205
+ const supabase = useSupabase();
5206
+ const [workspaces, setWorkspaces] = React14.useState([]);
5207
+ const [loading, setLoading] = React14.useState(true);
5208
+ const [error, setError] = React14.useState(null);
5209
+ const [initialized, setInitialized] = React14.useState(false);
5210
+ const queryShiftId = React14.useMemo(() => {
5211
+ const currentShift = getCurrentShift(
5212
+ dateTimeConfig.defaultTimezone || "Asia/Kolkata",
5213
+ shiftConfig
5214
+ );
5215
+ return options?.initialShiftId !== void 0 ? options.initialShiftId : currentShift.shiftId;
5216
+ }, [options?.initialShiftId, dateTimeConfig.defaultTimezone, shiftConfig]);
5217
+ const queryDate = React14.useMemo(() => {
5218
+ return options?.initialDate || getOperationalDate(dateTimeConfig.defaultTimezone);
5219
+ }, [options?.initialDate, dateTimeConfig.defaultTimezone]);
5220
+ const metricsTable = React14.useMemo(() => {
5221
+ const companyId = entityConfig.companyId;
5222
+ if (!companyId) return "";
5223
+ const metricsTablePrefix = getMetricsTablePrefix();
5224
+ return `${metricsTablePrefix}_${companyId.replace(/-/g, "_")}`;
5225
+ }, [entityConfig.companyId]);
5226
+ const schema = databaseConfig.schema ?? "public";
5227
+ const fetchWorkspaceMetrics = React14.useCallback(async () => {
5228
+ if (!initialized) {
5229
+ setLoading(true);
5230
+ }
5231
+ setError(null);
5232
+ try {
5233
+ console.log("Fetching all workspace metrics with params:", {
5234
+ queryDate,
5235
+ queryShiftId,
5236
+ metricsTable
5237
+ });
5238
+ const { data, error: fetchError } = await supabase.from(metricsTable).select(`
5239
+ workspace_name,
5240
+ total_output,
5241
+ avg_pph,
5242
+ efficiency,
5243
+ workspace_id,
5244
+ avg_cycle_time,
5245
+ performance_score,
5246
+ trend_score,
5247
+ line_id,
5248
+ total_day_output
5249
+ `).eq("date", queryDate).eq("shift_id", queryShiftId).order("efficiency", { ascending: false });
5250
+ if (fetchError) throw fetchError;
5251
+ const transformedData = (data || []).map((item) => ({
5252
+ company_id: entityConfig.companyId || "unknown",
5253
+ line_id: item.line_id,
5254
+ shift_id: queryShiftId,
5255
+ date: queryDate,
5256
+ workspace_uuid: item.workspace_id,
5257
+ workspace_name: item.workspace_name,
5258
+ action_count: item.total_output || 0,
5259
+ pph: item.avg_pph || 0,
5260
+ performance_score: item.performance_score || 0,
5261
+ avg_cycle_time: item.avg_cycle_time || 0,
5262
+ trend: item.trend_score === 1 ? 2 : 0,
5263
+ predicted_output: 0,
5264
+ efficiency: item.efficiency || 0,
5265
+ action_threshold: item.total_day_output || 0
5266
+ }));
5267
+ setWorkspaces(transformedData);
5268
+ setInitialized(true);
5269
+ } catch (err) {
5270
+ console.error("Error fetching all workspace metrics:", err);
5271
+ setError({ message: err.message, code: err.code || "FETCH_ERROR" });
5272
+ } finally {
5273
+ setLoading(false);
5274
+ }
5275
+ }, [queryDate, queryShiftId, metricsTable, supabase, entityConfig.companyId]);
5276
+ React14.useEffect(() => {
5277
+ if (!initialized) {
5278
+ fetchWorkspaceMetrics();
5279
+ }
5280
+ const setupSubscription = () => {
5281
+ const filter2 = `date=eq.${queryDate} AND shift_id=eq.${queryShiftId}`;
5282
+ console.log("Setting up subscription for all workspaces with filter:", filter2);
5283
+ const channel2 = supabase.channel(`all-workspace-metrics-${Date.now()}`).on(
5284
+ "postgres_changes",
5285
+ {
5286
+ event: "*",
5287
+ schema,
5288
+ table: metricsTable,
5289
+ filter: filter2
5290
+ },
5291
+ async (payload) => {
5292
+ console.log("All workspace metrics update received:", payload);
5293
+ await fetchWorkspaceMetrics();
5294
+ }
5295
+ ).subscribe();
5296
+ return channel2;
5297
+ };
5298
+ const channel = setupSubscription();
5299
+ return () => {
5300
+ if (channel) {
5301
+ supabase.removeChannel(channel);
5302
+ }
5303
+ };
5304
+ }, [queryDate, queryShiftId, metricsTable, fetchWorkspaceMetrics, initialized, supabase, schema]);
5305
+ React14.useEffect(() => {
5306
+ setInitialized(false);
5307
+ }, [queryDate, queryShiftId]);
5308
+ const refreshWorkspaces = fetchWorkspaceMetrics;
5309
+ return React14.useMemo(
5310
+ () => ({ workspaces, loading, error, refreshWorkspaces }),
5311
+ [workspaces, loading, error, refreshWorkspaces]
5312
+ );
5313
+ };
5183
5314
  var MAX_RETRIES = 10;
5184
5315
  var RETRY_DELAY = 500;
5185
5316
  function useNavigation(customNavigate) {
@@ -5226,8 +5357,8 @@ function useNavigation(customNavigate) {
5226
5357
  router$1.push("/shifts");
5227
5358
  }, [router$1]);
5228
5359
  const goToLeaderboard = React14.useCallback(() => {
5229
- const lineId = entityConfig?.defaultLineId || "line-1";
5230
- router$1.push(`/leaderboard/${lineId}`);
5360
+ entityConfig?.defaultLineId || "line-1";
5361
+ router$1.push(`/leaderboard`);
5231
5362
  }, [router$1, entityConfig?.defaultLineId]);
5232
5363
  const goToFactoryView = React14.useCallback(() => {
5233
5364
  router$1.push("/factory-view");
@@ -17367,7 +17498,8 @@ var VideoCard = React14__namespace.default.memo(({
17367
17498
  cropping,
17368
17499
  canvasFps = 30,
17369
17500
  useRAF = true,
17370
- className = ""
17501
+ className = "",
17502
+ compact = false
17371
17503
  }) => {
17372
17504
  const videoRef = React14.useRef(null);
17373
17505
  const canvasRef = React14.useRef(null);
@@ -17431,15 +17563,15 @@ var VideoCard = React14__namespace.default.memo(({
17431
17563
  }
17432
17564
  },
17433
17565
  children: [
17434
- isVeryLowEfficiency && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1 left-2 z-30", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
17566
+ isVeryLowEfficiency && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `absolute ${compact ? "top-0.5 left-1" : "top-1 left-2"} z-30`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
17435
17567
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -inset-1 bg-red-400/50 rounded-full blur-sm animate-pulse" }),
17436
17568
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -inset-0.5 bg-red-500/30 rounded-full blur-md animate-ping [animation-duration:1.5s]" }),
17437
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-[#E34329] w-5 h-5 rounded-full flex items-center justify-center text-white font-bold text-xs shadow-lg ring-2 ring-red-400/40 border border-red-400/80 animate-pulse", children: "!" })
17569
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `bg-[#E34329] ${compact ? "w-4 h-4" : "w-5 h-5"} rounded-full flex items-center justify-center text-white font-bold ${compact ? "text-[10px]" : "text-xs"} shadow-lg ring-2 ring-red-400/40 border border-red-400/80 animate-pulse`, children: "!" })
17438
17570
  ] }) }),
17439
17571
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative w-full h-full overflow-hidden bg-black", children: [
17440
17572
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black z-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "animate-pulse flex flex-col items-center", children: [
17441
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Camera, { className: "w-6 h-6 text-gray-500" }),
17442
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-gray-500 mt-1", children: "Loading..." })
17573
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Camera, { className: `${compact ? "w-4 h-4" : "w-6 h-6"} text-gray-500` }),
17574
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${compact ? "text-[10px]" : "text-xs"} text-gray-500 mt-1`, children: "Loading..." })
17443
17575
  ] }) }),
17444
17576
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 z-10", children: [
17445
17577
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -17462,11 +17594,11 @@ var VideoCard = React14__namespace.default.memo(({
17462
17594
  )
17463
17595
  ] }),
17464
17596
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: `absolute inset-0 z-20 pointer-events-none ${efficiencyOverlayClass}` }),
17465
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-2 right-2 z-30 bg-black/70 backdrop-blur-sm rounded px-2 py-0.5 text-white text-xs font-semibold border border-white/10", children: [
17597
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `absolute ${compact ? "top-1 right-1" : "top-2 right-2"} z-30 bg-black/70 backdrop-blur-sm rounded ${compact ? "px-1.5 py-0.5" : "px-2 py-0.5"} text-white ${compact ? "text-[10px]" : "text-xs"} font-semibold border border-white/10`, children: [
17466
17598
  Math.round(workspace.efficiency),
17467
17599
  "%"
17468
17600
  ] }),
17469
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-0 left-0 right-0 h-1 bg-black/50 z-30", children: /* @__PURE__ */ jsxRuntime.jsx(
17601
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `absolute bottom-0 left-0 right-0 ${compact ? "h-0.5" : "h-1"} bg-black/50 z-30`, children: /* @__PURE__ */ jsxRuntime.jsx(
17470
17602
  "div",
17471
17603
  {
17472
17604
  className: `h-full ${efficiencyBarClass} transition-all duration-500`,
@@ -17474,22 +17606,22 @@ var VideoCard = React14__namespace.default.memo(({
17474
17606
  }
17475
17607
  ) })
17476
17608
  ] }),
17477
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute bottom-0 left-0 right-0 bg-black bg-opacity-60 p-1.5 flex justify-between items-center z-10", children: [
17609
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `absolute bottom-0 left-0 right-0 bg-black bg-opacity-60 ${compact ? "p-1" : "p-1.5"} flex justify-between items-center z-10`, children: [
17478
17610
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
17479
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Camera, { size: 12, className: "text-white" }),
17480
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-white text-xs font-medium tracking-wide", children: displayName })
17611
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Camera, { size: compact ? 10 : 12, className: "text-white" }),
17612
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-white ${compact ? "text-[10px]" : "text-xs"} font-medium tracking-wide`, children: displayName })
17481
17613
  ] }),
17482
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
17614
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-center ${compact ? "gap-1" : "gap-1.5"}`, children: [
17483
17615
  trendInfo && /* @__PURE__ */ jsxRuntime.jsx(
17484
17616
  "div",
17485
17617
  {
17486
- className: `text-lg ${trendInfo.color}`,
17618
+ className: `${compact ? "text-sm" : "text-lg"} ${trendInfo.color}`,
17487
17619
  style: { lineHeight: 1, display: "flex", alignItems: "center" },
17488
17620
  children: trendInfo.arrow
17489
17621
  }
17490
17622
  ),
17491
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-1.5 h-1.5 rounded-full bg-green-500" }),
17492
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-white text-xs", children: "Live" })
17623
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${compact ? "w-1 h-1" : "w-1.5 h-1.5"} rounded-full bg-green-500` }),
17624
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-white ${compact ? "text-[10px]" : "text-xs"}`, children: "Live" })
17493
17625
  ] })
17494
17626
  ] })
17495
17627
  ]
@@ -17581,15 +17713,15 @@ var VideoGridView = React14__namespace.default.memo(({
17581
17713
  let bestScore = 0;
17582
17714
  const targetAspectRatio = 16 / 9;
17583
17715
  const gap = 8;
17584
- const maxCols = Math.min(count, 6);
17716
+ const maxCols = Math.min(count, selectedLine ? 6 : 12);
17585
17717
  for (let cols = 1; cols <= maxCols; cols++) {
17586
17718
  const rows = Math.ceil(count / cols);
17587
17719
  const availableWidth = containerWidth - gap * (cols - 1);
17588
17720
  const availableHeight = containerHeight - gap * (rows - 1);
17589
17721
  const cellWidth = availableWidth / cols;
17590
17722
  const cellHeight = availableHeight / rows;
17591
- const minCellWidth = containerWidth < 800 ? 120 : 150;
17592
- const minCellHeight = containerHeight < 600 ? 80 : 100;
17723
+ const minCellWidth = selectedLine ? containerWidth < 800 ? 120 : 150 : containerWidth < 800 ? 80 : 100;
17724
+ const minCellHeight = selectedLine ? containerHeight < 600 ? 80 : 100 : containerHeight < 600 ? 60 : 80;
17593
17725
  if (cellWidth < minCellWidth || cellHeight < minCellHeight) continue;
17594
17726
  const totalUsedArea = cellWidth * cellHeight * count;
17595
17727
  const totalAvailableArea = containerWidth * containerHeight;
@@ -17606,7 +17738,7 @@ var VideoGridView = React14__namespace.default.memo(({
17606
17738
  bestCols = Math.ceil(Math.sqrt(count));
17607
17739
  }
17608
17740
  setGridCols(bestCols);
17609
- }, [filteredWorkspaces.length]);
17741
+ }, [filteredWorkspaces.length, selectedLine]);
17610
17742
  React14.useEffect(() => {
17611
17743
  calculateOptimalGrid();
17612
17744
  const handleResize = () => calculateOptimalGrid();
@@ -17697,7 +17829,8 @@ var VideoGridView = React14__namespace.default.memo(({
17697
17829
  isVeryLowEfficiency,
17698
17830
  cropping: workspaceCropping,
17699
17831
  canvasFps: canvasConfig?.fps,
17700
- useRAF: canvasConfig?.useRAF
17832
+ useRAF: canvasConfig?.useRAF,
17833
+ compact: !selectedLine
17701
17834
  }
17702
17835
  )
17703
17836
  },
@@ -21659,7 +21792,7 @@ var S3ClipsService = class {
21659
21792
  }
21660
21793
  return summary;
21661
21794
  }
21662
- const limitPerCategory = limit ? Math.min(Math.max(limit, 1), 200) : 30;
21795
+ const limitPerCategory = limit ? Math.min(Math.max(limit, 1), 1e3) : 30;
21663
21796
  const shouldFetchAll = category === "missing_quality_check" || category === "low_value";
21664
21797
  const initialFetchLimit = shouldFetchAll ? void 0 : category ? limitPerCategory * 3 : void 0;
21665
21798
  const s3Uris = await this.listS3Clips({ workspaceId, date, shiftId, maxKeys: initialFetchLimit });
@@ -23501,7 +23634,7 @@ var KPISection = React14.memo(({
23501
23634
  });
23502
23635
  KPISection.displayName = "KPISection";
23503
23636
  var ISTTimer2 = ISTTimer_default;
23504
- var DashboardHeader = React14.memo(({ lineTitle, className = "" }) => {
23637
+ var DashboardHeader = React14.memo(({ lineTitle, className = "", headerControls }) => {
23505
23638
  const getShiftName = () => {
23506
23639
  const now2 = /* @__PURE__ */ new Date();
23507
23640
  const currentHour = now2.getHours();
@@ -23515,30 +23648,33 @@ var DashboardHeader = React14.memo(({ lineTitle, className = "" }) => {
23515
23648
  return /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" }) });
23516
23649
  }
23517
23650
  };
23518
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-col ${className}`, children: [
23519
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 sm:gap-2 md:gap-3", children: [
23520
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-base sm:text-xl md:text-2xl lg:text-3xl font-bold text-gray-800 tracking-tight leading-none", children: lineTitle }),
23521
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-1 w-1 sm:h-1.5 sm:w-1.5 md:h-2 md:w-2 rounded-full bg-green-500 animate-pulse ring-1 sm:ring-2 ring-green-500/30 ring-offset-1" })
23522
- ] }),
23523
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 inline-flex items-center gap-3", children: [
23524
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm font-medium text-gray-600", children: [
23525
- /* @__PURE__ */ jsxRuntime.jsx(ISTTimer2, {}),
23526
- " IST"
23651
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-row items-center justify-between w-full ${className}`, children: [
23652
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
23653
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 sm:gap-2 md:gap-3", children: [
23654
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-base sm:text-xl md:text-2xl lg:text-3xl font-bold text-gray-800 tracking-tight leading-none", children: lineTitle }),
23655
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-1 w-1 sm:h-1.5 sm:w-1.5 md:h-2 md:w-2 rounded-full bg-green-500 animate-pulse ring-1 sm:ring-2 ring-green-500/30 ring-offset-1" })
23527
23656
  ] }),
23528
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center gap-1", children: [
23529
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-gray-600", children: getShiftIcon() }),
23530
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-medium text-gray-600", children: [
23531
- getShiftName(),
23532
- " Shift"
23657
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 inline-flex items-center gap-3", children: [
23658
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm font-medium text-gray-600", children: [
23659
+ /* @__PURE__ */ jsxRuntime.jsx(ISTTimer2, {}),
23660
+ " IST"
23661
+ ] }),
23662
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center gap-1", children: [
23663
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-gray-600", children: getShiftIcon() }),
23664
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-medium text-gray-600", children: [
23665
+ getShiftName(),
23666
+ " Shift"
23667
+ ] })
23533
23668
  ] })
23534
23669
  ] })
23535
- ] })
23670
+ ] }),
23671
+ headerControls && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-4", children: headerControls })
23536
23672
  ] });
23537
23673
  });
23538
23674
  DashboardHeader.displayName = "DashboardHeader";
23539
- var NoWorkspaceData = React14.memo(({ className = "" }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-full items-center justify-center ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg bg-white p-4 shadow-md", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2 text-gray-500", children: [
23675
+ var NoWorkspaceData = React14.memo(({ message = "No workspace data available", className = "" }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-full items-center justify-center ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg bg-white p-4 shadow-md", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2 text-gray-500", children: [
23540
23676
  /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z", clipRule: "evenodd" }) }),
23541
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "No workspace data available" })
23677
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: message })
23542
23678
  ] }) }) }));
23543
23679
  NoWorkspaceData.displayName = "NoWorkspaceData";
23544
23680
  var WorkspaceMonthlyDataFetcher = ({
@@ -23880,15 +24016,14 @@ var SideNavBar = React14.memo(({
23880
24016
  }
23881
24017
  }
23882
24018
  }), [navigate, lineId]);
23883
- const handleLeaderboardClick = React14.useCallback(() => navigate(`/leaderboard/${lineId}`, {
24019
+ const handleLeaderboardClick = React14.useCallback(() => navigate(`/leaderboard`, {
23884
24020
  trackingEvent: {
23885
24021
  name: "Leaderboard Page Clicked",
23886
24022
  properties: {
23887
- source: "side_nav",
23888
- line_id: lineId
24023
+ source: "side_nav"
23889
24024
  }
23890
24025
  }
23891
- }), [navigate, lineId]);
24026
+ }), [navigate]);
23892
24027
  const handleKPIsClick = React14.useCallback(() => navigate(`/kpis`, {
23893
24028
  trackingEvent: {
23894
24029
  name: "KPI Page Clicked",
@@ -27220,8 +27355,8 @@ var LoadingOverlayCmp = LoadingOverlay_default;
27220
27355
  function HomeView({
27221
27356
  defaultLineId,
27222
27357
  factoryViewId,
27223
- line1Uuid,
27224
- line2Uuid,
27358
+ lineIds: allLineIds = [],
27359
+ // Default to empty array
27225
27360
  lineNames,
27226
27361
  videoSources = {
27227
27362
  workspaceHlsUrls: {},
@@ -27230,6 +27365,7 @@ function HomeView({
27230
27365
  factoryName = "Simba Beer - Line 1"
27231
27366
  }) {
27232
27367
  const [isHydrated, setIsHydrated] = React14.useState(false);
27368
+ const availableLineIds = React14.useMemo(() => [factoryViewId, ...allLineIds], [factoryViewId, allLineIds]);
27233
27369
  const [selectedLineId, setSelectedLineId] = React14.useState(defaultLineId);
27234
27370
  const [isChangingFilter, setIsChangingFilter] = React14.useState(false);
27235
27371
  const [errorMessage, setErrorMessage] = React14.useState(null);
@@ -27311,18 +27447,24 @@ function HomeView({
27311
27447
  setErrorMessage(null);
27312
27448
  }
27313
27449
  }, [metricsError, kpisError]);
27314
- React14.useCallback((e) => {
27450
+ const handleLineChange = React14.useCallback((value) => {
27315
27451
  setIsChangingFilter(true);
27316
- setSelectedLineId(e.target.value);
27452
+ setSelectedLineId(value);
27317
27453
  }, []);
27318
27454
  React14.useEffect(() => {
27319
- if (!metricsLoading && !kpisLoading && isChangingFilter && workspaceMetrics.length > 0) {
27320
- setIsChangingFilter(false);
27455
+ if (!metricsLoading && !kpisLoading && isChangingFilter) {
27456
+ if (workspaceMetrics.length > 0 || selectedLineId === factoryViewId) {
27457
+ setIsChangingFilter(false);
27458
+ }
27321
27459
  }
27322
- }, [metricsLoading, kpisLoading, workspaceMetrics, isChangingFilter]);
27460
+ }, [metricsLoading, kpisLoading, workspaceMetrics, isChangingFilter, selectedLineId, factoryViewId]);
27323
27461
  const lineTitle = React14.useMemo(() => {
27324
27462
  return factoryName;
27325
27463
  }, [factoryName]);
27464
+ const lineSelectorComponent = React14.useMemo(() => /* @__PURE__ */ jsxRuntime.jsxs(Select, { onValueChange: handleLineChange, defaultValue: selectedLineId, children: [
27465
+ /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "w-full sm:w-[200px] bg-white border border-gray-200 shadow-sm rounded-md h-9 text-sm", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: "Select a line" }) }),
27466
+ /* @__PURE__ */ jsxRuntime.jsx(SelectContent, { className: "z-50 bg-white shadow-lg border border-gray-200 rounded-md", children: availableLineIds.map((id3) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: id3, children: lineNames[id3] || (id3 === factoryViewId ? "All Lines" : `Line ${id3.substring(0, 4)}`) }, id3)) })
27467
+ ] }), [availableLineIds, handleLineChange, selectedLineId, lineNames, factoryViewId]);
27326
27468
  const isLoading = !isHydrated || metricsLoading || kpisLoading || isChangingFilter || displayNamesLoading || !displayNamesInitialized;
27327
27469
  if (isLoading) {
27328
27470
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-screen bg-slate-50", children: /* @__PURE__ */ jsxRuntime.jsx(LoadingPageCmp, { message: "Loading dashboard..." }) });
@@ -27336,7 +27478,7 @@ function HomeView({
27336
27478
  ] })
27337
27479
  ] }) }) });
27338
27480
  }
27339
- if ((metricsLoading || kpisLoading) && (!workspaceMetrics || workspaceMetrics.length === 0)) {
27481
+ if ((metricsLoading || kpisLoading) && (!workspaceMetrics || workspaceMetrics.length === 0) && selectedLineId !== factoryViewId) {
27340
27482
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-screen bg-slate-50", children: /* @__PURE__ */ jsxRuntime.jsx(LoadingPageCmp, { message: "Loading metrics..." }) });
27341
27483
  }
27342
27484
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -27347,28 +27489,36 @@ function HomeView({
27347
27489
  animate: { opacity: 1 },
27348
27490
  children: [
27349
27491
  /* @__PURE__ */ jsxRuntime.jsx(LoadingOverlayCmp, { isVisible: isChangingFilter, message: "Loading new metrics..." }),
27350
- /* @__PURE__ */ jsxRuntime.jsxs("main", { className: "flex flex-1 flex-col", children: [
27351
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-0 z-10 sm:static bg-white shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between px-3 sm:px-6 lg:px-8 py-1.5 sm:py-2.5", children: [
27352
- /* @__PURE__ */ jsxRuntime.jsx(DashboardHeader, { lineTitle, className: "mb-1 sm:mb-0" }),
27353
- memoizedKPIs && /* @__PURE__ */ jsxRuntime.jsx(KPISection2, { kpis: memoizedKPIs, className: "w-full sm:w-auto" })
27354
- ] }) }),
27355
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto sm:overflow-hidden", children: memoizedWorkspaceMetrics.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full sm:h-full min-h-[calc(100vh-80px)] sm:min-h-0", children: React14__namespace.default.createElement(WorkspaceGrid, {
27356
- workspaces: memoizedWorkspaceMetrics,
27357
- lineNames,
27358
- factoryView: factoryViewId,
27359
- line2Uuid,
27360
- videoSources,
27361
- className: "h-full"
27362
- }) }) : /* @__PURE__ */ jsxRuntime.jsx(NoWorkspaceData, {}) })
27363
- ] }),
27364
- /* @__PURE__ */ jsxRuntime.jsx(
27365
- BreakNotificationPopup,
27366
- {
27367
- activeBreaks,
27368
- lineNames,
27369
- isVisible: !breaksLoading && !breaksError
27370
- }
27371
- )
27492
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-1", children: [
27493
+ /* @__PURE__ */ jsxRuntime.jsxs("main", { className: "flex flex-1 flex-col", children: [
27494
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-0 z-30 sm:static bg-white shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between px-3 sm:px-6 lg:px-8 py-1.5 sm:py-2.5", children: /* @__PURE__ */ jsxRuntime.jsx(
27495
+ DashboardHeader,
27496
+ {
27497
+ lineTitle,
27498
+ className: "w-full",
27499
+ headerControls: memoizedKPIs ? /* @__PURE__ */ jsxRuntime.jsx(KPISection2, { kpis: memoizedKPIs, className: "w-full sm:w-auto" }) : null
27500
+ }
27501
+ ) }) }),
27502
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-y-auto sm:overflow-hidden relative", children: [
27503
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-3 top-2 sm:right-6 sm:top-3 z-30", children: lineSelectorComponent }),
27504
+ memoizedWorkspaceMetrics.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full sm:h-full min-h-[calc(100vh-80px)] sm:min-h-0", children: React14__namespace.default.createElement(WorkspaceGrid, {
27505
+ workspaces: memoizedWorkspaceMetrics,
27506
+ lineNames,
27507
+ factoryView: factoryViewId,
27508
+ videoSources,
27509
+ className: "h-full"
27510
+ }) }) : /* @__PURE__ */ jsxRuntime.jsx(NoWorkspaceData, { message: "No workspace data available. Select another line or check configurations." })
27511
+ ] })
27512
+ ] }),
27513
+ /* @__PURE__ */ jsxRuntime.jsx(
27514
+ BreakNotificationPopup,
27515
+ {
27516
+ activeBreaks,
27517
+ lineNames,
27518
+ isVisible: !breaksLoading && !breaksError
27519
+ }
27520
+ )
27521
+ ] })
27372
27522
  ]
27373
27523
  }
27374
27524
  );
@@ -27532,7 +27682,7 @@ var BottomSection = React14.memo(({
27532
27682
  "div",
27533
27683
  {
27534
27684
  className: "p-1.5 hover:bg-gray-100 rounded-lg transition-colors cursor-pointer",
27535
- onClick: () => handleNavigate && handleNavigate(`/leaderboard/${lineInfo?.line_id}`),
27685
+ onClick: () => handleNavigate && handleNavigate(`/leaderboard`),
27536
27686
  children: /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowRightIcon, { className: "w-5 h-5 text-gray-500" })
27537
27687
  }
27538
27688
  )
@@ -28631,7 +28781,7 @@ var LeaderboardDetailView = React14.memo(({
28631
28781
  className = ""
28632
28782
  }) => {
28633
28783
  const navigation = useNavigation();
28634
- const [sortAscending, setSortAscending] = React14.useState(true);
28784
+ const [sortAscending, setSortAscending] = React14.useState(false);
28635
28785
  const handleSortToggle = React14.useCallback(() => {
28636
28786
  setSortAscending(!sortAscending);
28637
28787
  }, [sortAscending]);
@@ -28647,13 +28797,15 @@ var LeaderboardDetailView = React14.memo(({
28647
28797
  error: metricsError,
28648
28798
  refreshMetrics
28649
28799
  } = useRealtimeLineMetrics(realtimeMetricsParams);
28650
- const memoizedLineId = React14.useMemo(() => lineId || "", [lineId]);
28651
28800
  const {
28652
28801
  workspaces,
28653
28802
  loading: workspacesLoading,
28654
28803
  error: workspacesError,
28655
28804
  refreshWorkspaces
28656
- } = useLineWorkspaceMetrics(memoizedLineId);
28805
+ } = useAllWorkspaceMetrics({
28806
+ initialDate: date,
28807
+ initialShiftId: typeof shift === "number" ? shift : typeof shift === "string" ? parseInt(shift) : void 0
28808
+ });
28657
28809
  const getShiftName = React14.useCallback((shiftId) => {
28658
28810
  if (shiftId === void 0) return "Day";
28659
28811
  return shiftId === 0 ? "Day" : "Night";
@@ -28707,7 +28859,7 @@ var LeaderboardDetailView = React14.memo(({
28707
28859
  });
28708
28860
  const displayName = getWorkspaceDisplayName(workspace.workspace_name);
28709
28861
  const navParams = workspace.workspace_uuid ? getWorkspaceNavigationParams(workspace.workspace_uuid, displayName) : "";
28710
- const returnToParam = `&returnTo=${encodeURIComponent(`/leaderboard/${lineId}`)}`;
28862
+ const returnToParam = `&returnTo=${encodeURIComponent(`/leaderboard`)}`;
28711
28863
  if (onWorkspaceClick) {
28712
28864
  onWorkspaceClick(workspace, rank);
28713
28865
  } else {
@@ -32247,6 +32399,7 @@ exports.KPIHeader = KPIHeader;
32247
32399
  exports.KPISection = KPISection;
32248
32400
  exports.KPIsOverviewView = KPIsOverviewView_default;
32249
32401
  exports.LINE_1_UUID = LINE_1_UUID;
32402
+ exports.LINE_2_UUID = LINE_2_UUID;
32250
32403
  exports.LargeOutputProgressChart = LargeOutputProgressChart;
32251
32404
  exports.LeaderboardDetailView = LeaderboardDetailView_default;
32252
32405
  exports.Legend = Legend6;
@@ -32396,6 +32549,7 @@ exports.trackCoreEvent = trackCoreEvent;
32396
32549
  exports.trackCorePageView = trackCorePageView;
32397
32550
  exports.updateThreadTitle = updateThreadTitle;
32398
32551
  exports.useActiveBreaks = useActiveBreaks;
32552
+ exports.useAllWorkspaceMetrics = useAllWorkspaceMetrics;
32399
32553
  exports.useAnalyticsConfig = useAnalyticsConfig;
32400
32554
  exports.useAuth = useAuth;
32401
32555
  exports.useAuthConfig = useAuthConfig;