@algorithm-shift/design-system 1.3.127 → 1.3.128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1076,13 +1076,98 @@ function Icon(props) {
1076
1076
  return null;
1077
1077
  }
1078
1078
 
1079
+ // src/components/Basic/Audio/Audio.tsx
1080
+ import { useRef as useRef2, useState as useState6, useEffect as useEffect4 } from "react";
1081
+ import { Play, Pause } from "lucide-react";
1082
+ import { jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
1083
+ var formatTime = (time) => {
1084
+ if (isNaN(time) || !isFinite(time)) return "00:00";
1085
+ const minutes = Math.floor(time / 60);
1086
+ const seconds = Math.floor(time % 60);
1087
+ return `${minutes.toString().padStart(2, "0")}:${seconds.toString().padStart(2, "0")}`;
1088
+ };
1089
+ var AudioWrapper = (props) => {
1090
+ const audioRef = useRef2(null);
1091
+ const [isPlaying, setIsPlaying] = useState6(false);
1092
+ const [currentTime, setCurrentTime] = useState6(0);
1093
+ const [duration, setDuration] = useState6(0);
1094
+ useEffect4(() => {
1095
+ const audioEl = audioRef.current;
1096
+ if (!audioEl) return;
1097
+ const handleEnded = () => setIsPlaying(false);
1098
+ const handlePause = () => setIsPlaying(false);
1099
+ const handlePlay = () => setIsPlaying(true);
1100
+ const handleTimeUpdate = () => setCurrentTime(audioEl.currentTime);
1101
+ const handleLoadedMetadata = () => setDuration(audioEl.duration);
1102
+ audioEl.addEventListener("ended", handleEnded);
1103
+ audioEl.addEventListener("pause", handlePause);
1104
+ audioEl.addEventListener("play", handlePlay);
1105
+ audioEl.addEventListener("timeupdate", handleTimeUpdate);
1106
+ audioEl.addEventListener("loadedmetadata", handleLoadedMetadata);
1107
+ return () => {
1108
+ audioEl.removeEventListener("ended", handleEnded);
1109
+ audioEl.removeEventListener("pause", handlePause);
1110
+ audioEl.removeEventListener("play", handlePlay);
1111
+ audioEl.removeEventListener("timeupdate", handleTimeUpdate);
1112
+ audioEl.removeEventListener("loadedmetadata", handleLoadedMetadata);
1113
+ };
1114
+ }, []);
1115
+ const togglePlay = () => {
1116
+ if (audioRef.current) {
1117
+ if (isPlaying) {
1118
+ audioRef.current.pause();
1119
+ } else {
1120
+ audioRef.current.play();
1121
+ }
1122
+ }
1123
+ };
1124
+ const handleSeek = (e) => {
1125
+ const time = Number(e.target.value);
1126
+ if (audioRef.current) {
1127
+ audioRef.current.currentTime = time;
1128
+ setCurrentTime(time);
1129
+ }
1130
+ };
1131
+ const url = props.data || props.src || props.value;
1132
+ return /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-3 p-3 bg-white rounded-lg border shadow-sm w-full min-w-[250px]", children: [
1133
+ url && /* @__PURE__ */ jsx19("audio", { ref: audioRef, src: url, preload: "metadata" }),
1134
+ /* @__PURE__ */ jsx19(
1135
+ "button",
1136
+ {
1137
+ onClick: togglePlay,
1138
+ disabled: !url,
1139
+ className: "p-2 flex-shrink-0 flex items-center justify-center text-blue-600 bg-blue-50 rounded-full hover:bg-blue-100 disabled:opacity-50 disabled:bg-gray-50 disabled:text-gray-400 transition-colors",
1140
+ title: isPlaying ? "Pause Audio" : "Play Audio",
1141
+ children: isPlaying ? /* @__PURE__ */ jsx19(Pause, { size: 20, className: "fill-current" }) : /* @__PURE__ */ jsx19(Play, { size: 20, className: "fill-current transform translate-x-0.5" })
1142
+ }
1143
+ ),
1144
+ /* @__PURE__ */ jsxs8("div", { className: "flex-1 flex items-center gap-3", children: [
1145
+ /* @__PURE__ */ jsx19("span", { className: "text-xs font-medium text-gray-500 tabular-nums w-10 text-right", children: formatTime(currentTime) }),
1146
+ /* @__PURE__ */ jsx19(
1147
+ "input",
1148
+ {
1149
+ type: "range",
1150
+ min: "0",
1151
+ max: duration || 100,
1152
+ value: currentTime,
1153
+ onChange: handleSeek,
1154
+ disabled: !url,
1155
+ className: "flex-1 h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-blue-600 disabled:accent-gray-400"
1156
+ }
1157
+ ),
1158
+ /* @__PURE__ */ jsx19("span", { className: "text-xs font-medium text-gray-500 tabular-nums w-10", children: formatTime(duration) })
1159
+ ] })
1160
+ ] });
1161
+ };
1162
+ var Audio_default = AudioWrapper;
1163
+
1079
1164
  // src/components/Inputs/TextInput/TextInput.tsx
1080
- import { useEffect as useEffect4 } from "react";
1165
+ import { useEffect as useEffect5 } from "react";
1081
1166
 
1082
1167
  // src/components/ui/input.tsx
