@optifye/dashboard-core 6.11.25 → 6.11.26

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.mjs CHANGED
@@ -2987,6 +2987,7 @@ var AuthService = class {
2987
2987
  scope_ttl_seconds: enrichedUser.scope_ttl_seconds,
2988
2988
  access_scope: enrichedUser.access_scope,
2989
2989
  company_id: enrichedUser.company_id,
2990
+ company: enrichedUser.company,
2990
2991
  first_login_completed: enrichedUser.profile.first_login_completed,
2991
2992
  properties: {
2992
2993
  company_id: enrichedUser.company_id,
@@ -20227,6 +20228,17 @@ function useCompanyHasVlmEnabledLine(options = {}) {
20227
20228
  };
20228
20229
  }
20229
20230
 
20231
+ // src/lib/hooks/useCompanyFastSlowClipFiltersEnabled.ts
20232
+ function useCompanyFastSlowClipFiltersEnabled() {
20233
+ const { user, loading } = useAuth();
20234
+ const company = user?.company || user?.properties?.company;
20235
+ const explicitValue = company?.enable_fast_slow_clip_filters;
20236
+ return {
20237
+ isFastSlowClipFiltersEnabled: typeof explicitValue === "boolean" ? explicitValue : true,
20238
+ isResolved: !loading || typeof explicitValue === "boolean"
20239
+ };
20240
+ }
20241
+
20230
20242
  // src/lib/utils/api.ts
20231
20243
  var apiUtils = {
20232
20244
  /**
@@ -38197,14 +38209,15 @@ var HlsVideoPlayer = forwardRef(({
38197
38209
  };
38198
38210
  }, [effectiveSrc, initializePlayer, cleanupBlobUrl]);
38199
38211
  useEffect(() => {
38200
- if (videoRef.current) {
38201
- if (autoplay) {
38202
- videoRef.current.play().catch((err) => {
38203
- console.warn("[HlsVideoPlayer] Autoplay failed:", err);
38204
- });
38205
- }
38212
+ if (!videoRef.current || !autoplay || !effectiveSrc) {
38213
+ return;
38206
38214
  }
38207
- }, [autoplay]);
38215
+ videoRef.current.play().catch((err) => {
38216
+ if (err?.name !== "AbortError") {
38217
+ console.warn("[HlsVideoPlayer] Autoplay failed:", err);
38218
+ }
38219
+ });
38220
+ }, [autoplay, effectiveSrc]);
38208
38221
  const resetControlsTimeout = useCallback(() => {
38209
38222
  if (controlsPinned) {
38210
38223
  setShowControls(true);
@@ -40125,7 +40138,8 @@ var FileManagerFilters = ({
40125
40138
  snapshotClipId,
40126
40139
  className = "",
40127
40140
  targetCycleTime = null,
40128
- idleTimeVlmEnabled = false
40141
+ idleTimeVlmEnabled = false,
40142
+ showPercentileCycleFilters = true
40129
40143
  }) => {
40130
40144
  const [expandedNodes, setExpandedNodes] = useState(/* @__PURE__ */ new Set());
40131
40145
  const [startTime, setStartTime] = useState("");
@@ -40404,6 +40418,9 @@ var FileManagerFilters = ({
40404
40418
  }
40405
40419
  }, [ensureAllIdleTimeClipMetadataLoaded]);
