analytica-frontend-lib 1.1.18 → 1.1.20

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
@@ -129,11 +129,13 @@ __export(src_exports, {
129
129
  VideoPlayer: () => VideoPlayer_default,
130
130
  Whiteboard: () => Whiteboard_default,
131
131
  createZustandAuthAdapter: () => createZustandAuthAdapter,
132
+ getDeviceType: () => getDeviceType,
132
133
  getRootDomain: () => getRootDomain,
133
134
  getStatusBadge: () => getStatusBadge,
134
135
  useApiConfig: () => useApiConfig,
135
136
  useAuth: () => useAuth,
136
137
  useAuthGuard: () => useAuthGuard,
138
+ useMobile: () => useMobile,
137
139
  useQuizStore: () => useQuizStore,
138
140
  useRouteAuth: () => useRouteAuth,
139
141
  useToastStore: () => ToastStore_default,
@@ -5974,9 +5976,66 @@ var IconRender = ({
5974
5976
  };
5975
5977
  var IconRender_default = IconRender;
5976
5978
 
5979
+ // src/hooks/useMobile.ts
5980
+ var import_react19 = require("react");
5981
+ var MOBILE_WIDTH = 500;
5982
+ var TABLET_WIDTH = 931;
5983
+ var DEFAULT_WIDTH = 1200;
5984
+ var getWindowWidth = () => {
5985
+ if (typeof window === "undefined") {
5986
+ return DEFAULT_WIDTH;
5987
+ }
5988
+ return window.innerWidth;
5989
+ };
5990
+ var getDeviceType = () => {
5991
+ const width = getWindowWidth();
5992
+ return width < TABLET_WIDTH ? "responsive" : "desktop";
5993
+ };
5994
+ var useMobile = () => {
5995
+ const [isMobile, setIsMobile] = (0, import_react19.useState)(false);
5996
+ const [isTablet, setIsTablet] = (0, import_react19.useState)(false);
5997
+ (0, import_react19.useEffect)(() => {
5998
+ const checkScreenSize = () => {
5999
+ const width = getWindowWidth();
6000
+ setIsMobile(width < MOBILE_WIDTH);
6001
+ setIsTablet(width < TABLET_WIDTH);
6002
+ };
6003
+ checkScreenSize();
6004
+ window.addEventListener("resize", checkScreenSize);
6005
+ return () => window.removeEventListener("resize", checkScreenSize);
6006
+ }, []);
6007
+ const getFormContainerClasses = () => {
6008
+ if (isMobile) {
6009
+ return "w-full px-4";
6010
+ }
6011
+ if (isTablet) {
6012
+ return "w-full px-6";
6013
+ }
6014
+ return "w-full max-w-[992px] mx-auto px-0";
6015
+ };
6016
+ const getMobileHeaderClasses = () => {
6017
+ return "flex flex-col items-start gap-4 mb-6";
6018
+ };
6019
+ const getDesktopHeaderClasses = () => {
6020
+ return "flex flex-row justify-between items-center gap-6 mb-8";
6021
+ };
6022
+ const getHeaderClasses = () => {
6023
+ return isMobile ? getMobileHeaderClasses() : getDesktopHeaderClasses();
6024
+ };
6025
+ return {
6026
+ isMobile,
6027
+ isTablet,
6028
+ getFormContainerClasses,
6029
+ getHeaderClasses,
6030
+ getMobileHeaderClasses,
6031
+ getDesktopHeaderClasses,
6032
+ getDeviceType
6033
+ };
6034
+ };
6035
+
5977
6036
  // src/components/Select/Select.tsx
5978
6037
  var import_zustand5 = require("zustand");
5979
- var import_react19 = require("react");
6038
+ var import_react20 = require("react");
5980
6039
  var import_phosphor_react16 = require("phosphor-react");
5981
6040
  var import_jsx_runtime32 = require("react/jsx-runtime");
5982
6041
  var VARIANT_CLASSES4 = {
@@ -6036,13 +6095,13 @@ function getLabelAsNode(children) {
6036
6095
  if (typeof children === "string" || typeof children === "number") {
6037
6096
  return children;
6038
6097
  }
6039
- const flattened = import_react19.Children.toArray(children);
6098
+ const flattened = import_react20.Children.toArray(children);
6040
6099
  if (flattened.length === 1) return flattened[0];
6041
6100
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, { children: flattened });
6042
6101
  }
6043
6102
  var injectStore4 = (children, store, size, selectId) => {
6044
- return import_react19.Children.map(children, (child) => {
6045
- if ((0, import_react19.isValidElement)(child)) {
6103
+ return import_react20.Children.map(children, (child) => {
6104
+ if ((0, import_react20.isValidElement)(child)) {
6046
6105
  const typedChild = child;
6047
6106
  const newProps = {
6048
6107
  store
@@ -6059,7 +6118,7 @@ var injectStore4 = (children, store, size, selectId) => {
6059
6118
  selectId
6060
6119
  );
6061
6120
  }
6062
- return (0, import_react19.cloneElement)(typedChild, newProps);
6121
+ return (0, import_react20.cloneElement)(typedChild, newProps);
6063
6122
  }
6064
6123
  return child;
6065
6124
  });
@@ -6076,18 +6135,18 @@ var Select = ({
6076
6135
  errorMessage,
6077
6136
  id
6078
6137
  }) => {
6079
- const storeRef = (0, import_react19.useRef)(null);
6138
+ const storeRef = (0, import_react20.useRef)(null);
6080
6139
  storeRef.current ??= createSelectStore(onValueChange);
6081
6140
  const store = storeRef.current;
6082
- const selectRef = (0, import_react19.useRef)(null);
6141
+ const selectRef = (0, import_react20.useRef)(null);
6083
6142
  const { open, setOpen, setValue, selectedLabel } = (0, import_zustand5.useStore)(store, (s) => s);
6084
- const generatedId = (0, import_react19.useId)();
6143
+ const generatedId = (0, import_react20.useId)();
6085
6144
  const selectId = id ?? `select-${generatedId}`;
6086
6145
  const findLabelForValue = (children2, targetValue) => {
6087
6146
  let found = null;
6088
6147
  const search = (nodes) => {
6089
- import_react19.Children.forEach(nodes, (child) => {
6090
- if (!(0, import_react19.isValidElement)(child)) return;
6148
+ import_react20.Children.forEach(nodes, (child) => {
6149
+ if (!(0, import_react20.isValidElement)(child)) return;
6091
6150
  const typedChild = child;
6092
6151
  if (typedChild.type === SelectItem && typedChild.props.value === targetValue) {
6093
6152
  if (typeof typedChild.props.children === "string")
@@ -6100,13 +6159,13 @@ var Select = ({
6100
6159
  search(children2);
6101
6160
  return found;
6102
6161
  };
6103
- (0, import_react19.useEffect)(() => {
6162
+ (0, import_react20.useEffect)(() => {
6104
6163
  if (!selectedLabel && defaultValue) {
6105
6164
  const label2 = findLabelForValue(children, defaultValue);
6106
6165
  if (label2) store.setState({ selectedLabel: label2 });
6107
6166
  }
6108
6167
  }, [children, defaultValue, selectedLabel]);
6109
- (0, import_react19.useEffect)(() => {
6168
+ (0, import_react20.useEffect)(() => {
6110
6169
  const handleClickOutside = (event) => {
6111
6170
  if (selectRef.current && !selectRef.current.contains(event.target)) {
6112
6171
  setOpen(false);
@@ -6141,7 +6200,7 @@ var Select = ({
6141
6200
  document.removeEventListener("keydown", handleArrowKeys);
6142
6201
  };
6143
6202
  }, [open]);
6144
- (0, import_react19.useEffect)(() => {
6203
+ (0, import_react20.useEffect)(() => {
6145
6204
  if (propValue) {
6146
6205
  setValue(propValue);
6147
6206
  const label2 = findLabelForValue(children, propValue);
@@ -6178,7 +6237,7 @@ var SelectValue = ({
6178
6237
  const value = (0, import_zustand5.useStore)(store, (s) => s.value);
6179
6238
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-inherit", children: selectedLabel || placeholder || value });
6180
6239
  };
6181
- var SelectTrigger = (0, import_react19.forwardRef)(
6240
+ var SelectTrigger = (0, import_react20.forwardRef)(
6182
6241
  ({
6183
6242
  className,
6184
6243
  invalid = false,
@@ -6232,7 +6291,7 @@ var SelectTrigger = (0, import_react19.forwardRef)(
6232
6291
  }
6233
6292
  );
6234
6293
  SelectTrigger.displayName = "SelectTrigger";
6235
- var SelectContent = (0, import_react19.forwardRef)(
6294
+ var SelectContent = (0, import_react20.forwardRef)(
6236
6295
  ({
6237
6296
  children,
6238
6297
  className,
@@ -6262,7 +6321,7 @@ var SelectContent = (0, import_react19.forwardRef)(
6262
6321
  }
6263
6322
  );
6264
6323
  SelectContent.displayName = "SelectContent";
6265
- var SelectItem = (0, import_react19.forwardRef)(
6324
+ var SelectItem = (0, import_react20.forwardRef)(
6266
6325
  ({
6267
6326
  className,
6268
6327
  children,
@@ -6323,7 +6382,7 @@ var Select_default = Select;
6323
6382
 
6324
6383
  // src/components/Menu/Menu.tsx
6325
6384
  var import_zustand6 = require("zustand");
6326
- var import_react20 = require("react");
6385
+ var import_react21 = require("react");
6327
6386
  var import_phosphor_react17 = require("phosphor-react");
6328
6387
  var import_jsx_runtime33 = require("react/jsx-runtime");
6329
6388
  var createMenuStore = (onValueChange) => (0, import_zustand6.create)((set) => ({
@@ -6343,7 +6402,7 @@ var VARIANT_CLASSES5 = {
6343
6402
  menu2: "",
6344
6403
  breadcrumb: "bg-transparent shadow-none !px-0 !-ml-2"
6345
6404
  };
6346
- var Menu = (0, import_react20.forwardRef)(
6405
+ var Menu = (0, import_react21.forwardRef)(
6347
6406
  ({
6348
6407
  className,
6349
6408
  children,
@@ -6353,11 +6412,11 @@ var Menu = (0, import_react20.forwardRef)(
6353
6412
  onValueChange,
6354
6413
  ...props
6355
6414
  }, ref) => {
6356
- const storeRef = (0, import_react20.useRef)(null);
6415
+ const storeRef = (0, import_react21.useRef)(null);
6357
6416
  storeRef.current ??= createMenuStore(onValueChange);
6358
6417
  const store = storeRef.current;
6359
6418
  const { setValue } = (0, import_zustand6.useStore)(store, (s) => s);
6360
- (0, import_react20.useEffect)(() => {
6419
+ (0, import_react21.useEffect)(() => {
6361
6420
  setValue(propValue ?? defaultValue);
6362
6421
  }, [defaultValue, propValue, setValue]);
6363
6422
  const baseClasses = "w-full py-2 flex flex-row items-center justify-center";
@@ -6378,7 +6437,7 @@ var Menu = (0, import_react20.forwardRef)(
6378
6437
  }
6379
6438
  );
6380
6439
  Menu.displayName = "Menu";
6381
- var MenuContent = (0, import_react20.forwardRef)(
6440
+ var MenuContent = (0, import_react21.forwardRef)(
6382
6441
  ({ className, children, variant = "menu", ...props }, ref) => {
6383
6442
  const baseClasses = "w-full flex flex-row items-center gap-2";
6384
6443
  const variantClasses = variant === "menu2" ? "overflow-x-auto scroll-smooth" : "";
@@ -6400,7 +6459,7 @@ var MenuContent = (0, import_react20.forwardRef)(
6400
6459
  }
6401
6460
  );
6402
6461
  MenuContent.displayName = "MenuContent";
6403
- var MenuItem = (0, import_react20.forwardRef)(
6462
+ var MenuItem = (0, import_react21.forwardRef)(
6404
6463
  ({
6405
6464
  className,
6406
6465
  children,
@@ -6533,10 +6592,10 @@ var MenuOverflow = ({
6533
6592
  onValueChange,
6534
6593
  ...props
6535
6594
  }) => {
6536
- const containerRef = (0, import_react20.useRef)(null);
6537
- const [showLeftArrow, setShowLeftArrow] = (0, import_react20.useState)(false);
6538
- const [showRightArrow, setShowRightArrow] = (0, import_react20.useState)(false);
6539
- (0, import_react20.useEffect)(() => {
6595
+ const containerRef = (0, import_react21.useRef)(null);
6596
+ const [showLeftArrow, setShowLeftArrow] = (0, import_react21.useState)(false);
6597
+ const [showRightArrow, setShowRightArrow] = (0, import_react21.useState)(false);
6598
+ (0, import_react21.useEffect)(() => {
6540
6599
  const checkScroll = () => internalCheckScroll(
6541
6600
  containerRef.current,
6542
6601
  setShowLeftArrow,
@@ -6596,11 +6655,11 @@ var MenuOverflow = ({
6596
6655
  }
6597
6656
  );
6598
6657
  };
6599
- var injectStore5 = (children, store) => import_react20.Children.map(children, (child) => {
6600
- if (!(0, import_react20.isValidElement)(child)) return child;
6658
+ var injectStore5 = (children, store) => import_react21.Children.map(children, (child) => {
6659
+ if (!(0, import_react21.isValidElement)(child)) return child;
6601
6660
  const typedChild = child;
6602
6661
  const shouldInject = typedChild.type === MenuItem;
6603
- return (0, import_react20.cloneElement)(typedChild, {
6662
+ return (0, import_react21.cloneElement)(typedChild, {
6604
6663
  ...shouldInject ? { store } : {},
6605
6664
  ...typedChild.props.children ? { children: injectStore5(typedChild.props.children, store) } : {}
6606
6665
  });
@@ -6608,7 +6667,7 @@ var injectStore5 = (children, store) => import_react20.Children.map(children, (c
6608
6667
  var Menu_default = Menu;
6609
6668
 
6610
6669
  // src/components/Skeleton/Skeleton.tsx
6611
- var import_react21 = require("react");
6670
+ var import_react22 = require("react");
6612
6671
  var import_jsx_runtime34 = require("react/jsx-runtime");
6613
6672
  var SKELETON_ANIMATION_CLASSES = {
6614
6673
  pulse: "animate-pulse",
@@ -6626,7 +6685,7 @@ var SPACING_CLASSES = {
6626
6685
  medium: "space-y-2",
6627
6686
  large: "space-y-3"
6628
6687
  };
6629
- var Skeleton = (0, import_react21.forwardRef)(
6688
+ var Skeleton = (0, import_react22.forwardRef)(
6630
6689
  ({
6631
6690
  variant = "text",
6632
6691
  width,
@@ -6675,13 +6734,13 @@ var Skeleton = (0, import_react21.forwardRef)(
6675
6734
  );
6676
6735
  }
6677
6736
  );
6678
- var SkeletonText = (0, import_react21.forwardRef)(
6737
+ var SkeletonText = (0, import_react22.forwardRef)(
6679
6738
  (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Skeleton, { ref, variant: "text", ...props })
6680
6739
  );
6681
- var SkeletonCircle = (0, import_react21.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Skeleton, { ref, variant: "circular", ...props }));
6682
- var SkeletonRectangle = (0, import_react21.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Skeleton, { ref, variant: "rectangular", ...props }));
6683
- var SkeletonRounded = (0, import_react21.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Skeleton, { ref, variant: "rounded", ...props }));
6684
- var SkeletonCard = (0, import_react21.forwardRef)(
6740
+ var SkeletonCircle = (0, import_react22.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Skeleton, { ref, variant: "circular", ...props }));
6741
+ var SkeletonRectangle = (0, import_react22.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Skeleton, { ref, variant: "rectangular", ...props }));
6742
+ var SkeletonRounded = (0, import_react22.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Skeleton, { ref, variant: "rounded", ...props }));
6743
+ var SkeletonCard = (0, import_react22.forwardRef)(
6685
6744
  ({
6686
6745
  showAvatar = true,
6687
6746
  showTitle = true,
@@ -6717,7 +6776,7 @@ var SkeletonCard = (0, import_react21.forwardRef)(
6717
6776
  );
6718
6777
  }
6719
6778
  );
6720
- var SkeletonList = (0, import_react21.forwardRef)(
6779
+ var SkeletonList = (0, import_react22.forwardRef)(
6721
6780
  ({
6722
6781
  items = 3,
6723
6782
  showAvatar = true,
@@ -6736,7 +6795,7 @@ var SkeletonList = (0, import_react21.forwardRef)(
6736
6795
  ] }, index)) });
6737
6796
  }
6738
6797
  );
6739
- var SkeletonTable = (0, import_react21.forwardRef)(
6798
+ var SkeletonTable = (0, import_react22.forwardRef)(
6740
6799
  ({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
6741
6800
  return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { ref, className: cn("w-full", className), ...props, children: [
6742
6801
  showHeader && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
@@ -6861,7 +6920,7 @@ var NotFound = ({
6861
6920
  var NotFound_default = NotFound;
6862
6921
 
6863
6922
  // src/components/VideoPlayer/VideoPlayer.tsx
6864
- var import_react22 = require("react");
6923
+ var import_react23 = require("react");
6865
6924
  var import_phosphor_react18 = require("phosphor-react");
6866
6925
  var import_jsx_runtime36 = require("react/jsx-runtime");
6867
6926
  var CONTROLS_HIDE_TIMEOUT = 3e3;
@@ -6966,26 +7025,26 @@ var VideoPlayer = ({
6966
7025
  autoSave = true,
6967
7026
  storageKey = "video-progress"
6968
7027
  }) => {
6969
- const videoRef = (0, import_react22.useRef)(null);
6970
- const [isPlaying, setIsPlaying] = (0, import_react22.useState)(false);
6971
- const [currentTime, setCurrentTime] = (0, import_react22.useState)(0);
6972
- const [duration, setDuration] = (0, import_react22.useState)(0);
6973
- const [isMuted, setIsMuted] = (0, import_react22.useState)(false);
6974
- const [volume, setVolume] = (0, import_react22.useState)(1);
6975
- const [isFullscreen, setIsFullscreen] = (0, import_react22.useState)(false);
6976
- const [showControls, setShowControls] = (0, import_react22.useState)(true);
6977
- const [hasCompleted, setHasCompleted] = (0, import_react22.useState)(false);
6978
- const [showCaptions, setShowCaptions] = (0, import_react22.useState)(false);
6979
- (0, import_react22.useEffect)(() => {
7028
+ const videoRef = (0, import_react23.useRef)(null);
7029
+ const [isPlaying, setIsPlaying] = (0, import_react23.useState)(false);
7030
+ const [currentTime, setCurrentTime] = (0, import_react23.useState)(0);
7031
+ const [duration, setDuration] = (0, import_react23.useState)(0);
7032
+ const [isMuted, setIsMuted] = (0, import_react23.useState)(false);
7033
+ const [volume, setVolume] = (0, import_react23.useState)(1);
7034
+ const [isFullscreen, setIsFullscreen] = (0, import_react23.useState)(false);
7035
+ const [showControls, setShowControls] = (0, import_react23.useState)(true);
7036
+ const [hasCompleted, setHasCompleted] = (0, import_react23.useState)(false);
7037
+ const [showCaptions, setShowCaptions] = (0, import_react23.useState)(false);
7038
+ (0, import_react23.useEffect)(() => {
6980
7039
  setHasCompleted(false);
6981
7040
  }, [src]);
6982
- const [playbackRate, setPlaybackRate] = (0, import_react22.useState)(1);
6983
- const [showSpeedMenu, setShowSpeedMenu] = (0, import_react22.useState)(false);
6984
- const lastSaveTimeRef = (0, import_react22.useRef)(0);
6985
- const trackRef = (0, import_react22.useRef)(null);
6986
- const controlsTimeoutRef = (0, import_react22.useRef)(null);
6987
- const lastMousePositionRef = (0, import_react22.useRef)({ x: 0, y: 0 });
6988
- const isUserInteracting = (0, import_react22.useCallback)(() => {
7041
+ const [playbackRate, setPlaybackRate] = (0, import_react23.useState)(1);
7042
+ const [showSpeedMenu, setShowSpeedMenu] = (0, import_react23.useState)(false);
7043
+ const lastSaveTimeRef = (0, import_react23.useRef)(0);
7044
+ const trackRef = (0, import_react23.useRef)(null);
7045
+ const controlsTimeoutRef = (0, import_react23.useRef)(null);
7046
+ const lastMousePositionRef = (0, import_react23.useRef)({ x: 0, y: 0 });
7047
+ const isUserInteracting = (0, import_react23.useCallback)(() => {
6989
7048
  if (showSpeedMenu) {
6990
7049
  return true;
6991
7050
  }
@@ -7002,13 +7061,13 @@ var VideoPlayer = ({
7002
7061
  }
7003
7062
  return false;
7004
7063
  }, [showSpeedMenu]);
7005
- const clearControlsTimeout = (0, import_react22.useCallback)(() => {
7064
+ const clearControlsTimeout = (0, import_react23.useCallback)(() => {
7006
7065
  if (controlsTimeoutRef.current) {
7007
7066
  clearTimeout(controlsTimeoutRef.current);
7008
7067
  controlsTimeoutRef.current = null;
7009
7068
  }
7010
7069
  }, []);
7011
- const showControlsWithTimer = (0, import_react22.useCallback)(() => {
7070
+ const showControlsWithTimer = (0, import_react23.useCallback)(() => {
7012
7071
  setShowControls(true);
7013
7072
  clearControlsTimeout();
7014
7073
  if (isFullscreen) {
@@ -7023,7 +7082,7 @@ var VideoPlayer = ({
7023
7082
  }, CONTROLS_HIDE_TIMEOUT);
7024
7083
  }
7025
7084
  }, [isFullscreen, isPlaying, clearControlsTimeout]);
7026
- const handleMouseMove = (0, import_react22.useCallback)(
7085
+ const handleMouseMove = (0, import_react23.useCallback)(
7027
7086
  (event) => {
7028
7087
  const currentX = event.clientX;
7029
7088
  const currentY = event.clientY;
@@ -7036,10 +7095,10 @@ var VideoPlayer = ({
7036
7095
  },
7037
7096
  [showControlsWithTimer]
7038
7097
  );
7039
- const handleMouseEnter = (0, import_react22.useCallback)(() => {
7098
+ const handleMouseEnter = (0, import_react23.useCallback)(() => {
7040
7099
  showControlsWithTimer();
7041
7100
  }, [showControlsWithTimer]);
7042
- const handleMouseLeave = (0, import_react22.useCallback)(() => {
7101
+ const handleMouseLeave = (0, import_react23.useCallback)(() => {
7043
7102
  const userInteracting = isUserInteracting();
7044
7103
  clearControlsTimeout();
7045
7104
  if (!isFullscreen && !userInteracting) {
@@ -7048,13 +7107,13 @@ var VideoPlayer = ({
7048
7107
  }, LEAVE_HIDE_TIMEOUT);
7049
7108
  }
7050
7109
  }, [isFullscreen, clearControlsTimeout, isUserInteracting]);
7051
- (0, import_react22.useEffect)(() => {
7110
+ (0, import_react23.useEffect)(() => {
7052
7111
  if (videoRef.current) {
7053
7112
  videoRef.current.volume = volume;
7054
7113
  videoRef.current.muted = isMuted;
7055
7114
  }
7056
7115
  }, [volume, isMuted]);
7057
- (0, import_react22.useEffect)(() => {
7116
+ (0, import_react23.useEffect)(() => {
7058
7117
  const video = videoRef.current;
7059
7118
  if (!video) return;
7060
7119
  const onPlay = () => setIsPlaying(true);
@@ -7069,7 +7128,7 @@ var VideoPlayer = ({
7069
7128
  video.removeEventListener("ended", onEnded);
7070
7129
  };
7071
7130
  }, []);
7072
- (0, import_react22.useEffect)(() => {
7131
+ (0, import_react23.useEffect)(() => {
7073
7132
  if (isPlaying) {
7074
7133
  showControlsWithTimer();
7075
7134
  } else {
@@ -7081,7 +7140,7 @@ var VideoPlayer = ({
7081
7140
  }
7082
7141
  }
7083
7142
  }, [isPlaying, isFullscreen, showControlsWithTimer, clearControlsTimeout]);
7084
- (0, import_react22.useEffect)(() => {
7143
+ (0, import_react23.useEffect)(() => {
7085
7144
  const handleFullscreenChange = () => {
7086
7145
  const isCurrentlyFullscreen = !!document.fullscreenElement;
7087
7146
  setIsFullscreen(isCurrentlyFullscreen);
@@ -7094,7 +7153,7 @@ var VideoPlayer = ({
7094
7153
  document.removeEventListener("fullscreenchange", handleFullscreenChange);
7095
7154
  };
7096
7155
  }, [showControlsWithTimer]);
7097
- (0, import_react22.useEffect)(() => {
7156
+ (0, import_react23.useEffect)(() => {
7098
7157
  const init = () => {
7099
7158
  if (!isFullscreen) {
7100
7159
  showControlsWithTimer();
@@ -7116,7 +7175,7 @@ var VideoPlayer = ({
7116
7175
  };
7117
7176
  }
7118
7177
  }, []);
7119
- const getInitialTime = (0, import_react22.useCallback)(() => {
7178
+ const getInitialTime = (0, import_react23.useCallback)(() => {
7120
7179
  if (!autoSave || !storageKey) {
7121
7180
  return Number.isFinite(initialTime) && initialTime >= 0 ? initialTime : void 0;
7122
7181
  }
@@ -7127,14 +7186,14 @@ var VideoPlayer = ({
7127
7186
  if (hasValidSaved) return saved;
7128
7187
  return void 0;
7129
7188
  }, [autoSave, storageKey, src, initialTime]);
7130
- (0, import_react22.useEffect)(() => {
7189
+ (0, import_react23.useEffect)(() => {
7131
7190
  const start = getInitialTime();
7132
7191
  if (start !== void 0 && videoRef.current) {
7133
7192
  videoRef.current.currentTime = start;
7134
7193
  setCurrentTime(start);
7135
7194
  }
7136
7195
  }, [getInitialTime]);
7137
- const saveProgress = (0, import_react22.useCallback)(
7196
+ const saveProgress = (0, import_react23.useCallback)(
7138
7197
  (time) => {
7139
7198
  if (!autoSave || !storageKey) return;
7140
7199
  const now = Date.now();
@@ -7145,7 +7204,7 @@ var VideoPlayer = ({
7145
7204
  },
7146
7205
  [autoSave, storageKey, src]
7147
7206
  );
7148
- const togglePlayPause = (0, import_react22.useCallback)(async () => {
7207
+ const togglePlayPause = (0, import_react23.useCallback)(async () => {
7149
7208
  const video = videoRef.current;
7150
7209
  if (!video) return;
7151
7210
  if (!video.paused) {
@@ -7157,7 +7216,7 @@ var VideoPlayer = ({
7157
7216
  } catch {
7158
7217
  }
7159
7218
  }, []);
7160
- const handleVolumeChange = (0, import_react22.useCallback)(
7219
+ const handleVolumeChange = (0, import_react23.useCallback)(
7161
7220
  (newVolume) => {
7162
7221
  const video = videoRef.current;
7163
7222
  if (!video) return;
@@ -7176,7 +7235,7 @@ var VideoPlayer = ({
7176
7235
  },
7177
7236
  [isMuted]
7178
7237
  );
7179
- const toggleMute = (0, import_react22.useCallback)(() => {
7238
+ const toggleMute = (0, import_react23.useCallback)(() => {
7180
7239
  const video = videoRef.current;
7181
7240
  if (!video) return;
7182
7241
  if (isMuted) {
@@ -7190,13 +7249,13 @@ var VideoPlayer = ({
7190
7249
  setIsMuted(true);
7191
7250
  }
7192
7251
  }, [isMuted, volume]);
7193
- const handleSeek = (0, import_react22.useCallback)((newTime) => {
7252
+ const handleSeek = (0, import_react23.useCallback)((newTime) => {
7194
7253
  const video = videoRef.current;
7195
7254
  if (video) {
7196
7255
  video.currentTime = newTime;
7197
7256
  }
7198
7257
  }, []);
7199
- const toggleFullscreen = (0, import_react22.useCallback)(() => {
7258
+ const toggleFullscreen = (0, import_react23.useCallback)(() => {
7200
7259
  const container = videoRef.current?.parentElement;
7201
7260
  if (!container) return;
7202
7261
  if (!isFullscreen && container.requestFullscreen) {
@@ -7205,23 +7264,23 @@ var VideoPlayer = ({
7205
7264
  document.exitFullscreen();
7206
7265
  }
7207
7266
  }, [isFullscreen]);
7208
- const handleSpeedChange = (0, import_react22.useCallback)((speed) => {
7267
+ const handleSpeedChange = (0, import_react23.useCallback)((speed) => {
7209
7268
  if (videoRef.current) {
7210
7269
  videoRef.current.playbackRate = speed;
7211
7270
  setPlaybackRate(speed);
7212
7271
  setShowSpeedMenu(false);
7213
7272
  }
7214
7273
  }, []);
7215
- const toggleSpeedMenu = (0, import_react22.useCallback)(() => {
7274
+ const toggleSpeedMenu = (0, import_react23.useCallback)(() => {
7216
7275
  setShowSpeedMenu(!showSpeedMenu);
7217
7276
  }, [showSpeedMenu]);
7218
- const toggleCaptions = (0, import_react22.useCallback)(() => {
7277
+ const toggleCaptions = (0, import_react23.useCallback)(() => {
7219
7278
  if (!trackRef.current?.track || !subtitles) return;
7220
7279
  const newShowCaptions = !showCaptions;
7221
7280
  setShowCaptions(newShowCaptions);
7222
7281
  trackRef.current.track.mode = newShowCaptions && subtitles ? "showing" : "hidden";
7223
7282
  }, [showCaptions, subtitles]);
7224
- const checkVideoCompletion = (0, import_react22.useCallback)(
7283
+ const checkVideoCompletion = (0, import_react23.useCallback)(
7225
7284
  (progressPercent) => {
7226
7285
  if (progressPercent >= 95 && !hasCompleted) {
7227
7286
  setHasCompleted(true);
@@ -7230,7 +7289,7 @@ var VideoPlayer = ({
7230
7289
  },
7231
7290
  [hasCompleted, onVideoComplete]
7232
7291
  );
7233
- const handleTimeUpdate = (0, import_react22.useCallback)(() => {
7292
+ const handleTimeUpdate = (0, import_react23.useCallback)(() => {
7234
7293
  const video = videoRef.current;
7235
7294
  if (!video) return;
7236
7295
  const current = video.currentTime;
@@ -7243,17 +7302,17 @@ var VideoPlayer = ({
7243
7302
  checkVideoCompletion(progressPercent);
7244
7303
  }
7245
7304
  }, [duration, saveProgress, onTimeUpdate, onProgress, checkVideoCompletion]);
7246
- const handleLoadedMetadata = (0, import_react22.useCallback)(() => {
7305
+ const handleLoadedMetadata = (0, import_react23.useCallback)(() => {
7247
7306
  if (videoRef.current) {
7248
7307
  setDuration(videoRef.current.duration);
7249
7308
  }
7250
7309
  }, []);
7251
- (0, import_react22.useEffect)(() => {
7310
+ (0, import_react23.useEffect)(() => {
7252
7311
  if (trackRef.current?.track) {
7253
7312
  trackRef.current.track.mode = showCaptions && subtitles ? "showing" : "hidden";
7254
7313
  }
7255
7314
  }, [subtitles, showCaptions]);
7256
- (0, import_react22.useEffect)(() => {
7315
+ (0, import_react23.useEffect)(() => {
7257
7316
  const handleVisibilityChange = () => {
7258
7317
  if (document.hidden && isPlaying && videoRef.current) {
7259
7318
  videoRef.current.pause();
@@ -7275,13 +7334,13 @@ var VideoPlayer = ({
7275
7334
  };
7276
7335
  }, [isPlaying, clearControlsTimeout]);
7277
7336
  const progressPercentage = duration > 0 ? currentTime / duration * 100 : 0;
7278
- const getTopControlsOpacity = (0, import_react22.useCallback)(() => {
7337
+ const getTopControlsOpacity = (0, import_react23.useCallback)(() => {
7279
7338
  return showControls ? "opacity-100" : "opacity-0";
7280
7339
  }, [showControls]);
7281
- const getBottomControlsOpacity = (0, import_react22.useCallback)(() => {
7340
+ const getBottomControlsOpacity = (0, import_react23.useCallback)(() => {
7282
7341
  return showControls ? "opacity-100" : "opacity-0";
7283
7342
  }, [showControls]);
7284
- const handleVideoKeyDown = (0, import_react22.useCallback)(
7343
+ const handleVideoKeyDown = (0, import_react23.useCallback)(
7285
7344
  (e) => {
7286
7345
  if (e.key) {
7287
7346
  e.stopPropagation();
@@ -7506,7 +7565,7 @@ var VideoPlayer = ({
7506
7565
  var VideoPlayer_default = VideoPlayer;
7507
7566
 
7508
7567
  // src/components/Whiteboard/Whiteboard.tsx
7509
- var import_react23 = require("react");
7568
+ var import_react24 = require("react");
7510
7569
  var import_phosphor_react19 = require("phosphor-react");
7511
7570
  var import_jsx_runtime37 = require("react/jsx-runtime");
7512
7571
  var IMAGE_WIDTH = 225;
@@ -7519,8 +7578,8 @@ var Whiteboard = ({
7519
7578
  imagesPerRow = 2,
7520
7579
  ...rest
7521
7580
  }) => {
7522
- const [imageErrors, setImageErrors] = (0, import_react23.useState)(/* @__PURE__ */ new Set());
7523
- const handleDownload = (0, import_react23.useCallback)(
7581
+ const [imageErrors, setImageErrors] = (0, import_react24.useState)(/* @__PURE__ */ new Set());
7582
+ const handleDownload = (0, import_react24.useCallback)(
7524
7583
  (image) => {
7525
7584
  if (onDownload) {
7526
7585
  onDownload(image);
@@ -7537,7 +7596,7 @@ var Whiteboard = ({
7537
7596
  },
7538
7597
  [onDownload]
7539
7598
  );
7540
- const handleImageError = (0, import_react23.useCallback)((imageId) => {
7599
+ const handleImageError = (0, import_react24.useCallback)((imageId) => {
7541
7600
  setImageErrors((prev) => new Set(prev).add(imageId));
7542
7601
  }, []);
7543
7602
  const gridColsClass = images?.length === 1 ? "grid-cols-1" : {
@@ -7624,10 +7683,10 @@ var Whiteboard = ({
7624
7683
  var Whiteboard_default = Whiteboard;
7625
7684
 
7626
7685
  // src/components/Auth/Auth.tsx
7627
- var import_react24 = require("react");
7686
+ var import_react25 = require("react");
7628
7687
  var import_react_router_dom = require("react-router-dom");
7629
7688
  var import_jsx_runtime38 = require("react/jsx-runtime");
7630
- var AuthContext = (0, import_react24.createContext)(void 0);
7689
+ var AuthContext = (0, import_react25.createContext)(void 0);
7631
7690
  var AuthProvider = ({
7632
7691
  children,
7633
7692
  checkAuthFn,
@@ -7637,12 +7696,12 @@ var AuthProvider = ({
7637
7696
  getSessionFn,
7638
7697
  getTokensFn
7639
7698
  }) => {
7640
- const [authState, setAuthState] = (0, import_react24.useState)({
7699
+ const [authState, setAuthState] = (0, import_react25.useState)({
7641
7700
  isAuthenticated: false,
7642
7701
  isLoading: true,
7643
7702
  ...initialAuthState
7644
7703
  });
7645
- const checkAuth = (0, import_react24.useCallback)(async () => {
7704
+ const checkAuth = (0, import_react25.useCallback)(async () => {
7646
7705
  try {
7647
7706
  setAuthState((prev) => ({ ...prev, isLoading: true }));
7648
7707
  if (!checkAuthFn) {
@@ -7673,7 +7732,7 @@ var AuthProvider = ({
7673
7732
  return false;
7674
7733
  }
7675
7734
  }, [checkAuthFn, getUserFn, getSessionFn, getTokensFn]);
7676
- const signOut = (0, import_react24.useCallback)(() => {
7735
+ const signOut = (0, import_react25.useCallback)(() => {
7677
7736
  if (signOutFn) {
7678
7737
  signOutFn();
7679
7738
  }
@@ -7685,10 +7744,10 @@ var AuthProvider = ({
7685
7744
  tokens: void 0
7686
7745
  }));
7687
7746
  }, [signOutFn]);
7688
- (0, import_react24.useEffect)(() => {
7747
+ (0, import_react25.useEffect)(() => {
7689
7748
  checkAuth();
7690
7749
  }, [checkAuth]);
7691
- const contextValue = (0, import_react24.useMemo)(
7750
+ const contextValue = (0, import_react25.useMemo)(
7692
7751
  () => ({
7693
7752
  ...authState,
7694
7753
  checkAuth,
@@ -7699,7 +7758,7 @@ var AuthProvider = ({
7699
7758
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AuthContext.Provider, { value: contextValue, children });
7700
7759
  };
7701
7760
  var useAuth = () => {
7702
- const context = (0, import_react24.useContext)(AuthContext);
7761
+ const context = (0, import_react25.useContext)(AuthContext);
7703
7762
  if (context === void 0) {
7704
7763
  throw new Error("useAuth deve ser usado dentro de um AuthProvider");
7705
7764
  }
@@ -7839,7 +7898,7 @@ function createZustandAuthAdapter(useAuthStore) {
7839
7898
  }
7840
7899
 
7841
7900
  // src/components/Auth/useUrlAuthentication.ts
7842
- var import_react25 = require("react");
7901
+ var import_react26 = require("react");
7843
7902
  var import_react_router_dom2 = require("react-router-dom");
7844
7903
  var getAuthParams = (location, extractParams) => {
7845
7904
  const searchParams = new URLSearchParams(location.search);
@@ -7887,7 +7946,7 @@ var handleUserData = (responseData, setUser) => {
7887
7946
  };
7888
7947
  function useUrlAuthentication(options) {
7889
7948
  const location = (0, import_react_router_dom2.useLocation)();
7890
- (0, import_react25.useEffect)(() => {
7949
+ (0, import_react26.useEffect)(() => {
7891
7950
  const handleAuthentication = async () => {
7892
7951
  const authParams = getAuthParams(location, options.extractParams);
7893
7952
  if (!hasValidAuthParams(authParams)) {
@@ -7926,9 +7985,9 @@ function useUrlAuthentication(options) {
7926
7985
  }
7927
7986
 
7928
7987
  // src/components/Auth/useApiConfig.ts
7929
- var import_react26 = require("react");
7988
+ var import_react27 = require("react");
7930
7989
  function useApiConfig(api) {
7931
- return (0, import_react26.useMemo)(
7990
+ return (0, import_react27.useMemo)(
7932
7991
  () => ({
7933
7992
  get: (endpoint, config) => api.get(endpoint, config)
7934
7993
  }),
@@ -7938,7 +7997,7 @@ function useApiConfig(api) {
7938
7997
 
7939
7998
  // src/components/Quiz/Quiz.tsx
7940
7999
  var import_phosphor_react20 = require("phosphor-react");
7941
- var import_react27 = require("react");
8000
+ var import_react28 = require("react");
7942
8001
 
7943
8002
  // src/components/Quiz/useQuizStore.ts
7944
8003
  var import_zustand7 = require("zustand");
@@ -8508,9 +8567,6 @@ var useQuizStore = (0, import_zustand7.create)()(
8508
8567
  )
8509
8568
  );
8510
8569
 
8511
- // src/assets/img/simulated-result.png
8512
- var simulated_result_default = "./simulated-result-QN5HCUY5.png";
8513
-
8514
8570
  // src/assets/img/mock-image-question.png
8515
8571
  var mock_image_question_default = "./mock-image-question-HEZCLFDL.png";
8516
8572
 
@@ -8534,9 +8590,9 @@ var getStatusStyles = (variantCorrect) => {
8534
8590
  return "bg-error-background border-error-300";
8535
8591
  }
8536
8592
  };
8537
- var Quiz = (0, import_react27.forwardRef)(({ children, className, variant = "default", ...props }, ref) => {
8593
+ var Quiz = (0, import_react28.forwardRef)(({ children, className, variant = "default", ...props }, ref) => {
8538
8594
  const { setVariant } = useQuizStore();
8539
- (0, import_react27.useEffect)(() => {
8595
+ (0, import_react28.useEffect)(() => {
8540
8596
  setVariant(variant);
8541
8597
  }, [variant, setVariant]);
8542
8598
  return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
@@ -8552,11 +8608,11 @@ var Quiz = (0, import_react27.forwardRef)(({ children, className, variant = "def
8552
8608
  }
8553
8609
  );
8554
8610
  });
8555
- var QuizHeaderResult = (0, import_react27.forwardRef)(
8611
+ var QuizHeaderResult = (0, import_react28.forwardRef)(
8556
8612
  ({ className, ...props }, ref) => {
8557
8613
  const { getQuestionResultByQuestionId, getCurrentQuestion } = useQuizStore();
8558
- const [isCorrect, setIsCorrect] = (0, import_react27.useState)(false);
8559
- (0, import_react27.useEffect)(() => {
8614
+ const [isCorrect, setIsCorrect] = (0, import_react28.useState)(false);
8615
+ (0, import_react28.useEffect)(() => {
8560
8616
  const cq = getCurrentQuestion();
8561
8617
  if (!cq) {
8562
8618
  setIsCorrect(false);
@@ -8587,7 +8643,7 @@ var QuizHeaderResult = (0, import_react27.forwardRef)(
8587
8643
  );
8588
8644
  }
8589
8645
  );
8590
- var QuizTitle = (0, import_react27.forwardRef)(
8646
+ var QuizTitle = (0, import_react28.forwardRef)(
8591
8647
  ({ className, ...props }, ref) => {
8592
8648
  const {
8593
8649
  currentQuestionIndex,
@@ -8619,7 +8675,7 @@ var QuizTitle = (0, import_react27.forwardRef)(
8619
8675
  );
8620
8676
  }
8621
8677
  );
8622
- var QuizSubTitle = (0, import_react27.forwardRef)(
8678
+ var QuizSubTitle = (0, import_react28.forwardRef)(
8623
8679
  ({ subTitle, ...props }, ref) => {
8624
8680
  return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
8625
8681
  }
@@ -8636,7 +8692,7 @@ var QuizHeader = () => {
8636
8692
  }
8637
8693
  );
8638
8694
  };
8639
- var QuizContainer = (0, import_react27.forwardRef)(({ children, className, ...props }, ref) => {
8695
+ var QuizContainer = (0, import_react28.forwardRef)(({ children, className, ...props }, ref) => {
8640
8696
  return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8641
8697
  "div",
8642
8698
  {
@@ -8650,7 +8706,7 @@ var QuizContainer = (0, import_react27.forwardRef)(({ children, className, ...pr
8650
8706
  }
8651
8707
  );
8652
8708
  });
8653
- var QuizContent = (0, import_react27.forwardRef)(({ paddingBottom }) => {
8709
+ var QuizContent = (0, import_react28.forwardRef)(({ paddingBottom }) => {
8654
8710
  const { getCurrentQuestion } = useQuizStore();
8655
8711
  const currentQuestion = getCurrentQuestion();
8656
8712
  const questionComponents = {
@@ -8735,15 +8791,15 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
8735
8791
  const currentQuestionResult = getQuestionResultByQuestionId(
8736
8792
  currentQuestion?.id || ""
8737
8793
  );
8738
- const prevSelectedValuesRef = (0, import_react27.useRef)([]);
8739
- const prevQuestionIdRef = (0, import_react27.useRef)("");
8740
- const allCurrentAnswerIds = (0, import_react27.useMemo)(() => {
8794
+ const prevSelectedValuesRef = (0, import_react28.useRef)([]);
8795
+ const prevQuestionIdRef = (0, import_react28.useRef)("");
8796
+ const allCurrentAnswerIds = (0, import_react28.useMemo)(() => {
8741
8797
  return allCurrentAnswers?.map((answer) => answer.optionId) || [];
8742
8798
  }, [allCurrentAnswers]);
8743
- const selectedValues = (0, import_react27.useMemo)(() => {
8799
+ const selectedValues = (0, import_react28.useMemo)(() => {
8744
8800
  return allCurrentAnswerIds?.filter((id) => id !== null) || [];
8745
8801
  }, [allCurrentAnswerIds]);
8746
- const stableSelectedValues = (0, import_react27.useMemo)(() => {
8802
+ const stableSelectedValues = (0, import_react28.useMemo)(() => {
8747
8803
  const currentQuestionId = currentQuestion?.id || "";
8748
8804
  const hasQuestionChanged = prevQuestionIdRef.current !== currentQuestionId;
8749
8805
  if (hasQuestionChanged) {
@@ -8767,7 +8823,7 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
8767
8823
  variant,
8768
8824
  currentQuestionResult?.selectedOptions
8769
8825
  ]);
8770
- const handleSelectedValues = (0, import_react27.useCallback)(
8826
+ const handleSelectedValues = (0, import_react28.useCallback)(
8771
8827
  (values) => {
8772
8828
  if (currentQuestion) {
8773
8829
  selectMultipleAnswer(currentQuestion.id, values);
@@ -8775,7 +8831,7 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
8775
8831
  },
8776
8832
  [currentQuestion, selectMultipleAnswer]
8777
8833
  );
8778
- const questionKey = (0, import_react27.useMemo)(
8834
+ const questionKey = (0, import_react28.useMemo)(
8779
8835
  () => `question-${currentQuestion?.id || "1"}`,
8780
8836
  [currentQuestion?.id]
8781
8837
  );
@@ -8830,13 +8886,13 @@ var QuizDissertative = ({ paddingBottom }) => {
8830
8886
  currentQuestion?.id || ""
8831
8887
  );
8832
8888
  const currentAnswer = getCurrentAnswer();
8833
- const textareaRef = (0, import_react27.useRef)(null);
8889
+ const textareaRef = (0, import_react28.useRef)(null);
8834
8890
  const handleAnswerChange = (value) => {
8835
8891
  if (currentQuestion) {
8836
8892
  selectDissertativeAnswer(currentQuestion.id, value);
8837
8893
  }
8838
8894
  };
8839
- const adjustTextareaHeight = (0, import_react27.useCallback)(() => {
8895
+ const adjustTextareaHeight = (0, import_react28.useCallback)(() => {
8840
8896
  if (textareaRef.current) {
8841
8897
  textareaRef.current.style.height = "auto";
8842
8898
  const scrollHeight = textareaRef.current.scrollHeight;
@@ -8846,7 +8902,7 @@ var QuizDissertative = ({ paddingBottom }) => {
8846
8902
  textareaRef.current.style.height = `${newHeight}px`;
8847
8903
  }
8848
8904
  }, []);
8849
- (0, import_react27.useEffect)(() => {
8905
+ (0, import_react28.useEffect)(() => {
8850
8906
  adjustTextareaHeight();
8851
8907
  }, [currentAnswer, adjustTextareaHeight]);
8852
8908
  if (!currentQuestion) {
@@ -8985,7 +9041,7 @@ var QuizConnectDots = ({ paddingBottom }) => {
8985
9041
  isCorrect: false
8986
9042
  }
8987
9043
  ];
8988
- const [userAnswers, setUserAnswers] = (0, import_react27.useState)(() => {
9044
+ const [userAnswers, setUserAnswers] = (0, import_react28.useState)(() => {
8989
9045
  if (variant === "result") {
8990
9046
  return mockUserAnswers;
8991
9047
  }
@@ -9104,8 +9160,8 @@ var QuizFill = ({ paddingBottom }) => {
9104
9160
  isCorrect: true
9105
9161
  }
9106
9162
  ];
9107
- const [answers, setAnswers] = (0, import_react27.useState)({});
9108
- const baseId = (0, import_react27.useId)();
9163
+ const [answers, setAnswers] = (0, import_react28.useState)({});
9164
+ const baseId = (0, import_react28.useId)();
9109
9165
  const getAvailableOptionsForSelect = (selectId) => {
9110
9166
  const usedOptions = Object.entries(answers).filter(([key]) => key !== selectId).map(([, value]) => value);
9111
9167
  return options.filter((option) => !usedOptions.includes(option));
@@ -9242,7 +9298,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
9242
9298
  };
9243
9299
  const correctRadiusRelative = calculateCorrectRadiusRelative();
9244
9300
  const mockUserAnswerRelative = { x: 0.72, y: 0.348 };
9245
- const [clickPositionRelative, setClickPositionRelative] = (0, import_react27.useState)(variant == "result" ? mockUserAnswerRelative : null);
9301
+ const [clickPositionRelative, setClickPositionRelative] = (0, import_react28.useState)(variant == "result" ? mockUserAnswerRelative : null);
9246
9302
  const convertToRelativeCoordinates = (x, y, rect) => {
9247
9303
  const safeWidth = Math.max(rect.width, 1e-3);
9248
9304
  const safeHeight = Math.max(rect.height, 1e-3);
@@ -9439,12 +9495,13 @@ var QuizQuestionList = ({
9439
9495
  ] }, subjectId)
9440
9496
  ) });
9441
9497
  };
9442
- var QuizFooter = (0, import_react27.forwardRef)(
9498
+ var QuizFooter = (0, import_react28.forwardRef)(
9443
9499
  ({
9444
9500
  className,
9445
9501
  onGoToSimulated,
9446
9502
  onDetailResult,
9447
9503
  handleFinishSimulated,
9504
+ resultImageComponent,
9448
9505
  ...props
9449
9506
  }, ref) => {
9450
9507
  const {
@@ -9466,11 +9523,11 @@ var QuizFooter = (0, import_react27.forwardRef)(
9466
9523
  const currentAnswer = getCurrentAnswer();
9467
9524
  const currentQuestion = getCurrentQuestion();
9468
9525
  const isCurrentQuestionSkipped = currentQuestion ? getQuestionStatusFromUserAnswers(currentQuestion.id) === "skipped" : false;
9469
- const [alertDialogOpen, setAlertDialogOpen] = (0, import_react27.useState)(false);
9470
- const [modalResultOpen, setModalResultOpen] = (0, import_react27.useState)(false);
9471
- const [modalNavigateOpen, setModalNavigateOpen] = (0, import_react27.useState)(false);
9472
- const [modalResolutionOpen, setModalResolutionOpen] = (0, import_react27.useState)(false);
9473
- const [filterType, setFilterType] = (0, import_react27.useState)(void 0);
9526
+ const [alertDialogOpen, setAlertDialogOpen] = (0, import_react28.useState)(false);
9527
+ const [modalResultOpen, setModalResultOpen] = (0, import_react28.useState)(false);
9528
+ const [modalNavigateOpen, setModalNavigateOpen] = (0, import_react28.useState)(false);
9529
+ const [modalResolutionOpen, setModalResolutionOpen] = (0, import_react28.useState)(false);
9530
+ const [filterType, setFilterType] = (0, import_react28.useState)(void 0);
9474
9531
  const unansweredQuestions = getUnansweredQuestionsFromUserAnswers();
9475
9532
  const allQuestions = getTotalQuestions();
9476
9533
  const handleFinishQuiz = async () => {
@@ -9618,14 +9675,7 @@ var QuizFooter = (0, import_react27.forwardRef)(
9618
9675
  hideCloseButton: true,
9619
9676
  size: "md",
9620
9677
  children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
9621
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
9622
- "img",
9623
- {
9624
- src: simulated_result_default,
9625
- alt: "Simulated Result",
9626
- className: "w-[282px] h-auto object-cover"
9627
- }
9628
- ),
9678
+ resultImageComponent ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
9629
9679
  /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
9630
9680
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: "Voc\xEA concluiu o simulado!" }),
9631
9681
  /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("p", { className: "text-text-500 font-sm", children: [
@@ -9696,7 +9746,7 @@ var QuizFooter = (0, import_react27.forwardRef)(
9696
9746
  ] });
9697
9747
  }
9698
9748
  );
9699
- var QuizResultHeaderTitle = (0, import_react27.forwardRef)(({ className, ...props }, ref) => {
9749
+ var QuizResultHeaderTitle = (0, import_react28.forwardRef)(({ className, ...props }, ref) => {
9700
9750
  const { bySimulated } = useQuizStore();
9701
9751
  return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
9702
9752
  "div",
@@ -9711,7 +9761,7 @@ var QuizResultHeaderTitle = (0, import_react27.forwardRef)(({ className, ...prop
9711
9761
  }
9712
9762
  );
9713
9763
  });
9714
- var QuizResultTitle = (0, import_react27.forwardRef)(({ className, ...props }, ref) => {
9764
+ var QuizResultTitle = (0, import_react28.forwardRef)(({ className, ...props }, ref) => {
9715
9765
  const { getQuizTitle } = useQuizStore();
9716
9766
  const quizTitle = getQuizTitle();
9717
9767
  return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
@@ -9724,7 +9774,7 @@ var QuizResultTitle = (0, import_react27.forwardRef)(({ className, ...props }, r
9724
9774
  }
9725
9775
  );
9726
9776
  });
9727
- var QuizResultPerformance = (0, import_react27.forwardRef)(
9777
+ var QuizResultPerformance = (0, import_react28.forwardRef)(
9728
9778
  ({ ...props }, ref) => {
9729
9779
  const {
9730
9780
  getTotalQuestions,
@@ -9848,7 +9898,7 @@ var QuizResultPerformance = (0, import_react27.forwardRef)(
9848
9898
  );
9849
9899
  }
9850
9900
  );
9851
- var QuizListResult = (0, import_react27.forwardRef)(({ className, onSubjectClick, ...props }, ref) => {
9901
+ var QuizListResult = (0, import_react28.forwardRef)(({ className, onSubjectClick, ...props }, ref) => {
9852
9902
  const { getQuestionsGroupedBySubject } = useQuizStore();
9853
9903
  const groupedQuestions = getQuestionsGroupedBySubject();
9854
9904
  const subjectsStats = Object.entries(groupedQuestions).map(
@@ -10025,11 +10075,13 @@ var QuizListResultByMateria = ({
10025
10075
  VideoPlayer,
10026
10076
  Whiteboard,
10027
10077
  createZustandAuthAdapter,
10078
+ getDeviceType,
10028
10079
  getRootDomain,
10029
10080
  getStatusBadge,
10030
10081
  useApiConfig,
10031
10082
  useAuth,
10032
10083
  useAuthGuard,
10084
+ useMobile,
10033
10085
  useQuizStore,
10034
10086
  useRouteAuth,
10035
10087
  useToastStore,