1083
- import { jsx as jsx19 } from "react/jsx-runtime";
1168
+ import { jsx as jsx20 } from "react/jsx-runtime";
1084
1169
  function Input({ className, type, ...props }) {
1085
- return /* @__PURE__ */ jsx19(
1170
+ return /* @__PURE__ */ jsx20(
1086
1171
  "input",
1087
1172
  {
1088
1173
  type,
@@ -1099,14 +1184,14 @@ function Input({ className, type, ...props }) {
1099
1184
  }
1100
1185
 
1101
1186
  // src/components/Inputs/TextInput/TextInput.tsx
1102
- import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
1187
+ import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
1103
1188
  var TextInput = ({ className, style, ...props }) => {
1104
1189
  const placeholder = props.placeholder || "Placeholder text";
1105
1190
  const isEditable = props.isEditable ?? true;
1106
1191
  const isDisabled = props.isDisabled ?? false;
1107
1192
  const isReadonly = props.isReadonly ?? false;
1108
1193
  const isAutocomplete = props.isAutocomplete ?? false;
1109
- useEffect4(() => {
1194
+ useEffect5(() => {
1110
1195
  if (props.value !== void 0) {
1111
1196
  const e = { target: { value: props.value }, type: "change" };
1112
1197
  handleChange?.(e);
@@ -1122,8 +1207,8 @@ var TextInput = ({ className, style, ...props }) => {
1122
1207
  if (value === null || value === void 0) return "";
1123
1208
  return value;
1124
1209
  };
1125
- return /* @__PURE__ */ jsxs8(Fragment3, { children: [
1126
- /* @__PURE__ */ jsx20(
1210
+ return /* @__PURE__ */ jsxs9(Fragment3, { children: [
1211
+ /* @__PURE__ */ jsx21(
1127
1212
  Input,
1128
1213
  {
1129
1214
  type: props.inputType || "text",
@@ -1142,21 +1227,21 @@ var TextInput = ({ className, style, ...props }) => {
1142
1227
  readOnly: isReadonly
1143
1228
  }
1144
1229
  ),
1145
- props.errorMessage && /* @__PURE__ */ jsx20("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1230
+ props.errorMessage && /* @__PURE__ */ jsx21("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1146
1231
  ] });
1147
1232
  };
1148
1233
  var TextInput_default = TextInput;
1149
1234
 
1150
1235
  // src/components/Inputs/NumberInput/NumberInput.tsx
1151
- import { useEffect as useEffect5 } from "react";
1152
- import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
1236
+ import { useEffect as useEffect6 } from "react";
1237
+ import { Fragment as Fragment4, jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
1153
1238
  var NumberInput = ({ className, style, ...props }) => {
1154
1239
  const placeholder = props.placeholder ?? "Placeholder text";
1155
1240
  const isEditable = props.isEditable ?? true;
1156
1241
  const isDisabled = props.isDisabled ?? false;
1157
1242
  const isReadonly = props.isReadonly ?? false;
1158
1243
  const isAutocomplete = props.isAutocomplete ?? false;
1159
- useEffect5(() => {
1244
+ useEffect6(() => {
1160
1245
  if (props.value !== void 0) {
1161
1246
  const e = { target: { value: props.value }, type: "change" };
1162
1247
  handleChange?.(e);
@@ -1172,8 +1257,8 @@ var NumberInput = ({ className, style, ...props }) => {
1172
1257
  if (value === null || value === void 0) return 0;
1173
1258
  return value;
1174
1259
  };
1175
- return /* @__PURE__ */ jsxs9(Fragment4, { children: [
1176
- /* @__PURE__ */ jsx21("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx21(
1260
+ return /* @__PURE__ */ jsxs10(Fragment4, { children: [
1261
+ /* @__PURE__ */ jsx22("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx22(
1177
1262
  Input,
1178
1263
  {
1179
1264
  type: props.inputType || "number",
@@ -1192,21 +1277,21 @@ var NumberInput = ({ className, style, ...props }) => {
1192
1277
  readOnly: isReadonly
1193
1278
  }
1194
1279
  ) }),
1195
- props.errorMessage && /* @__PURE__ */ jsx21("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1280
+ props.errorMessage && /* @__PURE__ */ jsx22("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1196
1281
  ] });
1197
1282
  };
1198
1283
  var NumberInput_default = NumberInput;
1199
1284
 
1200
1285
  // src/components/Inputs/EmailInput/EmailInput.tsx
1201
- import { useEffect as useEffect6 } from "react";
1202
- import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
1286
+ import { useEffect as useEffect7 } from "react";
1287
+ import { Fragment as Fragment5, jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
1203
1288
  var EmailInput = ({ className, style, ...props }) => {
1204
1289
  const placeholder = props.placeholder ?? "Placeholder text";
1205
1290
  const isEditable = props.isEditable ?? true;
1206
1291
  const isDisabled = props.isDisabled ?? false;
1207
1292
  const isReadonly = props.isReadonly ?? false;
1208
1293
  const isAutocomplete = props.isAutocomplete ?? false;
1209
- useEffect6(() => {
1294
+ useEffect7(() => {
1210
1295
  if (props.value !== void 0) {
1211
1296
  const e = { target: { value: props.value }, type: "change" };
1212
1297
  handleChange?.(e);
@@ -1222,8 +1307,8 @@ var EmailInput = ({ className, style, ...props }) => {
1222
1307
  if (value === null || value === void 0) return "";
1223
1308
  return value;
1224
1309
  };
1225
- return /* @__PURE__ */ jsxs10(Fragment5, { children: [
1226
- /* @__PURE__ */ jsx22("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx22(
1310
+ return /* @__PURE__ */ jsxs11(Fragment5, { children: [
1311
+ /* @__PURE__ */ jsx23("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx23(
1227
1312
  Input,
1228
1313
  {
1229
1314
  type: props.inputType || "email",
@@ -1242,21 +1327,21 @@ var EmailInput = ({ className, style, ...props }) => {
1242
1327
  readOnly: isReadonly
1243
1328
  }
1244
1329
  ) }),
1245
- props.errorMessage && /* @__PURE__ */ jsx22("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1330
+ props.errorMessage && /* @__PURE__ */ jsx23("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1246
1331
  ] });
1247
1332
  };
1248
1333
  var EmailInput_default = EmailInput;
1249
1334
 
1250
1335
  // src/components/Inputs/PasswordInput/PasswordInput.tsx
1251
- import { useEffect as useEffect7 } from "react";
1252
- import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
1336
+ import { useEffect as useEffect8 } from "react";
1337
+ import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
1253
1338
  var PasswordInput = ({ className, style, ...props }) => {
1254
1339
  const placeholder = props.placeholder ?? "Placeholder text";
1255
1340
  const isEditable = props.isEditable ?? true;
1256
1341
  const isDisabled = props.isDisabled ?? false;
1257
1342
  const isReadonly = props.isReadonly ?? false;
1258
1343
  const isAutocomplete = props.isAutocomplete ?? false;
1259
- useEffect7(() => {
1344
+ useEffect8(() => {
1260
1345
  if (props.value !== void 0) {
1261
1346
  const e = { target: { value: props.value }, type: "change" };
1262
1347
  handleChange?.(e);
@@ -1272,8 +1357,8 @@ var PasswordInput = ({ className, style, ...props }) => {
1272
1357
  if (value === null || value === void 0) return "";
1273
1358
  return value;
1274
1359
  };
1275
- return /* @__PURE__ */ jsxs11(Fragment6, { children: [
1276
- /* @__PURE__ */ jsx23("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx23(
1360
+ return /* @__PURE__ */ jsxs12(Fragment6, { children: [
1361
+ /* @__PURE__ */ jsx24("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx24(
1277
1362
  Input,
1278
1363
  {
1279
1364
  type: props.inputType || "password",
@@ -1292,18 +1377,18 @@ var PasswordInput = ({ className, style, ...props }) => {
1292
1377
  readOnly: isReadonly
1293
1378
  }
1294
1379
  ) }),
1295
- props.errorMessage && /* @__PURE__ */ jsx23("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1380
+ props.errorMessage && /* @__PURE__ */ jsx24("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1296
1381
  ] });
1297
1382
  };
1298
1383
  var PasswordInput_default = PasswordInput;
1299
1384
 
1300
1385
  // src/components/Inputs/Textarea/Textarea.tsx
1301
- import { useEffect as useEffect8 } from "react";
1386
+ import { useEffect as useEffect9 } from "react";
1302
1387
 
1303
1388
  // src/components/ui/textarea.tsx
1304
- import { jsx as jsx24 } from "react/jsx-runtime";
1389
+ import { jsx as jsx25 } from "react/jsx-runtime";
1305
1390
  function Textarea({ className, ...props }) {
1306
- return /* @__PURE__ */ jsx24(
1391
+ return /* @__PURE__ */ jsx25(
1307
1392
  "textarea",
1308
1393
  {
1309
1394
  "data-slot": "textarea",
@@ -1317,14 +1402,14 @@ function Textarea({ className, ...props }) {
1317
1402
  }
1318
1403
 
1319
1404
  // src/components/Inputs/Textarea/Textarea.tsx
1320
- import { Fragment as Fragment7, jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
1405
+ import { Fragment as Fragment7, jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
1321
1406
  var Textarea2 = ({ className, style, ...props }) => {
1322
1407
  const placeholder = props.placeholder ?? "Placeholder text";
1323
1408
  const isEditable = props.isEditable ?? true;
1324
1409
  const isDisabled = props.isDisabled ?? false;
1325
1410
  const isReadonly = props.isReadonly ?? false;
1326
1411
  const isAutocomplete = props.isAutocomplete ?? false;
1327
- useEffect8(() => {
1412
+ useEffect9(() => {
1328
1413
  if (props.value !== void 0) {
1329
1414
  const e = { target: { value: props.value }, type: "change" };
1330
1415
  handleChange?.(e);
@@ -1333,8 +1418,8 @@ var Textarea2 = ({ className, style, ...props }) => {
1333
1418
  const handleChange = (e) => {
1334
1419
  props.onChange?.(e, props?.name || "");
1335
1420
  };
1336
- return /* @__PURE__ */ jsxs12(Fragment7, { children: [
1337
- /* @__PURE__ */ jsx25(
1421
+ return /* @__PURE__ */ jsxs13(Fragment7, { children: [
1422
+ /* @__PURE__ */ jsx26(
1338
1423
  Textarea,
1339
1424
  {
1340
1425
  id: "textarea-field",
@@ -1352,21 +1437,21 @@ var Textarea2 = ({ className, style, ...props }) => {
1352
1437
  readOnly: isReadonly
1353
1438
  }
1354
1439
  ),
1355
- props.errorMessage && /* @__PURE__ */ jsx25("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1440
+ props.errorMessage && /* @__PURE__ */ jsx26("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1356
1441
  ] });
1357
1442
  };
1358
1443
  var Textarea_default = Textarea2;
1359
1444
 
1360
1445
  // src/components/Inputs/UrlInput/UrlInput.tsx
1361
- import { useEffect as useEffect9 } from "react";
1362
- import { Fragment as Fragment8, jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
1446
+ import { useEffect as useEffect10 } from "react";
1447
+ import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
1363
1448
  var UrlInput = ({ className, style, ...props }) => {
1364
1449
  const placeholder = props.placeholder ?? "Placeholder text";
1365
1450
  const isEditable = props.isEditable ?? true;
1366
1451
  const isDisabled = props.isDisabled ?? false;
1367
1452
  const isReadonly = props.isReadonly ?? false;
1368
1453
  const isAutocomplete = props.isAutocomplete ?? false;
1369
- useEffect9(() => {
1454
+ useEffect10(() => {
1370
1455
  if (props.value !== void 0) {
1371
1456
  const e = { target: { value: props.value }, type: "change" };
1372
1457
  handleChange?.(e);
@@ -1382,10 +1467,10 @@ var UrlInput = ({ className, style, ...props }) => {
1382
1467
  if (value === null || value === void 0) return "";
1383
1468
  return value;
1384
1469
  };
1385
- return /* @__PURE__ */ jsxs13(Fragment8, { children: [
1386
- /* @__PURE__ */ jsxs13("div", { className: "flex justify-start items-center relative", children: [
1387
- /* @__PURE__ */ jsx26("div", { className: "bg-[#E9E9E9] absolute px-10 text-center top-1/2 h-full justify-center items-center flex w-10 -translate-y-1/2 text-[#383838] font-[500] text-[12px]", children: "https://" }),
1388
- /* @__PURE__ */ jsx26(
1470
+ return /* @__PURE__ */ jsxs14(Fragment8, { children: [
1471
+ /* @__PURE__ */ jsxs14("div", { className: "flex justify-start items-center relative", children: [
1472
+ /* @__PURE__ */ jsx27("div", { className: "bg-[#E9E9E9] absolute px-10 text-center top-1/2 h-full justify-center items-center flex w-10 -translate-y-1/2 text-[#383838] font-[500] text-[12px]", children: "https://" }),
1473
+ /* @__PURE__ */ jsx27(
1389
1474
  Input,
1390
1475
  {
1391
1476
  id: props.name || "url-field",
@@ -1405,23 +1490,23 @@ var UrlInput = ({ className, style, ...props }) => {
1405
1490
  }
1406
1491
  )
1407
1492
  ] }),
1408
- props.errorMessage && /* @__PURE__ */ jsx26("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1493
+ props.errorMessage && /* @__PURE__ */ jsx27("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1409
1494
  ] });
1410
1495
  };
1411
1496
  var UrlInput_default = UrlInput;
1412
1497
 
1413
1498
  // src/components/Inputs/Checkbox/Checkbox.tsx
1414
- import { useEffect as useEffect10 } from "react";
1499
+ import { useEffect as useEffect11 } from "react";
1415
1500
 
1416
1501
  // src/components/ui/checkbox.tsx
1417
1502
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
1418
1503
  import { CheckIcon as CheckIcon2 } from "lucide-react";
1419
- import { jsx as jsx27 } from "react/jsx-runtime";
1504
+ import { jsx as jsx28 } from "react/jsx-runtime";
1420
1505
  function Checkbox({
1421
1506
  className,
1422
1507
  ...props
1423
1508
  }) {
1424
- return /* @__PURE__ */ jsx27(
1509
+ return /* @__PURE__ */ jsx28(
1425
1510
  CheckboxPrimitive.Root,
1426
1511
  {
1427
1512
  "data-slot": "checkbox",
@@ -1430,12 +1515,12 @@ function Checkbox({
1430
1515
  className
1431
1516
  ),
1432
1517
  ...props,
1433
- children: /* @__PURE__ */ jsx27(
1518
+ children: /* @__PURE__ */ jsx28(
1434
1519
  CheckboxPrimitive.Indicator,
1435
1520
  {
1436
1521
  "data-slot": "checkbox-indicator",
1437
1522
  className: "flex items-center justify-center text-current transition-none",
1438
- children: /* @__PURE__ */ jsx27(CheckIcon2, { className: "size-3.5" })
1523
+ children: /* @__PURE__ */ jsx28(CheckIcon2, { className: "size-3.5" })
1439
1524
  }
1440
1525
  )
1441
1526
  }
@@ -1444,12 +1529,12 @@ function Checkbox({
1444
1529
 
1445
1530
  // src/components/ui/label.tsx
1446
1531
  import * as LabelPrimitive from "@radix-ui/react-label";
1447
- import { jsx as jsx28 } from "react/jsx-runtime";
1532
+ import { jsx as jsx29 } from "react/jsx-runtime";
1448
1533
  function Label2({
1449
1534
  className,
1450
1535
  ...props
1451
1536
  }) {
1452
- return /* @__PURE__ */ jsx28(
1537
+ return /* @__PURE__ */ jsx29(
1453
1538
  LabelPrimitive.Root,
1454
1539
  {
1455
1540
  "data-slot": "label",
@@ -1463,7 +1548,7 @@ function Label2({
1463
1548
  }
1464
1549
 
1465
1550
  // src/components/Inputs/Checkbox/Checkbox.tsx
1466
- import { Fragment as Fragment9, jsx as jsx29, jsxs as jsxs14 } from "react/jsx-runtime";
1551
+ import { Fragment as Fragment9, jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
1467
1552
  var CheckboxInput = ({ className, style, ...props }) => {
1468
1553
  const isEditable = props.isEditable ?? true;
1469
1554
  const isDisabled = props.isDisabled ?? false;
@@ -1477,7 +1562,7 @@ var CheckboxInput = ({ className, style, ...props }) => {
1477
1562
  }
1478
1563
  return false;
1479
1564
  };
1480
- useEffect10(() => {
1565
+ useEffect11(() => {
1481
1566
  if (props.value) {
1482
1567
  handleChange(formatValue(props.value));
1483
1568
  }
@@ -1485,9 +1570,9 @@ var CheckboxInput = ({ className, style, ...props }) => {
1485
1570
  const handleChange = (value) => {
1486
1571
  props.onChange?.(value, props?.name || "");
1487
1572
  };
1488
- return /* @__PURE__ */ jsxs14(Fragment9, { children: [
1489
- /* @__PURE__ */ jsx29("div", { className, style, children: /* @__PURE__ */ jsxs14("div", { className: "flex items-center space-x-2", children: [
1490
- /* @__PURE__ */ jsx29(
1573
+ return /* @__PURE__ */ jsxs15(Fragment9, { children: [
1574
+ /* @__PURE__ */ jsx30("div", { className, style, children: /* @__PURE__ */ jsxs15("div", { className: "flex items-center space-x-2", children: [
1575
+ /* @__PURE__ */ jsx30(
1491
1576
  Checkbox,
1492
1577
  {
1493
1578
  id: props.name || "checkbox",
@@ -1496,25 +1581,25 @@ var CheckboxInput = ({ className, style, ...props }) => {
1496
1581
  disabled: !isEditable || isDisabled
1497
1582
  }
1498
1583
  ),
1499
- /* @__PURE__ */ jsx29(Label2, { htmlFor: props.name || "checkbox", children: text })
1584
+ /* @__PURE__ */ jsx30(Label2, { htmlFor: props.name || "checkbox", children: text })
1500
1585
  ] }) }),
1501
- props.errorMessage && /* @__PURE__ */ jsx29("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1586
+ props.errorMessage && /* @__PURE__ */ jsx30("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1502
1587
  ] });
1503
1588
  };
1504
1589
  var Checkbox_default = CheckboxInput;
1505
1590
 
1506
1591
  // src/components/Inputs/RadioInput/RadioInput.tsx
1507
- import { useEffect as useEffect11 } from "react";
1592
+ import { useEffect as useEffect12 } from "react";
1508
1593
 
1509
1594
  // src/components/ui/radio-group.tsx
1510
1595
  import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
1511
1596
  import { CircleIcon as CircleIcon2 } from "lucide-react";
1512
- import { jsx as jsx30 } from "react/jsx-runtime";
1597
+ import { jsx as jsx31 } from "react/jsx-runtime";
1513
1598
  function RadioGroup2({
1514
1599
  className,
1515
1600
  ...props
1516
1601
  }) {
1517
- return /* @__PURE__ */ jsx30(
1602
+ return /* @__PURE__ */ jsx31(
1518
1603
  RadioGroupPrimitive.Root,
1519
1604
  {
1520
1605
  "data-slot": "radio-group",
@@ -1527,7 +1612,7 @@ function RadioGroupItem({
1527
1612
  className,
1528
1613
  ...props
1529
1614
  }) {
1530
- return /* @__PURE__ */ jsx30(
1615
+ return /* @__PURE__ */ jsx31(
1531
1616
  RadioGroupPrimitive.Item,
1532
1617
  {
1533
1618
  "data-slot": "radio-group-item",
@@ -1536,12 +1621,12 @@ function RadioGroupItem({
1536
1621
  className
1537
1622
  ),
1538
1623
  ...props,
1539
- children: /* @__PURE__ */ jsx30(
1624
+ children: /* @__PURE__ */ jsx31(
1540
1625
  RadioGroupPrimitive.Indicator,
1541
1626
  {
1542
1627
  "data-slot": "radio-group-indicator",
1543
1628
  className: "relative flex items-center justify-center",
1544
- children: /* @__PURE__ */ jsx30(CircleIcon2, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
1629
+ children: /* @__PURE__ */ jsx31(CircleIcon2, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
1545
1630
  }
1546
1631
  )
1547
1632
  }
@@ -1549,7 +1634,7 @@ function RadioGroupItem({
1549
1634
  }
1550
1635
 
1551
1636
  // src/components/Inputs/RadioInput/RadioInput.tsx
1552
- import { Fragment as Fragment10, jsx as jsx31, jsxs as jsxs15 } from "react/jsx-runtime";
1637
+ import { Fragment as Fragment10, jsx as jsx32, jsxs as jsxs16 } from "react/jsx-runtime";
1553
1638
  var RadioInput = ({
1554
1639
  className,
1555
1640
  style,
@@ -1565,7 +1650,7 @@ var RadioInput = ({
1565
1650
  value: item[dataKey || "value"],
1566
1651
  label: item[dataLabel || "label"]
1567
1652
  }));
1568
- useEffect11(() => {
1653
+ useEffect12(() => {
1569
1654
  if (props.value !== void 0) {
1570
1655
  handleChange?.(props.value);
1571
1656
  }
@@ -1574,29 +1659,29 @@ var RadioInput = ({
1574
1659
  onChange?.(value, props?.name || "");
1575
1660
  };
1576
1661
  const resolvedDefaultValue = (typeof defaultValue === "string" ? defaultValue : void 0) ?? options[0]?.value;
1577
- return /* @__PURE__ */ jsxs15(Fragment10, { children: [
1578
- /* @__PURE__ */ jsx31("div", { className, style, children: /* @__PURE__ */ jsxs15(
1662
+ return /* @__PURE__ */ jsxs16(Fragment10, { children: [
1663
+ /* @__PURE__ */ jsx32("div", { className, style, children: /* @__PURE__ */ jsxs16(
1579
1664
  RadioGroup2,
1580
1665
  {
1581
1666
  defaultValue: resolvedDefaultValue,
1582
1667
  onValueChange: handleChange,
1583
1668
  children: [
1584
- options.length === 0 && /* @__PURE__ */ jsx31("div", { className: "text-sm text-gray-500", children: "No options available" }),
1585
- options.map((item) => /* @__PURE__ */ jsxs15("div", { className: "flex items-center space-x-2", children: [
1586
- /* @__PURE__ */ jsx31(RadioGroupItem, { value: item.value, id: `radio-${item.value}` }),
1587
- /* @__PURE__ */ jsx31(Label2, { htmlFor: `radio-${item.value}`, children: item.label })
1669
+ options.length === 0 && /* @__PURE__ */ jsx32("div", { className: "text-sm text-gray-500", children: "No options available" }),
1670
+ options.map((item) => /* @__PURE__ */ jsxs16("div", { className: "flex items-center space-x-2", children: [
1671
+ /* @__PURE__ */ jsx32(RadioGroupItem, { value: item.value, id: `radio-${item.value}` }),
1672
+ /* @__PURE__ */ jsx32(Label2, { htmlFor: `radio-${item.value}`, children: item.label })
1588
1673
  ] }, item.value))
1589
1674
  ]
1590
1675
  }
1591
1676
  ) }),
1592
- props.errorMessage && /* @__PURE__ */ jsx31("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1677
+ props.errorMessage && /* @__PURE__ */ jsx32("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1593
1678
  ] });
1594
1679
  };
1595
1680
  var RadioInput_default = RadioInput;
1596
1681
 
1597
1682
  // src/components/Inputs/MultiCheckbox/MultiCheckbox.tsx
1598
- import { useEffect as useEffect12, useState as useState6, useRef as useRef2, useCallback } from "react";
1599
- import { jsx as jsx32, jsxs as jsxs16 } from "react/jsx-runtime";
1683
+ import { useEffect as useEffect13, useState as useState7, useRef as useRef3, useCallback } from "react";
1684
+ import { jsx as jsx33, jsxs as jsxs17 } from "react/jsx-runtime";
1600
1685
  function MultiCheckbox({
1601
1686
  apiUrl,
1602
1687
  axiosInstance,
@@ -1614,11 +1699,11 @@ function MultiCheckbox({
1614
1699
  onUncheckItems,
1615
1700
  ...props
1616
1701
  }) {
1617
- const [options, setOptions] = useState6([]);
1618
- const [page, setPage] = useState6(1);
1619
- const [hasMore, setHasMore] = useState6(true);
1620
- const [pageLoading, setPageLoading] = useState6(false);
1621
- const loadMoreRef = useRef2(null);
1702
+ const [options, setOptions] = useState7([]);
1703
+ const [page, setPage] = useState7(1);
1704
+ const [hasMore, setHasMore] = useState7(true);
1705
+ const [pageLoading, setPageLoading] = useState7(false);
1706
+ const loadMoreRef = useRef3(null);
1622
1707
  const normalizeInput = (val) => {
1623
1708
  if (!val) return [];
1624
1709
  if (Array.isArray(val)) return val;
@@ -1677,7 +1762,7 @@ function MultiCheckbox({
1677
1762
  setPageLoading(false);
1678
1763
  }
1679
1764
  }, [source, pageLoading, fetchApiPage, mapData, pageSize]);
1680
- useEffect12(() => {
1765
+ useEffect13(() => {
1681
1766
  if (source === "api") {
1682
1767
  setOptions([]);
1683
1768
  setPage(1);
@@ -1687,10 +1772,10 @@ function MultiCheckbox({
1687
1772
  setHasMore(false);
1688
1773
  }
1689
1774
  }, [source, JSON.stringify(data)]);
1690
- useEffect12(() => {
1775
+ useEffect13(() => {
1691
1776
  if (source === "api") loadPage();
1692
1777
  }, [page, source]);
1693
- useEffect12(() => {
1778
+ useEffect13(() => {
1694
1779
  if (source !== "api") return;
1695
1780
  if (!hasMore || pageLoading) return;
1696
1781
  const observer = new IntersectionObserver((entries) => {
@@ -1709,11 +1794,11 @@ function MultiCheckbox({
1709
1794
  options.filter((opt) => !updated.includes(opt.value)).map((opt) => opt.value)
1710
1795
  ), props.name || "");
1711
1796
  };
1712
- return /* @__PURE__ */ jsxs16("div", { className: cn("flex flex-col gap-2 max-h-64 overflow-auto", className), style, children: [
1713
- options.length === 0 && !pageLoading && !loading && /* @__PURE__ */ jsx32("div", { className: "text-center py-2 text-gray-500 text-sm", children: "No options available." }),
1797
+ return /* @__PURE__ */ jsxs17("div", { className: cn("flex flex-col gap-2 max-h-64 overflow-auto", className), style, children: [
1798
+ options.length === 0 && !pageLoading && !loading && /* @__PURE__ */ jsx33("div", { className: "text-center py-2 text-gray-500 text-sm", children: "No options available." }),
1714
1799
  options.map((opt, index) => {
1715
1800
  const hasError = !!props.errorMessage;
1716
- return /* @__PURE__ */ jsxs16(
1801
+ return /* @__PURE__ */ jsxs17(
1717
1802
  "div",
1718
1803
  {
1719
1804
  className: cn(
@@ -1721,7 +1806,7 @@ function MultiCheckbox({
1721
1806
  hasError && "bg-red-50"
1722
1807
  ),
1723
1808
  children: [
1724
- /* @__PURE__ */ jsx32(
1809
+ /* @__PURE__ */ jsx33(
1725
1810
  Checkbox,
1726
1811
  {
1727
1812
  id: props.name ? `${props.name}-${opt.value}` : opt.value,
@@ -1733,7 +1818,7 @@ function MultiCheckbox({
1733
1818
  )
1734
1819
  }
1735
1820
  ),
1736
- /* @__PURE__ */ jsx32(
1821
+ /* @__PURE__ */ jsx33(
1737
1822
  Label2,
1738
1823
  {
1739
1824
  id: props.name ? `${props.name}-${opt.value}` : opt.value,
@@ -1747,25 +1832,25 @@ function MultiCheckbox({
1747
1832
  `${index}-${opt.value}`
1748
1833
  );
1749
1834
  }),
1750
- source === "api" && hasMore && /* @__PURE__ */ jsx32("div", { ref: loadMoreRef, className: "h-4" }),
1751
- (pageLoading || loading) && /* @__PURE__ */ jsx32("div", { className: "text-center py-2 text-gray-500 text-sm", children: "Loading\u2026" }),
1752
- props.errorMessage && /* @__PURE__ */ jsx32("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1835
+ source === "api" && hasMore && /* @__PURE__ */ jsx33("div", { ref: loadMoreRef, className: "h-4" }),
1836
+ (pageLoading || loading) && /* @__PURE__ */ jsx33("div", { className: "text-center py-2 text-gray-500 text-sm", children: "Loading\u2026" }),
1837
+ props.errorMessage && /* @__PURE__ */ jsx33("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1753
1838
  ] });
1754
1839
  }
1755
1840
 
1756
1841
  // src/components/Inputs/RichText/RichText.tsx
1757
- import { useEffect as useEffect13 } from "react";
1842
+ import { useEffect as useEffect14 } from "react";
1758
1843
 
1759
1844
  // src/components/Global/TinyMceEditor.tsx
1760
- import { useMemo as useMemo3, useRef as useRef3 } from "react";
1845
+ import { useMemo as useMemo3, useRef as useRef4 } from "react";
1761
1846
  import { Editor } from "@tinymce/tinymce-react";
1762
- import { jsx as jsx33 } from "react/jsx-runtime";
1847
+ import { jsx as jsx34 } from "react/jsx-runtime";
1763
1848
  function MyEditor({
1764
1849
  value,
1765
1850
  onChange,
1766
1851
  isDefault
1767
1852
  }) {
1768
- const editorRef = useRef3(null);
1853
+ const editorRef = useRef4(null);
1769
1854
  function stripOuterP(html) {
1770
1855
  const trimmedHtml = html.trim();
1771
1856
  if (!trimmedHtml) return "";
@@ -1784,7 +1869,7 @@ function MyEditor({
1784
1869
  }
1785
1870
  return toolbar;
1786
1871
  }, [isDefault]);
1787
- return /* @__PURE__ */ jsx33(
1872
+ return /* @__PURE__ */ jsx34(
1788
1873
  Editor,
1789
1874
  {
1790
1875
  apiKey: process.env.NEXT_PUBLIC_TINYMCE_API_KEY,
@@ -1828,9 +1913,9 @@ function MyEditor({
1828
1913
  }
1829
1914
 
1830
1915
  // src/components/Inputs/RichText/RichText.tsx
1831
- import { jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
1916
+ import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
1832
1917
  function RichText({ className, style, ...props }) {
1833
- useEffect13(() => {
1918
+ useEffect14(() => {
1834
1919
  if (props.value !== void 0) {
1835
1920
  handleChange?.(props.value);
1836
1921
  }
@@ -1838,7 +1923,7 @@ function RichText({ className, style, ...props }) {
1838
1923
  const handleChange = (content) => {
1839
1924
  props.onChange?.(content, props?.name || "");
1840
1925
  };
1841
- return /* @__PURE__ */ jsxs17(
1926
+ return /* @__PURE__ */ jsxs18(
1842
1927
  "div",
1843
1928
  {
1844
1929
  className: cn(className, props.errorMessage ? "border-red-500" : ""),
@@ -1847,29 +1932,29 @@ function RichText({ className, style, ...props }) {
1847
1932
  borderColor: props.errorMessage ? "#f87171" : style?.borderColor
1848
1933
  },
1849
1934
  children: [
1850
- /* @__PURE__ */ jsx34(MyEditor, { onChange: handleChange, value: props.value || "", isDefault: true }),
1851
- props.errorMessage && /* @__PURE__ */ jsx34("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1935
+ /* @__PURE__ */ jsx35(MyEditor, { onChange: handleChange, value: props.value || "", isDefault: true }),
1936
+ props.errorMessage && /* @__PURE__ */ jsx35("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1852
1937
  ]
1853
1938
  }
1854
1939
  );
1855
1940
  }
1856
1941
 
1857
1942
  // src/components/Inputs/Dropdown/Dropdown.tsx
1858
- import { useEffect as useEffect16 } from "react";
1943
+ import { useEffect as useEffect17 } from "react";
1859
1944
 
1860
1945
  // src/components/ui/select.tsx
1861
1946
  import * as SelectPrimitive from "@radix-ui/react-select";
1862
1947
  import { CheckIcon as CheckIcon3, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
1863
- import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
1948
+ import { jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
1864
1949
  function Select({
1865
1950
  ...props
1866
1951
  }) {
1867
- return /* @__PURE__ */ jsx35(SelectPrimitive.Root, { "data-slot": "select", ...props });
1952
+ return /* @__PURE__ */ jsx36(SelectPrimitive.Root, { "data-slot": "select", ...props });
1868
1953
  }
1869
1954
  function SelectValue({
1870
1955
  ...props
1871
1956
  }) {
1872
- return /* @__PURE__ */ jsx35(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
1957
+ return /* @__PURE__ */ jsx36(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
1873
1958
  }
1874
1959
  function SelectTrigger({
1875
1960
  className,
@@ -1877,7 +1962,7 @@ function SelectTrigger({
1877
1962
  children,
1878
1963
  ...props
1879
1964
  }) {
1880
- return /* @__PURE__ */ jsxs18(
1965
+ return /* @__PURE__ */ jsxs19(
1881
1966
  SelectPrimitive.Trigger,
1882
1967
  {
1883
1968
  "data-slot": "select-trigger",
@@ -1889,7 +1974,7 @@ function SelectTrigger({
1889
1974
  ...props,
1890
1975
  children: [
1891
1976
  children,
1892
- /* @__PURE__ */ jsx35(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx35(ChevronDownIcon, { className: "size-4 opacity-50" }) })
1977
+ /* @__PURE__ */ jsx36(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx36(ChevronDownIcon, { className: "size-4 opacity-50" }) })
1893
1978
  ]
1894
1979
  }
1895
1980
  );
@@ -1900,7 +1985,7 @@ function SelectContent({
1900
1985
  position = "popper",
1901
1986
  ...props
1902
1987
  }) {
1903
- return /* @__PURE__ */ jsx35(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs18(
1988
+ return /* @__PURE__ */ jsx36(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs19(
1904
1989
  SelectPrimitive.Content,
1905
1990
  {
1906
1991
  "data-slot": "select-content",
@@ -1912,8 +1997,8 @@ function SelectContent({
1912
1997
  position,
1913
1998
  ...props,
1914
1999
  children: [
1915
- /* @__PURE__ */ jsx35(SelectScrollUpButton, {}),
1916
- /* @__PURE__ */ jsx35(
2000
+ /* @__PURE__ */ jsx36(SelectScrollUpButton, {}),
2001
+ /* @__PURE__ */ jsx36(
1917
2002
  SelectPrimitive.Viewport,
1918
2003
  {
1919
2004
  className: cn(
@@ -1923,7 +2008,7 @@ function SelectContent({
1923
2008
  children
1924
2009
  }
1925
2010
  ),
1926
- /* @__PURE__ */ jsx35(SelectScrollDownButton, {})
2011
+ /* @__PURE__ */ jsx36(SelectScrollDownButton, {})
1927
2012
  ]
1928
2013
  }
1929
2014
  ) });
@@ -1933,7 +2018,7 @@ function SelectItem({
1933
2018
  children,
1934
2019
  ...props
1935
2020
  }) {
1936
- return /* @__PURE__ */ jsxs18(
2021
+ return /* @__PURE__ */ jsxs19(
1937
2022
  SelectPrimitive.Item,
1938
2023
  {
1939
2024
  "data-slot": "select-item",
@@ -1943,8 +2028,8 @@ function SelectItem({
1943
2028
  ),
1944
2029
  ...props,
1945
2030
  children: [
1946
- /* @__PURE__ */ jsx35("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx35(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx35(CheckIcon3, { className: "size-4" }) }) }),
1947
- /* @__PURE__ */ jsx35(SelectPrimitive.ItemText, { children })
2031
+ /* @__PURE__ */ jsx36("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx36(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx36(CheckIcon3, { className: "size-4" }) }) }),
2032
+ /* @__PURE__ */ jsx36(SelectPrimitive.ItemText, { children })
1948
2033
  ]
1949
2034
  }
1950
2035
  );
@@ -1953,7 +2038,7 @@ function SelectScrollUpButton({
1953
2038
  className,
1954
2039
  ...props
1955
2040
  }) {
1956
- return /* @__PURE__ */ jsx35(
2041
+ return /* @__PURE__ */ jsx36(
1957
2042
  SelectPrimitive.ScrollUpButton,
1958
2043
  {
1959
2044
  "data-slot": "select-scroll-up-button",
@@ -1962,7 +2047,7 @@ function SelectScrollUpButton({
1962
2047
  className
1963
2048
  ),
1964
2049
  ...props,
1965
- children: /* @__PURE__ */ jsx35(ChevronUpIcon, { className: "size-4" })
2050
+ children: /* @__PURE__ */ jsx36(ChevronUpIcon, { className: "size-4" })
1966
2051
  }
1967
2052
  );
1968
2053
  }
@@ -1970,7 +2055,7 @@ function SelectScrollDownButton({
1970
2055
  className,
1971
2056
  ...props
1972
2057
  }) {
1973
- return /* @__PURE__ */ jsx35(
2058
+ return /* @__PURE__ */ jsx36(
1974
2059
  SelectPrimitive.ScrollDownButton,
1975
2060
  {
1976
2061
  "data-slot": "select-scroll-down-button",
@@ -1979,29 +2064,29 @@ function SelectScrollDownButton({
1979
2064
  className
1980
2065
  ),
1981
2066
  ...props,
1982
- children: /* @__PURE__ */ jsx35(ChevronDownIcon, { className: "size-4" })
2067
+ children: /* @__PURE__ */ jsx36(ChevronDownIcon, { className: "size-4" })
1983
2068
  }
1984
2069
  );
1985
2070
  }
1986
2071
 
1987
2072
  // src/components/Inputs/Dropdown/LazyDropdown.tsx
1988
- import { useState as useState8, useRef as useRef5, useEffect as useEffect15, useMemo as useMemo4 } from "react";
2073
+ import { useState as useState9, useRef as useRef6, useEffect as useEffect16, useMemo as useMemo4 } from "react";
1989
2074
  import { XSquareIcon } from "lucide-react";
1990
2075
 
1991
2076
  // src/hooks/useLazyDropdown.ts
1992
- import { useState as useState7, useEffect as useEffect14, useRef as useRef4, useCallback as useCallback2 } from "react";
2077
+ import { useState as useState8, useEffect as useEffect15, useRef as useRef5, useCallback as useCallback2 } from "react";
1993
2078
  import axios2 from "axios";
1994
2079
  function useLazyDropdown(config) {
1995
- const [options, setOptions] = useState7([]);
1996
- const [page, setPage] = useState7(1);
1997
- const [hasMore, setHasMore] = useState7(true);
1998
- const [loading, setLoading] = useState7(false);
1999
- const [searchTerm, setSearchTerm] = useState7("");
2000
- const debounceTimer = useRef4(null);
2001
- const allDataRef = useRef4([]);
2002
- const configRef = useRef4(config);
2080
+ const [options, setOptions] = useState8([]);
2081
+ const [page, setPage] = useState8(1);
2082
+ const [hasMore, setHasMore] = useState8(true);
2083
+ const [loading, setLoading] = useState8(false);
2084
+ const [searchTerm, setSearchTerm] = useState8("");
2085
+ const debounceTimer = useRef5(null);
2086
+ const allDataRef = useRef5([]);
2087
+ const configRef = useRef5(config);
2003
2088
  const PAGE_SIZE = config.pageSize || 10;
2004
- useEffect14(() => {
2089
+ useEffect15(() => {
2005
2090
  setOptions([]);
2006
2091
  setPage(1);
2007
2092
  setHasMore(true);
@@ -2014,7 +2099,7 @@ function useLazyDropdown(config) {
2014
2099
  return true;
2015
2100
  });
2016
2101
  };
2017
- useEffect14(() => {
2102
+ useEffect15(() => {
2018
2103
  configRef.current = config;
2019
2104
  }, [config]);
2020
2105
  function getValueByPath2(obj, path) {
@@ -2176,7 +2261,7 @@ function useLazyDropdown(config) {
2176
2261
  setLoading(false);
2177
2262
  }
2178
2263
  };
2179
- useEffect14(() => {
2264
+ useEffect15(() => {
2180
2265
  const cfg = configRef.current;
2181
2266
  if (!cfg.enabled || !cfg.value || cfg.dataSource !== "api" || !cfg.apiUrl) return;
2182
2267
  if (cfg.isMultiSelect) {
@@ -2205,12 +2290,12 @@ function useLazyDropdown(config) {
2205
2290
  setSearchTerm("");
2206
2291
  setPage(1);
2207
2292
  }, []);
2208
- useEffect14(() => {
2293
+ useEffect15(() => {
2209
2294
  if (config.initialData?.length) {
2210
2295
  allDataRef.current = config.initialData;
2211
2296
  }
2212
2297
  }, [config.initialData]);
2213
- useEffect14(() => {
2298
+ useEffect15(() => {
2214
2299
  if (config.fetchOnMount) loadPage(1, "");
2215
2300
  return () => {
2216
2301
  if (debounceTimer.current) clearTimeout(debounceTimer.current);
@@ -2257,7 +2342,7 @@ function useLazyDropdown(config) {
2257
2342
  }
2258
2343
 
2259
2344
  // src/components/Inputs/Dropdown/LazyDropdown.tsx
2260
- import { Fragment as Fragment11, jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
2345
+ import { Fragment as Fragment11, jsx as jsx37, jsxs as jsxs20 } from "react/jsx-runtime";
2261
2346
  function LazySelectDropdown({
2262
2347
  options = [],
2263
2348
  value,
@@ -2278,12 +2363,12 @@ function LazySelectDropdown({
2278
2363
  enforceStrictQueryParams = false,
2279
2364
  ...props
2280
2365
  }) {
2281
- const [isOpen, setIsOpen] = useState8(false);
2282
- const [searchTerm, setSearchTerm] = useState8("");
2283
- const [highlightedIndex, setHighlightedIndex] = useState8(-1);
2284
- const dropdownRef = useRef5(null);
2285
- const popupRef = useRef5(null);
2286
- const observerTarget = useRef5(null);
2366
+ const [isOpen, setIsOpen] = useState9(false);
2367
+ const [searchTerm, setSearchTerm] = useState9("");
2368
+ const [highlightedIndex, setHighlightedIndex] = useState9(-1);
2369
+ const dropdownRef = useRef6(null);
2370
+ const popupRef = useRef6(null);
2371
+ const observerTarget = useRef6(null);
2287
2372
  const {
2288
2373
  options: lazyOptions,
2289
2374
  loading,
@@ -2306,14 +2391,14 @@ function LazySelectDropdown({
2306
2391
  enforceStrictQueryParams
2307
2392
  });
2308
2393
  const selectedOption = useMemo4(() => lazyOptions.find((opt) => opt.value === value), [lazyOptions, value]);
2309
- useEffect15(() => {
2394
+ useEffect16(() => {
2310
2395
  if (!isOpen) {
2311
2396
  setHighlightedIndex(-1);
2312
2397
  } else if (lazyOptions.length > 0 && highlightedIndex === -1) {
2313
2398
  setHighlightedIndex(0);
2314
2399
  }
2315
2400
  }, [isOpen, lazyOptions.length, highlightedIndex]);
2316
- useEffect15(() => {
2401
+ useEffect16(() => {
2317
2402
  const handleOutside = (e) => {
2318
2403
  const target = e.target;
2319
2404
  if (dropdownRef.current && !dropdownRef.current.contains(target) && (!popupRef.current || !popupRef.current.contains(target))) {
@@ -2329,7 +2414,7 @@ function LazySelectDropdown({
2329
2414
  document.removeEventListener("focusin", handleOutside);
2330
2415
  };
2331
2416
  }, []);
2332
- useEffect15(() => {
2417
+ useEffect16(() => {
2333
2418
  if (!isOpen || !hasMore || loading) return;
2334
2419
  const observer = new IntersectionObserver(
2335
2420
  (entries) => {
@@ -2420,8 +2505,8 @@ function LazySelectDropdown({
2420
2505
  break;
2421
2506
  }
2422
2507
  };
2423
- return /* @__PURE__ */ jsxs19("div", { ref: dropdownRef, className: "relative w-full", children: [
2424
- /* @__PURE__ */ jsx36(
2508
+ return /* @__PURE__ */ jsxs20("div", { ref: dropdownRef, className: "relative w-full", children: [
2509
+ /* @__PURE__ */ jsx37(
2425
2510
  "input",
2426
2511
  {
2427
2512
  type: "text",
@@ -2443,18 +2528,18 @@ function LazySelectDropdown({
2443
2528
  autoComplete: "off"
2444
2529
  }
2445
2530
  ),
2446
- selectedOption && !disabled && !readOnly && /* @__PURE__ */ jsx36(
2531
+ selectedOption && !disabled && !readOnly && /* @__PURE__ */ jsx37(
2447
2532
  "button",
2448
2533
  {
2449
2534
  type: "button",
2450
2535
  "aria-label": "Clear selection",
2451
2536
  onClick: handleRemoveSelection,
2452
2537
  className: "absolute right-2 top-1/2 -translate-y-1/2 h-5 w-5 flex items-center justify-center rounded hover:bg-gray-200 text-gray-500 focus:outline-none",
2453
- children: /* @__PURE__ */ jsx36(XSquareIcon, { className: "h-5 w-5 pointer-events-none" })
2538
+ children: /* @__PURE__ */ jsx37(XSquareIcon, { className: "h-5 w-5 pointer-events-none" })
2454
2539
  }
2455
2540
  ),
2456
- errorMessage && /* @__PURE__ */ jsx36("p", { className: "mt-1 text-xs text-red-500", children: errorMessage }),
2457
- isOpen && !disabled && /* @__PURE__ */ jsx36(Portal_default, { children: /* @__PURE__ */ jsx36(
2541
+ errorMessage && /* @__PURE__ */ jsx37("p", { className: "mt-1 text-xs text-red-500", children: errorMessage }),
2542
+ isOpen && !disabled && /* @__PURE__ */ jsx37(Portal_default, { children: /* @__PURE__ */ jsx37(
2458
2543
  "div",
2459
2544
  {
2460
2545
  ref: popupRef,
@@ -2466,14 +2551,14 @@ function LazySelectDropdown({
2466
2551
  top: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().bottom + window.scrollY : 0,
2467
2552
  left: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().left + window.scrollX : 0
2468
2553
  },
2469
- children: props.loading && !loading ? /* @__PURE__ */ jsxs19("div", { className: "px-3 py-4 text-center text-gray-500 flex items-center justify-center gap-2 text-sm", children: [
2470
- /* @__PURE__ */ jsx36("div", { className: "animate-spin w-4 h-4 border-2 border-gray-300 border-t-blue-500 rounded-full" }),
2554
+ children: props.loading && !loading ? /* @__PURE__ */ jsxs20("div", { className: "px-3 py-4 text-center text-gray-500 flex items-center justify-center gap-2 text-sm", children: [
2555
+ /* @__PURE__ */ jsx37("div", { className: "animate-spin w-4 h-4 border-2 border-gray-300 border-t-blue-500 rounded-full" }),
2471
2556
  "Loading..."
2472
- ] }) : /* @__PURE__ */ jsx36(Fragment11, { children: loading && lazyOptions.length === 0 ? /* @__PURE__ */ jsxs19("div", { className: "px-3 py-4 text-center text-gray-500 flex items-center justify-center gap-2 text-sm", children: [
2473
- /* @__PURE__ */ jsx36("div", { className: "animate-spin w-4 h-4 border-2 border-gray-300 border-t-blue-500 rounded-full" }),
2557
+ ] }) : /* @__PURE__ */ jsx37(Fragment11, { children: loading && lazyOptions.length === 0 ? /* @__PURE__ */ jsxs20("div", { className: "px-3 py-4 text-center text-gray-500 flex items-center justify-center gap-2 text-sm", children: [
2558
+ /* @__PURE__ */ jsx37("div", { className: "animate-spin w-4 h-4 border-2 border-gray-300 border-t-blue-500 rounded-full" }),
2474
2559
  "Loading..."
2475
- ] }) : lazyOptions.length > 0 ? /* @__PURE__ */ jsxs19(Fragment11, { children: [
2476
- lazyOptions.map((option, index) => /* @__PURE__ */ jsx36(
2560
+ ] }) : lazyOptions.length > 0 ? /* @__PURE__ */ jsxs20(Fragment11, { children: [
2561
+ lazyOptions.map((option, index) => /* @__PURE__ */ jsx37(
2477
2562
  "div",
2478
2563
  {
2479
2564
  tabIndex: 0,
@@ -2492,20 +2577,20 @@ function LazySelectDropdown({
2492
2577
  },
2493
2578
  `${option.value}-${index}`
2494
2579
  )),
2495
- hasMore && /* @__PURE__ */ jsx36(
2580
+ hasMore && /* @__PURE__ */ jsx37(
2496
2581
  "div",
2497
2582
  {
2498
2583
  ref: observerTarget,
2499
2584
  className: "px-3 py-2 text-center text-gray-400 text-sm border-t",
2500
- children: loading ? /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-center gap-2 text-sm", children: [
2501
- /* @__PURE__ */ jsx36("div", { className: "animate-spin w-3 h-3 border-2 border-gray-300 border-t-blue-500 rounded-full" }),
2585
+ children: loading ? /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-center gap-2 text-sm", children: [
2586
+ /* @__PURE__ */ jsx37("div", { className: "animate-spin w-3 h-3 border-2 border-gray-300 border-t-blue-500 rounded-full" }),
2502
2587
  "Loading more..."
2503
2588
  ] }) : "Scroll for more..."
2504
2589
  }
2505
2590
  )
2506
- ] }) : /* @__PURE__ */ jsxs19("div", { className: "px-3 py-4 text-sm text-center text-gray-500", children: [
2591
+ ] }) : /* @__PURE__ */ jsxs20("div", { className: "px-3 py-4 text-sm text-center text-gray-500", children: [
2507
2592
  searchTerm ? `No results for "${searchTerm}"` : "No options available",
2508
- enableAddNewOption && searchTerm && /* @__PURE__ */ jsx36(
2593
+ enableAddNewOption && searchTerm && /* @__PURE__ */ jsx37(
2509
2594
  "div",
2510
2595
  {
2511
2596
  onClick: () => handleAddNewOption(searchTerm),
@@ -2521,14 +2606,14 @@ function LazySelectDropdown({
2521
2606
  var LazyDropdown_default = LazySelectDropdown;
2522
2607
 
2523
2608
  // src/components/Inputs/Dropdown/Dropdown.tsx
2524
- import { Fragment as Fragment12, jsx as jsx37, jsxs as jsxs20 } from "react/jsx-runtime";
2609
+ import { Fragment as Fragment12, jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
2525
2610
  var Dropdown = ({ className, style, ...props }) => {
2526
2611
  const list = Array.isArray(props?.data) ? props.data : [];
2527
2612
  const placeholder = props.placeholder ? props.placeholder : "Select an option";
2528
2613
  const isEditable = props.isEditable ?? true;
2529
2614
  const isDisabled = props.isDisabled ?? false;
2530
2615
  const isReadonly = props.isReadonly ?? false;
2531
- useEffect16(() => {
2616
+ useEffect17(() => {
2532
2617
  if (props.value !== void 0) {
2533
2618
  handleChange(props.value);
2534
2619
  }
@@ -2543,7 +2628,7 @@ var Dropdown = ({ className, style, ...props }) => {
2543
2628
  label: item[dataLabel]
2544
2629
  }));
2545
2630
  if (props.lazyLoad) {
2546
- return /* @__PURE__ */ jsx37(
2631
+ return /* @__PURE__ */ jsx38(
2547
2632
  LazyDropdown_default,
2548
2633
  {
2549
2634
  ...props,
@@ -2560,9 +2645,9 @@ var Dropdown = ({ className, style, ...props }) => {
2560
2645
  }
2561
2646
  );
2562
2647
  }
2563
- return /* @__PURE__ */ jsxs20(Fragment12, { children: [
2564
- /* @__PURE__ */ jsxs20(Select, { name: props.name, value: props.value || "", onValueChange: handleChange, disabled: isDisabled || !isEditable, children: [
2565
- /* @__PURE__ */ jsx37(
2648
+ return /* @__PURE__ */ jsxs21(Fragment12, { children: [
2649
+ /* @__PURE__ */ jsxs21(Select, { name: props.name, value: props.value || "", onValueChange: handleChange, disabled: isDisabled || !isEditable, children: [
2650
+ /* @__PURE__ */ jsx38(
2566
2651
  SelectTrigger,
2567
2652
  {
2568
2653
  id: props.name || "select-field",
@@ -2572,31 +2657,31 @@ var Dropdown = ({ className, style, ...props }) => {
2572
2657
  borderColor: props.errorMessage ? "#f87171" : style?.borderColor
2573
2658
  },
2574
2659
  "aria-readonly": isReadonly,
2575
- children: /* @__PURE__ */ jsx37(SelectValue, { placeholder })
2660
+ children: /* @__PURE__ */ jsx38(SelectValue, { placeholder })
2576
2661
  }
2577
2662
  ),
2578
- /* @__PURE__ */ jsxs20(SelectContent, { children: [
2579
- props.dataLoading && /* @__PURE__ */ jsx37(SelectItem, { value: "none", disabled: true, children: "Loading..." }),
2580
- !props.dataLoading && options.length === 0 && /* @__PURE__ */ jsx37(SelectItem, { value: "none", disabled: true, children: "No options" }),
2581
- options.map((opt) => /* @__PURE__ */ jsx37(SelectItem, { value: opt.value, children: opt.label }, opt.value))
2663
+ /* @__PURE__ */ jsxs21(SelectContent, { children: [
2664
+ props.dataLoading && /* @__PURE__ */ jsx38(SelectItem, { value: "none", disabled: true, children: "Loading..." }),
2665
+ !props.dataLoading && options.length === 0 && /* @__PURE__ */ jsx38(SelectItem, { value: "none", disabled: true, children: "No options" }),
2666
+ options.map((opt) => /* @__PURE__ */ jsx38(SelectItem, { value: opt.value, children: opt.label }, opt.value))
2582
2667
  ] })
2583
2668
  ] }),
2584
- props.errorMessage && /* @__PURE__ */ jsx37("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2669
+ props.errorMessage && /* @__PURE__ */ jsx38("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2585
2670
  ] });
2586
2671
  };
2587
2672
  var Dropdown_default = Dropdown;
2588
2673
 
2589
2674
  // src/components/Inputs/SwitchToggle/SwitchToggle.tsx
2590
- import { useEffect as useEffect17 } from "react";
2675
+ import { useEffect as useEffect18 } from "react";
2591
2676
 
2592
2677
  // src/components/ui/switch.tsx
2593
2678
  import * as SwitchPrimitive from "@radix-ui/react-switch";
2594
- import { jsx as jsx38 } from "react/jsx-runtime";
2679
+ import { jsx as jsx39 } from "react/jsx-runtime";
2595
2680
  function Switch({
2596
2681
  className,
2597
2682
  ...props
2598
2683
  }) {
2599
- return /* @__PURE__ */ jsx38(
2684
+ return /* @__PURE__ */ jsx39(
2600
2685
  SwitchPrimitive.Root,
2601
2686
  {
2602
2687
  "data-slot": "switch",
@@ -2605,7 +2690,7 @@ function Switch({
2605
2690
  className
2606
2691
  ),
2607
2692
  ...props,
2608
- children: /* @__PURE__ */ jsx38(
2693
+ children: /* @__PURE__ */ jsx39(
2609
2694
  SwitchPrimitive.Thumb,
2610
2695
  {
2611
2696
  "data-slot": "switch-thumb",
@@ -2619,11 +2704,11 @@ function Switch({
2619
2704
  }
2620
2705
 
2621
2706
  // src/components/Inputs/SwitchToggle/SwitchToggle.tsx
2622
- import { Fragment as Fragment13, jsx as jsx39, jsxs as jsxs21 } from "react/jsx-runtime";
2707
+ import { Fragment as Fragment13, jsx as jsx40, jsxs as jsxs22 } from "react/jsx-runtime";
2623
2708
  var SwitchToggle = ({ className, style, ...props }) => {
2624
2709
  const isEditable = props.isEditable ?? true;
2625
2710
  const isDisabled = props.isDisabled ?? false;
2626
- useEffect17(() => {
2711
+ useEffect18(() => {
2627
2712
  if (props.value !== void 0) {
2628
2713
  handleChange?.(props.value);
2629
2714
  }
@@ -2631,9 +2716,9 @@ var SwitchToggle = ({ className, style, ...props }) => {
2631
2716
  const handleChange = (value) => {
2632
2717
  props.onChange?.(value, props?.name || "");
2633
2718
  };
2634
- return /* @__PURE__ */ jsxs21(Fragment13, { children: [
2635
- /* @__PURE__ */ jsx39("div", { className, style, children: /* @__PURE__ */ jsxs21("div", { className: "flex items-center space-x-2 mb-2", children: [
2636
- /* @__PURE__ */ jsx39(
2719
+ return /* @__PURE__ */ jsxs22(Fragment13, { children: [
2720
+ /* @__PURE__ */ jsx40("div", { className, style, children: /* @__PURE__ */ jsxs22("div", { className: "flex items-center space-x-2 mb-2", children: [
2721
+ /* @__PURE__ */ jsx40(
2637
2722
  Switch,
2638
2723
  {
2639
2724
  id: props.name || "switch",
@@ -2642,18 +2727,18 @@ var SwitchToggle = ({ className, style, ...props }) => {
2642
2727
  disabled: isDisabled || !isEditable
2643
2728
  }
2644
2729
  ),
2645
- /* @__PURE__ */ jsx39(Label2, { htmlFor: props.name || "switch", children: props.text })
2730
+ /* @__PURE__ */ jsx40(Label2, { htmlFor: props.name || "switch", children: props.text })
2646
2731
  ] }) }),
2647
- props.errorMessage && /* @__PURE__ */ jsx39("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2732
+ props.errorMessage && /* @__PURE__ */ jsx40("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2648
2733
  ] });
2649
2734
  };
2650
2735
  var SwitchToggle_default = SwitchToggle;
2651
2736
 
2652
2737
  // src/components/Inputs/PhoneInput/PhoneInput.tsx
2653
- import { useEffect as useEffect18, useRef as useRef6 } from "react";
2738
+ import { useEffect as useEffect19, useRef as useRef7 } from "react";
2654
2739
  import { PhoneInput as PhoneInputField } from "react-international-phone";
2655
2740
  import "react-international-phone/style.css";
2656
- import { Fragment as Fragment14, jsx as jsx40, jsxs as jsxs22 } from "react/jsx-runtime";
2741
+ import { Fragment as Fragment14, jsx as jsx41, jsxs as jsxs23 } from "react/jsx-runtime";
2657
2742
  var ensureDialcode = (val) => {
2658
2743
  if (!val) return "";
2659
2744
  const trimmed = val.trim();
@@ -2662,11 +2747,11 @@ var ensureDialcode = (val) => {
2662
2747
  return `+91${local}`;
2663
2748
  };
2664
2749
  var PhoneInput = ({ className, style, ...props }) => {
2665
- const ref = useRef6(null);
2750
+ const ref = useRef7(null);
2666
2751
  const placeholder = props.placeholder ?? "Enter phone number";
2667
2752
  const isEditable = props.isEditable ?? true;
2668
2753
  const isDisabled = props.isDisabled ?? false;
2669
- useEffect18(() => {
2754
+ useEffect19(() => {
2670
2755
  if (props.value !== void 0) {
2671
2756
  handleChange?.(ensureDialcode(props.value), ref.current?.state);
2672
2757
  }
@@ -2681,8 +2766,8 @@ var PhoneInput = ({ className, style, ...props }) => {
2681
2766
  props.onChange?.(event, props.name || "");
2682
2767
  props.getPhoneState?.(meta);
2683
2768
  };
2684
- return /* @__PURE__ */ jsxs22(Fragment14, { children: [
2685
- /* @__PURE__ */ jsx40(
2769
+ return /* @__PURE__ */ jsxs23(Fragment14, { children: [
2770
+ /* @__PURE__ */ jsx41(
2686
2771
  PhoneInputField,
2687
2772
  {
2688
2773
  ref,
@@ -2707,21 +2792,21 @@ var PhoneInput = ({ className, style, ...props }) => {
2707
2792
  disabled: isDisabled || !isEditable
2708
2793
  }
2709
2794
  ),
2710
- props.errorMessage && /* @__PURE__ */ jsx40("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2795
+ props.errorMessage && /* @__PURE__ */ jsx41("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2711
2796
  ] });
2712
2797
  };
2713
2798
  var PhoneInput_default = PhoneInput;
2714
2799
 
2715
2800
  // src/components/Inputs/SearchInput/SearchInput.tsx
2716
- import { useEffect as useEffect19 } from "react";
2717
- import { Fragment as Fragment15, jsx as jsx41, jsxs as jsxs23 } from "react/jsx-runtime";
2801
+ import { useEffect as useEffect20 } from "react";
2802
+ import { Fragment as Fragment15, jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
2718
2803
  var SearchInput = ({ className, style, ...props }) => {
2719
2804
  const placeholder = props.placeholder ?? "Placeholder text";
2720
2805
  const isEditable = props.isEditable ?? true;
2721
2806
  const isDisabled = props.isDisabled ?? false;
2722
2807
  const isReadonly = props.isReadonly ?? false;
2723
2808
  const isAutocomplete = props.isAutocomplete ?? false;
2724
- useEffect19(() => {
2809
+ useEffect20(() => {
2725
2810
  if (props.value !== void 0) {
2726
2811
  const e = { target: { value: props.value }, type: "change" };
2727
2812
  handleChange?.(e);
@@ -2737,8 +2822,8 @@ var SearchInput = ({ className, style, ...props }) => {
2737
2822
  if (value === null || value === void 0) return "";
2738
2823
  return value;
2739
2824
  };
2740
- return /* @__PURE__ */ jsxs23(Fragment15, { children: [
2741
- /* @__PURE__ */ jsx41("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx41(
2825
+ return /* @__PURE__ */ jsxs24(Fragment15, { children: [
2826
+ /* @__PURE__ */ jsx42("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx42(
2742
2827
  Input,
2743
2828
  {
2744
2829
  type: props.inputType || "search",
@@ -2757,17 +2842,17 @@ var SearchInput = ({ className, style, ...props }) => {
2757
2842
  readOnly: isReadonly
2758
2843
  }
2759
2844
  ) }),
2760
- props.errorMessage && /* @__PURE__ */ jsx41("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2845
+ props.errorMessage && /* @__PURE__ */ jsx42("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2761
2846
  ] });
2762
2847
  };
2763
2848
  var SearchInput_default = SearchInput;
2764
2849
 
2765
2850
  // src/components/Inputs/FileInput/FileInput.tsx
2766
- import { useEffect as useEffect20 } from "react";
2767
- import { jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
2851
+ import { useEffect as useEffect21 } from "react";
2852
+ import { jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
2768
2853
  var FileInput = ({ className, style, ...props }) => {
2769
2854
  const placeholder = props.placeholder ?? "Placeholder text";
2770
- useEffect20(() => {
2855
+ useEffect21(() => {
2771
2856
  if (props.value !== void 0) {
2772
2857
  const e = { target: { value: props.value }, type: "change" };
2773
2858
  handleChange?.(e);
@@ -2783,8 +2868,8 @@ var FileInput = ({ className, style, ...props }) => {
2783
2868
  if (value === null || value === void 0) return "";
2784
2869
  return value;
2785
2870
  };
2786
- return /* @__PURE__ */ jsxs24("div", { className: "d-flex items-center relative align-middle", children: [
2787
- /* @__PURE__ */ jsx42(
2871
+ return /* @__PURE__ */ jsxs25("div", { className: "d-flex items-center relative align-middle", children: [
2872
+ /* @__PURE__ */ jsx43(
2788
2873
  Input,
2789
2874
  {
2790
2875
  type: props.inputType || "file",
@@ -2801,25 +2886,25 @@ var FileInput = ({ className, style, ...props }) => {
2801
2886
  onChange: handleChange
2802
2887
  }
2803
2888
  ),
2804
- props.errorMessage && /* @__PURE__ */ jsx42("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2889
+ props.errorMessage && /* @__PURE__ */ jsx43("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2805
2890
  ] });
2806
2891
  };
2807
2892
  var FileInput_default = FileInput;
2808
2893
 
2809
2894
  // src/components/Inputs/DatePicker/DatePicker.tsx
2810
- import * as React8 from "react";
2895
+ import * as React9 from "react";
2811
2896
  import { format } from "date-fns";
2812
2897
  import { Calendar1Icon, XSquareIcon as XSquareIcon2 } from "lucide-react";
2813
2898
 
2814
2899
  // src/components/ui/calendar.tsx
2815
- import * as React7 from "react";
2900
+ import * as React8 from "react";
2816
2901
  import {
2817
2902
  ChevronDownIcon as ChevronDownIcon2,
2818
2903
  ChevronLeftIcon,
2819
2904
  ChevronRightIcon as ChevronRightIcon2
2820
2905
  } from "lucide-react";
2821
2906
  import { DayPicker, getDefaultClassNames } from "react-day-picker";
2822
- import { jsx as jsx43 } from "react/jsx-runtime";
2907
+ import { jsx as jsx44 } from "react/jsx-runtime";
2823
2908
  function Calendar({
2824
2909
  className,
2825
2910
  classNames,
@@ -2831,7 +2916,7 @@ function Calendar({
2831
2916
  ...props
2832
2917
  }) {
2833
2918
  const defaultClassNames = getDefaultClassNames();
2834
- return /* @__PURE__ */ jsx43(
2919
+ return /* @__PURE__ */ jsx44(
2835
2920
  DayPicker,
2836
2921
  {
2837
2922
  showOutsideDays,
@@ -2930,7 +3015,7 @@ function Calendar({
2930
3015
  },
2931
3016
  components: {
2932
3017
  Root: ({ className: className2, rootRef, ...props2 }) => {
2933
- return /* @__PURE__ */ jsx43(
3018
+ return /* @__PURE__ */ jsx44(
2934
3019
  "div",
2935
3020
  {
2936
3021
  "data-slot": "calendar",
@@ -2942,10 +3027,10 @@ function Calendar({
2942
3027
  },
2943
3028
  Chevron: ({ className: className2, orientation, ...props2 }) => {
2944
3029
  if (orientation === "left") {
2945
- return /* @__PURE__ */ jsx43(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
3030
+ return /* @__PURE__ */ jsx44(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
2946
3031
  }
2947
3032
  if (orientation === "right") {
2948
- return /* @__PURE__ */ jsx43(
3033
+ return /* @__PURE__ */ jsx44(
2949
3034
  ChevronRightIcon2,
2950
3035
  {
2951
3036
  className: cn("size-4", className2),
@@ -2953,11 +3038,11 @@ function Calendar({
2953
3038
  }
2954
3039
  );
2955
3040
  }
2956
- return /* @__PURE__ */ jsx43(ChevronDownIcon2, { className: cn("size-4", className2), ...props2 });
3041
+ return /* @__PURE__ */ jsx44(ChevronDownIcon2, { className: cn("size-4", className2), ...props2 });
2957
3042
  },
2958
3043
  DayButton: CalendarDayButton,
2959
3044
  WeekNumber: ({ children, ...props2 }) => {
2960
- return /* @__PURE__ */ jsx43("td", { ...props2, children: /* @__PURE__ */ jsx43("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
3045
+ return /* @__PURE__ */ jsx44("td", { ...props2, children: /* @__PURE__ */ jsx44("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
2961
3046
  },
2962
3047
  ...components
2963
3048
  },
@@ -2972,11 +3057,11 @@ function CalendarDayButton({
2972
3057
  ...props
2973
3058
  }) {
2974
3059
  const defaultClassNames = getDefaultClassNames();
2975
- const ref = React7.useRef(null);
2976
- React7.useEffect(() => {
3060
+ const ref = React8.useRef(null);
3061
+ React8.useEffect(() => {
2977
3062
  if (modifiers.focused) ref.current?.focus();
2978
3063
  }, [modifiers.focused]);
2979
- return /* @__PURE__ */ jsx43(
3064
+ return /* @__PURE__ */ jsx44(
2980
3065
  Button,
2981
3066
  {
2982
3067
  ref,
@@ -2999,16 +3084,16 @@ function CalendarDayButton({
2999
3084
 
3000
3085
  // src/components/ui/popover.tsx
3001
3086
  import * as PopoverPrimitive from "@radix-ui/react-popover";
3002
- import { jsx as jsx44 } from "react/jsx-runtime";
3087
+ import { jsx as jsx45 } from "react/jsx-runtime";
3003
3088
  function Popover({
3004
3089
  ...props
3005
3090
  }) {
3006
- return /* @__PURE__ */ jsx44(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
3091
+ return /* @__PURE__ */ jsx45(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
3007
3092
  }
3008
3093
  function PopoverTrigger({
3009
3094
  ...props
3010
3095
  }) {
3011
- return /* @__PURE__ */ jsx44(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
3096
+ return /* @__PURE__ */ jsx45(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
3012
3097
  }
3013
3098
  function PopoverContent({
3014
3099
  className,
@@ -3016,7 +3101,7 @@ function PopoverContent({
3016
3101
  sideOffset = 4,
3017
3102
  ...props
3018
3103
  }) {
3019
- return /* @__PURE__ */ jsx44(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx44(
3104
+ return /* @__PURE__ */ jsx45(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx45(
3020
3105
  PopoverPrimitive.Content,
3021
3106
  {
3022
3107
  "data-slot": "popover-content",
@@ -3032,7 +3117,7 @@ function PopoverContent({
3032
3117
  }
3033
3118
 
3034
3119
  // src/components/Inputs/DatePicker/DatePicker.tsx
3035
- import { Fragment as Fragment16, jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
3120
+ import { Fragment as Fragment16, jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
3036
3121
  function resolveDate(option, customOption) {
3037
3122
  if (!option) return void 0;
3038
3123
  switch (option) {
@@ -3099,7 +3184,7 @@ function DateTimePicker({
3099
3184
  mode = "date",
3100
3185
  ...props
3101
3186
  }) {
3102
- const [open, setOpen] = React8.useState(false);
3187
+ const [open, setOpen] = React9.useState(false);
3103
3188
  const placeholderMap = {
3104
3189
  date: "Select date",
3105
3190
  datetime: "Select date & time",
@@ -3118,7 +3203,7 @@ function DateTimePicker({
3118
3203
  const isAutocomplete = props.isAutocomplete ?? false;
3119
3204
  const minDate = resolveDate(minimumDate, customMinimumDate);
3120
3205
  const maxDate = resolveDate(maximumDate, customMaximumDate);
3121
- const [date, setDate] = React8.useState(() => {
3206
+ const [date, setDate] = React9.useState(() => {
3122
3207
  if (props.value) {
3123
3208
  const d = new Date(props.value);
3124
3209
  if (!isNaN(d.getTime())) return d;
@@ -3127,15 +3212,15 @@ function DateTimePicker({
3127
3212
  });
3128
3213
  const initialHours = date ? date.getHours() : 0;
3129
3214
  const initialMinutes = date ? date.getMinutes() : 0;
3130
- const [hours, setHours] = React8.useState(initialHours);
3131
- const [minutes, setMinutes] = React8.useState(initialMinutes);
3132
- const [amPm, setAmPm] = React8.useState("AM");
3133
- const displayHours = React8.useMemo(() => {
3215
+ const [hours, setHours] = React9.useState(initialHours);
3216
+ const [minutes, setMinutes] = React9.useState(initialMinutes);
3217
+ const [amPm, setAmPm] = React9.useState("AM");
3218
+ const displayHours = React9.useMemo(() => {
3134
3219
  if (hours === 0) return 12;
3135
3220
  if (hours > 12) return hours - 12;
3136
3221
  return hours;
3137
3222
  }, [hours]);
3138
- React8.useEffect(() => {
3223
+ React9.useEffect(() => {
3139
3224
  setAmPm(hours >= 12 ? "PM" : "AM");
3140
3225
  }, [hours]);
3141
3226
  const emitChange = (nextDate) => {
@@ -3159,7 +3244,7 @@ function DateTimePicker({
3159
3244
  };
3160
3245
  props.onChange(event, props.name || "");
3161
3246
  };
3162
- React8.useEffect(() => {
3247
+ React9.useEffect(() => {
3163
3248
  if (!props.value) {
3164
3249
  const defaultDate = resolveDefaultDate(defaultDateValue, customDefaultDate);
3165
3250
  setDate(defaultDate);
@@ -3181,8 +3266,8 @@ function DateTimePicker({
3181
3266
  setMinutes(d.getMinutes());
3182
3267
  }
3183
3268
  }, [props.value, defaultDateValue, customDefaultDate]);
3184
- const [year, setYear] = React8.useState(date ? date.getFullYear() : (/* @__PURE__ */ new Date()).getFullYear());
3185
- React8.useEffect(() => {
3269
+ const [year, setYear] = React9.useState(date ? date.getFullYear() : (/* @__PURE__ */ new Date()).getFullYear());
3270
+ React9.useEffect(() => {
3186
3271
  if (!date) return;
3187
3272
  const newDate = new Date(date);
3188
3273
  newDate.setFullYear(year);
@@ -3266,7 +3351,7 @@ function DateTimePicker({
3266
3351
  for (let y = currentYear - 90; y <= currentYear; y++) {
3267
3352
  yearOptions.push(y);
3268
3353
  }
3269
- const displayValue = React8.useMemo(() => {
3354
+ const displayValue = React9.useMemo(() => {
3270
3355
  if (!date) return "";
3271
3356
  try {
3272
3357
  if (mode === "date") return format(date, "dd-MM-yyyy");
@@ -3277,11 +3362,11 @@ function DateTimePicker({
3277
3362
  }
3278
3363
  }, [date, mode]);
3279
3364
  const isInputDisabled = isDisabled || !isEditable;
3280
- const [calendarMonthState, setCalendarMonthState] = React8.useState(() => {
3365
+ const [calendarMonthState, setCalendarMonthState] = React9.useState(() => {
3281
3366
  const currentMonth = (/* @__PURE__ */ new Date()).getMonth();
3282
3367
  return date ? new Date(date.getFullYear(), date.getMonth()) : new Date(year, currentMonth);
3283
3368
  });
3284
- React8.useEffect(() => {
3369
+ React9.useEffect(() => {
3285
3370
  setCalendarMonthState(new Date(year, calendarMonthState.getMonth()));
3286
3371
  }, [year]);
3287
3372
  const handleToday = () => {
@@ -3290,9 +3375,9 @@ function DateTimePicker({
3290
3375
  updateDateTime(selectedYearDate);
3291
3376
  setOpen(false);
3292
3377
  };
3293
- return /* @__PURE__ */ jsxs25("div", { className: "flex flex-col", children: [
3294
- /* @__PURE__ */ jsxs25(Popover, { open, onOpenChange: setOpen, children: [
3295
- /* @__PURE__ */ jsx45(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs25(
3378
+ return /* @__PURE__ */ jsxs26("div", { className: "flex flex-col", children: [
3379
+ /* @__PURE__ */ jsxs26(Popover, { open, onOpenChange: setOpen, children: [
3380
+ /* @__PURE__ */ jsx46(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs26(
3296
3381
  Button,
3297
3382
  {
3298
3383
  type: "button",
@@ -3309,9 +3394,9 @@ function DateTimePicker({
3309
3394
  },
3310
3395
  disabled: isInputDisabled,
3311
3396
  children: [
3312
- /* @__PURE__ */ jsx45(Calendar1Icon, { className: "absolute left-2 top-2" }),
3313
- /* @__PURE__ */ jsx45("span", { className: "ml-5", children: displayValue || placeholder }),
3314
- displayValue && /* @__PURE__ */ jsx45(
3397
+ /* @__PURE__ */ jsx46(Calendar1Icon, { className: "absolute left-2 top-2" }),
3398
+ /* @__PURE__ */ jsx46("span", { className: "ml-5", children: displayValue || placeholder }),
3399
+ displayValue && /* @__PURE__ */ jsx46(
3315
3400
  XSquareIcon2,
3316
3401
  {
3317
3402
  className: "absolute right-2 top-2 cursor-pointer",
@@ -3328,10 +3413,10 @@ function DateTimePicker({
3328
3413
  ]
3329
3414
  }
3330
3415
  ) }),
3331
- /* @__PURE__ */ jsx45(PopoverContent, { className: "w-auto text-sm p-2", align: "start", children: /* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-1", children: [
3332
- (mode === "date" || mode === "datetime") && /* @__PURE__ */ jsxs25(Fragment16, { children: [
3333
- /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between gap-1", children: [
3334
- /* @__PURE__ */ jsx45(
3416
+ /* @__PURE__ */ jsx46(PopoverContent, { className: "w-auto text-sm p-2", align: "start", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-1", children: [
3417
+ (mode === "date" || mode === "datetime") && /* @__PURE__ */ jsxs26(Fragment16, { children: [
3418
+ /* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between gap-1", children: [
3419
+ /* @__PURE__ */ jsx46(
3335
3420
  "label",
3336
3421
  {
3337
3422
  className: "text-xs text-blue-600 font-bold cursor-pointer",
@@ -3340,18 +3425,18 @@ function DateTimePicker({
3340
3425
  children: "Today"
3341
3426
  }
3342
3427
  ),
3343
- /* @__PURE__ */ jsx45(
3428
+ /* @__PURE__ */ jsx46(
3344
3429
  "select",
3345
3430
  {
3346
3431
  className: "h-8 rounded border bg-background px-2 text-xs",
3347
3432
  value: year,
3348
3433
  onChange: (e) => setYear(Number(e.target.value)),
3349
3434
  disabled: isInputDisabled || isReadonly,
3350
- children: yearOptions.map((y) => /* @__PURE__ */ jsx45("option", { value: y, children: y }, y))
3435
+ children: yearOptions.map((y) => /* @__PURE__ */ jsx46("option", { value: y, children: y }, y))
3351
3436
  }
3352
3437
  )
3353
3438
  ] }),
3354
- /* @__PURE__ */ jsx45("div", { className: "calendar-container", children: /* @__PURE__ */ jsx45(
3439
+ /* @__PURE__ */ jsx46("div", { className: "calendar-container", children: /* @__PURE__ */ jsx46(
3355
3440
  Calendar,
3356
3441
  {
3357
3442
  mode: "single",
@@ -3369,20 +3454,20 @@ function DateTimePicker({
3369
3454
  }
3370
3455
  ) })
3371
3456
  ] }),
3372
- (mode === "time" || mode === "datetime") && /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2 mt-0", children: [
3373
- /* @__PURE__ */ jsx45("label", { className: "text-xs text-muted-foreground", children: "Time" }),
3374
- /* @__PURE__ */ jsx45(
3457
+ (mode === "time" || mode === "datetime") && /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 mt-0", children: [
3458
+ /* @__PURE__ */ jsx46("label", { className: "text-xs text-muted-foreground", children: "Time" }),
3459
+ /* @__PURE__ */ jsx46(
3375
3460
  "select",
3376
3461
  {
3377
3462
  className: "h-8 rounded border bg-background px-2 text-xs",
3378
3463
  value: displayHours,
3379
3464
  onChange: handleHoursChange,
3380
3465
  disabled: isInputDisabled || isReadonly,
3381
- children: Array.from({ length: 12 }, (_, i) => i + 1).map((hour) => /* @__PURE__ */ jsx45("option", { value: hour, children: hour.toString().padStart(2, "0") }, hour))
3466
+ children: Array.from({ length: 12 }, (_, i) => i + 1).map((hour) => /* @__PURE__ */ jsx46("option", { value: hour, children: hour.toString().padStart(2, "0") }, hour))
3382
3467
  }
3383
3468
  ),
3384
- /* @__PURE__ */ jsx45("span", { className: "text-sm", children: ":" }),
3385
- /* @__PURE__ */ jsx45(
3469
+ /* @__PURE__ */ jsx46("span", { className: "text-sm", children: ":" }),
3470
+ /* @__PURE__ */ jsx46(
3386
3471
  "select",
3387
3472
  {
3388
3473
  className: "h-8 rounded border bg-background px-2 text-xs",
@@ -3391,11 +3476,11 @@ function DateTimePicker({
3391
3476
  disabled: isInputDisabled || isReadonly,
3392
3477
  children: Array.from({ length: 12 }).map((_, i) => {
3393
3478
  const val = i * 5;
3394
- return /* @__PURE__ */ jsx45("option", { value: val, children: val.toString().padStart(2, "0") }, val);
3479
+ return /* @__PURE__ */ jsx46("option", { value: val, children: val.toString().padStart(2, "0") }, val);
3395
3480
  })
3396
3481
  }
3397
3482
  ),
3398
- /* @__PURE__ */ jsxs25(
3483
+ /* @__PURE__ */ jsxs26(
3399
3484
  "select",
3400
3485
  {
3401
3486
  className: "h-8 rounded border bg-background px-2 text-xs",
@@ -3403,15 +3488,15 @@ function DateTimePicker({
3403
3488
  onChange: handleAmPmChange,
3404
3489
  disabled: isInputDisabled || isReadonly,
3405
3490
  children: [
3406
- /* @__PURE__ */ jsx45("option", { value: "AM", children: "AM" }),
3407
- /* @__PURE__ */ jsx45("option", { value: "PM", children: "PM" })
3491
+ /* @__PURE__ */ jsx46("option", { value: "AM", children: "AM" }),
3492
+ /* @__PURE__ */ jsx46("option", { value: "PM", children: "PM" })
3408
3493
  ]
3409
3494
  }
3410
3495
  )
3411
3496
  ] })
3412
3497
  ] }) })
3413
3498
  ] }),
3414
- /* @__PURE__ */ jsx45(
3499
+ /* @__PURE__ */ jsx46(
3415
3500
  Input,
3416
3501
  {
3417
3502
  type: "hidden",
@@ -3424,23 +3509,23 @@ function DateTimePicker({
3424
3509
  }
3425
3510
  }
3426
3511
  ),
3427
- props.errorMessage && /* @__PURE__ */ jsx45("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
3512
+ props.errorMessage && /* @__PURE__ */ jsx46("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
3428
3513
  ] });
3429
3514
  }
3430
3515
 
3431
3516
  // src/components/Inputs/DateRange/DateRange.tsx
3432
- import React9, { useEffect as useEffect23 } from "react";
3517
+ import React10, { useEffect as useEffect24 } from "react";
3433
3518
  import { addDays, format as format2 } from "date-fns";
3434
- import { Fragment as Fragment17, jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
3519
+ import { Fragment as Fragment17, jsx as jsx47, jsxs as jsxs27 } from "react/jsx-runtime";
3435
3520
  var DateRange = ({ className, style, ...props }) => {
3436
3521
  const isDateRange = (val) => !!val && val.from instanceof Date;
3437
- const [date, setDate] = React9.useState(
3522
+ const [date, setDate] = React10.useState(
3438
3523
  isDateRange(props.value) ? props.value : {
3439
3524
  from: /* @__PURE__ */ new Date(),
3440
3525
  to: addDays(/* @__PURE__ */ new Date(), 7)
3441
3526
  }
3442
3527
  );
3443
- useEffect23(() => {
3528
+ useEffect24(() => {
3444
3529
  if (props.value && isDateRange(props.value)) {
3445
3530
  handleChange?.(props.value);
3446
3531
  }
@@ -3451,9 +3536,9 @@ var DateRange = ({ className, style, ...props }) => {
3451
3536
  props.onChange?.(value, props?.name || "");
3452
3537
  }
3453
3538
  };
3454
- return /* @__PURE__ */ jsxs26(Fragment17, { children: [
3455
- /* @__PURE__ */ jsx46("div", { className, style, children: /* @__PURE__ */ jsxs26(Popover, { children: [
3456
- /* @__PURE__ */ jsx46(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx46(
3539
+ return /* @__PURE__ */ jsxs27(Fragment17, { children: [
3540
+ /* @__PURE__ */ jsx47("div", { className, style, children: /* @__PURE__ */ jsxs27(Popover, { children: [
3541
+ /* @__PURE__ */ jsx47(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx47(
3457
3542
  Button,
3458
3543
  {
3459
3544
  id: "date",
@@ -3462,15 +3547,15 @@ var DateRange = ({ className, style, ...props }) => {
3462
3547
  "w-full justify-start text-left font-normal text-[11px] border-[#BDBDBD]",
3463
3548
  !date && "text-muted-foreground"
3464
3549
  ),
3465
- children: date?.from ? date.to ? /* @__PURE__ */ jsxs26(Fragment17, { children: [
3550
+ children: date?.from ? date.to ? /* @__PURE__ */ jsxs27(Fragment17, { children: [
3466
3551
  format2(date.from, "LLL dd, y"),
3467
3552
  " -",
3468
3553
  " ",
3469
3554
  format2(date.to, "LLL dd, y")
3470
- ] }) : format2(date.from, "LLL dd, y") : /* @__PURE__ */ jsx46("span", { children: "Pick a date range" })
3555
+ ] }) : format2(date.from, "LLL dd, y") : /* @__PURE__ */ jsx47("span", { children: "Pick a date range" })
3471
3556
  }
3472
3557
  ) }),
3473
- /* @__PURE__ */ jsx46(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx46(
3558
+ /* @__PURE__ */ jsx47(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx47(
3474
3559
  Calendar,
3475
3560
  {
3476
3561
  mode: "range",
@@ -3481,21 +3566,21 @@ var DateRange = ({ className, style, ...props }) => {
3481
3566
  }
3482
3567
  ) })
3483
3568
  ] }) }),
3484
- props.errorMessage && /* @__PURE__ */ jsx46("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
3569
+ props.errorMessage && /* @__PURE__ */ jsx47("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
3485
3570
  ] });
3486
3571
  };
3487
3572
  var DateRange_default = DateRange;
3488
3573
 
3489
3574
  // src/components/Inputs/TextInputGroup/TextInputGroup.tsx
3490
- import { useEffect as useEffect24 } from "react";
3491
- import { Fragment as Fragment18, jsx as jsx47, jsxs as jsxs27 } from "react/jsx-runtime";
3575
+ import { useEffect as useEffect25 } from "react";
3576
+ import { Fragment as Fragment18, jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
3492
3577
  var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
3493
3578
  const placeholder = props.placeholder ?? "Placeholder text";
3494
3579
  const isEditable = props.isEditable ?? true;
3495
3580
  const isDisabled = props.isDisabled ?? false;
3496
3581
  const isReadonly = props.isReadonly ?? false;
3497
3582
  const isAutocomplete = props.isAutocomplete ?? false;
3498
- useEffect24(() => {
3583
+ useEffect25(() => {
3499
3584
  if (props.value !== void 0) {
3500
3585
  const e = { target: { value: props.value }, type: "change" };
3501
3586
  handleChange?.(e);
@@ -3504,8 +3589,8 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
3504
3589
  const handleChange = (e) => {
3505
3590
  props.onChange?.(e, props?.name || "");
3506
3591
  };
3507
- return /* @__PURE__ */ jsxs27(Fragment18, { children: [
3508
- /* @__PURE__ */ jsxs27(
3592
+ return /* @__PURE__ */ jsxs28(Fragment18, { children: [
3593
+ /* @__PURE__ */ jsxs28(
3509
3594
  "div",
3510
3595
  {
3511
3596
  className: cn(
@@ -3515,8 +3600,8 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
3515
3600
  props.errorMessage ? "border-red-500" : ""
3516
3601
  ),
3517
3602
  children: [
3518
- prepend && /* @__PURE__ */ jsx47("div", { className: "px-3 flex items-center bg-gray-500 text-white h-10 rounded-l-md", children: prepend }),
3519
- /* @__PURE__ */ jsx47(
3603
+ prepend && /* @__PURE__ */ jsx48("div", { className: "px-3 flex items-center bg-gray-500 text-white h-10 rounded-l-md", children: prepend }),
3604
+ /* @__PURE__ */ jsx48(
3520
3605
  Input,
3521
3606
  {
3522
3607
  id: props.name || "prepend-input",
@@ -3538,19 +3623,19 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
3538
3623
  readOnly: isReadonly
3539
3624
  }
3540
3625
  ),
3541
- append && /* @__PURE__ */ jsx47("div", { className: "px-3 flex items-center bg-gray-500 text-white h-10 rounded-r-md", children: append })
3626
+ append && /* @__PURE__ */ jsx48("div", { className: "px-3 flex items-center bg-gray-500 text-white h-10 rounded-r-md", children: append })
3542
3627
  ]
3543
3628
  }
3544
3629
  ),
3545
- props.errorMessage && /* @__PURE__ */ jsx47("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
3630
+ props.errorMessage && /* @__PURE__ */ jsx48("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
3546
3631
  ] });
3547
3632
  };
3548
3633
  var TextInputGroup_default = TextInputGroup;
3549
3634
 
3550
3635
  // src/components/Inputs/Multiselect/MultiSelect.tsx
3551
- import { useState as useState10, useRef as useRef8, useEffect as useEffect25, useMemo as useMemo6 } from "react";
3636
+ import { useState as useState11, useRef as useRef9, useEffect as useEffect26, useMemo as useMemo6 } from "react";
3552
3637
  import { XIcon, XSquareIcon as XSquareIcon3 } from "lucide-react";
3553
- import { Fragment as Fragment19, jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
3638
+ import { Fragment as Fragment19, jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
3554
3639
  function LazyMultiSelectDropdown({
3555
3640
  value = [],
3556
3641
  onChange,
@@ -3568,10 +3653,10 @@ function LazyMultiSelectDropdown({
3568
3653
  outputFormat = "array",
3569
3654
  ...props
3570
3655
  }) {
3571
- const [isOpen, setIsOpen] = useState10(false);
3572
- const [searchTerm, setSearchTerm] = useState10("");
3573
- const dropdownRef = useRef8(null);
3574
- const observerTarget = useRef8(null);
3656
+ const [isOpen, setIsOpen] = useState11(false);
3657
+ const [searchTerm, setSearchTerm] = useState11("");
3658
+ const dropdownRef = useRef9(null);
3659
+ const observerTarget = useRef9(null);
3575
3660
  const ensureUnique = (arr) => {
3576
3661
  return Array.from(new Set(arr));
3577
3662
  };
@@ -3627,7 +3712,7 @@ function LazyMultiSelectDropdown({
3627
3712
  return { value: id, label: id };
3628
3713
  });
3629
3714
  }, [normalizedValue, lazyOptions]);
3630
- useEffect25(() => {
3715
+ useEffect26(() => {
3631
3716
  const handleClick = (e) => {
3632
3717
  if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
3633
3718
  setIsOpen(false);
@@ -3636,7 +3721,7 @@ function LazyMultiSelectDropdown({
3636
3721
  document.addEventListener("mousedown", handleClick);
3637
3722
  return () => document.removeEventListener("mousedown", handleClick);
3638
3723
  }, []);
3639
- useEffect25(() => {
3724
+ useEffect26(() => {
3640
3725
  if (!isOpen || !hasMore || loading) return;
3641
3726
  const obs = new IntersectionObserver(
3642
3727
  (entries) => {
@@ -3673,8 +3758,8 @@ function LazyMultiSelectDropdown({
3673
3758
  }
3674
3759
  }
3675
3760
  };
3676
- return /* @__PURE__ */ jsxs28("div", { ref: dropdownRef, className: "relative w-full", children: [
3677
- /* @__PURE__ */ jsxs28(
3761
+ return /* @__PURE__ */ jsxs29("div", { ref: dropdownRef, className: "relative w-full", children: [
3762
+ /* @__PURE__ */ jsxs29(
3678
3763
  "div",
3679
3764
  {
3680
3765
  onClick: handleFocus,
@@ -3686,13 +3771,13 @@ function LazyMultiSelectDropdown({
3686
3771
  "px-2 py-2 min-h-[35px]"
3687
3772
  ),
3688
3773
  children: [
3689
- selectedOptions.map((opt) => /* @__PURE__ */ jsxs28(
3774
+ selectedOptions.map((opt) => /* @__PURE__ */ jsxs29(
3690
3775
  "span",
3691
3776
  {
3692
3777
  className: "bg-blue-100 text-blue-700 px-2 py-1 rounded-md text-xs flex items-center gap-1",
3693
3778
  children: [
3694
3779
  opt.label,
3695
- !disabled && !readOnly && /* @__PURE__ */ jsx48(
3780
+ !disabled && !readOnly && /* @__PURE__ */ jsx49(
3696
3781
  "button",
3697
3782
  {
3698
3783
  type: "button",
@@ -3701,14 +3786,14 @@ function LazyMultiSelectDropdown({
3701
3786
  removeTag(opt.value);
3702
3787
  },
3703
3788
  className: "hover:text-red-600",
3704
- children: /* @__PURE__ */ jsx48(XIcon, { size: 12 })
3789
+ children: /* @__PURE__ */ jsx49(XIcon, { size: 12 })
3705
3790
  }
3706
3791
  )
3707
3792
  ]
3708
3793
  },
3709
3794
  opt.value
3710
3795
  )),
3711
- /* @__PURE__ */ jsx48(
3796
+ /* @__PURE__ */ jsx49(
3712
3797
  "input",
3713
3798
  {
3714
3799
  type: "text",
@@ -3724,8 +3809,8 @@ function LazyMultiSelectDropdown({
3724
3809
  ]
3725
3810
  }
3726
3811
  ),
3727
- errorMessage && /* @__PURE__ */ jsx48("p", { className: "mt-1 text-xs text-red-500", children: errorMessage }),
3728
- isOpen && !disabled && /* @__PURE__ */ jsx48(Portal_default, { children: /* @__PURE__ */ jsx48(
3812
+ errorMessage && /* @__PURE__ */ jsx49("p", { className: "mt-1 text-xs text-red-500", children: errorMessage }),
3813
+ isOpen && !disabled && /* @__PURE__ */ jsx49(Portal_default, { children: /* @__PURE__ */ jsx49(
3729
3814
  "div",
3730
3815
  {
3731
3816
  onMouseDown: (e) => e.stopPropagation(),
@@ -3736,10 +3821,10 @@ function LazyMultiSelectDropdown({
3736
3821
  top: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().bottom + window.scrollY : 0,
3737
3822
  left: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().left + window.scrollX : 0
3738
3823
  },
3739
- children: dataLoading && lazyOptions.length === 0 ? /* @__PURE__ */ jsx48("div", { className: "px-3 py-3 text-center text-gray-500", children: "Loading..." }) : lazyOptions.length > 0 ? /* @__PURE__ */ jsxs28(Fragment19, { children: [
3824
+ children: dataLoading && lazyOptions.length === 0 ? /* @__PURE__ */ jsx49("div", { className: "px-3 py-3 text-center text-gray-500", children: "Loading..." }) : lazyOptions.length > 0 ? /* @__PURE__ */ jsxs29(Fragment19, { children: [
3740
3825
  lazyOptions.map((option) => {
3741
3826
  const isSelected = normalizedValue.includes(option.value);
3742
- return /* @__PURE__ */ jsxs28(
3827
+ return /* @__PURE__ */ jsxs29(
3743
3828
  "div",
3744
3829
  {
3745
3830
  onClick: () => toggleSelect(option.value),
@@ -3749,13 +3834,13 @@ function LazyMultiSelectDropdown({
3749
3834
  ),
3750
3835
  children: [
3751
3836
  option.label,
3752
- isSelected && /* @__PURE__ */ jsx48(XSquareIcon3, { size: 16 })
3837
+ isSelected && /* @__PURE__ */ jsx49(XSquareIcon3, { size: 16 })
3753
3838
  ]
3754
3839
  },
3755
3840
  option.value
3756
3841
  );
3757
3842
  }),
3758
- hasMore && /* @__PURE__ */ jsx48(
3843
+ hasMore && /* @__PURE__ */ jsx49(
3759
3844
  "div",
3760
3845
  {
3761
3846
  ref: observerTarget,
@@ -3763,14 +3848,14 @@ function LazyMultiSelectDropdown({
3763
3848
  children: loading ? "Loading\u2026" : "Scroll for more\u2026"
3764
3849
  }
3765
3850
  )
3766
- ] }) : /* @__PURE__ */ jsx48("div", { className: "px-3 py-3 text-center text-gray-500", children: "No results" })
3851
+ ] }) : /* @__PURE__ */ jsx49("div", { className: "px-3 py-3 text-center text-gray-500", children: "No results" })
3767
3852
  }
3768
3853
  ) })
3769
3854
  ] });
3770
3855
  }
3771
3856
 
3772
3857
  // src/components/ui/data-table.tsx
3773
- import * as React11 from "react";
3858
+ import * as React12 from "react";
3774
3859
  import { faEllipsisH } from "@fortawesome/free-solid-svg-icons";
3775
3860
  import { FontAwesomeIcon as FontAwesomeIcon3 } from "@fortawesome/react-fontawesome";
3776
3861
  import {
@@ -3784,14 +3869,14 @@ import axios3 from "axios";
3784
3869
  import { ArrowDown, ArrowUp, ArrowUpDown, Search } from "lucide-react";
3785
3870
 
3786
3871
  // src/components/ui/table.tsx
3787
- import { jsx as jsx49 } from "react/jsx-runtime";
3872
+ import { jsx as jsx50 } from "react/jsx-runtime";
3788
3873
  function Table({ className, ...props }) {
3789
- return /* @__PURE__ */ jsx49(
3874
+ return /* @__PURE__ */ jsx50(
3790
3875
  "div",
3791
3876
  {
3792
3877
  "data-slot": "table-container",
3793
3878
  className: "relative w-full overflow-x-auto rounded-md border border-gray-200 bg-white",
3794
- children: /* @__PURE__ */ jsx49(
3879
+ children: /* @__PURE__ */ jsx50(
3795
3880
  "table",
3796
3881
  {
3797
3882
  "data-slot": "table",
@@ -3803,7 +3888,7 @@ function Table({ className, ...props }) {
3803
3888
  );
3804
3889
  }
3805
3890
  function TableHeader({ className, ...props }) {
3806
- return /* @__PURE__ */ jsx49(
3891
+ return /* @__PURE__ */ jsx50(
3807
3892
  "thead",
3808
3893
  {
3809
3894
  "data-slot": "table-header",
@@ -3816,7 +3901,7 @@ function TableHeader({ className, ...props }) {
3816
3901
  );
3817
3902
  }
3818
3903
  function TableBody({ className, ...props }) {
3819
- return /* @__PURE__ */ jsx49(
3904
+ return /* @__PURE__ */ jsx50(
3820
3905
  "tbody",
3821
3906
  {
3822
3907
  "data-slot": "table-body",
@@ -3829,7 +3914,7 @@ function TableBody({ className, ...props }) {
3829
3914
  );
3830
3915
  }
3831
3916
  function TableRow({ className, ...props }) {
3832
- return /* @__PURE__ */ jsx49(
3917
+ return /* @__PURE__ */ jsx50(
3833
3918
  "tr",
3834
3919
  {
3835
3920
  "data-slot": "table-row",
@@ -3842,7 +3927,7 @@ function TableRow({ className, ...props }) {
3842
3927
  );
3843
3928
  }
3844
3929
  function TableHead({ className, ...props }) {
3845
- return /* @__PURE__ */ jsx49(
3930
+ return /* @__PURE__ */ jsx50(
3846
3931
  "th",
3847
3932
  {
3848
3933
  "data-slot": "table-head",
@@ -3855,7 +3940,7 @@ function TableHead({ className, ...props }) {
3855
3940
  );
3856
3941
  }
3857
3942
  function TableCell({ className, ...props }) {
3858
- return /* @__PURE__ */ jsx49(
3943
+ return /* @__PURE__ */ jsx50(
3859
3944
  "td",
3860
3945
  {
3861
3946
  "data-slot": "table-cell",
@@ -3872,11 +3957,11 @@ function TableCell({ className, ...props }) {
3872
3957
  import { createColumnHelper } from "@tanstack/react-table";
3873
3958
 
3874
3959
  // src/lib/table/cellRendererFactory.tsx
3875
- import React10 from "react";
3960
+ import React11 from "react";
3876
3961
  import * as LucideIcons2 from "lucide-react";
3877
3962
  import { Star as Star2 } from "lucide-react";
3878
3963
  import Image from "next/image";
3879
- import { Fragment as Fragment20, jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
3964
+ import { Fragment as Fragment20, jsx as jsx51, jsxs as jsxs30 } from "react/jsx-runtime";
3880
3965
  var getContrastColor = (bg) => {
3881
3966
  let c = bg.trim().toUpperCase();
3882
3967
  if (/^#([a-fA-F0-9]{3})$/.test(c)) {
@@ -3910,9 +3995,9 @@ var getContrastColor = (bg) => {
3910
3995
  };
3911
3996
  var sanitizeValue = (val) => {
3912
3997
  if (val == null) return null;
3913
- if (React10.isValidElement(val)) return val;
3998
+ if (React11.isValidElement(val)) return val;
3914
3999
  if (typeof val === "string" || typeof val === "number") return val;
3915
- if (Array.isArray(val)) return val.map((v, i) => /* @__PURE__ */ jsx50(React10.Fragment, { children: sanitizeValue(v) }, i));
4000
+ if (Array.isArray(val)) return val.map((v, i) => /* @__PURE__ */ jsx51(React11.Fragment, { children: sanitizeValue(v) }, i));
3916
4001
  if (typeof val === "object") {
3917
4002
  if ("name" in val && typeof val.name === "string") return val.name;
3918
4003
  if ("label" in val && typeof val.label === "string") return val.label;
@@ -3930,13 +4015,13 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
3930
4015
  switch (renderer) {
3931
4016
  /* -------------------- BASIC -------------------- */
3932
4017
  case "text":
3933
- return /* @__PURE__ */ jsx50("span", { children: rowValue || formattedValue });
4018
+ return /* @__PURE__ */ jsx51("span", { children: rowValue || formattedValue });
3934
4019
  case "number":
3935
- return /* @__PURE__ */ jsx50("span", { className: "tabular-nums text-right", children: valueFormatter(rowValue || value, "number:2") });
4020
+ return /* @__PURE__ */ jsx51("span", { className: "tabular-nums text-right", children: valueFormatter(rowValue || value, "number:2") });
3936
4021
  case "date":
3937
- return /* @__PURE__ */ jsx50("span", { children: valueFormatter(rowValue || value, format3) });
4022
+ return /* @__PURE__ */ jsx51("span", { children: valueFormatter(rowValue || value, format3) });
3938
4023
  case "link":
3939
- return /* @__PURE__ */ jsx50(
4024
+ return /* @__PURE__ */ jsx51(
3940
4025
  "a",
3941
4026
  {
3942
4027
  href: `${rendererProps?.prefix || ""}${rowValue || formattedValue}`,
@@ -3948,7 +4033,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
3948
4033
  );
3949
4034
  /* -------------------- VISUAL -------------------- */
3950
4035
  case "image":
3951
- return /* @__PURE__ */ jsx50("div", { className: "relative", children: /* @__PURE__ */ jsx50(
4036
+ return /* @__PURE__ */ jsx51("div", { className: "relative", children: /* @__PURE__ */ jsx51(
3952
4037
  Image,
3953
4038
  {
3954
4039
  src: rowValue || formattedValue || rendererProps?.fallback || "/placeholder.png",
@@ -3964,7 +4049,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
3964
4049
  ) });
3965
4050
  case "icon":
3966
4051
  if (!formattedValue) return null;
3967
- return /* @__PURE__ */ jsx50(
4052
+ return /* @__PURE__ */ jsx51(
3968
4053
  Icon,
3969
4054
  {
3970
4055
  iconSet: rendererProps?.iconSet,
@@ -3981,7 +4066,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
3981
4066
  const color = rendererProps?.colorMap?.[formattedValue] || rendererProps?.color || "gray";
3982
4067
  if (!formattedValue) return null;
3983
4068
  const textColor = getContrastColor(color);
3984
- return /* @__PURE__ */ jsx50(
4069
+ return /* @__PURE__ */ jsx51(
3985
4070
  "span",
3986
4071
  {
3987
4072
  className: `inline-block px-2 py-1 text-xs rounded-full bg-${color}-100 text-${textColor}-700 ${rendererProps?.className || ""}`,
@@ -3996,13 +4081,13 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
3996
4081
  const IconComponent = typeof maybeIcon === "function" ? maybeIcon : LucideIcons2.Star;
3997
4082
  if (!formattedValue) return null;
3998
4083
  const textColor = getContrastColor(color);
3999
- return /* @__PURE__ */ jsxs29(
4084
+ return /* @__PURE__ */ jsxs30(
4000
4085
  "span",
4001
4086
  {
4002
4087
  className: `inline-flex items-center gap-1 px-2 py-1 text-xs rounded-full bg-[${color}]-100 text-[${textColor}]-700`,
4003
4088
  style: { backgroundColor: color, color: textColor },
4004
4089
  children: [
4005
- rendererProps?.icon && /* @__PURE__ */ jsx50(Fragment20, { children: IconComponent ? /* @__PURE__ */ jsx50(IconComponent, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx50(LucideIcons2.Box, { className: "h-4 w-4" }) }),
4090
+ rendererProps?.icon && /* @__PURE__ */ jsx51(Fragment20, { children: IconComponent ? /* @__PURE__ */ jsx51(IconComponent, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx51(LucideIcons2.Box, { className: "h-4 w-4" }) }),
4006
4091
  formattedValue
4007
4092
  ]
4008
4093
  }
@@ -4010,7 +4095,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
4010
4095
  }
4011
4096
  /* -------------------- INTERACTIVE -------------------- */
4012
4097
  case "button":
4013
- return /* @__PURE__ */ jsx50(
4098
+ return /* @__PURE__ */ jsx51(
4014
4099
  "button",
4015
4100
  {
4016
4101
  onClick: () => rendererProps?.onClick?.(row, formattedValue),
@@ -4019,8 +4104,8 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
4019
4104
  }
4020
4105
  );
4021
4106
  case "switch":
4022
- return /* @__PURE__ */ jsxs29("label", { className: "inline-flex items-center cursor-pointer", children: [
4023
- /* @__PURE__ */ jsx50(
4107
+ return /* @__PURE__ */ jsxs30("label", { className: "inline-flex items-center cursor-pointer", children: [
4108
+ /* @__PURE__ */ jsx51(
4024
4109
  "input",
4025
4110
  {
4026
4111
  type: "checkbox",
@@ -4029,10 +4114,10 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
4029
4114
  className: "sr-only peer"
4030
4115
  }
4031
4116
  ),
4032
- /* @__PURE__ */ jsx50("div", { className: "relative w-9 h-5 bg-gray-300 peer-checked:bg-blue-600 rounded-full transition-all", children: /* @__PURE__ */ jsx50("div", { className: "absolute top-[2px] left-[2px] w-4 h-4 bg-white rounded-full peer-checked:translate-x-4 transition-all" }) })
4117
+ /* @__PURE__ */ jsx51("div", { className: "relative w-9 h-5 bg-gray-300 peer-checked:bg-blue-600 rounded-full transition-all", children: /* @__PURE__ */ jsx51("div", { className: "absolute top-[2px] left-[2px] w-4 h-4 bg-white rounded-full peer-checked:translate-x-4 transition-all" }) })
4033
4118
  ] });
4034
4119
  case "progress":
4035
- return /* @__PURE__ */ jsx50("div", { className: "w-full bg-gray-100 rounded-full h-2", children: /* @__PURE__ */ jsx50(
4120
+ return /* @__PURE__ */ jsx51("div", { className: "w-full bg-gray-100 rounded-full h-2", children: /* @__PURE__ */ jsx51(
4036
4121
  "div",
4037
4122
  {
4038
4123
  className: "bg-blue-600 h-2 rounded-full transition-all",
@@ -4041,7 +4126,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
4041
4126
  ) });
4042
4127
  case "rating": {
4043
4128
  const stars = Math.round(Number(rowValue || formattedValue) || 0);
4044
- return /* @__PURE__ */ jsx50("div", { className: "flex items-center", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx50(
4129
+ return /* @__PURE__ */ jsx51("div", { className: "flex items-center", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx51(
4045
4130
  Star2,
4046
4131
  {
4047
4132
  size: 16,
@@ -4052,7 +4137,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
4052
4137
  )) });
4053
4138
  }
4054
4139
  case "checkbox":
4055
- return /* @__PURE__ */ jsx50(
4140
+ return /* @__PURE__ */ jsx51(
4056
4141
  "input",
4057
4142
  {
4058
4143
  type: "checkbox",
@@ -4062,7 +4147,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
4062
4147
  }
4063
4148
  );
4064
4149
  case "html":
4065
- return /* @__PURE__ */ jsx50(
4150
+ return /* @__PURE__ */ jsx51(
4066
4151
  "span",
4067
4152
  {
4068
4153
  dangerouslySetInnerHTML: { __html: String(rowValue || formattedValue) }
@@ -4072,7 +4157,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
4072
4157
  case "custom": {
4073
4158
  const CustomRenderer = customRenderers[rendererProps?.customRendererId] || customRenderers[rendererProps?.rendererId];
4074
4159
  if (CustomRenderer)
4075
- return /* @__PURE__ */ jsx50(
4160
+ return /* @__PURE__ */ jsx51(
4076
4161
  CustomRenderer,
4077
4162
  {
4078
4163
  value: formattedValue,
@@ -4080,11 +4165,11 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
4080
4165
  ...rendererProps
4081
4166
  }
4082
4167
  );
4083
- return /* @__PURE__ */ jsx50("span", { children: "Missing custom renderer" });
4168
+ return /* @__PURE__ */ jsx51("span", { children: "Missing custom renderer" });
4084
4169
  }
4085
4170
  /* -------------------- DEFAULT -------------------- */
4086
4171
  default:
4087
- return /* @__PURE__ */ jsx50("span", { children: formattedValue || "-" });
4172
+ return /* @__PURE__ */ jsx51("span", { children: formattedValue || "-" });
4088
4173
  }
4089
4174
  };
4090
4175
 
@@ -4148,7 +4233,7 @@ var useDynamicColumns = (config, customRenderers = {}, customFormatters = {}) =>
4148
4233
  };
4149
4234
 
4150
4235
  // src/components/ui/data-table.tsx
4151
- import { Fragment as Fragment21, jsx as jsx51, jsxs as jsxs30 } from "react/jsx-runtime";
4236
+ import { Fragment as Fragment21, jsx as jsx52, jsxs as jsxs31 } from "react/jsx-runtime";
4152
4237
  function DataTable({
4153
4238
  columns,
4154
4239
  data,
@@ -4175,13 +4260,13 @@ function DataTable({
4175
4260
  enableTotalRecords,
4176
4261
  getRowCount
4177
4262
  }) {
4178
- const [columnFilters, setColumnFilters] = React11.useState([]);
4179
- const [columnVisibility, setColumnVisibility] = React11.useState({});
4180
- const hasLoadedInitialState = React11.useRef(false);
4181
- const isSavingRef = React11.useRef(false);
4182
- const isFetchingRef = React11.useRef(false);
4183
- const [fetchLoading, setFetchLoading] = React11.useState(false);
4184
- const transformApiToFrontend = React11.useCallback((apiSettings, allColumnIds) => {
4263
+ const [columnFilters, setColumnFilters] = React12.useState([]);
4264
+ const [columnVisibility, setColumnVisibility] = React12.useState({});
4265
+ const hasLoadedInitialState = React12.useRef(false);
4266
+ const isSavingRef = React12.useRef(false);
4267
+ const isFetchingRef = React12.useRef(false);
4268
+ const [fetchLoading, setFetchLoading] = React12.useState(false);
4269
+ const transformApiToFrontend = React12.useCallback((apiSettings, allColumnIds) => {
4185
4270
  if (!apiSettings || !apiSettings.columns || !apiSettings.columns.visible) {
4186
4271
  return {};
4187
4272
  }
@@ -4192,7 +4277,7 @@ function DataTable({
4192
4277
  });
4193
4278
  return result;
4194
4279
  }, []);
4195
- const transformFrontendToApi = React11.useCallback((visibility) => {
4280
+ const transformFrontendToApi = React12.useCallback((visibility) => {
4196
4281
  const visibleColumns = Object.keys(visibility).filter((colId) => visibility[colId] === true);
4197
4282
  return {
4198
4283
  columns: {
@@ -4200,7 +4285,7 @@ function DataTable({
4200
4285
  }
4201
4286
  };
4202
4287
  }, []);
4203
- const fetchColumnPreferences = React11.useCallback(async () => {
4288
+ const fetchColumnPreferences = React12.useCallback(async () => {
4204
4289
  if (isFetchingRef.current) {
4205
4290
  return;
4206
4291
  }
@@ -4260,7 +4345,7 @@ function DataTable({
4260
4345
  isFetchingRef.current = false;
4261
4346
  }
4262
4347
  }, [tableId, transformApiToFrontend, manageColumns]);
4263
- const saveColumnPreferences = React11.useCallback(async (visibility) => {
4348
+ const saveColumnPreferences = React12.useCallback(async (visibility) => {
4264
4349
  if (!tableId || isSavingRef.current || !manageColumns) {
4265
4350
  return;
4266
4351
  }
@@ -4286,7 +4371,7 @@ function DataTable({
4286
4371
  isSavingRef.current = false;
4287
4372
  }
4288
4373
  }, [tableId, transformFrontendToApi, manageColumns]);
4289
- React11.useEffect(() => {
4374
+ React12.useEffect(() => {
4290
4375
  if (hasLoadedInitialState.current || isFetchingRef.current) {
4291
4376
  return;
4292
4377
  }
@@ -4297,10 +4382,10 @@ function DataTable({
4297
4382
  fetchColumnPreferences();
4298
4383
  }
4299
4384
  }, [tableId, manageColumns]);
4300
- const [manualSort, setManualSort] = React11.useState(null);
4301
- const [searchTerm, setSearchTerm] = React11.useState("");
4385
+ const [manualSort, setManualSort] = React12.useState(null);
4386
+ const [searchTerm, setSearchTerm] = React12.useState("");
4302
4387
  const tableData = Array.isArray(data) ? data : [];
4303
- const filteredData = React11.useMemo(() => {
4388
+ const filteredData = React12.useMemo(() => {
4304
4389
  if (paginationMode === "client" && globalSearch && searchTerm.trim()) {
4305
4390
  const searchLower = searchTerm.toLowerCase().trim();
4306
4391
  return tableData.filter((row) => {
@@ -4323,7 +4408,7 @@ function DataTable({
4323
4408
  id: "__select__",
4324
4409
  renderer: "checkbox",
4325
4410
  size: 40,
4326
- header: ({ table: table2 }) => /* @__PURE__ */ jsx51(
4411
+ header: ({ table: table2 }) => /* @__PURE__ */ jsx52(
4327
4412
  "input",
4328
4413
  {
4329
4414
  type: "checkbox",
@@ -4341,12 +4426,12 @@ function DataTable({
4341
4426
  });
4342
4427
  }
4343
4428
  const dynamicCols = useDynamicColumns({ columns: finalCols, enableRowSelection });
4344
- const [rowSelection, setRowSelection] = React11.useState({});
4345
- const [localPageSize, setLocalPageSize] = React11.useState(pageSize);
4346
- const [localPageIndex, setLocalPageIndex] = React11.useState(0);
4347
- const isUpdatingPageSizeRef = React11.useRef(false);
4348
- const tableRef = React11.useRef(null);
4349
- React11.useEffect(() => {
4429
+ const [rowSelection, setRowSelection] = React12.useState({});
4430
+ const [localPageSize, setLocalPageSize] = React12.useState(pageSize);
4431
+ const [localPageIndex, setLocalPageIndex] = React12.useState(0);
4432
+ const isUpdatingPageSizeRef = React12.useRef(false);
4433
+ const tableRef = React12.useRef(null);
4434
+ React12.useEffect(() => {
4350
4435
  if (paginationMode === "client") {
4351
4436
  setLocalPageSize(pageSize);
4352
4437
  } else if (paginationMode === "server" && meta?.limit != null) {
@@ -4422,7 +4507,7 @@ function DataTable({
4422
4507
  }
4423
4508
  }
4424
4509
  });
4425
- React11.useEffect(() => {
4510
+ React12.useEffect(() => {
4426
4511
  tableRef.current = table;
4427
4512
  if (table && !hasLoadedInitialState.current && !isFetchingRef.current && tableId) {
4428
4513
  fetchColumnPreferences();
@@ -4460,7 +4545,7 @@ function DataTable({
4460
4545
  setLocalPageIndex(0);
4461
4546
  }
4462
4547
  };
4463
- const pageSizeOptions = React11.useMemo(() => {
4548
+ const pageSizeOptions = React12.useMemo(() => {
4464
4549
  if (paginationMode === "client") {
4465
4550
  return [5, 10, 20, 50, 100];
4466
4551
  }
@@ -4471,10 +4556,10 @@ function DataTable({
4471
4556
  }
4472
4557
  return base;
4473
4558
  }, [paginationMode, meta?.limit]);
4474
- return /* @__PURE__ */ jsxs30("div", { className: "overflow-hidden rounded-md w-full", children: [
4475
- !loading && /* @__PURE__ */ jsxs30("div", { className: "flex justify-between p-2 bg-gray-50", children: [
4476
- /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-4 w-full", children: [
4477
- enableTotalRecords && /* @__PURE__ */ jsx51(
4559
+ return /* @__PURE__ */ jsxs31("div", { className: "overflow-hidden rounded-md w-full", children: [
4560
+ !loading && /* @__PURE__ */ jsxs31("div", { className: "flex justify-between p-2 bg-gray-50", children: [
4561
+ /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-4 w-full", children: [
4562
+ enableTotalRecords && /* @__PURE__ */ jsx52(
4478
4563
  Button,
4479
4564
  {
4480
4565
  size: "sm",
@@ -4489,9 +4574,9 @@ function DataTable({
4489
4574
  children: fetchLoading ? "Fetching..." : "Get Count"
4490
4575
  }
4491
4576
  ),
4492
- globalSearch && /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2 w-full max-w-sm", children: [
4493
- /* @__PURE__ */ jsxs30("div", { className: "relative w-full", children: [
4494
- /* @__PURE__ */ jsx51(
4577
+ globalSearch && /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2 w-full max-w-sm", children: [
4578
+ /* @__PURE__ */ jsxs31("div", { className: "relative w-full", children: [
4579
+ /* @__PURE__ */ jsx52(
4495
4580
  "input",
4496
4581
  {
4497
4582
  type: "text",
@@ -4513,9 +4598,9 @@ function DataTable({
4513
4598
  className: "border border-gray-300 rounded-md text-sm px-3 py-2 pl-8 w-full focus:outline-none focus:ring-1 focus:ring-[#12715B]"
4514
4599
  }
4515
4600
  ),
4516
- /* @__PURE__ */ jsx51(Search, { className: "absolute left-2 top-2.5 text-gray-400", size: 16 })
4601
+ /* @__PURE__ */ jsx52(Search, { className: "absolute left-2 top-2.5 text-gray-400", size: 16 })
4517
4602
  ] }),
4518
- paginationMode === "server" && /* @__PURE__ */ jsx51(
4603
+ paginationMode === "server" && /* @__PURE__ */ jsx52(
4519
4604
  Button,
4520
4605
  {
4521
4606
  size: "sm",
@@ -4526,8 +4611,8 @@ function DataTable({
4526
4611
  )
4527
4612
  ] })
4528
4613
  ] }),
4529
- manageColumns && /* @__PURE__ */ jsxs30(Popover, { children: [
4530
- /* @__PURE__ */ jsx51(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx51(
4614
+ manageColumns && /* @__PURE__ */ jsxs31(Popover, { children: [
4615
+ /* @__PURE__ */ jsx52(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx52(
4531
4616
  Button,
4532
4617
  {
4533
4618
  variant: "outline",
@@ -4536,11 +4621,11 @@ function DataTable({
4536
4621
  children: "Manage Columns"
4537
4622
  }
4538
4623
  ) }),
4539
- /* @__PURE__ */ jsxs30(PopoverContent, { align: "end", className: "w-48 p-3", children: [
4540
- /* @__PURE__ */ jsx51("div", { className: "text-sm font-medium mb-2", children: "Show / Hide Columns" }),
4541
- /* @__PURE__ */ jsxs30("div", { className: "max-h-56 overflow-y-auto pr-1 space-y-2", children: [
4542
- /* @__PURE__ */ jsxs30("label", { className: "flex items-center gap-2 text-sm font-semibold border-b pb-2 mb-2", children: [
4543
- /* @__PURE__ */ jsx51(
4624
+ /* @__PURE__ */ jsxs31(PopoverContent, { align: "end", className: "w-48 p-3", children: [
4625
+ /* @__PURE__ */ jsx52("div", { className: "text-sm font-medium mb-2", children: "Show / Hide Columns" }),
4626
+ /* @__PURE__ */ jsxs31("div", { className: "max-h-56 overflow-y-auto pr-1 space-y-2", children: [
4627
+ /* @__PURE__ */ jsxs31("label", { className: "flex items-center gap-2 text-sm font-semibold border-b pb-2 mb-2", children: [
4628
+ /* @__PURE__ */ jsx52(
4544
4629
  "input",
4545
4630
  {
4546
4631
  type: "checkbox",
@@ -4561,8 +4646,8 @@ function DataTable({
4561
4646
  ] }),
4562
4647
  table.getAllLeafColumns().map((column) => {
4563
4648
  const header = column.columnDef.header;
4564
- return /* @__PURE__ */ jsxs30("label", { className: "flex items-center gap-2 text-sm", children: [
4565
- /* @__PURE__ */ jsx51(
4649
+ return /* @__PURE__ */ jsxs31("label", { className: "flex items-center gap-2 text-sm", children: [
4650
+ /* @__PURE__ */ jsx52(
4566
4651
  "input",
4567
4652
  {
4568
4653
  type: "checkbox",
@@ -4577,12 +4662,12 @@ function DataTable({
4577
4662
  ] })
4578
4663
  ] })
4579
4664
  ] }),
4580
- /* @__PURE__ */ jsxs30(Table, { className: "table-fixed", children: [
4581
- /* @__PURE__ */ jsx51(TableHeader, { children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ jsx51(TableRow, { children: hg.headers.map((header, index) => {
4665
+ /* @__PURE__ */ jsxs31(Table, { className: "table-fixed", children: [
4666
+ /* @__PURE__ */ jsx52(TableHeader, { children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ jsx52(TableRow, { children: hg.headers.map((header, index) => {
4582
4667
  const canSort = header.column.getCanSort();
4583
4668
  const canFilter = header.column.getCanFilter();
4584
4669
  const sortDir = manualSort?.key === header.column.id ? manualSort.dir : null;
4585
- return /* @__PURE__ */ jsx51(
4670
+ return /* @__PURE__ */ jsx52(
4586
4671
  TableHead,
4587
4672
  {
4588
4673
  className: "relative select-none",
@@ -4591,8 +4676,8 @@ function DataTable({
4591
4676
  minWidth: header.column.columnDef.minSize,
4592
4677
  maxWidth: header.column.columnDef.maxSize
4593
4678
  },
4594
- children: /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between", children: [
4595
- /* @__PURE__ */ jsxs30(
4679
+ children: /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-between", children: [
4680
+ /* @__PURE__ */ jsxs31(
4596
4681
  "span",
4597
4682
  {
4598
4683
  className: `flex items-center gap-1 ${canSort ? "cursor-pointer" : ""}`,
@@ -4604,32 +4689,32 @@ function DataTable({
4604
4689
  },
4605
4690
  children: [
4606
4691
  flexRender(header.column.columnDef.header, header.getContext()),
4607
- canSort && /* @__PURE__ */ jsxs30(Fragment21, { children: [
4608
- sortDir === "asc" && /* @__PURE__ */ jsx51(ArrowUp, { size: 14, className: "text-gray-500" }),
4609
- sortDir === "desc" && /* @__PURE__ */ jsx51(ArrowDown, { size: 14, className: "text-gray-500" }),
4610
- !sortDir && /* @__PURE__ */ jsx51(ArrowUpDown, { size: 14, className: "text-gray-400" })
4692
+ canSort && /* @__PURE__ */ jsxs31(Fragment21, { children: [
4693
+ sortDir === "asc" && /* @__PURE__ */ jsx52(ArrowUp, { size: 14, className: "text-gray-500" }),
4694
+ sortDir === "desc" && /* @__PURE__ */ jsx52(ArrowDown, { size: 14, className: "text-gray-500" }),
4695
+ !sortDir && /* @__PURE__ */ jsx52(ArrowUpDown, { size: 14, className: "text-gray-400" })
4611
4696
  ] })
4612
4697
  ]
4613
4698
  }
4614
4699
  ),
4615
- canFilter && /* @__PURE__ */ jsxs30(Popover, { children: [
4616
- /* @__PURE__ */ jsx51(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx51(
4700
+ canFilter && /* @__PURE__ */ jsxs31(Popover, { children: [
4701
+ /* @__PURE__ */ jsx52(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx52(
4617
4702
  "span",
4618
4703
  {
4619
4704
  role: "presentation",
4620
4705
  className: "pl-5 cursor-pointer",
4621
4706
  onClick: (e) => e.stopPropagation(),
4622
- children: /* @__PURE__ */ jsx51(FontAwesomeIcon3, { icon: faEllipsisH, className: "w-5 h-5 text-gray-500" })
4707
+ children: /* @__PURE__ */ jsx52(FontAwesomeIcon3, { icon: faEllipsisH, className: "w-5 h-5 text-gray-500" })
4623
4708
  }
4624
4709
  ) }),
4625
- /* @__PURE__ */ jsx51(
4710
+ /* @__PURE__ */ jsx52(
4626
4711
  PopoverContent,
4627
4712
  {
4628
4713
  align: "center",
4629
4714
  sideOffset: 14,
4630
4715
  className: "w-50 p-3 z-[200] border-gray-300",
4631
4716
  avoidCollisions: true,
4632
- children: /* @__PURE__ */ jsxs30(
4717
+ children: /* @__PURE__ */ jsxs31(
4633
4718
  "form",
4634
4719
  {
4635
4720
  onSubmit: (e) => {
@@ -4642,8 +4727,8 @@ function DataTable({
4642
4727
  },
4643
4728
  className: "space-y-2",
4644
4729
  children: [
4645
- /* @__PURE__ */ jsx51("label", { htmlFor: "filter", className: "text-xs text-gray-500 font-normal", children: "Filter by value:" }),
4646
- /* @__PURE__ */ jsx51(
4730
+ /* @__PURE__ */ jsx52("label", { htmlFor: "filter", className: "text-xs text-gray-500 font-normal", children: "Filter by value:" }),
4731
+ /* @__PURE__ */ jsx52(
4647
4732
  "input",
4648
4733
  {
4649
4734
  name: "filter",
@@ -4653,7 +4738,7 @@ function DataTable({
4653
4738
  autoComplete: "off"
4654
4739
  }
4655
4740
  ),
4656
- /* @__PURE__ */ jsx51("div", { className: "justify-end flex", children: /* @__PURE__ */ jsx51(
4741
+ /* @__PURE__ */ jsx52("div", { className: "justify-end flex", children: /* @__PURE__ */ jsx52(
4657
4742
  Button,
4658
4743
  {
4659
4744
  type: "submit",
@@ -4672,9 +4757,9 @@ function DataTable({
4672
4757
  `header-${header.id}-${index}`
4673
4758
  );
4674
4759
  }) }, `header-group-${hg.id}`)) }),
4675
- /* @__PURE__ */ jsx51(TableBody, { children: loading ? /* @__PURE__ */ jsx51(Fragment21, { children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx51(TableRow, { children: table.getHeaderGroups()[0].headers.map((header, j) => {
4760
+ /* @__PURE__ */ jsx52(TableBody, { children: loading ? /* @__PURE__ */ jsx52(Fragment21, { children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx52(TableRow, { children: table.getHeaderGroups()[0].headers.map((header, j) => {
4676
4761
  const column = header.column;
4677
- return /* @__PURE__ */ jsx51(
4762
+ return /* @__PURE__ */ jsx52(
4678
4763
  TableCell,
4679
4764
  {
4680
4765
  className: "p-3",
@@ -4683,15 +4768,15 @@ function DataTable({
4683
4768
  minWidth: column.columnDef.minSize,
4684
4769
  maxWidth: column.columnDef.maxSize
4685
4770
  },
4686
- children: /* @__PURE__ */ jsx51("span", { className: "h-4 bg-gray-200 rounded w-full block animate-pulse" })
4771
+ children: /* @__PURE__ */ jsx52("span", { className: "h-4 bg-gray-200 rounded w-full block animate-pulse" })
4687
4772
  },
4688
4773
  j
4689
4774
  );
4690
- }) }, i)) }) : table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx51(TableRow, { children: row.getVisibleCells().map((cell, cellIndex, arr) => {
4775
+ }) }, i)) }) : table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx52(TableRow, { children: row.getVisibleCells().map((cell, cellIndex, arr) => {
4691
4776
  const meta2 = cell.column.columnDef.meta || {};
4692
4777
  const isClickable = meta2?.isClickable;
4693
4778
  const isLastCell = cellIndex === arr.length - 1;
4694
- return /* @__PURE__ */ jsxs30(
4779
+ return /* @__PURE__ */ jsxs31(
4695
4780
  TableCell,
4696
4781
  {
4697
4782
  className: `break-words whitespace-normal align-top ${isClickable ? "cursor-pointer hover:bg-gray-100 underline text-blue-500" : ""} relative py-2 ${meta2?.cellClass ?? ""}`,
@@ -4708,9 +4793,9 @@ function DataTable({
4708
4793
  },
4709
4794
  children: [
4710
4795
  flexRender(cell.column.columnDef.cell, cell.getContext()),
4711
- isLastCell && rowActions && rowActions.length > 0 && /* @__PURE__ */ jsx51("div", { className: "absolute p-1 px-2 inset-y-0 right-0 flex items-center transition-opacity duration-200", children: rowActions.map((action) => {
4796
+ isLastCell && rowActions && rowActions.length > 0 && /* @__PURE__ */ jsx52("div", { className: "absolute p-1 px-2 inset-y-0 right-0 flex items-center transition-opacity duration-200", children: rowActions.map((action) => {
4712
4797
  const isDelete = action.id === "delete" || action.icon === "delete";
4713
- return /* @__PURE__ */ jsx51(
4798
+ return /* @__PURE__ */ jsx52(
4714
4799
  "button",
4715
4800
  {
4716
4801
  className: `ml-2 px-2 py-1 text-[12px] rounded cursor-pointer ${isDelete ? "bg-red-800 text-white hover:bg-neutral-600" : "bg-gray-300 hover:bg-gray-400"}`,
@@ -4732,23 +4817,23 @@ function DataTable({
4732
4817
  },
4733
4818
  `cell-${cell.id}-${cellIndex}`
4734
4819
  );
4735
- }) }, row.id)) : /* @__PURE__ */ jsx51(TableRow, { children: /* @__PURE__ */ jsx51(TableCell, { colSpan: dynamicCols.length, className: "h-24 text-center", children: /* @__PURE__ */ jsx51("span", { className: "flex items-center justify-center py-10 w-full min-w-full text-gray-600 bg-gray-100", children: "No results." }) }) }) })
4820
+ }) }, row.id)) : /* @__PURE__ */ jsx52(TableRow, { children: /* @__PURE__ */ jsx52(TableCell, { colSpan: dynamicCols.length, className: "h-24 text-center", children: /* @__PURE__ */ jsx52("span", { className: "flex items-center justify-center py-10 w-full min-w-full text-gray-600 bg-gray-100", children: "No results." }) }) }) })
4736
4821
  ] }),
4737
- pagination && /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between py-3 text-sm w-full", children: [
4738
- !loading && /* @__PURE__ */ jsx51("div", { className: "flex gap-2 items-center", children: /* @__PURE__ */ jsx51(
4822
+ pagination && /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-between py-3 text-sm w-full", children: [
4823
+ !loading && /* @__PURE__ */ jsx52("div", { className: "flex gap-2 items-center", children: /* @__PURE__ */ jsx52(
4739
4824
  "select",
4740
4825
  {
4741
4826
  value: paginationMode === "server" && meta?.limit != null ? meta.limit : localPageSize,
4742
4827
  onChange: handlePageSizeChange,
4743
4828
  className: "ml-2 border rounded py-1 text-sm cursor-pointer border-blue-600",
4744
- children: pageSizeOptions.map((size) => /* @__PURE__ */ jsxs30("option", { value: size, children: [
4829
+ children: pageSizeOptions.map((size) => /* @__PURE__ */ jsxs31("option", { value: size, children: [
4745
4830
  size,
4746
4831
  " / page"
4747
4832
  ] }, size))
4748
4833
  }
4749
4834
  ) }),
4750
- /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2", children: [
4751
- /* @__PURE__ */ jsx51(
4835
+ /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
4836
+ /* @__PURE__ */ jsx52(
4752
4837
  "button",
4753
4838
  {
4754
4839
  onClick: () => table.previousPage(),
@@ -4757,7 +4842,7 @@ function DataTable({
4757
4842
  children: "Prev"
4758
4843
  }
4759
4844
  ),
4760
- /* @__PURE__ */ jsx51(
4845
+ /* @__PURE__ */ jsx52(
4761
4846
  "button",
4762
4847
  {
4763
4848
  onClick: () => table.nextPage(),
@@ -4772,7 +4857,7 @@ function DataTable({
4772
4857
  }
4773
4858
 
4774
4859
  // src/components/DataDisplay/Table/Table.tsx
4775
- import { jsx as jsx52 } from "react/jsx-runtime";
4860
+ import { jsx as jsx53 } from "react/jsx-runtime";
4776
4861
  var Table2 = ({
4777
4862
  columns,
4778
4863
  data,
@@ -4797,7 +4882,7 @@ var Table2 = ({
4797
4882
  const rawColumns = Array.isArray(columns) ? columns : [];
4798
4883
  const rawData = Array.isArray(data) ? data : [];
4799
4884
  const isControlled = typeof page === "number";
4800
- return /* @__PURE__ */ jsx52("div", { className: `${className || ""} space-y-3`, style, children: /* @__PURE__ */ jsx52(
4885
+ return /* @__PURE__ */ jsx53("div", { className: `${className || ""} space-y-3`, style, children: /* @__PURE__ */ jsx53(
4801
4886
  DataTable,
4802
4887
  {
4803
4888
  ...props,
@@ -4833,9 +4918,9 @@ import {
4833
4918
  ChevronRightIcon as ChevronRightIcon3,
4834
4919
  MoreHorizontalIcon
4835
4920
  } from "lucide-react";
4836
- import { jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
4921
+ import { jsx as jsx54, jsxs as jsxs32 } from "react/jsx-runtime";
4837
4922
  function Pagination({ className, ...props }) {
4838
- return /* @__PURE__ */ jsx53(
4923
+ return /* @__PURE__ */ jsx54(
4839
4924
  "nav",
4840
4925
  {
4841
4926
  role: "navigation",
@@ -4850,7 +4935,7 @@ function PaginationContent({
4850
4935
  className,
4851
4936
  ...props
4852
4937
  }) {
4853
- return /* @__PURE__ */ jsx53(
4938
+ return /* @__PURE__ */ jsx54(
4854
4939
  "ul",
4855
4940
  {
4856
4941
  "data-slot": "pagination-content",
@@ -4860,7 +4945,7 @@ function PaginationContent({
4860
4945
  );
4861
4946
  }
4862
4947
  function PaginationItem({ ...props }) {
4863
- return /* @__PURE__ */ jsx53("li", { "data-slot": "pagination-item", ...props });
4948
+ return /* @__PURE__ */ jsx54("li", { "data-slot": "pagination-item", ...props });
4864
4949
  }
4865
4950
  function PaginationLink({
4866
4951
  className,
@@ -4868,7 +4953,7 @@ function PaginationLink({
4868
4953
  size = "icon",
4869
4954
  ...props
4870
4955
  }) {
4871
- return /* @__PURE__ */ jsx53(
4956
+ return /* @__PURE__ */ jsx54(
4872
4957
  "a",
4873
4958
  {
4874
4959
  "aria-current": isActive ? "page" : void 0,
@@ -4889,7 +4974,7 @@ function PaginationPrevious({
4889
4974
  className,
4890
4975
  ...props
4891
4976
  }) {
4892
- return /* @__PURE__ */ jsxs31(
4977
+ return /* @__PURE__ */ jsxs32(
4893
4978
  PaginationLink,
4894
4979
  {
4895
4980
  "aria-label": "Go to previous page",
@@ -4897,8 +4982,8 @@ function PaginationPrevious({
4897
4982
  className: cn("gap-1 px-2.5 sm:pl-2.5", className),
4898
4983
  ...props,
4899
4984
  children: [
4900
- /* @__PURE__ */ jsx53(ChevronLeftIcon2, {}),
4901
- /* @__PURE__ */ jsx53("span", { className: "hidden sm:block", children: "Previous" })
4985
+ /* @__PURE__ */ jsx54(ChevronLeftIcon2, {}),
4986
+ /* @__PURE__ */ jsx54("span", { className: "hidden sm:block", children: "Previous" })
4902
4987
  ]
4903
4988
  }
4904
4989
  );
@@ -4907,7 +4992,7 @@ function PaginationNext({
4907
4992
  className,
4908
4993
  ...props
4909
4994
  }) {
4910
- return /* @__PURE__ */ jsxs31(
4995
+ return /* @__PURE__ */ jsxs32(
4911
4996
  PaginationLink,
4912
4997
  {
4913
4998
  "aria-label": "Go to next page",
@@ -4915,8 +5000,8 @@ function PaginationNext({
4915
5000
  className: cn("gap-1 px-2.5 sm:pr-2.5", className),
4916
5001
  ...props,
4917
5002
  children: [
4918
- /* @__PURE__ */ jsx53("span", { className: "hidden sm:block", children: "Next" }),
4919
- /* @__PURE__ */ jsx53(ChevronRightIcon3, {})
5003
+ /* @__PURE__ */ jsx54("span", { className: "hidden sm:block", children: "Next" }),
5004
+ /* @__PURE__ */ jsx54(ChevronRightIcon3, {})
4920
5005
  ]
4921
5006
  }
4922
5007
  );
@@ -4925,7 +5010,7 @@ function PaginationEllipsis({
4925
5010
  className,
4926
5011
  ...props
4927
5012
  }) {
4928
- return /* @__PURE__ */ jsxs31(
5013
+ return /* @__PURE__ */ jsxs32(
4929
5014
  "span",
4930
5015
  {
4931
5016
  "aria-hidden": true,
@@ -4933,15 +5018,15 @@ function PaginationEllipsis({
4933
5018
  className: cn("flex size-9 items-center justify-center", className),
4934
5019
  ...props,
4935
5020
  children: [
4936
- /* @__PURE__ */ jsx53(MoreHorizontalIcon, { className: "size-4" }),
4937
- /* @__PURE__ */ jsx53("span", { className: "sr-only", children: "More pages" })
5021
+ /* @__PURE__ */ jsx54(MoreHorizontalIcon, { className: "size-4" }),
5022
+ /* @__PURE__ */ jsx54("span", { className: "sr-only", children: "More pages" })
4938
5023
  ]
4939
5024
  }
4940
5025
  );
4941
5026
  }
4942
5027
 
4943
5028
  // src/components/DataDisplay/Pagination/Pagination.tsx
4944
- import { jsx as jsx54, jsxs as jsxs32 } from "react/jsx-runtime";
5029
+ import { jsx as jsx55, jsxs as jsxs33 } from "react/jsx-runtime";
4945
5030
  var CustomPagination = ({
4946
5031
  totalPages,
4947
5032
  currentPage,
@@ -4987,10 +5072,10 @@ var CustomPagination = ({
4987
5072
  }
4988
5073
  };
4989
5074
  const pageNumbers = getPageNumbers();
4990
- return /* @__PURE__ */ jsxs32("div", { className: "flex flex-row gap-1 w-full items-center justify-between", children: [
4991
- /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2", children: [
4992
- /* @__PURE__ */ jsx54("p", { className: "text-sm text-muted-foreground whitespace-nowrap", children: "Items per page:" }),
4993
- /* @__PURE__ */ jsxs32(
5075
+ return /* @__PURE__ */ jsxs33("div", { className: "flex flex-row gap-1 w-full items-center justify-between", children: [
5076
+ /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-2", children: [
5077
+ /* @__PURE__ */ jsx55("p", { className: "text-sm text-muted-foreground whitespace-nowrap", children: "Items per page:" }),
5078
+ /* @__PURE__ */ jsxs33(
4994
5079
  Select,
4995
5080
  {
4996
5081
  defaultValue: String(perPage),
@@ -4998,26 +5083,26 @@ var CustomPagination = ({
4998
5083
  onPageChange({ page: 1, itemsPerPage: Number(value) });
4999
5084
  },
5000
5085
  children: [
5001
- /* @__PURE__ */ jsx54(SelectTrigger, { className: "w-[100px]", children: /* @__PURE__ */ jsx54(SelectValue, { placeholder: "Select" }) }),
5002
- /* @__PURE__ */ jsxs32(SelectContent, { children: [
5003
- /* @__PURE__ */ jsx54(SelectItem, { value: "5", children: "5" }),
5004
- /* @__PURE__ */ jsx54(SelectItem, { value: "10", children: "10" }),
5005
- /* @__PURE__ */ jsx54(SelectItem, { value: "20", children: "20" }),
5006
- /* @__PURE__ */ jsx54(SelectItem, { value: "50", children: "50" })
5086
+ /* @__PURE__ */ jsx55(SelectTrigger, { className: "w-[100px]", children: /* @__PURE__ */ jsx55(SelectValue, { placeholder: "Select" }) }),
5087
+ /* @__PURE__ */ jsxs33(SelectContent, { children: [
5088
+ /* @__PURE__ */ jsx55(SelectItem, { value: "5", children: "5" }),
5089
+ /* @__PURE__ */ jsx55(SelectItem, { value: "10", children: "10" }),
5090
+ /* @__PURE__ */ jsx55(SelectItem, { value: "20", children: "20" }),
5091
+ /* @__PURE__ */ jsx55(SelectItem, { value: "50", children: "50" })
5007
5092
  ] })
5008
5093
  ]
5009
5094
  }
5010
5095
  )
5011
5096
  ] }),
5012
- /* @__PURE__ */ jsx54(Pagination, { className: "justify-end", children: /* @__PURE__ */ jsxs32(PaginationContent, { children: [
5013
- /* @__PURE__ */ jsx54(PaginationItem, { children: /* @__PURE__ */ jsx54(
5097
+ /* @__PURE__ */ jsx55(Pagination, { className: "justify-end", children: /* @__PURE__ */ jsxs33(PaginationContent, { children: [
5098
+ /* @__PURE__ */ jsx55(PaginationItem, { children: /* @__PURE__ */ jsx55(
5014
5099
  PaginationPrevious,
5015
5100
  {
5016
5101
  onClick: () => handlePageChange(currentPage - 1),
5017
5102
  className: currentPage === 1 ? "pointer-events-none opacity-50" : "cursor-pointer"
5018
5103
  }
5019
5104
  ) }),
5020
- pageNumbers.map((pageNumber, index) => /* @__PURE__ */ jsx54(PaginationItem, { children: pageNumber === "..." ? /* @__PURE__ */ jsx54(PaginationEllipsis, {}) : /* @__PURE__ */ jsx54(
5105
+ pageNumbers.map((pageNumber, index) => /* @__PURE__ */ jsx55(PaginationItem, { children: pageNumber === "..." ? /* @__PURE__ */ jsx55(PaginationEllipsis, {}) : /* @__PURE__ */ jsx55(
5021
5106
  PaginationLink,
5022
5107
  {
5023
5108
  onClick: () => handlePageChange(pageNumber),
@@ -5026,7 +5111,7 @@ var CustomPagination = ({
5026
5111
  children: pageNumber
5027
5112
  }
5028
5113
  ) }, index)),
5029
- /* @__PURE__ */ jsx54(PaginationItem, { children: /* @__PURE__ */ jsx54(
5114
+ /* @__PURE__ */ jsx55(PaginationItem, { children: /* @__PURE__ */ jsx55(
5030
5115
  PaginationNext,
5031
5116
  {
5032
5117
  onClick: () => handlePageChange(currentPage + 1),
@@ -5045,17 +5130,17 @@ import { LoaderCircle, Info } from "lucide-react";
5045
5130
  // src/components/ui/accordion.tsx
5046
5131
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
5047
5132
  import { ChevronDownIcon as ChevronDownIcon3 } from "lucide-react";
5048
- import { jsx as jsx55, jsxs as jsxs33 } from "react/jsx-runtime";
5133
+ import { jsx as jsx56, jsxs as jsxs34 } from "react/jsx-runtime";
5049
5134
  function Accordion2({
5050
5135
  ...props
5051
5136
  }) {
5052
- return /* @__PURE__ */ jsx55(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
5137
+ return /* @__PURE__ */ jsx56(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
5053
5138
  }
5054
5139
  function AccordionItem({
5055
5140
  className,
5056
5141
  ...props
5057
5142
  }) {
5058
- return /* @__PURE__ */ jsx55(
5143
+ return /* @__PURE__ */ jsx56(
5059
5144
  AccordionPrimitive.Item,
5060
5145
  {
5061
5146
  "data-slot": "accordion-item",
@@ -5069,7 +5154,7 @@ function AccordionTrigger({
5069
5154
  children,
5070
5155
  ...props
5071
5156
  }) {
5072
- return /* @__PURE__ */ jsx55(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs33(
5157
+ return /* @__PURE__ */ jsx56(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs34(
5073
5158
  AccordionPrimitive.Trigger,
5074
5159
  {
5075
5160
  "data-slot": "accordion-trigger",
@@ -5080,7 +5165,7 @@ function AccordionTrigger({
5080
5165
  ...props,
5081
5166
  children: [
5082
5167
  children,
5083
- /* @__PURE__ */ jsx55(ChevronDownIcon3, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
5168
+ /* @__PURE__ */ jsx56(ChevronDownIcon3, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
5084
5169
  ]
5085
5170
  }
5086
5171
  ) });
@@ -5090,21 +5175,21 @@ function AccordionContent({
5090
5175
  children,
5091
5176
  ...props
5092
5177
  }) {
5093
- return /* @__PURE__ */ jsx55(
5178
+ return /* @__PURE__ */ jsx56(
5094
5179
  AccordionPrimitive.Content,
5095
5180
  {
5096
5181
  "data-slot": "accordion-content",
5097
5182
  className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
5098
5183
  ...props,
5099
- children: /* @__PURE__ */ jsx55("div", { className: cn("pt-0 pb-4", className), children })
5184
+ children: /* @__PURE__ */ jsx56("div", { className: cn("pt-0 pb-4", className), children })
5100
5185
  }
5101
5186
  );
5102
5187
  }
5103
5188
 
5104
5189
  // src/components/ui/card.tsx
5105
- import { jsx as jsx56 } from "react/jsx-runtime";
5190
+ import { jsx as jsx57 } from "react/jsx-runtime";
5106
5191
  function Card({ className, ...props }) {
5107
- return /* @__PURE__ */ jsx56(
5192
+ return /* @__PURE__ */ jsx57(
5108
5193
  "div",
5109
5194
  {
5110
5195
  "data-slot": "card",
@@ -5117,7 +5202,7 @@ function Card({ className, ...props }) {
5117
5202
  );
5118
5203
  }
5119
5204
  function CardHeader({ className, ...props }) {
5120
- return /* @__PURE__ */ jsx56(
5205
+ return /* @__PURE__ */ jsx57(
5121
5206
  "div",
5122
5207
  {
5123
5208
  "data-slot": "card-header",
@@ -5130,7 +5215,7 @@ function CardHeader({ className, ...props }) {
5130
5215
  );
5131
5216
  }
5132
5217
  function CardTitle({ className, ...props }) {
5133
- return /* @__PURE__ */ jsx56(
5218
+ return /* @__PURE__ */ jsx57(
5134
5219
  "div",
5135
5220
  {
5136
5221
  "data-slot": "card-title",
@@ -5140,7 +5225,7 @@ function CardTitle({ className, ...props }) {
5140
5225
  );
5141
5226
  }
5142
5227
  function CardContent({ className, ...props }) {
5143
- return /* @__PURE__ */ jsx56(
5228
+ return /* @__PURE__ */ jsx57(
5144
5229
  "div",
5145
5230
  {
5146
5231
  "data-slot": "card-content",
@@ -5151,7 +5236,7 @@ function CardContent({ className, ...props }) {
5151
5236
  }
5152
5237
 
5153
5238
  // src/components/DataDisplay/HistoryTimeline/HistoryTimeline.tsx
5154
- import { jsx as jsx57, jsxs as jsxs34 } from "react/jsx-runtime";
5239
+ import { jsx as jsx58, jsxs as jsxs35 } from "react/jsx-runtime";
5155
5240
  function getValue(item, key) {
5156
5241
  if (!key) return void 0;
5157
5242
  return item[key];
@@ -5172,26 +5257,26 @@ var HistoryTimeline = ({
5172
5257
  return [];
5173
5258
  }, [props.data]);
5174
5259
  if (loading) {
5175
- return /* @__PURE__ */ jsx57(Card, { className: cn("w-full", className), children: /* @__PURE__ */ jsxs34(CardContent, { className: "flex items-center justify-center px-4 py-8", children: [
5176
- /* @__PURE__ */ jsx57(LoaderCircle, { className: "h-5 w-5 animate-spin text-muted-foreground" }),
5177
- /* @__PURE__ */ jsx57("span", { className: "ml-2 text-sm text-muted-foreground", children: "Loading history\u2026" })
5260
+ return /* @__PURE__ */ jsx58(Card, { className: cn("w-full", className), children: /* @__PURE__ */ jsxs35(CardContent, { className: "flex items-center justify-center px-4 py-8", children: [
5261
+ /* @__PURE__ */ jsx58(LoaderCircle, { className: "h-5 w-5 animate-spin text-muted-foreground" }),
5262
+ /* @__PURE__ */ jsx58("span", { className: "ml-2 text-sm text-muted-foreground", children: "Loading history\u2026" })
5178
5263
  ] }) });
5179
5264
  }
5180
5265
  if (data.length === 0) {
5181
- return /* @__PURE__ */ jsx57(Card, { className: cn("w-full", className), children: /* @__PURE__ */ jsx57(CardContent, { className: "px-4 py-8 text-center text-muted-foreground", children: "No history available." }) });
5266
+ return /* @__PURE__ */ jsx58(Card, { className: cn("w-full", className), children: /* @__PURE__ */ jsx58(CardContent, { className: "px-4 py-8 text-center text-muted-foreground", children: "No history available." }) });
5182
5267
  }
5183
- return /* @__PURE__ */ jsx57(Card, { className: cn("w-full", className), children: /* @__PURE__ */ jsx57(Accordion2, { type: "single", collapsible: true, defaultValue: "history", children: /* @__PURE__ */ jsxs34(AccordionItem, { value: "history", className: "border-0", children: [
5184
- /* @__PURE__ */ jsx57(CardHeader, { className: "flex flex-row items-center justify-between gap-2 border-b px-4 py-3", children: /* @__PURE__ */ jsx57(
5268
+ return /* @__PURE__ */ jsx58(Card, { className: cn("w-full", className), children: /* @__PURE__ */ jsx58(Accordion2, { type: "single", collapsible: true, defaultValue: "history", children: /* @__PURE__ */ jsxs35(AccordionItem, { value: "history", className: "border-0", children: [
5269
+ /* @__PURE__ */ jsx58(CardHeader, { className: "flex flex-row items-center justify-between gap-2 border-b px-4 py-3", children: /* @__PURE__ */ jsx58(
5185
5270
  AccordionTrigger,
5186
5271
  {
5187
5272
  className: cn(
5188
5273
  "flex flex-1 items-center justify-between gap-2 p-0 text-left",
5189
5274
  "hover:no-underline"
5190
5275
  ),
5191
- children: /* @__PURE__ */ jsx57(CardTitle, { className: "text-base font-semibold", children: title })
5276
+ children: /* @__PURE__ */ jsx58(CardTitle, { className: "text-base font-semibold", children: title })
5192
5277
  }
5193
5278
  ) }),
5194
- /* @__PURE__ */ jsx57(AccordionContent, { asChild: true, children: /* @__PURE__ */ jsx57(CardContent, { className: "px-4 py-3", children: /* @__PURE__ */ jsx57("ol", { className: "relative ml-4 border-l-2 border-[#939393] space-y-4", children: data.map((item, index) => {
5279
+ /* @__PURE__ */ jsx58(AccordionContent, { asChild: true, children: /* @__PURE__ */ jsx58(CardContent, { className: "px-4 py-3", children: /* @__PURE__ */ jsx58("ol", { className: "relative ml-4 border-l-2 border-[#939393] space-y-4", children: data.map((item, index) => {
5195
5280
  const id = item.id ?? index;
5196
5281
  const rawTitle = getValue(item, titleKey);
5197
5282
  const rawDescription = getValue(item, descriptionKey);
@@ -5199,8 +5284,8 @@ var HistoryTimeline = ({
5199
5284
  const titleText = String(rawTitle ?? "");
5200
5285
  const descriptionText = rawDescription != null ? String(rawDescription) : "";
5201
5286
  const createdAtDate = rawCreatedAt != null ? new Date(rawCreatedAt) : null;
5202
- return /* @__PURE__ */ jsxs34("li", { className: "relative pl-4", children: [
5203
- /* @__PURE__ */ jsx57("span", { className: "absolute left-[-9px] top-2 flex h-4 w-4 items-center justify-center rounded-full bg-primary text-primary-foreground", children: /* @__PURE__ */ jsx57("div", { className: "bg-[#06A59A] text-white rounded-md p-[5px]", children: /* @__PURE__ */ jsx57(
5287
+ return /* @__PURE__ */ jsxs35("li", { className: "relative pl-4", children: [
5288
+ /* @__PURE__ */ jsx58("span", { className: "absolute left-[-9px] top-2 flex h-4 w-4 items-center justify-center rounded-full bg-primary text-primary-foreground", children: /* @__PURE__ */ jsx58("div", { className: "bg-[#06A59A] text-white rounded-md p-[5px]", children: /* @__PURE__ */ jsx58(
5204
5289
  Info,
5205
5290
  {
5206
5291
  className: cn(
@@ -5208,30 +5293,30 @@ var HistoryTimeline = ({
5208
5293
  )
5209
5294
  }
5210
5295
  ) }) }),
5211
- /* @__PURE__ */ jsx57(
5296
+ /* @__PURE__ */ jsx58(
5212
5297
  Accordion2,
5213
5298
  {
5214
5299
  type: "single",
5215
5300
  collapsible: true,
5216
5301
  className: "w-full",
5217
- children: /* @__PURE__ */ jsxs34(AccordionItem, { value: `item-${item.id}`, className: "border-0", children: [
5218
- /* @__PURE__ */ jsx57(
5302
+ children: /* @__PURE__ */ jsxs35(AccordionItem, { value: `item-${item.id}`, className: "border-0", children: [
5303
+ /* @__PURE__ */ jsx58(
5219
5304
  AccordionTrigger,
5220
5305
  {
5221
5306
  className: cn(
5222
5307
  "flex items-center justify-between gap-2 rounded-md px-2 py-1 text-left",
5223
5308
  "hover:bg-muted/60 hover:no-underline"
5224
5309
  ),
5225
- children: /* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-1", children: [
5226
- /* @__PURE__ */ jsx57("span", { className: "text-sm font-medium leading-none", children: titleText }),
5227
- /* @__PURE__ */ jsx57("span", { className: "text-[11px] text-muted-foreground", children: new Intl.DateTimeFormat("default", {
5310
+ children: /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-1", children: [
5311
+ /* @__PURE__ */ jsx58("span", { className: "text-sm font-medium leading-none", children: titleText }),
5312
+ /* @__PURE__ */ jsx58("span", { className: "text-[11px] text-muted-foreground", children: new Intl.DateTimeFormat("default", {
5228
5313
  dateStyle: "medium",
5229
5314
  timeStyle: "short"
5230
5315
  }).format(createdAtDate ?? /* @__PURE__ */ new Date()) })
5231
5316
  ] })
5232
5317
  }
5233
5318
  ),
5234
- /* @__PURE__ */ jsx57(AccordionContent, { className: "pt-1", children: descriptionText && /* @__PURE__ */ jsx57("p", { className: "rounded-md bg-muted px-2 py-2 text-xs text-muted-foreground", children: descriptionText }) })
5319
+ /* @__PURE__ */ jsx58(AccordionContent, { className: "pt-1", children: descriptionText && /* @__PURE__ */ jsx58("p", { className: "rounded-md bg-muted px-2 py-2 text-xs text-muted-foreground", children: descriptionText }) })
5235
5320
  ] })
5236
5321
  }
5237
5322
  )
@@ -5242,7 +5327,7 @@ var HistoryTimeline = ({
5242
5327
  var HistoryTimeline_default = HistoryTimeline;
5243
5328
 
5244
5329
  // src/components/Navigation/Tabs/Tabs.tsx
5245
- import { useCallback as useCallback5, useMemo as useMemo9, useState as useState12 } from "react";
5330
+ import { useCallback as useCallback5, useMemo as useMemo9, useState as useState13 } from "react";
5246
5331
  import { ChevronDown as ChevronDown2, Menu } from "lucide-react";
5247
5332
  import Link3 from "next/link";
5248
5333
  import { usePathname, useRouter } from "next/navigation";
@@ -5250,22 +5335,22 @@ import { usePathname, useRouter } from "next/navigation";
5250
5335
  // src/components/ui/dialog.tsx
5251
5336
  import * as DialogPrimitive from "@radix-ui/react-dialog";
5252
5337
  import { XIcon as XIcon2 } from "lucide-react";
5253
- import { jsx as jsx58, jsxs as jsxs35 } from "react/jsx-runtime";
5338
+ import { jsx as jsx59, jsxs as jsxs36 } from "react/jsx-runtime";
5254
5339
  function Dialog({
5255
5340
  ...props
5256
5341
  }) {
5257
- return /* @__PURE__ */ jsx58(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
5342
+ return /* @__PURE__ */ jsx59(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
5258
5343
  }
5259
5344
  function DialogPortal({
5260
5345
  ...props
5261
5346
  }) {
5262
- return /* @__PURE__ */ jsx58(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
5347
+ return /* @__PURE__ */ jsx59(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
5263
5348
  }
5264
5349
  function DialogOverlay({
5265
5350
  className,
5266
5351
  ...props
5267
5352
  }) {
5268
- return /* @__PURE__ */ jsx58(
5353
+ return /* @__PURE__ */ jsx59(
5269
5354
  DialogPrimitive.Overlay,
5270
5355
  {
5271
5356
  "data-slot": "dialog-overlay",
@@ -5283,9 +5368,9 @@ function DialogContent({
5283
5368
  showCloseButton = true,
5284
5369
  ...props
5285
5370
  }) {
5286
- return /* @__PURE__ */ jsxs35(DialogPortal, { "data-slot": "dialog-portal", children: [
5287
- /* @__PURE__ */ jsx58(DialogOverlay, {}),
5288
- /* @__PURE__ */ jsxs35(
5371
+ return /* @__PURE__ */ jsxs36(DialogPortal, { "data-slot": "dialog-portal", children: [
5372
+ /* @__PURE__ */ jsx59(DialogOverlay, {}),
5373
+ /* @__PURE__ */ jsxs36(
5289
5374
  DialogPrimitive.Content,
5290
5375
  {
5291
5376
  "data-slot": "dialog-content",
@@ -5296,14 +5381,14 @@ function DialogContent({
5296
5381
  ...props,
5297
5382
  children: [
5298
5383
  children,
5299
- showCloseButton && /* @__PURE__ */ jsxs35(
5384
+ showCloseButton && /* @__PURE__ */ jsxs36(
5300
5385
  DialogPrimitive.Close,
5301
5386
  {
5302
5387
  "data-slot": "dialog-close",
5303
5388
  className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
5304
5389
  children: [
5305
- /* @__PURE__ */ jsx58(XIcon2, {}),
5306
- /* @__PURE__ */ jsx58("span", { className: "sr-only", children: "Close" })
5390
+ /* @__PURE__ */ jsx59(XIcon2, {}),
5391
+ /* @__PURE__ */ jsx59("span", { className: "sr-only", children: "Close" })
5307
5392
  ]
5308
5393
  }
5309
5394
  )
@@ -5313,7 +5398,7 @@ function DialogContent({
5313
5398
  ] });
5314
5399
  }
5315
5400
  function DialogHeader({ className, ...props }) {
5316
- return /* @__PURE__ */ jsx58(
5401
+ return /* @__PURE__ */ jsx59(
5317
5402
  "div",
5318
5403
  {
5319
5404
  "data-slot": "dialog-header",
@@ -5323,7 +5408,7 @@ function DialogHeader({ className, ...props }) {
5323
5408
  );
5324
5409
  }
5325
5410
  function DialogFooter({ className, ...props }) {
5326
- return /* @__PURE__ */ jsx58(
5411
+ return /* @__PURE__ */ jsx59(
5327
5412
  "div",
5328
5413
  {
5329
5414
  "data-slot": "dialog-footer",
@@ -5339,7 +5424,7 @@ function DialogTitle({
5339
5424
  className,
5340
5425
  ...props
5341
5426
  }) {
5342
- return /* @__PURE__ */ jsx58(
5427
+ return /* @__PURE__ */ jsx59(
5343
5428
  DialogPrimitive.Title,
5344
5429
  {
5345
5430
  "data-slot": "dialog-title",
@@ -5352,7 +5437,7 @@ function DialogDescription({
5352
5437
  className,
5353
5438
  ...props
5354
5439
  }) {
5355
- return /* @__PURE__ */ jsx58(
5440
+ return /* @__PURE__ */ jsx59(
5356
5441
  DialogPrimitive.Description,
5357
5442
  {
5358
5443
  "data-slot": "dialog-description",
@@ -5429,9 +5514,9 @@ function showConfirmToast({
5429
5514
  }
5430
5515
 
5431
5516
  // src/components/Navigation/Tabs/Tabs.tsx
5432
- import { Fragment as Fragment22, jsx as jsx59, jsxs as jsxs36 } from "react/jsx-runtime";
5517
+ import { Fragment as Fragment22, jsx as jsx60, jsxs as jsxs37 } from "react/jsx-runtime";
5433
5518
  var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuilder = false, source, parentKey, menuNameKey, menuUrlKey, loading, bgActiveColor, textActiveColor }) => {
5434
- const [openIndex, setOpenIndex] = useState12(null);
5519
+ const [openIndex, setOpenIndex] = useState13(null);
5435
5520
  const currentPathname = usePathname();
5436
5521
  function groupMenus(menus = []) {
5437
5522
  const menuMap = /* @__PURE__ */ new Map();
@@ -5495,8 +5580,8 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5495
5580
  return tab.children.some((child) => isActive(child.url));
5496
5581
  };
5497
5582
  const router = useRouter();
5498
- const [showExitDialog, setShowExitDialog] = useState12(false);
5499
- const [pendingUrl, setPendingUrl] = useState12(null);
5583
+ const [showExitDialog, setShowExitDialog] = useState13(false);
5584
+ const [pendingUrl, setPendingUrl] = useState13(null);
5500
5585
  const handleBuilderExit = useCallback5(
5501
5586
  (e, url) => {
5502
5587
  if (isBuilder) {
@@ -5528,13 +5613,13 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5528
5613
  border: active && textActiveColor ? `1px solid ${textActiveColor}` : void 0
5529
5614
  };
5530
5615
  if (Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown) {
5531
- return /* @__PURE__ */ jsxs36(
5616
+ return /* @__PURE__ */ jsxs37(
5532
5617
  DropdownMenu,
5533
5618
  {
5534
5619
  open: openIndex === index,
5535
5620
  onOpenChange: (open) => setOpenIndex(open ? index : null),
5536
5621
  children: [
5537
- /* @__PURE__ */ jsxs36(
5622
+ /* @__PURE__ */ jsxs37(
5538
5623
  DropdownMenuTrigger,
5539
5624
  {
5540
5625
  className: `${finalClasses} inline-flex items-center gap-1`,
@@ -5548,11 +5633,11 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5548
5633
  style: finalStyle,
5549
5634
  children: [
5550
5635
  tab.header,
5551
- /* @__PURE__ */ jsx59(ChevronDown2, { className: "h-4 w-4 opacity-80" })
5636
+ /* @__PURE__ */ jsx60(ChevronDown2, { className: "h-4 w-4 opacity-80" })
5552
5637
  ]
5553
5638
  }
5554
5639
  ),
5555
- /* @__PURE__ */ jsx59(
5640
+ /* @__PURE__ */ jsx60(
5556
5641
  DropdownMenuContent,
5557
5642
  {
5558
5643
  align: "start",
@@ -5565,12 +5650,12 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5565
5650
  onMouseLeave: () => {
5566
5651
  timeout = setTimeout(() => setOpenIndex(null), 150);
5567
5652
  },
5568
- children: tab.children.map((item, index2) => /* @__PURE__ */ jsx59(
5653
+ children: tab.children.map((item, index2) => /* @__PURE__ */ jsx60(
5569
5654
  DropdownMenuItem,
5570
5655
  {
5571
5656
  asChild: true,
5572
5657
  className: "cursor-pointer rounded-sm px-3 py-2 text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
5573
- children: /* @__PURE__ */ jsx59(
5658
+ children: /* @__PURE__ */ jsx60(
5574
5659
  Link3,
5575
5660
  {
5576
5661
  href: item.url || "#",
@@ -5589,7 +5674,7 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5589
5674
  index
5590
5675
  );
5591
5676
  }
5592
- return tab.url ? /* @__PURE__ */ jsx59(
5677
+ return tab.url ? /* @__PURE__ */ jsx60(
5593
5678
  Link3,
5594
5679
  {
5595
5680
  href: tab.url,
@@ -5600,14 +5685,14 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5600
5685
  children: tab.header
5601
5686
  },
5602
5687
  index
5603
- ) : /* @__PURE__ */ jsx59("div", { className: finalClasses, style: finalStyle, role: "button", tabIndex: 0, children: tab.header }, index);
5688
+ ) : /* @__PURE__ */ jsx60("div", { className: finalClasses, style: finalStyle, role: "button", tabIndex: 0, children: tab.header }, index);
5604
5689
  };
5605
- const renderMobileMenu = () => /* @__PURE__ */ jsxs36(DropdownMenu, { children: [
5606
- /* @__PURE__ */ jsxs36(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
5607
- /* @__PURE__ */ jsx59(Menu, { className: "h-4 w-4" }),
5690
+ const renderMobileMenu = () => /* @__PURE__ */ jsxs37(DropdownMenu, { children: [
5691
+ /* @__PURE__ */ jsxs37(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
5692
+ /* @__PURE__ */ jsx60(Menu, { className: "h-4 w-4" }),
5608
5693
  "Menu"
5609
5694
  ] }),
5610
- /* @__PURE__ */ jsx59(
5695
+ /* @__PURE__ */ jsx60(
5611
5696
  DropdownMenuContent,
5612
5697
  {
5613
5698
  align: "start",
@@ -5616,25 +5701,25 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5616
5701
  children: rawTabs.map((tab, i) => {
5617
5702
  const hasChildren = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
5618
5703
  if (hasChildren) {
5619
- return /* @__PURE__ */ jsxs36(DropdownMenuSub, { children: [
5620
- /* @__PURE__ */ jsx59(DropdownMenuSubTrigger, { className: "flex items-center justify-between cursor-pointer rounded-sm px-3 py-2 text-[13px] text-foreground hover:text-foreground", children: tab.header }),
5621
- /* @__PURE__ */ jsx59(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item, index) => /* @__PURE__ */ jsx59(
5704
+ return /* @__PURE__ */ jsxs37(DropdownMenuSub, { children: [
5705
+ /* @__PURE__ */ jsx60(DropdownMenuSubTrigger, { className: "flex items-center justify-between cursor-pointer rounded-sm px-3 py-2 text-[13px] text-foreground hover:text-foreground", children: tab.header }),
5706
+ /* @__PURE__ */ jsx60(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item, index) => /* @__PURE__ */ jsx60(
5622
5707
  DropdownMenuItem,
5623
5708
  {
5624
5709
  asChild: true,
5625
5710
  className: "cursor-pointer rounded-sm px-3 py-2 text-gray-800 hover:bg-gray-100",
5626
- children: /* @__PURE__ */ jsx59(Link3, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
5711
+ children: /* @__PURE__ */ jsx60(Link3, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
5627
5712
  },
5628
5713
  item.id || index
5629
5714
  )) })
5630
5715
  ] }, i);
5631
5716
  }
5632
- return /* @__PURE__ */ jsx59(
5717
+ return /* @__PURE__ */ jsx60(
5633
5718
  DropdownMenuItem,
5634
5719
  {
5635
5720
  asChild: true,
5636
5721
  className: "cursor-pointer rounded-sm px-3 py-2 text-[13px] text-gray-800 hover:bg-gray-100",
5637
- children: /* @__PURE__ */ jsx59(Link3, { href: tab.url || "#", onClick: (e) => handleBuilderExit(e, tab.url || "#"), children: tab.header })
5722
+ children: /* @__PURE__ */ jsx60(Link3, { href: tab.url || "#", onClick: (e) => handleBuilderExit(e, tab.url || "#"), children: tab.header })
5638
5723
  },
5639
5724
  i
5640
5725
  );
@@ -5644,19 +5729,19 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5644
5729
  ] });
5645
5730
  const forceMobile = canvasMode ? canvasMode === "mobile" || canvasMode === "tablet" : void 0;
5646
5731
  const forceDesktop = canvasMode ? canvasMode === "desktop" : void 0;
5647
- return /* @__PURE__ */ jsxs36(Fragment22, { children: [
5648
- /* @__PURE__ */ jsxs36("div", { className: cn("min-h-10", className), style, children: [
5649
- forceDesktop !== void 0 ? forceDesktop && /* @__PURE__ */ jsx59("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsx59("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }) : /* @__PURE__ */ jsx59("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsx59("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
5650
- forceMobile !== void 0 ? forceMobile && /* @__PURE__ */ jsx59("div", { children: renderMobileMenu() }) : /* @__PURE__ */ jsx59("div", { className: "flex md:hidden", children: renderMobileMenu() })
5732
+ return /* @__PURE__ */ jsxs37(Fragment22, { children: [
5733
+ /* @__PURE__ */ jsxs37("div", { className: cn("min-h-10", className), style, children: [
5734
+ forceDesktop !== void 0 ? forceDesktop && /* @__PURE__ */ jsx60("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsx60("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }) : /* @__PURE__ */ jsx60("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsx60("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
5735
+ forceMobile !== void 0 ? forceMobile && /* @__PURE__ */ jsx60("div", { children: renderMobileMenu() }) : /* @__PURE__ */ jsx60("div", { className: "flex md:hidden", children: renderMobileMenu() })
5651
5736
  ] }),
5652
- /* @__PURE__ */ jsx59(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ jsxs36(DialogContent, { className: "bg-[#fff]", children: [
5653
- /* @__PURE__ */ jsxs36(DialogHeader, { children: [
5654
- /* @__PURE__ */ jsx59(DialogTitle, { children: "Exit Builder?" }),
5655
- /* @__PURE__ */ jsx59(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
5737
+ /* @__PURE__ */ jsx60(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ jsxs37(DialogContent, { className: "bg-[#fff]", children: [
5738
+ /* @__PURE__ */ jsxs37(DialogHeader, { children: [
5739
+ /* @__PURE__ */ jsx60(DialogTitle, { children: "Exit Builder?" }),
5740
+ /* @__PURE__ */ jsx60(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
5656
5741
  ] }),
5657
- /* @__PURE__ */ jsxs36(DialogFooter, { children: [
5658
- /* @__PURE__ */ jsx59(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
5659
- /* @__PURE__ */ jsx59(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
5742
+ /* @__PURE__ */ jsxs37(DialogFooter, { children: [
5743
+ /* @__PURE__ */ jsx60(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
5744
+ /* @__PURE__ */ jsx60(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
5660
5745
  ] })
5661
5746
  ] }) })
5662
5747
  ] });
@@ -5664,16 +5749,16 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5664
5749
  var Tabs_default = Tabs;
5665
5750
 
5666
5751
  // src/components/Navigation/Stages/Stages.tsx
5667
- import React12, { useEffect as useEffect27, useState as useState13 } from "react";
5752
+ import React13, { useEffect as useEffect28, useState as useState14 } from "react";
5668
5753
 
5669
5754
  // src/components/ui/tooltip.tsx
5670
5755
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
5671
- import { jsx as jsx60, jsxs as jsxs37 } from "react/jsx-runtime";
5756
+ import { jsx as jsx61, jsxs as jsxs38 } from "react/jsx-runtime";
5672
5757
  function TooltipProvider({
5673
5758
  delayDuration = 0,
5674
5759
  ...props
5675
5760
  }) {
5676
- return /* @__PURE__ */ jsx60(
5761
+ return /* @__PURE__ */ jsx61(
5677
5762
  TooltipPrimitive.Provider,
5678
5763
  {
5679
5764
  "data-slot": "tooltip-provider",
@@ -5685,12 +5770,12 @@ function TooltipProvider({
5685
5770
  function Tooltip({
5686
5771
  ...props
5687
5772
  }) {
5688
- return /* @__PURE__ */ jsx60(TooltipProvider, { children: /* @__PURE__ */ jsx60(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
5773
+ return /* @__PURE__ */ jsx61(TooltipProvider, { children: /* @__PURE__ */ jsx61(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
5689
5774
  }
5690
5775
  function TooltipTrigger({
5691
5776
  ...props
5692
5777
  }) {
5693
- return /* @__PURE__ */ jsx60(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
5778
+ return /* @__PURE__ */ jsx61(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
5694
5779
  }
5695
5780
  function TooltipContent({
5696
5781
  className,
@@ -5699,7 +5784,7 @@ function TooltipContent({
5699
5784
  hideArrow,
5700
5785
  ...props
5701
5786
  }) {
5702
- return /* @__PURE__ */ jsx60(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs37(
5787
+ return /* @__PURE__ */ jsx61(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs38(
5703
5788
  TooltipPrimitive.Content,
5704
5789
  {
5705
5790
  "data-slot": "tooltip-content",
@@ -5711,14 +5796,14 @@ function TooltipContent({
5711
5796
  ...props,
5712
5797
  children: [
5713
5798
  children,
5714
- !hideArrow && /* @__PURE__ */ jsx60(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 rotate-45 rounded-[2px]" })
5799
+ !hideArrow && /* @__PURE__ */ jsx61(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 rotate-45 rounded-[2px]" })
5715
5800
  ]
5716
5801
  }
5717
5802
  ) });
5718
5803
  }
5719
5804
 
5720
5805
  // src/components/Navigation/Stages/Stages.tsx
5721
- import { jsx as jsx61, jsxs as jsxs38 } from "react/jsx-runtime";
5806
+ import { jsx as jsx62, jsxs as jsxs39 } from "react/jsx-runtime";
5722
5807
  var StagesComponent = ({
5723
5808
  stages,
5724
5809
  isShowBtn,
@@ -5735,11 +5820,11 @@ var StagesComponent = ({
5735
5820
  canvasMode = "desktop",
5736
5821
  ...props
5737
5822
  }) => {
5738
- const [activeStage, setActiveStage] = useState13("");
5739
- const [isCompleted, setIsCompleted] = useState13(false);
5740
- const [activeChildStage, setActiveChildStage] = useState13(null);
5741
- const [activeRootStage, setActiveRootStage] = useState13(null);
5742
- useEffect27(() => {
5823
+ const [activeStage, setActiveStage] = useState14("");
5824
+ const [isCompleted, setIsCompleted] = useState14(false);
5825
+ const [activeChildStage, setActiveChildStage] = useState14(null);
5826
+ const [activeRootStage, setActiveRootStage] = useState14(null);
5827
+ useEffect28(() => {
5743
5828
  if (currentStage) {
5744
5829
  setActiveStage(currentStage);
5745
5830
  } else {
@@ -5801,7 +5886,7 @@ var StagesComponent = ({
5801
5886
  }
5802
5887
  return { activeRoot: null, activeChild: null };
5803
5888
  };
5804
- useEffect27(() => {
5889
+ useEffect28(() => {
5805
5890
  if (!currentStage || !Array.isArray(stages)) {
5806
5891
  setActiveRootStage(null);
5807
5892
  setActiveChildStage(null);
@@ -5814,7 +5899,7 @@ var StagesComponent = ({
5814
5899
  const isAllStagesCompleted = isCompleted;
5815
5900
  const disabled = isAllStagesCompleted || loading || saving;
5816
5901
  const primaryColor = props.primaryColor || "#12715b";
5817
- return /* @__PURE__ */ jsx61("div", { className, style, children: /* @__PURE__ */ jsxs38(
5902
+ return /* @__PURE__ */ jsx62("div", { className, style, children: /* @__PURE__ */ jsxs39(
5818
5903
  "div",
5819
5904
  {
5820
5905
  className: `
@@ -5824,8 +5909,8 @@ var StagesComponent = ({
5824
5909
  ${isMobile ? "p-3 sm:p-4" : "p-2"}
5825
5910
  `,
5826
5911
  children: [
5827
- /* @__PURE__ */ jsx61("div", { className: "flex items-center flex-shrink-0 order-1 lg:order-1", children: /* @__PURE__ */ jsx61("button", { className: "p-2 hover:bg-gray-100 rounded flex-shrink-0", children: /* @__PURE__ */ jsx61("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx61("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
5828
- /* @__PURE__ */ jsx61(
5912
+ /* @__PURE__ */ jsx62("div", { className: "flex items-center flex-shrink-0 order-1 lg:order-1", children: /* @__PURE__ */ jsx62("button", { className: "p-2 hover:bg-gray-100 rounded flex-shrink-0", children: /* @__PURE__ */ jsx62("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx62("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
5913
+ /* @__PURE__ */ jsx62(
5829
5914
  "div",
5830
5915
  {
5831
5916
  className: `
@@ -5833,7 +5918,7 @@ var StagesComponent = ({
5833
5918
  flex-wrap gap-2 sm:gap-2 lg:gap-3 w-full lg:w-auto
5834
5919
  ${isMobile ? "order-2 mt-2 lg:mt-0" : "order-2"}
5835
5920
  `,
5836
- children: loading ? Array(6).fill(null).map((_, index) => /* @__PURE__ */ jsx61(
5921
+ children: loading ? Array(6).fill(null).map((_, index) => /* @__PURE__ */ jsx62(
5837
5922
  "button",
5838
5923
  {
5839
5924
  className: `
@@ -5889,8 +5974,8 @@ var StagesComponent = ({
5889
5974
  }
5890
5975
  }
5891
5976
  const stageKey = typeof stage[dataKey] === "string" ? stage[dataKey] : JSON.stringify(stage[dataKey]);
5892
- return /* @__PURE__ */ jsx61(React12.Fragment, { children: /* @__PURE__ */ jsxs38(Tooltip, { delayDuration: 500, disableHoverableContent: true, children: [
5893
- /* @__PURE__ */ jsx61(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx61(
5977
+ return /* @__PURE__ */ jsx62(React13.Fragment, { children: /* @__PURE__ */ jsxs39(Tooltip, { delayDuration: 500, disableHoverableContent: true, children: [
5978
+ /* @__PURE__ */ jsx62(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx62(
5894
5979
  "button",
5895
5980
  {
5896
5981
  className: `
@@ -5908,21 +5993,21 @@ var StagesComponent = ({
5908
5993
  children: stageLabel
5909
5994
  }
5910
5995
  ) }),
5911
- /* @__PURE__ */ jsx61(TooltipContent, { side: "top", sideOffset: 6, hideArrow: true, children: stageLabel }),
5912
- !isMobile && index < safeStages.length - 1 && /* @__PURE__ */ jsx61("div", { className: "hidden sm:flex sm:flex-shrink-0 w-3 h-px bg-gray-300 sm:w-4" })
5996
+ /* @__PURE__ */ jsx62(TooltipContent, { side: "top", sideOffset: 6, hideArrow: true, children: stageLabel }),
5997
+ !isMobile && index < safeStages.length - 1 && /* @__PURE__ */ jsx62("div", { className: "hidden sm:flex sm:flex-shrink-0 w-3 h-px bg-gray-300 sm:w-4" })
5913
5998
  ] }, stageKey) }, stageKey);
5914
5999
  });
5915
6000
  })()
5916
6001
  }
5917
6002
  ),
5918
- isShowBtn && /* @__PURE__ */ jsx61(
6003
+ isShowBtn && /* @__PURE__ */ jsx62(
5919
6004
  "div",
5920
6005
  {
5921
6006
  className: `
5922
6007
  flex items-center flex-shrink-0 w-full lg:w-auto
5923
6008
  ${isMobile ? "order-3 mt-3 lg:mt-0" : "order-3"}
5924
6009
  `,
5925
- children: /* @__PURE__ */ jsx61(
6010
+ children: /* @__PURE__ */ jsx62(
5926
6011
  "button",
5927
6012
  {
5928
6013
  className: `
@@ -5945,33 +6030,33 @@ var StagesComponent = ({
5945
6030
  var Stages_default = StagesComponent;
5946
6031
 
5947
6032
  // src/components/Navigation/Spacer/Spacer.tsx
5948
- import { jsx as jsx62 } from "react/jsx-runtime";
6033
+ import { jsx as jsx63 } from "react/jsx-runtime";
5949
6034
  var Spacer = ({ className, style }) => {
5950
- return /* @__PURE__ */ jsx62("div", { className: `${className}`, style });
6035
+ return /* @__PURE__ */ jsx63("div", { className: `${className}`, style });
5951
6036
  };
5952
6037
  var Spacer_default = Spacer;
5953
6038
 
5954
6039
  // src/components/Navigation/Profile/Profile.tsx
5955
- import { jsx as jsx63, jsxs as jsxs39 } from "react/jsx-runtime";
6040
+ import { jsx as jsx64, jsxs as jsxs40 } from "react/jsx-runtime";
5956
6041
 
5957
6042
  // src/components/Navigation/Notification/Notification.tsx
5958
- import { jsx as jsx64, jsxs as jsxs40 } from "react/jsx-runtime";
6043
+ import { jsx as jsx65, jsxs as jsxs41 } from "react/jsx-runtime";
5959
6044
 
5960
6045
  // src/components/Navigation/Logo/Logo.tsx
5961
- import { jsx as jsx65 } from "react/jsx-runtime";
6046
+ import { jsx as jsx66 } from "react/jsx-runtime";
5962
6047
 
5963
6048
  // src/components/Navigation/Navbar/Navbar.tsx
5964
- import { useCallback as useCallback6, useMemo as useMemo10, useState as useState14, useEffect as useEffect28 } from "react";
6049
+ import { useCallback as useCallback6, useMemo as useMemo10, useState as useState15, useEffect as useEffect29 } from "react";
5965
6050
  import { Bell, Search as Search2, Menu as Menu2 } from "lucide-react";
5966
6051
  import Image3 from "next/image";
5967
6052
  import Link4 from "next/link";
5968
6053
  import { useRouter as useRouter2 } from "next/navigation";
5969
6054
 
5970
6055
  // src/components/ui/avatar.tsx
5971
- import * as React13 from "react";
6056
+ import * as React14 from "react";
5972
6057
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
5973
- import { jsx as jsx66 } from "react/jsx-runtime";
5974
- var Avatar = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx66(
6058
+ import { jsx as jsx67 } from "react/jsx-runtime";
6059
+ var Avatar = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx67(
5975
6060
  AvatarPrimitive.Root,
5976
6061
  {
5977
6062
  ref,
@@ -5983,7 +6068,7 @@ var Avatar = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
5983
6068
  }
5984
6069
  ));
5985
6070
  Avatar.displayName = AvatarPrimitive.Root.displayName;
5986
- var AvatarImage = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx66(
6071
+ var AvatarImage = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx67(
5987
6072
  AvatarPrimitive.Image,
5988
6073
  {
5989
6074
  ref,
@@ -5992,7 +6077,7 @@ var AvatarImage = React13.forwardRef(({ className, ...props }, ref) => /* @__PUR
5992
6077
  }
5993
6078
  ));
5994
6079
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
5995
- var AvatarFallback = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx66(
6080
+ var AvatarFallback = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx67(
5996
6081
  AvatarPrimitive.Fallback,
5997
6082
  {
5998
6083
  ref,
@@ -6006,7 +6091,7 @@ var AvatarFallback = React13.forwardRef(({ className, ...props }, ref) => /* @__
6006
6091
  AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
6007
6092
 
6008
6093
  // src/components/Navigation/Navbar/Navbar.tsx
6009
- import { Fragment as Fragment23, jsx as jsx67, jsxs as jsxs41 } from "react/jsx-runtime";
6094
+ import { Fragment as Fragment23, jsx as jsx68, jsxs as jsxs42 } from "react/jsx-runtime";
6010
6095
  function Navbar({
6011
6096
  style,
6012
6097
  badgeType,
@@ -6028,10 +6113,10 @@ function Navbar({
6028
6113
  primaryColor = "#2a55a3"
6029
6114
  }) {
6030
6115
  const router = useRouter2();
6031
- const [screenMode, setScreenMode] = useState14(
6116
+ const [screenMode, setScreenMode] = useState15(
6032
6117
  canvasMode
6033
6118
  );
6034
- useEffect28(() => {
6119
+ useEffect29(() => {
6035
6120
  const detectMode = () => {
6036
6121
  if (window.innerWidth < 640) setScreenMode("mobile");
6037
6122
  else if (window.innerWidth < 1024) setScreenMode("tablet");
@@ -6065,9 +6150,9 @@ function Navbar({
6065
6150
  }
6066
6151
  return list;
6067
6152
  }, [source, navList, list]);
6068
- const RenderSearchInput = () => /* @__PURE__ */ jsx67("div", { className: "flex-1 px-2", children: /* @__PURE__ */ jsxs41("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
6069
- /* @__PURE__ */ jsx67(Search2, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
6070
- /* @__PURE__ */ jsx67(
6153
+ const RenderSearchInput = () => /* @__PURE__ */ jsx68("div", { className: "flex-1 px-2", children: /* @__PURE__ */ jsxs42("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
6154
+ /* @__PURE__ */ jsx68(Search2, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
6155
+ /* @__PURE__ */ jsx68(
6071
6156
  Input,
6072
6157
  {
6073
6158
  placeholder: "Search",
@@ -6083,23 +6168,23 @@ function Navbar({
6083
6168
  }
6084
6169
  )
6085
6170
  ] }) });
6086
- return /* @__PURE__ */ jsxs41(Fragment23, { children: [
6087
- /* @__PURE__ */ jsx67(
6171
+ return /* @__PURE__ */ jsxs42(Fragment23, { children: [
6172
+ /* @__PURE__ */ jsx68(
6088
6173
  "nav",
6089
6174
  {
6090
6175
  className: "w-full min-h-[75px] border-b border-gray-200 dark:border-gray-800 dark:bg-gray-800 bg-white shadow-sm",
6091
6176
  style,
6092
- children: /* @__PURE__ */ jsxs41("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
6093
- /* @__PURE__ */ jsx67(
6177
+ children: /* @__PURE__ */ jsxs42("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
6178
+ /* @__PURE__ */ jsx68(
6094
6179
  Link4,
6095
6180
  {
6096
6181
  href: "/",
6097
6182
  onClick: (e) => handleBuilderExit(e, "/"),
6098
6183
  className: "flex items-center space-x-2",
6099
- children: imageUrl ? /* @__PURE__ */ jsx67(Image3, { src: imageUrl, alt: altText, width: 180, height: 40 }) : /* @__PURE__ */ jsx67("span", { className: "font-semibold text-blue-700", children: "Logo" })
6184
+ children: imageUrl ? /* @__PURE__ */ jsx68(Image3, { src: imageUrl, alt: altText, width: 180, height: 40 }) : /* @__PURE__ */ jsx68("span", { className: "font-semibold text-blue-700", children: "Logo" })
6100
6185
  }
6101
6186
  ),
6102
- isDesktop && /* @__PURE__ */ jsx67("div", { className: "hidden md:flex items-center space-x-6", children: formattedMenu.map((item) => /* @__PURE__ */ jsx67(
6187
+ isDesktop && /* @__PURE__ */ jsx68("div", { className: "hidden md:flex items-center space-x-6", children: formattedMenu.map((item) => /* @__PURE__ */ jsx68(
6103
6188
  Link4,
6104
6189
  {
6105
6190
  href: item.url,
@@ -6109,23 +6194,23 @@ function Navbar({
6109
6194
  },
6110
6195
  item.id
6111
6196
  )) }),
6112
- /* @__PURE__ */ jsxs41("div", { className: "flex items-center space-x-3", children: [
6113
- (isDesktop || isTablet) && /* @__PURE__ */ jsx67(RenderSearchInput, {}),
6114
- /* @__PURE__ */ jsxs41("div", { className: "relative bg-gray-200 dark:bg-gray-700 rounded-md", children: [
6115
- /* @__PURE__ */ jsx67(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx67(Bell, { className: "h-5 w-5 text-gray-700 dark:text-gray-300" }) }),
6116
- badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ jsx67("span", { className: "absolute -top-1 -right-1 h-4 w-4 flex items-center justify-center bg-red-500 rounded-full text-white text-[10px]", children: badgeCount }) : !hideBadgeWhenZero && /* @__PURE__ */ jsx67("span", { className: "absolute -top-1 -right-1 h-2 w-2 bg-red-500 rounded-full" })
6197
+ /* @__PURE__ */ jsxs42("div", { className: "flex items-center space-x-3", children: [
6198
+ (isDesktop || isTablet) && /* @__PURE__ */ jsx68(RenderSearchInput, {}),
6199
+ /* @__PURE__ */ jsxs42("div", { className: "relative bg-gray-200 dark:bg-gray-700 rounded-md", children: [
6200
+ /* @__PURE__ */ jsx68(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx68(Bell, { className: "h-5 w-5 text-gray-700 dark:text-gray-300" }) }),
6201
+ badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ jsx68("span", { className: "absolute -top-1 -right-1 h-4 w-4 flex items-center justify-center bg-red-500 rounded-full text-white text-[10px]", children: badgeCount }) : !hideBadgeWhenZero && /* @__PURE__ */ jsx68("span", { className: "absolute -top-1 -right-1 h-2 w-2 bg-red-500 rounded-full" })
6117
6202
  ] }),
6118
- /* @__PURE__ */ jsxs41(DropdownMenu, { children: [
6119
- /* @__PURE__ */ jsx67(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs41("div", { className: "flex items-center space-x-2 cursor-pointer", children: [
6120
- !isMobile && showName && /* @__PURE__ */ jsx67("h4", { className: "text-gray-900 dark:text-gray-300 text-sm", children: userName }),
6121
- /* @__PURE__ */ jsx67(Avatar, { className: "h-8 w-8", children: profileType === "avatar" ? /* @__PURE__ */ jsx67(AvatarImage, { src: "/images/appbuilder/toolset/profile.svg", alt: "profile" }) : /* @__PURE__ */ jsx67("div", { className: `bg-[${primaryColor}] text-white h-full w-full rounded-full flex items-center justify-center text-xs`, style: { backgroundColor: primaryColor }, children: getInitials(userName) }) }),
6122
- (isMobile || isTablet) && /* @__PURE__ */ jsx67(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx67(Menu2, { className: "h-6 w-6" }) })
6203
+ /* @__PURE__ */ jsxs42(DropdownMenu, { children: [
6204
+ /* @__PURE__ */ jsx68(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs42("div", { className: "flex items-center space-x-2 cursor-pointer", children: [
6205
+ !isMobile && showName && /* @__PURE__ */ jsx68("h4", { className: "text-gray-900 dark:text-gray-300 text-sm", children: userName }),
6206
+ /* @__PURE__ */ jsx68(Avatar, { className: "h-8 w-8", children: profileType === "avatar" ? /* @__PURE__ */ jsx68(AvatarImage, { src: "/images/appbuilder/toolset/profile.svg", alt: "profile" }) : /* @__PURE__ */ jsx68("div", { className: `bg-[${primaryColor}] text-white h-full w-full rounded-full flex items-center justify-center text-xs`, style: { backgroundColor: primaryColor }, children: getInitials(userName) }) }),
6207
+ (isMobile || isTablet) && /* @__PURE__ */ jsx68(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx68(Menu2, { className: "h-6 w-6" }) })
6123
6208
  ] }) }),
6124
- /* @__PURE__ */ jsxs41(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
6125
- profileMenu.map((item) => /* @__PURE__ */ jsx67(DropdownMenuItem, { children: /* @__PURE__ */ jsx67(Link4, { href: item.url, onClick: (e) => handleBuilderExit(e, item.url), children: item.header }) }, item.id)),
6126
- (isMobile || isTablet) && /* @__PURE__ */ jsxs41(Fragment23, { children: [
6127
- /* @__PURE__ */ jsx67(DropdownMenuSeparator, {}),
6128
- formattedMenu.map((item) => /* @__PURE__ */ jsx67(DropdownMenuItem, { children: /* @__PURE__ */ jsx67(Link4, { href: item.url, onClick: (e) => handleBuilderExit(e, item.url), children: item.header }) }, item.id))
6209
+ /* @__PURE__ */ jsxs42(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
6210
+ profileMenu.map((item) => /* @__PURE__ */ jsx68(DropdownMenuItem, { children: /* @__PURE__ */ jsx68(Link4, { href: item.url, onClick: (e) => handleBuilderExit(e, item.url), children: item.header }) }, item.id)),
6211
+ (isMobile || isTablet) && /* @__PURE__ */ jsxs42(Fragment23, { children: [
6212
+ /* @__PURE__ */ jsx68(DropdownMenuSeparator, {}),
6213
+ formattedMenu.map((item) => /* @__PURE__ */ jsx68(DropdownMenuItem, { children: /* @__PURE__ */ jsx68(Link4, { href: item.url, onClick: (e) => handleBuilderExit(e, item.url), children: item.header }) }, item.id))
6129
6214
  ] })
6130
6215
  ] })
6131
6216
  ] })
@@ -6133,12 +6218,12 @@ function Navbar({
6133
6218
  ] })
6134
6219
  }
6135
6220
  ),
6136
- isMobile && /* @__PURE__ */ jsx67("div", { className: "p-3", children: /* @__PURE__ */ jsx67(RenderSearchInput, {}) })
6221
+ isMobile && /* @__PURE__ */ jsx68("div", { className: "p-3", children: /* @__PURE__ */ jsx68(RenderSearchInput, {}) })
6137
6222
  ] });
6138
6223
  }
6139
6224
 
6140
6225
  // src/components/Chart/BarChart.tsx
6141
- import React14, { useEffect as useEffect29, useMemo as useMemo11, useState as useState15, useCallback as useCallback7 } from "react";
6226
+ import React15, { useEffect as useEffect30, useMemo as useMemo11, useState as useState16, useCallback as useCallback7 } from "react";
6142
6227
  import axios4 from "axios";
6143
6228
  import {
6144
6229
  BarChart,
@@ -6151,7 +6236,7 @@ import {
6151
6236
  Tooltip as Tooltip2,
6152
6237
  ResponsiveContainer
6153
6238
  } from "recharts";
6154
- import { jsx as jsx68, jsxs as jsxs42 } from "react/jsx-runtime";
6239
+ import { jsx as jsx69, jsxs as jsxs43 } from "react/jsx-runtime";
6155
6240
  var palette = [
6156
6241
  "#2563eb",
6157
6242
  "#1d4ed8",
@@ -6211,13 +6296,13 @@ var ChartComponent = ({
6211
6296
  ...props
6212
6297
  }) => {
6213
6298
  const useApi = source === "api" && !!apiUrl;
6214
- const [rawData, setRawData] = useState15([]);
6215
- const [rawMeta, setRawMeta] = useState15(null);
6216
- const [localLoading, setLocalLoading] = useState15(false);
6217
- const [currentPage, setCurrentPage] = useState15(1);
6299
+ const [rawData, setRawData] = useState16([]);
6300
+ const [rawMeta, setRawMeta] = useState16(null);
6301
+ const [localLoading, setLocalLoading] = useState16(false);
6302
+ const [currentPage, setCurrentPage] = useState16(1);
6218
6303
  const effectiveData = useApi ? rawData : props.data || [];
6219
6304
  const effectiveLoading = useApi ? localLoading : externalLoading;
6220
- useEffect29(() => {
6305
+ useEffect30(() => {
6221
6306
  if (useApi) {
6222
6307
  setCurrentPage(1);
6223
6308
  }
@@ -6259,7 +6344,7 @@ var ChartComponent = ({
6259
6344
  if (!cancelled) setLocalLoading(false);
6260
6345
  }
6261
6346
  }, [apiUrl, limit]);
6262
- useEffect29(() => {
6347
+ useEffect30(() => {
6263
6348
  if (!useApi) return;
6264
6349
  fetchData(currentPage);
6265
6350
  }, [useApi, currentPage, fetchData]);
@@ -6282,7 +6367,7 @@ var ChartComponent = ({
6282
6367
  const renderLegends = useMemo11(() => {
6283
6368
  if (!showLegends || !dataKey || !dataLabel) return null;
6284
6369
  const isLegendRight2 = !forceMobile && legendPosition === "right";
6285
- return /* @__PURE__ */ jsx68(
6370
+ return /* @__PURE__ */ jsx69(
6286
6371
  "div",
6287
6372
  {
6288
6373
  className: isLegendRight2 ? "flex flex-col gap-2 w-full min-w-0 justify-start overflow-y-auto max-h-[260px]" : "flex flex-wrap justify-center gap-2 mt-4 w-full max-w-4xl",
@@ -6295,7 +6380,7 @@ var ChartComponent = ({
6295
6380
  [dataLabel]: d[dataLabel],
6296
6381
  [dataKey]: value
6297
6382
  };
6298
- return /* @__PURE__ */ jsxs42(
6383
+ return /* @__PURE__ */ jsxs43(
6299
6384
  "div",
6300
6385
  {
6301
6386
  role: onLegendClick ? "button" : void 0,
@@ -6304,16 +6389,16 @@ var ChartComponent = ({
6304
6389
  onKeyDown: onLegendClick ? (e) => e.key === "Enter" && onLegendClick(payload) : void 0,
6305
6390
  className: `flex items-center space-x-2 rounded-lg border border-gray-200/50 px-3 py-1.5 min-w-[180px] w-[180px] bg-white/80 backdrop-blur-sm shadow-sm hover:shadow-md transition-all ${onLegendClick ? "cursor-pointer" : ""}`,
6306
6391
  children: [
6307
- /* @__PURE__ */ jsx68(
6392
+ /* @__PURE__ */ jsx69(
6308
6393
  "span",
6309
6394
  {
6310
6395
  className: "inline-block w-[12px] h-[12px] rounded-full shrink-0 border-2 border-white/50",
6311
6396
  style: { backgroundColor: d.fill }
6312
6397
  }
6313
6398
  ),
6314
- /* @__PURE__ */ jsxs42("div", { className: "min-w-0 flex-1", children: [
6315
- /* @__PURE__ */ jsx68("span", { className: "text-gray-900 text-[11px] md:text-[13px] font-semibold block truncate leading-tight capitalize", children: d[dataLabel] }),
6316
- /* @__PURE__ */ jsx68("span", { className: "text-xs text-gray-600 font-medium", children: displayValue })
6399
+ /* @__PURE__ */ jsxs43("div", { className: "min-w-0 flex-1", children: [
6400
+ /* @__PURE__ */ jsx69("span", { className: "text-gray-900 text-[11px] md:text-[13px] font-semibold block truncate leading-tight capitalize", children: d[dataLabel] }),
6401
+ /* @__PURE__ */ jsx69("span", { className: "text-xs text-gray-600 font-medium", children: displayValue })
6317
6402
  ] })
6318
6403
  ]
6319
6404
  },
@@ -6324,27 +6409,27 @@ var ChartComponent = ({
6324
6409
  );
6325
6410
  }, [data, dataLabel, dataKey, showLegends, onLegendClick, legendPosition, forceMobile]);
6326
6411
  if (effectiveLoading) {
6327
- return /* @__PURE__ */ jsxs42(
6412
+ return /* @__PURE__ */ jsxs43(
6328
6413
  "div",
6329
6414
  {
6330
6415
  className: `relative flex flex-col w-full h-[300px] md:h-[400px] bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl p-6 ${className}`,
6331
6416
  style,
6332
6417
  children: [
6333
- /* @__PURE__ */ jsx68("div", { className: "mb-6 flex justify-center", children: /* @__PURE__ */ jsxs42("div", { className: "inline-flex items-center space-x-2 bg-white/90 px-6 py-2.5 rounded-xl backdrop-blur-sm border border-gray-200 shadow-lg", children: [
6334
- /* @__PURE__ */ jsx68("div", { className: "w-5 h-5 border-2 border-gray-400 border-t-blue-500 rounded-full animate-spin" }),
6335
- /* @__PURE__ */ jsx68("span", { className: "text-sm font-medium text-gray-700 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
6418
+ /* @__PURE__ */ jsx69("div", { className: "mb-6 flex justify-center", children: /* @__PURE__ */ jsxs43("div", { className: "inline-flex items-center space-x-2 bg-white/90 px-6 py-2.5 rounded-xl backdrop-blur-sm border border-gray-200 shadow-lg", children: [
6419
+ /* @__PURE__ */ jsx69("div", { className: "w-5 h-5 border-2 border-gray-400 border-t-blue-500 rounded-full animate-spin" }),
6420
+ /* @__PURE__ */ jsx69("span", { className: "text-sm font-medium text-gray-700 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
6336
6421
  ] }) }),
6337
- /* @__PURE__ */ jsx68("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
6338
- /* @__PURE__ */ jsx68("div", { className: "flex-1 relative w-full h-full min-h-[240px] md:min-h-[320px] bg-white/80 rounded-lg border border-gray-200/50 shadow-sm", children: /* @__PURE__ */ jsx68("div", { className: "absolute bottom-0 left-4 right-4 flex gap-2 h-[200px] md:h-[280px] justify-center items-end", children: [...Array(20)].map((_, idx) => {
6422
+ /* @__PURE__ */ jsx69("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
6423
+ /* @__PURE__ */ jsx69("div", { className: "flex-1 relative w-full h-full min-h-[240px] md:min-h-[320px] bg-white/80 rounded-lg border border-gray-200/50 shadow-sm", children: /* @__PURE__ */ jsx69("div", { className: "absolute bottom-0 left-4 right-4 flex gap-2 h-[200px] md:h-[280px] justify-center items-end", children: [...Array(20)].map((_, idx) => {
6339
6424
  const randomHeight = `${Math.floor(Math.random() * 76) + 20}%`;
6340
- return /* @__PURE__ */ jsxs42(
6425
+ return /* @__PURE__ */ jsxs43(
6341
6426
  "div",
6342
6427
  {
6343
6428
  className: `relative w-10 md:w-12 flex-1 max-w-[48px] rounded-t-lg bg-gradient-to-t from-gray-100 via-gray-200 to-transparent shadow-lg border border-gray-200/50 animate-slide-up stagger-${idx} overflow-hidden`,
6344
6429
  style: { height: randomHeight, animationDelay: `${idx * 0.08}s` },
6345
6430
  children: [
6346
- /* @__PURE__ */ jsx68("div", { className: "absolute inset-0 bg-gradient-to-r from-white/40 via-transparent to-white/40 animate-shimmer-bar" }),
6347
- /* @__PURE__ */ jsx68("div", { className: "absolute bottom-1 left-1/2 w-4 h-1 rounded-full transform -translate-x-1/2 blur-sm" })
6431
+ /* @__PURE__ */ jsx69("div", { className: "absolute inset-0 bg-gradient-to-r from-white/40 via-transparent to-white/40 animate-shimmer-bar" }),
6432
+ /* @__PURE__ */ jsx69("div", { className: "absolute bottom-1 left-1/2 w-4 h-1 rounded-full transform -translate-x-1/2 blur-sm" })
6348
6433
  ]
6349
6434
  },
6350
6435
  `bar-${idx}`
@@ -6355,74 +6440,74 @@ var ChartComponent = ({
6355
6440
  );
6356
6441
  }
6357
6442
  if (data.length === 0) {
6358
- return /* @__PURE__ */ jsx68(
6443
+ return /* @__PURE__ */ jsx69(
6359
6444
  "div",
6360
6445
  {
6361
6446
  className: `relative flex flex-col items-center justify-center w-full h-[300px] md:h-[400px] bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl p-6 ${className}`,
6362
6447
  style,
6363
- children: /* @__PURE__ */ jsx68("div", { className: "text-center", children: /* @__PURE__ */ jsx68("div", { className: "inline-flex items-center space-x-2 bg-white/80 px-6 py-3 rounded-xl backdrop-blur-sm border border-gray-200 shadow-lg", children: /* @__PURE__ */ jsx68("span", { className: "text-sm font-medium text-gray-600", children: "No data" }) }) })
6448
+ children: /* @__PURE__ */ jsx69("div", { className: "text-center", children: /* @__PURE__ */ jsx69("div", { className: "inline-flex items-center space-x-2 bg-white/80 px-6 py-3 rounded-xl backdrop-blur-sm border border-gray-200 shadow-lg", children: /* @__PURE__ */ jsx69("span", { className: "text-sm font-medium text-gray-600", children: "No data" }) }) })
6364
6449
  }
6365
6450
  );
6366
6451
  }
6367
6452
  const isLegendRight = !forceMobile && legendPosition === "right";
6368
- return /* @__PURE__ */ jsxs42(
6453
+ return /* @__PURE__ */ jsxs43(
6369
6454
  "div",
6370
6455
  {
6371
6456
  className: `relative flex ${isLegendRight ? "flex-row items-stretch gap-4" : "flex-col items-center"} ${className}`,
6372
6457
  style,
6373
6458
  children: [
6374
- /* @__PURE__ */ jsxs42(
6459
+ /* @__PURE__ */ jsxs43(
6375
6460
  "div",
6376
6461
  {
6377
6462
  className: `relative flex items-center justify-center ${isLegendRight ? "flex-[2] min-w-0 max-w-[70%] h-[450px]" : "w-full md:w-[75%] h-[450px] mb-2"}`,
6378
6463
  children: [
6379
- isPaginationEnabled && rawMeta && /* @__PURE__ */ jsxs42("div", { className: "flex items-center justify-between mb-4 px-2", children: [
6380
- /* @__PURE__ */ jsxs42("div", { className: "flex items-center space-x-2 sm:hidden w-full justify-center", children: [
6381
- /* @__PURE__ */ jsx68(
6464
+ isPaginationEnabled && rawMeta && /* @__PURE__ */ jsxs43("div", { className: "flex items-center justify-between mb-4 px-2", children: [
6465
+ /* @__PURE__ */ jsxs43("div", { className: "flex items-center space-x-2 sm:hidden w-full justify-center", children: [
6466
+ /* @__PURE__ */ jsx69(
6382
6467
  "button",
6383
6468
  {
6384
6469
  onClick: () => handlePageChange(currentPage - 1),
6385
6470
  disabled: currentPage === 1 || localLoading,
6386
6471
  className: "flex-1 px-3 py-2 text-xs font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center justify-center space-x-1 min-w-0",
6387
- children: /* @__PURE__ */ jsx68("span", { children: "\u2190 Prev" })
6472
+ children: /* @__PURE__ */ jsx69("span", { children: "\u2190 Prev" })
6388
6473
  }
6389
6474
  ),
6390
- /* @__PURE__ */ jsx68("span", { className: "px-2 py-2 text-xs font-semibold text-gray-700 min-w-[36px] text-center flex-shrink-0", children: currentPage }),
6391
- /* @__PURE__ */ jsx68(
6475
+ /* @__PURE__ */ jsx69("span", { className: "px-2 py-2 text-xs font-semibold text-gray-700 min-w-[36px] text-center flex-shrink-0", children: currentPage }),
6476
+ /* @__PURE__ */ jsx69(
6392
6477
  "button",
6393
6478
  {
6394
6479
  onClick: () => handlePageChange(currentPage + 1),
6395
6480
  disabled: currentPage >= rawMeta.pages || localLoading,
6396
6481
  className: "flex-1 px-3 py-2 text-xs font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center justify-center space-x-1 min-w-0",
6397
- children: /* @__PURE__ */ jsx68("span", { children: "Next \u2192" })
6482
+ children: /* @__PURE__ */ jsx69("span", { children: "Next \u2192" })
6398
6483
  }
6399
6484
  )
6400
6485
  ] }),
6401
- /* @__PURE__ */ jsxs42("div", { className: "hidden sm:flex items-center space-x-2", children: [
6402
- /* @__PURE__ */ jsx68(
6486
+ /* @__PURE__ */ jsxs43("div", { className: "hidden sm:flex items-center space-x-2", children: [
6487
+ /* @__PURE__ */ jsx69(
6403
6488
  "button",
6404
6489
  {
6405
6490
  onClick: () => handlePageChange(currentPage - 1),
6406
6491
  disabled: currentPage === 1 || localLoading,
6407
6492
  className: "px-3 py-1.5 text-sm font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center space-x-1",
6408
- children: /* @__PURE__ */ jsx68("span", { children: "\u2190 Prev" })
6493
+ children: /* @__PURE__ */ jsx69("span", { children: "\u2190 Prev" })
6409
6494
  }
6410
6495
  ),
6411
- /* @__PURE__ */ jsx68("span", { className: "px-3 py-1 text-sm font-medium text-gray-700", children: currentPage }),
6412
- /* @__PURE__ */ jsx68(
6496
+ /* @__PURE__ */ jsx69("span", { className: "px-3 py-1 text-sm font-medium text-gray-700", children: currentPage }),
6497
+ /* @__PURE__ */ jsx69(
6413
6498
  "button",
6414
6499
  {
6415
6500
  onClick: () => handlePageChange(currentPage + 1),
6416
6501
  disabled: currentPage >= rawMeta.pages || localLoading,
6417
6502
  className: "px-3 py-1.5 text-sm font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center space-x-1",
6418
- children: /* @__PURE__ */ jsx68("span", { children: "Next \u2192" })
6503
+ children: /* @__PURE__ */ jsx69("span", { children: "Next \u2192" })
6419
6504
  }
6420
6505
  )
6421
6506
  ] })
6422
6507
  ] }),
6423
- /* @__PURE__ */ jsx68(ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ jsxs42(BarChart, { data, children: [
6424
- /* @__PURE__ */ jsx68(CartesianGrid, { strokeDasharray: "3 3" }),
6425
- /* @__PURE__ */ jsx68(
6508
+ /* @__PURE__ */ jsx69(ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ jsxs43(BarChart, { data, children: [
6509
+ /* @__PURE__ */ jsx69(CartesianGrid, { strokeDasharray: "3 3" }),
6510
+ /* @__PURE__ */ jsx69(
6426
6511
  XAxis,
6427
6512
  {
6428
6513
  dataKey: dataLabel,
@@ -6440,7 +6525,7 @@ var ChartComponent = ({
6440
6525
  className: "hidden sm:block"
6441
6526
  }
6442
6527
  ),
6443
- /* @__PURE__ */ jsx68(
6528
+ /* @__PURE__ */ jsx69(
6444
6529
  YAxis,
6445
6530
  {
6446
6531
  tickFormatter: (value) => `${(value / 1e3).toFixed(0)}k`,
@@ -6453,8 +6538,8 @@ var ChartComponent = ({
6453
6538
  width: 60
6454
6539
  }
6455
6540
  ),
6456
- /* @__PURE__ */ jsx68(Tooltip2, { formatter: (value) => value != null ? [`${value}`, "Count"] : ["", "Count"] }),
6457
- /* @__PURE__ */ jsx68(
6541
+ /* @__PURE__ */ jsx69(Tooltip2, { formatter: (value) => value != null ? [`${value}`, "Count"] : ["", "Count"] }),
6542
+ /* @__PURE__ */ jsx69(
6458
6543
  Bar,
6459
6544
  {
6460
6545
  dataKey,
@@ -6462,13 +6547,13 @@ var ChartComponent = ({
6462
6547
  isAnimationActive: false
6463
6548
  }
6464
6549
  )
6465
- ] }) : /* @__PURE__ */ jsxs42(AreaChart, { data, children: [
6466
- /* @__PURE__ */ jsx68("defs", { children: /* @__PURE__ */ jsxs42("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
6467
- /* @__PURE__ */ jsx68("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
6468
- /* @__PURE__ */ jsx68("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
6550
+ ] }) : /* @__PURE__ */ jsxs43(AreaChart, { data, children: [
6551
+ /* @__PURE__ */ jsx69("defs", { children: /* @__PURE__ */ jsxs43("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
6552
+ /* @__PURE__ */ jsx69("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
6553
+ /* @__PURE__ */ jsx69("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
6469
6554
  ] }) }),
6470
- /* @__PURE__ */ jsx68(CartesianGrid, { strokeDasharray: "3 3" }),
6471
- /* @__PURE__ */ jsx68(
6555
+ /* @__PURE__ */ jsx69(CartesianGrid, { strokeDasharray: "3 3" }),
6556
+ /* @__PURE__ */ jsx69(
6472
6557
  XAxis,
6473
6558
  {
6474
6559
  dataKey: dataLabel,
@@ -6482,7 +6567,7 @@ var ChartComponent = ({
6482
6567
  }
6483
6568
  }
6484
6569
  ),
6485
- /* @__PURE__ */ jsx68(
6570
+ /* @__PURE__ */ jsx69(
6486
6571
  YAxis,
6487
6572
  {
6488
6573
  tickFormatter: (value) => `${(value / 1e3).toFixed(0)}k`,
@@ -6495,8 +6580,8 @@ var ChartComponent = ({
6495
6580
  width: 60
6496
6581
  }
6497
6582
  ),
6498
- /* @__PURE__ */ jsx68(Tooltip2, { formatter: (value) => value != null ? `${value}k` : "" }),
6499
- /* @__PURE__ */ jsx68(
6583
+ /* @__PURE__ */ jsx69(Tooltip2, { formatter: (value) => value != null ? `${value}k` : "" }),
6584
+ /* @__PURE__ */ jsx69(
6500
6585
  Area,
6501
6586
  {
6502
6587
  type: "monotone",
@@ -6511,15 +6596,15 @@ var ChartComponent = ({
6511
6596
  ]
6512
6597
  }
6513
6598
  ),
6514
- showLegends && /* @__PURE__ */ jsx68("div", { className: isLegendRight ? "flex flex-col w-[30%] min-w-[180px] justify-center" : "w-full", children: renderLegends })
6599
+ showLegends && /* @__PURE__ */ jsx69("div", { className: isLegendRight ? "flex flex-col w-[30%] min-w-[180px] justify-center" : "w-full", children: renderLegends })
6515
6600
  ]
6516
6601
  }
6517
6602
  );
6518
6603
  };
6519
- var BarChart_default = React14.memo(ChartComponent);
6604
+ var BarChart_default = React15.memo(ChartComponent);
6520
6605
 
6521
6606
  // src/components/Chart/PieChart.tsx
6522
- import React15, { useEffect as useEffect30, useMemo as useMemo12, useState as useState16 } from "react";
6607
+ import React16, { useEffect as useEffect31, useMemo as useMemo12, useState as useState17 } from "react";
6523
6608
  import axios5 from "axios";
6524
6609
  import {
6525
6610
  PieChart,
@@ -6528,7 +6613,7 @@ import {
6528
6613
  ResponsiveContainer as ResponsiveContainer2,
6529
6614
  Tooltip as Tooltip3
6530
6615
  } from "recharts";
6531
- import { jsx as jsx69, jsxs as jsxs43 } from "react/jsx-runtime";
6616
+ import { jsx as jsx70, jsxs as jsxs44 } from "react/jsx-runtime";
6532
6617
  var getRandomColor = () => {
6533
6618
  const palette2 = [
6534
6619
  "#2563eb",
@@ -6609,11 +6694,11 @@ var DonutChart = ({
6609
6694
  const showLegends = props.showLegends ?? true;
6610
6695
  const canvasMode = props.canvasMode;
6611
6696
  const useApi = source === "api" && !!apiUrl;
6612
- const [rawData, setRawData] = useState16([]);
6613
- const [localLoading, setLocalLoading] = useState16(false);
6697
+ const [rawData, setRawData] = useState17([]);
6698
+ const [localLoading, setLocalLoading] = useState17(false);
6614
6699
  const effectiveData = useApi ? rawData : props.data || [];
6615
6700
  const effectiveLoading = useApi ? localLoading : externalLoading;
6616
- useEffect30(() => {
6701
+ useEffect31(() => {
6617
6702
  if (!useApi) return;
6618
6703
  let cancelled = false;
6619
6704
  const fetchData = async () => {
@@ -6694,15 +6779,15 @@ var DonutChart = ({
6694
6779
  if (chartData.length <= 6) return { inner: 85, outer: 150 };
6695
6780
  return { inner: 70, outer: 130 };
6696
6781
  };
6697
- const [mounted, setMounted] = useState16(false);
6698
- useEffect30(() => {
6782
+ const [mounted, setMounted] = useState17(false);
6783
+ useEffect31(() => {
6699
6784
  const timeout = setTimeout(() => setMounted(true), 100);
6700
6785
  return () => clearTimeout(timeout);
6701
6786
  }, []);
6702
6787
  const renderLegends = useMemo12(() => {
6703
6788
  if (!showLegends) return null;
6704
6789
  const isLegendRight2 = !forceMobile && legendPosition === "right";
6705
- return /* @__PURE__ */ jsx69(
6790
+ return /* @__PURE__ */ jsx70(
6706
6791
  "div",
6707
6792
  {
6708
6793
  className: isLegendRight2 ? "flex flex-col gap-2 w-full min-w-0 justify-start overflow-y-auto max-h-[260px]" : "flex flex-wrap justify-center gap-2 mt-4 w-full max-w-4xl",
@@ -6717,7 +6802,7 @@ var DonutChart = ({
6717
6802
  [dataLabel]: d[dataLabel],
6718
6803
  [dataKey]: actualValue
6719
6804
  };
6720
- return /* @__PURE__ */ jsxs43(
6805
+ return /* @__PURE__ */ jsxs44(
6721
6806
  "div",
6722
6807
  {
6723
6808
  role: onLegendClick ? "button" : void 0,
@@ -6726,22 +6811,22 @@ var DonutChart = ({
6726
6811
  onKeyDown: onLegendClick ? (e) => e.key === "Enter" && onLegendClick(payload) : void 0,
6727
6812
  className: `flex items-center space-x-2 rounded-lg border border-gray-200/50 px-3 py-1.5 w-[48%] sm:w-[32%] md:w-auto bg-white/80 backdrop-blur-sm shadow-sm hover:shadow-md transition-all ${onLegendClick ? "cursor-pointer" : ""}`,
6728
6813
  children: [
6729
- /* @__PURE__ */ jsx69(
6814
+ /* @__PURE__ */ jsx70(
6730
6815
  "span",
6731
6816
  {
6732
6817
  className: "inline-block w-[12px] h-[12px] rounded-full shrink-0 border-2 border-white/50",
6733
6818
  style: { backgroundColor: d.color }
6734
6819
  }
6735
6820
  ),
6736
- /* @__PURE__ */ jsxs43("div", { className: "min-w-0 flex-1", children: [
6737
- /* @__PURE__ */ jsx69("span", { className: "text-gray-900 text-[11px] md:text-[13px] font-semibold block truncate leading-tight", children: d[dataLabel] }),
6738
- /* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-1 text-xs text-gray-600 font-medium", children: [
6739
- /* @__PURE__ */ jsx69("span", { children: displayValue }),
6740
- /* @__PURE__ */ jsxs43("span", { children: [
6821
+ /* @__PURE__ */ jsxs44("div", { className: "min-w-0 flex-1", children: [
6822
+ /* @__PURE__ */ jsx70("span", { className: "text-gray-900 text-[11px] md:text-[13px] font-semibold block truncate leading-tight", children: d[dataLabel] }),
6823
+ /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-1 text-xs text-gray-600 font-medium", children: [
6824
+ /* @__PURE__ */ jsx70("span", { children: displayValue }),
6825
+ /* @__PURE__ */ jsxs44("span", { children: [
6741
6826
  (actualValue / total * 100).toFixed(1),
6742
6827
  "%"
6743
6828
  ] }),
6744
- d.isBoosted && /* @__PURE__ */ jsx69("span", { className: "text-[9px] px-1 py-0.5 bg-blue-100 text-blue-700 rounded-full", children: "min" })
6829
+ d.isBoosted && /* @__PURE__ */ jsx70("span", { className: "text-[9px] px-1 py-0.5 bg-blue-100 text-blue-700 rounded-full", children: "min" })
6745
6830
  ] })
6746
6831
  ] })
6747
6832
  ]
@@ -6754,26 +6839,26 @@ var DonutChart = ({
6754
6839
  }, [chartData, data, dataLabel, dataKey, total, showLegends, onLegendClick, legendPosition, forceMobile]);
6755
6840
  if (!mounted) return null;
6756
6841
  if (effectiveLoading) {
6757
- return /* @__PURE__ */ jsxs43(
6842
+ return /* @__PURE__ */ jsxs44(
6758
6843
  "div",
6759
6844
  {
6760
6845
  className: `relative flex flex-col items-center w-full h-[300px] md:h-[400px] bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl p-6 ${className}`,
6761
6846
  style,
6762
6847
  children: [
6763
- /* @__PURE__ */ jsx69("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
6764
- /* @__PURE__ */ jsx69("div", { className: "mt-6 text-center", children: /* @__PURE__ */ jsxs43("div", { className: "inline-flex items-center space-x-2 bg-white/80 px-6 py-2 rounded-full backdrop-blur-sm border border-gray-200 shadow-lg", children: [
6765
- /* @__PURE__ */ jsx69("div", { className: "w-5 h-5 border-2 border-gray-300 border-t-blue-400 rounded-full animate-spin" }),
6766
- /* @__PURE__ */ jsx69("span", { className: "text-sm font-medium text-gray-600 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
6848
+ /* @__PURE__ */ jsx70("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
6849
+ /* @__PURE__ */ jsx70("div", { className: "mt-6 text-center", children: /* @__PURE__ */ jsxs44("div", { className: "inline-flex items-center space-x-2 bg-white/80 px-6 py-2 rounded-full backdrop-blur-sm border border-gray-200 shadow-lg", children: [
6850
+ /* @__PURE__ */ jsx70("div", { className: "w-5 h-5 border-2 border-gray-300 border-t-blue-400 rounded-full animate-spin" }),
6851
+ /* @__PURE__ */ jsx70("span", { className: "text-sm font-medium text-gray-600 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
6767
6852
  ] }) }),
6768
- /* @__PURE__ */ jsx69("div", { className: "flex flex-wrap justify-center gap-3 mt-8 w-full max-w-4xl", children: [...Array(18)].map((_, idx) => /* @__PURE__ */ jsxs43(
6853
+ /* @__PURE__ */ jsx70("div", { className: "flex flex-wrap justify-center gap-3 mt-8 w-full max-w-4xl", children: [...Array(18)].map((_, idx) => /* @__PURE__ */ jsxs44(
6769
6854
  "div",
6770
6855
  {
6771
6856
  className: `h-10 w-[48%] sm:w-[32%] md:w-32 rounded-xl bg-gradient-to-r from-gray-200 via-gray-300/50 to-gray-200 p-3 flex items-center space-x-3 animate-slide-up stagger-${idx} shadow-sm border border-gray-200/50`,
6772
6857
  children: [
6773
- /* @__PURE__ */ jsx69("div", { className: "w-4 h-4 rounded-full bg-gradient-to-r from-blue-300 to-purple-300 animate-pulse" }),
6774
- /* @__PURE__ */ jsxs43("div", { className: "flex-1 space-y-1", children: [
6775
- /* @__PURE__ */ jsx69("div", { className: "h-3 w-20 bg-gray-300 rounded animate-pulse" }),
6776
- /* @__PURE__ */ jsx69("div", { className: "h-2.5 w-16 bg-gray-200/60 rounded animate-pulse-delayed" })
6858
+ /* @__PURE__ */ jsx70("div", { className: "w-4 h-4 rounded-full bg-gradient-to-r from-blue-300 to-purple-300 animate-pulse" }),
6859
+ /* @__PURE__ */ jsxs44("div", { className: "flex-1 space-y-1", children: [
6860
+ /* @__PURE__ */ jsx70("div", { className: "h-3 w-20 bg-gray-300 rounded animate-pulse" }),
6861
+ /* @__PURE__ */ jsx70("div", { className: "h-2.5 w-16 bg-gray-200/60 rounded animate-pulse-delayed" })
6777
6862
  ] })
6778
6863
  ]
6779
6864
  },
@@ -6784,12 +6869,12 @@ var DonutChart = ({
6784
6869
  );
6785
6870
  }
6786
6871
  if (data.length === 0) {
6787
- return /* @__PURE__ */ jsx69(
6872
+ return /* @__PURE__ */ jsx70(
6788
6873
  "div",
6789
6874
  {
6790
6875
  className: `relative flex flex-col items-center justify-center w-full h-[300px] md:h-[400px] bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl p-6 ${className}`,
6791
6876
  style,
6792
- children: /* @__PURE__ */ jsx69("div", { className: "text-center", children: /* @__PURE__ */ jsx69("div", { className: "inline-flex items-center space-x-2 bg-white/80 px-6 py-3 rounded-xl backdrop-blur-sm border border-gray-200 shadow-lg", children: /* @__PURE__ */ jsx69("span", { className: "text-sm font-medium text-gray-600", children: "No data" }) }) })
6877
+ children: /* @__PURE__ */ jsx70("div", { className: "text-center", children: /* @__PURE__ */ jsx70("div", { className: "inline-flex items-center space-x-2 bg-white/80 px-6 py-3 rounded-xl backdrop-blur-sm border border-gray-200 shadow-lg", children: /* @__PURE__ */ jsx70("span", { className: "text-sm font-medium text-gray-600", children: "No data" }) }) })
6793
6878
  }
6794
6879
  );
6795
6880
  }
@@ -6797,19 +6882,19 @@ var DonutChart = ({
6797
6882
  const innerRadius = inner;
6798
6883
  const outerRadius = outer;
6799
6884
  const isLegendRight = !forceMobile && legendPosition === "right";
6800
- return /* @__PURE__ */ jsxs43(
6885
+ return /* @__PURE__ */ jsxs44(
6801
6886
  "div",
6802
6887
  {
6803
6888
  className: `relative flex ${isLegendRight ? "flex-row items-stretch gap-4" : "flex-col items-center"} ${className}`,
6804
6889
  style,
6805
6890
  children: [
6806
- /* @__PURE__ */ jsxs43(
6891
+ /* @__PURE__ */ jsxs44(
6807
6892
  "div",
6808
6893
  {
6809
6894
  className: `relative flex items-center justify-center ${isLegendRight ? "flex-[2] min-w-0 max-w-[70%]" : "w-full md:w-[75%]"} h-[280px] md:h-[380px] ${isLegendRight ? "" : "mb-2"}`,
6810
6895
  children: [
6811
- /* @__PURE__ */ jsx69(ResponsiveContainer2, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs43(PieChart, { children: [
6812
- /* @__PURE__ */ jsx69(
6896
+ /* @__PURE__ */ jsx70(ResponsiveContainer2, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs44(PieChart, { children: [
6897
+ /* @__PURE__ */ jsx70(
6813
6898
  Pie,
6814
6899
  {
6815
6900
  data: chartData,
@@ -6822,7 +6907,7 @@ var DonutChart = ({
6822
6907
  isAnimationActive: true,
6823
6908
  animationDuration: 800,
6824
6909
  minAngle: 3,
6825
- children: chartData.map((entry, index) => /* @__PURE__ */ jsx69(
6910
+ children: chartData.map((entry, index) => /* @__PURE__ */ jsx70(
6826
6911
  Cell,
6827
6912
  {
6828
6913
  fill: entry.color,
@@ -6833,7 +6918,7 @@ var DonutChart = ({
6833
6918
  ))
6834
6919
  }
6835
6920
  ),
6836
- /* @__PURE__ */ jsx69(
6921
+ /* @__PURE__ */ jsx70(
6837
6922
  Tooltip3,
6838
6923
  {
6839
6924
  formatter: (value, name, payload) => {
@@ -6856,25 +6941,25 @@ var DonutChart = ({
6856
6941
  }
6857
6942
  )
6858
6943
  ] }) }),
6859
- total > 0 && /* @__PURE__ */ jsx69("div", { className: `absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-center pointer-events-none ${forceMobile ? "text-xl px-2" : "text-3xl px-4"} font-bold bg-white/90 backdrop-blur-sm rounded-full py-1 shadow-lg`, children: /* @__PURE__ */ jsxs43("div", { className: "text-[#1f2937] leading-tight", children: [
6944
+ total > 0 && /* @__PURE__ */ jsx70("div", { className: `absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-center pointer-events-none ${forceMobile ? "text-xl px-2" : "text-3xl px-4"} font-bold bg-white/90 backdrop-blur-sm rounded-full py-1 shadow-lg`, children: /* @__PURE__ */ jsxs44("div", { className: "text-[#1f2937] leading-tight", children: [
6860
6945
  formattedTotal,
6861
- /* @__PURE__ */ jsx69("span", { className: "text-sm md:text-base font-normal text-gray-600 block md:inline-block md:ml-1", children: "total" })
6946
+ /* @__PURE__ */ jsx70("span", { className: "text-sm md:text-base font-normal text-gray-600 block md:inline-block md:ml-1", children: "total" })
6862
6947
  ] }) })
6863
6948
  ]
6864
6949
  }
6865
6950
  ),
6866
- showLegends && /* @__PURE__ */ jsx69("div", { className: isLegendRight ? "flex flex-col w-[30%] min-w-[180px] justify-center" : "w-full", children: renderLegends })
6951
+ showLegends && /* @__PURE__ */ jsx70("div", { className: isLegendRight ? "flex flex-col w-[30%] min-w-[180px] justify-center" : "w-full", children: renderLegends })
6867
6952
  ]
6868
6953
  }
6869
6954
  );
6870
6955
  };
6871
- var PieChart_default = React15.memo(DonutChart);
6956
+ var PieChart_default = React16.memo(DonutChart);
6872
6957
 
6873
6958
  // src/components/Blocks/EmailComposer.tsx
6874
- import { jsx as jsx70, jsxs as jsxs44 } from "react/jsx-runtime";
6959
+ import { jsx as jsx71, jsxs as jsxs45 } from "react/jsx-runtime";
6875
6960
  function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }) {
6876
- return /* @__PURE__ */ jsx70("div", { className, style, children: /* @__PURE__ */ jsxs44("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
6877
- /* @__PURE__ */ jsx70("div", { className: "mb-3", children: /* @__PURE__ */ jsx70(
6961
+ return /* @__PURE__ */ jsx71("div", { className, style, children: /* @__PURE__ */ jsxs45("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
6962
+ /* @__PURE__ */ jsx71("div", { className: "mb-3", children: /* @__PURE__ */ jsx71(
6878
6963
  "input",
6879
6964
  {
6880
6965
  type: "email",
@@ -6883,8 +6968,8 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6883
6968
  required: true
6884
6969
  }
6885
6970
  ) }),
6886
- /* @__PURE__ */ jsx70("div", { className: "mb-3", children: /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-2", children: [
6887
- /* @__PURE__ */ jsx70(
6971
+ /* @__PURE__ */ jsx71("div", { className: "mb-3", children: /* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-2", children: [
6972
+ /* @__PURE__ */ jsx71(
6888
6973
  "input",
6889
6974
  {
6890
6975
  type: "email",
@@ -6895,7 +6980,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6895
6980
  required: true
6896
6981
  }
6897
6982
  ),
6898
- !showCc && /* @__PURE__ */ jsx70(
6983
+ !showCc && /* @__PURE__ */ jsx71(
6899
6984
  "button",
6900
6985
  {
6901
6986
  onClick: () => setShowCc?.(true),
@@ -6903,7 +6988,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6903
6988
  children: "Cc"
6904
6989
  }
6905
6990
  ),
6906
- !showBcc && /* @__PURE__ */ jsx70(
6991
+ !showBcc && /* @__PURE__ */ jsx71(
6907
6992
  "button",
6908
6993
  {
6909
6994
  onClick: () => setShowBcc?.(true),
@@ -6912,7 +6997,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6912
6997
  }
6913
6998
  )
6914
6999
  ] }) }),
6915
- showCc && /* @__PURE__ */ jsx70("div", { className: "mb-3", children: /* @__PURE__ */ jsx70(
7000
+ showCc && /* @__PURE__ */ jsx71("div", { className: "mb-3", children: /* @__PURE__ */ jsx71(
6916
7001
  "input",
6917
7002
  {
6918
7003
  type: "text",
@@ -6922,7 +7007,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6922
7007
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
6923
7008
  }
6924
7009
  ) }),
6925
- showBcc && /* @__PURE__ */ jsx70("div", { className: "mb-3", children: /* @__PURE__ */ jsx70(
7010
+ showBcc && /* @__PURE__ */ jsx71("div", { className: "mb-3", children: /* @__PURE__ */ jsx71(
6926
7011
  "input",
6927
7012
  {
6928
7013
  type: "text",
@@ -6932,7 +7017,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6932
7017
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
6933
7018
  }
6934
7019
  ) }),
6935
- /* @__PURE__ */ jsx70("div", { className: "mb-3", children: /* @__PURE__ */ jsx70(
7020
+ /* @__PURE__ */ jsx71("div", { className: "mb-3", children: /* @__PURE__ */ jsx71(
6936
7021
  "input",
6937
7022
  {
6938
7023
  type: "text",
@@ -6942,11 +7027,11 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6942
7027
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
6943
7028
  }
6944
7029
  ) }),
6945
- /* @__PURE__ */ jsx70("div", { className: "mb-4", children: /* @__PURE__ */ jsx70(MyEditor, { value: body, onChange: setBody }) }),
6946
- /* @__PURE__ */ jsxs44("div", { className: "flex justify-end gap-2", children: [
6947
- /* @__PURE__ */ jsx70("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
6948
- /* @__PURE__ */ jsx70("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
6949
- /* @__PURE__ */ jsx70("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
7030
+ /* @__PURE__ */ jsx71("div", { className: "mb-4", children: /* @__PURE__ */ jsx71(MyEditor, { value: body, onChange: setBody }) }),
7031
+ /* @__PURE__ */ jsxs45("div", { className: "flex justify-end gap-2", children: [
7032
+ /* @__PURE__ */ jsx71("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
7033
+ /* @__PURE__ */ jsx71("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
7034
+ /* @__PURE__ */ jsx71("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
6950
7035
  ] })
6951
7036
  ] }) });
6952
7037
  }
@@ -6954,10 +7039,10 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6954
7039
  // src/components/ui/sonner.tsx
6955
7040
  import { useTheme } from "next-themes";
6956
7041
  import { Toaster as Sonner } from "sonner";
6957
- import { jsx as jsx71 } from "react/jsx-runtime";
7042
+ import { jsx as jsx72 } from "react/jsx-runtime";
6958
7043
  var Toaster = ({ ...props }) => {
6959
7044
  const { theme = "system" } = useTheme();
6960
- return /* @__PURE__ */ jsx71(
7045
+ return /* @__PURE__ */ jsx72(
6961
7046
  Sonner,
6962
7047
  {
6963
7048
  theme,
@@ -6974,6 +7059,7 @@ var Toaster = ({ ...props }) => {
6974
7059
  export {
6975
7060
  Accordion_default as Accordion,
6976
7061
  AccordionGroup_default as AccordionGroup,
7062
+ Audio_default as Audio,
6977
7063
  BarChart_default as BarChart,
6978
7064
  Breadcrumb_default as Breadcrumb,
6979
7065
  Button_default as Button,