40406
40420
  const fetchPercentileClips = useCallback(async (type) => {
40421
+ if (!showPercentileCycleFilters && type !== "idle-times") {
40422
+ return;
40423
+ }
40407
40424
  if (!workspaceId || !date || shift === void 0) {
40408
40425
  console.warn("[FileManager] Missing required params for percentile clips fetch");
40409
40426
  return;
@@ -40450,7 +40467,7 @@ var FileManagerFilters = ({
40450
40467
  } catch (error) {
40451
40468
  console.error(`[FileManager] Error fetching ${type} clips:`, error);
40452
40469
  }
40453
- }, [workspaceId, date, shift, filterState.percentile, supabase]);
40470
+ }, [workspaceId, date, shift, filterState.percentile, showPercentileCycleFilters, supabase]);
40454
40471
  const percentileCountsKey = useMemo(() => {
40455
40472
  if (!workspaceId || !date || shift === void 0) {
40456
40473
  return null;
@@ -40458,7 +40475,7 @@ var FileManagerFilters = ({
40458
40475
  return `${workspaceId}:${date}:${shift}:${filterState.percentile}`;
40459
40476
  }, [workspaceId, date, shift, filterState.percentile]);
40460
40477
  useEffect(() => {
40461
- if (!percentileCountsKey) {
40478
+ if (!showPercentileCycleFilters || !percentileCountsKey) {
40462
40479
  percentileCountsKeyRef.current = null;
40463
40480
  percentilePrefetchRef.current = { key: null, types: /* @__PURE__ */ new Set() };
40464
40481
  setPercentileCounts({
@@ -40478,8 +40495,11 @@ var FileManagerFilters = ({
40478
40495
  "slow-cycles": null
40479
40496
  });
40480
40497
  setPercentileClips({});
40481
- }, [percentileCountsKey]);
40498
+ }, [showPercentileCycleFilters, percentileCountsKey]);
40482
40499
  useEffect(() => {
40500
+ if (!showPercentileCycleFilters) {
40501
+ return;
40502
+ }
40483
40503
  if (!prefetchedPercentileCounts || !percentileCountsKey) {
40484
40504
  return;
40485
40505
  }
@@ -40494,8 +40514,11 @@ var FileManagerFilters = ({
40494
40514
  "fast-cycles": typeof prefetchedPercentileCounts.counts["fast-cycles"] === "number" ? prefetchedPercentileCounts.counts["fast-cycles"] : prev["fast-cycles"],
40495
40515
  "slow-cycles": typeof prefetchedPercentileCounts.counts["slow-cycles"] === "number" ? prefetchedPercentileCounts.counts["slow-cycles"] : prev["slow-cycles"]
40496
40516
  }));
40497
- }, [prefetchedPercentileCounts, percentileCountsKey, filterState.percentile]);
40517
+ }, [showPercentileCycleFilters, prefetchedPercentileCounts, percentileCountsKey, filterState.percentile]);
40498
40518
  const fetchPercentileCounts = useCallback(async (options) => {
40519
+ if (!showPercentileCycleFilters) {
40520
+ return;
40521
+ }
40499
40522
  if (!workspaceId || !date || shift === void 0) {
40500
40523
  console.warn("[FileManager] Missing required params for percentile counts fetch");
40501
40524
  return;
@@ -40549,9 +40572,9 @@ var FileManagerFilters = ({
40549
40572
  } catch (error) {
40550
40573
  console.error("[FileManager] Error fetching percentile counts:", error);
40551
40574
  }
40552
- }, [workspaceId, date, shift, filterState.percentile, supabase, percentileCounts, percentileClips, fetchPercentileClips]);
40575
+ }, [workspaceId, date, shift, filterState.percentile, showPercentileCycleFilters, supabase, percentileCounts, percentileClips, fetchPercentileClips]);
40553
40576
  useEffect(() => {
40554
- if (!isReady || !percentileCountsKey) {
40577
+ if (!showPercentileCycleFilters || !isReady || !percentileCountsKey) {
40555
40578
  return;
40556
40579
  }
40557
40580
  const schedule = () => {
@@ -40562,13 +40585,13 @@ var FileManagerFilters = ({
40562
40585
  } else {
40563
40586
  setTimeout(schedule, 0);
40564
40587
  }
40565
- }, [isReady, percentileCountsKey, fetchPercentileCounts]);
40588
+ }, [showPercentileCycleFilters, isReady, percentileCountsKey, fetchPercentileCounts]);
40566
40589
  const shouldShowCategory = useCallback((categoryId) => {
40567
40590
  switch (categoryId) {
40568
40591
  case "fast-cycles":
40569
- return filterState.showFastCycles;
40592
+ return showPercentileCycleFilters && filterState.showFastCycles;
40570
40593
  case "slow-cycles":
40571
- return filterState.showSlowCycles;
40594
+ return showPercentileCycleFilters && filterState.showSlowCycles;
40572
40595
  case "longest-idles":
40573
40596
  return false;
40574
40597
  // filterState.showLongestIdles; // Temporarily disabled
@@ -40581,7 +40604,7 @@ var FileManagerFilters = ({
40581
40604
  default:
40582
40605
  return true;
40583
40606
  }
40584
- }, [filterState]);
40607
+ }, [filterState, showPercentileCycleFilters]);
40585
40608
  const getPercentileIcon = useCallback((type, isExpanded, colorClasses) => {
40586
40609
  const iconMap = {
40587
40610
  "fast-cycles": { icon: TrendingUp, color: "text-green-600" },
@@ -40752,7 +40775,7 @@ var FileManagerFilters = ({
40752
40775
  const filteredSlowCycles = (percentileClips["slow-cycles"] || []).filter((clip) => isClipInTimeRange(clip.creation_timestamp || ""));
40753
40776
  const fastCount = typeof percentileCounts["fast-cycles"] === "number" ? percentileCounts["fast-cycles"] : null;
40754
40777
  const slowCount = typeof percentileCounts["slow-cycles"] === "number" ? percentileCounts["slow-cycles"] : null;
40755
- const percentileCategories = [
40778
+ const percentileCategories = showPercentileCycleFilters ? [
40756
40779
  {
40757
40780
  id: "fast-cycles",
40758
40781
  label: "Fast Cycles",
@@ -40850,7 +40873,7 @@ var FileManagerFilters = ({
40850
40873
  };
40851
40874
  })
40852
40875
  } */
40853
- ];
40876
+ ] : [];
40854
40877
  const orderedIds = ["cycle_completion", "fast-cycles", "slow-cycles", "idle_time"];
40855
40878
  orderedIds.forEach((orderedId) => {
40856
40879
  const percentileCategory = percentileCategories.find((cat) => cat.id === orderedId);
@@ -40875,7 +40898,7 @@ var FileManagerFilters = ({
40875
40898
  }
40876
40899
  });
40877
40900
  return tree;
40878
- }, [categories, expandedNodes, counts, clipMetadata, percentileCounts, percentileClips, shouldShowCategory, getPercentileIcon, isClipInTimeRange, isTimeFilterActive]);
40901
+ }, [categories, expandedNodes, counts, clipMetadata, percentileCounts, percentileClips, shouldShowCategory, getPercentileIcon, isClipInTimeRange, isTimeFilterActive, showPercentileCycleFilters]);
40879
40902
  const toggleExpanded = (nodeId) => {
40880
40903
  const newExpanded = new Set(expandedNodes);
40881
40904
  if (newExpanded.has(nodeId)) {
@@ -40887,10 +40910,10 @@ var FileManagerFilters = ({
40887
40910
  console.log(`[FileManager] Fetching clips for expanded category: ${nodeId}`);
40888
40911
  fetchClipMetadata(nodeId, 1);
40889
40912
  }
40890
- if (nodeId === "fast-cycles" && (percentileClips["fast-cycles"] || []).length === 0) {
40913
+ if (showPercentileCycleFilters && nodeId === "fast-cycles" && (percentileClips["fast-cycles"] || []).length === 0) {
40891
40914
  fetchPercentileClips("fast-cycles");
40892
40915
  }
40893
- if (nodeId === "slow-cycles" && (percentileClips["slow-cycles"] || []).length === 0) {
40916
+ if (showPercentileCycleFilters && nodeId === "slow-cycles" && (percentileClips["slow-cycles"] || []).length === 0) {
40894
40917
  fetchPercentileClips("slow-cycles");
40895
40918
  }
40896
40919
  }
@@ -40908,10 +40931,10 @@ var FileManagerFilters = ({
40908
40931
  console.log(`[FileManager] Fetching clips for expanded category: ${node.id}`);
40909
40932
  fetchClipMetadata(node.id, 1);
40910
40933
  }
40911
- if (node.id === "fast-cycles" && (percentileClips["fast-cycles"] || []).length === 0) {
40934
+ if (showPercentileCycleFilters && node.id === "fast-cycles" && (percentileClips["fast-cycles"] || []).length === 0) {
40912
40935
  fetchPercentileClips("fast-cycles");
40913
40936
  }
40914
- if (node.id === "slow-cycles" && (percentileClips["slow-cycles"] || []).length === 0) {
40937
+ if (showPercentileCycleFilters && node.id === "slow-cycles" && (percentileClips["slow-cycles"] || []).length === 0) {
40915
40938
  fetchPercentileClips("slow-cycles");
40916
40939
  }
40917
40940
  }
@@ -41349,7 +41372,8 @@ var FileManagerFilters = ({
41349
41372
  };
41350
41373
  var PERCENTILE_PRESETS = [5, 10, 15, 20, 25, 30];
41351
41374
  var AdvancedFilterDialog = ({
41352
- onApply
41375
+ onApply,
41376
+ showPercentileCycleFilters = true
41353
41377
  }) => {
41354
41378
  const {
41355
41379
  state,
@@ -41416,7 +41440,7 @@ var AdvancedFilterDialog = ({
41416
41440
  )
41417
41441
  ] }) }),
41418
41442
  /* @__PURE__ */ jsxs("div", { className: "p-6 space-y-8 overflow-y-auto max-h-[60vh]", children: [
41419
- /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
41443
+ showPercentileCycleFilters && /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
41420
41444
  /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-3", children: [
41421
41445
  /* @__PURE__ */ jsx("div", { className: "p-2 bg-gradient-to-r from-emerald-100 to-blue-100 rounded-lg", children: /* @__PURE__ */ jsx(Activity, { className: "h-5 w-5 text-emerald-600" }) }),
41422
41446
  /* @__PURE__ */ jsxs("div", { children: [
@@ -41509,7 +41533,7 @@ var AdvancedFilterDialog = ({
41509
41533
  ] })
41510
41534
  ] }),
41511
41535
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
41512
- /* @__PURE__ */ jsxs("div", { className: "bg-gradient-to-br from-green-50 to-red-50 rounded-xl p-4 space-y-3", children: [
41536
+ showPercentileCycleFilters && /* @__PURE__ */ jsxs("div", { className: "bg-gradient-to-br from-green-50 to-red-50 rounded-xl p-4 space-y-3", children: [
41513
41537
  /* @__PURE__ */ jsxs("h4", { className: "text-sm font-bold text-gray-700 uppercase tracking-wide flex items-center space-x-2", children: [
41514
41538
  /* @__PURE__ */ jsx(Sparkles, { className: "h-4 w-4 text-emerald-600" }),
41515
41539
  /* @__PURE__ */ jsx("span", { children: "Performance Extremes" })
@@ -41790,6 +41814,7 @@ var BottlenecksContent = ({
41790
41814
  const supabase = useSupabase();
41791
41815
  const timezone = useAppTimezone();
41792
41816
  const { isIdleTimeVlmEnabled } = useIdleTimeVlmConfig();
41817
+ const { isFastSlowClipFiltersEnabled } = useCompanyFastSlowClipFiltersEnabled();
41793
41818
  const { shiftConfig, isLoading: isShiftConfigLoading } = useDynamicShiftConfig(lineId);
41794
41819
  const { effectiveShift, effectiveDate } = useMemo(() => {
41795
41820
  if (shift !== void 0 && shift !== null && date) {
@@ -41846,12 +41871,16 @@ var BottlenecksContent = ({
41846
41871
  }), []);
41847
41872
  const [initialFilter, setInitialFilter] = useState("");
41848
41873
  const currentIndexRef = useRef(0);
41874
+ const currentClipIdRef = useRef(null);
41849
41875
  const currentPositionRef = useRef(0);
41850
41876
  const currentTotalRef = useRef(0);
41851
41877
  const activeFilterRef = useRef(initialFilter);
41852
41878
  const isMountedRef = useRef(true);
41853
41879
  const fetchInProgressRef = useRef(/* @__PURE__ */ new Set());
41854
41880
  const refreshCountsTimeoutRef = useRef(null);
41881
+ const awaitingNextClipRef = useRef(false);
41882
+ const retryTimeoutRef = useRef(null);
41883
+ const navigationLockRef = useRef(false);
41855
41884
  const [isPlaying, setIsPlaying] = useState(false);
41856
41885
  const [currentTime, setCurrentTime] = useState(0);
41857
41886
  const [duration, setDuration] = useState(0);
@@ -41860,6 +41889,7 @@ var BottlenecksContent = ({
41860
41889
  const [playbackSpeed, setPlaybackSpeed] = useState(1);
41861
41890
  const [currentPosition, setCurrentPosition] = useState(0);
41862
41891
  const [currentTotal, setCurrentTotal] = useState(0);
41892
+ const [playerInstanceNonce, setPlayerInstanceNonce] = useState(0);
41863
41893
  const [isTransitioning, setIsTransitioning] = useState(false);
41864
41894
  const [pendingVideo, setPendingVideo] = useState(null);
41865
41895
  const [isVideoBuffering, setIsVideoBuffering] = useState(false);
@@ -41916,14 +41946,29 @@ var BottlenecksContent = ({
41916
41946
  const [isFullscreen, setIsFullscreen] = useState(false);
41917
41947
  const categoryMetadataRef = useRef([]);
41918
41948
  const currentMetadataIndexRef = useRef(0);
41949
+ const clearRetryTimeout = useCallback(() => {
41950
+ if (retryTimeoutRef.current) {
41951
+ clearTimeout(retryTimeoutRef.current);
41952
+ retryTimeoutRef.current = null;
41953
+ }
41954
+ }, []);
41955
+ const bumpPlayerInstanceNonce = useCallback(() => {
41956
+ setPlayerInstanceNonce((prev) => prev + 1);
41957
+ }, []);
41919
41958
  const updateActiveFilter = useCallback((newFilter) => {
41920
41959
  console.log(`[BottlenecksContent] Updating active filter: ${activeFilterRef.current} -> ${newFilter}`);
41960
+ awaitingNextClipRef.current = false;
41961
+ navigationLockRef.current = false;
41962
+ clearRetryTimeout();
41921
41963
  setActiveFilter(newFilter);
41922
41964
  activeFilterRef.current = newFilter;
41923
- }, []);
41965
+ }, [clearRetryTimeout]);
41924
41966
  useEffect(() => {
41925
41967
  currentIndexRef.current = currentIndex;
41926
41968
  }, [currentIndex]);
41969
+ useEffect(() => {
41970
+ currentClipIdRef.current = currentClipId;
41971
+ }, [currentClipId]);
41927
41972
  useEffect(() => {
41928
41973
  currentPositionRef.current = currentPosition;
41929
41974
  }, [currentPosition]);
@@ -42332,8 +42377,11 @@ var BottlenecksContent = ({
42332
42377
  }
42333
42378
  }, [activeFilter, s3ClipsService, mergedCounts, loadFirstVideoForCategory, allVideos, firstClip]);
42334
42379
  const isPercentileCategory = useCallback((categoryId) => {
42380
+ if (!isFastSlowClipFiltersEnabled) {
42381
+ return false;
42382
+ }
42335
42383
  return ["fast-cycles", "slow-cycles", "longest-idles"].includes(categoryId);
42336
- }, []);
42384
+ }, [isFastSlowClipFiltersEnabled]);
42337
42385
  const getMetadataCacheKey = useCallback((categoryId) => {
42338
42386
  return `${categoryId}-${effectiveDateString}-${effectiveShiftId}-${snapshotDateTime ?? "nosnap"}-${snapshotClipId ?? "nosnap"}`;
42339
42387
  }, [effectiveDateString, effectiveShiftId, snapshotDateTime, snapshotClipId]);
@@ -42365,6 +42413,21 @@ var BottlenecksContent = ({
42365
42413
  return [categoryId];
42366
42414
  }
42367
42415
  }, []);
42416
+ useEffect(() => {
42417
+ if (isFastSlowClipFiltersEnabled) {
42418
+ return;
42419
+ }
42420
+ if (activeFilter !== "fast-cycles" && activeFilter !== "slow-cycles") {
42421
+ return;
42422
+ }
42423
+ const fallbackFilter = ["cycle_completion", "idle_time"].find((type) => (dynamicCounts[type] || 0) > 0) || clipTypes.find((type) => (dynamicCounts[type.type] || 0) > 0)?.type || clipTypes[0]?.type;
42424
+ if (!fallbackFilter || fallbackFilter === activeFilter) {
42425
+ return;
42426
+ }
42427
+ setCategoryMetadata([]);
42428
+ categoryMetadataRef.current = [];
42429
+ updateActiveFilter(fallbackFilter);
42430
+ }, [isFastSlowClipFiltersEnabled, activeFilter, dynamicCounts, clipTypes, updateActiveFilter]);
42368
42431
  useCallback((categoryId) => {
42369
42432
  if (isPercentileCategory(categoryId)) {
42370
42433
  return categoryMetadata.length;
@@ -42394,6 +42457,7 @@ var BottlenecksContent = ({
42394
42457
  }
42395
42458
  }, [isNavigating, currentIndex, filteredVideos.length]);
42396
42459
  const clearLoadingState = useCallback(() => {
42460
+ navigationLockRef.current = false;
42397
42461
  setIsTransitioning(false);
42398
42462
  setIsNavigating(false);
42399
42463
  if (loadingTimeoutRef.current) {
@@ -42405,6 +42469,11 @@ var BottlenecksContent = ({
42405
42469
  if (!workspaceId) {
42406
42470
  return;
42407
42471
  }
42472
+ if (!isFastSlowClipFiltersEnabled && (categoryId === "fast-cycles" || categoryId === "slow-cycles")) {
42473
+ setCategoryMetadata([]);
42474
+ categoryMetadataRef.current = [];
42475
+ return;
42476
+ }
42408
42477
  if (!isEffectiveShiftReady) {
42409
42478
  console.log("[BottlenecksContent] Skipping metadata load - shift/date not ready");
42410
42479
  return;
@@ -42557,7 +42626,7 @@ var BottlenecksContent = ({
42557
42626
  } finally {
42558
42627
  setIsCategoryLoading(false);
42559
42628
  }
42560
- }, [workspaceId, effectiveDateString, effectiveShiftId, getMetadataCacheKey, isPercentileCategory, metadataCache, s3ClipsService, clearLoadingState, isEffectiveShiftReady, snapshotDateTime, snapshotClipId, supabase]);
42629
+ }, [workspaceId, effectiveDateString, effectiveShiftId, getMetadataCacheKey, isPercentileCategory, isFastSlowClipFiltersEnabled, metadataCache, s3ClipsService, clearLoadingState, isEffectiveShiftReady, snapshotDateTime, snapshotClipId, supabase]);
42561
42630
  useEffect(() => {
42562
42631
  if (previousFilterRef.current !== activeFilter) {
42563
42632
  console.log(`Filter changed from ${previousFilterRef.current} to ${activeFilter} - resetting to first video`);
@@ -42608,8 +42677,12 @@ var BottlenecksContent = ({
42608
42677
  const loadAndPlayClipById = useCallback(async (clipId, categoryId, position, metadataContext) => {
42609
42678
  if (!workspaceId || !s3ClipsService || !isMountedRef.current) return;
42610
42679
  console.log(`[BottlenecksContent] Loading clip by ID: ${clipId}, category=${categoryId}, position=${position}`);
42680
+ awaitingNextClipRef.current = false;
42681
+ navigationLockRef.current = true;
42682
+ clearRetryTimeout();
42611
42683
  setIsTransitioning(true);
42612
42684
  setIsInitialLoading(true);
42685
+ setIsNavigating(true);
42613
42686
  setError(null);
42614
42687
  if (videoRef.current?.player) {
42615
42688
  try {
@@ -42707,7 +42780,67 @@ var BottlenecksContent = ({
42707
42780
  clearLoadingState();
42708
42781
  }
42709
42782
  }
42710
- }, [workspaceId, s3ClipsService, updateActiveFilter, clearLoadingState, loadCategoryMetadata, applyMetadataSnapshot, mergedCounts, isPercentileCategory]);
42783
+ }, [workspaceId, s3ClipsService, updateActiveFilter, clearLoadingState, clearRetryTimeout, loadCategoryMetadata, applyMetadataSnapshot, mergedCounts, isPercentileCategory]);
42784
+ const restartCurrentClipPlayback = useCallback(() => {
42785
+ if (!currentClipId) {
42786
+ return;
42787
+ }
42788
+ console.log(`[BottlenecksContent] Restarting playback for clip ${currentClipId}`);
42789
+ awaitingNextClipRef.current = false;
42790
+ navigationLockRef.current = true;
42791
+ clearRetryTimeout();
42792
+ setError(null);
42793
+ setIsTransitioning(true);
42794
+ setIsInitialLoading(true);
42795
+ setIsNavigating(true);
42796
+ setIsVideoBuffering(false);
42797
+ bumpPlayerInstanceNonce();
42798
+ }, [currentClipId, clearRetryTimeout, bumpPlayerInstanceNonce]);
42799
+ useEffect(() => {
42800
+ if (!newClipsNotification || !awaitingNextClipRef.current || !s3ClipsService) {
42801
+ return;
42802
+ }
42803
+ const activeCategory = activeFilterRef.current;
42804
+ if (!activeCategory || activeCategory === "all" || isPercentileCategory(activeCategory)) {
42805
+ return;
42806
+ }
42807
+ let cancelled = false;
42808
+ const timer = setTimeout(() => {
42809
+ void (async () => {
42810
+ const incomingClips = [...newClipsNotification.clips].reverse();
42811
+ for (const incomingClip of incomingClips) {
42812
+ if (cancelled || !incomingClip?.id || incomingClip.id === currentClipId) {
42813
+ continue;
42814
+ }
42815
+ const incomingVideo = await s3ClipsService.getClipById(incomingClip.id);
42816
+ if (cancelled || !incomingVideo || incomingVideo.type !== activeCategory) {
42817
+ continue;
42818
+ }
42819
+ console.log(`[BottlenecksContent] Autoplaying incoming ${activeCategory} clip ${incomingClip.id}`);
42820
+ invalidateMetadataCache(activeCategory);
42821
+ await loadAndPlayClipById(incomingClip.id, activeCategory, 1, {
42822
+ clips: [{ clipId: incomingClip.id }],
42823
+ total: Math.max(mergedCounts[activeCategory] || 0, 1)
42824
+ });
42825
+ void loadCategoryMetadata(activeCategory, false, true);
42826
+ return;
42827
+ }
42828
+ })();
42829
+ }, 300);
42830
+ return () => {
42831
+ cancelled = true;
42832
+ clearTimeout(timer);
42833
+ };
42834
+ }, [
42835
+ newClipsNotification,
42836
+ s3ClipsService,
42837
+ isPercentileCategory,
42838
+ currentClipId,
42839
+ invalidateMetadataCache,
42840
+ loadAndPlayClipById,
42841
+ loadCategoryMetadata,
42842
+ mergedCounts
42843
+ ]);
42711
42844
  useCallback(async (categoryId, clipIndex) => {
42712
42845
  console.warn("[BottlenecksContent] loadAndPlayClip is deprecated, use loadAndPlayClipById instead");
42713
42846
  if (!workspaceId || !s3ClipsService || !isMountedRef.current || !isEffectiveShiftReady) return;
@@ -42736,8 +42869,11 @@ var BottlenecksContent = ({
42736
42869
  }
42737
42870
  }, [workspaceId, s3ClipsService, effectiveDateString, effectiveShiftId, loadAndPlayClipById, isEffectiveShiftReady]);
42738
42871
  const handleNext = useCallback(async () => {
42739
- if (!isMountedRef.current) return;
42872
+ if (!isMountedRef.current || navigationLockRef.current) return;
42740
42873
  const currentFilter = activeFilterRef.current;
42874
+ navigationLockRef.current = true;
42875
+ clearRetryTimeout();
42876
+ setIsNavigating(true);
42741
42877
  setIsTransitioning(true);
42742
42878
  setIsInitialLoading(true);
42743
42879
  setError(null);
@@ -42767,10 +42903,32 @@ var BottlenecksContent = ({
42767
42903
  );
42768
42904
  const olderClip = neighbors.previous;
42769
42905
  if (!olderClip) {
42770
- console.log("[handleNext] Already at last clip in category");
42771
- clearLoadingState();
42906
+ let metadataArray3 = categoryMetadataRef.current;
42907
+ if (metadataArray3.length === 0) {
42908
+ console.log(`[handleNext] Metadata empty for ${currentFilter}, loading before loop restart`);
42909
+ await loadCategoryMetadata(currentFilter, false, true);
42910
+ metadataArray3 = categoryMetadataRef.current;
42911
+ }
42912
+ const firstClipMeta = metadataArray3[0];
42913
+ if (firstClipMeta?.clipId && firstClipMeta.clipId !== currentClipId) {
42914
+ console.log(`[handleNext] Reached end of ${currentFilter}, looping back to newest clip ${firstClipMeta.clipId}`);
42915
+ await loadAndPlayClipById(firstClipMeta.clipId, currentFilter, 1, {
42916
+ clips: metadataArray3,
42917
+ total: mergedCounts[currentFilter] || metadataArray3.length
42918
+ });
42919
+ return;
42920
+ }
42921
+ console.log("[handleNext] Reached live edge, waiting for the next clip");
42922
+ awaitingNextClipRef.current = true;
42923
+ navigationLockRef.current = false;
42924
+ setIsInitialLoading(false);
42925
+ setIsVideoBuffering(false);
42926
+ setIsPlaying(false);
42927
+ setIsNavigating(false);
42928
+ setIsTransitioning(false);
42772
42929
  return;
42773
42930
  }
42931
+ awaitingNextClipRef.current = false;
42774
42932
  setPendingVideo(olderClip);
42775
42933
  setCurrentClipId(olderClip.id || null);
42776
42934
  setAllVideos([olderClip]);
@@ -42826,8 +42984,23 @@ var BottlenecksContent = ({
42826
42984
  clearLoadingState();
42827
42985
  }
42828
42986
  } else {
42829
- console.log(`[handleNext] Already at last clip in category`);
42830
- clearLoadingState();
42987
+ const firstClipMeta = metadataArray[0];
42988
+ if (firstClipMeta?.clipId && firstClipMeta.clipId !== currentClipId) {
42989
+ console.log(`[handleNext] Reached end of ${currentFilter}, looping back to newest percentile clip ${firstClipMeta.clipId}`);
42990
+ await loadAndPlayClipById(firstClipMeta.clipId, currentFilter, 1, {
42991
+ clips: metadataArray,
42992
+ total: metadataArray.length
42993
+ });
42994
+ return;
42995
+ }
42996
+ console.log(`[handleNext] Reached live edge for ${currentFilter}, waiting for the next clip`);
42997
+ awaitingNextClipRef.current = true;
42998
+ navigationLockRef.current = false;
42999
+ setIsInitialLoading(false);
43000
+ setIsVideoBuffering(false);
43001
+ setIsPlaying(false);
43002
+ setIsNavigating(false);
43003
+ setIsTransitioning(false);
42831
43004
  }
42832
43005
  } catch (error2) {
42833
43006
  console.error(`[handleNext] Error navigating:`, error2);
@@ -42839,10 +43012,13 @@ var BottlenecksContent = ({
42839
43012
  });
42840
43013
  clearLoadingState();
42841
43014
  }
42842
- }, [clearLoadingState, s3ClipsService, loadCategoryMetadata, isPercentileCategory, workspaceId, currentClipId, effectiveDateString, effectiveShiftId, snapshotDateTime, snapshotClipId, mergedCounts]);
43015
+ }, [clearLoadingState, clearRetryTimeout, s3ClipsService, loadCategoryMetadata, loadAndPlayClipById, isPercentileCategory, workspaceId, currentClipId, effectiveDateString, effectiveShiftId, snapshotDateTime, snapshotClipId, mergedCounts]);
42843
43016
  const handlePrevious = useCallback(async () => {
42844
- if (!isMountedRef.current) return;
43017
+ if (!isMountedRef.current || navigationLockRef.current) return;
42845
43018
  const currentFilter = activeFilterRef.current;
43019
+ navigationLockRef.current = true;
43020
+ clearRetryTimeout();
43021
+ setIsNavigating(true);
42846
43022
  setIsTransitioning(true);
42847
43023
  setIsInitialLoading(true);
42848
43024
  setError(null);
@@ -42940,7 +43116,7 @@ var BottlenecksContent = ({
42940
43116
  });
42941
43117
  clearLoadingState();
42942
43118
  }
42943
- }, [clearLoadingState, s3ClipsService, loadCategoryMetadata, isPercentileCategory, workspaceId, currentClipId, effectiveDateString, effectiveShiftId, snapshotDateTime, snapshotClipId, mergedCounts]);
43119
+ }, [clearLoadingState, clearRetryTimeout, s3ClipsService, loadCategoryMetadata, isPercentileCategory, workspaceId, currentClipId, effectiveDateString, effectiveShiftId, snapshotDateTime, snapshotClipId, mergedCounts]);
42944
43120
  const currentVideo = useMemo(() => {
42945
43121
  if (!filteredVideos || filteredVideos.length === 0 || currentIndex >= filteredVideos.length) {
42946
43122
  return null;
@@ -43107,6 +43283,8 @@ var BottlenecksContent = ({
43107
43283
  }
43108
43284
  }, [error, playbackSpeed]);
43109
43285
  const handleVideoPlay = useCallback(async (player) => {
43286
+ awaitingNextClipRef.current = false;
43287
+ clearRetryTimeout();
43110
43288
  setIsPlaying(true);
43111
43289
  setIsInitialLoading(false);
43112
43290
  if (currentVideo && !currentVideo.creation_timestamp && s3ClipsService) {
@@ -43128,7 +43306,7 @@ var BottlenecksContent = ({
43128
43306
  console.warn("[BottlenecksContent] Failed to load metadata for current video:", error2);
43129
43307
  }
43130
43308
  }
43131
- }, [currentVideo, s3ClipsService]);
43309
+ }, [currentVideo, s3ClipsService, clearRetryTimeout]);
43132
43310
  const handleVideoPause = useCallback((player) => {
43133
43311
  setIsPlaying(false);
43134
43312
  }, []);
@@ -43139,8 +43317,10 @@ var BottlenecksContent = ({
43139
43317
  setDuration(duration2);
43140
43318
  }, []);
43141
43319
  const handleLoadedData = useCallback((player) => {
43142
- console.log("Video data loaded - NOT clearing loading (wait for playing event)");
43143
- }, []);
43320
+ console.log("Video data loaded - clearing transition overlay");
43321
+ setIsInitialLoading(false);
43322
+ clearLoadingState();
43323
+ }, [clearLoadingState]);
43144
43324
  const handleVideoPlaying = useCallback((player) => {
43145
43325
  console.log("Video playing - hiding transition overlay (most reliable)");
43146
43326
  clearLoadingState();
@@ -43161,6 +43341,7 @@ var BottlenecksContent = ({
43161
43341
  console.error("[BottlenecksContent] Video.js error:", errorInfo);
43162
43342
  setIsPlaying(false);
43163
43343
  setIsVideoBuffering(false);
43344
+ clearRetryTimeout();
43164
43345
  const errorCode = errorInfo?.code || 0;
43165
43346
  const canRetry = errorInfo?.canRetry ?? false;
43166
43347
  const errorMessage = errorInfo?.message || "Unknown error";
@@ -43188,17 +43369,24 @@ var BottlenecksContent = ({
43188
43369
  if (videoRetryCountRef.current < 3 && currentVideo) {
43189
43370
  videoRetryCountRef.current++;
43190
43371
  const retryDelay = 1e3 * videoRetryCountRef.current;
43372
+ const retryClipId = currentVideo.id;
43373
+ const retryCategory = activeFilterRef.current;
43191
43374
  console.log(`[Video Error] Recoverable error - Retrying... Attempt ${videoRetryCountRef.current}/3 in ${retryDelay}ms`);
43192
43375
  setError({
43193
43376
  type: "retrying",
43194
43377
  message: `Retrying... (${videoRetryCountRef.current}/3)`,
43195
43378
  isRetrying: true
43196
43379
  });
43197
- setTimeout(() => {
43198
- if (videoRef.current && currentVideo && isMountedRef.current) {
43199
- setError(null);
43200
- videoRef.current.dispose();
43380
+ retryTimeoutRef.current = setTimeout(() => {
43381
+ retryTimeoutRef.current = null;
43382
+ if (!isMountedRef.current) {
43383
+ return;
43384
+ }
43385
+ if (currentClipIdRef.current !== retryClipId || activeFilterRef.current !== retryCategory) {
43386
+ console.log("[Video Error] Skipping stale retry for previous clip");
43387
+ return;
43201
43388
  }
43389
+ restartCurrentClipPlayback();
43202
43390
  }, retryDelay);
43203
43391
  } else {
43204
43392
  console.log("[Video Error] Retries exhausted - showing final error overlay");
@@ -43220,7 +43408,7 @@ var BottlenecksContent = ({
43220
43408
  attempts: 3
43221
43409
  });
43222
43410
  }
43223
- }, [currentVideo, workspaceId, clearLoadingState]);
43411
+ }, [currentVideo, workspaceId, clearLoadingState, clearRetryTimeout, restartCurrentClipPlayback]);
43224
43412
  useEffect(() => {
43225
43413
  isMountedRef.current = true;
43226
43414
  return () => {
@@ -43232,10 +43420,11 @@ var BottlenecksContent = ({
43232
43420
  clearTimeout(loadingTimeoutRef.current);
43233
43421
  loadingTimeoutRef.current = null;
43234
43422
  }
43423
+ clearRetryTimeout();
43235
43424
  setIsCategoryLoading(false);
43236
43425
  setIsNavigating(false);
43237
43426
  };
43238
- }, [s3ClipsService]);
43427
+ }, [s3ClipsService, clearRetryTimeout]);
43239
43428
  useEffect(() => {
43240
43429
  if (filteredVideos.length > 0 && currentIndex < filteredVideos.length) {
43241
43430
  if (error && error.type === "fatal") {
@@ -43451,7 +43640,8 @@ var BottlenecksContent = ({
43451
43640
  isShareLoading,
43452
43641
  isShareCopied,
43453
43642
  options: videoPlayerOptions
43454
- }
43643
+ },
43644
+ `${currentVideo.id}-${playerInstanceNonce}-inline`
43455
43645
  )
43456
43646
  }
43457
43647
  ),
@@ -43482,11 +43672,8 @@ var BottlenecksContent = ({
43482
43672
  "button",
43483
43673
  {
43484
43674
  onClick: () => {
43485
- setError(null);
43486
43675
  videoRetryCountRef.current = 0;
43487
- if (videoRef.current) {
43488
- videoRef.current.dispose();
43489
- }
43676
+ restartCurrentClipPlayback();
43490
43677
  },
43491
43678
  className: "px-5 py-2.5 bg-gray-600 hover:bg-gray-700 rounded-md text-sm font-medium transition-colors",
43492
43679
  children: "Retry"
@@ -43718,7 +43905,7 @@ var BottlenecksContent = ({
43718
43905
  currentVideoId: currentVideo?.id,
43719
43906
  counts: mergedCounts,
43720
43907
  isReady: hasInitialLoad,
43721
- prefetchedPercentileCounts: prefetchedPercentileCounts || void 0,
43908
+ prefetchedPercentileCounts: isFastSlowClipFiltersEnabled ? prefetchedPercentileCounts || void 0 : void 0,
43722
43909
  workspaceId,
43723
43910
  date: effectiveDateString,
43724
43911
  shift: effectiveShiftId,
@@ -43727,6 +43914,7 @@ var BottlenecksContent = ({
43727
43914
  targetCycleTime: workspaceTargetCycleTime,
43728
43915
  clipClassifications,
43729
43916
  idleTimeVlmEnabled,
43917
+ showPercentileCycleFilters: isFastSlowClipFiltersEnabled,
43730
43918
  onFilterChange: (filterId) => {
43731
43919
  updateActiveFilter(filterId);
43732
43920
  const category = categoriesToShow.find((cat) => cat.type === filterId);
@@ -43875,7 +44063,8 @@ var BottlenecksContent = ({
43875
44063
  isShareLoading,
43876
44064
  isShareCopied,
43877
44065
  options: videoPlayerOptions
43878
- }
44066
+ },
44067
+ `${currentVideo.id}-${playerInstanceNonce}-fullscreen`
43879
44068
  )
43880
44069
  }
43881
44070
  ),
@@ -43939,6 +44128,7 @@ var BottlenecksContent = ({
43939
44128
  !triageMode && /* @__PURE__ */ jsx(
43940
44129
  AdvancedFilterDialog,
43941
44130
  {
44131
+ showPercentileCycleFilters: isFastSlowClipFiltersEnabled,
43942
44132
  onApply: () => {
43943
44133
  console.log("[BottlenecksContent] Advanced filters applied, will refresh clips...");
43944
44134
  }
@@ -69615,6 +69805,10 @@ var WorkspaceDetailView = ({
69615
69805
  shiftId: selectedShift,
69616
69806
  companyId: dashboardConfig?.entityConfig?.companyId
69617
69807
  });
69808
+ const {
69809
+ isFastSlowClipFiltersEnabled,
69810
+ isResolved: isFastSlowClipFiltersResolved
69811
+ } = useCompanyFastSlowClipFiltersEnabled();
69618
69812
  const isClipsEnabled = dashboardConfig?.clipsConfig?.enabled ?? true;
69619
69813
  dashboardConfig?.supervisorConfig?.enabled || false;
69620
69814
  const effectiveLineId = lineId || selectedLineId;
@@ -69701,15 +69895,19 @@ var WorkspaceDetailView = ({
69701
69895
  return `${workspaceId}:${percentileDate}:${percentileShiftId.toString()}:10`;
69702
69896
  }, [workspaceId, percentileDate, percentileShiftId]);
69703
69897
  useEffect(() => {
69704
- if (!percentileCountsKey) {
69898
+ if (!isFastSlowClipFiltersEnabled || !percentileCountsKey) {
69705
69899
  setPrefetchedPercentileCounts(null);
69706
69900
  return;
69707
69901
  }
69708
69902
  if (prefetchedPercentileCounts && prefetchedPercentileCounts.key !== percentileCountsKey) {
69709
69903
  setPrefetchedPercentileCounts(null);
69710
69904
  }
69711
- }, [percentileCountsKey, prefetchedPercentileCounts]);
69905
+ }, [isFastSlowClipFiltersEnabled, percentileCountsKey, prefetchedPercentileCounts]);
69712
69906
  useEffect(() => {
69907
+ if (!isFastSlowClipFiltersEnabled || !isFastSlowClipFiltersResolved) {
69908
+ setPrefetchedPercentileCounts(null);
69909
+ return;
69910
+ }
69713
69911
  if (!percentileCountsKey || !percentileDate || percentileShiftId === null || percentileShiftId === void 0) {
69714
69912
  return;
69715
69913
  }
@@ -69776,7 +69974,16 @@ var WorkspaceDetailView = ({
69776
69974
  return () => {
69777
69975
  controller.abort();
69778
69976
  };
69779
- }, [percentileCountsKey, percentileDate, percentileShiftId, workspaceId, supabase, prefetchedPercentileCounts]);
69977
+ }, [
69978
+ isFastSlowClipFiltersEnabled,
69979
+ isFastSlowClipFiltersResolved,
69980
+ percentileCountsKey,
69981
+ percentileDate,
69982
+ percentileShiftId,
69983
+ workspaceId,
69984
+ supabase,
69985
+ prefetchedPercentileCounts
69986
+ ]);
69780
69987
  const {
69781
69988
  metrics: historicMetrics,
69782
69989
  isLoading: historicLoading,
@@ -71052,7 +71259,7 @@ var WorkspaceDetailView = ({
71052
71259
  shift,
71053
71260
  totalOutput: workspace?.total_actions,
71054
71261
  workspaceMetrics: detailedWorkspaceMetrics || void 0,
71055
- prefetchedPercentileCounts,
71262
+ prefetchedPercentileCounts: isFastSlowClipFiltersEnabled ? prefetchedPercentileCounts : null,
71056
71263
  className: "h-[calc(100vh-10rem)]"
71057
71264
  }
71058
71265
  ) })
@@ -80016,4 +80223,4 @@ var streamProxyConfig = {
80016
80223
  }
80017
80224
  };
80018
80225
 
80019
- export { ACTION_FAMILIES, ACTION_NAMES, AIAgentView_default as AIAgentView, AcceptInvite, AcceptInviteView_default as AcceptInviteView, AdvancedFilterDialog, AdvancedFilterPanel, AudioService, AuthCallback, AuthCallbackView_default as AuthCallbackView, AuthProvider, AuthService, AuthenticatedBottleneckClipsView, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedShiftsView, AuthenticatedTargetsView, AuthenticatedTicketsView, AuthenticatedWorkspaceHealthView, AvatarUpload, AxelNotificationPopup, AxelOrb, BackButton, BackButtonMinimal, BarChart, BaseHistoryCalendar, BottleneckClipsModal, BottleneckClipsView_default as BottleneckClipsView, BottlenecksContent, BreakNotificationPopup, CachePrefetchStatus, Card2 as Card, CardContent2 as CardContent, CardDescription2 as CardDescription, CardFooter2 as CardFooter, CardHeader2 as CardHeader, CardTitle2 as CardTitle, ChangeRoleDialog, ClipFilterProvider, ClipsCostView_default as ClipsCostView, CompactWorkspaceHealthCard, ConfirmRemoveUserDialog, CongratulationsOverlay, CroppedHlsVideoPlayer, CroppedVideoPlayer, CycleTimeChart, CycleTimeOverTimeChart, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CONFIG, DEFAULT_DATABASE_CONFIG, DEFAULT_DATE_TIME_CONFIG, DEFAULT_ENDPOINTS_CONFIG, DEFAULT_ENTITY_CONFIG, DEFAULT_HOME_VIEW_CONFIG, DEFAULT_MAP_VIEW_CONFIG, DEFAULT_SHIFT_CONFIG, DEFAULT_SHIFT_DATA, DEFAULT_THEME_CONFIG, DEFAULT_VIDEO_CONFIG, DEFAULT_WORKSPACE_CONFIG, DEFAULT_WORKSPACE_POSITIONS, DashboardHeader, DashboardLayout, DashboardOverridesProvider, DashboardProvider, DateDisplay_default as DateDisplay, DateTimeDisplay, DebugAuth, DebugAuthView_default as DebugAuthView, DetailedHealthStatus, DiagnosisVideoModal, EFFICIENCY_ON_TRACK_THRESHOLD, EmptyStateMessage, EncouragementOverlay, FactoryAssignmentDropdown, FactoryView_default as FactoryView, FileManagerFilters, FilterDialogTrigger, FirstTimeLoginDebug, FirstTimeLoginHandler, FittingTitle, GaugeChart, GridComponentsPlaceholder, HamburgerButton, Header, HealthDateShiftSelector, HealthStatusGrid, HealthStatusIndicator, HelpView_default as HelpView, HlsVideoPlayer, HomeView_default as HomeView, HourlyOutputChart2 as HourlyOutputChart, HourlyUptimeChart, ISTTimer_default as ISTTimer, IdleTimeVlmConfigProvider, ImprovementCenterView_default as ImprovementCenterView, InlineEditableText, InteractiveOnboardingTour, InvitationService, InvitationsTable, InviteUserDialog, KPICard, KPIDetailView_default as KPIDetailView, KPIGrid, KPIHeader, KPISection, KPIsOverviewView_default as KPIsOverviewView, LINE_1_UUID, LINE_2_UUID, LargeOutputProgressChart, LeaderboardDetailView_default as LeaderboardDetailView, Legend5 as Legend, LineAssignmentDropdown, LineChart, LineHistoryCalendar, LineMonthlyHistory, LineMonthlyPdfGenerator, LinePdfExportButton, LinePdfGenerator, LineWhatsAppShareButton, LinesService, LiveTimer, LoadingInline, LoadingOverlay_default as LoadingOverlay, LoadingPage_default as LoadingPage, LoadingSkeleton, LoadingState, LoginPage, LoginView_default as LoginView, Logo, MainLayout, MapGridView, MetricCard_default as MetricCard, MinimalOnboardingPopup, MobileMenuProvider, NewClipsNotification, NoWorkspaceData, OnboardingDemo, OnboardingTour, OptifyeAgentClient, OptifyeLogoLoader_default as OptifyeLogoLoader, OutputProgressChart, PageHeader, PieChart4 as PieChart, PlantHeadView_default as PlantHeadView, PlayPauseIndicator, PrefetchConfigurationError, PrefetchError, PrefetchEvents, PrefetchStatus, PrefetchTimeoutError, ProfileView_default as ProfileView, ROOT_DASHBOARD_EVENT_NAMES, RegistryProvider, RoleBadge, S3ClipsSupabaseService as S3ClipsService, S3Service, SKUManagementView, SOPComplianceChart, SSEChatClient, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SessionTracker, SessionTrackingContext, SessionTrackingProvider, SettingsPopup, ShiftDisplay_default as ShiftDisplay, ShiftsView_default as ShiftsView, SideNavBar, SignupWithInvitation, SilentErrorBoundary, SimpleOnboardingPopup, SingleVideoStream_default as SingleVideoStream, Skeleton, SubscriptionManager, SubscriptionManagerProvider, SupabaseProvider, SupervisorDropdown_default as SupervisorDropdown, SupervisorManagementView_default as SupervisorManagementView, SupervisorService, TargetWorkspaceGrid, TargetsView_default as TargetsView, TeamManagementView_default as TeamManagementView, ThreadSidebar, TicketHistory_default as TicketHistory, TicketHistoryService, TicketsView_default as TicketsView, TimeDisplay_default as TimeDisplay, TimePickerDropdown, Timer_default as Timer, TimezoneProvider, TimezoneService, UptimeDonutChart, UptimeLineChart, UptimeMetricCards, UserAvatar, UserManagementService, UserManagementTable, UserService, UserUsageDetailModal, UserUsageStats, VideoCard, VideoGridView, VideoPlayer, VideoPreloader, WORKSPACE_POSITIONS, WhatsAppShareButton, WorkspaceCard, WorkspaceCycleTimeMetricCards, WorkspaceDetailView_default as WorkspaceDetailView, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, WorkspaceHealthCard, WorkspaceHealthView_default as WorkspaceHealthView, WorkspaceHistoryCalendar, WorkspaceMetricCards, WorkspaceMetricCardsImpl, WorkspaceMonthlyDataFetcher, WorkspaceMonthlyHistory, WorkspaceMonthlyPdfGenerator, WorkspacePdfExportButton, WorkspacePdfGenerator, WorkspaceWhatsAppShareButton, actionService, aggregateKPIsFromLineMetricsRows, alertsService, apiUtils, areAllLinesOnSameShift, authCoreService, authOTPService, authRateLimitService, awardsService, buildDateKey, buildKPIsFromLineMetricsRow, buildShiftGroupsKey, canRoleAccessDashboardPath, canRoleAccessTeamManagement, canRoleAssignFactories, canRoleAssignLines, canRoleChangeRole, canRoleInviteRole, canRoleManageCompany, canRoleManageTargets, canRoleManageUsers, canRoleRemoveUser, canRoleViewClipsCost, canRoleViewUsageStats, captureSentryException, captureSentryMessage, checkRateLimit2 as checkRateLimit, clearAllRateLimits2 as clearAllRateLimits, clearRateLimit2 as clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearSentryContext, clearWorkspaceDisplayNamesCache, cn, createDefaultKPIs, createInvitationService, createLinesService, createSessionTracker, createStorageService, createStreamProxyHandler, createSupabaseClient, createSupervisorService, createThrottledReload, createUserManagementService, createUserService, dashboardService, deleteThread, fetchIdleTimeReasons, filterDataByDateKeyRange, forceRefreshWorkspaceDisplayNames, formatAwardMonth, formatDateInZone, formatDateKeyForDisplay, formatDateTimeInZone, formatDuration2 as formatDuration, formatISTDate, formatIdleTime, formatRangeLabel, formatReasonLabel, formatRelativeTime, formatTimeInZone, fromUrlFriendlyName, getActionDisplayName, getActiveShift, getAllLineDisplayNames, getAllThreadMessages, getAllWorkspaceDisplayNamesAsync, getAllWorkspaceDisplayNamesSnapshot, getAnonClient, getAssignableRoles, getAssignmentColumnLabel, getAvailableShiftIds, getAwardBadgeType, getAwardDescription, getAwardTitle, getBrowserName, getCameraNumber, getCompanyMetricsTableName, getConfigurableShortWorkspaceDisplayName, getConfigurableWorkspaceDisplayName, getConfiguredLineIds, getCoreSessionRecordingProperties, getCoreSessionReplayUrl, getCurrentShift, getCurrentShiftForLine, getCurrentTimeInZone, getCurrentWeekFullRange, getCurrentWeekToDateRange, getDashboardHeaderTimeInZone, getDateKeyFromDate, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultLineId, getDefaultTabForWorkspace, getInitials, getLineDisplayName, getManufacturingInsights, getMetricsTablePrefix, getMonthKeyBounds, getMonthWeekRanges, getNextUpdateInterval, getOperationalDate, getRoleAssignmentKind, getRoleDescription, getRoleLabel, getRoleMetadata, getRoleNavPaths, getS3SignedUrl, getS3VideoSrc, getShiftData, getShiftNameById, getShiftWorkDurationSeconds, getShortShiftName, getShortWorkspaceDisplayName, getShortWorkspaceDisplayNameAsync, getStoredWorkspaceMappings, getSubscriptionManager, getThreadMessages, getUniformShiftGroup, getUserThreads, getUserThreadsPaginated, getVisibleRolesForCurrentUser, getWorkspaceDisplayName, getWorkspaceDisplayNameAsync, getWorkspaceDisplayNamesMap, getWorkspaceFromUrl, getWorkspaceNavigationParams, groupLinesByShift, hasAnyShiftData, identifyCoreUser, initializeCoreMixpanel, isEfficiencyOnTrack, isFactoryScopedRole, isFullMonthRange, isLegacyConfiguration, isLoopbackHostname, isPrefetchError, isRecentFlowVideoGridMetricMode, isSafari, isSupervisorRole, isTransitionPeriod, isUrlPermanentlyFailed, isValidFactoryViewConfiguration, isValidLineInfoPayload, isValidPrefetchParams, isValidPrefetchStatus, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWipGatedVideoGridMetricMode, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, lineLeaderboardService, linesService, mergeWithDefaultConfig, migrateLegacyConfiguration, normalizeActionFamily, normalizeDateKeyRange, normalizeRoleLevel, normalizeVideoGridMetricMode, optifyeAgentClient, parseDateKeyToDate, parseS3Uri, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, resetFailedUrl, resetSubscriptionManager, s3VideoPreloader, setSentryUserContext, setSentryWorkspaceContext, shouldEnableLocalDevTestLogin, shuffleArray, simulateApiDelay, skuService, startCoreSessionRecording, stopCoreSessionRecording, storeWorkspaceMapping, streamProxyConfig, subscribeWorkspaceDisplayNames, throttledReloadDashboard, toUrlFriendlyName, trackCoreEvent, trackCorePageView, transformToChartData, updateThreadTitle, upsertWorkspaceDisplayNameInCache, useAccessControl, useActiveBreaks, useActiveLineId, useAllWorkspaceMetrics, useAnalyticsConfig, useAppTimezone, useAudioService, useAuth, useAuthConfig, useAxelNotifications, useCanSaveTargets, useClipFilter, useClipTypes, useClipTypesWithCounts, useClipsInit, useCompanyClipsCost, useCompanyHasVlmEnabledLine, useCompanyUsersUsage, useComponentOverride, useCustomConfig, useDashboardConfig, useDashboardMetrics, useDatabaseConfig, useDateFormatter, useDateTimeConfig, useDynamicShiftConfig, useEndpointsConfig, useEntityConfig, useFactoryOverviewMetrics, useFeatureFlags, useFormatNumber, useHasLineAccess, useHideMobileHeader, useHistoricWorkspaceMetrics, useHlsStream, useHlsStreamWithCropping, useHookOverride, useHourEndTimer, useHourlyTargetAchievements, useHourlyTargetMisses, useIdleTimeClipClassifications, useIdleTimeReasons, useIdleTimeVlmConfig, useKpiTrends, useLeaderboardMetrics, useLineDetailedMetrics, useLineKPIs, useLineMetrics, useLineShiftConfig, useLineSupervisor, useLineWorkspaceMetrics, useLines, useMessages, useMetrics, useMobileMenu, useMonthlyTrend, useMultiLineShiftConfigs, useNavigation, useOperationalShiftKey, useOptionalSupabase, useOverrides, usePageOverride, usePrefetchClipCounts, useRealtimeLineMetrics, useRegistry, useSKUs, useSessionKeepAlive, useSessionTracking, useSessionTrackingContext, useShiftConfig, useShiftGroups, useShifts, useSubscriptionManager, useSubscriptionManagerSafe, useSupabase, useSupabaseClient, useSupervisorsByLineIds, useTargets, useTeamManagementPermissions, useTheme, useThemeConfig, useThreads, useTicketHistory, useTimezoneContext, useUserLineAccess, useUserUsage, useVideoConfig, useWorkspaceConfig, useWorkspaceDetailedMetrics, useWorkspaceDisplayName, useWorkspaceDisplayNames, useWorkspaceDisplayNamesMap, useWorkspaceHealthById, useWorkspaceHealthLastSeen, useWorkspaceHealthStatus, useWorkspaceMetrics, useWorkspaceNavigation, useWorkspaceOperators, useWorkspaceUptimeTimeline, useWorkspaceVideoStreams, userService, videoPrefetchManager, videoPreloader, weeklyTopPerformerService, whatsappService, withAccessControl, withAuth, withRegistry, withTimezone, workspaceHealthService, workspaceService };
80226
+ export { ACTION_FAMILIES, ACTION_NAMES, AIAgentView_default as AIAgentView, AcceptInvite, AcceptInviteView_default as AcceptInviteView, AdvancedFilterDialog, AdvancedFilterPanel, AudioService, AuthCallback, AuthCallbackView_default as AuthCallbackView, AuthProvider, AuthService, AuthenticatedBottleneckClipsView, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedShiftsView, AuthenticatedTargetsView, AuthenticatedTicketsView, AuthenticatedWorkspaceHealthView, AvatarUpload, AxelNotificationPopup, AxelOrb, BackButton, BackButtonMinimal, BarChart, BaseHistoryCalendar, BottleneckClipsModal, BottleneckClipsView_default as BottleneckClipsView, BottlenecksContent, BreakNotificationPopup, CachePrefetchStatus, Card2 as Card, CardContent2 as CardContent, CardDescription2 as CardDescription, CardFooter2 as CardFooter, CardHeader2 as CardHeader, CardTitle2 as CardTitle, ChangeRoleDialog, ClipFilterProvider, ClipsCostView_default as ClipsCostView, CompactWorkspaceHealthCard, ConfirmRemoveUserDialog, CongratulationsOverlay, CroppedHlsVideoPlayer, CroppedVideoPlayer, CycleTimeChart, CycleTimeOverTimeChart, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CONFIG, DEFAULT_DATABASE_CONFIG, DEFAULT_DATE_TIME_CONFIG, DEFAULT_ENDPOINTS_CONFIG, DEFAULT_ENTITY_CONFIG, DEFAULT_HOME_VIEW_CONFIG, DEFAULT_MAP_VIEW_CONFIG, DEFAULT_SHIFT_CONFIG, DEFAULT_SHIFT_DATA, DEFAULT_THEME_CONFIG, DEFAULT_VIDEO_CONFIG, DEFAULT_WORKSPACE_CONFIG, DEFAULT_WORKSPACE_POSITIONS, DashboardHeader, DashboardLayout, DashboardOverridesProvider, DashboardProvider, DateDisplay_default as DateDisplay, DateTimeDisplay, DebugAuth, DebugAuthView_default as DebugAuthView, DetailedHealthStatus, DiagnosisVideoModal, EFFICIENCY_ON_TRACK_THRESHOLD, EmptyStateMessage, EncouragementOverlay, FactoryAssignmentDropdown, FactoryView_default as FactoryView, FileManagerFilters, FilterDialogTrigger, FirstTimeLoginDebug, FirstTimeLoginHandler, FittingTitle, GaugeChart, GridComponentsPlaceholder, HamburgerButton, Header, HealthDateShiftSelector, HealthStatusGrid, HealthStatusIndicator, HelpView_default as HelpView, HlsVideoPlayer, HomeView_default as HomeView, HourlyOutputChart2 as HourlyOutputChart, HourlyUptimeChart, ISTTimer_default as ISTTimer, IdleTimeVlmConfigProvider, ImprovementCenterView_default as ImprovementCenterView, InlineEditableText, InteractiveOnboardingTour, InvitationService, InvitationsTable, InviteUserDialog, KPICard, KPIDetailView_default as KPIDetailView, KPIGrid, KPIHeader, KPISection, KPIsOverviewView_default as KPIsOverviewView, LINE_1_UUID, LINE_2_UUID, LargeOutputProgressChart, LeaderboardDetailView_default as LeaderboardDetailView, Legend5 as Legend, LineAssignmentDropdown, LineChart, LineHistoryCalendar, LineMonthlyHistory, LineMonthlyPdfGenerator, LinePdfExportButton, LinePdfGenerator, LineWhatsAppShareButton, LinesService, LiveTimer, LoadingInline, LoadingOverlay_default as LoadingOverlay, LoadingPage_default as LoadingPage, LoadingSkeleton, LoadingState, LoginPage, LoginView_default as LoginView, Logo, MainLayout, MapGridView, MetricCard_default as MetricCard, MinimalOnboardingPopup, MobileMenuProvider, NewClipsNotification, NoWorkspaceData, OnboardingDemo, OnboardingTour, OptifyeAgentClient, OptifyeLogoLoader_default as OptifyeLogoLoader, OutputProgressChart, PageHeader, PieChart4 as PieChart, PlantHeadView_default as PlantHeadView, PlayPauseIndicator, PrefetchConfigurationError, PrefetchError, PrefetchEvents, PrefetchStatus, PrefetchTimeoutError, ProfileView_default as ProfileView, ROOT_DASHBOARD_EVENT_NAMES, RegistryProvider, RoleBadge, S3ClipsSupabaseService as S3ClipsService, S3Service, SKUManagementView, SOPComplianceChart, SSEChatClient, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SessionTracker, SessionTrackingContext, SessionTrackingProvider, SettingsPopup, ShiftDisplay_default as ShiftDisplay, ShiftsView_default as ShiftsView, SideNavBar, SignupWithInvitation, SilentErrorBoundary, SimpleOnboardingPopup, SingleVideoStream_default as SingleVideoStream, Skeleton, SubscriptionManager, SubscriptionManagerProvider, SupabaseProvider, SupervisorDropdown_default as SupervisorDropdown, SupervisorManagementView_default as SupervisorManagementView, SupervisorService, TargetWorkspaceGrid, TargetsView_default as TargetsView, TeamManagementView_default as TeamManagementView, ThreadSidebar, TicketHistory_default as TicketHistory, TicketHistoryService, TicketsView_default as TicketsView, TimeDisplay_default as TimeDisplay, TimePickerDropdown, Timer_default as Timer, TimezoneProvider, TimezoneService, UptimeDonutChart, UptimeLineChart, UptimeMetricCards, UserAvatar, UserManagementService, UserManagementTable, UserService, UserUsageDetailModal, UserUsageStats, VideoCard, VideoGridView, VideoPlayer, VideoPreloader, WORKSPACE_POSITIONS, WhatsAppShareButton, WorkspaceCard, WorkspaceCycleTimeMetricCards, WorkspaceDetailView_default as WorkspaceDetailView, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, WorkspaceHealthCard, WorkspaceHealthView_default as WorkspaceHealthView, WorkspaceHistoryCalendar, WorkspaceMetricCards, WorkspaceMetricCardsImpl, WorkspaceMonthlyDataFetcher, WorkspaceMonthlyHistory, WorkspaceMonthlyPdfGenerator, WorkspacePdfExportButton, WorkspacePdfGenerator, WorkspaceWhatsAppShareButton, actionService, aggregateKPIsFromLineMetricsRows, alertsService, apiUtils, areAllLinesOnSameShift, authCoreService, authOTPService, authRateLimitService, awardsService, buildDateKey, buildKPIsFromLineMetricsRow, buildShiftGroupsKey, canRoleAccessDashboardPath, canRoleAccessTeamManagement, canRoleAssignFactories, canRoleAssignLines, canRoleChangeRole, canRoleInviteRole, canRoleManageCompany, canRoleManageTargets, canRoleManageUsers, canRoleRemoveUser, canRoleViewClipsCost, canRoleViewUsageStats, captureSentryException, captureSentryMessage, checkRateLimit2 as checkRateLimit, clearAllRateLimits2 as clearAllRateLimits, clearRateLimit2 as clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearSentryContext, clearWorkspaceDisplayNamesCache, cn, createDefaultKPIs, createInvitationService, createLinesService, createSessionTracker, createStorageService, createStreamProxyHandler, createSupabaseClient, createSupervisorService, createThrottledReload, createUserManagementService, createUserService, dashboardService, deleteThread, fetchIdleTimeReasons, filterDataByDateKeyRange, forceRefreshWorkspaceDisplayNames, formatAwardMonth, formatDateInZone, formatDateKeyForDisplay, formatDateTimeInZone, formatDuration2 as formatDuration, formatISTDate, formatIdleTime, formatRangeLabel, formatReasonLabel, formatRelativeTime, formatTimeInZone, fromUrlFriendlyName, getActionDisplayName, getActiveShift, getAllLineDisplayNames, getAllThreadMessages, getAllWorkspaceDisplayNamesAsync, getAllWorkspaceDisplayNamesSnapshot, getAnonClient, getAssignableRoles, getAssignmentColumnLabel, getAvailableShiftIds, getAwardBadgeType, getAwardDescription, getAwardTitle, getBrowserName, getCameraNumber, getCompanyMetricsTableName, getConfigurableShortWorkspaceDisplayName, getConfigurableWorkspaceDisplayName, getConfiguredLineIds, getCoreSessionRecordingProperties, getCoreSessionReplayUrl, getCurrentShift, getCurrentShiftForLine, getCurrentTimeInZone, getCurrentWeekFullRange, getCurrentWeekToDateRange, getDashboardHeaderTimeInZone, getDateKeyFromDate, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultLineId, getDefaultTabForWorkspace, getInitials, getLineDisplayName, getManufacturingInsights, getMetricsTablePrefix, getMonthKeyBounds, getMonthWeekRanges, getNextUpdateInterval, getOperationalDate, getRoleAssignmentKind, getRoleDescription, getRoleLabel, getRoleMetadata, getRoleNavPaths, getS3SignedUrl, getS3VideoSrc, getShiftData, getShiftNameById, getShiftWorkDurationSeconds, getShortShiftName, getShortWorkspaceDisplayName, getShortWorkspaceDisplayNameAsync, getStoredWorkspaceMappings, getSubscriptionManager, getThreadMessages, getUniformShiftGroup, getUserThreads, getUserThreadsPaginated, getVisibleRolesForCurrentUser, getWorkspaceDisplayName, getWorkspaceDisplayNameAsync, getWorkspaceDisplayNamesMap, getWorkspaceFromUrl, getWorkspaceNavigationParams, groupLinesByShift, hasAnyShiftData, identifyCoreUser, initializeCoreMixpanel, isEfficiencyOnTrack, isFactoryScopedRole, isFullMonthRange, isLegacyConfiguration, isLoopbackHostname, isPrefetchError, isRecentFlowVideoGridMetricMode, isSafari, isSupervisorRole, isTransitionPeriod, isUrlPermanentlyFailed, isValidFactoryViewConfiguration, isValidLineInfoPayload, isValidPrefetchParams, isValidPrefetchStatus, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWipGatedVideoGridMetricMode, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, lineLeaderboardService, linesService, mergeWithDefaultConfig, migrateLegacyConfiguration, normalizeActionFamily, normalizeDateKeyRange, normalizeRoleLevel, normalizeVideoGridMetricMode, optifyeAgentClient, parseDateKeyToDate, parseS3Uri, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, resetFailedUrl, resetSubscriptionManager, s3VideoPreloader, setSentryUserContext, setSentryWorkspaceContext, shouldEnableLocalDevTestLogin, shuffleArray, simulateApiDelay, skuService, startCoreSessionRecording, stopCoreSessionRecording, storeWorkspaceMapping, streamProxyConfig, subscribeWorkspaceDisplayNames, throttledReloadDashboard, toUrlFriendlyName, trackCoreEvent, trackCorePageView, transformToChartData, updateThreadTitle, upsertWorkspaceDisplayNameInCache, useAccessControl, useActiveBreaks, useActiveLineId, useAllWorkspaceMetrics, useAnalyticsConfig, useAppTimezone, useAudioService, useAuth, useAuthConfig, useAxelNotifications, useCanSaveTargets, useClipFilter, useClipTypes, useClipTypesWithCounts, useClipsInit, useCompanyClipsCost, useCompanyFastSlowClipFiltersEnabled, useCompanyHasVlmEnabledLine, useCompanyUsersUsage, useComponentOverride, useCustomConfig, useDashboardConfig, useDashboardMetrics, useDatabaseConfig, useDateFormatter, useDateTimeConfig, useDynamicShiftConfig, useEndpointsConfig, useEntityConfig, useFactoryOverviewMetrics, useFeatureFlags, useFormatNumber, useHasLineAccess, useHideMobileHeader, useHistoricWorkspaceMetrics, useHlsStream, useHlsStreamWithCropping, useHookOverride, useHourEndTimer, useHourlyTargetAchievements, useHourlyTargetMisses, useIdleTimeClipClassifications, useIdleTimeReasons, useIdleTimeVlmConfig, useKpiTrends, useLeaderboardMetrics, useLineDetailedMetrics, useLineKPIs, useLineMetrics, useLineShiftConfig, useLineSupervisor, useLineWorkspaceMetrics, useLines, useMessages, useMetrics, useMobileMenu, useMonthlyTrend, useMultiLineShiftConfigs, useNavigation, useOperationalShiftKey, useOptionalSupabase, useOverrides, usePageOverride, usePrefetchClipCounts, useRealtimeLineMetrics, useRegistry, useSKUs, useSessionKeepAlive, useSessionTracking, useSessionTrackingContext, useShiftConfig, useShiftGroups, useShifts, useSubscriptionManager, useSubscriptionManagerSafe, useSupabase, useSupabaseClient, useSupervisorsByLineIds, useTargets, useTeamManagementPermissions, useTheme, useThemeConfig, useThreads, useTicketHistory, useTimezoneContext, useUserLineAccess, useUserUsage, useVideoConfig, useWorkspaceConfig, useWorkspaceDetailedMetrics, useWorkspaceDisplayName, useWorkspaceDisplayNames, useWorkspaceDisplayNamesMap, useWorkspaceHealthById, useWorkspaceHealthLastSeen, useWorkspaceHealthStatus, useWorkspaceMetrics, useWorkspaceNavigation, useWorkspaceOperators, useWorkspaceUptimeTimeline, useWorkspaceVideoStreams, userService, videoPrefetchManager, videoPreloader, weeklyTopPerformerService, whatsappService, withAccessControl, withAuth, withRegistry, withTimezone, workspaceHealthService, workspaceService };