analytica-frontend-lib 1.2.67 → 1.2.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/ActivityCardQuestionBanks/index.js +827 -244
  2. package/dist/ActivityCardQuestionBanks/index.js.map +1 -1
  3. package/dist/ActivityCardQuestionBanks/index.mjs +828 -237
  4. package/dist/ActivityCardQuestionBanks/index.mjs.map +1 -1
  5. package/dist/ActivityCardQuestionPreview/index.js +650 -67
  6. package/dist/ActivityCardQuestionPreview/index.js.map +1 -1
  7. package/dist/ActivityCardQuestionPreview/index.mjs +655 -64
  8. package/dist/ActivityCardQuestionPreview/index.mjs.map +1 -1
  9. package/dist/ActivityDetails/index.d.ts +6 -4
  10. package/dist/ActivityDetails/index.d.ts.map +1 -1
  11. package/dist/ActivityDetails/index.js +2381 -1007
  12. package/dist/ActivityDetails/index.js.map +1 -1
  13. package/dist/ActivityDetails/index.mjs +2352 -953
  14. package/dist/ActivityDetails/index.mjs.map +1 -1
  15. package/dist/ActivityPreview/index.js +1175 -592
  16. package/dist/ActivityPreview/index.js.map +1 -1
  17. package/dist/ActivityPreview/index.mjs +1171 -580
  18. package/dist/ActivityPreview/index.mjs.map +1 -1
  19. package/dist/CorrectActivityModal/index.d.ts +4 -2
  20. package/dist/CorrectActivityModal/index.d.ts.map +1 -1
  21. package/dist/CorrectActivityModal/index.js +1999 -527
  22. package/dist/CorrectActivityModal/index.js.map +1 -1
  23. package/dist/CorrectActivityModal/index.mjs +2030 -529
  24. package/dist/CorrectActivityModal/index.mjs.map +1 -1
  25. package/dist/Quiz/index.js +2 -0
  26. package/dist/Quiz/index.js.map +1 -1
  27. package/dist/Quiz/index.mjs +2 -0
  28. package/dist/Quiz/index.mjs.map +1 -1
  29. package/dist/hooks/useSendActivity/index.d.ts +47 -0
  30. package/dist/hooks/useSendActivity/index.d.ts.map +1 -0
  31. package/dist/hooks/useSendActivity/index.js +194 -0
  32. package/dist/hooks/useSendActivity/index.js.map +1 -0
  33. package/dist/hooks/useSendActivity/index.mjs +159 -0
  34. package/dist/hooks/useSendActivity/index.mjs.map +1 -0
  35. package/dist/hooks/useSendActivity.d.ts +47 -0
  36. package/dist/hooks/useSendActivity.d.ts.map +1 -0
  37. package/dist/index.d.ts +6 -2
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +10284 -9202
  40. package/dist/index.js.map +1 -1
  41. package/dist/index.mjs +10170 -9087
  42. package/dist/index.mjs.map +1 -1
  43. package/dist/types/activities/index.d.ts +81 -0
  44. package/dist/types/activities/index.d.ts.map +1 -0
  45. package/dist/types/activities/index.js +52 -0
  46. package/dist/types/activities/index.js.map +1 -0
  47. package/dist/types/activities/index.mjs +25 -0
  48. package/dist/types/activities/index.mjs.map +1 -0
  49. package/dist/types/activities.d.ts +81 -0
  50. package/dist/types/activities.d.ts.map +1 -0
  51. package/dist/types/sendActivity/index.d.ts +127 -0
  52. package/dist/types/sendActivity/index.d.ts.map +1 -0
  53. package/dist/types/sendActivity/index.js +19 -0
  54. package/dist/types/sendActivity/index.js.map +1 -0
  55. package/dist/types/sendActivity/index.mjs +1 -0
  56. package/dist/types/sendActivity/index.mjs.map +1 -0
  57. package/dist/types/sendActivity.d.ts +127 -0
  58. package/dist/types/sendActivity.d.ts.map +1 -0
  59. package/dist/utils/questionRenderer/alternative/index.d.ts +8 -0
  60. package/dist/utils/questionRenderer/alternative/index.d.ts.map +1 -0
  61. package/dist/utils/questionRenderer/components/index.d.ts +25 -0
  62. package/dist/utils/questionRenderer/components/index.d.ts.map +1 -0
  63. package/dist/utils/questionRenderer/connectDots/index.d.ts +8 -0
  64. package/dist/utils/questionRenderer/connectDots/index.d.ts.map +1 -0
  65. package/dist/utils/questionRenderer/dissertative/index.d.ts +8 -0
  66. package/dist/utils/questionRenderer/dissertative/index.d.ts.map +1 -0
  67. package/dist/utils/questionRenderer/fill/index.d.ts +10 -0
  68. package/dist/utils/questionRenderer/fill/index.d.ts.map +1 -0
  69. package/dist/utils/questionRenderer/image/index.d.ts +8 -0
  70. package/dist/utils/questionRenderer/image/index.d.ts.map +1 -0
  71. package/dist/utils/questionRenderer/index.d.ts +31 -0
  72. package/dist/utils/questionRenderer/index.d.ts.map +1 -0
  73. package/dist/utils/questionRenderer/multipleChoice/index.d.ts +8 -0
  74. package/dist/utils/questionRenderer/multipleChoice/index.d.ts.map +1 -0
  75. package/dist/utils/questionRenderer/trueOrFalse/index.d.ts +9 -0
  76. package/dist/utils/questionRenderer/trueOrFalse/index.d.ts.map +1 -0
  77. package/dist/utils/questionRenderer/types.d.ts +14 -0
  78. package/dist/utils/questionRenderer/types.d.ts.map +1 -0
  79. package/dist/utils/studentActivityCorrection/constants.d.ts +13 -0
  80. package/dist/utils/studentActivityCorrection/constants.d.ts.map +1 -0
  81. package/dist/utils/studentActivityCorrection/converter.d.ts +13 -0
  82. package/dist/utils/studentActivityCorrection/converter.d.ts.map +1 -0
  83. package/dist/utils/studentActivityCorrection/index.d.ts +13 -0
  84. package/dist/utils/studentActivityCorrection/index.d.ts.map +1 -0
  85. package/dist/utils/studentActivityCorrection/types.d.ts +84 -0
  86. package/dist/utils/studentActivityCorrection/types.d.ts.map +1 -0
  87. package/dist/utils/studentActivityCorrection/utils.d.ts +30 -0
  88. package/dist/utils/studentActivityCorrection/utils.d.ts.map +1 -0
  89. package/package.json +1 -1
  90. package/dist/types/studentActivityCorrection.d.ts +0 -62
  91. package/dist/types/studentActivityCorrection.d.ts.map +0 -1
  92. package/dist/utils/questionRenderer.d.ts +0 -5
  93. package/dist/utils/questionRenderer.d.ts.map +0 -1
@@ -970,10 +970,152 @@ var RadioGroupItem = forwardRef3(
970
970
  );
971
971
  RadioGroupItem.displayName = "RadioGroupItem";
972
972
 
