fui-material 2.7.15 → 2.7.17

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.
@@ -7,32 +7,32 @@ import { renderToStaticMarkup } from "react-dom/server";
7
7
  import { initializeModule as initializeModule$1, installFormatCode } from "allorion-exporting-html-to-xlsx";
8
8
  import axios from "axios";
9
9
  import { useQueryClient, useMutation, useQuery } from "@tanstack/react-query";
10
- import './index.css';const btn = "_btn_u1cjw_1";
11
- const disabled$4 = "_disabled_u1cjw_31";
12
- const stylesBtn = {
10
+ import './index.css';const btn = "_btn_1s0n3_1";
11
+ const disabled$4 = "_disabled_1s0n3_31";
12
+ const styles$A = {
13
13
  btn,
14
14
  disabled: disabled$4,
15
- "btn-xs": "_btn-xs_u1cjw_40",
16
- "btn-sm": "_btn-sm_u1cjw_51",
17
- "btn-lg": "_btn-lg_u1cjw_62",
18
- "btn-primary": "_btn-primary_u1cjw_73",
19
- "btn-outline-primary": "_btn-outline-primary_u1cjw_87",
20
- "btn-secondary": "_btn-secondary_u1cjw_104",
21
- "btn-outline-secondary": "_btn-outline-secondary_u1cjw_118",
22
- "btn-success": "_btn-success_u1cjw_135",
23
- "btn-outline-success": "_btn-outline-success_u1cjw_149",
24
- "btn-danger": "_btn-danger_u1cjw_166",
25
- "btn-outline-danger": "_btn-outline-danger_u1cjw_180",
26
- "btn-warning": "_btn-warning_u1cjw_197",
27
- "btn-outline-warning": "_btn-outline-warning_u1cjw_211",
28
- "btn-info": "_btn-info_u1cjw_228",
29
- "btn-outline-info": "_btn-outline-info_u1cjw_242",
30
- "btn-light": "_btn-light_u1cjw_259",
31
- "btn-outline-light": "_btn-outline-light_u1cjw_274",
32
- "btn-dark": "_btn-dark_u1cjw_291",
33
- "btn-outline-dark": "_btn-outline-dark_u1cjw_305",
34
- "btn-link": "_btn-link_u1cjw_322",
35
- "btn-outline-link": "_btn-outline-link_u1cjw_338"
15
+ "btn-xs": "_btn-xs_1s0n3_40",
16
+ "btn-sm": "_btn-sm_1s0n3_51",
17
+ "btn-lg": "_btn-lg_1s0n3_62",
18
+ "btn-primary": "_btn-primary_1s0n3_73",
19
+ "btn-outline-primary": "_btn-outline-primary_1s0n3_87",
20
+ "btn-secondary": "_btn-secondary_1s0n3_104",
21
+ "btn-outline-secondary": "_btn-outline-secondary_1s0n3_118",
22
+ "btn-success": "_btn-success_1s0n3_135",
23
+ "btn-outline-success": "_btn-outline-success_1s0n3_149",
24
+ "btn-danger": "_btn-danger_1s0n3_166",
25
+ "btn-outline-danger": "_btn-outline-danger_1s0n3_180",
26
+ "btn-warning": "_btn-warning_1s0n3_197",
27
+ "btn-outline-warning": "_btn-outline-warning_1s0n3_211",
28
+ "btn-info": "_btn-info_1s0n3_228",
29
+ "btn-outline-info": "_btn-outline-info_1s0n3_242",
30
+ "btn-light": "_btn-light_1s0n3_259",
31
+ "btn-outline-light": "_btn-outline-light_1s0n3_274",
32
+ "btn-dark": "_btn-dark_1s0n3_291",
33
+ "btn-outline-dark": "_btn-outline-dark_1s0n3_305",
34
+ "btn-link": "_btn-link_1s0n3_322",
35
+ "btn-outline-link": "_btn-outline-link_1s0n3_338"
36
36
  };
37
37
  const FButton = forwardRef(({
38
38
  children,
@@ -55,9 +55,9 @@ const FButton = forwardRef(({
55
55
  };
56
56
  const variantClass = variant === "contained" ? `btn-${color}` : `btn-outline-${color}`;
57
57
  const buttonClasses = [
58
- stylesBtn["btn"],
59
- stylesBtn[size],
60
- stylesBtn[variantClass],
58
+ styles$A["btn"],
59
+ styles$A[size],
60
+ styles$A[variantClass],
61
61
  className
62
62
  ].filter(Boolean).join(" ");
63
63
  return /* @__PURE__ */ jsx(
@@ -75,8 +75,8 @@ const FButton = forwardRef(({
75
75
  });
76
76
  FButton.displayName = "FButton";
77
77
  const defaultStyles = {
78
- "f-button-file": "_f-button-file_i2hex_1",
79
- "file-preview-list": "_file-preview-list_i2hex_1"
78
+ "f-button-file": "_f-button-file_7ljnt_1",
79
+ "file-preview-list": "_file-preview-list_7ljnt_1"
80
80
  };
81
81
  const FTrashIcon = React.forwardRef(({
82
82
  color = "primary",
@@ -120,15 +120,15 @@ const FTrashIcon = React.forwardRef(({
120
120
  );
121
121
  });
122
122
  FTrashIcon.displayName = "FTrashIcon";
123
- const progressBar = "_progressBar_1xp9s_48";
124
- const completed = "_completed_1xp9s_60";
125
- const progress = "_progress_1xp9s_48";
123
+ const progressBar = "_progressBar_1iwax_48";
124
+ const completed = "_completed_1iwax_60";
125
+ const progress = "_progress_1iwax_48";
126
126
  const styles$z = {
127
- "file-preview-card": "_file-preview-card_1xp9s_1",
128
- "file-preview-info": "_file-preview-info_1xp9s_22",
129
- "file-preview-name": "_file-preview-name_1xp9s_28",
130
- "file-preview-size": "_file-preview-size_1xp9s_36",
131
- "trash-icon": "_trash-icon_1xp9s_42",
127
+ "file-preview-card": "_file-preview-card_1iwax_1",
128
+ "file-preview-info": "_file-preview-info_1iwax_22",
129
+ "file-preview-name": "_file-preview-name_1iwax_28",
130
+ "file-preview-size": "_file-preview-size_1iwax_36",
131
+ "trash-icon": "_trash-icon_1iwax_42",
132
132
  progressBar,
133
133
  completed,
134
134
  progress
@@ -653,17 +653,19 @@ const FContainer = ({
653
653
  }
654
654
  );
655
655
  };
656
- const panel = "_panel_yplsg_1";
656
+ const panel = "_panel_d74rg_1";
657
+ const compact = "_compact_d74rg_29";
657
658
  const styles$u = {
658
659
  panel,
659
- "panel-default": "_panel-default_yplsg_6",
660
- "panel-heading": "_panel-heading_yplsg_12",
661
- "panel-body": "_panel-body_yplsg_24",
662
- "portlet-body": "_portlet-body_yplsg_29",
663
- "panel-title": "_panel-title_yplsg_29",
664
- "panel-group": "_panel-group_yplsg_30",
665
- "panel-group-accordion": "_panel-group-accordion_yplsg_30",
666
- "form-title": "_form-title_yplsg_31"
660
+ "panel-default": "_panel-default_d74rg_6",
661
+ "panel-heading": "_panel-heading_d74rg_12",
662
+ "panel-body": "_panel-body_d74rg_24",
663
+ compact,
664
+ "panel-title": "_panel-title_d74rg_40",
665
+ "portlet-body": "_portlet-body_d74rg_44",
666
+ "panel-group": "_panel-group_d74rg_45",
667
+ "panel-group-accordion": "_panel-group-accordion_d74rg_45",
668
+ "form-title": "_form-title_d74rg_46"
667
669
  };
668
670
  const FPaper = ({
669
671
  label,
@@ -674,7 +676,8 @@ const FPaper = ({
674
676
  id,
675
677
  className,
676
678
  onAnimationEnd,
677
- animated
679
+ animated,
680
+ compact: compact2 = false
678
681
  }) => {
679
682
  useEffect(() => {
680
683
  if (animated) {
@@ -687,7 +690,7 @@ const FPaper = ({
687
690
  return /* @__PURE__ */ jsxs(
688
691
  "div",
689
692
  {
690
- className: `${styles$u["panel"]} ${styles$u["panel-default"]} ${className || ""} ${animated ? `${styles$u[`animated-${animated.name}`]} ${animated.name}` : ""}`,
693
+ className: `${styles$u["panel"]} ${styles$u["panel-default"]} ${compact2 ? styles$u["compact"] : ""} ${className || ""} ${animated ? `${styles$u[`animated-${animated.name}`]} ${animated.name}` : ""}`,
691
694
  style: st,
692
695
  id,
693
696
  onAnimationEnd,
@@ -712,26 +715,26 @@ const FPaper = ({
712
715
  }
713
716
  );
714
717
  };
715
- const bordered = "_bordered_ld5gh_18";
716
- const left$1 = "_left_ld5gh_40";
717
- const center = "_center_ld5gh_43";
718
- const right = "_right_ld5gh_46";
718
+ const bordered = "_bordered_1blpv_18";
719
+ const left$1 = "_left_1blpv_40";
720
+ const center = "_center_1blpv_43";
721
+ const right = "_right_1blpv_46";
719
722
  const styles$t = {
720
- "f-table-component": "_f-table-component_ld5gh_1",
721
- "f-table-component__table": "_f-table-component__table_ld5gh_7",
723
+ "f-table-component": "_f-table-component_1blpv_1",
724
+ "f-table-component__table": "_f-table-component__table_1blpv_7",
722
725
  bordered,
723
- "bordered-half": "_bordered-half_ld5gh_22",
724
- "f-table-component__table_header": "_f-table-component__table_header_ld5gh_25",
725
- "is-sticky": "_is-sticky_ld5gh_29",
726
- "f-table-component__table_header-cell": "_f-table-component__table_header-cell_ld5gh_37",
726
+ "bordered-half": "_bordered-half_1blpv_22",
727
+ "f-table-component__table_header": "_f-table-component__table_header_1blpv_25",
728
+ "is-sticky": "_is-sticky_1blpv_29",
729
+ "f-table-component__table_header-cell": "_f-table-component__table_header-cell_1blpv_37",
727
730
  left: left$1,
728
731
  center,
729
732
  right,
730
- "f-table-component__table_body": "_f-table-component__table_body_ld5gh_65",
731
- "f-table-component__table_row": "_f-table-component__table_row_ld5gh_68",
732
- "f-table-component__table_row_no-hover": "_f-table-component__table_row_no-hover_ld5gh_68",
733
- "f-table-component__table_body-cell": "_f-table-component__table_body-cell_ld5gh_81",
734
- "f-table-component__table_footer": "_f-table-component__table_footer_ld5gh_97"
733
+ "f-table-component__table_body": "_f-table-component__table_body_1blpv_65",
734
+ "f-table-component__table_row": "_f-table-component__table_row_1blpv_68",
735
+ "f-table-component__table_row_no-hover": "_f-table-component__table_row_no-hover_1blpv_68",
736
+ "f-table-component__table_body-cell": "_f-table-component__table_body-cell_1blpv_81",
737
+ "f-table-component__table_footer": "_f-table-component__table_footer_1blpv_97"
735
738
  };
736
739
  const FTableHead = ({
737
740
  st,
@@ -1018,20 +1021,20 @@ const FTableFooter = ({
1018
1021
  }
1019
1022
  );
1020
1023
  };
1021
- const entering = "_entering_dwagt_17";
1022
- const exiting = "_exiting_dwagt_23";
1023
- const hide = "_hide_dwagt_45";
1024
+ const entering = "_entering_wcyn4_19";
1025
+ const exiting = "_exiting_wcyn4_25";
1026
+ const hide = "_hide_wcyn4_50";
1024
1027
  const styles$s = {
1025
- "f-dialog": "_f-dialog_dwagt_1",
1028
+ "f-dialog": "_f-dialog_wcyn4_1",
1026
1029
  entering,
1027
- "f-dialog__content": "_f-dialog__content_dwagt_20",
1030
+ "f-dialog__content": "_f-dialog__content_wcyn4_22",
1028
1031
  exiting,
1029
1032
  hide,
1030
- "f-dialog__header": "_f-dialog__header_dwagt_49",
1031
- "f-dialog__header_title": "_f-dialog__header_title_dwagt_61",
1032
- "f-dialog__header_close": "_f-dialog__header_close_dwagt_72",
1033
- "f-dialog__body": "_f-dialog__body_dwagt_87",
1034
- "f-dialog__footer": "_f-dialog__footer_dwagt_92"
1033
+ "f-dialog__header": "_f-dialog__header_wcyn4_61",
1034
+ "f-dialog__header_title": "_f-dialog__header_title_wcyn4_73",
1035
+ "f-dialog__header_close": "_f-dialog__header_close_wcyn4_84",
1036
+ "f-dialog__body": "_f-dialog__body_wcyn4_110",
1037
+ "f-dialog__footer": "_f-dialog__footer_wcyn4_134"
1035
1038
  };
1036
1039
  let openDialogsCount = 0;
1037
1040
  const FDialog = ({
@@ -1161,14 +1164,22 @@ FCloseIcon.displayName = "FCloseIcon";
1161
1164
  const FDialogHeader = ({ title: title2, handleClose }) => {
1162
1165
  return /* @__PURE__ */ jsxs("div", { className: styles$s["f-dialog__header"], children: [
1163
1166
  /* @__PURE__ */ jsx("h3", { className: styles$s["f-dialog__header_title"], children: title2 }),
1164
- handleClose && /* @__PURE__ */ jsx("div", { className: styles$s["f-dialog__header_close"], children: /* @__PURE__ */ jsx(
1165
- FCloseIcon,
1167
+ handleClose && /* @__PURE__ */ jsx(
1168
+ "button",
1166
1169
  {
1167
- handleClose,
1168
- color: "primary",
1169
- size: 30
1170
+ type: "button",
1171
+ className: styles$s["f-dialog__header_close"],
1172
+ onClick: handleClose,
1173
+ "aria-label": "Закрыть диалог",
1174
+ children: /* @__PURE__ */ jsx(
1175
+ FCloseIcon,
1176
+ {
1177
+ color: "secondary",
1178
+ size: 18
1179
+ }
1180
+ )
1170
1181
  }
1171
- ) })
1182
+ )
1172
1183
  ] });
1173
1184
  };
1174
1185
  const FDialogBody = ({ st, children, scroll = true }) => {
@@ -1189,26 +1200,26 @@ const FDialogFooter = ({ children, className, st, id }) => {
1189
1200
  }
1190
1201
  );
1191
1202
  };
1192
- const loader = "_loader_1lhk7_1";
1193
- const primary = "_primary_1lhk7_42";
1194
- const secondary = "_secondary_1lhk7_46";
1195
- const success$1 = "_success_1lhk7_50";
1196
- const danger = "_danger_1lhk7_54";
1197
- const warning$4 = "_warning_1lhk7_58";
1198
- const info$2 = "_info_1lhk7_62";
1199
- const light = "_light_1lhk7_66";
1200
- const dark = "_dark_1lhk7_70";
1201
- const link = "_link_1lhk7_74";
1203
+ const loader = "_loader_1glrn_1";
1204
+ const primary = "_primary_1glrn_42";
1205
+ const secondary = "_secondary_1glrn_46";
1206
+ const success$2 = "_success_1glrn_50";
1207
+ const danger = "_danger_1glrn_54";
1208
+ const warning$5 = "_warning_1glrn_58";
1209
+ const info$3 = "_info_1glrn_62";
1210
+ const light = "_light_1glrn_66";
1211
+ const dark = "_dark_1glrn_70";
1212
+ const link = "_link_1glrn_74";
1202
1213
  const styles$r = {
1203
- "authorization-spinner": "_authorization-spinner_1lhk7_1",
1204
- "spinner-item": "_spinner-item_1lhk7_7",
1214
+ "authorization-spinner": "_authorization-spinner_1glrn_1",
1215
+ "spinner-item": "_spinner-item_1glrn_7",
1205
1216
  loader,
1206
1217
  primary,
1207
1218
  secondary,
1208
- success: success$1,
1219
+ success: success$2,
1209
1220
  danger,
1210
- warning: warning$4,
1211
- info: info$2,
1221
+ warning: warning$5,
1222
+ info: info$3,
1212
1223
  light,
1213
1224
  dark,
1214
1225
  link
@@ -1258,7 +1269,7 @@ const FPreloader = ({
1258
1269
  );
1259
1270
  };
1260
1271
  const styles$p = {
1261
- "f-checkbox": "_f-checkbox_9rvqg_1"
1272
+ "f-checkbox": "_f-checkbox_1j5ck_1"
1262
1273
  };
1263
1274
  const FCheckbox = forwardRef(
1264
1275
  ({
@@ -1281,7 +1292,7 @@ const FCheckbox = forwardRef(
1281
1292
  }
1282
1293
  );
1283
1294
  const styles$o = {
1284
- "f-radio": "_f-radio_cwhmx_1"
1295
+ "f-radio": "_f-radio_1oidm_1"
1285
1296
  };
1286
1297
  const FRadioButton = forwardRef(
1287
1298
  ({
@@ -1350,14 +1361,14 @@ const usePagination = ({
1350
1361
  }, [totalCount, pageSize, siblingCount, currentPage]);
1351
1362
  return paginationRange;
1352
1363
  };
1353
- const dots = "_dots_aham2_29";
1354
- const selected$1 = "_selected_aham2_33";
1355
- const disabled$3 = "_disabled_aham2_37";
1356
- const arrow = "_arrow_aham2_43";
1357
- const left = "_left_aham2_56";
1364
+ const dots = "_dots_uiqea_29";
1365
+ const selected$1 = "_selected_uiqea_33";
1366
+ const disabled$3 = "_disabled_uiqea_37";
1367
+ const arrow = "_arrow_uiqea_43";
1368
+ const left = "_left_uiqea_56";
1358
1369
  const styles$n = {
1359
- "pagination-container": "_pagination-container_aham2_1",
1360
- "pagination-item": "_pagination-item_aham2_9",
1370
+ "pagination-container": "_pagination-container_uiqea_1",
1371
+ "pagination-item": "_pagination-item_uiqea_9",
1361
1372
  dots,
1362
1373
  selected: selected$1,
1363
1374
  disabled: disabled$3,
@@ -1670,16 +1681,16 @@ const FOpenImgFull = ({
1670
1681
  }
1671
1682
  );
1672
1683
  };
1673
- const card$2 = "_card_1pttw_1";
1674
- const warning$3 = "_warning_1pttw_16";
1675
- const info$1 = "_info_1pttw_24";
1676
- const alert = "_alert_1pttw_32";
1684
+ const card$2 = "_card_1wjhl_1";
1685
+ const warning$4 = "_warning_1wjhl_16";
1686
+ const info$2 = "_info_1wjhl_24";
1687
+ const alert = "_alert_1wjhl_32";
1677
1688
  const styles$k = {
1678
1689
  card: card$2,
1679
- warning: warning$3,
1680
- info: info$1,
1690
+ warning: warning$4,
1691
+ info: info$2,
1681
1692
  alert,
1682
- "fv-accord-title": "_fv-accord-title_1pttw_57"
1693
+ "fv-accord-title": "_fv-accord-title_1wjhl_57"
1683
1694
  };
1684
1695
  const FAccordion = ({
1685
1696
  variant = "info",
@@ -1719,14 +1730,14 @@ const FAccordion = ({
1719
1730
  }
1720
1731
  );
1721
1732
  };
1722
- const container$1 = "_container_6r9j2_1";
1733
+ const container$1 = "_container_qk7bc_1";
1723
1734
  const styles$j = {
1724
1735
  container: container$1,
1725
- "custom-file": "_custom-file_6r9j2_6",
1726
- "custom-file-input": "_custom-file-input_6r9j2_9",
1727
- "custom-file-dropzone": "_custom-file-dropzone_6r9j2_24",
1728
- "custom-file-label": "_custom-file-label_6r9j2_24",
1729
- "custom-files-preview": "_custom-files-preview_6r9j2_71"
1736
+ "custom-file": "_custom-file_qk7bc_6",
1737
+ "custom-file-input": "_custom-file-input_qk7bc_9",
1738
+ "custom-file-dropzone": "_custom-file-dropzone_qk7bc_24",
1739
+ "custom-file-label": "_custom-file-label_qk7bc_24",
1740
+ "custom-files-preview": "_custom-files-preview_qk7bc_71"
1730
1741
  };
1731
1742
  const FInputFileForm = ({
1732
1743
  id,
@@ -2065,15 +2076,15 @@ const FFullDateField = forwardRef(
2065
2076
  );
2066
2077
  }
2067
2078
  );
2068
- const active$3 = "_active_yhck3_41";
2079
+ const active$3 = "_active_1h0yy_41";
2069
2080
  const styles$h = {
2070
- "f-select-search-db": "_f-select-search-db_yhck3_1",
2071
- "f-select-search-db__input": "_f-select-search-db__input_yhck3_7",
2072
- "f-select-search-db__input_field": "_f-select-search-db__input_field_yhck3_11",
2073
- "f-select-search-db__input_arrow": "_f-select-search-db__input_arrow_yhck3_14",
2074
- "f-select-search-db__dropdown": "_f-select-search-db__dropdown_yhck3_21",
2081
+ "f-select-search-db": "_f-select-search-db_1h0yy_1",
2082
+ "f-select-search-db__input": "_f-select-search-db__input_1h0yy_7",
2083
+ "f-select-search-db__input_field": "_f-select-search-db__input_field_1h0yy_11",
2084
+ "f-select-search-db__input_arrow": "_f-select-search-db__input_arrow_1h0yy_14",
2085
+ "f-select-search-db__dropdown": "_f-select-search-db__dropdown_1h0yy_21",
2075
2086
  active: active$3,
2076
- "f-select-search-db__dropdown_content": "_f-select-search-db__dropdown_content_yhck3_45"
2087
+ "f-select-search-db__dropdown_content": "_f-select-search-db__dropdown_content_1h0yy_45"
2077
2088
  };
2078
2089
  const FSelectSearchDb = ({
2079
2090
  fetchingFunc,
@@ -2424,8 +2435,8 @@ const FAlert = ({
2424
2435
  buttonClose = false,
2425
2436
  size
2426
2437
  }) => {
2427
- const visible = useRef();
2428
- const hidden = useRef();
2438
+ const visible2 = useRef();
2439
+ const hidden2 = useRef();
2429
2440
  const close = useRef();
2430
2441
  const [randomId] = useState(fGenerateUniqueId());
2431
2442
  let newTime = displayTime;
@@ -2443,7 +2454,7 @@ const FAlert = ({
2443
2454
  });
2444
2455
  }
2445
2456
  }
2446
- visible.current = setTimeout(() => {
2457
+ visible2.current = setTimeout(() => {
2447
2458
  if (open) {
2448
2459
  const el = document.querySelector(`#f-block-alert-${randomId}`);
2449
2460
  if (el !== null) {
@@ -2458,7 +2469,7 @@ const FAlert = ({
2458
2469
  const el = document.querySelector(`#f-block-alert-${randomId}`);
2459
2470
  if (el !== null) {
2460
2471
  progress2.style.transition = `${newTime}s linear`;
2461
- hidden.current = setTimeout(() => {
2472
+ hidden2.current = setTimeout(() => {
2462
2473
  el.classList.remove("f-alert-visible");
2463
2474
  el.classList.add("f-alert-hidden");
2464
2475
  }, (newTime - 1) * 1e3);
@@ -2613,8 +2624,8 @@ const FAlert = ({
2613
2624
  onClose(false);
2614
2625
  el.classList.remove("f-alert-visible");
2615
2626
  el.classList.remove("f-alert-hidden");
2616
- clearTimeout(visible.current);
2617
- clearTimeout(hidden.current);
2627
+ clearTimeout(visible2.current);
2628
+ clearTimeout(hidden2.current);
2618
2629
  clearTimeout(close.current);
2619
2630
  }
2620
2631
  }
@@ -2704,14 +2715,14 @@ const FNative = ({
2704
2715
  )
2705
2716
  ] });
2706
2717
  };
2707
- const horizontal = "_horizontal_zlvc7_1";
2708
- const vertical = "_vertical_zlvc7_7";
2709
- const active$2 = "_active_zlvc7_50";
2718
+ const horizontal = "_horizontal_hbjfv_1";
2719
+ const vertical = "_vertical_hbjfv_7";
2720
+ const active$2 = "_active_hbjfv_50";
2710
2721
  const styles$f = {
2711
- "f-tabs": "_f-tabs_zlvc7_1",
2722
+ "f-tabs": "_f-tabs_hbjfv_1",
2712
2723
  horizontal,
2713
2724
  vertical,
2714
- "f-tabs__tab": "_f-tabs__tab_zlvc7_16",
2725
+ "f-tabs__tab": "_f-tabs__tab_hbjfv_16",
2715
2726
  active: active$2
2716
2727
  };
2717
2728
  const FTabs = ({
@@ -2854,12 +2865,12 @@ const FDropdownItem = ({
2854
2865
  );
2855
2866
  };
2856
2867
  const styles$d = {
2857
- "f-search-box": "_f-search-box_1ce2j_1",
2858
- "f-search-box__input": "_f-search-box__input_1ce2j_7",
2859
- "f-search-box__button": "_f-search-box__button_1ce2j_13",
2860
- "f-search-box__button_search": "_f-search-box__button_search_1ce2j_19",
2861
- "clear-on": "_clear-on_1ce2j_23",
2862
- "f-search-box__button_clear": "_f-search-box__button_clear_1ce2j_26"
2868
+ "f-search-box": "_f-search-box_1yju1_1",
2869
+ "f-search-box__input": "_f-search-box__input_1yju1_6",
2870
+ "f-search-box__button": "_f-search-box__button_1yju1_12",
2871
+ "f-search-box__button_search": "_f-search-box__button_search_1yju1_18",
2872
+ "clear-on": "_clear-on_1yju1_22",
2873
+ "f-search-box__button_clear": "_f-search-box__button_clear_1yju1_25"
2863
2874
  };
2864
2875
  const FSearchBox = forwardRef(
2865
2876
  ({
@@ -2900,7 +2911,7 @@ const FSearchBox = forwardRef(
2900
2911
  /* @__PURE__ */ jsx(
2901
2912
  FButton,
2902
2913
  {
2903
- className: `${styles$d["f-search-box__button_search"]} ${clearDataFromInput ? styles$d["clear-on"] : ""}`,
2914
+ className: `${styles$d["f-search-box__button_search"]} ${clearDataFromInput ? styles$d["clear-on"] : ""} f-search-box__button_search-st`,
2904
2915
  type: "button",
2905
2916
  disabled: disabled2,
2906
2917
  onClick: onClickButton,
@@ -2912,7 +2923,7 @@ const FSearchBox = forwardRef(
2912
2923
  clearDataFromInput && /* @__PURE__ */ jsx(
2913
2924
  FButton,
2914
2925
  {
2915
- className: `${styles$d["f-search-box__button_clear"]}`,
2926
+ className: `${styles$d["f-search-box__button_clear"]} f-search-box__button_clear-st`,
2916
2927
  type: "button",
2917
2928
  disabled: disabled2,
2918
2929
  onClick: clearDataFromInput,
@@ -3078,9 +3089,9 @@ const FCarouselItem = ({
3078
3089
  }) => {
3079
3090
  return /* @__PURE__ */ jsx("div", { className: `${styles$c["f-carousel-item"]} ${className || ""}`, id, children });
3080
3091
  };
3081
- const skeleton = "_skeleton_1ojrt_1";
3092
+ const skeleton = "_skeleton_3ica6_1";
3082
3093
  const styles$b = {
3083
- "skeleton-block": "_skeleton-block_1ojrt_1",
3094
+ "skeleton-block": "_skeleton-block_3ica6_1",
3084
3095
  skeleton
3085
3096
  };
3086
3097
  const FSkeleton = ({ children, enable, width, height }) => {
@@ -4568,161 +4579,301 @@ const FArrowDownCircleIcon = React.forwardRef(({
4568
4579
  );
4569
4580
  });
4570
4581
  FArrowDownCircleIcon.displayName = "FArrowDownCircleIcon";
4582
+ const visible$2 = "_visible_1ryqy_19";
4583
+ const hidden$2 = "_hidden_1ryqy_22";
4584
+ const info$1 = "_info_1ryqy_71";
4585
+ const success$1 = "_success_1ryqy_79";
4586
+ const warning$3 = "_warning_1ryqy_83";
4587
+ const error$1 = "_error_1ryqy_75";
4571
4588
  const styles$5 = {
4572
- "f-function-block-alert": "_f-function-block-alert_1jotv_1",
4573
- "f-function-alert": "_f-function-alert_1jotv_16",
4574
- "f-function-alert-ico": "_f-function-alert-ico_1jotv_24",
4575
- "info-alert": "_info-alert_1jotv_31",
4576
- "error-alert": "_error-alert_1jotv_36",
4577
- "success-alert": "_success-alert_1jotv_41",
4578
- "warning-alert": "_warning-alert_1jotv_46",
4579
- "f-function-alert-inside": "_f-function-alert-inside_1jotv_51",
4580
- "f-function-alert-header": "_f-function-alert-header_1jotv_58",
4581
- "f-function-alert-body": "_f-function-alert-body_1jotv_68",
4582
- "f-function-alert-footer": "_f-function-alert-footer_1jotv_83"
4589
+ "f-function-block-alert": "_f-function-block-alert_1ryqy_1",
4590
+ visible: visible$2,
4591
+ hidden: hidden$2,
4592
+ "f-function-alert": "_f-function-alert_1ryqy_27",
4593
+ "f-function-alert-top": "_f-function-alert-top_1ryqy_51",
4594
+ "f-function-alert-ico": "_f-function-alert-ico_1ryqy_57",
4595
+ "info-alert": "_info-alert_1ryqy_71",
4596
+ "error-alert": "_error-alert_1ryqy_75",
4597
+ "success-alert": "_success-alert_1ryqy_79",
4598
+ "warning-alert": "_warning-alert_1ryqy_83",
4599
+ "f-function-alert-inside": "_f-function-alert-inside_1ryqy_87",
4600
+ "f-function-alert-header": "_f-function-alert-header_1ryqy_94",
4601
+ "f-function-alert-body": "_f-function-alert-body_1ryqy_112",
4602
+ "f-function-alert-footer": "_f-function-alert-footer_1ryqy_128",
4603
+ "btn-action": "_btn-action_1ryqy_135",
4604
+ info: info$1,
4605
+ success: success$1,
4606
+ warning: warning$3,
4607
+ error: error$1,
4608
+ "close-btn": "_close-btn_1ryqy_197"
4583
4609
  };
4584
4610
  const fAlert = ({ title: title2, body, variant = "info" }) => {
4585
- let ico = "";
4586
- switch (variant) {
4587
- case "info":
4588
- ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>';
4589
- break;
4590
- case "success":
4591
- ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="M10.97 4.97a.75.75 0 0 1 1.071 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.235.235 0 0 1 .02-.022z"/>';
4592
- break;
4593
- case "error":
4594
- ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/>';
4595
- break;
4596
- case "warning":
4597
- ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z"/>';
4598
- break;
4599
- }
4600
- const arrBody = [];
4601
- body.split("\n").forEach((opt) => {
4602
- arrBody.push(`<span>${opt}</span>`);
4603
- });
4604
- window.document.body.insertAdjacentHTML(
4605
- "afterbegin",
4606
- `
4607
- <div class='${styles$5["f-function-block-alert"]}' id='f-function-block-alert'>
4611
+ return new Promise((resolve) => {
4612
+ let ico = "";
4613
+ switch (variant) {
4614
+ case "info":
4615
+ ico = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
4616
+ <circle cx="12" cy="12" r="10"/>
4617
+ <line x1="12" y1="16" x2="12" y2="12"/>
4618
+ <line x1="12" y1="8" x2="12.01" y2="8"/>
4619
+ </svg>`;
4620
+ break;
4621
+ case "success":
4622
+ ico = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
4623
+ <circle cx="12" cy="12" r="10"/>
4624
+ <path d="m9 12 2 2 4-4"/>
4625
+ </svg>`;
4626
+ break;
4627
+ case "error":
4628
+ ico = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
4629
+ <circle cx="12" cy="12" r="10"/>
4630
+ <line x1="15" y1="9" x2="9" y2="15"/>
4631
+ <line x1="9" y1="9" x2="15" y2="15"/>
4632
+ </svg>`;
4633
+ break;
4634
+ case "warning":
4635
+ ico = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
4636
+ <path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/>
4637
+ <line x1="12" y1="9" x2="12" y2="13"/>
4638
+ <line x1="12" y1="17" x2="12.01" y2="17"/>
4639
+ </svg>`;
4640
+ break;
4641
+ }
4642
+ const arrBody = body.split("\n").map((opt) => `<span>${opt}</span>`);
4643
+ const blockId = "f-function-block-alert-" + fGenerateUniqueId();
4644
+ const alertHtml = `
4645
+ <div class='${styles$5["f-function-block-alert"]}' id='${blockId}'>
4608
4646
  <div class='${styles$5["f-function-alert"]}'>
4609
- <div class='${styles$5["f-function-alert-ico"]} ${styles$5[`${variant}-alert`]}' style='color: inherit; fill: inherit'>
4610
- <svg width="28" height="28" viewBox="0 0 16 16">
4647
+ <div class='${styles$5["f-function-alert-top"]}'>
4648
+ <div class='${styles$5["f-function-alert-ico"]} ${styles$5[`${variant}-alert`]}'>
4611
4649
  ${ico}
4612
- </svg>
4613
- </div>
4614
- <div class='${styles$5["f-function-alert-inside"]}'>
4650
+ </div>
4615
4651
  <div class='${styles$5["f-function-alert-header"]}'>
4616
4652
  <h4>${title2 || ""}</h4>
4617
4653
  </div>
4618
- <div class='${styles$5["f-function-alert-body"]}'>
4619
- ${arrBody.join("")}
4620
- </div>
4621
- <div class='${styles$5["f-function-alert-footer"]}'>
4622
- <FButton
4623
- class='${stylesBtn["btn"]} ${stylesBtn["btn-sm"]} ${stylesBtn["btn-primary"]}'
4624
- onclick='document.querySelector("#f-function-block-alert").remove()'
4625
- >
4626
- Закрыть
4627
- </FButton>
4628
- </div>
4654
+ <button type="button" aria-label="Закрыть" class="${styles$5["close-btn"]}" id="${blockId}-close-x">
4655
+ <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
4656
+ <line x1="18" y1="6" x2="6" y2="18"/>
4657
+ <line x1="6" y1="6" x2="18" y2="18"/>
4658
+ </svg>
4659
+ </button>
4660
+ </div>
4661
+ <div class='${styles$5["f-function-alert-body"]}'>
4662
+ ${arrBody.join("")}
4663
+ </div>
4664
+ <div class='${styles$5["f-function-alert-footer"]}'>
4665
+ <button
4666
+ type="button"
4667
+ class='${styles$5["btn-action"]} ${styles$5[variant]}'
4668
+ id='${blockId}-ok'
4669
+ >
4670
+ Закрыть
4671
+ </button>
4629
4672
  </div>
4630
4673
  </div>
4631
4674
  </div>
4632
- `
4633
- );
4675
+ `;
4676
+ window.document.body.insertAdjacentHTML("afterbegin", alertHtml);
4677
+ const block = document.getElementById(blockId);
4678
+ const okBtn = document.getElementById(`${blockId}-ok`);
4679
+ const closeXBtn = document.getElementById(`${blockId}-close-x`);
4680
+ if (!block) {
4681
+ resolve();
4682
+ return;
4683
+ }
4684
+ if (typeof requestAnimationFrame === "function") {
4685
+ requestAnimationFrame(() => {
4686
+ requestAnimationFrame(() => {
4687
+ block.classList.add(styles$5["visible"]);
4688
+ });
4689
+ });
4690
+ } else {
4691
+ setTimeout(() => {
4692
+ block.classList.add(styles$5["visible"]);
4693
+ }, 20);
4694
+ }
4695
+ let isClosing = false;
4696
+ const closeModal = () => {
4697
+ if (isClosing) return;
4698
+ isClosing = true;
4699
+ window.removeEventListener("keydown", handleKeyDown);
4700
+ block.classList.remove(styles$5["visible"]);
4701
+ block.classList.add(styles$5["hidden"]);
4702
+ let isCleanedUp = false;
4703
+ const cleanup = () => {
4704
+ if (isCleanedUp) return;
4705
+ isCleanedUp = true;
4706
+ block.remove();
4707
+ resolve();
4708
+ };
4709
+ block.addEventListener("transitionend", (e) => {
4710
+ if (e.target === block) {
4711
+ cleanup();
4712
+ }
4713
+ });
4714
+ setTimeout(cleanup, 280);
4715
+ };
4716
+ const handleKeyDown = (e) => {
4717
+ if (e.key === "Escape" || e.key === "Enter") {
4718
+ e.preventDefault();
4719
+ closeModal();
4720
+ }
4721
+ };
4722
+ block.addEventListener("click", (e) => {
4723
+ if (e.target === block) {
4724
+ closeModal();
4725
+ }
4726
+ });
4727
+ okBtn == null ? void 0 : okBtn.addEventListener("click", closeModal);
4728
+ closeXBtn == null ? void 0 : closeXBtn.addEventListener("click", closeModal);
4729
+ window.addEventListener("keydown", handleKeyDown);
4730
+ });
4634
4731
  };
4635
- const warning$2 = "_warning_de5a5_31";
4732
+ const visible$1 = "_visible_1jeyg_19";
4733
+ const hidden$1 = "_hidden_1jeyg_22";
4734
+ const warning$2 = "_warning_1jeyg_73";
4636
4735
  const styles$4 = {
4637
- "f-function-block-confirm": "_f-function-block-confirm_de5a5_1",
4638
- "f-function-confirm": "_f-function-confirm_de5a5_16",
4639
- "f-function-confirm-ico": "_f-function-confirm-ico_de5a5_24",
4736
+ "f-function-block-confirm": "_f-function-block-confirm_1jeyg_1",
4737
+ visible: visible$1,
4738
+ hidden: hidden$1,
4739
+ "f-function-confirm": "_f-function-confirm_1jeyg_27",
4740
+ "f-function-confirm-top": "_f-function-confirm-top_1jeyg_51",
4741
+ "f-function-confirm-ico": "_f-function-confirm-ico_1jeyg_57",
4640
4742
  warning: warning$2,
4641
- "f-function-confirm-inside": "_f-function-confirm-inside_de5a5_36",
4642
- "f-function-confirm-header": "_f-function-confirm-header_de5a5_43",
4643
- "f-function-confirm-body": "_f-function-confirm-body_de5a5_51",
4644
- "f-function-confirm-footer": "_f-function-confirm-footer_de5a5_65"
4743
+ "f-function-confirm-header": "_f-function-confirm-header_1jeyg_84",
4744
+ "f-function-confirm-body": "_f-function-confirm-body_1jeyg_102",
4745
+ "f-function-confirm-footer": "_f-function-confirm-footer_1jeyg_118",
4746
+ "btn-cancel": "_btn-cancel_1jeyg_125",
4747
+ "btn-ok": "_btn-ok_1jeyg_147",
4748
+ "close-btn": "_close-btn_1jeyg_171"
4645
4749
  };
4646
4750
  const fConfirm = ({ title: title2, body }) => {
4647
4751
  return new Promise((resolve) => {
4752
+ const blockId = "f-function-block-confirm-" + fGenerateUniqueId();
4648
4753
  window.document.body.insertAdjacentHTML(
4649
4754
  "afterbegin",
4650
4755
  `
4651
- <div class='${styles$4["f-function-block-confirm"]}' id='f-function-block-confirm'>
4756
+ <div class='${styles$4["f-function-block-confirm"]}' id='${blockId}'>
4652
4757
  <div class='${styles$4["f-function-confirm"]}'>
4653
- <div class='${styles$4["f-function-confirm-ico"]} ${styles$4.warning}'>
4654
- <svg width="28" height="28" viewBox="0 0 16 16">
4655
- <path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/>
4656
- <path d="M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z"/>
4657
- </svg>
4658
- </div>
4659
- <div class='${styles$4["f-function-confirm-inside"]}'>
4758
+ <div class='${styles$4["f-function-confirm-top"]}'>
4759
+ <div class='${styles$4["f-function-confirm-ico"]} ${styles$4.warning}'>
4760
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
4761
+ <path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/>
4762
+ <line x1="12" y1="9" x2="12" y2="13"/>
4763
+ <line x1="12" y1="17" x2="12.01" y2="17"/>
4764
+ </svg>
4765
+ </div>
4660
4766
  <div class='${styles$4["f-function-confirm-header"]}'>
4661
4767
  <h4>${title2 || ""}</h4>
4662
4768
  </div>
4663
- <div class='${styles$4["f-function-confirm-body"]}'>
4664
- <span>${body}</span>
4665
- </div>
4666
- <div class='${styles$4["f-function-confirm-footer"]}'>
4667
- <button
4668
- id="f-function-confirm-ok"
4669
- class='${stylesBtn["btn"]} ${stylesBtn["btn-sm"]} ${stylesBtn["btn-success"]}'
4670
- >
4671
- Ок
4672
- </button>
4673
- <button
4674
- id="f-function-confirm-cancellation"
4675
- class='${stylesBtn["btn"]} ${stylesBtn["btn-sm"]} ${stylesBtn["btn-danger"]}'
4676
- >
4677
- Отменить
4678
- </button>
4679
- </div>
4769
+ <button type="button" aria-label="Закрыть" class="${styles$4["close-btn"]}" id="${blockId}-close-x">
4770
+ <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
4771
+ <line x1="18" y1="6" x2="6" y2="18"/>
4772
+ <line x1="6" y1="6" x2="18" y2="18"/>
4773
+ </svg>
4774
+ </button>
4775
+ </div>
4776
+ <div class='${styles$4["f-function-confirm-body"]}'>
4777
+ <span>${body}</span>
4778
+ </div>
4779
+ <div class='${styles$4["f-function-confirm-footer"]}'>
4780
+ <button
4781
+ type="button"
4782
+ id="${blockId}-cancel"
4783
+ class='${styles$4["btn-cancel"]}'
4784
+ >
4785
+ Отменить
4786
+ </button>
4787
+ <button
4788
+ type="button"
4789
+ id="${blockId}-ok"
4790
+ class='${styles$4["btn-ok"]}'
4791
+ >
4792
+ Ок
4793
+ </button>
4680
4794
  </div>
4681
4795
  </div>
4682
4796
  </div>
4683
4797
  `
4684
4798
  );
4685
- const modalBlock = document.getElementById("f-function-block-confirm");
4686
- const okBtn = document.getElementById("f-function-confirm-ok");
4687
- const cancelBtn = document.getElementById("f-function-confirm-cancellation");
4688
- const closeModal = () => {
4689
- window.removeEventListener("keydown", handleKeyDown);
4690
- okBtn == null ? void 0 : okBtn.removeEventListener("click", handleOk);
4691
- cancelBtn == null ? void 0 : cancelBtn.removeEventListener("click", handleCancel);
4692
- modalBlock == null ? void 0 : modalBlock.remove();
4693
- };
4694
- const handleOk = () => {
4695
- closeModal();
4696
- resolve(true);
4697
- };
4698
- const handleCancel = () => {
4699
- closeModal();
4799
+ const block = document.getElementById(blockId);
4800
+ const okBtn = document.getElementById(`${blockId}-ok`);
4801
+ const cancelBtn = document.getElementById(`${blockId}-cancel`);
4802
+ const closeXBtn = document.getElementById(`${blockId}-close-x`);
4803
+ if (!block) {
4700
4804
  resolve(false);
4805
+ return;
4806
+ }
4807
+ if (typeof requestAnimationFrame === "function") {
4808
+ requestAnimationFrame(() => {
4809
+ requestAnimationFrame(() => {
4810
+ block.classList.add(styles$4["visible"]);
4811
+ });
4812
+ });
4813
+ } else {
4814
+ setTimeout(() => {
4815
+ block.classList.add(styles$4["visible"]);
4816
+ }, 20);
4817
+ }
4818
+ let isClosing = false;
4819
+ const closeModal = (result) => {
4820
+ if (isClosing) return;
4821
+ isClosing = true;
4822
+ window.removeEventListener("keydown", handleKeyDown);
4823
+ block.classList.remove(styles$4["visible"]);
4824
+ block.classList.add(styles$4["hidden"]);
4825
+ let isCleanedUp = false;
4826
+ const cleanup = () => {
4827
+ if (isCleanedUp) return;
4828
+ isCleanedUp = true;
4829
+ block.remove();
4830
+ resolve(result);
4831
+ };
4832
+ block.addEventListener("transitionend", (e) => {
4833
+ if (e.target === block) {
4834
+ cleanup();
4835
+ }
4836
+ });
4837
+ setTimeout(cleanup, 280);
4701
4838
  };
4702
4839
  const handleKeyDown = (e) => {
4703
4840
  if (e.key === "Enter") {
4704
4841
  e.preventDefault();
4705
- handleOk();
4706
- }
4707
- if (e.key === "Escape") {
4708
- handleCancel();
4842
+ closeModal(true);
4843
+ } else if (e.key === "Escape") {
4844
+ e.preventDefault();
4845
+ closeModal(false);
4709
4846
  }
4710
4847
  };
4711
- okBtn == null ? void 0 : okBtn.addEventListener("click", handleOk);
4712
- cancelBtn == null ? void 0 : cancelBtn.addEventListener("click", handleCancel);
4848
+ block.addEventListener("click", (e) => {
4849
+ if (e.target === block) {
4850
+ closeModal(false);
4851
+ }
4852
+ });
4853
+ okBtn == null ? void 0 : okBtn.addEventListener("click", () => closeModal(true));
4854
+ cancelBtn == null ? void 0 : cancelBtn.addEventListener("click", () => closeModal(false));
4855
+ closeXBtn == null ? void 0 : closeXBtn.addEventListener("click", () => closeModal(false));
4713
4856
  window.addEventListener("keydown", handleKeyDown);
4714
4857
  });
4715
4858
  };
4716
- const warning$1 = "_warning_1o5ku_31";
4859
+ const visible = "_visible_1nxa7_19";
4860
+ const hidden = "_hidden_1nxa7_22";
4861
+ const warning$1 = "_warning_1nxa7_73";
4717
4862
  const styles$3 = {
4718
- "f-function-block-prompt": "_f-function-block-prompt_1o5ku_1",
4719
- "f-function-prompt": "_f-function-prompt_1o5ku_16",
4720
- "f-function-prompt-ico": "_f-function-prompt-ico_1o5ku_24",
4863
+ "f-function-block-prompt": "_f-function-block-prompt_1nxa7_1",
4864
+ visible,
4865
+ hidden,
4866
+ "f-function-prompt": "_f-function-prompt_1nxa7_27",
4867
+ "f-function-prompt-top": "_f-function-prompt-top_1nxa7_51",
4868
+ "f-function-prompt-ico": "_f-function-prompt-ico_1nxa7_57",
4721
4869
  warning: warning$1,
4722
- "f-function-prompt-inside": "_f-function-prompt-inside_1o5ku_36",
4723
- "f-function-prompt-header": "_f-function-prompt-header_1o5ku_43",
4724
- "f-function-prompt-body": "_f-function-prompt-body_1o5ku_51",
4725
- "f-function-prompt-footer": "_f-function-prompt-footer_1o5ku_66"
4870
+ "f-function-prompt-header": "_f-function-prompt-header_1nxa7_84",
4871
+ "f-function-prompt-body": "_f-function-prompt-body_1nxa7_102",
4872
+ "f-function-prompt-input": "_f-function-prompt-input_1nxa7_121",
4873
+ "f-function-prompt-footer": "_f-function-prompt-footer_1nxa7_142",
4874
+ "btn-cancel": "_btn-cancel_1nxa7_149",
4875
+ "btn-ok": "_btn-ok_1nxa7_171",
4876
+ "close-btn": "_close-btn_1nxa7_195"
4726
4877
  };
4727
4878
  function getValue(element) {
4728
4879
  if (element) {
@@ -4733,59 +4884,119 @@ function getValue(element) {
4733
4884
  }
4734
4885
  const fPrompt = ({ title: title2, body }) => {
4735
4886
  return new Promise((resolve) => {
4887
+ const blockId = "f-function-block-prompt-" + fGenerateUniqueId();
4736
4888
  window.document.body.insertAdjacentHTML(
4737
4889
  "afterbegin",
4738
4890
  `
4739
- <div class='${styles$3["f-function-block-prompt"]}' id='f-function-block-prompt'>
4891
+ <div class='${styles$3["f-function-block-prompt"]}' id='${blockId}'>
4740
4892
  <div class='${styles$3["f-function-prompt"]}'>
4741
- <div class='${styles$3["f-function-prompt-ico"]} ${styles$3.warning}'>
4742
- <svg width="28" height="28" viewBox="0 0 16 16">
4743
- <path d="M14 1a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1h-2.5a2 2 0 0 0-1.6.8L8 14.333 6.1 11.8a2 2 0 0 0-1.6-.8H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2.5a1 1 0 0 1 .8.4l1.9 2.533a1 1 0 0 0 1.6 0l1.9-2.533a1 1 0 0 1 .8-.4H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/>
4744
- <path d="M5 6a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm4 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm4 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
4745
- </svg>
4746
- </div>
4747
- <div class='${styles$3["f-function-prompt-inside"]}'>
4893
+ <div class='${styles$3["f-function-prompt-top"]}'>
4894
+ <div class='${styles$3["f-function-prompt-ico"]} ${styles$3.warning}'>
4895
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
4896
+ <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>
4897
+ </svg>
4898
+ </div>
4748
4899
  <div class='${styles$3["f-function-prompt-header"]}'>
4749
4900
  <h4>${title2 || ""}</h4>
4750
4901
  </div>
4751
- <div class='${styles$3["f-function-prompt-body"]}'>
4752
- <span>${body || ""}</span>
4753
- <input
4754
- type="text"
4755
- id="f-function-prompt-input"
4756
- class="form-control ${styles$3["f-function-prompt-input"]}"
4757
- />
4758
- </div>
4759
- <div class='${styles$3["f-function-prompt-footer"]}'>
4760
- <button
4761
- id="f-function-prompt-ok"
4762
- class='${stylesBtn["btn"]} ${stylesBtn["btn-sm"]} ${stylesBtn["btn-success"]}'
4763
- onclick='document.querySelector("#f-function-block-prompt").remove()'
4764
- >
4765
- Ок
4766
- </button>
4767
- <button
4768
- id="f-function-prompt-cancellation"
4769
- class='${stylesBtn["btn"]} ${stylesBtn["btn-sm"]} ${stylesBtn["btn-danger"]}'
4770
- onclick='document.querySelector("#f-function-block-prompt").remove()'
4771
- >
4772
- Отменить
4773
- </button>
4774
- </div>
4902
+ <button type="button" aria-label="Закрыть" class="${styles$3["close-btn"]}" id="${blockId}-close-x">
4903
+ <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
4904
+ <line x1="18" y1="6" x2="6" y2="18"/>
4905
+ <line x1="6" y1="6" x2="18" y2="18"/>
4906
+ </svg>
4907
+ </button>
4908
+ </div>
4909
+ <div class='${styles$3["f-function-prompt-body"]}'>
4910
+ ${body ? `<span>${body}</span>` : ""}
4911
+ <input
4912
+ type="text"
4913
+ id="${blockId}-input"
4914
+ class="${styles$3["f-function-prompt-input"]}"
4915
+ placeholder="Введите значение..."
4916
+ autocomplete="off"
4917
+ />
4918
+ </div>
4919
+ <div class='${styles$3["f-function-prompt-footer"]}'>
4920
+ <button
4921
+ type="button"
4922
+ id="${blockId}-cancel"
4923
+ class='${styles$3["btn-cancel"]}'
4924
+ >
4925
+ Отменить
4926
+ </button>
4927
+ <button
4928
+ type="button"
4929
+ id="${blockId}-ok"
4930
+ class='${styles$3["btn-ok"]}'
4931
+ >
4932
+ Ок
4933
+ </button>
4775
4934
  </div>
4776
4935
  </div>
4777
4936
  </div>
4778
4937
  `
4779
4938
  );
4780
- const ok = document.querySelector("#f-function-prompt-ok");
4781
- const cancellation = document.querySelector("#f-function-prompt-cancellation");
4782
- const submit = document.querySelector("#f-function-prompt-input");
4783
- ok.addEventListener("click", function() {
4784
- resolve(getValue(submit));
4785
- });
4786
- cancellation.addEventListener("click", function() {
4939
+ const block = document.getElementById(blockId);
4940
+ const okBtn = document.getElementById(`${blockId}-ok`);
4941
+ const cancelBtn = document.getElementById(`${blockId}-cancel`);
4942
+ const closeXBtn = document.getElementById(`${blockId}-close-x`);
4943
+ const input = document.getElementById(`${blockId}-input`);
4944
+ if (!block) {
4787
4945
  resolve(null);
4946
+ return;
4947
+ }
4948
+ if (typeof requestAnimationFrame === "function") {
4949
+ requestAnimationFrame(() => {
4950
+ requestAnimationFrame(() => {
4951
+ block.classList.add(styles$3["visible"]);
4952
+ input == null ? void 0 : input.focus();
4953
+ });
4954
+ });
4955
+ } else {
4956
+ setTimeout(() => {
4957
+ block.classList.add(styles$3["visible"]);
4958
+ input == null ? void 0 : input.focus();
4959
+ }, 20);
4960
+ }
4961
+ let isClosing = false;
4962
+ const closeModal = (result) => {
4963
+ if (isClosing) return;
4964
+ isClosing = true;
4965
+ window.removeEventListener("keydown", handleKeyDown);
4966
+ block.classList.remove(styles$3["visible"]);
4967
+ block.classList.add(styles$3["hidden"]);
4968
+ let isCleanedUp = false;
4969
+ const cleanup = () => {
4970
+ if (isCleanedUp) return;
4971
+ isCleanedUp = true;
4972
+ block.remove();
4973
+ resolve(result);
4974
+ };
4975
+ block.addEventListener("transitionend", (e) => {
4976
+ if (e.target === block) {
4977
+ cleanup();
4978
+ }
4979
+ });
4980
+ setTimeout(cleanup, 280);
4981
+ };
4982
+ const handleKeyDown = (e) => {
4983
+ if (e.key === "Enter") {
4984
+ e.preventDefault();
4985
+ closeModal(getValue(input));
4986
+ } else if (e.key === "Escape") {
4987
+ e.preventDefault();
4988
+ closeModal(null);
4989
+ }
4990
+ };
4991
+ block.addEventListener("click", (e) => {
4992
+ if (e.target === block) {
4993
+ closeModal(null);
4994
+ }
4788
4995
  });
4996
+ okBtn == null ? void 0 : okBtn.addEventListener("click", () => closeModal(getValue(input)));
4997
+ cancelBtn == null ? void 0 : cancelBtn.addEventListener("click", () => closeModal(null));
4998
+ closeXBtn == null ? void 0 : closeXBtn.addEventListener("click", () => closeModal(null));
4999
+ window.addEventListener("keydown", handleKeyDown);
4789
5000
  });
4790
5001
  };
4791
5002
  class TSZip {
@@ -7783,34 +7994,61 @@ const fExportingHtmlToXlsx = async (data) => {
7783
7994
  }
7784
7995
  };
7785
7996
  const fInstallFormatCodeXlsx = (data) => installFormatCode(data);
7786
- const info = "_info_1da8u_75";
7787
- const error = "_error_1da8u_80";
7788
- const success = "_success_1da8u_85";
7789
- const warning = "_warning_1da8u_90";
7997
+ const info = "_info_1s6rj_93";
7998
+ const error = "_error_1s6rj_97";
7999
+ const success = "_success_1s6rj_101";
8000
+ const warning = "_warning_1s6rj_105";
7790
8001
  const styles$1 = {
7791
- "f-function-block-notification": "_f-function-block-notification_1da8u_51",
7792
- "f-function-notification": "_f-function-notification_1da8u_55",
7793
- "f-function-notification-ico": "_f-function-notification-ico_1da8u_67",
7794
- "info-notification": "_info-notification_1da8u_75",
7795
- "error-notification": "_error-notification_1da8u_80",
7796
- "success-notification": "_success-notification_1da8u_85",
7797
- "warning-notification": "_warning-notification_1da8u_90",
7798
- "f-function-notification-inside": "_f-function-notification-inside_1da8u_95",
7799
- "f-function-notification-header": "_f-function-notification-header_1da8u_101",
7800
- "f-function-notification-body": "_f-function-notification-body_1da8u_113",
7801
- "f-function-notification-visible": "_f-function-notification-visible_1da8u_127",
7802
- "notification-fade-in": "_notification-fade-in_1da8u_1",
7803
- "f-function-notification-hidden": "_f-function-notification-hidden_1da8u_133",
7804
- "notification-fade-out": "_notification-fade-out_1da8u_1",
7805
- "f-notification-progress": "_f-notification-progress_1da8u_169",
7806
- "f-notification-progress-bar": "_f-notification-progress-bar_1da8u_176",
7807
- "f-notification-progress-value": "_f-notification-progress-value_1da8u_183",
8002
+ "f-function-block-notification": "_f-function-block-notification_1s6rj_35",
8003
+ "f-function-notification-visible": "_f-function-notification-visible_1s6rj_45",
8004
+ "f-function-notification-hidden": "_f-function-notification-hidden_1s6rj_50",
8005
+ "f-function-notification": "_f-function-notification_1s6rj_45",
8006
+ "f-function-notification-ico": "_f-function-notification-ico_1s6rj_79",
8007
+ "info-notification": "_info-notification_1s6rj_93",
8008
+ "error-notification": "_error-notification_1s6rj_97",
8009
+ "success-notification": "_success-notification_1s6rj_101",
8010
+ "warning-notification": "_warning-notification_1s6rj_105",
8011
+ "f-function-notification-inside": "_f-function-notification-inside_1s6rj_109",
8012
+ "f-function-notification-header": "_f-function-notification-header_1s6rj_117",
8013
+ "f-function-notification-body": "_f-function-notification-body_1s6rj_136",
8014
+ "close-not": "_close-not_1s6rj_153",
8015
+ "f-notification-progress": "_f-notification-progress_1s6rj_179",
8016
+ "f-notification-progress-bar": "_f-notification-progress-bar_1s6rj_188",
8017
+ "f-notification-progress-value": "_f-notification-progress-value_1s6rj_193",
8018
+ "notification-progress-shrink": "_notification-progress-shrink_1s6rj_1",
7808
8019
  info,
7809
8020
  error,
7810
8021
  success,
7811
- warning,
7812
- "close-not": "_close-not_1da8u_205",
7813
- "notification-progress-animated": "_notification-progress-animated_1da8u_1"
8022
+ warning
8023
+ };
8024
+ const dismissNotificationElement = (el) => {
8025
+ if (!el || el.dataset.closing === "true") return;
8026
+ el.dataset.closing = "true";
8027
+ const cancelTimer = el._cancelTimer;
8028
+ if (typeof cancelTimer === "function") {
8029
+ cancelTimer();
8030
+ }
8031
+ el.classList.remove(styles$1["f-function-notification-visible"]);
8032
+ el.classList.add(styles$1["f-function-notification-hidden"]);
8033
+ let isCleanedUp = false;
8034
+ const cleanup = () => {
8035
+ var _a;
8036
+ if (isCleanedUp) return;
8037
+ isCleanedUp = true;
8038
+ if (el.parentNode) {
8039
+ el.parentNode.removeChild(el);
8040
+ }
8041
+ const blockNotification = document.querySelector("#block-notification");
8042
+ if (blockNotification && blockNotification.children.length === 0) {
8043
+ (_a = blockNotification.parentNode) == null ? void 0 : _a.removeChild(blockNotification);
8044
+ }
8045
+ };
8046
+ el.addEventListener("transitionend", (e) => {
8047
+ if (e.target === el) {
8048
+ cleanup();
8049
+ }
8050
+ });
8051
+ setTimeout(cleanup, 360);
7814
8052
  };
7815
8053
  const fNotification = ({
7816
8054
  title: title2,
@@ -7824,54 +8062,61 @@ const fNotification = ({
7824
8062
  let ico = "";
7825
8063
  switch (variant) {
7826
8064
  case "info":
7827
- ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>';
8065
+ ico = `<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
8066
+ <circle cx="12" cy="12" r="10"/>
8067
+ <line x1="12" y1="16" x2="12" y2="12"/>
8068
+ <line x1="12" y1="8" x2="12.01" y2="8"/>
8069
+ </svg>`;
7828
8070
  break;
7829
8071
  case "success":
7830
- ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="M10.97 4.97a.75.75 0 0 1 1.071 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.235.235 0 0 1 .02-.022z"/>';
8072
+ ico = `<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
8073
+ <circle cx="12" cy="12" r="10"/>
8074
+ <path d="m9 12 2 2 4-4"/>
8075
+ </svg>`;
7831
8076
  break;
7832
8077
  case "error":
7833
- ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/>';
8078
+ ico = `<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
8079
+ <circle cx="12" cy="12" r="10"/>
8080
+ <line x1="15" y1="9" x2="9" y2="15"/>
8081
+ <line x1="9" y1="9" x2="15" y2="15"/>
8082
+ </svg>`;
7834
8083
  break;
7835
8084
  case "warning":
7836
- ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z"/>';
8085
+ ico = `<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
8086
+ <path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/>
8087
+ <line x1="12" y1="9" x2="12" y2="13"/>
8088
+ <line x1="12" y1="17" x2="12.01" y2="17"/>
8089
+ </svg>`;
7837
8090
  break;
7838
8091
  }
7839
- const arrBody = [];
7840
- body.split("\n").map((opt) => {
7841
- arrBody.push(
7842
- `<span>${opt}</span>`
7843
- );
7844
- });
8092
+ const arrBody = body.split("\n").map((opt) => `<span>${opt}</span>`);
7845
8093
  const randId = fGenerateUniqueId();
7846
- const idFuncBlockNot = "f-function-block-notification-" + randId;
8094
+ const elementId = id !== void 0 ? id : "f-function-block-notification-" + randId;
7847
8095
  const not = `
7848
- <div class='${styles$1["f-function-block-notification"]}' id="${id === void 0 ? idFuncBlockNot : id}">
8096
+ <div class='${styles$1["f-function-block-notification"]}' id="${elementId}">
7849
8097
  <div class='${styles$1["f-function-notification"]}'>
7850
8098
  <div class='${styles$1["f-function-notification-ico"]} ${styles$1[variant + "-notification"]}'>
7851
- <svg width="28" height="28" viewBox="0 0 16 16">
7852
- ${ico}
7853
- </svg>
8099
+ ${ico}
7854
8100
  </div>
7855
8101
  <div class='${styles$1["f-function-notification-inside"]}'>
7856
8102
  <div class='${styles$1["f-function-notification-header"]}'>
7857
8103
  <h4>${title2 !== void 0 ? title2 : ""}</h4>
7858
- ${buttonClose ? `<svg
7859
- width="25"
7860
- class="bi bi-x-lg primary ${styles$1["close-not"]}"
7861
- viewBox="0 0 16 16"
7862
- >
7863
- <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>
7864
- </svg>` : ""}
8104
+ ${buttonClose ? `<button type="button" aria-label="Закрыть" class="${styles$1["close-not"]}">
8105
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
8106
+ <line x1="18" y1="6" x2="6" y2="18"/>
8107
+ <line x1="6" y1="6" x2="18" y2="18"/>
8108
+ </svg>
8109
+ </button>` : ""}
7865
8110
  </div>
7866
8111
  <div class='${styles$1["f-function-notification-body"]}'>
7867
8112
  ${arrBody.join("")}
7868
8113
  </div>
7869
8114
  </div>
7870
- ${timeSecClose ? `<div class="${styles$1["f-notification-progress"]}">
7871
- <div class="${styles$1["f-notification-progress-bar"]}">
7872
- <div class="${styles$1["f-notification-progress-value"]} ${styles$1[variant]}" id="f-notification-progress-value-${randId}" style="animation: notification-progress-animated ${timeSecClose}s linear;"/>
7873
- </div>
7874
- </div>` : ""}
8115
+ ${timeSecClose ? `<div class="${styles$1["f-notification-progress"]}">
8116
+ <div class="${styles$1["f-notification-progress-bar"]}">
8117
+ <div class="${styles$1["f-notification-progress-value"]} ${styles$1[variant]}" style="animation-duration: ${timeSecClose}s;"></div>
8118
+ </div>
8119
+ </div>` : ""}
7875
8120
  </div>
7876
8121
  </div>
7877
8122
  `;
@@ -7884,70 +8129,82 @@ const fNotification = ({
7884
8129
  }
7885
8130
  return blockNotification2;
7886
8131
  };
7887
- const removeEmptyNotificationBlock = () => {
7888
- var _a;
7889
- const blockNotification2 = document.querySelector("#block-notification");
7890
- if (blockNotification2 && blockNotification2.children.length === 0) {
7891
- (_a = blockNotification2.parentNode) == null ? void 0 : _a.removeChild(blockNotification2);
7892
- }
7893
- };
7894
8132
  const blockNotification = getOrCreateNotificationBlock();
7895
8133
  blockNotification.insertAdjacentHTML("afterbegin", not);
7896
8134
  blockNotification.scrollTo({ top: 0, behavior: "smooth" });
7897
- if (buttonClose) {
7898
- const el = window.document.querySelector(`#${idFuncBlockNot}`);
7899
- if (el !== null) {
7900
- const svgElement = el.querySelector(`.${styles$1["close-not"]}`);
7901
- if (svgElement !== null) {
7902
- svgElement.addEventListener("click", () => {
7903
- el.classList.remove(styles$1["f-function-notification-visible"]);
7904
- el.classList.add(styles$1["f-function-notification-hidden"]);
7905
- setTimeout(() => {
7906
- if (el.parentNode) {
7907
- el.parentNode.removeChild(el);
7908
- }
7909
- removeEmptyNotificationBlock();
7910
- }, 1e3);
8135
+ const el = window.document.querySelector(`#${elementId}`);
8136
+ if (el !== null) {
8137
+ el._dismiss = () => dismissNotificationElement(el);
8138
+ if (typeof requestAnimationFrame === "function") {
8139
+ requestAnimationFrame(() => {
8140
+ requestAnimationFrame(() => {
8141
+ el.classList.add(styles$1["f-function-notification-visible"]);
7911
8142
  });
7912
- }
8143
+ });
8144
+ } else {
8145
+ setTimeout(() => {
8146
+ el.classList.add(styles$1["f-function-notification-visible"]);
8147
+ }, 20);
7913
8148
  }
7914
- }
7915
- setTimeout(() => {
7916
- const el = window.document.querySelector(`#${idFuncBlockNot}`);
7917
- if (el !== null && el !== void 0) {
7918
- el.className += " " + styles$1["f-function-notification-visible"];
8149
+ if (buttonClose) {
8150
+ const closeBtn = el.querySelector(`.${styles$1["close-not"]}`);
8151
+ if (closeBtn !== null) {
8152
+ closeBtn.addEventListener("click", (e) => {
8153
+ e.stopPropagation();
8154
+ dismissNotificationElement(el);
8155
+ });
8156
+ }
7919
8157
  }
7920
- });
7921
- if (timeSecClose !== void 0) {
7922
- const el = window.document.querySelector(`#${idFuncBlockNot}`);
7923
- if (el !== null) {
7924
- setTimeout(() => {
7925
- el.className = styles$1["f-function-notification-hidden"];
7926
- }, (timeSecClose - 1) * 1e3);
7927
- setTimeout(() => {
7928
- if (el.parentNode) {
7929
- el.parentNode.removeChild(el);
8158
+ if (timeSecClose !== void 0 && timeSecClose > 0) {
8159
+ let timer = null;
8160
+ let startTime = Date.now();
8161
+ let remaining = timeSecClose * 1e3;
8162
+ const startTimer = () => {
8163
+ startTime = Date.now();
8164
+ timer = setTimeout(() => {
8165
+ dismissNotificationElement(el);
8166
+ }, remaining);
8167
+ };
8168
+ const pauseTimer = () => {
8169
+ if (timer) {
8170
+ clearTimeout(timer);
8171
+ timer = null;
8172
+ remaining -= Date.now() - startTime;
8173
+ }
8174
+ };
8175
+ const resumeTimer = () => {
8176
+ if (remaining > 0 && el.dataset.closing !== "true") {
8177
+ startTimer();
8178
+ }
8179
+ };
8180
+ el._cancelTimer = () => {
8181
+ if (timer) {
8182
+ clearTimeout(timer);
8183
+ timer = null;
7930
8184
  }
7931
- removeEmptyNotificationBlock();
7932
- }, timeSecClose * 1e3);
8185
+ el.removeEventListener("mouseenter", pauseTimer);
8186
+ el.removeEventListener("mouseleave", resumeTimer);
8187
+ };
8188
+ el.addEventListener("mouseenter", pauseTimer);
8189
+ el.addEventListener("mouseleave", resumeTimer);
8190
+ startTimer();
7933
8191
  }
7934
8192
  }
7935
- resolve(`#${idFuncBlockNot}`);
8193
+ resolve(`#${elementId}`);
7936
8194
  });
7937
8195
  };
7938
8196
  const fNotificationDelete = (id) => {
7939
- const el = window.document.querySelector(id);
8197
+ if (!id) return;
8198
+ const selector = id.startsWith("#") ? id : `#${id}`;
8199
+ let el = window.document.querySelector(selector);
8200
+ if (!el) {
8201
+ try {
8202
+ el = window.document.querySelector(id);
8203
+ } catch {
8204
+ }
8205
+ }
7940
8206
  if (!el) return;
7941
- const container2 = document.getElementById("block-notification");
7942
- if (!container2) return;
7943
- el.className = styles$1["f-function-notification-hidden"];
7944
- setTimeout(() => {
7945
- el.classList.remove(styles$1["f-function-notification-visible"]);
7946
- }, 1e3);
7947
- setTimeout(() => {
7948
- if (el.parentNode) el.parentNode.removeChild(el);
7949
- if (container2.children.length === 0) container2.remove();
7950
- }, 2e3);
8207
+ dismissNotificationElement(el);
7951
8208
  };
7952
8209
  const fConvertFileToBase64 = (file, deletePrefix = false) => {
7953
8210
  return new Promise((resolve, reject) => {