973
+ // src/components/IconRender/IconRender.tsx
974
+ import { cloneElement as cloneElement3 } from "react";
975
+ import * as PhosphorIcons from "phosphor-react";
976
+
977
+ // src/assets/icons/subjects/ChatPT.tsx
978
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
979
+ var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs5(
980
+ "svg",
981
+ {
982
+ width: size,
983
+ height: size,
984
+ viewBox: "0 0 32 32",
985
+ fill: "none",
986
+ xmlns: "http://www.w3.org/2000/svg",
987
+ children: [
988
+ /* @__PURE__ */ jsx7(
989
+ "path",
990
+ {
991
+ d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
992
+ fill: color
993
+ }
994
+ ),
995
+ /* @__PURE__ */ jsx7(
996
+ "path",
997
+ {
998
+ d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
999
+ fill: color
1000
+ }
1001
+ ),
1002
+ /* @__PURE__ */ jsx7(
1003
+ "path",
1004
+ {
1005
+ d: "M13.2402 17.3496H11.0195V16.1836H13.2402C13.627 16.1836 13.9395 16.1211 14.1777 15.9961C14.416 15.8711 14.5898 15.6992 14.6992 15.4805C14.8125 15.2578 14.8691 15.0039 14.8691 14.7188C14.8691 14.4492 14.8125 14.1973 14.6992 13.9629C14.5898 13.7246 14.416 13.5332 14.1777 13.3887C13.9395 13.2441 13.627 13.1719 13.2402 13.1719H11.4707V20.5312H10V12H13.2402C13.9004 12 14.4609 12.1172 14.9219 12.3516C15.3867 12.582 15.7402 12.9023 15.9824 13.3125C16.2246 13.7188 16.3457 14.1836 16.3457 14.707C16.3457 15.2578 16.2246 15.7305 15.9824 16.125C15.7402 16.5195 15.3867 16.8223 14.9219 17.0332C14.4609 17.2441 13.9004 17.3496 13.2402 17.3496Z",
1006
+ fill: color
1007
+ }
1008
+ )
1009
+ ]
1010
+ }
1011
+ );
1012
+
1013
+ // src/assets/icons/subjects/ChatEN.tsx
1014
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
1015
+ var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs6(
1016
+ "svg",
1017
+ {
1018
+ width: size,
1019
+ height: size,
1020
+ viewBox: "0 0 32 32",
1021
+ fill: "none",
1022
+ xmlns: "http://www.w3.org/2000/svg",
1023
+ children: [
1024
+ /* @__PURE__ */ jsx8(
1025
+ "path",
1026
+ {
1027
+ d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
1028
+ fill: color
1029
+ }
1030
+ ),
1031
+ /* @__PURE__ */ jsx8(
1032
+ "path",
1033
+ {
1034
+ d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
1035
+ fill: color
1036
+ }
1037
+ ),
1038
+ /* @__PURE__ */ jsx8(
1039
+ "path",
1040
+ {
1041
+ d: "M14.584 19.3652V20.5312H10.0547V19.3652H14.584ZM10.4707 12V20.5312H9V12H10.4707ZM13.9922 15.5625V16.7109H10.0547V15.5625H13.9922ZM14.5547 12V13.1719H10.0547V12H14.5547Z",
1042
+ fill: color
1043
+ }
1044
+ )
1045
+ ]
1046
+ }
1047
+ );
1048
+
1049
+ // src/assets/icons/subjects/ChatES.tsx
1050
+ import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
1051
+ var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs7(
1052
+ "svg",
1053
+ {
1054
+ width: size,
1055
+ height: size,
1056
+ viewBox: "0 0 32 32",
1057
+ fill: "none",
1058
+ xmlns: "http://www.w3.org/2000/svg",
1059
+ children: [
1060
+ /* @__PURE__ */ jsx9(
1061
+ "path",
1062
+ {
1063
+ d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
1064
+ fill: color
1065
+ }
1066
+ ),
1067
+ /* @__PURE__ */ jsx9(
1068
+ "path",
1069
+ {
1070
+ d: "M21.1426 17.8027C21.1426 17.627 21.1152 17.4707 21.0605 17.334C21.0098 17.1973 20.918 17.0723 20.7852 16.959C20.6523 16.8457 20.4648 16.7363 20.2227 16.6309C19.9844 16.5215 19.6797 16.4102 19.3086 16.2969C18.9023 16.1719 18.5273 16.0332 18.1836 15.8809C17.8438 15.7246 17.5469 15.5449 17.293 15.3418C17.0391 15.1348 16.8418 14.8984 16.7012 14.6328C16.5605 14.3633 16.4902 14.0527 16.4902 13.7012C16.4902 13.3535 16.5625 13.0371 16.707 12.752C16.8555 12.4668 17.0645 12.2207 17.334 12.0137C17.6074 11.8027 17.9297 11.6406 18.3008 11.5273C18.6719 11.4102 19.082 11.3516 19.5312 11.3516C20.1641 11.3516 20.709 11.4688 21.166 11.7031C21.627 11.9375 21.9805 12.252 22.2266 12.6465C22.4766 13.041 22.6016 13.4766 22.6016 13.9531H21.1426C21.1426 13.6719 21.082 13.4238 20.9609 13.209C20.8438 12.9902 20.6641 12.8184 20.4219 12.6934C20.1836 12.5684 19.8809 12.5059 19.5137 12.5059C19.166 12.5059 18.877 12.5586 18.6465 12.6641C18.416 12.7695 18.2441 12.9121 18.1309 13.0918C18.0176 13.2715 17.9609 13.4746 17.9609 13.7012C17.9609 13.8613 17.998 14.0078 18.0723 14.1406C18.1465 14.2695 18.2598 14.3906 18.4121 14.5039C18.5645 14.6133 18.7559 14.7168 18.9863 14.8145C19.2168 14.9121 19.4883 15.0059 19.8008 15.0957C20.2734 15.2363 20.6855 15.3926 21.0371 15.5645C21.3887 15.7324 21.6816 15.9238 21.916 16.1387C22.1504 16.3535 22.3262 16.5977 22.4434 16.8711C22.5605 17.1406 22.6191 17.4473 22.6191 17.791C22.6191 18.1504 22.5469 18.4746 22.4023 18.7637C22.2578 19.0488 22.0508 19.293 21.7812 19.4961C21.5156 19.6953 21.1953 19.8496 20.8203 19.959C20.4492 20.0645 20.0352 20.1172 19.5781 20.1172C19.168 20.1172 18.7637 20.0625 18.3652 19.9531C17.9707 19.8438 17.6113 19.6777 17.2871 19.4551C16.9629 19.2285 16.7051 18.9473 16.5137 18.6113C16.3223 18.2715 16.2266 17.875 16.2266 17.4219H17.6973C17.6973 17.6992 17.7441 17.9355 17.8379 18.1309C17.9355 18.3262 18.0703 18.4863 18.2422 18.6113C18.4141 18.7324 18.6133 18.8223 18.8398 18.8809C19.0703 18.9395 19.3164 18.9688 19.5781 18.9688C19.9219 18.9688 20.209 18.9199 20.4395 18.8223C20.6738 18.7246 20.8496 18.5879 20.9668 18.4121C21.084 18.2363 21.1426 18.0332 21.1426 17.8027Z",
1071
+ fill: color
1072
+ }
1073
+ ),
1074
+ /* @__PURE__ */ jsx9(
1075
+ "path",
1076
+ {
1077
+ d: "M15.4512 18.834V20H10.9219V18.834H15.4512ZM11.3379 11.4688V20H9.86719V11.4688H11.3379ZM14.8594 15.0312V16.1797H10.9219V15.0312H14.8594ZM15.4219 11.4688V12.6406H10.9219V11.4688H15.4219Z",
1078
+ fill: color
1079
+ }
1080
+ )
1081
+ ]
1082
+ }
1083
+ );
1084
+
1085
+ // src/components/IconRender/IconRender.tsx
1086
+ import { jsx as jsx10 } from "react/jsx-runtime";
1087
+ var IconRender = ({
1088
+ iconName,
1089
+ color = "#000000",
1090
+ size = 24,
1091
+ weight = "regular"
1092
+ }) => {
1093
+ if (typeof iconName === "string") {
1094
+ switch (iconName) {
1095
+ case "Chat_PT":
1096
+ return /* @__PURE__ */ jsx10(ChatPT, { size, color });
1097
+ case "Chat_EN":
1098
+ return /* @__PURE__ */ jsx10(ChatEN, { size, color });
1099
+ case "Chat_ES":
1100
+ return /* @__PURE__ */ jsx10(ChatES, { size, color });
1101
+ default: {
1102
+ const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
1103
+ return /* @__PURE__ */ jsx10(IconComponent, { size, color, weight });
1104
+ }
1105
+ }
1106
+ } else {
1107
+ return cloneElement3(iconName, {
1108
+ size,
1109
+ color: "currentColor"
1110
+ });
1111
+ }
1112
+ };
1113
+ var IconRender_default = IconRender;
1114
+
973
1115
  // src/components/Alternative/Alternative.tsx
974
1116
  import { CheckCircle, XCircle } from "phosphor-react";
975
1117
  import { forwardRef as forwardRef4, useId as useId4, useState as useState3 } from "react";
976
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
1118
+ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
977
1119
  var AlternativesList = ({
978
1120
  alternatives,
979
1121
  name,
@@ -990,7 +1132,7 @@ var AlternativesList = ({
990
1132
  const groupName = name || `alternatives-${uniqueId}`;
991
1133
  const [actualValue, setActualValue] = useState3(value);
992
1134
  const isReadonly = mode === "readonly";
993
- const getStatusStyles = (status, isReadonly2) => {
1135
+ const getStatusStyles2 = (status, isReadonly2) => {
994
1136
  const hoverClass = isReadonly2 ? "" : "hover:bg-background-50";
995
1137
  switch (status) {
996
1138
  case "correct":
@@ -1001,12 +1143,12 @@ var AlternativesList = ({
1001
1143
  return `bg-background border-border-100 ${hoverClass}`;
1002
1144
  }
1003
1145
  };
1004
- const getStatusBadge = (status) => {
1146
+ const getStatusBadge2 = (status) => {
1005
1147
  switch (status) {
1006
1148
  case "correct":
1007
- return /* @__PURE__ */ jsx7(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx7(CheckCircle, {}), children: "Resposta correta" });
1149
+ return /* @__PURE__ */ jsx11(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx11(CheckCircle, {}), children: "Resposta correta" });
1008
1150
  case "incorrect":
1009
- return /* @__PURE__ */ jsx7(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx7(XCircle, {}), children: "Resposta incorreta" });
1151
+ return /* @__PURE__ */ jsx11(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx11(XCircle, {}), children: "Resposta incorreta" });
1010
1152
  default:
1011
1153
  return null;
1012
1154
  }
@@ -1031,15 +1173,15 @@ var AlternativesList = ({
1031
1173
  } else if (isCorrectAnswer) {
1032
1174
  displayStatus = "correct";
1033
1175
  }
1034
- const statusStyles = getStatusStyles(displayStatus, true);
1035
- const statusBadge = getStatusBadge(displayStatus);
1176
+ const statusStyles = getStatusStyles2(displayStatus, true);
1177
+ const statusBadge = getStatusBadge2(displayStatus);
1036
1178
  const renderRadio = () => {
1037
1179
  const radioClasses = `w-6 h-6 rounded-full border-2 cursor-default transition-all duration-200 flex items-center justify-center ${isUserSelected ? "border-primary-950 bg-background" : "border-border-400 bg-background"}`;
1038
1180
  const dotClasses = "w-3 h-3 rounded-full bg-primary-950 transition-all duration-200";
1039
- return /* @__PURE__ */ jsx7("div", { className: radioClasses, children: isUserSelected && /* @__PURE__ */ jsx7("div", { className: dotClasses }) });
1181
+ return /* @__PURE__ */ jsx11("div", { className: radioClasses, children: isUserSelected && /* @__PURE__ */ jsx11("div", { className: dotClasses }) });
1040
1182
  };
1041
1183
  if (layout === "detailed") {
1042
- return /* @__PURE__ */ jsx7(
1184
+ return /* @__PURE__ */ jsx11(
1043
1185
  "div",
1044
1186
  {
1045
1187
  className: cn(
@@ -1047,11 +1189,11 @@ var AlternativesList = ({
1047
1189
  statusStyles,
1048
1190
  alternative.disabled ? "opacity-50" : ""
1049
1191
  ),
1050
- children: /* @__PURE__ */ jsxs5("div", { className: "flex items-start justify-between gap-3", children: [
1051
- /* @__PURE__ */ jsxs5("div", { className: "flex items-start gap-3 flex-1", children: [
1052
- /* @__PURE__ */ jsx7("div", { className: "mt-1", children: renderRadio() }),
1053
- /* @__PURE__ */ jsxs5("div", { className: "flex-1", children: [
1054
- /* @__PURE__ */ jsx7(
1192
+ children: /* @__PURE__ */ jsxs8("div", { className: "flex items-start justify-between gap-3", children: [
1193
+ /* @__PURE__ */ jsxs8("div", { className: "flex items-start gap-3 flex-1", children: [
1194
+ /* @__PURE__ */ jsx11("div", { className: "mt-1", children: renderRadio() }),
1195
+ /* @__PURE__ */ jsxs8("div", { className: "flex-1", children: [
1196
+ /* @__PURE__ */ jsx11(
1055
1197
  "p",
1056
1198
  {
1057
1199
  className: cn(
@@ -1061,16 +1203,16 @@ var AlternativesList = ({
1061
1203
  children: alternative.label
1062
1204
  }
1063
1205
  ),
1064
- alternative.description && /* @__PURE__ */ jsx7("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
1206
+ alternative.description && /* @__PURE__ */ jsx11("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
1065
1207
  ] })
1066
1208
  ] }),
1067
- statusBadge && /* @__PURE__ */ jsx7("div", { className: "flex-shrink-0", children: statusBadge })
1209
+ statusBadge && /* @__PURE__ */ jsx11("div", { className: "flex-shrink-0", children: statusBadge })
1068
1210
  ] })
1069
1211
  },
1070
1212
  alternativeId
1071
1213
  );
1072
1214
  }
1073
- return /* @__PURE__ */ jsxs5(
1215
+ return /* @__PURE__ */ jsxs8(
1074
1216
  "div",
1075
1217
  {
1076
1218
  className: cn(
@@ -1079,9 +1221,9 @@ var AlternativesList = ({
1079
1221
  alternative.disabled ? "opacity-50" : ""
1080
1222
  ),
1081
1223
  children: [
1082
- /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2 flex-1", children: [
1224
+ /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2 flex-1", children: [
1083
1225
  renderRadio(),
1084
- /* @__PURE__ */ jsx7(
1226
+ /* @__PURE__ */ jsx11(
1085
1227
  "span",
1086
1228
  {
1087
1229
  className: cn(
@@ -1092,14 +1234,14 @@ var AlternativesList = ({
1092
1234
  }
1093
1235
  )
1094
1236
  ] }),
1095
- statusBadge && /* @__PURE__ */ jsx7("div", { className: "flex-shrink-0", children: statusBadge })
1237
+ statusBadge && /* @__PURE__ */ jsx11("div", { className: "flex-shrink-0", children: statusBadge })
1096
1238
  ]
1097
1239
  },
1098
1240
  alternativeId
1099
1241
  );
1100
1242
  };
1101
1243
  if (isReadonly) {
1102
- return /* @__PURE__ */ jsx7(
1244
+ return /* @__PURE__ */ jsx11(
1103
1245
  "div",
1104
1246
  {
1105
1247
  className: cn("flex flex-col", getLayoutClasses(), "w-full", className),
@@ -1109,7 +1251,7 @@ var AlternativesList = ({
1109
1251
  }
1110
1252
  );
1111
1253
  }
1112
- return /* @__PURE__ */ jsx7(
1254
+ return /* @__PURE__ */ jsx11(
1113
1255
  RadioGroup,
1114
1256
  {
1115
1257
  name: groupName,
@@ -1123,10 +1265,10 @@ var AlternativesList = ({
1123
1265
  className: cn("flex flex-col", getLayoutClasses(), className),
1124
1266
  children: alternatives.map((alternative, index) => {
1125
1267
  const alternativeId = alternative.value || `alt-${index}`;
1126
- const statusStyles = getStatusStyles(alternative.status, false);
1127
- const statusBadge = getStatusBadge(alternative.status);
1268
+ const statusStyles = getStatusStyles2(alternative.status, false);
1269
+ const statusBadge = getStatusBadge2(alternative.status);
1128
1270
  if (layout === "detailed") {
1129
- return /* @__PURE__ */ jsx7(
1271
+ return /* @__PURE__ */ jsx11(
1130
1272
  "div",
1131
1273
  {
1132
1274
  className: cn(
@@ -1134,9 +1276,9 @@ var AlternativesList = ({
1134
1276
  statusStyles,
1135
1277
  alternative.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
1136
1278
  ),
1137
- children: /* @__PURE__ */ jsxs5("div", { className: "flex items-start justify-between gap-3", children: [
1138
- /* @__PURE__ */ jsxs5("div", { className: "flex items-start gap-3 flex-1", children: [
1139
- /* @__PURE__ */ jsx7(
1279
+ children: /* @__PURE__ */ jsxs8("div", { className: "flex items-start justify-between gap-3", children: [
1280
+ /* @__PURE__ */ jsxs8("div", { className: "flex items-start gap-3 flex-1", children: [
1281
+ /* @__PURE__ */ jsx11(
1140
1282
  RadioGroupItem,
1141
1283
  {
1142
1284
  value: alternative.value,
@@ -1145,8 +1287,8 @@ var AlternativesList = ({
1145
1287
  className: "mt-1"
1146
1288
  }
1147
1289
  ),
1148
- /* @__PURE__ */ jsxs5("div", { className: "flex-1", children: [
1149
- /* @__PURE__ */ jsx7(
1290
+ /* @__PURE__ */ jsxs8("div", { className: "flex-1", children: [
1291
+ /* @__PURE__ */ jsx11(
1150
1292
  "label",
1151
1293
  {
1152
1294
  htmlFor: alternativeId,
@@ -1158,16 +1300,16 @@ var AlternativesList = ({
1158
1300
  children: alternative.label
1159
1301
  }
1160
1302
  ),
1161
- alternative.description && /* @__PURE__ */ jsx7("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
1303
+ alternative.description && /* @__PURE__ */ jsx11("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
1162
1304
  ] })
1163
1305
  ] }),
1164
- statusBadge && /* @__PURE__ */ jsx7("div", { className: "flex-shrink-0", children: statusBadge })
1306
+ statusBadge && /* @__PURE__ */ jsx11("div", { className: "flex-shrink-0", children: statusBadge })
1165
1307
  ] })
1166
1308
  },
1167
1309
  alternativeId
1168
1310
  );
1169
1311
  }
1170
- return /* @__PURE__ */ jsxs5(
1312
+ return /* @__PURE__ */ jsxs8(
1171
1313
  "div",
1172
1314
  {
1173
1315
  className: cn(
@@ -1176,8 +1318,8 @@ var AlternativesList = ({
1176
1318
  alternative.disabled ? "opacity-50 cursor-not-allowed" : ""
1177
1319
  ),
1178
1320
  children: [
1179
- /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2 flex-1", children: [
1180
- /* @__PURE__ */ jsx7(
1321
+ /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2 flex-1", children: [
1322
+ /* @__PURE__ */ jsx11(
1181
1323
  RadioGroupItem,
1182
1324
  {
1183
1325
  value: alternative.value,
@@ -1185,7 +1327,7 @@ var AlternativesList = ({
1185
1327
  disabled: alternative.disabled
1186
1328
  }
1187
1329
  ),
1188
- /* @__PURE__ */ jsx7(
1330
+ /* @__PURE__ */ jsx11(
1189
1331
  "label",
1190
1332
  {
1191
1333
  htmlFor: alternativeId,
@@ -1198,7 +1340,7 @@ var AlternativesList = ({
1198
1340
  }
1199
1341
  )
1200
1342
  ] }),
1201
- statusBadge && /* @__PURE__ */ jsx7("div", { className: "flex-shrink-0", children: statusBadge })
1343
+ statusBadge && /* @__PURE__ */ jsx11("div", { className: "flex-shrink-0", children: statusBadge })
1202
1344
  ]
1203
1345
  },
1204
1346
  alternativeId
@@ -1209,7 +1351,7 @@ var AlternativesList = ({
1209
1351
  };
1210
1352
  var HeaderAlternative = forwardRef4(
1211
1353
  ({ className, title, subTitle, content, ...props }, ref) => {
1212
- return /* @__PURE__ */ jsxs5(
1354
+ return /* @__PURE__ */ jsxs8(
1213
1355
  "div",
1214
1356
  {
1215
1357
  ref,
@@ -1219,174 +1361,67 @@ var HeaderAlternative = forwardRef4(
1219
1361
  ),
1220
1362
  ...props,
1221
1363
  children: [
1222
- /* @__PURE__ */ jsxs5("span", { className: "flex flex-col", children: [
1223
- /* @__PURE__ */ jsx7("p", { className: "text-text-950 font-bold text-lg", children: title }),
1224
- /* @__PURE__ */ jsx7("p", { className: "text-text-700 text-sm ", children: subTitle })
1364
+ /* @__PURE__ */ jsxs8("span", { className: "flex flex-col", children: [
1365
+ /* @__PURE__ */ jsx11("p", { className: "text-text-950 font-bold text-lg", children: title }),
1366
+ /* @__PURE__ */ jsx11("p", { className: "text-text-700 text-sm ", children: subTitle })
1225
1367
  ] }),
1226
- /* @__PURE__ */ jsx7("p", { className: "text-text-950 text-md", children: content })
1368
+ /* @__PURE__ */ jsx11("p", { className: "text-text-950 text-md", children: content })
1227
1369
  ]
1228
1370
  }
1229
1371
  );
1230
1372
  }
1231
1373
  );
1232
1374
 
1233
- // src/components/IconRender/IconRender.tsx
1234
- import { cloneElement as cloneElement3 } from "react";
1235
- import * as PhosphorIcons from "phosphor-react";
1236
-
1237
- // src/assets/icons/subjects/ChatPT.tsx
1238
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
1239
- var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs6(
1240
- "svg",
1241
- {
1242
- width: size,
1243
- height: size,
1244
- viewBox: "0 0 32 32",
1245
- fill: "none",
1246
- xmlns: "http://www.w3.org/2000/svg",
1247
- children: [
1248
- /* @__PURE__ */ jsx8(
1249
- "path",
1250
- {
1251
- d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
1252
- fill: color
1253
- }
1254
- ),
1255
- /* @__PURE__ */ jsx8(
1256
- "path",
1257
- {
1258
- d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
1259
- fill: color
1260
- }
1261
- ),
1262
- /* @__PURE__ */ jsx8(
1263
- "path",
1264
- {
1265
- d: "M13.2402 17.3496H11.0195V16.1836H13.2402C13.627 16.1836 13.9395 16.1211 14.1777 15.9961C14.416 15.8711 14.5898 15.6992 14.6992 15.4805C14.8125 15.2578 14.8691 15.0039 14.8691 14.7188C14.8691 14.4492 14.8125 14.1973 14.6992 13.9629C14.5898 13.7246 14.416 13.5332 14.1777 13.3887C13.9395 13.2441 13.627 13.1719 13.2402 13.1719H11.4707V20.5312H10V12H13.2402C13.9004 12 14.4609 12.1172 14.9219 12.3516C15.3867 12.582 15.7402 12.9023 15.9824 13.3125C16.2246 13.7188 16.3457 14.1836 16.3457 14.707C16.3457 15.2578 16.2246 15.7305 15.9824 16.125C15.7402 16.5195 15.3867 16.8223 14.9219 17.0332C14.4609 17.2441 13.9004 17.3496 13.2402 17.3496Z",
1266
- fill: color
1267
- }
1268
- )
1269
- ]
1270
- }
1271
- );
1272
-
1273
- // src/assets/icons/subjects/ChatEN.tsx
1274
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
1275
- var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs7(
1276
- "svg",
1277
- {
1278
- width: size,
1279
- height: size,
1280
- viewBox: "0 0 32 32",
1281
- fill: "none",
1282
- xmlns: "http://www.w3.org/2000/svg",
1283
- children: [
1284
- /* @__PURE__ */ jsx9(
1285
- "path",
1286
- {
1287
- d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
1288
- fill: color
1289
- }
1290
- ),
1291
- /* @__PURE__ */ jsx9(
1292
- "path",
1293
- {
1294
- d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
1295
- fill: color
1296
- }
1297
- ),
1298
- /* @__PURE__ */ jsx9(
1299
- "path",
1300
- {
1301
- d: "M14.584 19.3652V20.5312H10.0547V19.3652H14.584ZM10.4707 12V20.5312H9V12H10.4707ZM13.9922 15.5625V16.7109H10.0547V15.5625H13.9922ZM14.5547 12V13.1719H10.0547V12H14.5547Z",
1302
- fill: color
1303
- }
1304
- )
1305
- ]
1306
- }
1307
- );
1308
-
1309
- // src/assets/icons/subjects/ChatES.tsx
1310
- import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
1311
- var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs8(
1312
- "svg",
1313
- {
1314
- width: size,
1315
- height: size,
1316
- viewBox: "0 0 32 32",
1317
- fill: "none",
1318
- xmlns: "http://www.w3.org/2000/svg",
1319
- children: [
1320
- /* @__PURE__ */ jsx10(
1321
- "path",
1322
- {
1323
- d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
1324
- fill: color
1325
- }
1326
- ),
1327
- /* @__PURE__ */ jsx10(
1328
- "path",
1329
- {
1330
- d: "M21.1426 17.8027C21.1426 17.627 21.1152 17.4707 21.0605 17.334C21.0098 17.1973 20.918 17.0723 20.7852 16.959C20.6523 16.8457 20.4648 16.7363 20.2227 16.6309C19.9844 16.5215 19.6797 16.4102 19.3086 16.2969C18.9023 16.1719 18.5273 16.0332 18.1836 15.8809C17.8438 15.7246 17.5469 15.5449 17.293 15.3418C17.0391 15.1348 16.8418 14.8984 16.7012 14.6328C16.5605 14.3633 16.4902 14.0527 16.4902 13.7012C16.4902 13.3535 16.5625 13.0371 16.707 12.752C16.8555 12.4668 17.0645 12.2207 17.334 12.0137C17.6074 11.8027 17.9297 11.6406 18.3008 11.5273C18.6719 11.4102 19.082 11.3516 19.5312 11.3516C20.1641 11.3516 20.709 11.4688 21.166 11.7031C21.627 11.9375 21.9805 12.252 22.2266 12.6465C22.4766 13.041 22.6016 13.4766 22.6016 13.9531H21.1426C21.1426 13.6719 21.082 13.4238 20.9609 13.209C20.8438 12.9902 20.6641 12.8184 20.4219 12.6934C20.1836 12.5684 19.8809 12.5059 19.5137 12.5059C19.166 12.5059 18.877 12.5586 18.6465 12.6641C18.416 12.7695 18.2441 12.9121 18.1309 13.0918C18.0176 13.2715 17.9609 13.4746 17.9609 13.7012C17.9609 13.8613 17.998 14.0078 18.0723 14.1406C18.1465 14.2695 18.2598 14.3906 18.4121 14.5039C18.5645 14.6133 18.7559 14.7168 18.9863 14.8145C19.2168 14.9121 19.4883 15.0059 19.8008 15.0957C20.2734 15.2363 20.6855 15.3926 21.0371 15.5645C21.3887 15.7324 21.6816 15.9238 21.916 16.1387C22.1504 16.3535 22.3262 16.5977 22.4434 16.8711C22.5605 17.1406 22.6191 17.4473 22.6191 17.791C22.6191 18.1504 22.5469 18.4746 22.4023 18.7637C22.2578 19.0488 22.0508 19.293 21.7812 19.4961C21.5156 19.6953 21.1953 19.8496 20.8203 19.959C20.4492 20.0645 20.0352 20.1172 19.5781 20.1172C19.168 20.1172 18.7637 20.0625 18.3652 19.9531C17.9707 19.8438 17.6113 19.6777 17.2871 19.4551C16.9629 19.2285 16.7051 18.9473 16.5137 18.6113C16.3223 18.2715 16.2266 17.875 16.2266 17.4219H17.6973C17.6973 17.6992 17.7441 17.9355 17.8379 18.1309C17.9355 18.3262 18.0703 18.4863 18.2422 18.6113C18.4141 18.7324 18.6133 18.8223 18.8398 18.8809C19.0703 18.9395 19.3164 18.9688 19.5781 18.9688C19.9219 18.9688 20.209 18.9199 20.4395 18.8223C20.6738 18.7246 20.8496 18.5879 20.9668 18.4121C21.084 18.2363 21.1426 18.0332 21.1426 17.8027Z",
1331
- fill: color
1332
- }
1333
- ),
1334
- /* @__PURE__ */ jsx10(
1335
- "path",
1336
- {
1337
- d: "M15.4512 18.834V20H10.9219V18.834H15.4512ZM11.3379 11.4688V20H9.86719V11.4688H11.3379ZM14.8594 15.0312V16.1797H10.9219V15.0312H14.8594ZM15.4219 11.4688V12.6406H10.9219V11.4688H15.4219Z",
1338
- fill: color
1339
- }
1340
- )
1341
- ]
1342
- }
1343
- );
1344
-
1345
- // src/components/IconRender/IconRender.tsx
1346
- import { jsx as jsx11 } from "react/jsx-runtime";
1347
- var IconRender = ({
1348
- iconName,
1349
- color = "#000000",
1350
- size = 24,
1351
- weight = "regular"
1375
+ // src/utils/questionRenderer/alternative/index.tsx
1376
+ import { jsx as jsx12 } from "react/jsx-runtime";
1377
+ var renderQuestionAlternative = ({
1378
+ question,
1379
+ result
1352
1380
  }) => {
1353
- if (typeof iconName === "string") {
1354
- switch (iconName) {
1355
- case "Chat_PT":
1356
- return /* @__PURE__ */ jsx11(ChatPT, { size, color });
1357
- case "Chat_EN":
1358
- return /* @__PURE__ */ jsx11(ChatEN, { size, color });
1359
- case "Chat_ES":
1360
- return /* @__PURE__ */ jsx11(ChatES, { size, color });
1361
- default: {
1362
- const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
1363
- return /* @__PURE__ */ jsx11(IconComponent, { size, color, weight });
1381
+ const alternatives = question.options?.map((option) => {
1382
+ const isCorrectOption = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
1383
+ const isSelected = result?.selectedOptions?.some(
1384
+ (selectedOption) => selectedOption.optionId === option.id
1385
+ ) || false;
1386
+ const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */;
1387
+ let status;
1388
+ if (shouldShowCorrectAnswers) {
1389
+ if (isCorrectOption) {
1390
+ status = "correct" /* CORRECT */;
1391
+ } else if (isSelected && !isCorrectOption) {
1392
+ status = "incorrect" /* INCORRECT */;
1393
+ } else {
1394
+ status = "neutral" /* NEUTRAL */;
1364
1395
  }
1396
+ } else {
1397
+ status = "neutral" /* NEUTRAL */;
1365
1398
  }
1366
- } else {
1367
- return cloneElement3(iconName, {
1368
- size,
1369
- color: "currentColor"
1370
- });
1399
+ return {
1400
+ label: option.option,
1401
+ value: option.id,
1402
+ status
1403
+ };
1404
+ });
1405
+ if (!alternatives || alternatives.length === 0) {
1406
+ return /* @__PURE__ */ jsx12("div", { children: /* @__PURE__ */ jsx12(Text_default, { size: "sm", weight: "normal", children: "N\xE3o h\xE1 Alternativas" }) });
1371
1407
  }
1372
- };
1373
- var IconRender_default = IconRender;
1374
-
1375
- // src/types/questionTypes.ts
1376
- var questionTypeLabels = {
1377
- ["ALTERNATIVA" /* ALTERNATIVA */]: "Alternativa",
1378
- ["VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */]: "Verdadeiro ou Falso",
1379
- ["DISSERTATIVA" /* DISSERTATIVA */]: "Discursiva",
1380
- ["IMAGEM" /* IMAGEM */]: "Imagem",
1381
- ["MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */]: "M\xFAltipla Escolha",
1382
- ["LIGAR_PONTOS" /* LIGAR_PONTOS */]: "Ligar Pontos",
1383
- ["PREENCHER" /* PREENCHER */]: "Preencher Lacunas"
1408
+ return /* @__PURE__ */ jsx12("div", { className: "pt-2", children: /* @__PURE__ */ jsx12(
1409
+ AlternativesList,
1410
+ {
1411
+ mode: "readonly",
1412
+ name: `question-${question.id}`,
1413
+ layout: "compact",
1414
+ alternatives,
1415
+ selectedValue: result?.selectedOptions?.[0]?.optionId || ""
1416
+ },
1417
+ `question-${question.id}`
1418
+ ) });
1384
1419
  };
1385
1420
 
1386
1421
  // src/components/MultipleChoice/MultipleChoice.tsx
1387
1422
  import { useEffect as useEffect3, useState as useState4 } from "react";
1388
1423
  import { CheckCircle as CheckCircle2, XCircle as XCircle2, Check as Check2 } from "phosphor-react";
1389
- import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
1424
+ import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
1390
1425
  var MultipleChoiceList = ({
1391
1426
  disabled = false,
1392
1427
  className = "",
@@ -1400,17 +1435,17 @@ var MultipleChoiceList = ({
1400
1435
  useEffect3(() => {
1401
1436
  setActualValue(selectedValues);
1402
1437
  }, [selectedValues]);
1403
- const getStatusBadge = (status) => {
1438
+ const getStatusBadge2 = (status) => {
1404
1439
  switch (status) {
1405
1440
  case "correct":
1406
- return /* @__PURE__ */ jsx12(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx12(CheckCircle2, {}), children: "Resposta correta" });
1441
+ return /* @__PURE__ */ jsx13(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx13(CheckCircle2, {}), children: "Resposta correta" });
1407
1442
  case "incorrect":
1408
- return /* @__PURE__ */ jsx12(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx12(XCircle2, {}), children: "Resposta incorreta" });
1443
+ return /* @__PURE__ */ jsx13(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx13(XCircle2, {}), children: "Resposta incorreta" });
1409
1444
  default:
1410
1445
  return null;
1411
1446
  }
1412
1447
  };
1413
- const getStatusStyles = (status) => {
1448
+ const getStatusStyles2 = (status) => {
1414
1449
  switch (status) {
1415
1450
  case "correct":
1416
1451
  return "bg-success-background border-success-300";
@@ -1426,13 +1461,13 @@ var MultipleChoiceList = ({
1426
1461
  isSelected ? "border-primary-950 bg-primary-950 text-text" : "border-border-400 bg-background",
1427
1462
  isDisabled && "opacity-40 cursor-not-allowed"
1428
1463
  );
1429
- return /* @__PURE__ */ jsx12("div", { className: checkboxClasses, children: isSelected && /* @__PURE__ */ jsx12(Check2, { size: 16, weight: "bold" }) });
1464
+ return /* @__PURE__ */ jsx13("div", { className: checkboxClasses, children: isSelected && /* @__PURE__ */ jsx13(Check2, { size: 16, weight: "bold" }) });
1430
1465
  };
1431
1466
  if (mode === "readonly") {
1432
- return /* @__PURE__ */ jsx12("div", { className: cn("flex flex-col gap-2", className), children: choices.map((choice, i) => {
1467
+ return /* @__PURE__ */ jsx13("div", { className: cn("flex flex-col gap-2", className), children: choices.map((choice, i) => {
1433
1468
  const isSelected = actualValue?.includes(choice.value) || false;
1434
- const statusStyles = getStatusStyles(choice.status);
1435
- const statusBadge = getStatusBadge(choice.status);
1469
+ const statusStyles = getStatusStyles2(choice.status);
1470
+ const statusBadge = getStatusBadge2(choice.status);
1436
1471
  return /* @__PURE__ */ jsxs9(
1437
1472
  "div",
1438
1473
  {
@@ -1444,7 +1479,7 @@ var MultipleChoiceList = ({
1444
1479
  children: [
1445
1480
  /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2 flex-1", children: [
1446
1481
  renderVisualCheckbox(isSelected, choice.disabled || disabled),
1447
- /* @__PURE__ */ jsx12(
1482
+ /* @__PURE__ */ jsx13(
1448
1483
  "span",
1449
1484
  {
1450
1485
  className: cn(
@@ -1456,14 +1491,14 @@ var MultipleChoiceList = ({
1456
1491
  }
1457
1492
  )
1458
1493
  ] }),
1459
- statusBadge && /* @__PURE__ */ jsx12("div", { className: "flex-shrink-0", children: statusBadge })
1494
+ statusBadge && /* @__PURE__ */ jsx13("div", { className: "flex-shrink-0", children: statusBadge })
1460
1495
  ]
1461
1496
  },
1462
1497
  `readonly-${choice.value}-${i}`
1463
1498
  );
1464
1499
  }) });
1465
1500
  }
1466
- return /* @__PURE__ */ jsx12(
1501
+ return /* @__PURE__ */ jsx13(
1467
1502
  "div",
1468
1503
  {
1469
1504
  className: cn(
@@ -1471,7 +1506,7 @@ var MultipleChoiceList = ({
1471
1506
  disabled ? "opacity-50 cursor-not-allowed" : "",
1472
1507
  className
1473
1508
  ),
1474
- children: /* @__PURE__ */ jsx12(
1509
+ children: /* @__PURE__ */ jsx13(
1475
1510
  CheckboxList_default,
1476
1511
  {
1477
1512
  name,
@@ -1486,7 +1521,7 @@ var MultipleChoiceList = ({
1486
1521
  {
1487
1522
  className: "flex flex-row gap-2 items-center",
1488
1523
  children: [
1489
- /* @__PURE__ */ jsx12(
1524
+ /* @__PURE__ */ jsx13(
1490
1525
  CheckboxListItem,
1491
1526
  {
1492
1527
  value: choice.value,
@@ -1494,7 +1529,7 @@ var MultipleChoiceList = ({
1494
1529
  disabled: choice.disabled || disabled
1495
1530
  }
1496
1531
  ),
1497
- /* @__PURE__ */ jsx12(
1532
+ /* @__PURE__ */ jsx13(
1498
1533
  "label",
1499
1534
  {
1500
1535
  htmlFor: `interactive-${choice.value}-${i}`,
@@ -1516,17 +1551,573 @@ var MultipleChoiceList = ({
1516
1551
  );
1517
1552
  };
1518
1553
 
1519
- // src/utils/questionRenderer.ts
1554
+ // src/utils/questionRenderer/multipleChoice/index.tsx
1555
+ import { jsx as jsx14 } from "react/jsx-runtime";
1556
+ var renderQuestionMultipleChoice = ({
1557
+ question,
1558
+ result
1559
+ }) => {
1560
+ const choices = question.options?.map((option) => {
1561
+ const isCorrectOption = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
1562
+ const isSelected = result?.selectedOptions?.some(
1563
+ (op) => op.optionId === option.id
1564
+ );
1565
+ const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */ && result?.answerStatus !== "NAO_RESPONDIDO" /* NAO_RESPONDIDO */;
1566
+ let status;
1567
+ if (shouldShowCorrectAnswers) {
1568
+ if (isCorrectOption) {
1569
+ status = "correct" /* CORRECT */;
1570
+ } else if (isSelected && !isCorrectOption) {
1571
+ status = "incorrect" /* INCORRECT */;
1572
+ } else {
1573
+ status = "neutral" /* NEUTRAL */;
1574
+ }
1575
+ } else {
1576
+ status = "neutral" /* NEUTRAL */;
1577
+ }
1578
+ return {
1579
+ label: option.option,
1580
+ value: option.id,
1581
+ status
1582
+ };
1583
+ });
1584
+ if (!choices || choices.length === 0) {
1585
+ return /* @__PURE__ */ jsx14("div", { children: /* @__PURE__ */ jsx14(Text_default, { size: "sm", weight: "normal", children: "N\xE3o h\xE1 Escolhas M\xFAltiplas" }) });
1586
+ }
1587
+ const selectedValues = result?.selectedOptions?.map((op) => op.optionId) || [];
1588
+ return /* @__PURE__ */ jsx14("div", { className: "pt-2", children: /* @__PURE__ */ jsx14(
1589
+ MultipleChoiceList,
1590
+ {
1591
+ mode: "readonly",
1592
+ name: `question-${question.id}`,
1593
+ choices,
1594
+ selectedValues
1595
+ },
1596
+ `question-${question.id}`
1597
+ ) });
1598
+ };
1599
+
1600
+ // src/components/Quiz/QuizContent.tsx
1601
+ import {
1602
+ forwardRef as forwardRef5,
1603
+ useCallback,
1604
+ useEffect as useEffect4,
1605
+ useId as useId5,
1606
+ useMemo,
1607
+ useRef as useRef3,
1608
+ useState as useState5
1609
+ } from "react";
1610
+ import { CheckCircle as CheckCircle3, XCircle as XCircle3 } from "phosphor-react";
1611
+
1612
+ // src/assets/img/mock-image-question.png
1613
+ var mock_image_question_default = "../mock-image-question-HEZCLFDL.png";
1614
+
1615
+ // src/components/Quiz/QuizContent.tsx
1616
+ import { Fragment, jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
1617
+ var getStatusStyles = (variantCorrect) => {
1618
+ switch (variantCorrect) {
1619
+ case "correct":
1620
+ return "bg-success-background border-success-300";
1621
+ case "incorrect":
1622
+ return "bg-error-background border-error-300";
1623
+ default:
1624
+ return "";
1625
+ }
1626
+ };
1627
+ var QuizSubTitle = forwardRef5(
1628
+ ({ subTitle, ...props }, ref) => {
1629
+ return /* @__PURE__ */ jsx15("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ jsx15("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
1630
+ }
1631
+ );
1632
+ var QuizContainer = forwardRef5(({ children, className, ...props }, ref) => {
1633
+ return /* @__PURE__ */ jsx15(
1634
+ "div",
1635
+ {
1636
+ ref,
1637
+ className: cn(
1638
+ "bg-background rounded-t-xl px-4 pt-4 pb-[80px] h-auto flex flex-col gap-4 mb-auto",
1639
+ className
1640
+ ),
1641
+ ...props,
1642
+ children
1643
+ }
1644
+ );
1645
+ });
1646
+
1647
+ // src/utils/questionRenderer/components/index.tsx
1648
+ import { useId as useId6 } from "react";
1649
+ import { CheckCircle as CheckCircle4, XCircle as XCircle4 } from "phosphor-react";
1650
+ import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
1651
+ var getStatusBadge = (status) => {
1652
+ switch (status) {
1653
+ case "correct":
1654
+ return /* @__PURE__ */ jsx16(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx16(CheckCircle4, {}), children: "Resposta correta" });
1655
+ case "incorrect":
1656
+ return /* @__PURE__ */ jsx16(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx16(XCircle4, {}), children: "Resposta incorreta" });
1657
+ default:
1658
+ return null;
1659
+ }
1660
+ };
1661
+ var QuestionContainer = ({
1662
+ children,
1663
+ className
1664
+ }) => {
1665
+ return /* @__PURE__ */ jsx16(
1666
+ "div",
1667
+ {
1668
+ className: cn(
1669
+ "bg-background rounded-t-xl px-4 pt-4 pb-[80px] h-auto flex flex-col gap-4 mb-auto",
1670
+ className
1671
+ ),
1672
+ children
1673
+ }
1674
+ );
1675
+ };
1676
+ var QuestionSubTitle = ({ subTitle }) => {
1677
+ return /* @__PURE__ */ jsx16("div", { className: "px-4 pb-2 pt-6", children: /* @__PURE__ */ jsx16(Text_default, { size: "md", weight: "bold", color: "text-text-950", children: subTitle }) });
1678
+ };
1679
+ var FillQuestionContent = ({
1680
+ question,
1681
+ result
1682
+ }) => {
1683
+ const text = question.statement || "";
1684
+ const baseId = useId6();
1685
+ const studentAnswers = {};
1686
+ try {
1687
+ if (result?.answer) {
1688
+ const parsed = typeof result.answer === "string" ? JSON.parse(result.answer) : result.answer;
1689
+ if (typeof parsed === "object") {
1690
+ Object.assign(studentAnswers, parsed);
1691
+ }
1692
+ }
1693
+ } catch (error) {
1694
+ console.error("Error parsing answer:", error);
1695
+ }
1696
+ const regex = /\{\{([\p{L}\p{M}\d_]+)\}\}/gu;
1697
+ const placeholders = [];
1698
+ let match;
1699
+ while ((match = regex.exec(text)) !== null) {
1700
+ placeholders.push(match[1]);
1701
+ }
1702
+ const correctAnswers = {};
1703
+ placeholders.forEach((placeholder) => {
1704
+ correctAnswers[placeholder] = studentAnswers[placeholder]?.correctAnswer || `[${placeholder}]`;
1705
+ });
1706
+ const addTextElement = (elements, textContent, elementCounter) => {
1707
+ if (textContent) {
1708
+ elements.push({
1709
+ element: textContent,
1710
+ id: `${baseId}-text-${++elementCounter.current}`
1711
+ });
1712
+ }
1713
+ };
1714
+ const renderGabaritoPlaceholder = (selectId, elementCounter) => {
1715
+ const correctAnswer = correctAnswers[selectId] || `[${selectId}]`;
1716
+ return {
1717
+ element: /* @__PURE__ */ jsx16(
1718
+ Text_default,
1719
+ {
1720
+ size: "md",
1721
+ weight: "semibold",
1722
+ color: "text-success-600",
1723
+ className: "inline-flex mb-2.5 border-b-2 border-success-600",
1724
+ children: correctAnswer
1725
+ },
1726
+ `${baseId}-gabarito-${selectId}`
1727
+ ),
1728
+ id: `${baseId}-gabarito-${++elementCounter.current}`
1729
+ };
1730
+ };
1731
+ const renderStudentPlaceholder = (selectId, elementCounter) => {
1732
+ const studentAnswer = studentAnswers[selectId];
1733
+ if (!studentAnswer) {
1734
+ return {
1735
+ element: /* @__PURE__ */ jsx16(
1736
+ Text_default,
1737
+ {
1738
+ size: "md",
1739
+ weight: "normal",
1740
+ color: "text-text-400",
1741
+ className: "inline-flex mb-2.5 border-b-2 border-text-300",
1742
+ children: "[N\xE3o respondido]"
1743
+ },
1744
+ `${baseId}-no-answer-${selectId}`
1745
+ ),
1746
+ id: `${baseId}-no-answer-${++elementCounter.current}`
1747
+ };
1748
+ }
1749
+ const isCorrect = studentAnswer.isCorrect;
1750
+ const colorClass = isCorrect ? "text-success-600 border-success-600" : "text-error-600 border-error-600";
1751
+ return {
1752
+ element: /* @__PURE__ */ jsx16(
1753
+ Badge_default,
1754
+ {
1755
+ variant: "solid",
1756
+ action: isCorrect ? "success" : "error",
1757
+ iconRight: isCorrect ? /* @__PURE__ */ jsx16(CheckCircle4, {}) : /* @__PURE__ */ jsx16(XCircle4, {}),
1758
+ size: "large",
1759
+ className: `py-3 w-[180px] justify-between mb-2.5 ${colorClass}`,
1760
+ children: /* @__PURE__ */ jsx16("span", { className: "text-text-900", children: studentAnswer.answer })
1761
+ },
1762
+ `${baseId}-answer-${selectId}`
1763
+ ),
1764
+ id: `${baseId}-answer-${++elementCounter.current}`
1765
+ };
1766
+ };
1767
+ const renderTextWithAnswers = (isGabarito = false) => {
1768
+ const elements = [];
1769
+ let lastIndex = 0;
1770
+ const elementCounter = { current: 0 };
1771
+ regex.lastIndex = 0;
1772
+ while ((match = regex.exec(text)) !== null) {
1773
+ const [fullMatch, selectId] = match;
1774
+ const startIndex = match.index;
1775
+ if (startIndex > lastIndex) {
1776
+ addTextElement(
1777
+ elements,
1778
+ text.slice(lastIndex, startIndex),
1779
+ elementCounter
1780
+ );
1781
+ }
1782
+ const placeholderElement = isGabarito ? renderGabaritoPlaceholder(selectId, elementCounter) : renderStudentPlaceholder(selectId, elementCounter);
1783
+ elements.push(placeholderElement);
1784
+ lastIndex = match.index + fullMatch.length;
1785
+ }
1786
+ if (lastIndex < text.length) {
1787
+ addTextElement(elements, text.slice(lastIndex), elementCounter);
1788
+ }
1789
+ return elements;
1790
+ };
1791
+ return /* @__PURE__ */ jsxs11("div", { className: "pt-2 space-y-4", children: [
1792
+ /* @__PURE__ */ jsxs11("div", { className: "space-y-2", children: [
1793
+ /* @__PURE__ */ jsx16(Text_default, { size: "xs", weight: "normal", color: "text-text-500", children: "Resposta do aluno:" }),
1794
+ /* @__PURE__ */ jsx16("div", { className: "p-3 bg-background-50 rounded-lg border border-border-100", children: /* @__PURE__ */ jsx16("div", { className: "leading-8", children: renderTextWithAnswers(false).map((element) => /* @__PURE__ */ jsx16(
1795
+ Text_default,
1796
+ {
1797
+ size: "md",
1798
+ weight: "normal",
1799
+ color: "text-text-900",
1800
+ children: element.element
1801
+ },
1802
+ element.id
1803
+ )) }) })
1804
+ ] }),
1805
+ /* @__PURE__ */ jsxs11("div", { className: "space-y-2", children: [
1806
+ /* @__PURE__ */ jsx16(Text_default, { size: "xs", weight: "normal", color: "text-text-500", children: "Gabarito:" }),
1807
+ /* @__PURE__ */ jsx16("div", { className: "p-3 bg-background-50 rounded-lg border border-border-100", children: /* @__PURE__ */ jsx16("div", { className: "leading-8", children: renderTextWithAnswers(true).map((element) => /* @__PURE__ */ jsx16(
1808
+ Text_default,
1809
+ {
1810
+ size: "md",
1811
+ weight: "normal",
1812
+ color: "text-text-900",
1813
+ children: element.element
1814
+ },
1815
+ element.id
1816
+ )) }) })
1817
+ ] })
1818
+ ] });
1819
+ };
1820
+
1821
+ // src/utils/questionRenderer/trueOrFalse/index.tsx
1822
+ import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
1823
+ var renderQuestionTrueOrFalse = ({
1824
+ question,
1825
+ result
1826
+ }) => {
1827
+ const options = question.options || [];
1828
+ const getLetterByIndex = (index) => String.fromCodePoint(97 + index);
1829
+ const shouldShowStatus = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */ && result?.answerStatus !== "NAO_RESPONDIDO" /* NAO_RESPONDIDO */;
1830
+ return /* @__PURE__ */ jsx17("div", { className: "pt-2", children: /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
1831
+ const statementIsTrue = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
1832
+ const isSelected = result?.selectedOptions?.some(
1833
+ (op) => op.optionId === option.id
1834
+ );
1835
+ const isStudentCorrect = statementIsTrue === isSelected;
1836
+ const variantCorrect = statementIsTrue ? "correct" : "incorrect";
1837
+ const studentAnswer = isSelected ? "V" : "F";
1838
+ const correctAnswer = statementIsTrue ? "V" : "F";
1839
+ return /* @__PURE__ */ jsxs12(
1840
+ "section",
1841
+ {
1842
+ className: "flex flex-col gap-2",
1843
+ children: [
1844
+ /* @__PURE__ */ jsxs12(
1845
+ "div",
1846
+ {
1847
+ className: cn(
1848
+ "flex flex-row justify-between items-center gap-2 p-2 rounded-md border",
1849
+ shouldShowStatus ? getStatusStyles(variantCorrect) : ""
1850
+ ),
1851
+ children: [
1852
+ /* @__PURE__ */ jsx17(Text_default, { size: "sm", weight: "normal", color: "text-text-900", children: getLetterByIndex(index).concat(") ").concat(option.option) }),
1853
+ shouldShowStatus && /* @__PURE__ */ jsx17("div", { className: "flex-shrink-0", children: getStatusBadge(isStudentCorrect ? "correct" : "incorrect") })
1854
+ ]
1855
+ }
1856
+ ),
1857
+ shouldShowStatus && /* @__PURE__ */ jsxs12("span", { className: "flex flex-row gap-2 items-center", children: [
1858
+ /* @__PURE__ */ jsxs12(Text_default, { size: "2xs", weight: "normal", color: "text-text-800", children: [
1859
+ "Resposta selecionada: ",
1860
+ studentAnswer
1861
+ ] }),
1862
+ !isStudentCorrect && /* @__PURE__ */ jsxs12(Text_default, { size: "2xs", weight: "normal", color: "text-text-800", children: [
1863
+ "Resposta correta: ",
1864
+ correctAnswer
1865
+ ] })
1866
+ ] })
1867
+ ]
1868
+ },
1869
+ option.id || `option-${index}`
1870
+ );
1871
+ }) }) });
1872
+ };
1873
+
1874
+ // src/utils/questionRenderer/dissertative/index.tsx
1875
+ import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
1876
+ var renderQuestionDissertative = ({
1877
+ result
1878
+ }) => {
1879
+ const localAnswer = result?.answer || "";
1880
+ return /* @__PURE__ */ jsxs13("div", { className: "pt-2 space-y-4", children: [
1881
+ /* @__PURE__ */ jsxs13("div", { className: "space-y-2", children: [
1882
+ /* @__PURE__ */ jsx18(Text_default, { size: "sm", weight: "normal", color: "text-text-950", children: "Resposta do aluno" }),
1883
+ /* @__PURE__ */ jsx18("div", { className: "p-3 bg-background-50 rounded-lg border border-border-100", children: /* @__PURE__ */ jsx18(Text_default, { size: "sm", weight: "normal", color: "text-text-700", children: localAnswer || "Nenhuma resposta fornecida" }) })
1884
+ ] }),
1885
+ result?.answerStatus === "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && result?.teacherFeedback && /* @__PURE__ */ jsxs13("div", { className: "space-y-2", children: [
1886
+ /* @__PURE__ */ jsx18(Text_default, { size: "xs", weight: "normal", color: "text-text-500", children: "Observa\xE7\xE3o do professor:" }),
1887
+ /* @__PURE__ */ jsx18("div", { className: "p-3 bg-background-50 rounded-lg border border-border-100", children: /* @__PURE__ */ jsx18(Text_default, { size: "sm", weight: "normal", color: "text-text-700", children: result.teacherFeedback }) })
1888
+ ] })
1889
+ ] });
1890
+ };
1891
+
1892
+ // src/utils/questionRenderer/fill/index.tsx
1893
+ import { jsx as jsx19 } from "react/jsx-runtime";
1894
+ var renderQuestionFill = ({
1895
+ question,
1896
+ result
1897
+ }) => {
1898
+ return /* @__PURE__ */ jsx19(FillQuestionContent, { question, result });
1899
+ };
1900
+
1901
+ // src/utils/questionRenderer/image/index.tsx
1902
+ import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
1903
+ var renderQuestionImage = ({
1904
+ result
1905
+ }) => {
1906
+ const correctPositionRelative = { x: 0.48, y: 0.45 };
1907
+ const correctRadiusRelative = 0.1;
1908
+ let userPositionRelative = null;
1909
+ try {
1910
+ if (result?.answer) {
1911
+ const parsed = typeof result.answer === "string" ? JSON.parse(result.answer) : result.answer;
1912
+ if (parsed && typeof parsed.x === "number" && typeof parsed.y === "number") {
1913
+ userPositionRelative = { x: parsed.x, y: parsed.y };
1914
+ }
1915
+ }
1916
+ } catch {
1917
+ userPositionRelative = null;
1918
+ }
1919
+ const isCorrect = userPositionRelative ? Math.sqrt(
1920
+ Math.pow(userPositionRelative.x - correctPositionRelative.x, 2) + Math.pow(userPositionRelative.y - correctPositionRelative.y, 2)
1921
+ ) <= correctRadiusRelative : false;
1922
+ const getUserCircleColorClasses = () => {
1923
+ if (!userPositionRelative) return "";
1924
+ return isCorrect ? "bg-success-600/70 border-white" : "bg-indicator-error/70 border-white";
1925
+ };
1926
+ const getPositionDescription = (x, y) => {
1927
+ const xPercent = Math.round(x * 100);
1928
+ const yPercent = Math.round(y * 100);
1929
+ return `${xPercent}% da esquerda, ${yPercent}% do topo`;
1930
+ };
1931
+ const getSpatialRelationship = () => {
1932
+ if (!userPositionRelative) {
1933
+ return `\xC1rea correta localizada em ${getPositionDescription(
1934
+ correctPositionRelative.x,
1935
+ correctPositionRelative.y
1936
+ )}. Nenhuma resposta do aluno fornecida.`;
1937
+ }
1938
+ const deltaX = userPositionRelative.x - correctPositionRelative.x;
1939
+ const deltaY = userPositionRelative.y - correctPositionRelative.y;
1940
+ const distance = Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));
1941
+ const distancePercent = Math.round(distance * 100);
1942
+ let direction = "";
1943
+ if (Math.abs(deltaX) > Math.abs(deltaY)) {
1944
+ direction = deltaX > 0 ? "\xE0 direita" : "\xE0 esquerda";
1945
+ } else {
1946
+ direction = deltaY > 0 ? "abaixo" : "acima";
1947
+ }
1948
+ const correctPos = getPositionDescription(
1949
+ correctPositionRelative.x,
1950
+ correctPositionRelative.y
1951
+ );
1952
+ const userPos = getPositionDescription(
1953
+ userPositionRelative.x,
1954
+ userPositionRelative.y
1955
+ );
1956
+ return `\xC1rea correta localizada em ${correctPos}. Resposta do aluno em ${userPos}. A resposta do aluno est\xE1 ${distancePercent}% de dist\xE2ncia ${direction} da \xE1rea correta. ${isCorrect ? "A resposta est\xE1 dentro da \xE1rea de toler\xE2ncia e \xE9 considerada correta." : "A resposta est\xE1 fora da \xE1rea de toler\xE2ncia e \xE9 considerada incorreta."}`;
1957
+ };
1958
+ const correctPositionDescription = getPositionDescription(
1959
+ correctPositionRelative.x,
1960
+ correctPositionRelative.y
1961
+ );
1962
+ const imageAltText = `Quest\xE3o de imagem com \xE1rea correta localizada em ${correctPositionDescription}`;
1963
+ return /* @__PURE__ */ jsxs14("div", { className: "pt-2 space-y-4", children: [
1964
+ /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-4 text-xs", children: [
1965
+ /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2", children: [
1966
+ /* @__PURE__ */ jsx20("div", { className: "w-3 h-3 rounded-full bg-indicator-primary/70 border border-[#F8CC2E]" }),
1967
+ /* @__PURE__ */ jsx20(Text_default, { size: "sm", weight: "normal", color: "text-text-600", children: "\xC1rea correta" })
1968
+ ] }),
1969
+ userPositionRelative && /* @__PURE__ */ jsxs14(Fragment2, { children: [
1970
+ /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2", children: [
1971
+ /* @__PURE__ */ jsx20("div", { className: "w-3 h-3 rounded-full bg-success-600/70 border border-white" }),
1972
+ /* @__PURE__ */ jsx20(Text_default, { size: "sm", weight: "normal", color: "text-text-600", children: "Resposta correta" })
1973
+ ] }),
1974
+ /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2", children: [
1975
+ /* @__PURE__ */ jsx20("div", { className: "w-3 h-3 rounded-full bg-indicator-error/70 border border-white" }),
1976
+ /* @__PURE__ */ jsx20(Text_default, { size: "sm", weight: "normal", color: "text-text-600", children: "Resposta incorreta" })
1977
+ ] })
1978
+ ] })
1979
+ ] }),
1980
+ /* @__PURE__ */ jsxs14("div", { className: "relative w-full", children: [
1981
+ /* @__PURE__ */ jsx20("div", { className: "sr-only", children: getSpatialRelationship() }),
1982
+ /* @__PURE__ */ jsx20(
1983
+ "img",
1984
+ {
1985
+ src: mock_image_question_default,
1986
+ alt: imageAltText,
1987
+ className: "w-full h-auto rounded-md"
1988
+ }
1989
+ ),
1990
+ /* @__PURE__ */ jsx20(
1991
+ "div",
1992
+ {
1993
+ role: "img",
1994
+ "aria-label": `\xC1rea correta marcada em ${correctPositionDescription}`,
1995
+ className: "absolute rounded-full bg-indicator-primary/70 border-4 border-[#F8CC2E] pointer-events-none",
1996
+ style: {
1997
+ minWidth: "50px",
1998
+ maxWidth: "160px",
1999
+ width: "15%",
2000
+ aspectRatio: "1 / 1",
2001
+ left: `calc(${correctPositionRelative.x * 100}% - 7.5%)`,
2002
+ top: `calc(${correctPositionRelative.y * 100}% - 15%)`
2003
+ },
2004
+ children: /* @__PURE__ */ jsxs14(
2005
+ Text_default,
2006
+ {
2007
+ size: "sm",
2008
+ weight: "normal",
2009
+ color: "text-text-600",
2010
+ className: "sr-only",
2011
+ children: [
2012
+ "C\xEDrculo amarelo indicando a \xE1rea correta da resposta, posicionado em",
2013
+ " ",
2014
+ correctPositionDescription
2015
+ ]
2016
+ }
2017
+ )
2018
+ }
2019
+ ),
2020
+ userPositionRelative && /* @__PURE__ */ jsx20(
2021
+ "div",
2022
+ {
2023
+ role: "img",
2024
+ "aria-label": `Resposta do aluno marcada em ${getPositionDescription(
2025
+ userPositionRelative.x,
2026
+ userPositionRelative.y
2027
+ )}, ${isCorrect ? "correta" : "incorreta"}`,
2028
+ className: `absolute rounded-full border-4 pointer-events-none ${getUserCircleColorClasses()}`,
2029
+ style: {
2030
+ minWidth: "30px",
2031
+ maxWidth: "52px",
2032
+ width: "5%",
2033
+ aspectRatio: "1 / 1",
2034
+ left: `calc(${userPositionRelative.x * 100}% - 2.5%)`,
2035
+ top: `calc(${userPositionRelative.y * 100}% - 2.5%)`
2036
+ },
2037
+ children: /* @__PURE__ */ jsxs14(
2038
+ Text_default,
2039
+ {
2040
+ size: "sm",
2041
+ weight: "normal",
2042
+ color: "text-text-600",
2043
+ className: "sr-only",
2044
+ children: [
2045
+ "C\xEDrculo ",
2046
+ isCorrect ? "verde" : "vermelho",
2047
+ " indicando a resposta do aluno, posicionado em",
2048
+ " ",
2049
+ getPositionDescription(
2050
+ userPositionRelative.x,
2051
+ userPositionRelative.y
2052
+ ),
2053
+ ". A resposta est\xE1",
2054
+ " ",
2055
+ Math.round(
2056
+ Math.sqrt(
2057
+ Math.pow(
2058
+ userPositionRelative.x - correctPositionRelative.x,
2059
+ 2
2060
+ ) + Math.pow(
2061
+ userPositionRelative.y - correctPositionRelative.y,
2062
+ 2
2063
+ )
2064
+ ) * 100
2065
+ ),
2066
+ "% de dist\xE2ncia da \xE1rea correta e \xE9 considerada",
2067
+ " ",
2068
+ isCorrect ? "correta" : "incorreta",
2069
+ "."
2070
+ ]
2071
+ }
2072
+ )
2073
+ }
2074
+ )
2075
+ ] })
2076
+ ] });
2077
+ };
2078
+
2079
+ // src/utils/questionRenderer/connectDots/index.tsx
2080
+ import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
2081
+ var renderQuestionConnectDots = ({
2082
+ paddingBottom
2083
+ } = {}) => {
2084
+ return /* @__PURE__ */ jsxs15(Fragment3, { children: [
2085
+ /* @__PURE__ */ jsx21(QuestionSubTitle, { subTitle: "Tipo de quest\xE3o: Ligar Pontos" }),
2086
+ /* @__PURE__ */ jsx21(QuestionContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx21("div", { className: "space-y-4", children: /* @__PURE__ */ jsx21(Text_default, { size: "md", weight: "normal", color: "text-text-600", children: "Tipo de quest\xE3o: Ligar Pontos (n\xE3o implementado)" }) }) })
2087
+ ] });
2088
+ };
2089
+
2090
+ // src/utils/questionRenderer/index.tsx
2091
+ var questionRendererMap = {
2092
+ ["ALTERNATIVA" /* ALTERNATIVA */]: renderQuestionAlternative,
2093
+ ["MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */]: renderQuestionMultipleChoice,
2094
+ ["VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */]: renderQuestionTrueOrFalse,
2095
+ ["DISSERTATIVA" /* DISSERTATIVA */]: renderQuestionDissertative,
2096
+ ["PREENCHER" /* PREENCHER */]: renderQuestionFill,
2097
+ ["IMAGEM" /* IMAGEM */]: renderQuestionImage,
2098
+ ["LIGAR_PONTOS" /* LIGAR_PONTOS */]: renderQuestionConnectDots
2099
+ };
1520
2100
  var renderFromMap = (renderers, questionType) => {
1521
2101
  if (!questionType) return null;
1522
2102
  const renderer = renderers[questionType];
1523
2103
  return renderer ? renderer() : null;
1524
2104
  };
1525
2105
 
2106
+ // src/types/questionTypes.ts
2107
+ var questionTypeLabels = {
2108
+ ["ALTERNATIVA" /* ALTERNATIVA */]: "Alternativa",
2109
+ ["VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */]: "Verdadeiro ou Falso",
2110
+ ["DISSERTATIVA" /* DISSERTATIVA */]: "Discursiva",
2111
+ ["IMAGEM" /* IMAGEM */]: "Imagem",
2112
+ ["MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */]: "M\xFAltipla Escolha",
2113
+ ["LIGAR_PONTOS" /* LIGAR_PONTOS */]: "Ligar Pontos",
2114
+ ["PREENCHER" /* PREENCHER */]: "Preencher Lacunas"
2115
+ };
2116
+
1526
2117
  // src/components/ActivityCardQuestionBanks/ActivityCardQuestionBanks.tsx
1527
- import { Plus, CheckCircle as CheckCircle3, XCircle as XCircle3 } from "phosphor-react";
1528
- import { useMemo } from "react";
1529
- import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
2118
+ import { Plus, CheckCircle as CheckCircle5, XCircle as XCircle5 } from "phosphor-react";
2119
+ import { useMemo as useMemo2 } from "react";
2120
+ import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
1530
2121
  var ActivityCardQuestionBanks = ({
1531
2122
  question,
1532
2123
  questionType,
@@ -1537,7 +2128,7 @@ var ActivityCardQuestionBanks = ({
1537
2128
  assunto,
1538
2129
  enunciado
1539
2130
  } = {}) => {
1540
- const alternatives = useMemo(() => {
2131
+ const alternatives = useMemo2(() => {
1541
2132
  if (!question?.options || questionType !== "ALTERNATIVA" /* ALTERNATIVA */)
1542
2133
  return [];
1543
2134
  const correctOptionIds2 = question.correctOptionIds || [];
@@ -1551,13 +2142,13 @@ var ActivityCardQuestionBanks = ({
1551
2142
  };
1552
2143
  });
1553
2144
  }, [question, questionType]);
1554
- const correctOptionId = useMemo(() => {
2145
+ const correctOptionId = useMemo2(() => {
1555
2146
  if (!question?.correctOptionIds || question.correctOptionIds.length === 0) {
1556
2147
  return void 0;
1557
2148
  }
1558
2149
  return question.correctOptionIds[0];
1559
2150
  }, [question]);
1560
- const multipleChoices = useMemo(() => {
2151
+ const multipleChoices = useMemo2(() => {
1561
2152
  if (!question?.options || questionType !== "MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */)
1562
2153
  return [];
1563
2154
  const correctOptionIds2 = question.correctOptionIds || [];
@@ -1571,18 +2162,18 @@ var ActivityCardQuestionBanks = ({
1571
2162
  };
1572
2163
  });
1573
2164
  }, [question, questionType]);
1574
- const correctOptionIds = useMemo(() => {
2165
+ const correctOptionIds = useMemo2(() => {
1575
2166
  return question?.correctOptionIds || [];
1576
2167
  }, [question]);
1577
- const getStatusBadge = (status) => {
2168
+ const getStatusBadge2 = (status) => {
1578
2169
  switch (status) {
1579
2170
  case "correct":
1580
- return /* @__PURE__ */ jsx13(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx13(CheckCircle3, {}), children: "Resposta correta" });
2171
+ return /* @__PURE__ */ jsx22(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx22(CheckCircle5, {}), children: "Resposta correta" });
1581
2172
  case "incorrect":
1582
- return /* @__PURE__ */ jsx13(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx13(XCircle3, {}), children: "Resposta incorreta" });
2173
+ return /* @__PURE__ */ jsx22(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx22(XCircle5, {}), children: "Resposta incorreta" });
1583
2174
  }
1584
2175
  };
1585
- const getStatusStyles = (status) => {
2176
+ const getStatusStyles2 = (status) => {
1586
2177
  switch (status) {
1587
2178
  case "correct":
1588
2179
  return "bg-success-background border-success-300";
@@ -1593,7 +2184,7 @@ var ActivityCardQuestionBanks = ({
1593
2184
  const getLetterByIndex = (index) => String.fromCodePoint(97 + index);
1594
2185
  const renderAlternative = () => {
1595
2186
  if (!question || alternatives.length === 0) return null;
1596
- return /* @__PURE__ */ jsx13("div", { className: "mt-4", children: /* @__PURE__ */ jsx13(
2187
+ return /* @__PURE__ */ jsx22("div", { className: "mt-4", children: /* @__PURE__ */ jsx22(
1597
2188
  AlternativesList,
1598
2189
  {
1599
2190
  alternatives,
@@ -1606,7 +2197,7 @@ var ActivityCardQuestionBanks = ({
1606
2197
  };
1607
2198
  const renderMultipleChoice = () => {
1608
2199
  if (!question || multipleChoices.length === 0) return null;
1609
- return /* @__PURE__ */ jsx13("div", { className: "mt-4", children: /* @__PURE__ */ jsx13(
2200
+ return /* @__PURE__ */ jsx22("div", { className: "mt-4", children: /* @__PURE__ */ jsx22(
1610
2201
  MultipleChoiceList,
1611
2202
  {
1612
2203
  choices: multipleChoices,
@@ -1617,29 +2208,29 @@ var ActivityCardQuestionBanks = ({
1617
2208
  ) });
1618
2209
  };
1619
2210
  const renderDissertative = () => {
1620
- return /* @__PURE__ */ jsx13("div", { className: "mt-4 px-2 py-4", children: /* @__PURE__ */ jsx13(Text_default, { size: "sm", className: "text-text-600 italic", children: "Resposta do aluno" }) });
2211
+ return /* @__PURE__ */ jsx22("div", { className: "mt-4 px-2 py-4", children: /* @__PURE__ */ jsx22(Text_default, { size: "sm", className: "text-text-600 italic", children: "Resposta do aluno" }) });
1621
2212
  };
1622
2213
  const renderTrueOrFalse = () => {
1623
2214
  if (!question || question.options.length === 0) return null;
1624
- return /* @__PURE__ */ jsx13("div", { className: "mt-4", children: /* @__PURE__ */ jsx13("div", { className: "flex flex-col gap-3.5", children: question.options.map((option, index) => {
2215
+ return /* @__PURE__ */ jsx22("div", { className: "mt-4", children: /* @__PURE__ */ jsx22("div", { className: "flex flex-col gap-3.5", children: question.options.map((option, index) => {
1625
2216
  const isCorrect = correctOptionIds.includes(option.id);
1626
2217
  const correctAnswer = isCorrect ? "Verdadeiro" : "Falso";
1627
2218
  const variantCorrect = "correct";
1628
- return /* @__PURE__ */ jsx13("section", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsxs10(
2219
+ return /* @__PURE__ */ jsx22("section", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsxs16(
1629
2220
  "div",
1630
2221
  {
1631
2222
  className: cn(
1632
2223
  "flex flex-row justify-between items-center gap-2 p-2 rounded-md border",
1633
- getStatusStyles(variantCorrect)
2224
+ getStatusStyles2(variantCorrect)
1634
2225
  ),
1635
2226
  children: [
1636
- /* @__PURE__ */ jsx13(Text_default, { size: "sm", className: "text-text-900", children: getLetterByIndex(index).concat(") ").concat(option.option) }),
1637
- /* @__PURE__ */ jsxs10("div", { className: "flex flex-row items-center gap-2 flex-shrink-0", children: [
1638
- /* @__PURE__ */ jsxs10(Text_default, { size: "sm", className: "text-text-700", children: [
2227
+ /* @__PURE__ */ jsx22(Text_default, { size: "sm", className: "text-text-900", children: getLetterByIndex(index).concat(") ").concat(option.option) }),
2228
+ /* @__PURE__ */ jsxs16("div", { className: "flex flex-row items-center gap-2 flex-shrink-0", children: [
2229
+ /* @__PURE__ */ jsxs16(Text_default, { size: "sm", className: "text-text-700", children: [
1639
2230
  "Resposta correta: ",
1640
2231
  correctAnswer
1641
2232
  ] }),
1642
- getStatusBadge(variantCorrect)
2233
+ getStatusBadge2(variantCorrect)
1643
2234
  ] })
1644
2235
  ]
1645
2236
  }
@@ -1664,32 +2255,32 @@ var ActivityCardQuestionBanks = ({
1664
2255
  ["PREENCHER" /* PREENCHER */]: renderFill,
1665
2256
  ["IMAGEM" /* IMAGEM */]: renderImage
1666
2257
  };
1667
- return /* @__PURE__ */ jsxs10("div", { className: "w-full flex flex-col gap-2 px-4 py-6", children: [
1668
- /* @__PURE__ */ jsxs10("section", { className: "flex flex-row gap-2 text-text-650", children: [
1669
- /* @__PURE__ */ jsxs10("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: [
1670
- /* @__PURE__ */ jsx13(
2258
+ return /* @__PURE__ */ jsxs16("div", { className: "w-full flex flex-col gap-2 px-4 py-6", children: [
2259
+ /* @__PURE__ */ jsxs16("section", { className: "flex flex-row gap-2 text-text-650", children: [
2260
+ /* @__PURE__ */ jsxs16("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: [
2261
+ /* @__PURE__ */ jsx22(
1671
2262
  "span",
1672
2263
  {
1673
2264
  className: "size-4 rounded-sm flex items-center justify-center shrink-0 text-text-950",
1674
2265
  style: {
1675
2266
  backgroundColor: getSubjectColorWithOpacity(subjectColor, isDark)
1676
2267
  },
1677
- children: /* @__PURE__ */ jsx13(IconRender_default, { iconName, size: 14, color: "currentColor" })
2268
+ children: /* @__PURE__ */ jsx22(IconRender_default, { iconName, size: 14, color: "currentColor" })
1678
2269
  }
1679
2270
  ),
1680
- /* @__PURE__ */ jsx13(Text_default, { size: "sm", children: assunto || "Assunto n\xE3o informado" })
2271
+ /* @__PURE__ */ jsx22(Text_default, { size: "sm", children: assunto || "Assunto n\xE3o informado" })
1681
2272
  ] }),
1682
- /* @__PURE__ */ jsx13("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: /* @__PURE__ */ jsx13(Text_default, { size: "sm", className: "", children: questionType ? questionTypeLabels[questionType] : "Tipo de quest\xE3o" }) })
2273
+ /* @__PURE__ */ jsx22("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: /* @__PURE__ */ jsx22(Text_default, { size: "sm", className: "", children: questionType ? questionTypeLabels[questionType] : "Tipo de quest\xE3o" }) })
1683
2274
  ] }),
1684
- /* @__PURE__ */ jsxs10("section", { className: "flex flex-col gap-1", children: [
1685
- /* @__PURE__ */ jsx13(Text_default, { size: "md", weight: "medium", className: "text-text-950 text-md", children: enunciado || "Enunciado n\xE3o informado" }),
2275
+ /* @__PURE__ */ jsxs16("section", { className: "flex flex-col gap-1", children: [
2276
+ /* @__PURE__ */ jsx22(Text_default, { size: "md", weight: "medium", className: "text-text-950 text-md", children: enunciado || "Enunciado n\xE3o informado" }),
1686
2277
  renderFromMap(questionRenderers, questionType)
1687
2278
  ] }),
1688
- /* @__PURE__ */ jsx13("section", { children: /* @__PURE__ */ jsx13(
2279
+ /* @__PURE__ */ jsx22("section", { children: /* @__PURE__ */ jsx22(
1689
2280
  Button_default,
1690
2281
  {
1691
2282
  size: "small",
1692
- iconLeft: /* @__PURE__ */ jsx13(Plus, {}),
2283
+ iconLeft: /* @__PURE__ */ jsx22(Plus, {}),
1693
2284
  className: "w-full",
1694
2285
  onClick: () => {
1695
2286
  if (onAddToActivity) {