@daisforge/ui 1.15.0 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (413) hide show
  1. package/chunks/{AnalyticalWidget-BSpo7GCr.mjs → AnalyticalWidget-BWcBjoNh.mjs} +113 -113
  2. package/chunks/{AnalyticalWidget-D_g7b36w.cjs → AnalyticalWidget-z2HzQ4aA.cjs} +2 -2
  3. package/chunks/{ApprovalCenter-B0yUrIFR.mjs → ApprovalCenter-BqN8Zjol.mjs} +2 -2
  4. package/chunks/{ApprovalCenter-BeD-ALq3.cjs → ApprovalCenter-CGs7n-2C.cjs} +1 -1
  5. package/chunks/{BlockTitle-D-4agd3o.mjs → BlockTitle-BM2EE1b1.mjs} +2 -2
  6. package/chunks/{BlockTitle-BcV_T7TJ.cjs → BlockTitle-o2QTRA7D.cjs} +1 -1
  7. package/chunks/{Container-CJX4h6tb.cjs → Container-CrB1jwqH.cjs} +1 -1
  8. package/chunks/{Container-BlAaXm8V.mjs → Container-Cy8w2JOq.mjs} +1 -1
  9. package/chunks/{EmptyState-BB3duGQw.mjs → EmptyState-B205JfZA.mjs} +1 -1
  10. package/chunks/{EmptyState-Du-RIjie.cjs → EmptyState-CcxlsZm0.cjs} +1 -1
  11. package/chunks/{FiltersActions-DlV5c-6Y.mjs → FiltersActions-C5OGUDDx.mjs} +4 -4
  12. package/chunks/{FiltersActions-Dw5QqWa8.cjs → FiltersActions-CKimtYsU.cjs} +1 -1
  13. package/chunks/{FormSegmentGroup-DcOPPn3M.cjs → FormSegmentGroup-CCCqRgCG.cjs} +1 -1
  14. package/chunks/{FormSegmentGroup-9b3w4_KU.mjs → FormSegmentGroup-E1JurEt7.mjs} +1 -1
  15. package/chunks/{GridDND-BhSmT9qp.mjs → GridDND-D9T2wqLt.mjs} +2 -2
  16. package/chunks/{GridDND-D7-FwG3y.cjs → GridDND-DkL6-TgS.cjs} +1 -1
  17. package/chunks/{LeftPanel-Ciehaz28.cjs → LeftPanel-B3-ySDMW.cjs} +1 -1
  18. package/chunks/{LeftPanel-DuIinlBm.mjs → LeftPanel-HZu3ECqD.mjs} +1 -1
  19. package/chunks/{ListOfFilters-DEkjOH7o.cjs → ListOfFilters-B8XF6KiI.cjs} +1 -1
  20. package/chunks/{ListOfFilters-DngSRGOp.mjs → ListOfFilters-BEDW_v5t.mjs} +3 -3
  21. package/chunks/{MassActions-Cphn-d4v.cjs → MassActions-BHNmuh3s.cjs} +1 -1
  22. package/chunks/{MassActions-CA35MxqC.mjs → MassActions-C66ulAuq.mjs} +3 -3
  23. package/chunks/{PageTitle-S-pY5lbg.cjs → PageTitle-BEdQpyZh.cjs} +1 -1
  24. package/chunks/{PageTitle-BjLWtqbD.mjs → PageTitle-BVbWaV52.mjs} +2 -2
  25. package/chunks/{SplitView-Dm62AAZj.mjs → SplitView-DYHeCnl9.mjs} +1 -1
  26. package/chunks/{SplitView-DdLshcIk.cjs → SplitView-UKIBuvTi.cjs} +1 -1
  27. package/chunks/Stories-DVh7iByM.cjs +1 -0
  28. package/chunks/{Stories-BCtwdhv0.mjs → Stories-lNAuXVJN.mjs} +260 -245
  29. package/chunks/{Table-C2ehPQDQ.cjs → Table-C-lLZklk.cjs} +5 -5
  30. package/chunks/{Table-DBKZzRuR.mjs → Table-C_1QGsh8.mjs} +16 -11
  31. package/chunks/{TableCanvas-1y-yKIq1.mjs → TableCanvas--g37wjRi.mjs} +3537 -3474
  32. package/chunks/TableCanvas-uzBMXlx6.cjs +30 -0
  33. package/chunks/{TableGlide-DGKw3w0G.mjs → TableGlide-Cjcw7Wur.mjs} +912 -819
  34. package/chunks/TableGlide-DTBZ1jNA.cjs +1 -0
  35. package/chunks/styles-BBVEBDDw.mjs +132 -0
  36. package/chunks/styles-C-pJNMSQ.cjs +2 -0
  37. package/chunks/{utils-DvDFSlCG.cjs → utils-CUW5bd8S.cjs} +5 -5
  38. package/chunks/{utils-D4eJY8pa.mjs → utils-YKicAHp0.mjs} +38 -38
  39. package/chunks/vendor-BzEO8Fvp.cjs +6043 -0
  40. package/chunks/vendor-DBRfVjyT.mjs +6054 -0
  41. package/components/AiAgentPopover/index.cjs +1 -1
  42. package/components/AiAgentPopover/index.mjs +1 -1
  43. package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.cjs +1 -1
  44. package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.mjs +1 -1
  45. package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.cjs +1 -1
  46. package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.mjs +1 -1
  47. package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/AnalyticalWidgetHeader.types.d.ts +2 -2
  48. package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/AnalyticalWidgetTitle.types.d.ts +2 -1
  49. package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.cjs +1 -1
  50. package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.mjs +1 -1
  51. package/components/AnalyticalWidget/index.cjs +1 -1
  52. package/components/AnalyticalWidget/index.mjs +1 -1
  53. package/components/ApprovalCenter/components/index.cjs +1 -1
  54. package/components/ApprovalCenter/components/index.mjs +1 -1
  55. package/components/ApprovalCenter/index.cjs +1 -1
  56. package/components/ApprovalCenter/index.mjs +1 -1
  57. package/components/AutocompleteSearch/index.cjs +1 -1
  58. package/components/AutocompleteSearch/index.mjs +2 -2
  59. package/components/BlockGradientScroll/index.cjs +1 -1
  60. package/components/BlockGradientScroll/index.mjs +1 -1
  61. package/components/BlockTitle/index.cjs +1 -1
  62. package/components/BlockTitle/index.mjs +1 -1
  63. package/components/BlockTitle/utils/index.cjs +1 -1
  64. package/components/BlockTitle/utils/index.mjs +1 -1
  65. package/components/Collapse/index.cjs +1 -1
  66. package/components/Collapse/index.mjs +1 -1
  67. package/components/Combobox/index.cjs +1 -1
  68. package/components/Combobox/index.mjs +1 -1
  69. package/components/EmptyState/components/index.cjs +1 -1
  70. package/components/EmptyState/components/index.mjs +1 -1
  71. package/components/EmptyState/index.cjs +1 -1
  72. package/components/EmptyState/index.mjs +1 -1
  73. package/components/GridDND/index.cjs +1 -1
  74. package/components/GridDND/index.mjs +1 -1
  75. package/components/GridDND/utils/index.cjs +1 -1
  76. package/components/GridDND/utils/index.mjs +1 -1
  77. package/components/IconButton/index.cjs +1 -1
  78. package/components/IconButton/index.mjs +1 -1
  79. package/components/LeftPanel/components/index.cjs +1 -1
  80. package/components/LeftPanel/components/index.mjs +1 -1
  81. package/components/LeftPanel/hooks/index.cjs +1 -1
  82. package/components/LeftPanel/hooks/index.mjs +1 -1
  83. package/components/LeftPanel/index.cjs +1 -1
  84. package/components/LeftPanel/index.mjs +1 -1
  85. package/components/LeftPanel/utils/index.cjs +1 -1
  86. package/components/LeftPanel/utils/index.mjs +1 -1
  87. package/components/ListOfFilters/index.cjs +1 -1
  88. package/components/ListOfFilters/index.mjs +1 -1
  89. package/components/MassActions/hooks/index.cjs +1 -1
  90. package/components/MassActions/hooks/index.mjs +1 -1
  91. package/components/MassActions/index.cjs +1 -1
  92. package/components/MassActions/index.mjs +1 -1
  93. package/components/ModalDF/index.cjs +1 -1
  94. package/components/ModalDF/index.mjs +1 -1
  95. package/components/Notification/index.cjs +1 -1
  96. package/components/Notification/index.mjs +2 -2
  97. package/components/PageTitle/index.cjs +1 -1
  98. package/components/PageTitle/index.mjs +1 -1
  99. package/components/PageTitle/utils/index.cjs +1 -1
  100. package/components/PageTitle/utils/index.mjs +1 -1
  101. package/components/PopoverDF/index.cjs +1 -1
  102. package/components/PopoverDF/index.mjs +1 -1
  103. package/components/PopupDF/index.cjs +1 -1
  104. package/components/PopupDF/index.mjs +1 -1
  105. package/components/SplitView/index.cjs +1 -1
  106. package/components/SplitView/index.mjs +1 -1
  107. package/components/SplitView/utils/index.cjs +1 -1
  108. package/components/SplitView/utils/index.mjs +1 -1
  109. package/components/Stories/components/StoriesBanner/index.cjs +1 -1
  110. package/components/Stories/components/StoriesBanner/index.mjs +1 -1
  111. package/components/Stories/components/StoriesContent/index.cjs +1 -1
  112. package/components/Stories/components/StoriesContent/index.mjs +1 -1
  113. package/components/Stories/components/StoriesPreview/index.cjs +1 -1
  114. package/components/Stories/components/StoriesPreview/index.mjs +1 -1
  115. package/components/Stories/components/StoriesProgress/index.cjs +1 -1
  116. package/components/Stories/components/StoriesProgress/index.mjs +1 -1
  117. package/components/Stories/components/StoriesViewer/index.cjs +1 -1
  118. package/components/Stories/components/StoriesViewer/index.mjs +1 -1
  119. package/components/Stories/index.cjs +1 -1
  120. package/components/Stories/index.mjs +1 -1
  121. package/components/Table/components/AnimatedCounter.d.ts +1 -0
  122. package/components/Table/components/TableDropdown/index.cjs +1 -1
  123. package/components/Table/components/TableDropdown/index.mjs +1 -1
  124. package/components/Table/feature-collapse-table/index.cjs +1 -1
  125. package/components/Table/feature-collapse-table/index.mjs +1 -1
  126. package/components/Table/feature-column-control/ColumnsList/index.cjs +1 -1
  127. package/components/Table/feature-column-control/ColumnsList/index.mjs +1 -1
  128. package/components/Table/feature-column-control/index.cjs +1 -1
  129. package/components/Table/feature-column-control/index.mjs +1 -1
  130. package/components/Table/feature-columns-grouping/index.cjs +1 -1
  131. package/components/Table/feature-columns-grouping/index.mjs +1 -1
  132. package/components/Table/feature-context-menu/index.cjs +1 -1
  133. package/components/Table/feature-context-menu/index.mjs +1 -1
  134. package/components/Table/feature-edit/index.cjs +1 -1
  135. package/components/Table/feature-edit/index.mjs +1 -1
  136. package/components/Table/feature-filtering/combobox/index.cjs +1 -1
  137. package/components/Table/feature-filtering/combobox/index.mjs +1 -1
  138. package/components/Table/feature-filtering/filter-list-block/index.cjs +1 -1
  139. package/components/Table/feature-filtering/filter-list-block/index.mjs +1 -1
  140. package/components/Table/feature-filtering/header-filter-button/index.cjs +1 -1
  141. package/components/Table/feature-filtering/header-filter-button/index.mjs +1 -1
  142. package/components/Table/feature-filtering/index.cjs +1 -1
  143. package/components/Table/feature-filtering/index.mjs +1 -1
  144. package/components/Table/feature-filtering/sidebar-filter-block/index.cjs +1 -1
  145. package/components/Table/feature-filtering/sidebar-filter-block/index.mjs +1 -1
  146. package/components/Table/feature-infinity-scroll/index.cjs +1 -1
  147. package/components/Table/feature-infinity-scroll/index.mjs +1 -1
  148. package/components/Table/feature-key-text/index.cjs +1 -1
  149. package/components/Table/feature-key-text/index.mjs +1 -1
  150. package/components/Table/feature-pagination/index.cjs +1 -1
  151. package/components/Table/feature-pagination/index.mjs +1 -1
  152. package/components/Table/feature-right-sidebar/index.cjs +1 -1
  153. package/components/Table/feature-right-sidebar/index.mjs +1 -1
  154. package/components/Table/feature-row-detail/index.cjs +1 -1
  155. package/components/Table/feature-row-detail/index.mjs +1 -1
  156. package/components/Table/feature-row-instruments/index.cjs +1 -1
  157. package/components/Table/feature-row-instruments/index.mjs +1 -1
  158. package/components/Table/feature-row-size/index.cjs +1 -1
  159. package/components/Table/feature-row-size/index.mjs +1 -1
  160. package/components/Table/feature-rows-grouping/index.cjs +1 -1
  161. package/components/Table/feature-rows-grouping/index.mjs +1 -1
  162. package/components/Table/feature-searching/index.cjs +1 -1
  163. package/components/Table/feature-searching/index.mjs +1 -1
  164. package/components/Table/feature-select-row/index.cjs +1 -1
  165. package/components/Table/feature-select-row/index.mjs +1 -1
  166. package/components/Table/feature-sorting/index.cjs +1 -1
  167. package/components/Table/feature-sorting/index.mjs +1 -1
  168. package/components/Table/feature-table-settings/index.cjs +1 -1
  169. package/components/Table/feature-table-settings/index.mjs +1 -1
  170. package/components/Table/feature-tree/index.cjs +1 -1
  171. package/components/Table/feature-tree/index.mjs +1 -1
  172. package/components/Table/index.cjs +1 -1
  173. package/components/Table/index.mjs +1 -1
  174. package/components/Table/renders/formatCell/index.cjs +1 -1
  175. package/components/Table/renders/formatCell/index.mjs +1 -1
  176. package/components/Table/styles/index.cjs +1 -1
  177. package/components/Table/styles/index.mjs +1 -1
  178. package/components/Table/table-hooks/index.cjs +1 -1
  179. package/components/Table/table-hooks/index.mjs +1 -1
  180. package/components/Table/types/index.cjs +1 -1
  181. package/components/Table/types/index.mjs +1 -1
  182. package/components/Table/types/utils.type.d.ts +1 -1
  183. package/components/Table/utils/index.cjs +1 -1
  184. package/components/Table/utils/index.mjs +1 -1
  185. package/components/Table/widgets/control-block/index.cjs +1 -1
  186. package/components/Table/widgets/control-block/index.mjs +1 -1
  187. package/components/Table/widgets/control-block/right-side/index.cjs +1 -1
  188. package/components/Table/widgets/control-block/right-side/index.mjs +1 -1
  189. package/components/Table/widgets/index.cjs +1 -1
  190. package/components/Table/widgets/index.mjs +1 -1
  191. package/components/Table/widgets/mass-actions/index.cjs +1 -1
  192. package/components/Table/widgets/mass-actions/index.mjs +1 -1
  193. package/components/TableCanvas/TableGlideInstance/adapters/column/index.cjs +1 -1
  194. package/components/TableCanvas/TableGlideInstance/adapters/column/index.mjs +1 -1
  195. package/components/TableCanvas/TableGlideInstance/adapters/index.cjs +1 -1
  196. package/components/TableCanvas/TableGlideInstance/adapters/index.mjs +1 -1
  197. package/components/TableCanvas/TableGlideInstance/index.cjs +1 -1
  198. package/components/TableCanvas/TableGlideInstance/index.mjs +2 -2
  199. package/components/TableCanvas/TableGlideInstance/utils/column/index.cjs +1 -1
  200. package/components/TableCanvas/TableGlideInstance/utils/column/index.mjs +1 -1
  201. package/components/TableCanvas/TableGlideInstance/utils/index.cjs +1 -1
  202. package/components/TableCanvas/TableGlideInstance/utils/index.mjs +1 -1
  203. package/components/TableCanvas/components/AnimatedCounter.d.ts +1 -0
  204. package/components/TableCanvas/components/SplitIconButton/index.cjs +1 -1
  205. package/components/TableCanvas/components/SplitIconButton/index.mjs +1 -1
  206. package/components/TableCanvas/components/TableDropdown/index.cjs +1 -1
  207. package/components/TableCanvas/components/TableDropdown/index.mjs +1 -1
  208. package/components/TableCanvas/feature-cell-transfer/index.cjs +1 -1
  209. package/components/TableCanvas/feature-cell-transfer/index.mjs +1 -1
  210. package/components/TableCanvas/feature-collapse-table/index.cjs +1 -1
  211. package/components/TableCanvas/feature-collapse-table/index.mjs +1 -1
  212. package/components/TableCanvas/feature-column-control/ColumnsList/index.cjs +1 -1
  213. package/components/TableCanvas/feature-column-control/ColumnsList/index.mjs +1 -1
  214. package/components/TableCanvas/feature-column-control/index.cjs +1 -1
  215. package/components/TableCanvas/feature-column-control/index.mjs +1 -1
  216. package/components/TableCanvas/feature-columns-grouping/index.cjs +1 -1
  217. package/components/TableCanvas/feature-columns-grouping/index.mjs +1 -1
  218. package/components/TableCanvas/feature-content-state/index.cjs +1 -1
  219. package/components/TableCanvas/feature-content-state/index.mjs +1 -1
  220. package/components/TableCanvas/feature-context-menu/index.cjs +1 -1
  221. package/components/TableCanvas/feature-context-menu/index.mjs +1 -1
  222. package/components/TableCanvas/feature-edit/index.cjs +1 -1
  223. package/components/TableCanvas/feature-edit/index.mjs +1 -1
  224. package/components/TableCanvas/feature-filtering/combobox/index.cjs +1 -1
  225. package/components/TableCanvas/feature-filtering/combobox/index.mjs +1 -1
  226. package/components/TableCanvas/feature-filtering/filter-list-block/index.cjs +1 -1
  227. package/components/TableCanvas/feature-filtering/filter-list-block/index.mjs +1 -1
  228. package/components/TableCanvas/feature-filtering/header-filter-button/index.cjs +1 -1
  229. package/components/TableCanvas/feature-filtering/header-filter-button/index.mjs +1 -1
  230. package/components/TableCanvas/feature-filtering/index.cjs +1 -1
  231. package/components/TableCanvas/feature-filtering/index.mjs +1 -1
  232. package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.cjs +1 -1
  233. package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.mjs +1 -1
  234. package/components/TableCanvas/feature-filtering/use-focus-search-input.d.ts +2 -0
  235. package/components/TableCanvas/feature-infinity-scroll/index.cjs +1 -1
  236. package/components/TableCanvas/feature-infinity-scroll/index.mjs +1 -1
  237. package/components/TableCanvas/feature-key-text/index.cjs +1 -1
  238. package/components/TableCanvas/feature-key-text/index.mjs +1 -1
  239. package/components/TableCanvas/feature-notifications/index.cjs +1 -1
  240. package/components/TableCanvas/feature-notifications/index.mjs +1 -1
  241. package/components/TableCanvas/feature-pagination/index.cjs +1 -1
  242. package/components/TableCanvas/feature-pagination/index.mjs +1 -1
  243. package/components/TableCanvas/feature-popover-table/context/TablePopoverContext.d.ts +3 -1
  244. package/components/TableCanvas/feature-popover-table/context/index.cjs +1 -1
  245. package/components/TableCanvas/feature-popover-table/context/index.mjs +1 -1
  246. package/components/TableCanvas/feature-popover-table/hooks/index.cjs +1 -1
  247. package/components/TableCanvas/feature-popover-table/hooks/index.mjs +1 -1
  248. package/components/TableCanvas/feature-popover-table/index.cjs +1 -1
  249. package/components/TableCanvas/feature-popover-table/index.mjs +1 -1
  250. package/components/TableCanvas/feature-popover-table/utils/index.cjs +1 -1
  251. package/components/TableCanvas/feature-popover-table/utils/index.mjs +1 -1
  252. package/components/TableCanvas/feature-right-sidebar/index.cjs +1 -1
  253. package/components/TableCanvas/feature-right-sidebar/index.mjs +1 -1
  254. package/components/TableCanvas/feature-row-detail/index.cjs +1 -1
  255. package/components/TableCanvas/feature-row-detail/index.mjs +1 -1
  256. package/components/TableCanvas/feature-row-instruments/index.cjs +1 -1
  257. package/components/TableCanvas/feature-row-instruments/index.mjs +1 -1
  258. package/components/TableCanvas/feature-row-markers/index.cjs +1 -1
  259. package/components/TableCanvas/feature-row-markers/index.mjs +1 -1
  260. package/components/TableCanvas/feature-row-size/index.cjs +1 -1
  261. package/components/TableCanvas/feature-row-size/index.mjs +1 -1
  262. package/components/TableCanvas/feature-rows-grouping/index.cjs +1 -1
  263. package/components/TableCanvas/feature-rows-grouping/index.mjs +1 -1
  264. package/components/TableCanvas/feature-rows-grouping/types.d.ts +2 -0
  265. package/components/TableCanvas/feature-searching/index.cjs +1 -1
  266. package/components/TableCanvas/feature-searching/index.mjs +1 -1
  267. package/components/TableCanvas/feature-select-row/index.cjs +1 -1
  268. package/components/TableCanvas/feature-select-row/index.mjs +1 -1
  269. package/components/TableCanvas/feature-sorting/index.cjs +1 -1
  270. package/components/TableCanvas/feature-sorting/index.mjs +1 -1
  271. package/components/TableCanvas/feature-table-settings/index.cjs +1 -1
  272. package/components/TableCanvas/feature-table-settings/index.mjs +1 -1
  273. package/components/TableCanvas/feature-tooltip/index.cjs +1 -1
  274. package/components/TableCanvas/feature-tooltip/index.mjs +1 -1
  275. package/components/TableCanvas/feature-tooltip/utils/index.cjs +1 -1
  276. package/components/TableCanvas/feature-tooltip/utils/index.mjs +1 -1
  277. package/components/TableCanvas/feature-tree/index.cjs +1 -1
  278. package/components/TableCanvas/feature-tree/index.mjs +1 -1
  279. package/components/TableCanvas/index.cjs +1 -1
  280. package/components/TableCanvas/index.mjs +2 -2
  281. package/components/TableCanvas/renders/formatCell/index.cjs +1 -1
  282. package/components/TableCanvas/renders/formatCell/index.mjs +1 -1
  283. package/components/TableCanvas/styles/index.cjs +1 -1
  284. package/components/TableCanvas/styles/index.mjs +1 -1
  285. package/components/TableCanvas/table-hooks/index.cjs +1 -1
  286. package/components/TableCanvas/table-hooks/index.mjs +1 -1
  287. package/components/TableCanvas/types/index.cjs +1 -1
  288. package/components/TableCanvas/types/index.mjs +1 -1
  289. package/components/TableCanvas/utils/index.cjs +1 -1
  290. package/components/TableCanvas/utils/index.mjs +2 -2
  291. package/components/TableCanvas/widgets/control-block/compression/index.cjs +1 -1
  292. package/components/TableCanvas/widgets/control-block/compression/index.mjs +1 -1
  293. package/components/TableCanvas/widgets/control-block/index.cjs +1 -1
  294. package/components/TableCanvas/widgets/control-block/index.mjs +1 -1
  295. package/components/TableCanvas/widgets/control-block/right-side/index.cjs +1 -1
  296. package/components/TableCanvas/widgets/control-block/right-side/index.mjs +1 -1
  297. package/components/TableCanvas/widgets/index.cjs +1 -1
  298. package/components/TableCanvas/widgets/index.mjs +1 -1
  299. package/components/TableCanvas/widgets/mass-actions/hooks/index.cjs +1 -1
  300. package/components/TableCanvas/widgets/mass-actions/hooks/index.mjs +1 -1
  301. package/components/TableCanvas/widgets/mass-actions/index.cjs +1 -1
  302. package/components/TableCanvas/widgets/mass-actions/index.mjs +1 -1
  303. package/components/TableContract/index.cjs +1 -1
  304. package/components/TableContract/index.mjs +2 -2
  305. package/components/TableGlide/hooks/selection/index.cjs +1 -1
  306. package/components/TableGlide/hooks/selection/index.mjs +1 -1
  307. package/components/TableGlide/index.cjs +1 -1
  308. package/components/TableGlide/index.mjs +1 -1
  309. package/components/TableGlide/lib/canvas/cells/buttons/index.cjs +1 -1
  310. package/components/TableGlide/lib/canvas/cells/buttons/index.mjs +1 -1
  311. package/components/TableGlide/lib/canvas/cells/iconSprites/index.cjs +1 -1
  312. package/components/TableGlide/lib/canvas/cells/iconSprites/index.mjs +1 -1
  313. package/components/TableGlide/lib/canvas/cells/index.cjs +1 -1
  314. package/components/TableGlide/lib/canvas/cells/index.mjs +1 -1
  315. package/components/TableGlide/lib/canvas/cells/renderer/index.cjs +1 -1
  316. package/components/TableGlide/lib/canvas/cells/renderer/index.mjs +1 -1
  317. package/components/TableGlide/lib/canvas/core/helpers/index.cjs +1 -1
  318. package/components/TableGlide/lib/canvas/core/helpers/index.mjs +1 -1
  319. package/components/TableGlide/lib/canvas/core/index.cjs +1 -1
  320. package/components/TableGlide/lib/canvas/core/index.mjs +1 -1
  321. package/components/TableGlide/lib/canvas/hooks/index.cjs +1 -1
  322. package/components/TableGlide/lib/canvas/hooks/index.mjs +1 -1
  323. package/components/TableGlide/lib/canvas/index.cjs +1 -1
  324. package/components/TableGlide/lib/canvas/index.mjs +1 -1
  325. package/components/TableGlide/lib/canvas/miniflex/index.cjs +1 -1
  326. package/components/TableGlide/lib/canvas/miniflex/index.mjs +1 -1
  327. package/components/TableGlide/lib/canvas/primitives/index.cjs +1 -1
  328. package/components/TableGlide/lib/canvas/primitives/index.mjs +1 -1
  329. package/components/TableGlide/lib/canvas/utils/index.cjs +1 -1
  330. package/components/TableGlide/lib/canvas/utils/index.mjs +1 -1
  331. package/components/TableGlide/theming/activeTheme.type.d.ts +1 -1
  332. package/components/TableGlide/theming/custom-colors.d.ts +3 -3
  333. package/components/TableGlide/theming/glide-colors.d.ts +9 -9
  334. package/components/TableGlide/theming/index.cjs +1 -1
  335. package/components/TableGlide/theming/index.mjs +1 -1
  336. package/components/TableTabs/index.cjs +1 -1
  337. package/components/TableTabs/index.mjs +1 -1
  338. package/components/Tooltip/index.cjs +1 -1
  339. package/components/Tooltip/index.mjs +1 -1
  340. package/components/TourWidget/index.cjs +1 -1
  341. package/components/TourWidget/index.mjs +2 -2
  342. package/components/Typography/index.cjs +1 -1
  343. package/components/Typography/index.mjs +1 -1
  344. package/components/Widget/index.cjs +1 -1
  345. package/components/Widget/index.mjs +2 -2
  346. package/formComponents/FormCombobox/index.cjs +1 -1
  347. package/formComponents/FormCombobox/index.mjs +1 -1
  348. package/formComponents/FormDatePickers/FormDatePickerRange/ui/FormDatePickerRangeStyled.d.ts +2 -0
  349. package/formComponents/FormRadioGroupBox/index.cjs +1 -1
  350. package/formComponents/FormRadioGroupBox/index.mjs +1 -1
  351. package/formComponents/FormSegments/index.cjs +1 -1
  352. package/formComponents/FormSegments/index.mjs +1 -1
  353. package/formComponents/FormSwitch/index.cjs +1 -1
  354. package/formComponents/FormSwitch/index.mjs +1 -1
  355. package/index.cjs +1 -1
  356. package/index.mjs +1787 -1629
  357. package/layouts/Container/index.cjs +1 -1
  358. package/layouts/Container/index.mjs +1 -1
  359. package/layouts/Container/lib/utils/index.cjs +1 -1
  360. package/layouts/Container/lib/utils/index.mjs +1 -1
  361. package/layouts/ErrorPage/index.cjs +1 -1
  362. package/layouts/ErrorPage/index.mjs +1 -1
  363. package/layouts/FiltersActions/FiltersActions.d.ts +2 -2
  364. package/layouts/FiltersActions/components/Segments.d.ts +2 -2
  365. package/layouts/FiltersActions/hooks/index.cjs +1 -1
  366. package/layouts/FiltersActions/hooks/index.mjs +1 -1
  367. package/layouts/FiltersActions/index.cjs +1 -1
  368. package/layouts/FiltersActions/index.mjs +1 -1
  369. package/layouts/Layout/index.cjs +1 -1
  370. package/layouts/Layout/index.mjs +1 -1
  371. package/layouts/PageLayout/index.cjs +1 -1
  372. package/layouts/PageLayout/index.mjs +1 -1
  373. package/mcp-data/component-index.json +136 -30
  374. package/mixins/index.cjs +2 -2
  375. package/mixins/index.mjs +36 -36
  376. package/package.json +5 -5
  377. package/styles/DefaultGlobalStyle.d.ts +2 -0
  378. package/styles/index.cjs +1 -1
  379. package/styles/index.mjs +1 -1
  380. package/themes/index.cjs +1 -1
  381. package/themes/index.d.ts +2 -0
  382. package/themes/index.mjs +8 -6
  383. package/tokens/color/index.cjs +1 -1
  384. package/tokens/color/index.d.ts +1 -1
  385. package/tokens/color/index.mjs +1225 -1127
  386. package/tokens/gradient/index.cjs +1 -1
  387. package/tokens/gradient/index.d.ts +1 -1
  388. package/tokens/gradient/index.mjs +126 -70
  389. package/tokens/index.cjs +1 -1
  390. package/tokens/index.mjs +1433 -1277
  391. package/tokens/shadow/index.cjs +1 -1
  392. package/tokens/shadow/index.d.ts +1 -1
  393. package/tokens/shadow/index.mjs +9 -7
  394. package/utils/breakpoint/index.cjs +1 -1
  395. package/utils/breakpoint/index.mjs +1 -1
  396. package/utils/clickStream/index.cjs +1 -1
  397. package/utils/clickStream/index.mjs +1 -1
  398. package/utils/eventBus/index.cjs +1 -1
  399. package/utils/eventBus/index.mjs +1 -1
  400. package/utils/getActiveTheme.d.ts +1 -1
  401. package/utils/hooks/index.cjs +1 -1
  402. package/utils/hooks/index.mjs +1 -1
  403. package/utils/index.cjs +1 -1
  404. package/utils/index.mjs +1 -1
  405. package/utils/styles/index.cjs +1 -1
  406. package/utils/styles/index.mjs +1 -1
  407. package/chunks/Stories-CkjLhZAi.cjs +0 -1
  408. package/chunks/TableCanvas-CE8Fv99t.cjs +0 -30
  409. package/chunks/TableGlide-CGAh5x3Q.cjs +0 -1
  410. package/chunks/styles-BMXAIiBk.mjs +0 -128
  411. package/chunks/styles-DwCVRGsC.cjs +0 -2
  412. package/chunks/vendor-BauZZ2hr.mjs +0 -1955
  413. package/chunks/vendor-C47eH0xy.cjs +0 -1950
@@ -1 +1 @@
1
- "use strict";const c=require("react/jsx-runtime"),Y=require("@salutejs/plasma-icons"),Z=require("../components/Box/index.cjs"),ee=require("@salutejs/sdds-finai"),s=require("@salutejs/sdds-themes/tokens/sdds_finai"),h=require("styled-components"),$=require("./utils-DvDFSlCG.cjs"),n=require("react"),z={icon:"left-panel__toggle-button",leftBlockIsResizing:"left-panel__is-resizing"},te=72,ne=56,q=240,se=540,j=.2,oe=h(Z.Box).withConfig({displayName:"styled__PanelContainer"})(["width:100%;height:100%;min-width:","px;display:flex;background-color:",";margin-right:",";border-radius:",";box-shadow:",";transition:",";max-width:",";position:relative;overflow:hidden;padding-right:",";"],({minWidth:e})=>e,()=>s.surfaceSolidCard,s.spacing8x,s.spacing8x,()=>s.shadowDownSoftS,e=>e.$resizing?"none":`max-width ${j}s ease-in-out, opacity ${j}s ease-in-out`,e=>e.width!==void 0?`${Math.min(e.width,e.maxWidth)}px`:`${e.minWidth}px`,({showResizeable:e})=>e?s.spacing6x:0),ie=h.div.withConfig({displayName:"styled__PanelCrossfade"})(["flex:1 1 auto;min-width:0;height:100%;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);overflow:hidden;"]),W=h.css(["grid-area:1 / 1;min-width:0;min-height:0;opacity:",";visibility:",";pointer-events:",";transition:opacity ","s ease-in-out,visibility 0s ",";"],({$active:e})=>e?1:0,({$active:e})=>e?"visible":"hidden",({$active:e})=>e?"auto":"none",j,({$active:e})=>e?"0s":`${j}s`),re=h.div.withConfig({displayName:"styled__PanelContent"})(["",";width:100%;height:100%;margin-top:0;position:relative;"],W),ae=h.div.withConfig({displayName:"styled__PanelCollapsedContent"})(["",";height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:",";width:100%;"],W,({$isAdaptive1280:e,showResizeable:t})=>t?e?"6px":"10px":s.spacing8x),le=h.div.withConfig({displayName:"styled__PanelCollapsedBody"})(["gap:",";display:flex;flex-direction:column;"],s.spacing8x),ce=h(ee.EmbedIconButton).withConfig({displayName:"styled__PanelIconButton"})(["z-index:1;position:",";top:",";right:",";width:","px !important;height:","px !important;.left-panel__toggle-button{transform:",";}"],e=>e.isAbsolute?"absolute":"static",s.spacing8x,s.spacing8x,({$isAdaptive1280:e})=>e?32:40,({$isAdaptive1280:e})=>e?32:40,e=>e.collapsed?"rotate(270deg)":"rotate(90deg)"),de=h.div.withConfig({displayName:"styled__PanelSeparator"})(["position:absolute;top:0;right:0px;width:12px;height:100%;cursor:col-resize;z-index:10;&::before{content:'';position:absolute;top:0;left:50%;transform:translateX(-50%);width:12px;height:100%;background-color:",";}&::after{content:'';position:absolute;top:",";left:50%;transform:translateX(-50%);border-radius:95px;width:4px;height:",";background-color:",";}&:hover{&::after{background-color:",";}}"],()=>s.surfaceSolidSecondary,`calc(50% - ${s.spacing16x} / 2)`,s.spacing16x,()=>s.outlineSolidSecondary,()=>s.outlineSolidSecondaryHover),k=({onClick:e,collapsed:t=!1,isAbsolute:i=!1,isAdaptive1280:r=!1,...u})=>c.jsx(ce,{onClick:e,$isAdaptive1280:r,collapsed:t,isAbsolute:i,view:"secondary",size:r?"s":"l",...u,children:c.jsx(Y.IconArrowBarDown,{className:z.icon})}),T=({setWidth:e,isResizingRef:t,setIsResizing:i,panelRef:r,minWidth:u,maxWidth:b,parentRef:P,isCollapsed:C,onResize:m})=>{const L=n.useCallback(()=>{var f;document.body.style.cursor="col-resize",document.body.style.userSelect="none",t.current=!0,i(!0),(f=r.current)==null||f.classList.add(z.leftBlockIsResizing)},[r,t,i]);return n.useEffect(()=>{const f=()=>{var _,a;document.body.style.cursor="auto",document.body.style.userSelect="",t.current=!1,i(!1),(_=r.current)==null||_.classList.remove(z.leftBlockIsResizing);const g=((a=r.current)==null?void 0:a.clientWidth)??0;g>u&&g<q&&e(u)},B=g=>{if(!t.current||!r.current||!P.current)return;g.preventDefault();const d=P.current.getBoundingClientRect(),a=g.clientX-d.left,l=$.clamp(u,a,b);e(l),!C&&m&&m(l)},x=$.throttleWithLastCall(B,16);return window.addEventListener("mousemove",x),window.addEventListener("mouseup",f),()=>{window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",f)}},[e,t,i,r,u,b,P,C,m]),{startResizing:L}},X=e=>({buttonSize:e?"xs":"s"}),H=(e,t)=>t??(e?ne:te),E=(e,t)=>typeof e=="function"?e(t):e,O=({widthState:e,minWidth:t,maxWidth:i=se,disableMediaAdaptive:r=!1,collapseState:u,containerProps:b,contentProps:P,collapsedContentProps:C,expandedContent:m,collapsedContent:L,collapsedFooterContent:f,showToggleButton:B=!0,showResizeable:x=!0,onResize:g,onToggleCollapse:d})=>{const{down:_}=$.useBreakpoint(),a=!r&&_("xl"),l=H(a,t),w=n.useMemo(()=>X(a),[a]),R=n.useMemo(()=>E(m,w),[m,w]),F=n.useMemo(()=>E(L,w),[L,w]),K=n.useMemo(()=>E(f,w),[f,w]),V=n.useState(!1),[o,I]=u??V,G=n.useState(Number(o?l:i)),[y,v]=e??G,N=n.useRef(null),A=n.useRef(null),M=n.useRef(!1),[J,Q]=n.useState(!1),{startResizing:U}=T({setWidth:v,isResizingRef:M,setIsResizing:Q,panelRef:N,minWidth:l,maxWidth:i,parentRef:A,isCollapsed:o,onResize:g});n.useEffect(()=>{if(y!==void 0){const p=y<q;p!==o&&(I(p),d&&!M.current&&d(p))}},[y,o,d,I]),n.useEffect(()=>{!M.current&&o&&y!==l&&v(l)},[o,l,v,y]);const D=n.useCallback(()=>{I(p=>{const S=!p;return d&&d(S),v(S?l:i),S})},[d,I,v,l,i]);return c.jsxs(oe,{ref:N,collapsed:o,maxWidth:i,minWidth:l,width:y,$resizing:J,showResizeable:x,...b,children:[c.jsxs(ie,{children:[c.jsxs(re,{$active:!o,"aria-hidden":o,...P,children:[B&&c.jsx(k,{onClick:D,collapsed:o,isAdaptive1280:a,isAbsolute:!0}),R]}),c.jsxs(ae,{$active:o,"aria-hidden":!o,$isAdaptive1280:a,showResizeable:x,...C,children:[c.jsxs(le,{children:[B&&c.jsx(k,{onClick:D,collapsed:o,isAdaptive1280:a}),F]}),K]})]}),x&&c.jsx(de,{onMouseDown:p=>{var S;p.preventDefault(),(S=N.current)!=null&&S.parentElement&&(A.current=N.current.parentElement),U()}})]})};O.LeftPanelToggleButton=k;exports.LeftPanel=O;exports.LeftPanelToggleButton=k;exports.getLeftPanelMinWidth=H;exports.getLeftPanelSlotSizes=X;exports.renderLeftPanelSlot=E;exports.toggleButtonClassNames=z;exports.useResize=T;
1
+ "use strict";const c=require("react/jsx-runtime"),Y=require("@salutejs/plasma-icons"),Z=require("../components/Box/index.cjs"),ee=require("@salutejs/sdds-finai"),s=require("@salutejs/sdds-themes/tokens/sdds_finai"),h=require("styled-components"),$=require("./utils-CUW5bd8S.cjs"),n=require("react"),z={icon:"left-panel__toggle-button",leftBlockIsResizing:"left-panel__is-resizing"},te=72,ne=56,q=240,se=540,j=.2,oe=h(Z.Box).withConfig({displayName:"styled__PanelContainer"})(["width:100%;height:100%;min-width:","px;display:flex;background-color:",";margin-right:",";border-radius:",";box-shadow:",";transition:",";max-width:",";position:relative;overflow:hidden;padding-right:",";"],({minWidth:e})=>e,()=>s.surfaceSolidCard,s.spacing8x,s.spacing8x,()=>s.shadowDownSoftS,e=>e.$resizing?"none":`max-width ${j}s ease-in-out, opacity ${j}s ease-in-out`,e=>e.width!==void 0?`${Math.min(e.width,e.maxWidth)}px`:`${e.minWidth}px`,({showResizeable:e})=>e?s.spacing6x:0),ie=h.div.withConfig({displayName:"styled__PanelCrossfade"})(["flex:1 1 auto;min-width:0;height:100%;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);overflow:hidden;"]),W=h.css(["grid-area:1 / 1;min-width:0;min-height:0;opacity:",";visibility:",";pointer-events:",";transition:opacity ","s ease-in-out,visibility 0s ",";"],({$active:e})=>e?1:0,({$active:e})=>e?"visible":"hidden",({$active:e})=>e?"auto":"none",j,({$active:e})=>e?"0s":`${j}s`),re=h.div.withConfig({displayName:"styled__PanelContent"})(["",";width:100%;height:100%;margin-top:0;position:relative;"],W),ae=h.div.withConfig({displayName:"styled__PanelCollapsedContent"})(["",";height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:",";width:100%;"],W,({$isAdaptive1280:e,showResizeable:t})=>t?e?"6px":"10px":s.spacing8x),le=h.div.withConfig({displayName:"styled__PanelCollapsedBody"})(["gap:",";display:flex;flex-direction:column;"],s.spacing8x),ce=h(ee.EmbedIconButton).withConfig({displayName:"styled__PanelIconButton"})(["z-index:1;position:",";top:",";right:",";width:","px !important;height:","px !important;.left-panel__toggle-button{transform:",";}"],e=>e.isAbsolute?"absolute":"static",s.spacing8x,s.spacing8x,({$isAdaptive1280:e})=>e?32:40,({$isAdaptive1280:e})=>e?32:40,e=>e.collapsed?"rotate(270deg)":"rotate(90deg)"),de=h.div.withConfig({displayName:"styled__PanelSeparator"})(["position:absolute;top:0;right:0px;width:12px;height:100%;cursor:col-resize;z-index:10;&::before{content:'';position:absolute;top:0;left:50%;transform:translateX(-50%);width:12px;height:100%;background-color:",";}&::after{content:'';position:absolute;top:",";left:50%;transform:translateX(-50%);border-radius:95px;width:4px;height:",";background-color:",";}&:hover{&::after{background-color:",";}}"],()=>s.surfaceSolidSecondary,`calc(50% - ${s.spacing16x} / 2)`,s.spacing16x,()=>s.outlineSolidSecondary,()=>s.outlineSolidSecondaryHover),k=({onClick:e,collapsed:t=!1,isAbsolute:i=!1,isAdaptive1280:r=!1,...u})=>c.jsx(ce,{onClick:e,$isAdaptive1280:r,collapsed:t,isAbsolute:i,view:"secondary",size:r?"s":"l",...u,children:c.jsx(Y.IconArrowBarDown,{className:z.icon})}),T=({setWidth:e,isResizingRef:t,setIsResizing:i,panelRef:r,minWidth:u,maxWidth:b,parentRef:P,isCollapsed:C,onResize:m})=>{const L=n.useCallback(()=>{var f;document.body.style.cursor="col-resize",document.body.style.userSelect="none",t.current=!0,i(!0),(f=r.current)==null||f.classList.add(z.leftBlockIsResizing)},[r,t,i]);return n.useEffect(()=>{const f=()=>{var _,a;document.body.style.cursor="auto",document.body.style.userSelect="",t.current=!1,i(!1),(_=r.current)==null||_.classList.remove(z.leftBlockIsResizing);const g=((a=r.current)==null?void 0:a.clientWidth)??0;g>u&&g<q&&e(u)},B=g=>{if(!t.current||!r.current||!P.current)return;g.preventDefault();const d=P.current.getBoundingClientRect(),a=g.clientX-d.left,l=$.clamp(u,a,b);e(l),!C&&m&&m(l)},x=$.throttleWithLastCall(B,16);return window.addEventListener("mousemove",x),window.addEventListener("mouseup",f),()=>{window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",f)}},[e,t,i,r,u,b,P,C,m]),{startResizing:L}},X=e=>({buttonSize:e?"xs":"s"}),H=(e,t)=>t??(e?ne:te),E=(e,t)=>typeof e=="function"?e(t):e,O=({widthState:e,minWidth:t,maxWidth:i=se,disableMediaAdaptive:r=!1,collapseState:u,containerProps:b,contentProps:P,collapsedContentProps:C,expandedContent:m,collapsedContent:L,collapsedFooterContent:f,showToggleButton:B=!0,showResizeable:x=!0,onResize:g,onToggleCollapse:d})=>{const{down:_}=$.useBreakpoint(),a=!r&&_("xl"),l=H(a,t),w=n.useMemo(()=>X(a),[a]),R=n.useMemo(()=>E(m,w),[m,w]),F=n.useMemo(()=>E(L,w),[L,w]),K=n.useMemo(()=>E(f,w),[f,w]),V=n.useState(!1),[o,I]=u??V,G=n.useState(Number(o?l:i)),[y,v]=e??G,N=n.useRef(null),A=n.useRef(null),M=n.useRef(!1),[J,Q]=n.useState(!1),{startResizing:U}=T({setWidth:v,isResizingRef:M,setIsResizing:Q,panelRef:N,minWidth:l,maxWidth:i,parentRef:A,isCollapsed:o,onResize:g});n.useEffect(()=>{if(y!==void 0){const p=y<q;p!==o&&(I(p),d&&!M.current&&d(p))}},[y,o,d,I]),n.useEffect(()=>{!M.current&&o&&y!==l&&v(l)},[o,l,v,y]);const D=n.useCallback(()=>{I(p=>{const S=!p;return d&&d(S),v(S?l:i),S})},[d,I,v,l,i]);return c.jsxs(oe,{ref:N,collapsed:o,maxWidth:i,minWidth:l,width:y,$resizing:J,showResizeable:x,...b,children:[c.jsxs(ie,{children:[c.jsxs(re,{$active:!o,"aria-hidden":o,...P,children:[B&&c.jsx(k,{onClick:D,collapsed:o,isAdaptive1280:a,isAbsolute:!0}),R]}),c.jsxs(ae,{$active:o,"aria-hidden":!o,$isAdaptive1280:a,showResizeable:x,...C,children:[c.jsxs(le,{children:[B&&c.jsx(k,{onClick:D,collapsed:o,isAdaptive1280:a}),F]}),K]})]}),x&&c.jsx(de,{onMouseDown:p=>{var S;p.preventDefault(),(S=N.current)!=null&&S.parentElement&&(A.current=N.current.parentElement),U()}})]})};O.LeftPanelToggleButton=k;exports.LeftPanel=O;exports.LeftPanelToggleButton=k;exports.getLeftPanelMinWidth=H;exports.getLeftPanelSlotSizes=X;exports.renderLeftPanelSlot=E;exports.toggleButtonClassNames=z;exports.useResize=T;
@@ -4,7 +4,7 @@ import { Box as tt } from "../components/Box/index.mjs";
4
4
  import { EmbedIconButton as et } from "@salutejs/sdds-finai";
5
5
  import { spacing8x as v, surfaceSolidCard as nt, shadowDownSoftS as ot, spacing6x as it, surfaceSolidSecondary as st, spacing16x as j, outlineSolidSecondary as rt, outlineSolidSecondaryHover as at } from "@salutejs/sdds-themes/tokens/sdds_finai";
6
6
  import p, { css as lt } from "styled-components";
7
- import { t as ct, e as dt, d as ut } from "./utils-D4eJY8pa.mjs";
7
+ import { t as ct, e as dt, d as ut } from "./utils-YKicAHp0.mjs";
8
8
  import { useCallback as O, useEffect as M, useMemo as B, useState as k, useRef as A } from "react";
9
9
  const W = {
10
10
  icon: "left-panel__toggle-button",
@@ -1 +1 @@
1
- "use strict";const y=require("react"),g=require("react/jsx-runtime"),O=require("../components/Box/index.cjs"),w=require("@salutejs/sdds-finai"),T=require("../components/Collapse/index.cjs"),A=require("./Table-C2ehPQDQ.cjs"),$=require("@salutejs/plasma-icons"),q=require("./utils-DvDFSlCG.cjs"),B=require("styled-components"),k=require("@salutejs/sdds-themes/tokens/sdds_finai"),I=require("./FiltersActions-Dw5QqWa8.cjs"),_="list-of-filters",f={chipsGroup:`${_}__chip-group`,chipsGroupLabel:`${_}__chip-group__label`,chipsGroupCount:`${_}__chip-group__count`,chip:`${_}__chip`,clearButtonBlock:`${_}__clear-button-block`,chipsContainer:`${_}__chips-container`,container:`${_}__container`},N=e=>"groupId"in e,W=()=>B.css(k.bodyS),G=250,M=B(w.ChipGroup).withConfig({displayName:"ChipOrGroup__StyledChipGroup"})(["&{border-radius:",";padding:4px 2px;"," align-items:center;&.","{gap:4px;& .",":first-child,& ."," + .","{margin-left:4px;}& .","{display:inline-block;min-width:0;max-width:","px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}& .","{color:",";margin-left:4px;}& ."," svg{color:"," !important;}}}"],()=>k.borderRadiusS,()=>W(),f.chipsGroup,f.chip,f.chipsGroupLabel,f.chip,f.chipsGroupLabel,G,f.chipsGroupCount,()=>k.textPrimary,f.chip,()=>k.onLightTextSecondary),V=({itemOrGroup:e,maxLengthInGroup:i=2,ellipsisLabel:h=!1,chipStyle:n,renderGroupLabel:u,renderChipLabel:r})=>{if(N(e)){const p=e,b=p.items.slice(0,i),d=p.items.length-b.length,l=u?u(p):p.groupLabel;return g.jsxs(M,{className:f.chipsGroup,size:"xs",gap:"wide",view:"default",isCommonChipStyles:!1,children:[h?g.jsx("span",{className:f.chipsGroupLabel,title:l,children:l}):l,b.map(t=>g.jsx(w.Chip,{className:f.chip,title:"Удалить фильтр",view:"default",text:r?r(p,t):t.label.toString(),size:"xs",pilled:!0,onClick:t.onClick,style:{maxWidth:180,...A.overflowDotsStyle,...n&&n(p,t)},appearance:"transparent"},t.id)),d>0&&g.jsx(I.FiltersActionsTooltip,{groupLabel:l,items:p.items.map(t=>r?r(p,t):t.label.toString()),children:g.jsxs("span",{className:f.chipsGroupCount,children:["+",d]})})]})}return g.jsx(w.Chip,{className:f.chip,title:"Удалить фильтр",view:"default",text:r?r(null,e):e.label.toString(),size:"xs",pilled:!0,onClick:e.onClick,style:{maxWidth:150,...A.overflowDotsStyle,...n&&n(e,void 0)},appearance:"transparent"})},H=(e,i)=>{y.useEffect(()=>{var p;if(!i)return;const h=(p=e.current)==null?void 0:p.querySelector(".tabs-clip-scroll"),n=h==null?void 0:h.firstElementChild;if(!h)return;const u=()=>{h.dispatchEvent(new Event("scroll",{bubbles:!0}))},r=q.createSafeResizeObserver(u);return r.observe(h),n&&r.observe(n),()=>{r.disconnect()}},[e,i])},P=(e,i,h)=>{var c,s;const n=y.useRef(null),u=!!n.current,[r,p]=y.useState(0),b=n.current,d=(c=n.current)==null?void 0:c.firstChild,l=(s=n.current)==null?void 0:s.lastChild,t=(b&&d&&l&&b.offsetWidth-d.offsetWidth-l.offsetWidth-i*2-h*2)??void 0;return y.useEffect(()=>{const o=n.current;let m=0;function j(){m=(o==null?void 0:o.offsetWidth)??0,p(m)}j();const S=q.createSafeResizeObserver(j);return e&&o&&S.observe(o),()=>{S.disconnect()}},[e,u]),{refForContainer:n,maxWidthForCenterElement:t}},K={xs:{height:32,paddingInline:0}},D=1,F=`${D}px solid ${()=>A.COLORS.border}`,U=B(w.Tabs).withConfig({displayName:"ListOfFilters__StyledTabs"})({"&":{"& .tabs-clip-scroll":{overflowY:"hidden"},"& button.tab-item-animated":{marginLeft:"8px","&:first-of-type":{marginLeft:"0px"}}}}),Z=({opened:e,items:i,clearAll:h,size:n="xs",paddingTop:u=0,maxLengthInGroup:r=2,ellipsisLabel:p=!1,sizeOnOpen:b,leftSlot:d,paddingInline:l,maxHeight:t,chipStyle:c,renderGroupLabel:s,renderChipLabel:o,showResetAllFiltersButton:m=!0,extraCss:j={}})=>{const S=K[n],z=l??S.paddingInline,C=t??S.height,{refForContainer:L}=P(e,z,D);return q.useDebouncedValue(e,200),H(L,e),g.jsx(T.Collapse,{isOpen:e,sizeOnOpen:b??C+u,unMountOnClose:!0,children:g.jsxs(O.Box,{ref:L,className:f.container,$css:{display:"flex",borderInline:F,borderTop:F,paddingInline:z,maxHeight:C,marginTop:u,flexDirection:"row-reverse",...j},children:[g.jsx(O.Box,{$css:"display: inline;",children:d??null}),g.jsx(U,{className:f.chipsContainer,view:"clear",size:"xs",style:{height:C-D,flex:1,minWidth:0,overflow:"hidden"},children:!!i.length&&i.map((a,x)=>{let v;return"groupId"in a&&(v=a.groupId??x),"id"in a&&(v=a.id??x),g.jsx(w.TabItem,{view:"clear",onClick:E=>E.preventDefault(),children:g.jsx(V,{maxLengthInGroup:r,ellipsisLabel:p,itemOrGroup:a,chipStyle:c,renderGroupLabel:s,renderChipLabel:o})},v)})}),g.jsx(O.Box,{className:f.clearButtonBlock,$css:"display: inline-flex; margin-left: auto;",children:m&&g.jsx(w.Button,{view:"clear",size:"xs",text:"Сбросить все",disabled:!i.length,contentLeft:g.jsx($.IconClose,{size:"xs",color:"inherit"}),onClick:h})})]})})},R=y.memo(Z),X=e=>e==null?"":e instanceof Date?e.toLocaleDateString():Array.isArray(e)?e.map(i=>i instanceof Date?i.toLocaleDateString():String(i??"")).join(", "):String(e),Y=({filters:e,filtersInfo:i,options:h,updateFilters:n,order:u})=>{const{labelFromValueMaps:r}=y.useMemo(()=>{const d={};for(const l of Object.entries(h)){const[t,c]=l;d[t]=new Map(c.map(s=>[String(s.value),s.label]))}return{labelFromValueMaps:d}},[h]),p=y.useCallback(()=>{for(const d of Object.entries(i)){const[l,t]=d;n(l,t.clearedValue)}},[i,n]);return{...y.useMemo(()=>{const d=Object.entries(e).reduce((t,c)=>{var L;const s=c[0],o=c[1],m=Array.isArray(o);if(!(m&&o.length||!m&&o&&o!==!1)||o===i[s].clearedValue)return t;if(typeof o=="boolean"){const a={id:s,label:i[s].label,onClick:()=>{n(s,i[s].clearedValue)}};return t.push(a),t}const C={groupId:s,groupLabel:i[s].label,items:[]};if(m)C.items=o.map(a=>{var x,v;return{id:a,label:((v=(x=r==null?void 0:r[s])==null?void 0:x.get)==null?void 0:v.call(x,a))??a.toString(),onClick:()=>{n(s,o.filter(E=>E!==a))}}});else{const a=r==null?void 0:r[s],x=((L=a==null?void 0:a.get)==null?void 0:L.call(a,o))??X(o);C.items=[{id:o.toString(),label:x,onClick:()=>{n(s,"clearedValue"in i[s]?i[s].clearedValue:"")}}]}return t.push(C),t},[]);let l=d;if(u&&u!=="default"){if(typeof u=="function")l=u(d);else if(Array.isArray(u)){const t=new Map;d.forEach(c=>{const s="groupId"in c?c.groupId:String(c.id);t.set(s,c)}),l=[],u.forEach(c=>{const s=t.get(c);s&&(l.push(s),t.delete(c))}),t.size>0&&Array.from(t.keys()).sort().forEach(s=>{const o=t.get(s);o&&l.push(o)})}}return{filterListOpened:d.length>0,filterList:l}},[e,i,r,n,u]),clearAll:p,labelFromValueMaps:r}},J=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"}));exports.ListOfFilters=R;exports.ListOfFilters_lazy=J;exports.isGroup=N;exports.listOfFiltersClassNames=f;exports.useFiltersList=Y;
1
+ "use strict";const y=require("react"),g=require("react/jsx-runtime"),O=require("../components/Box/index.cjs"),w=require("@salutejs/sdds-finai"),T=require("../components/Collapse/index.cjs"),A=require("./Table-C-lLZklk.cjs"),$=require("@salutejs/plasma-icons"),q=require("./utils-CUW5bd8S.cjs"),B=require("styled-components"),k=require("@salutejs/sdds-themes/tokens/sdds_finai"),I=require("./FiltersActions-CKimtYsU.cjs"),_="list-of-filters",f={chipsGroup:`${_}__chip-group`,chipsGroupLabel:`${_}__chip-group__label`,chipsGroupCount:`${_}__chip-group__count`,chip:`${_}__chip`,clearButtonBlock:`${_}__clear-button-block`,chipsContainer:`${_}__chips-container`,container:`${_}__container`},N=e=>"groupId"in e,W=()=>B.css(k.bodyS),G=250,M=B(w.ChipGroup).withConfig({displayName:"ChipOrGroup__StyledChipGroup"})(["&{border-radius:",";padding:4px 2px;"," align-items:center;&.","{gap:4px;& .",":first-child,& ."," + .","{margin-left:4px;}& .","{display:inline-block;min-width:0;max-width:","px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}& .","{color:",";margin-left:4px;}& ."," svg{color:"," !important;}}}"],()=>k.borderRadiusS,()=>W(),f.chipsGroup,f.chip,f.chipsGroupLabel,f.chip,f.chipsGroupLabel,G,f.chipsGroupCount,()=>k.textPrimary,f.chip,()=>k.onLightTextSecondary),V=({itemOrGroup:e,maxLengthInGroup:i=2,ellipsisLabel:h=!1,chipStyle:n,renderGroupLabel:u,renderChipLabel:r})=>{if(N(e)){const p=e,b=p.items.slice(0,i),d=p.items.length-b.length,l=u?u(p):p.groupLabel;return g.jsxs(M,{className:f.chipsGroup,size:"xs",gap:"wide",view:"default",isCommonChipStyles:!1,children:[h?g.jsx("span",{className:f.chipsGroupLabel,title:l,children:l}):l,b.map(t=>g.jsx(w.Chip,{className:f.chip,title:"Удалить фильтр",view:"default",text:r?r(p,t):t.label.toString(),size:"xs",pilled:!0,onClick:t.onClick,style:{maxWidth:180,...A.overflowDotsStyle,...n&&n(p,t)},appearance:"transparent"},t.id)),d>0&&g.jsx(I.FiltersActionsTooltip,{groupLabel:l,items:p.items.map(t=>r?r(p,t):t.label.toString()),children:g.jsxs("span",{className:f.chipsGroupCount,children:["+",d]})})]})}return g.jsx(w.Chip,{className:f.chip,title:"Удалить фильтр",view:"default",text:r?r(null,e):e.label.toString(),size:"xs",pilled:!0,onClick:e.onClick,style:{maxWidth:150,...A.overflowDotsStyle,...n&&n(e,void 0)},appearance:"transparent"})},H=(e,i)=>{y.useEffect(()=>{var p;if(!i)return;const h=(p=e.current)==null?void 0:p.querySelector(".tabs-clip-scroll"),n=h==null?void 0:h.firstElementChild;if(!h)return;const u=()=>{h.dispatchEvent(new Event("scroll",{bubbles:!0}))},r=q.createSafeResizeObserver(u);return r.observe(h),n&&r.observe(n),()=>{r.disconnect()}},[e,i])},P=(e,i,h)=>{var c,s;const n=y.useRef(null),u=!!n.current,[r,p]=y.useState(0),b=n.current,d=(c=n.current)==null?void 0:c.firstChild,l=(s=n.current)==null?void 0:s.lastChild,t=(b&&d&&l&&b.offsetWidth-d.offsetWidth-l.offsetWidth-i*2-h*2)??void 0;return y.useEffect(()=>{const o=n.current;let m=0;function j(){m=(o==null?void 0:o.offsetWidth)??0,p(m)}j();const S=q.createSafeResizeObserver(j);return e&&o&&S.observe(o),()=>{S.disconnect()}},[e,u]),{refForContainer:n,maxWidthForCenterElement:t}},K={xs:{height:32,paddingInline:0}},D=1,F=`${D}px solid ${()=>A.COLORS.border}`,U=B(w.Tabs).withConfig({displayName:"ListOfFilters__StyledTabs"})({"&":{"& .tabs-clip-scroll":{overflowY:"hidden"},"& button.tab-item-animated":{marginLeft:"8px","&:first-of-type":{marginLeft:"0px"}}}}),Z=({opened:e,items:i,clearAll:h,size:n="xs",paddingTop:u=0,maxLengthInGroup:r=2,ellipsisLabel:p=!1,sizeOnOpen:b,leftSlot:d,paddingInline:l,maxHeight:t,chipStyle:c,renderGroupLabel:s,renderChipLabel:o,showResetAllFiltersButton:m=!0,extraCss:j={}})=>{const S=K[n],z=l??S.paddingInline,C=t??S.height,{refForContainer:L}=P(e,z,D);return q.useDebouncedValue(e,200),H(L,e),g.jsx(T.Collapse,{isOpen:e,sizeOnOpen:b??C+u,unMountOnClose:!0,children:g.jsxs(O.Box,{ref:L,className:f.container,$css:{display:"flex",borderInline:F,borderTop:F,paddingInline:z,maxHeight:C,marginTop:u,flexDirection:"row-reverse",...j},children:[g.jsx(O.Box,{$css:"display: inline;",children:d??null}),g.jsx(U,{className:f.chipsContainer,view:"clear",size:"xs",style:{height:C-D,flex:1,minWidth:0,overflow:"hidden"},children:!!i.length&&i.map((a,x)=>{let v;return"groupId"in a&&(v=a.groupId??x),"id"in a&&(v=a.id??x),g.jsx(w.TabItem,{view:"clear",onClick:E=>E.preventDefault(),children:g.jsx(V,{maxLengthInGroup:r,ellipsisLabel:p,itemOrGroup:a,chipStyle:c,renderGroupLabel:s,renderChipLabel:o})},v)})}),g.jsx(O.Box,{className:f.clearButtonBlock,$css:"display: inline-flex; margin-left: auto;",children:m&&g.jsx(w.Button,{view:"clear",size:"xs",text:"Сбросить все",disabled:!i.length,contentLeft:g.jsx($.IconClose,{size:"xs",color:"inherit"}),onClick:h})})]})})},R=y.memo(Z),X=e=>e==null?"":e instanceof Date?e.toLocaleDateString():Array.isArray(e)?e.map(i=>i instanceof Date?i.toLocaleDateString():String(i??"")).join(", "):String(e),Y=({filters:e,filtersInfo:i,options:h,updateFilters:n,order:u})=>{const{labelFromValueMaps:r}=y.useMemo(()=>{const d={};for(const l of Object.entries(h)){const[t,c]=l;d[t]=new Map(c.map(s=>[String(s.value),s.label]))}return{labelFromValueMaps:d}},[h]),p=y.useCallback(()=>{for(const d of Object.entries(i)){const[l,t]=d;n(l,t.clearedValue)}},[i,n]);return{...y.useMemo(()=>{const d=Object.entries(e).reduce((t,c)=>{var L;const s=c[0],o=c[1],m=Array.isArray(o);if(!(m&&o.length||!m&&o&&o!==!1)||o===i[s].clearedValue)return t;if(typeof o=="boolean"){const a={id:s,label:i[s].label,onClick:()=>{n(s,i[s].clearedValue)}};return t.push(a),t}const C={groupId:s,groupLabel:i[s].label,items:[]};if(m)C.items=o.map(a=>{var x,v;return{id:a,label:((v=(x=r==null?void 0:r[s])==null?void 0:x.get)==null?void 0:v.call(x,a))??a.toString(),onClick:()=>{n(s,o.filter(E=>E!==a))}}});else{const a=r==null?void 0:r[s],x=((L=a==null?void 0:a.get)==null?void 0:L.call(a,o))??X(o);C.items=[{id:o.toString(),label:x,onClick:()=>{n(s,"clearedValue"in i[s]?i[s].clearedValue:"")}}]}return t.push(C),t},[]);let l=d;if(u&&u!=="default"){if(typeof u=="function")l=u(d);else if(Array.isArray(u)){const t=new Map;d.forEach(c=>{const s="groupId"in c?c.groupId:String(c.id);t.set(s,c)}),l=[],u.forEach(c=>{const s=t.get(c);s&&(l.push(s),t.delete(c))}),t.size>0&&Array.from(t.keys()).sort().forEach(s=>{const o=t.get(s);o&&l.push(o)})}}return{filterListOpened:d.length>0,filterList:l}},[e,i,r,n,u]),clearAll:p,labelFromValueMaps:r}},J=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"}));exports.ListOfFilters=R;exports.ListOfFilters_lazy=J;exports.isGroup=N;exports.listOfFiltersClassNames=f;exports.useFiltersList=Y;
@@ -3,12 +3,12 @@ import { jsxs as E, jsx as g } from "react/jsx-runtime";
3
3
  import { Box as A } from "../components/Box/index.mjs";
4
4
  import { Chip as O, ChipGroup as F, TabItem as G, Button as M, Tabs as H } from "@salutejs/sdds-finai";
5
5
  import { Collapse as P } from "../components/Collapse/index.mjs";
6
- import { o as N, C as q } from "./Table-DBKZzRuR.mjs";
6
+ import { o as N, C as q } from "./Table-C_1QGsh8.mjs";
7
7
  import { IconClose as K } from "@salutejs/plasma-icons";
8
- import { c as T, u as U } from "./utils-D4eJY8pa.mjs";
8
+ import { c as T, u as U } from "./utils-YKicAHp0.mjs";
9
9
  import W, { css as Z } from "styled-components";
10
10
  import { borderRadiusS as X, textPrimary as Y, onLightTextSecondary as J, bodyS as Q } from "@salutejs/sdds-themes/tokens/sdds_finai";
11
- import { F as tt } from "./FiltersActions-DlV5c-6Y.mjs";
11
+ import { F as tt } from "./FiltersActions-C5OGUDDx.mjs";
12
12
  const x = "list-of-filters", h = {
13
13
  chipsGroup: `${x}__chip-group`,
14
14
  chipsGroupLabel: `${x}__chip-group__label`,
@@ -1 +1 @@
1
- "use strict";const g=require("react/jsx-runtime"),b=require("@salutejs/sdds-finai"),Rt=require("@salutejs/plasma-icons"),xt=require("./utils-DvDFSlCG.cjs"),p=require("react"),Wt=require("./Table-C2ehPQDQ.cjs"),Vt=require("../constants/index.cjs"),Ct=require("@salutejs/sdds-themes/tokens/sdds_finai"),M=require("styled-components"),jt=require("../components/Box/index.cjs"),se=require("../components/Collapse/index.cjs"),Pt=require("./AnalyticalWidget-D_g7b36w.cjs"),ht=24,L=4,wt=44,Nt=40,Et=24,Q={top:12,right:8,bottom:12,left:24},Bt={top:0,right:10,bottom:0,left:24},ie=Q.left+Q.right,vt=90,qt=110,gt=100,oe=300,Tt=550,Ut=350,Gt=50,Ht=100,Xt=({buttons:t,visibleButtonsCount:i})=>{const{visibleButtons:o,buttonsInDropdown:n}=p.useMemo(()=>{const e=t??[],c=new Set,h=[];e.forEach((f,u)=>{f.view==="accent"?c.add(u):h.push(u)});const l=c.size,a=Math.max(0,i-l),s=new Set(h.slice(0,a)),r=[],w=[];return e.forEach((f,u)=>{c.has(u)||s.has(u)?r.push(f):w.push(f)}),{visibleButtons:r,buttonsInDropdown:w}},[t,i]);return{visibleButtons:o,buttonsInDropdown:n,allButtons:t??[]}},Yt=({isCollapsed:t,setIsCollapsed:i,isSidebarOpen:o,calculatePositionForState:n,calculatePosition:e,setTranslateX:c,shouldApplySidebarOffsetRef:h,wasAutoCollapsedRef:l})=>({handleToggleCollapse:p.useCallback(()=>{const s=!t,r=n(s);r!==void 0&&c(r),o&&(s?h.current=!0:(h.current=!1,l.current=!1)),i(s),setTimeout(()=>{e()},Tt)},[t,o,n,e,c,h,l,i])}),Jt=({isCollapsed:t,containerRef:i,contentRef:o,middleSectionRef:n,buttonRefs:e,moreButtonRef:c,collapseButtonRef:h,leftSectionRef:l,dividerRef:a,buttons:s,isHaveSomeFeatureInSidebar:r,getContainerWidth:w,setVisibleButtonsCount:f,minPadding:u=Et,leftPadding:C=Q.left,rightPadding:A=Q.right,moreButtonWidthEstimate:I=Nt,enableDebugLogs:B=!1})=>{const N=p.useRef([]),z=p.useCallback(()=>{var dt,X,pt,rt,ut,W;const y=w();if(!y||y===0||!s||s.length===0)return B&&console.debug("❌ calculateInitialCompression: нет tableWidth или buttons"),!1;if(!s.every((x,E)=>e.current[E]!==null&&e.current[E]!==void 0))return B&&console.debug("❌ calculateInitialCompression: ref'ы еще не установлены",{buttonsCount:s.length,refsCount:e.current.filter(Boolean).length,refs:e.current.map((x,E)=>({index:E,hasRef:!!x}))}),!1;const S=y-(r?wt:0),q=((dt=l==null?void 0:l.current)==null?void 0:dt.getBoundingClientRect().width)??0,k=((X=n.current)==null?void 0:X.getBoundingClientRect().width)??0,$=s.length>0,R=$?((pt=a==null?void 0:a.current)==null?void 0:pt.getBoundingClientRect().width)??0:0,U=$?L:0,tt=$&&k>0?L:0,ot=R+tt+U,at=L*2,ct=q+k+ot+(((rt=h.current)==null?void 0:rt.getBoundingClientRect().width)??ht)+(C+A)+at,T=[];let P=!0;for(let x=0;x<s.length;x+=1){const E=e.current[x];if(!E){P=!1;break}const F=E.querySelector("button, a")||E;if(!F||!F.isConnected){P=!1;break}const ft=F.getBoundingClientRect(),lt=ft.width||F.offsetWidth||F.scrollWidth||F.clientWidth;if(lt>0)T.push(lt),N.current[x]=lt;else{console.debug("❌ calculateInitialCompression: кнопка не отрендерилась",{index:x,text:(ut=s[x])==null?void 0:ut.text,width:lt,isConnected:F.isConnected,rect:ft}),P=!1;break}}if(!P||T.length!==s.length)return B&&console.debug("❌ calculateInitialCompression: не все кнопки измерены",{allButtonsMeasured:P,buttonWidthsLength:T.length,buttonsLength:s.length}),!1;const et=((W=c.current)==null?void 0:W.getBoundingClientRect().width)??I,v=S-u*2,O=[],j=[];s.forEach((x,E)=>{if(T[E]===void 0)return;(x==null?void 0:x.view)==="accent"?O.push(E):j.push(E)});let V=0;O.forEach(x=>{const E=T[x];E!==void 0&&(V+=E)});const G=new Set(O);let nt=V,st=0;for(let x=0;x<j.length;x+=1){const E=j[x],D=typeof E<"u"?T[E]:0;if(D===void 0)continue;const ft=x<j.length-1?et+L:0,mt=(G.size+1-1)*L,At=nt+D+mt+ft;if(ct+At<=v)nt+=D,st+=1,typeof E<"u"&&G.add(E);else break}const H=G.size;return f(H),console.debug("✅ calculateInitialCompression: успешно выполнено",{buttonWidths:T,visibleCount:H,accentCount:O.length,regularVisibleCount:st}),!0},[s,w,r,f,e,l,n,c,h,a,B,u,C,A,I]);return{calculateCompression:p.useCallback(()=>{t||!i.current||!o.current||requestAnimationFrame(()=>{setTimeout(()=>{var lt,mt,At,It,Mt,St,Dt;const y=w();if(!y||y===0)return;const _=y-(r?wt:0);B&&(console.group("🔧 MassActions Compression"),console.debug("📏 Размеры контейнера:",JSON.stringify({tableWidth:y,isHaveSomeFeatureInSidebar:r,togglePanelWidth:r?wt:0,availableWidth:_,minPaddingRequired:u*2,maxPanelWidthAllowed:_-u*2},null,2)));const S=((lt=l==null?void 0:l.current)==null?void 0:lt.getBoundingClientRect().width)??0,q=((mt=n.current)==null?void 0:mt.getBoundingClientRect().width)??0,k=((s==null?void 0:s.length)??0)>0,$=k?((At=a==null?void 0:a.current)==null?void 0:At.getBoundingClientRect().width)??0:0,R=k?L:0,U=k&&q>0?L:0,tt=$+U+R;let ot=null;if(l!=null&&l.current){const d=l.current.getBoundingClientRect(),{children:m}=l.current,K=[];for(let Y=0;Y<m.length;Y+=1){const Z=m[Y];if(Z){const it=Z.getBoundingClientRect();K.push({tagName:Z.tagName,className:Z.className,width:it.width,height:it.height})}}ot={width:d.width,height:d.height,children:K,childrenTotalWidth:K.reduce((Y,Z)=>Y+Z.width,0)}}const at=L*2,ct=S+q+tt+(((It=h.current)==null?void 0:It.getBoundingClientRect().width)??ht)+(C+A)+at;B&&console.debug("🔲 Фиксированные элементы:",JSON.stringify({leftSectionWidth:S,leftSectionDetails:ot,middleSectionWidth:q,divider:{shouldShow:k,wrapperWidth:$,gapLeft:U,gapRight:R,totalWidth:tt},collapseButtonWidth:((Mt=h.current)==null?void 0:Mt.getBoundingClientRect().width)??ht,containerPadding:C+A,gapsBetweenFixedElements:at,fixedElementsTotal:ct},null,2));const T=[];let P=!0;for(let d=0;d<((s==null?void 0:s.length)??0);d+=1){const m=e.current[d];if(m){const Y=m.querySelector("button, a")||m,it=Y.getBoundingClientRect().width||Y.offsetWidth||Y.scrollWidth||Y.clientWidth;it>0?(T.push(it),N.current[d]=it):N.current[d]!==void 0?T.push(N.current[d]??gt):(P=!1,T.push(gt))}else N.current[d]!==void 0?T.push(N.current[d]??gt):(P=!1,T.push(gt))}if(!P&&T.length===0&&((s==null?void 0:s.length)??0)>0)return;const et=((St=c.current)==null?void 0:St.getBoundingClientRect().width)??I,v=_-u*2,O=i.current?i.current.getBoundingClientRect().width:0;B&&(console.debug("🎯 Ограничения и текущее состояние:",JSON.stringify({targetContainer:{tableWidth:y,availableWidth:_,minPaddingEach:u,minPaddingTotal:u*2,maxPanelWidth:v},currentPanel:{width:O,exceedsMax:O>v,exceedsAvailable:O>_,leftPadding:u,rightPadding:u},moreButtonWidth:et},null,2)),console.debug("🔘 Ширины кнопок:",JSON.stringify({buttons:s==null?void 0:s.map((d,m)=>({index:m,text:d.text,view:d.view,isAccent:d.view==="accent",width:T[m]})),totalButtonsWidth:T.reduce((d,m)=>d+m,0),averageButtonWidth:T.length>0?T.reduce((d,m)=>d+m,0)/T.length:0},null,2)));const j=s??[],V=[],G=[];j.forEach((d,m)=>{if(T[m]===void 0)return;(d==null?void 0:d.view)==="accent"?V.push(m):G.push(m)}),B&&console.debug("🎨 Распределение:",{accentCount:V.length,regularCount:G.length,accentButtons:V.map(d=>{var m;return{index:d,text:(m=j[d])==null?void 0:m.text,width:T[d]}})});let nt=0;V.forEach(d=>{const m=T[d];m!==void 0&&(nt+=m)});const st=new Set(V);let H=nt,dt=0;for(let d=0;d<G.length;d+=1){const m=G[d],K=typeof m<"u"?T[m]:0;if(K===void 0)continue;const Z=d<G.length-1?et+L:0,it=st.size+1,Lt=(it-1)*L,kt=H+K+Lt+Z,_t=ct+kt,yt=_t+3;if(B&&console.debug(` 🔍 Проверка кнопки ${d}:`,{text:typeof m<"u"?(Dt=j[m])==null?void 0:Dt.text:"",width:K,totalButtonsWidthBefore:H,visibleCountAfter:it,gapsBetweenButtons:Lt,moreButtonSpace:Z,requiredWidth:kt,testPanelWidth:_t,testWithBuffer:yt,maxPanelWidth:v,fits:_t<=v,fitsWithBuffer:yt<=v}),yt<=v)H+=K,dt+=1,typeof m<"u"&&st.add(m);else break}const X=st.size,rt=j.length-X>0,ut=X>0?(X-1)*L:0,W=H+ut+(rt?et+L:0),x=ct+W,E=[],D=[];j.forEach((d,m)=>{st.has(m)?E.push(d):D.push(d)});const F=X,ft={fixedElements:{leftSection:S,middleSection:q,divider:tt,collapseButton:ht,containerPadding:C+A,gapsBetweenFixedElements:at,total:ct},buttons:{accentButtonsWidth:nt,visibleRegularButtonsWidth:H-nt,totalButtonsWidth:H,gapsBetweenVisibleButtons:ut,buttonsAreaWidth:W,visibleButtonsCount:X,hiddenButtonsCount:D.length},moreButton:rt?{width:et,gap:L,total:et+L}:null,final:{calculatedWidth:x,actualPanelWidth:O,widthDifference:O-x,maxAllowedWidth:v,availableWidth:_,fits:x<=v,actualFits:O<=v,exceedsBy:x>v?x-v:0,actualExceedsBy:O>v?O-v:0,leftPaddingRequired:u,rightPaddingRequired:u,totalPaddingRequired:u*2}};B&&(console.debug("✅ Результат компрессии:",JSON.stringify({summary:{totalButtons:j.length,accentCount:V.length,visibleRegularCount:dt,visibleCount:F,hiddenCount:D.length,finalPanelWidth:x,maxPanelWidth:v,fits:x<=v,hasMoreButton:rt},breakdown:ft},null,2)),console.debug("👁️ Видимые кнопки:",{buttons:E.map(d=>({text:d.text,view:d.view,isAccent:d.view==="accent"}))}),console.debug("📦 Кнопки в dropdown:",{buttons:D.map(d=>({text:d.text,view:d.view}))}),console.groupEnd()),f(X)},Gt)})},[t,i,o,w,r,B,l,n,s,a,c,h,u,C,A,I,f,e]),calculateInitialCompression:z,measuredButtonWidthsRef:N}},Ft=t=>{const[i,o]=p.useState(0),n=p.useCallback(()=>typeof t=="function"?t():t.current,[t]),e=p.useCallback(()=>{const c=n();return c?c.getBoundingClientRect().width:0},[n]);return p.useEffect(()=>{const c=n();if(!c)return;o(c.getBoundingClientRect().width);const h=xt.createSafeResizeObserver(l=>{for(const a of l){const{width:s}=a.contentRect;o(s)}});return h.observe(c),()=>{h.disconnect()}},[n]),{containerWidth:i,getContainerWidth:e,getContainer:n}},Kt=({containerRef:t,buttonRefs:i,buttons:o,isVisible:n,isCollapsed:e,visibleButtonsCount:c,selectedCount:h,setIsCollapsed:l,setVisibleButtonsCount:a,calculatePosition:s,calculateCompression:r,measuredButtonWidthsRef:w,containerWidth:f})=>{p.useEffect(()=>{f>0&&(s(),r())},[f,s,r]),p.useLayoutEffect(()=>{if(!t.current)return;const u=xt.createSafeResizeObserver(()=>{s()});return u.observe(t.current),()=>{u.disconnect()}},[s,t]),p.useEffect(()=>{i.current=Array((o==null?void 0:o.length)??0).fill(null),a((o==null?void 0:o.length)??0),w.current=[]},[o==null?void 0:o.length,i,a,w]),p.useEffect(()=>{if(n&&!e){const u=setTimeout(()=>{r(),s()},Ht);return()=>{clearTimeout(u)}}},[n,e,r,s]),p.useEffect(()=>{if(e){s();return}s()},[e,c,s]),p.useEffect(()=>()=>{(!n||h===0)&&l(!1)},[n,h,l])},Zt=({containerRef:t,collapseButtonRef:i,leftSectionRef:o,getContainerWidth:n,isHaveSomeFeatureInSidebar:e,sidebarConfig:c,visibleButtonsCount:h,setTranslateX:l,minPadding:a=Et,enableDebugLogs:s=!1})=>{const r=(c==null?void 0:c.isOpen)??!1,w=(c==null?void 0:c.width)??0,f=(c==null?void 0:c.togglePanelWidth)??wt,u=p.useRef(!1),C=p.useCallback(I=>{var k,$;const B=n();if(!B||B===0)return;const N=w+f,z=r?N/2:0,J=e?f/2:0;let y=-(z+J),_;if(I){const R=((k=o==null?void 0:o.current)==null?void 0:k.getBoundingClientRect().width)??vt,U=(($=i.current)==null?void 0:$.getBoundingClientRect().width)??ht,tt=Bt.top+Bt.right+Bt.left;_=R+U+tt}else if(t.current)_=t.current.getBoundingClientRect().width;else{const R=h*gt,U=Q.top+Q.right+Q.left;_=vt+qt+ht+R+U}const S=B/2;return S-_/2+y<a&&(y=a-(S-_/2)),y},[n,t,i,o,e,r,w,f,h,a]);return{calculatePosition:p.useCallback(()=>{const I=n();if(!I||I===0||!t.current)return;s&&console.group("📍 MassActions Position");const B=w+f,N=r?B/2:0,z=e?f/2:0;let J=-(N+z);const y=t.current.getBoundingClientRect().width,_=I/2,S=_-y/2+J;S<a&&(J=a-(_-y/2)),s&&(console.log("🎯 Позиционирование:",JSON.stringify({tableWidth:I,panelWidth:y,tableCenter:_,sidebarWidth:w,toggleSidebarPanelWidth:f,isSidebarOpen:r,isHaveSomeFeatureInSidebar:e,totalSidebarWidth:B,sidebarOffset:N,togglePanelOffset:z,idealTranslateX:-(N+z),leftEdgePosition:S,minPadding:a,finalTranslateX:J,adjusted:S<Et},null,2)),console.groupEnd()),l(J),r?u.current=!0:u.current=!1},[n,t,s,w,f,e,r,l,a]),calculatePositionForState:C,shouldApplySidebarOffsetRef:u}},Qt=({isCollapsed:t,setIsCollapsed:i,calculatePositionForState:o,calculatePosition:n,setTranslateX:e,shouldApplySidebarOffsetRef:c,sidebarConfig:h,getContainerWidth:l})=>{const a=(h==null?void 0:h.isOpen)??!1,s=(h==null?void 0:h.width)??0,r=p.useRef(!1),w=p.useRef(a);return p.useEffect(()=>{if(!h)return;const u=w.current!==a;if(w.current=a,!u){n();return}if(a)if(t)n();else{r.current=!0;const C=o(!0);C!==void 0&&(e(C),c.current=!0),i(!0),setTimeout(()=>{n()},Tt)}else if(t){r.current=!1,c.current=!1;const C=o(!1);C!==void 0&&e(C),i(!1),setTimeout(()=>{n()},Tt)}else c.current=!1,n()},[a,s,l]),{isSidebarOpen:a,sidebarWidth:s,wasAutoCollapsedRef:r}},bt=t=>{const i=p.useRef(t),[o,n]=p.useState(t>0);return p.useEffect(()=>{var l;const e=i.current,c=e===0&&t>0,h=e>0&&t===0;if(c||h){const a=()=>{n(t>0)};document.startViewTransition?(l=document.startViewTransition)==null||l.call(document,a):a()}else n(t>0);i.current=t},[t]),o},ce="mass-actions-panel",zt={surfaceSolidCard:()=>Ct.surfaceSolidCard,outlineSolidPrimary:()=>Ct.outlineSolidPrimary},re=M(b.LinkButton).withConfig({displayName:"styled__StyledLinkButton"})({paddingInline:Vt.s.x8}),te=t=>M(t).withConfig({displayName:"styled__getButtonWithDropdown"})([""," ",""],({$hasDropdown:i})=>i&&M.css(["& > div > span:last-child{max-width:fit-content;min-width:unset;}"]),({$buttonStyles:i})=>i&&M.css(["",""],i)),le=te(b.Button),ae=te(re),de=M.div.withConfig({displayName:"styled__MassActionsContainer"})(["position:absolute;bottom:","px;left:50%;transform:",";background:",";border:2px solid ",";padding:",";border-radius:14px;display:block;width:fit-content;max-width:",";view-transition-name:",";opacity:",";transition:padding 0.3s cubic-bezier(0.4,0,0.2,1),transform 0.3s cubic-bezier(0.4,0,0.2,1),max-width 0.2s cubic-bezier(0.4,0,0.2,1),opacity 0.2s ease-in-out;will-change:padding,transform,max-width;box-shadow:",";"],({$bottom:t=24})=>t,({$translateX:t})=>t!==void 0?`translateX(calc(-50% + ${t}px))`:"translateX(-50%)",zt.surfaceSolidCard,zt.outlineSolidPrimary,({$isCollapsed:t,$size:i})=>{const o=i==="xs";return t?o?"0px 2px 0px 12px":"0px 10px 0px 24px":o?"4px 2px 4px 12px":"12px 8px 12px 24px"},({$isCollapsed:t})=>t?"350":"2000px",ce,({$isInitialCalculationComplete:t})=>t?1:0,Ct.shadowDownHardS),ue=M.div.withConfig({displayName:"styled__MassActionsContent"})(["display:flex;align-items:center;gap:",";"],({$isCollapsed:t,$isCompact:i})=>t?i?"4px":"8px":"0px"),he=M.div.withConfig({displayName:"styled__ActionsWrapper"})(["display:flex;max-height:",";align-items:center;gap:4px;flex:1;justify-content:flex-end;overflow:hidden;min-width:0;transition:max-height 0.2s cubic-bezier(0.4,0,0.2,1),opacity 0.3s cubic-bezier(0.4,0,0.2,1),max-width 0.1s cubic-bezier(0.4,0,0.2,1),margin 0.3s cubic-bezier(0.4,0,0.2,1),gap 0.3s cubic-bezier(0.4,0,0.2,1);",""],({$isCollapsed:t})=>t?"0":"40px",({$isCollapsed:t})=>t?M.css(["opacity:0;max-width:0;margin:0;gap:0;"]):M.css(["opacity:1;max-width:2000px;"])),pe=M.div.withConfig({displayName:"styled__HiddenButtonsMeasurementContainer"})(["position:absolute;left:-9999px;top:0;display:flex;gap:4px;align-items:center;z-index:-1;pointer-events:none;width:auto;height:auto;"]),fe=M.div.withConfig({displayName:"styled__ButtonMeasurementWrapper"})(["display:inline-flex;width:auto;height:auto;"]),ge=M.div.withConfig({displayName:"styled__VisibleButtonWrapper"})(["margin-left:0;"]),xe=M(Rt.IconDoubleDisclosureUp).withConfig({displayName:"styled__CollapseIcon"})(["transition:all 0.3s;transform:",";"],({$isCollapsed:t})=>t?"scaleY(1)":"scaleY(-1)"),we=M(b.EmbedIconButton).withConfig({displayName:"styled__CollapseButton"})(["padding:",";"],({$isCompact:t})=>t?Vt.s.x8:Ct.spacing10x);M(b.Button).withConfig({displayName:"styled__MoreButton"})(["margin-left:0;"]);const me=M(b.Divider).withConfig({displayName:"styled__StyledDivider"})(["padding-left:1px;margin-left:12px;margin-right:8px;"]),Ae=t=>{if(typeof t=="string"&&t.startsWith("link")){const i=t.slice(4);return i.charAt(0).toLowerCase()+i.slice(1)}return t??"default"},Be={size:"s",view:"linkDefault"},Ot=({type:t,view:i,showLabel:o,text:n,buttonStyles:e,dropdown:c,useTableDropdown:h=!1,...l})=>{const a=t??"linkButton",{view:s,...r}=Be,w=i??s,f=o?n:void 0,u=!!c;let C;if(a==="button"){const A=l,I=A.text??f;C=g.jsx(le,{...r,...A,view:w,text:I,$hasDropdown:u,$showLabel:o,$buttonStyles:e})}else{const A=String(w??"linkDefault"),B=A.startsWith("link")?Ae(A):A;C=g.jsx(ae,{...r,...l,view:B,text:f,$hasDropdown:u,$showLabel:o,$buttonStyles:e})}if(c&&c.items&&c.items.length>0)if(h)C=g.jsx(Wt.TableDropdown,{...c,children:C});else{const{$css:A,...I}=c;C=g.jsx(b.Dropdown,{...I,children:C})}return C},ee=({selectedCount:t,label:i="Выбрано",showCheckbox:o=!1,checked:n=!1,onCheckboxChange:e,className:c,indeterminate:h})=>{const{down:l}=xt.useBreakpoint(),a=l("xl"),s=t>0,r=a?"BodyXS":"BodyS",w=(()=>{if(t===0)return"0px";const u=t.toString().length;return`${Math.max(16,7.1+u*6.1)+4}px`})(),f=o?g.jsxs(jt.Box,{$css:{display:"flex",alignItems:"center",gap:"4px"},children:[g.jsx(b.Checkbox,{checked:n,indeterminate:h,onChange:e,size:"m"}),g.jsx(Pt.Typography,{variant:r,children:i})]}):g.jsx(Pt.Typography,{variant:r,children:i});return g.jsxs(jt.Box,{className:c,$css:{display:"flex",alignItems:"center"},children:[f,g.jsx(se.Collapse,{duration:.3,orientation:"horizontal",isOpen:s,unMountOnClose:!0,sizeOnOpen:w,extContainerCss:{overflow:"visible",display:"flex",justifyContent:"flex-end"},intContainerCss:{always:{opacity:"0",transition:".3s ease"},onOpen:{opacity:1}},children:s&&g.jsx(Wt.AnimatedCounter,{className:"counter",count:t,size:"xs",view:"accent",style:{marginBottom:"3px"}},t)})]})},Ce=(t=[])=>p.useMemo(()=>{const i=[],o={},n=new Map;return t.forEach(e=>{var c,h;if(e.dropdown){const l=`group-${e.key||e.text||Date.now()}`,a="items"in e.dropdown?e.dropdown.items||[]:[],s="onItemSelect"in e.dropdown?e.dropdown.onItemSelect:void 0;s&&n.set(l.toString(),s);const[r,w]=xt.processDropdownItems(a,s);w.forEach((f,u)=>n.set(u,f)),(c=e.dropdown)!=null&&c.$css&&Object.assign(o,(h=e.dropdown)==null?void 0:h.$css),i.push({label:e.text??"",value:l,contentLeft:e.contentLeft,items:r,className:e.className,disabled:e.disabled})}else{const l=e.key||e.text||`btn-${Date.now()}`,a={label:e.text||"Кнопка",value:l.toString(),disabled:e.disabled,contentLeft:e.contentLeft};e.onClick&&n.set(l.toString(),(s,r)=>{var f;const w={...r,nativeEvent:r.nativeEvent,preventDefault:r.preventDefault,stopPropagation:r.stopPropagation,target:r.target,currentTarget:r.currentTarget};(f=e.onClick)==null||f.call(e,w)}),i.push(a)}}),{dropdownItems:i,handlerMap:n,$summaryCSS:o}},[t]),Ee=({buttons:t=[],dividerIndexes:i=[],triggerSlot:o,dropdownProps:n,useTableDropdown:e=!1})=>{const{dropdownItems:c,handlerMap:h,$summaryCSS:l}=Ce(t),a=xt.useDropdownItemClickHandler(h),[s,r]=p.useState(!1),w=c.map((A,I)=>(i.includes(I)&&(A.dividerAfter=!0),A)),f={closeOnSelect:!0,...n,onItemSelect:a,items:w,onToggle:A=>r(A),portal:"document",view:(n==null?void 0:n.view)||"default"},{portal:u,...C}=f;return e?g.jsx(Wt.TableDropdown,{$css:l,...C,children:o}):g.jsx(b.Dropdown,{...f,children:o})},Te=({button:t,isCompact:i,compactSize:o="xs",useTableDropdown:n=!1})=>{const e=t.size??(i?o:"s");return g.jsx(Ot,{...t,size:e,showLabel:!0,useTableDropdown:n})},Ie=({button:t,isCompact:i,compactSize:o="xs",useTableDropdown:n=!1})=>{const e=t.size??(i?o:"s");return g.jsx(Ot,{...t,size:e,showLabel:!0,useTableDropdown:n})},$t=(t,i,o=!1,n="xs")=>t.type==="button"?g.jsx(Te,{button:t,isCompact:i,compactSize:n,useTableDropdown:o}):g.jsx(Ie,{button:t,isCompact:i,compactSize:n,useTableDropdown:o}),ne=({containerRef:t,leftSection:i,middleSection:o,buttons:n,sidebarConfig:e,isHaveSomeFeatureInSidebar:c=!1,collapsedDropdownProps:h,selectedCount:l,show:a,useTableDropdown:s=!1,enableDebugLogs:r=!1,bottom:w=16,minPadding:f=16,size:u})=>{const{down:C}=xt.useBreakpoint(),A=u?u==="xs":C("xl"),I=u?"xxs":"xs",[B,N]=p.useState(!1),z=p.useRef(null),J=p.useRef(null),y=p.useRef(null),_=p.useRef([]),S=p.useRef(null),q=p.useRef(null),k=p.useRef(null),$=p.useRef(null),[R,U]=p.useState((n==null?void 0:n.length)??0),[tt,ot]=p.useState(void 0),[at,ct]=p.useState(!1),{containerWidth:T,getContainerWidth:P}=Ft(t),et=bt(l),v=a!==void 0?a:et,{calculatePosition:O,calculatePositionForState:j,shouldApplySidebarOffsetRef:V}=Zt({containerRef:z,collapseButtonRef:q,leftSectionRef:k,getContainerWidth:P,isHaveSomeFeatureInSidebar:c,sidebarConfig:e,visibleButtonsCount:R,setTranslateX:ot,minPadding:f}),{calculateCompression:G,measuredButtonWidthsRef:nt}=Jt({isCollapsed:B,containerRef:z,contentRef:J,middleSectionRef:y,buttonRefs:_,moreButtonRef:S,collapseButtonRef:q,leftSectionRef:k,dividerRef:$,buttons:n,isHaveSomeFeatureInSidebar:c,getContainerWidth:P,setVisibleButtonsCount:U,enableDebugLogs:r,minPadding:f,leftPadding:Q.left,rightPadding:Q.right,moreButtonWidthEstimate:A?32:Nt}),{isSidebarOpen:st,wasAutoCollapsedRef:H}=Qt({isCollapsed:B,setIsCollapsed:N,calculatePositionForState:j,calculatePosition:O,setTranslateX:ot,shouldApplySidebarOffsetRef:V,sidebarConfig:e,getContainerWidth:P}),{handleToggleCollapse:dt}=Yt({isCollapsed:B,setIsCollapsed:N,isSidebarOpen:st,calculatePositionForState:j,calculatePosition:O,setTranslateX:ot,shouldApplySidebarOffsetRef:V,wasAutoCollapsedRef:H}),{visibleButtons:X,buttonsInDropdown:pt,allButtons:rt}=Xt({buttons:n,visibleButtonsCount:R});if(p.useEffect(()=>{const W=setTimeout(()=>ct(!0),Ut);return()=>clearTimeout(W)},[]),Kt({containerRef:z,buttonRefs:_,buttons:n,isVisible:v,isCollapsed:B,visibleButtonsCount:R,selectedCount:l,setIsCollapsed:N,setVisibleButtonsCount:U,calculatePosition:O,calculateCompression:G,measuredButtonWidthsRef:nt,containerWidth:T}),!v)return null;const ut=!B&&((n==null?void 0:n.length)??0)>0;return g.jsx(de,{ref:z,$isCollapsed:B,$size:u,$translateX:tt,$isInitialCalculationComplete:at,$bottom:w,children:g.jsxs(ue,{ref:J,$isCollapsed:B,$isCompact:A,children:[g.jsx(pe,{children:rt.map((W,x)=>{const E=W.key??`${W.text}${x}`;return g.jsx(fe,{ref:D=>{_.current[x]=D},children:$t(W,A,s,I)},`measure-${E}`)})}),g.jsx("div",{ref:k,children:i}),g.jsxs(he,{$isCollapsed:B,children:[o&&g.jsx("div",{ref:y,children:o}),ut&&g.jsx("div",{ref:$,children:g.jsx(me,{orientation:"vertical",length:"16px"})}),pt.length>0&&g.jsx("div",{ref:W=>{S.current=W},children:g.jsx(Ee,{buttons:pt,useTableDropdown:s,dropdownProps:{placement:"top",...h},triggerSlot:g.jsx(b.IconButton,{view:"secondary",size:A?I:"s",contentLeft:g.jsx(Rt.IconDotsVerticalCenteredOutline,{size:A?"xs":"s"})})})}),X.map((W,x)=>{const E=W.key??`${W.text}${x}`,D=g.jsx(ge,{children:$t(W,A,s,I)},E);return W.disabled&&W.disabledTooltipProps?g.jsx(b.Tooltip,{trigger:"hover",...W.disabledTooltipProps,children:D},E):D})]}),g.jsx("div",{ref:q,children:g.jsx(we,{size:A?"s":"m",$isCollapsed:B,$isCompact:A,onClick:dt,children:g.jsx(xe,{size:A?"xs":"s",$isCollapsed:B})})})]})})};ne.Counter=ee;exports.ACTION_BUTTON_WIDTH_ESTIMATE=gt;exports.ANIMATION_COMPLETE_DELAY=Tt;exports.ANIMATION_DURATION=oe;exports.COLLAPSE_BUTTON_WIDTH=ht;exports.COMPRESSION_CALCULATION_DELAY=Gt;exports.CONTAINER_PADDING_HORIZONTAL=ie;exports.COUNTER_WIDTH_ESTIMATE=vt;exports.DELAY_BEFORE_SHOW_PANEL=Ut;exports.ELEMENTS_GAP=L;exports.INITIAL_POSITION_CALCULATION_DELAY=Ht;exports.MIN_PANEL_PADDING=Et;exports.MORE_BUTTON_WIDTH_ESTIMATE=Nt;exports.MassActions=ne;exports.MassActionsButton=Ot;exports.MassActionsCounter=ee;exports.PANEL_PADDING_COLLAPSED=Bt;exports.PANEL_PADDING_EXPANDED=Q;exports.RESET_BUTTON_WIDTH_ESTIMATE=qt;exports.TOGGLE_SIDEBAR_PANEL_WIDTH=wt;exports.useMassActionsButtons=Xt;exports.useMassActionsCollapse=Yt;exports.useMassActionsCompression=Jt;exports.useMassActionsContainer=Ft;exports.useMassActionsEffects=Kt;exports.useMassActionsPosition=Zt;exports.useMassActionsSidebar=Qt;exports.useMassActionsVisibility=bt;
1
+ "use strict";const g=require("react/jsx-runtime"),b=require("@salutejs/sdds-finai"),Rt=require("@salutejs/plasma-icons"),xt=require("./utils-CUW5bd8S.cjs"),p=require("react"),Wt=require("./Table-C-lLZklk.cjs"),Vt=require("../constants/index.cjs"),Ct=require("@salutejs/sdds-themes/tokens/sdds_finai"),M=require("styled-components"),jt=require("../components/Box/index.cjs"),se=require("../components/Collapse/index.cjs"),Pt=require("./AnalyticalWidget-z2HzQ4aA.cjs"),ht=24,L=4,wt=44,Nt=40,Et=24,Q={top:12,right:8,bottom:12,left:24},Bt={top:0,right:10,bottom:0,left:24},ie=Q.left+Q.right,vt=90,qt=110,gt=100,oe=300,Tt=550,Ut=350,Gt=50,Ht=100,Xt=({buttons:t,visibleButtonsCount:i})=>{const{visibleButtons:o,buttonsInDropdown:n}=p.useMemo(()=>{const e=t??[],c=new Set,h=[];e.forEach((f,u)=>{f.view==="accent"?c.add(u):h.push(u)});const l=c.size,a=Math.max(0,i-l),s=new Set(h.slice(0,a)),r=[],w=[];return e.forEach((f,u)=>{c.has(u)||s.has(u)?r.push(f):w.push(f)}),{visibleButtons:r,buttonsInDropdown:w}},[t,i]);return{visibleButtons:o,buttonsInDropdown:n,allButtons:t??[]}},Yt=({isCollapsed:t,setIsCollapsed:i,isSidebarOpen:o,calculatePositionForState:n,calculatePosition:e,setTranslateX:c,shouldApplySidebarOffsetRef:h,wasAutoCollapsedRef:l})=>({handleToggleCollapse:p.useCallback(()=>{const s=!t,r=n(s);r!==void 0&&c(r),o&&(s?h.current=!0:(h.current=!1,l.current=!1)),i(s),setTimeout(()=>{e()},Tt)},[t,o,n,e,c,h,l,i])}),Jt=({isCollapsed:t,containerRef:i,contentRef:o,middleSectionRef:n,buttonRefs:e,moreButtonRef:c,collapseButtonRef:h,leftSectionRef:l,dividerRef:a,buttons:s,isHaveSomeFeatureInSidebar:r,getContainerWidth:w,setVisibleButtonsCount:f,minPadding:u=Et,leftPadding:C=Q.left,rightPadding:A=Q.right,moreButtonWidthEstimate:I=Nt,enableDebugLogs:B=!1})=>{const N=p.useRef([]),z=p.useCallback(()=>{var dt,X,pt,rt,ut,W;const y=w();if(!y||y===0||!s||s.length===0)return B&&console.debug("❌ calculateInitialCompression: нет tableWidth или buttons"),!1;if(!s.every((x,E)=>e.current[E]!==null&&e.current[E]!==void 0))return B&&console.debug("❌ calculateInitialCompression: ref'ы еще не установлены",{buttonsCount:s.length,refsCount:e.current.filter(Boolean).length,refs:e.current.map((x,E)=>({index:E,hasRef:!!x}))}),!1;const S=y-(r?wt:0),q=((dt=l==null?void 0:l.current)==null?void 0:dt.getBoundingClientRect().width)??0,k=((X=n.current)==null?void 0:X.getBoundingClientRect().width)??0,$=s.length>0,R=$?((pt=a==null?void 0:a.current)==null?void 0:pt.getBoundingClientRect().width)??0:0,U=$?L:0,tt=$&&k>0?L:0,ot=R+tt+U,at=L*2,ct=q+k+ot+(((rt=h.current)==null?void 0:rt.getBoundingClientRect().width)??ht)+(C+A)+at,T=[];let P=!0;for(let x=0;x<s.length;x+=1){const E=e.current[x];if(!E){P=!1;break}const F=E.querySelector("button, a")||E;if(!F||!F.isConnected){P=!1;break}const ft=F.getBoundingClientRect(),lt=ft.width||F.offsetWidth||F.scrollWidth||F.clientWidth;if(lt>0)T.push(lt),N.current[x]=lt;else{console.debug("❌ calculateInitialCompression: кнопка не отрендерилась",{index:x,text:(ut=s[x])==null?void 0:ut.text,width:lt,isConnected:F.isConnected,rect:ft}),P=!1;break}}if(!P||T.length!==s.length)return B&&console.debug("❌ calculateInitialCompression: не все кнопки измерены",{allButtonsMeasured:P,buttonWidthsLength:T.length,buttonsLength:s.length}),!1;const et=((W=c.current)==null?void 0:W.getBoundingClientRect().width)??I,v=S-u*2,O=[],j=[];s.forEach((x,E)=>{if(T[E]===void 0)return;(x==null?void 0:x.view)==="accent"?O.push(E):j.push(E)});let V=0;O.forEach(x=>{const E=T[x];E!==void 0&&(V+=E)});const G=new Set(O);let nt=V,st=0;for(let x=0;x<j.length;x+=1){const E=j[x],D=typeof E<"u"?T[E]:0;if(D===void 0)continue;const ft=x<j.length-1?et+L:0,mt=(G.size+1-1)*L,At=nt+D+mt+ft;if(ct+At<=v)nt+=D,st+=1,typeof E<"u"&&G.add(E);else break}const H=G.size;return f(H),console.debug("✅ calculateInitialCompression: успешно выполнено",{buttonWidths:T,visibleCount:H,accentCount:O.length,regularVisibleCount:st}),!0},[s,w,r,f,e,l,n,c,h,a,B,u,C,A,I]);return{calculateCompression:p.useCallback(()=>{t||!i.current||!o.current||requestAnimationFrame(()=>{setTimeout(()=>{var lt,mt,At,It,Mt,St,Dt;const y=w();if(!y||y===0)return;const _=y-(r?wt:0);B&&(console.group("🔧 MassActions Compression"),console.debug("📏 Размеры контейнера:",JSON.stringify({tableWidth:y,isHaveSomeFeatureInSidebar:r,togglePanelWidth:r?wt:0,availableWidth:_,minPaddingRequired:u*2,maxPanelWidthAllowed:_-u*2},null,2)));const S=((lt=l==null?void 0:l.current)==null?void 0:lt.getBoundingClientRect().width)??0,q=((mt=n.current)==null?void 0:mt.getBoundingClientRect().width)??0,k=((s==null?void 0:s.length)??0)>0,$=k?((At=a==null?void 0:a.current)==null?void 0:At.getBoundingClientRect().width)??0:0,R=k?L:0,U=k&&q>0?L:0,tt=$+U+R;let ot=null;if(l!=null&&l.current){const d=l.current.getBoundingClientRect(),{children:m}=l.current,K=[];for(let Y=0;Y<m.length;Y+=1){const Z=m[Y];if(Z){const it=Z.getBoundingClientRect();K.push({tagName:Z.tagName,className:Z.className,width:it.width,height:it.height})}}ot={width:d.width,height:d.height,children:K,childrenTotalWidth:K.reduce((Y,Z)=>Y+Z.width,0)}}const at=L*2,ct=S+q+tt+(((It=h.current)==null?void 0:It.getBoundingClientRect().width)??ht)+(C+A)+at;B&&console.debug("🔲 Фиксированные элементы:",JSON.stringify({leftSectionWidth:S,leftSectionDetails:ot,middleSectionWidth:q,divider:{shouldShow:k,wrapperWidth:$,gapLeft:U,gapRight:R,totalWidth:tt},collapseButtonWidth:((Mt=h.current)==null?void 0:Mt.getBoundingClientRect().width)??ht,containerPadding:C+A,gapsBetweenFixedElements:at,fixedElementsTotal:ct},null,2));const T=[];let P=!0;for(let d=0;d<((s==null?void 0:s.length)??0);d+=1){const m=e.current[d];if(m){const Y=m.querySelector("button, a")||m,it=Y.getBoundingClientRect().width||Y.offsetWidth||Y.scrollWidth||Y.clientWidth;it>0?(T.push(it),N.current[d]=it):N.current[d]!==void 0?T.push(N.current[d]??gt):(P=!1,T.push(gt))}else N.current[d]!==void 0?T.push(N.current[d]??gt):(P=!1,T.push(gt))}if(!P&&T.length===0&&((s==null?void 0:s.length)??0)>0)return;const et=((St=c.current)==null?void 0:St.getBoundingClientRect().width)??I,v=_-u*2,O=i.current?i.current.getBoundingClientRect().width:0;B&&(console.debug("🎯 Ограничения и текущее состояние:",JSON.stringify({targetContainer:{tableWidth:y,availableWidth:_,minPaddingEach:u,minPaddingTotal:u*2,maxPanelWidth:v},currentPanel:{width:O,exceedsMax:O>v,exceedsAvailable:O>_,leftPadding:u,rightPadding:u},moreButtonWidth:et},null,2)),console.debug("🔘 Ширины кнопок:",JSON.stringify({buttons:s==null?void 0:s.map((d,m)=>({index:m,text:d.text,view:d.view,isAccent:d.view==="accent",width:T[m]})),totalButtonsWidth:T.reduce((d,m)=>d+m,0),averageButtonWidth:T.length>0?T.reduce((d,m)=>d+m,0)/T.length:0},null,2)));const j=s??[],V=[],G=[];j.forEach((d,m)=>{if(T[m]===void 0)return;(d==null?void 0:d.view)==="accent"?V.push(m):G.push(m)}),B&&console.debug("🎨 Распределение:",{accentCount:V.length,regularCount:G.length,accentButtons:V.map(d=>{var m;return{index:d,text:(m=j[d])==null?void 0:m.text,width:T[d]}})});let nt=0;V.forEach(d=>{const m=T[d];m!==void 0&&(nt+=m)});const st=new Set(V);let H=nt,dt=0;for(let d=0;d<G.length;d+=1){const m=G[d],K=typeof m<"u"?T[m]:0;if(K===void 0)continue;const Z=d<G.length-1?et+L:0,it=st.size+1,Lt=(it-1)*L,kt=H+K+Lt+Z,_t=ct+kt,yt=_t+3;if(B&&console.debug(` 🔍 Проверка кнопки ${d}:`,{text:typeof m<"u"?(Dt=j[m])==null?void 0:Dt.text:"",width:K,totalButtonsWidthBefore:H,visibleCountAfter:it,gapsBetweenButtons:Lt,moreButtonSpace:Z,requiredWidth:kt,testPanelWidth:_t,testWithBuffer:yt,maxPanelWidth:v,fits:_t<=v,fitsWithBuffer:yt<=v}),yt<=v)H+=K,dt+=1,typeof m<"u"&&st.add(m);else break}const X=st.size,rt=j.length-X>0,ut=X>0?(X-1)*L:0,W=H+ut+(rt?et+L:0),x=ct+W,E=[],D=[];j.forEach((d,m)=>{st.has(m)?E.push(d):D.push(d)});const F=X,ft={fixedElements:{leftSection:S,middleSection:q,divider:tt,collapseButton:ht,containerPadding:C+A,gapsBetweenFixedElements:at,total:ct},buttons:{accentButtonsWidth:nt,visibleRegularButtonsWidth:H-nt,totalButtonsWidth:H,gapsBetweenVisibleButtons:ut,buttonsAreaWidth:W,visibleButtonsCount:X,hiddenButtonsCount:D.length},moreButton:rt?{width:et,gap:L,total:et+L}:null,final:{calculatedWidth:x,actualPanelWidth:O,widthDifference:O-x,maxAllowedWidth:v,availableWidth:_,fits:x<=v,actualFits:O<=v,exceedsBy:x>v?x-v:0,actualExceedsBy:O>v?O-v:0,leftPaddingRequired:u,rightPaddingRequired:u,totalPaddingRequired:u*2}};B&&(console.debug("✅ Результат компрессии:",JSON.stringify({summary:{totalButtons:j.length,accentCount:V.length,visibleRegularCount:dt,visibleCount:F,hiddenCount:D.length,finalPanelWidth:x,maxPanelWidth:v,fits:x<=v,hasMoreButton:rt},breakdown:ft},null,2)),console.debug("👁️ Видимые кнопки:",{buttons:E.map(d=>({text:d.text,view:d.view,isAccent:d.view==="accent"}))}),console.debug("📦 Кнопки в dropdown:",{buttons:D.map(d=>({text:d.text,view:d.view}))}),console.groupEnd()),f(X)},Gt)})},[t,i,o,w,r,B,l,n,s,a,c,h,u,C,A,I,f,e]),calculateInitialCompression:z,measuredButtonWidthsRef:N}},Ft=t=>{const[i,o]=p.useState(0),n=p.useCallback(()=>typeof t=="function"?t():t.current,[t]),e=p.useCallback(()=>{const c=n();return c?c.getBoundingClientRect().width:0},[n]);return p.useEffect(()=>{const c=n();if(!c)return;o(c.getBoundingClientRect().width);const h=xt.createSafeResizeObserver(l=>{for(const a of l){const{width:s}=a.contentRect;o(s)}});return h.observe(c),()=>{h.disconnect()}},[n]),{containerWidth:i,getContainerWidth:e,getContainer:n}},Kt=({containerRef:t,buttonRefs:i,buttons:o,isVisible:n,isCollapsed:e,visibleButtonsCount:c,selectedCount:h,setIsCollapsed:l,setVisibleButtonsCount:a,calculatePosition:s,calculateCompression:r,measuredButtonWidthsRef:w,containerWidth:f})=>{p.useEffect(()=>{f>0&&(s(),r())},[f,s,r]),p.useLayoutEffect(()=>{if(!t.current)return;const u=xt.createSafeResizeObserver(()=>{s()});return u.observe(t.current),()=>{u.disconnect()}},[s,t]),p.useEffect(()=>{i.current=Array((o==null?void 0:o.length)??0).fill(null),a((o==null?void 0:o.length)??0),w.current=[]},[o==null?void 0:o.length,i,a,w]),p.useEffect(()=>{if(n&&!e){const u=setTimeout(()=>{r(),s()},Ht);return()=>{clearTimeout(u)}}},[n,e,r,s]),p.useEffect(()=>{if(e){s();return}s()},[e,c,s]),p.useEffect(()=>()=>{(!n||h===0)&&l(!1)},[n,h,l])},Zt=({containerRef:t,collapseButtonRef:i,leftSectionRef:o,getContainerWidth:n,isHaveSomeFeatureInSidebar:e,sidebarConfig:c,visibleButtonsCount:h,setTranslateX:l,minPadding:a=Et,enableDebugLogs:s=!1})=>{const r=(c==null?void 0:c.isOpen)??!1,w=(c==null?void 0:c.width)??0,f=(c==null?void 0:c.togglePanelWidth)??wt,u=p.useRef(!1),C=p.useCallback(I=>{var k,$;const B=n();if(!B||B===0)return;const N=w+f,z=r?N/2:0,J=e?f/2:0;let y=-(z+J),_;if(I){const R=((k=o==null?void 0:o.current)==null?void 0:k.getBoundingClientRect().width)??vt,U=(($=i.current)==null?void 0:$.getBoundingClientRect().width)??ht,tt=Bt.top+Bt.right+Bt.left;_=R+U+tt}else if(t.current)_=t.current.getBoundingClientRect().width;else{const R=h*gt,U=Q.top+Q.right+Q.left;_=vt+qt+ht+R+U}const S=B/2;return S-_/2+y<a&&(y=a-(S-_/2)),y},[n,t,i,o,e,r,w,f,h,a]);return{calculatePosition:p.useCallback(()=>{const I=n();if(!I||I===0||!t.current)return;s&&console.group("📍 MassActions Position");const B=w+f,N=r?B/2:0,z=e?f/2:0;let J=-(N+z);const y=t.current.getBoundingClientRect().width,_=I/2,S=_-y/2+J;S<a&&(J=a-(_-y/2)),s&&(console.log("🎯 Позиционирование:",JSON.stringify({tableWidth:I,panelWidth:y,tableCenter:_,sidebarWidth:w,toggleSidebarPanelWidth:f,isSidebarOpen:r,isHaveSomeFeatureInSidebar:e,totalSidebarWidth:B,sidebarOffset:N,togglePanelOffset:z,idealTranslateX:-(N+z),leftEdgePosition:S,minPadding:a,finalTranslateX:J,adjusted:S<Et},null,2)),console.groupEnd()),l(J),r?u.current=!0:u.current=!1},[n,t,s,w,f,e,r,l,a]),calculatePositionForState:C,shouldApplySidebarOffsetRef:u}},Qt=({isCollapsed:t,setIsCollapsed:i,calculatePositionForState:o,calculatePosition:n,setTranslateX:e,shouldApplySidebarOffsetRef:c,sidebarConfig:h,getContainerWidth:l})=>{const a=(h==null?void 0:h.isOpen)??!1,s=(h==null?void 0:h.width)??0,r=p.useRef(!1),w=p.useRef(a);return p.useEffect(()=>{if(!h)return;const u=w.current!==a;if(w.current=a,!u){n();return}if(a)if(t)n();else{r.current=!0;const C=o(!0);C!==void 0&&(e(C),c.current=!0),i(!0),setTimeout(()=>{n()},Tt)}else if(t){r.current=!1,c.current=!1;const C=o(!1);C!==void 0&&e(C),i(!1),setTimeout(()=>{n()},Tt)}else c.current=!1,n()},[a,s,l]),{isSidebarOpen:a,sidebarWidth:s,wasAutoCollapsedRef:r}},bt=t=>{const i=p.useRef(t),[o,n]=p.useState(t>0);return p.useEffect(()=>{var l;const e=i.current,c=e===0&&t>0,h=e>0&&t===0;if(c||h){const a=()=>{n(t>0)};document.startViewTransition?(l=document.startViewTransition)==null||l.call(document,a):a()}else n(t>0);i.current=t},[t]),o},ce="mass-actions-panel",zt={surfaceSolidCard:()=>Ct.surfaceSolidCard,outlineSolidPrimary:()=>Ct.outlineSolidPrimary},re=M(b.LinkButton).withConfig({displayName:"styled__StyledLinkButton"})({paddingInline:Vt.s.x8}),te=t=>M(t).withConfig({displayName:"styled__getButtonWithDropdown"})([""," ",""],({$hasDropdown:i})=>i&&M.css(["& > div > span:last-child{max-width:fit-content;min-width:unset;}"]),({$buttonStyles:i})=>i&&M.css(["",""],i)),le=te(b.Button),ae=te(re),de=M.div.withConfig({displayName:"styled__MassActionsContainer"})(["position:absolute;bottom:","px;left:50%;transform:",";background:",";border:2px solid ",";padding:",";border-radius:14px;display:block;width:fit-content;max-width:",";view-transition-name:",";opacity:",";transition:padding 0.3s cubic-bezier(0.4,0,0.2,1),transform 0.3s cubic-bezier(0.4,0,0.2,1),max-width 0.2s cubic-bezier(0.4,0,0.2,1),opacity 0.2s ease-in-out;will-change:padding,transform,max-width;box-shadow:",";"],({$bottom:t=24})=>t,({$translateX:t})=>t!==void 0?`translateX(calc(-50% + ${t}px))`:"translateX(-50%)",zt.surfaceSolidCard,zt.outlineSolidPrimary,({$isCollapsed:t,$size:i})=>{const o=i==="xs";return t?o?"0px 2px 0px 12px":"0px 10px 0px 24px":o?"4px 2px 4px 12px":"12px 8px 12px 24px"},({$isCollapsed:t})=>t?"350":"2000px",ce,({$isInitialCalculationComplete:t})=>t?1:0,Ct.shadowDownHardS),ue=M.div.withConfig({displayName:"styled__MassActionsContent"})(["display:flex;align-items:center;gap:",";"],({$isCollapsed:t,$isCompact:i})=>t?i?"4px":"8px":"0px"),he=M.div.withConfig({displayName:"styled__ActionsWrapper"})(["display:flex;max-height:",";align-items:center;gap:4px;flex:1;justify-content:flex-end;overflow:hidden;min-width:0;transition:max-height 0.2s cubic-bezier(0.4,0,0.2,1),opacity 0.3s cubic-bezier(0.4,0,0.2,1),max-width 0.1s cubic-bezier(0.4,0,0.2,1),margin 0.3s cubic-bezier(0.4,0,0.2,1),gap 0.3s cubic-bezier(0.4,0,0.2,1);",""],({$isCollapsed:t})=>t?"0":"40px",({$isCollapsed:t})=>t?M.css(["opacity:0;max-width:0;margin:0;gap:0;"]):M.css(["opacity:1;max-width:2000px;"])),pe=M.div.withConfig({displayName:"styled__HiddenButtonsMeasurementContainer"})(["position:absolute;left:-9999px;top:0;display:flex;gap:4px;align-items:center;z-index:-1;pointer-events:none;width:auto;height:auto;"]),fe=M.div.withConfig({displayName:"styled__ButtonMeasurementWrapper"})(["display:inline-flex;width:auto;height:auto;"]),ge=M.div.withConfig({displayName:"styled__VisibleButtonWrapper"})(["margin-left:0;"]),xe=M(Rt.IconDoubleDisclosureUp).withConfig({displayName:"styled__CollapseIcon"})(["transition:all 0.3s;transform:",";"],({$isCollapsed:t})=>t?"scaleY(1)":"scaleY(-1)"),we=M(b.EmbedIconButton).withConfig({displayName:"styled__CollapseButton"})(["padding:",";"],({$isCompact:t})=>t?Vt.s.x8:Ct.spacing10x);M(b.Button).withConfig({displayName:"styled__MoreButton"})(["margin-left:0;"]);const me=M(b.Divider).withConfig({displayName:"styled__StyledDivider"})(["padding-left:1px;margin-left:12px;margin-right:8px;"]),Ae=t=>{if(typeof t=="string"&&t.startsWith("link")){const i=t.slice(4);return i.charAt(0).toLowerCase()+i.slice(1)}return t??"default"},Be={size:"s",view:"linkDefault"},Ot=({type:t,view:i,showLabel:o,text:n,buttonStyles:e,dropdown:c,useTableDropdown:h=!1,...l})=>{const a=t??"linkButton",{view:s,...r}=Be,w=i??s,f=o?n:void 0,u=!!c;let C;if(a==="button"){const A=l,I=A.text??f;C=g.jsx(le,{...r,...A,view:w,text:I,$hasDropdown:u,$showLabel:o,$buttonStyles:e})}else{const A=String(w??"linkDefault"),B=A.startsWith("link")?Ae(A):A;C=g.jsx(ae,{...r,...l,view:B,text:f,$hasDropdown:u,$showLabel:o,$buttonStyles:e})}if(c&&c.items&&c.items.length>0)if(h)C=g.jsx(Wt.TableDropdown,{...c,children:C});else{const{$css:A,...I}=c;C=g.jsx(b.Dropdown,{...I,children:C})}return C},ee=({selectedCount:t,label:i="Выбрано",showCheckbox:o=!1,checked:n=!1,onCheckboxChange:e,className:c,indeterminate:h})=>{const{down:l}=xt.useBreakpoint(),a=l("xl"),s=t>0,r=a?"BodyXS":"BodyS",w=(()=>{if(t===0)return"0px";const u=t.toString().length;return`${Math.max(16,7.1+u*6.1)+4}px`})(),f=o?g.jsxs(jt.Box,{$css:{display:"flex",alignItems:"center",gap:"4px"},children:[g.jsx(b.Checkbox,{checked:n,indeterminate:h,onChange:e,size:"m"}),g.jsx(Pt.Typography,{variant:r,children:i})]}):g.jsx(Pt.Typography,{variant:r,children:i});return g.jsxs(jt.Box,{className:c,$css:{display:"flex",alignItems:"center"},children:[f,g.jsx(se.Collapse,{duration:.3,orientation:"horizontal",isOpen:s,unMountOnClose:!0,sizeOnOpen:w,extContainerCss:{overflow:"visible",display:"flex",justifyContent:"flex-end"},intContainerCss:{always:{opacity:"0",transition:".3s ease"},onOpen:{opacity:1}},children:s&&g.jsx(Wt.AnimatedCounter,{className:"counter",count:t,size:"xs",view:"accent",style:{marginBottom:"3px"}},t)})]})},Ce=(t=[])=>p.useMemo(()=>{const i=[],o={},n=new Map;return t.forEach(e=>{var c,h;if(e.dropdown){const l=`group-${e.key||e.text||Date.now()}`,a="items"in e.dropdown?e.dropdown.items||[]:[],s="onItemSelect"in e.dropdown?e.dropdown.onItemSelect:void 0;s&&n.set(l.toString(),s);const[r,w]=xt.processDropdownItems(a,s);w.forEach((f,u)=>n.set(u,f)),(c=e.dropdown)!=null&&c.$css&&Object.assign(o,(h=e.dropdown)==null?void 0:h.$css),i.push({label:e.text??"",value:l,contentLeft:e.contentLeft,items:r,className:e.className,disabled:e.disabled})}else{const l=e.key||e.text||`btn-${Date.now()}`,a={label:e.text||"Кнопка",value:l.toString(),disabled:e.disabled,contentLeft:e.contentLeft};e.onClick&&n.set(l.toString(),(s,r)=>{var f;const w={...r,nativeEvent:r.nativeEvent,preventDefault:r.preventDefault,stopPropagation:r.stopPropagation,target:r.target,currentTarget:r.currentTarget};(f=e.onClick)==null||f.call(e,w)}),i.push(a)}}),{dropdownItems:i,handlerMap:n,$summaryCSS:o}},[t]),Ee=({buttons:t=[],dividerIndexes:i=[],triggerSlot:o,dropdownProps:n,useTableDropdown:e=!1})=>{const{dropdownItems:c,handlerMap:h,$summaryCSS:l}=Ce(t),a=xt.useDropdownItemClickHandler(h),[s,r]=p.useState(!1),w=c.map((A,I)=>(i.includes(I)&&(A.dividerAfter=!0),A)),f={closeOnSelect:!0,...n,onItemSelect:a,items:w,onToggle:A=>r(A),portal:"document",view:(n==null?void 0:n.view)||"default"},{portal:u,...C}=f;return e?g.jsx(Wt.TableDropdown,{$css:l,...C,children:o}):g.jsx(b.Dropdown,{...f,children:o})},Te=({button:t,isCompact:i,compactSize:o="xs",useTableDropdown:n=!1})=>{const e=t.size??(i?o:"s");return g.jsx(Ot,{...t,size:e,showLabel:!0,useTableDropdown:n})},Ie=({button:t,isCompact:i,compactSize:o="xs",useTableDropdown:n=!1})=>{const e=t.size??(i?o:"s");return g.jsx(Ot,{...t,size:e,showLabel:!0,useTableDropdown:n})},$t=(t,i,o=!1,n="xs")=>t.type==="button"?g.jsx(Te,{button:t,isCompact:i,compactSize:n,useTableDropdown:o}):g.jsx(Ie,{button:t,isCompact:i,compactSize:n,useTableDropdown:o}),ne=({containerRef:t,leftSection:i,middleSection:o,buttons:n,sidebarConfig:e,isHaveSomeFeatureInSidebar:c=!1,collapsedDropdownProps:h,selectedCount:l,show:a,useTableDropdown:s=!1,enableDebugLogs:r=!1,bottom:w=16,minPadding:f=16,size:u})=>{const{down:C}=xt.useBreakpoint(),A=u?u==="xs":C("xl"),I=u?"xxs":"xs",[B,N]=p.useState(!1),z=p.useRef(null),J=p.useRef(null),y=p.useRef(null),_=p.useRef([]),S=p.useRef(null),q=p.useRef(null),k=p.useRef(null),$=p.useRef(null),[R,U]=p.useState((n==null?void 0:n.length)??0),[tt,ot]=p.useState(void 0),[at,ct]=p.useState(!1),{containerWidth:T,getContainerWidth:P}=Ft(t),et=bt(l),v=a!==void 0?a:et,{calculatePosition:O,calculatePositionForState:j,shouldApplySidebarOffsetRef:V}=Zt({containerRef:z,collapseButtonRef:q,leftSectionRef:k,getContainerWidth:P,isHaveSomeFeatureInSidebar:c,sidebarConfig:e,visibleButtonsCount:R,setTranslateX:ot,minPadding:f}),{calculateCompression:G,measuredButtonWidthsRef:nt}=Jt({isCollapsed:B,containerRef:z,contentRef:J,middleSectionRef:y,buttonRefs:_,moreButtonRef:S,collapseButtonRef:q,leftSectionRef:k,dividerRef:$,buttons:n,isHaveSomeFeatureInSidebar:c,getContainerWidth:P,setVisibleButtonsCount:U,enableDebugLogs:r,minPadding:f,leftPadding:Q.left,rightPadding:Q.right,moreButtonWidthEstimate:A?32:Nt}),{isSidebarOpen:st,wasAutoCollapsedRef:H}=Qt({isCollapsed:B,setIsCollapsed:N,calculatePositionForState:j,calculatePosition:O,setTranslateX:ot,shouldApplySidebarOffsetRef:V,sidebarConfig:e,getContainerWidth:P}),{handleToggleCollapse:dt}=Yt({isCollapsed:B,setIsCollapsed:N,isSidebarOpen:st,calculatePositionForState:j,calculatePosition:O,setTranslateX:ot,shouldApplySidebarOffsetRef:V,wasAutoCollapsedRef:H}),{visibleButtons:X,buttonsInDropdown:pt,allButtons:rt}=Xt({buttons:n,visibleButtonsCount:R});if(p.useEffect(()=>{const W=setTimeout(()=>ct(!0),Ut);return()=>clearTimeout(W)},[]),Kt({containerRef:z,buttonRefs:_,buttons:n,isVisible:v,isCollapsed:B,visibleButtonsCount:R,selectedCount:l,setIsCollapsed:N,setVisibleButtonsCount:U,calculatePosition:O,calculateCompression:G,measuredButtonWidthsRef:nt,containerWidth:T}),!v)return null;const ut=!B&&((n==null?void 0:n.length)??0)>0;return g.jsx(de,{ref:z,$isCollapsed:B,$size:u,$translateX:tt,$isInitialCalculationComplete:at,$bottom:w,children:g.jsxs(ue,{ref:J,$isCollapsed:B,$isCompact:A,children:[g.jsx(pe,{children:rt.map((W,x)=>{const E=W.key??`${W.text}${x}`;return g.jsx(fe,{ref:D=>{_.current[x]=D},children:$t(W,A,s,I)},`measure-${E}`)})}),g.jsx("div",{ref:k,children:i}),g.jsxs(he,{$isCollapsed:B,children:[o&&g.jsx("div",{ref:y,children:o}),ut&&g.jsx("div",{ref:$,children:g.jsx(me,{orientation:"vertical",length:"16px"})}),pt.length>0&&g.jsx("div",{ref:W=>{S.current=W},children:g.jsx(Ee,{buttons:pt,useTableDropdown:s,dropdownProps:{placement:"top",...h},triggerSlot:g.jsx(b.IconButton,{view:"secondary",size:A?I:"s",contentLeft:g.jsx(Rt.IconDotsVerticalCenteredOutline,{size:A?"xs":"s"})})})}),X.map((W,x)=>{const E=W.key??`${W.text}${x}`,D=g.jsx(ge,{children:$t(W,A,s,I)},E);return W.disabled&&W.disabledTooltipProps?g.jsx(b.Tooltip,{trigger:"hover",...W.disabledTooltipProps,children:D},E):D})]}),g.jsx("div",{ref:q,children:g.jsx(we,{size:A?"s":"m",$isCollapsed:B,$isCompact:A,onClick:dt,children:g.jsx(xe,{size:A?"xs":"s",$isCollapsed:B})})})]})})};ne.Counter=ee;exports.ACTION_BUTTON_WIDTH_ESTIMATE=gt;exports.ANIMATION_COMPLETE_DELAY=Tt;exports.ANIMATION_DURATION=oe;exports.COLLAPSE_BUTTON_WIDTH=ht;exports.COMPRESSION_CALCULATION_DELAY=Gt;exports.CONTAINER_PADDING_HORIZONTAL=ie;exports.COUNTER_WIDTH_ESTIMATE=vt;exports.DELAY_BEFORE_SHOW_PANEL=Ut;exports.ELEMENTS_GAP=L;exports.INITIAL_POSITION_CALCULATION_DELAY=Ht;exports.MIN_PANEL_PADDING=Et;exports.MORE_BUTTON_WIDTH_ESTIMATE=Nt;exports.MassActions=ne;exports.MassActionsButton=Ot;exports.MassActionsCounter=ee;exports.PANEL_PADDING_COLLAPSED=Bt;exports.PANEL_PADDING_EXPANDED=Q;exports.RESET_BUTTON_WIDTH_ESTIMATE=qt;exports.TOGGLE_SIDEBAR_PANEL_WIDTH=wt;exports.useMassActionsButtons=Xt;exports.useMassActionsCollapse=Yt;exports.useMassActionsCompression=Jt;exports.useMassActionsContainer=Ft;exports.useMassActionsEffects=Kt;exports.useMassActionsPosition=Zt;exports.useMassActionsSidebar=Qt;exports.useMassActionsVisibility=bt;
@@ -1,15 +1,15 @@
1
1
  import { jsx as B, jsxs as vt } from "react/jsx-runtime";
2
2
  import { Divider as Ft, EmbedIconButton as Kt, LinkButton as Zt, Button as Pt, Dropdown as Gt, Checkbox as Qt, IconButton as bt, Tooltip as te } from "@salutejs/sdds-finai";
3
3
  import { IconDoubleDisclosureUp as ee, IconDotsVerticalCenteredOutline as ne } from "@salutejs/plasma-icons";
4
- import { c as Ut, d as qt, i as se, p as ie } from "./utils-D4eJY8pa.mjs";
4
+ import { c as Ut, d as qt, i as se, p as ie } from "./utils-YKicAHp0.mjs";
5
5
  import { useMemo as Xt, useCallback as pt, useRef as $, useState as ht, useEffect as st, useLayoutEffect as oe } from "react";
6
- import { T as jt, A as ce } from "./Table-DBKZzRuR.mjs";
6
+ import { T as jt, A as ce } from "./Table-C_1QGsh8.mjs";
7
7
  import { s as Jt } from "../constants/index.mjs";
8
8
  import { surfaceSolidCard as re, outlineSolidPrimary as le, shadowDownHardS as ae, spacing10x as de } from "@salutejs/sdds-themes/tokens/sdds_finai";
9
9
  import U, { css as yt } from "styled-components";
10
10
  import { Box as kt } from "../components/Box/index.mjs";
11
11
  import { Collapse as ue } from "../components/Collapse/index.mjs";
12
- import { T as zt } from "./AnalyticalWidget-BSpo7GCr.mjs";
12
+ import { T as zt } from "./AnalyticalWidget-BWcBjoNh.mjs";
13
13
  const mt = 24, k = 4, Ct = 44, Yt = 40, Tt = 24, it = {
14
14
  top: 12,
15
15
  right: 8,
@@ -1 +1 @@
1
- "use strict";const u=require("@salutejs/sdds-finai"),e=require("react/jsx-runtime"),f=require("./AnalyticalWidget-D_g7b36w.cjs"),w=require("@salutejs/plasma-icons"),$=require("@salutejs/sdds-themes/tokens/sdds_finai"),m=require("./utils-DvDFSlCG.cjs"),q=require("react"),o=require("../constants/index.cjs"),n=require("styled-components"),s="PageTitle__",i={root:`${s}root`,breadcrumbs:`${s}breadcrumbs`,content:`${s}content`,leftBlock:`${s}left-block`,titleBlock:`${s}title-block`,title:`${s}title`,subtitle:`${s}subtitle`,titleSlot:`${s}title-slot`,rightBlock:`${s}right-block`,backIconButton:`${s}back-icon-block`},R=n.div.attrs({className:i.root}).withConfig({displayName:"PageTitlestyled__StyledRoot"})(["width:100%;display:flex;flex-direction:column;gap:",";"],()=>o.s.x8),z=n.div.attrs({className:i.breadcrumbs}).withConfig({displayName:"PageTitlestyled__StyledBreadcrumbs"})([""]),I=n.div.attrs({className:i.content}).withConfig({displayName:"PageTitlestyled__StyledContent"})(["display:flex;justify-content:space-between;align-items:flex-start;gap:",";"],()=>o.s.x12),A=n.div.attrs({className:i.leftBlock}).withConfig({displayName:"PageTitlestyled__StyledLeftBlock"})(["display:flex;align-items:flex-start;gap:",";flex:1;min-width:0;"],()=>o.s.x8),L=n.div.attrs({className:i.titleBlock}).withConfig({displayName:"PageTitlestyled__StyledTitleBlock"})(["display:flex;flex-direction:column;gap:",";flex-shrink:1;min-width:0;"],()=>o.s.x2),W=n.div.attrs({className:i.backIconButton}).withConfig({displayName:"PageTitlestyled__StyledBackButtonContainer"})(["margin-top:",";"],({$isAdaptive1280:t})=>t?"1px":"6px"),H=n.div.attrs({className:i.title}).withConfig({displayName:"PageTitlestyled__StyledTitle"})([""]),E=n.div.attrs({className:i.subtitle}).withConfig({displayName:"PageTitlestyled__StyledSubtitle"})([""]),F=n.div.attrs({className:i.titleSlot}).withConfig({displayName:"PageTitlestyled__StyledTitleSlot"})(["margin-top:3px;"]),D=n.div.attrs({className:i.rightBlock}).withConfig({displayName:"PageTitlestyled__StyledRightBlock"})(["display:flex;align-items:flex-end;flex-shrink:0;align-self:flex-end;"]),S=t=>({buttonSize:t?"xs":"s"}),a=(t,l)=>typeof t=="function"?t(l):t,G=({isAdaptive1280:t,...l})=>e.jsx(W,{$isAdaptive1280:t,children:e.jsx(u.IconButton,{size:"xs",view:"secondary",className:i.backIconButton,pin:"circle-circle",...l,children:e.jsx(w.IconChevronLeft,{size:"xs",color:"inherit"})})}),J=({breadcrumbs:t})=>{if(!t)return null;const l={size:"m",...t};return e.jsx(z,{children:e.jsx(u.Breadcrumbs,{...l})})},K=({title:t,titleTypographyProps:l})=>t?e.jsx(H,{children:e.jsx(f.TypographyWithAutoTooltip,{variant:"H2",bold:!0,tooltipText:(l&&"tooltipText"in l?l.tooltipText:void 0)??t,...l,children:t})}):null,M=({subtitle:t,subtitleTypographyProps:l})=>t?e.jsx(E,{children:e.jsx(f.TypographyWithAutoTooltip,{variant:"BodyS",color:$.textSecondary,tooltipText:(l&&"tooltipText"in l?l.tooltipText:void 0)??t,...l,children:t})}):null,T=q.forwardRef(({title:t,titleTypographyProps:l,subtitle:c,subtitleTypographyProps:h,titleSlot:p,rightSlot:B,disableMediaAdaptive:k=!1,breadcrumbs:d,$css:N,className:_,showBackButton:j,onBackClick:b,...C},v)=>{const{down:P}=m.useBreakpoint(),r=!k&&P("xl"),x=S(r),g=a(p,x),y=a(B,x);return e.jsxs(R,{ref:v,$css:N,className:m.mCls(i.root,_),...C,children:[d&&e.jsx(J,{breadcrumbs:d}),e.jsxs(I,{children:[e.jsxs(A,{children:[j&&e.jsx(G,{isAdaptive1280:r,onClick:b}),(t||c)&&e.jsxs(L,{children:[e.jsx(K,{title:t,titleTypographyProps:l}),e.jsx(M,{subtitle:c,subtitleTypographyProps:h})]}),g&&e.jsx(F,{children:g})]}),y&&e.jsx(D,{children:y})]})]})});T.displayName="PageTitle";exports.PageTitle=T;exports.getPageTitleSlotSizes=S;exports.pageTitleClassNames=i;exports.renderPageTitleSlot=a;
1
+ "use strict";const u=require("@salutejs/sdds-finai"),e=require("react/jsx-runtime"),f=require("./AnalyticalWidget-z2HzQ4aA.cjs"),w=require("@salutejs/plasma-icons"),$=require("@salutejs/sdds-themes/tokens/sdds_finai"),m=require("./utils-CUW5bd8S.cjs"),q=require("react"),o=require("../constants/index.cjs"),n=require("styled-components"),s="PageTitle__",i={root:`${s}root`,breadcrumbs:`${s}breadcrumbs`,content:`${s}content`,leftBlock:`${s}left-block`,titleBlock:`${s}title-block`,title:`${s}title`,subtitle:`${s}subtitle`,titleSlot:`${s}title-slot`,rightBlock:`${s}right-block`,backIconButton:`${s}back-icon-block`},R=n.div.attrs({className:i.root}).withConfig({displayName:"PageTitlestyled__StyledRoot"})(["width:100%;display:flex;flex-direction:column;gap:",";"],()=>o.s.x8),z=n.div.attrs({className:i.breadcrumbs}).withConfig({displayName:"PageTitlestyled__StyledBreadcrumbs"})([""]),I=n.div.attrs({className:i.content}).withConfig({displayName:"PageTitlestyled__StyledContent"})(["display:flex;justify-content:space-between;align-items:flex-start;gap:",";"],()=>o.s.x12),A=n.div.attrs({className:i.leftBlock}).withConfig({displayName:"PageTitlestyled__StyledLeftBlock"})(["display:flex;align-items:flex-start;gap:",";flex:1;min-width:0;"],()=>o.s.x8),L=n.div.attrs({className:i.titleBlock}).withConfig({displayName:"PageTitlestyled__StyledTitleBlock"})(["display:flex;flex-direction:column;gap:",";flex-shrink:1;min-width:0;"],()=>o.s.x2),W=n.div.attrs({className:i.backIconButton}).withConfig({displayName:"PageTitlestyled__StyledBackButtonContainer"})(["margin-top:",";"],({$isAdaptive1280:t})=>t?"1px":"6px"),H=n.div.attrs({className:i.title}).withConfig({displayName:"PageTitlestyled__StyledTitle"})([""]),E=n.div.attrs({className:i.subtitle}).withConfig({displayName:"PageTitlestyled__StyledSubtitle"})([""]),F=n.div.attrs({className:i.titleSlot}).withConfig({displayName:"PageTitlestyled__StyledTitleSlot"})(["margin-top:3px;"]),D=n.div.attrs({className:i.rightBlock}).withConfig({displayName:"PageTitlestyled__StyledRightBlock"})(["display:flex;align-items:flex-end;flex-shrink:0;align-self:flex-end;"]),S=t=>({buttonSize:t?"xs":"s"}),a=(t,l)=>typeof t=="function"?t(l):t,G=({isAdaptive1280:t,...l})=>e.jsx(W,{$isAdaptive1280:t,children:e.jsx(u.IconButton,{size:"xs",view:"secondary",className:i.backIconButton,pin:"circle-circle",...l,children:e.jsx(w.IconChevronLeft,{size:"xs",color:"inherit"})})}),J=({breadcrumbs:t})=>{if(!t)return null;const l={size:"m",...t};return e.jsx(z,{children:e.jsx(u.Breadcrumbs,{...l})})},K=({title:t,titleTypographyProps:l})=>t?e.jsx(H,{children:e.jsx(f.TypographyWithAutoTooltip,{variant:"H2",bold:!0,tooltipText:(l&&"tooltipText"in l?l.tooltipText:void 0)??t,...l,children:t})}):null,M=({subtitle:t,subtitleTypographyProps:l})=>t?e.jsx(E,{children:e.jsx(f.TypographyWithAutoTooltip,{variant:"BodyS",color:$.textSecondary,tooltipText:(l&&"tooltipText"in l?l.tooltipText:void 0)??t,...l,children:t})}):null,T=q.forwardRef(({title:t,titleTypographyProps:l,subtitle:c,subtitleTypographyProps:h,titleSlot:p,rightSlot:B,disableMediaAdaptive:k=!1,breadcrumbs:d,$css:N,className:_,showBackButton:j,onBackClick:b,...C},v)=>{const{down:P}=m.useBreakpoint(),r=!k&&P("xl"),x=S(r),g=a(p,x),y=a(B,x);return e.jsxs(R,{ref:v,$css:N,className:m.mCls(i.root,_),...C,children:[d&&e.jsx(J,{breadcrumbs:d}),e.jsxs(I,{children:[e.jsxs(A,{children:[j&&e.jsx(G,{isAdaptive1280:r,onClick:b}),(t||c)&&e.jsxs(L,{children:[e.jsx(K,{title:t,titleTypographyProps:l}),e.jsx(M,{subtitle:c,subtitleTypographyProps:h})]}),g&&e.jsx(F,{children:g})]}),y&&e.jsx(D,{children:y})]})]})});T.displayName="PageTitle";exports.PageTitle=T;exports.getPageTitleSlotSizes=S;exports.pageTitleClassNames=i;exports.renderPageTitleSlot=a;
@@ -1,9 +1,9 @@
1
1
  import { Breadcrumbs as C, IconButton as w } from "@salutejs/sdds-finai";
2
2
  import { jsxs as n, jsx as l } from "react/jsx-runtime";
3
- import { a as S } from "./AnalyticalWidget-BSpo7GCr.mjs";
3
+ import { a as S } from "./AnalyticalWidget-BWcBjoNh.mjs";
4
4
  import { IconChevronLeft as P } from "@salutejs/plasma-icons";
5
5
  import { textSecondary as $ } from "@salutejs/sdds-themes/tokens/sdds_finai";
6
- import { d as R, s as z } from "./utils-D4eJY8pa.mjs";
6
+ import { d as R, s as z } from "./utils-YKicAHp0.mjs";
7
7
  import { forwardRef as I } from "react";
8
8
  import { s } from "../constants/index.mjs";
9
9
  import a from "styled-components";
@@ -1,5 +1,5 @@
1
1
  import { jsx as W, jsxs as H } from "react/jsx-runtime";
2
- import { t as G, e as V, w as J, b as y, d as K, s as Q, q as Y } from "./utils-D4eJY8pa.mjs";
2
+ import { t as G, e as V, w as J, b as y, d as K, s as Q, q as Y } from "./utils-YKicAHp0.mjs";
3
3
  import { useState as F, useEffect as $, useCallback as T, useRef as L, useMemo as X } from "react";
4
4
  import { ModalDF as Z } from "../components/ModalDF/index.mjs";
5
5
  import { s as E } from "../constants/index.mjs";
@@ -1,4 +1,4 @@
1
- "use strict";const W=require("react/jsx-runtime"),u=require("./utils-DvDFSlCG.cjs"),l=require("react"),H=require("../components/ModalDF/index.cjs"),L=require("../constants/index.cjs"),S=require("@salutejs/sdds-themes/tokens/sdds_finai"),U=require("styled-components"),A=({children:e,isFullScreened:t,fullScreenedModalDFProps:i})=>{if(!t)return e;const s=typeof(i==null?void 0:i.fullScreen)=="object"?i.fullScreen:void 0;return W.jsx(H.ModalDF,{opened:!0,closeOnOverlayClick:!1,...i,fullScreen:{...s,defaultEnabled:!0},children:e})},G=({sidebarIsClosed:e,isResizingRef:t,onTransitionEndExt:i})=>{const[s,o]=l.useState(()=>e);l.useEffect(()=>{e&&o(!0)},[e]);const d=l.useCallback(c=>{i&&i(c),!e&&!t.current&&s&&o(!1)},[s,t,i,e]);return{isClosingOrClosedOrOpening:s,onTransitionEnd:d}},m="SplitView__",r={container:`${m}container`,separator:`${m}separator`,separatorButton:`${m}separator-button`,mainBlock:`${m}main-block`,sidebarBlock:`${m}sidebar-block`,sidebarBlockIsResizing:`${m}sidebar-block-is-resizing`,sidebarIsClosingOrClosedOrOpening:`${m}sidebar-is-closing-closed-opening`,sidebarBlockFullScreenContentContainer:`${m}sidebar-block__full-screen-content-container`,sidebarBlockInModal:`${m}sidebar-block-in-modal`},j=32,E=12,n={mainWidthVar:"--main-width",separatorWidthVar:"--separator-width",sidebarWidthVar:"--sidebar-width",sidebarWidthInPxVar:"--sidebar-width-in-px",gapBetweenBlocksDefaultWidth:j,separatorButtonDefaultWidth:E,separatorDefaultWidth:j+E,sidebarWidths:{minWidthPx:600,adaptive1280MinWidthPx:440,maxWidthPercent:70,defaultWidthPercent:30}},M=(e,t)=>e/100*t,J=(e,t)=>e/t*100,K=({setSizes:e,isResizingRef:t,containerRef:i,sidebarMinWidthPx:s,sidebarMaxWidthPercent:o,onResize:d})=>{const c=l.useCallback(()=>{var a;document.body.style.cursor="col-resize",t.current=!0,(a=i.current)==null||a.classList.toggle(r.sidebarBlockIsResizing,!0)},[i,t]);return l.useEffect(()=>{const a=()=>{var p;document.body.style.cursor="auto",t.current=!1,(p=i.current)==null||p.classList.toggle(r.sidebarBlockIsResizing,!1)},g=p=>{if(!t.current||!i.current)return;p.preventDefault();const x=p.clientX,b=i.current.getBoundingClientRect(),h=b.width-n.separatorDefaultWidth,f=(b.right-x-n.separatorButtonDefaultWidth/2)/h*100,k=J(s,h),y=o,w=u.clamp(k,f,y),v=100-w,B=w*h/100,$=v*h/100,O={main:v,mainPx:$,sidebar:w,sidebarPx:B};e(O),d==null||d(O)},C=u.throttleWithLastCall(g,150);return window.addEventListener("mousemove",C),window.addEventListener("mouseup",a),()=>{window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",a)}},[i,t,d,e,o,s]),{startResizing:c}},Q=({setSizes:e,containerRef:t,sidebarMinWidthPx:i,sidebarMaxWidthPercent:s,onResize:o})=>{l.useEffect(()=>{const d=g=>{const p=g.contentRect.width-n.separatorDefaultWidth;e(x=>{const b=M(x.sidebar,p),V=M(s,p),h=u.clamp(i,b,V),f={...x,sidebarPx:h};return o==null||o(f),f})},c=u.debounce(d,1e3),a=new ResizeObserver(g=>{g.forEach(c)});return t.current&&a.observe(t.current),()=>{a.disconnect()}},[t,e,s,i])},P={spaceX4:()=>L.s.x4,spaceX16:()=>L.s.x16},Y=(e,t,i,s=n.sidebarWidths.minWidthPx)=>{const o=t?{...e,main:100,separator:`${i??0}px`,sidebar:0}:{...e,separator:`${n.separatorDefaultWidth}px`},{main:d,sidebar:c,sidebarPx:a,separator:g}=o;return{[n.mainWidthVar]:`${d}fr`,[n.sidebarWidthVar]:c===0?"minmax(0px, 0fr)":`minmax(${s}px, ${c}fr)`,[n.separatorWidthVar]:g,...a!==void 0&&{[n.sidebarWidthInPxVar]:`${a}px`}}},Z=`
1
+ "use strict";const W=require("react/jsx-runtime"),u=require("./utils-CUW5bd8S.cjs"),l=require("react"),H=require("../components/ModalDF/index.cjs"),L=require("../constants/index.cjs"),S=require("@salutejs/sdds-themes/tokens/sdds_finai"),U=require("styled-components"),A=({children:e,isFullScreened:t,fullScreenedModalDFProps:i})=>{if(!t)return e;const s=typeof(i==null?void 0:i.fullScreen)=="object"?i.fullScreen:void 0;return W.jsx(H.ModalDF,{opened:!0,closeOnOverlayClick:!1,...i,fullScreen:{...s,defaultEnabled:!0},children:e})},G=({sidebarIsClosed:e,isResizingRef:t,onTransitionEndExt:i})=>{const[s,o]=l.useState(()=>e);l.useEffect(()=>{e&&o(!0)},[e]);const d=l.useCallback(c=>{i&&i(c),!e&&!t.current&&s&&o(!1)},[s,t,i,e]);return{isClosingOrClosedOrOpening:s,onTransitionEnd:d}},m="SplitView__",r={container:`${m}container`,separator:`${m}separator`,separatorButton:`${m}separator-button`,mainBlock:`${m}main-block`,sidebarBlock:`${m}sidebar-block`,sidebarBlockIsResizing:`${m}sidebar-block-is-resizing`,sidebarIsClosingOrClosedOrOpening:`${m}sidebar-is-closing-closed-opening`,sidebarBlockFullScreenContentContainer:`${m}sidebar-block__full-screen-content-container`,sidebarBlockInModal:`${m}sidebar-block-in-modal`},j=32,E=12,n={mainWidthVar:"--main-width",separatorWidthVar:"--separator-width",sidebarWidthVar:"--sidebar-width",sidebarWidthInPxVar:"--sidebar-width-in-px",gapBetweenBlocksDefaultWidth:j,separatorButtonDefaultWidth:E,separatorDefaultWidth:j+E,sidebarWidths:{minWidthPx:600,adaptive1280MinWidthPx:440,maxWidthPercent:70,defaultWidthPercent:30}},M=(e,t)=>e/100*t,J=(e,t)=>e/t*100,K=({setSizes:e,isResizingRef:t,containerRef:i,sidebarMinWidthPx:s,sidebarMaxWidthPercent:o,onResize:d})=>{const c=l.useCallback(()=>{var a;document.body.style.cursor="col-resize",t.current=!0,(a=i.current)==null||a.classList.toggle(r.sidebarBlockIsResizing,!0)},[i,t]);return l.useEffect(()=>{const a=()=>{var p;document.body.style.cursor="auto",t.current=!1,(p=i.current)==null||p.classList.toggle(r.sidebarBlockIsResizing,!1)},g=p=>{if(!t.current||!i.current)return;p.preventDefault();const x=p.clientX,b=i.current.getBoundingClientRect(),h=b.width-n.separatorDefaultWidth,f=(b.right-x-n.separatorButtonDefaultWidth/2)/h*100,k=J(s,h),y=o,w=u.clamp(k,f,y),v=100-w,B=w*h/100,$=v*h/100,O={main:v,mainPx:$,sidebar:w,sidebarPx:B};e(O),d==null||d(O)},C=u.throttleWithLastCall(g,150);return window.addEventListener("mousemove",C),window.addEventListener("mouseup",a),()=>{window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",a)}},[i,t,d,e,o,s]),{startResizing:c}},Q=({setSizes:e,containerRef:t,sidebarMinWidthPx:i,sidebarMaxWidthPercent:s,onResize:o})=>{l.useEffect(()=>{const d=g=>{const p=g.contentRect.width-n.separatorDefaultWidth;e(x=>{const b=M(x.sidebar,p),V=M(s,p),h=u.clamp(i,b,V),f={...x,sidebarPx:h};return o==null||o(f),f})},c=u.debounce(d,1e3),a=new ResizeObserver(g=>{g.forEach(c)});return t.current&&a.observe(t.current),()=>{a.disconnect()}},[t,e,s,i])},P={spaceX4:()=>L.s.x4,spaceX16:()=>L.s.x16},Y=(e,t,i,s=n.sidebarWidths.minWidthPx)=>{const o=t?{...e,main:100,separator:`${i??0}px`,sidebar:0}:{...e,separator:`${n.separatorDefaultWidth}px`},{main:d,sidebar:c,sidebarPx:a,separator:g}=o;return{[n.mainWidthVar]:`${d}fr`,[n.sidebarWidthVar]:c===0?"minmax(0px, 0fr)":`minmax(${s}px, ${c}fr)`,[n.separatorWidthVar]:g,...a!==void 0&&{[n.sidebarWidthInPxVar]:`${a}px`}}},Z=`
2
2
  border-top-right-radius: ${P.spaceX4};
3
3
  border-bottom-right-radius: ${P.spaceX4};
4
4
  `,R=U.div.attrs({className:r.container}).withConfig({displayName:"SplitViewstyled__StyledDiv"})(["*{box-sizing:border-box;}display:grid;position:relative;z-index:0;grid-template-columns:var(",") var(",") var(",");transition:grid-template-columns 0.2s ease-in-out,margin-right 0.2s ease-in-out;flex-grow:1;& .","{overflow-x:hidden;}& .",",& .","{--split-view-header-height:",";--split-view-bottom-gap:var(--page-layout-padding-bottom,32px);"," position:sticky;top:var(--split-view-header-height);height:calc( 100vh - var(--split-view-header-height) - var(--split-view-bottom-gap) );overflow-x:hidden;}& .","{align-self:start;z-index:1;& .","{margin-left:","px;position:relative;border:none;padding:0;width:","px;height:100%;background-color:",";border-radius:"," 0 0 ",";&::before{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:4px;height:",";border-radius:95px;background-color:",";}&:hover{&::before{background-color:",";}}cursor:col-resize;text-indent:100%;white-space:nowrap;overflow:hidden;}}&.","{& .",":before{background-color:",";}}.","{z-index:0;align-self:start;background-color:",";box-shadow:",";",";}."," > *{width:var(",");}"," ",""],n.mainWidthVar,n.separatorWidthVar,n.sidebarWidthVar,r.mainBlock,r.separator,r.sidebarBlock,({$headerHeight:e})=>e!==void 0?`${e}px`:"var(--global-header-height, 72px)",u.media.down("l")`
@@ -0,0 +1 @@
1
+ "use strict";const r=require("react/jsx-runtime"),U=require("@salutejs/sdds-finai"),ne=require("@salutejs/plasma-icons"),s=require("react"),fe=require("react-dom"),Re=require("./EmptyState-CcxlsZm0.cjs"),q=require("./utils-CUW5bd8S.cjs"),V=require("@salutejs/sdds-themes/tokens/sdds_finai"),l=require("styled-components"),Ee=require("./AnalyticalWidget-z2HzQ4aA.cjs"),je=({controller:e,pauseHoldDelay:t,tapPrevZone:n,isOpen:o})=>{const i=s.useRef(),y=s.useRef(!1),p=s.useRef("next"),u=()=>{i.current&&(clearTimeout(i.current),i.current=void 0)},v=f=>{const c=f.currentTarget.getBoundingClientRect(),_=c.width>0?(f.clientX-c.left)/c.width:1;p.current=_<n?"prev":"next",y.current=!1,u(),i.current=setTimeout(()=>{y.current=!0,e.pause()},t)},I=()=>{if(u(),y.current){y.current=!1,e.resume();return}p.current==="prev"?e.prev():e.next()},d=()=>{u(),y.current&&(y.current=!1,e.resume())};return s.useEffect(()=>{if(!o)return;const f=c=>{c.key==="ArrowLeft"?(c.preventDefault(),e.prev()):c.key==="ArrowRight"?(c.preventDefault(),e.next()):c.key==="Escape"&&(c.preventDefault(),e.close())};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[o,e]),{onPointerDown:v,onPointerUp:I,onPointerLeave:d,onPointerCancel:d}},ge=s.createContext(null),ke=ge.Provider,Y=()=>{const e=s.useContext(ge);if(!e)throw new Error("Компоненты Stories должны использоваться внутри <Stories>.");return e},Z=e=>s.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot),C={root:"df-stories",preview:"df-stories-preview",previewRing:"df-stories-preview__ring",previewGap:"df-stories-preview__gap",previewBody:"df-stories-preview__body",previewTitle:"df-stories-preview__title",viewer:"df-stories-viewer",overlay:"df-stories-viewer__overlay",stage:"df-stories-viewer__stage",banner:"df-stories-banner",progress:"df-stories-progress",progressItem:"df-stories-progress__item",content:"df-stories-content",action:"df-stories-banner__action",arrowPrev:"df-stories-viewer__arrow-prev",arrowNext:"df-stories-viewer__arrow-next",close:"df-stories-viewer__close"},Ne="linear-gradient(135deg, #08c6c9 0%, #99b0fe 100%)",Pe="#ecf6fc",L="df-stories-banner",X={duration:5e3,pauseHoldDelay:200,tapPrevZone:1/3,overlayColor:"#060a0c47",zIndex:9e3},x={circle:98,ring:2,titleGap:6,rectRadiusOuter:12,rectRadiusBody:8,bannerMaxWidth:430,bannerMaxHeight:900,bannerRadius:16,bannerPadding:28,stageWidth:558,progressHeight:4,progressRadius:2,progressFillRadius:6,progressGap:4},Te="StoriesPreview",ce=l.div.withConfig({displayName:"StoriesContentstyled__StyledContent"})(["position:absolute;inset:0;display:flex;align-items:center;justify-content:center;overflow:hidden;background:",";"],V.surfaceSolidCard),Oe=l.img.withConfig({displayName:"StoriesContentstyled__StyledImage"})(["width:100%;height:100%;object-fit:",";opacity:",";transition:opacity 0.2s ease;user-select:none;"],({$objectFit:e})=>e,({$loaded:e})=>e?1:0),Ae=l.div.withConfig({displayName:"StoriesContentstyled__StyledSpinner"})(["position:absolute;display:flex;align-items:center;justify-content:center;"]),ze=l.div.withConfig({displayName:"StoriesContentstyled__StyledErrorSlot"})(["position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:","px;"],x.bannerPadding),ye=({slide:e,status:t,errorNode:n})=>{const o=e.objectFit??"cover",i=t==="loaded";return t==="error"?r.jsx(ce,{className:C.content,children:r.jsx(ze,{children:n})}):r.jsxs(ce,{className:C.content,children:[r.jsx(Oe,{src:e.src,alt:"",draggable:!1,$objectFit:o,$loaded:i}),t==="loading"?r.jsx(Ae,{children:r.jsx(U.Spinner,{view:"default",size:"l"})}):null]})},pe=(e,t)=>{e&&(e.style.transform=`scaleX(${t})`)},De=({fillRef:e,active:t,duration:n,isPlaying:o,isReady:i,resetKey:y,onComplete:p})=>{const u=s.useRef(0),v=s.useRef(p);v.current=p,s.useEffect(()=>{u.current=0,pe(e.current,0)},[y,e]),s.useEffect(()=>{if(!t||!o||!i||n<=0)return;let I=0,d=performance.now();const f=c=>{u.current+=c-d,d=c;const _=Math.min(1,u.current/n);if(pe(e.current,_),_>=1){v.current();return}I=requestAnimationFrame(f)};return I=requestAnimationFrame(f),()=>cancelAnimationFrame(I)},[t,o,i,n,y,e])},$e=l.div.withConfig({displayName:"StoriesProgressstyled__StyledProgress"})(["display:flex;gap:","px;width:100%;"],x.progressGap),Be=l.div.withConfig({displayName:"StoriesProgressstyled__StyledItem"})(["position:relative;flex:1 1 0;height:","px;border-radius:","px;overflow:hidden;background:",";"],x.progressHeight,x.progressRadius,({$bg:e})=>e),Ve=l.span.withConfig({displayName:"StoriesProgressstyled__StyledFill"})(["position:absolute;inset:0;border-radius:","px;background:",";transform:scaleX(0);transform-origin:left center;will-change:transform;"],x.progressFillRadius,({$color:e})=>e),xe=({isReady:e})=>{var O;const{store:t,controller:n,groups:o,defaultDuration:i,mode:y}=Y(),{groupIndex:p,slideIndex:u,isPlaying:v,isOpen:I}=Z(t),d=q.useActiveTheme(),c=(y??d)==="dark",_=c?V.onLightSurfaceTransparentTertiary:V.onDarkSurfaceTransparentTertiary,S=c?V.onLightSurfaceTransparentDeep:V.onDarkSurfaceTransparentDeep,b=o[p],h=(b==null?void 0:b.slides)??[],z=s.useRef(null),N=((O=h[u])==null?void 0:O.duration)??(b==null?void 0:b.defaultDuration)??i;return De({fillRef:z,active:I,duration:N,isPlaying:v,isReady:e,resetKey:`${p}-${u}`,onComplete:n.next}),r.jsx($e,{className:C.progress,children:h.map((D,P)=>{const T=D.id??`${p}-${P}`,j=P<u,G=P===u;return r.jsx(Be,{className:C.progressItem,$bg:j?S:_,children:G?r.jsx(Ve,{ref:z,$color:S}):null},T)})})},Ge=l.keyframes(["from{opacity:0;transform:scale(0.92) translateY(8px);}to{opacity:1;transform:scale(1) translateY(0);}"]),Le=l.keyframes(["from{opacity:1;transform:scale(1) translateY(0);}to{opacity:0;transform:scale(0.96) translateY(6px);}"]),Fe=l.div.withConfig({displayName:"StoriesBannerstyled__StyledBanner"})(["position:relative;height:100%;width:auto;aspect-ratio:"," / ",";max-width:calc( 100vw - ","px );border-radius:","px;overflow:hidden;view-transition-name:",";animation:"," "," ease forwards;"],x.bannerMaxWidth,x.bannerMaxHeight,x.stageWidth-x.bannerMaxWidth,x.bannerRadius,L,({$closing:e})=>e?Le:Ge,({$closing:e})=>e?"0.2s":"0.24s"),He=l.div.withConfig({displayName:"StoriesBannerstyled__StyledTapLayer"})(["position:absolute;inset:0;z-index:1;touch-action:none;"]),Me=l.div.withConfig({displayName:"StoriesBannerstyled__StyledTop"})(["position:absolute;top:0;left:0;right:0;z-index:2;padding:","px;pointer-events:none;"],x.bannerPadding),We=l.div.withConfig({displayName:"StoriesBannerstyled__StyledBottom"})(["position:absolute;bottom:0;left:0;right:0;z-index:2;padding:","px;pointer-events:none;"],x.bannerPadding),Xe=l.div.withConfig({displayName:"StoriesBannerstyled__StyledActionSlot"})(["pointer-events:auto;"]),me=({closing:e,onAnimationEnd:t})=>{const{store:n,controller:o,groups:i,pauseHoldDelay:y,tapPrevZone:p,loadingDelay:u,onError:v,renderError:I}=Y(),{groupIndex:d,slideIndex:f,isOpen:c}=Z(n),_=i[d],S=_==null?void 0:_.slides[f],{status:b,reload:h}=q.useImageLoader(S==null?void 0:S.src,u),z=je({controller:o,pauseHoldDelay:y,tapPrevZone:p,isOpen:c}),N=s.useRef();s.useEffect(()=>{if(b!=="error"||!S)return;const j=`${d}-${f}`;N.current!==j&&(N.current=j,v==null||v({groupIndex:d,slideIndex:f,slide:S,retry:h}))},[b,d,f,S,v,h]);const O=j=>j.stopPropagation(),D=j=>{j.target===j.currentTarget&&t()};if(!S)return null;const{footer:P}=S,T=I?I({groupIndex:d,slideIndex:f,slide:S,retry:h}):r.jsx(Re.EmptyState,{size:"s",variant:"loading",title:"Не удалось загрузить",centered:!0,buttons:[{type:"link",props:{text:"Обновить",view:"accent",onClick:h}}]});return r.jsxs(Fe,{className:C.banner,$closing:e,onClick:O,onAnimationEnd:D,children:[r.jsx(ye,{slide:S,status:b,errorNode:T}),b==="error"?null:r.jsx(He,{...z}),r.jsx(Me,{children:r.jsx(xe,{isReady:b==="loaded"})}),P?r.jsx(We,{children:r.jsx(Xe,{className:C.action,children:P})}):null]})},se={ring:()=>Ne,fallback:()=>Pe,boxShadow:()=>V.shadowDownSoftL},re=(e,t)=>e==="circle"?"50%":`${{outer:x.rectRadiusOuter,body:x.rectRadiusBody}[t]}px`,qe=l.div.withConfig({displayName:"StoriesPreviewstyled__StyledPreview"})(["display:flex;flex-direction:column;align-items:center;width:","px;"],({$width:e})=>e),Ye=l.button.withConfig({displayName:"StoriesPreviewstyled__StyledTrigger"})(["position:relative;display:block;box-sizing:border-box;width:","px;height:","px;padding:0;margin:0;border:0;background:transparent;cursor:pointer;border-radius:",";outline:none;&:focus-visible{outline:2px solid ",";outline-offset:2px;}"],({$width:e})=>e,({$height:e})=>e,({$shape:e})=>re(e,"outer"),V.textAccent),Ze=l.div.withConfig({displayName:"StoriesPreviewstyled__StyledRing"})(["position:absolute;inset:0;box-sizing:border-box;padding:","px;background:",";border-radius:",";-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;"],x.ring,se.ring,({$shape:e})=>re(e,"outer")),Ke=l.div.withConfig({displayName:"StoriesPreviewstyled__StyledBody"})(["position:absolute;inset:","px;box-sizing:border-box;box-shadow:",";background-color:",";background-position:center;background-size:cover;background-repeat:no-repeat;"," border-radius:",";"],({$viewed:e})=>e?0:x.ring*2,se.boxShadow,se.fallback,({$image:e})=>e&&l.css(["background-image:url('","');"],e),({$shape:e,$viewed:t})=>re(e,t?"outer":"body")),Ue=l.div.withConfig({displayName:"StoriesPreviewstyled__StyledTitle"})(["margin-top:","px;width:100%;text-align:",";& > *{width:100%;}"],x.titleGap,({$align:e})=>e),oe=e=>{var $;const{slides:t,shape:n="circle",title:o,titleProps:i,image:y,viewed:p=!1,size:u=x.circle,width:v,height:I,renderTrigger:d,className:f,__index:c=0}=e,{store:_,controller:S,preloadOnHover:b}=Y(),h=Z(_),z=h.isOpen&&h.groupIndex===c,N=n==="rect"?v??u:u,O=n==="rect"?I??u:u,D=()=>S.open(c),P=()=>{b&&t[0]&&q.preloadImage(t[0].src)},T=()=>d?d({index:c,viewed:p,isActive:z}):r.jsxs(r.Fragment,{children:[p?null:r.jsx(Ze,{className:C.previewRing,$shape:n}),r.jsx(Ke,{className:C.previewBody,$shape:n,$viewed:p,$image:y})]}),j={variant:"BodyXXS",bold:!0,lines:2,tooltipText:o,color:V.textPrimary,...i,children:o},G=(($=i==null?void 0:i.style)==null?void 0:$.textAlign)??"center";return r.jsxs(qe,{className:[C.preview,f].filter(Boolean).join(" "),"data-component":Te,$width:N,children:[r.jsx(Ye,{type:"button","aria-label":o,$width:N,$height:O,$shape:n,onClick:D,onMouseEnter:P,children:T()}),o?r.jsx(Ue,{className:C.previewTitle,style:{maxWidth:N},$align:G,children:r.jsx(Ee.TypographyWithAutoTooltip,{...j})}):null]})},Je=l.keyframes(["from{opacity:0;}to{opacity:1;}"]),Qe=l.keyframes(["from{opacity:1;}to{opacity:0;}"]),Se=e=>l.css(["animation:"," "," ease forwards;"],e?Qe:Je,e?"0.2s":"0.24s"),et=l.div.withConfig({displayName:"StoriesViewerstyled__StyledRoot"})(["position:fixed;inset:0;z-index:",";display:flex;align-items:center;justify-content:center;"],({$zIndex:e})=>e),tt=l.div.withConfig({displayName:"StoriesViewerstyled__StyledOverlay"})(["position:absolute;inset:0;background:",";opacity:",";transition:opacity 0.24s ease;"],({$color:e})=>e,({$closing:e})=>e?0:1),nt=l.div.withConfig({displayName:"StoriesViewerstyled__StyledStage"})(["position:relative;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:fit-content;max-width:min(","px,100vw);height:min(","px,calc(100vh - 32px));padding:0 ","px;outline:none;"],x.stageWidth,x.bannerMaxHeight,(x.stageWidth-x.bannerMaxWidth)/2),ue=l.div.withConfig({displayName:"StoriesViewerstyled__StyledArrow"})(["position:absolute;top:50%;"," z-index:3;transform:translateY(-50%);",""],({$side:e})=>e==="prev"?"left: 0;":"right: 0;",({$closing:e})=>Se(e)),st=l.div.withConfig({displayName:"StoriesViewerstyled__StyledClose"})(["position:absolute;top:0;right:0;z-index:3;",""],({$closing:e})=>Se(e)),rt=l.keyframes(["from{transform:translateX(24px);opacity:0;}to{transform:translateX(0);opacity:1;}"]),ot=l.keyframes(["from{transform:translateX(0);opacity:1;}to{transform:translateX(-24px);opacity:0;}"]),it=l.keyframes(["from{transform:translateX(-24px);opacity:0;}to{transform:translateX(0);opacity:1;}"]),at=l.keyframes(["from{transform:translateX(0);opacity:1;}to{transform:translateX(24px);opacity:0;}"]),lt=l.createGlobalStyle(["::view-transition-old(","),::view-transition-new(","){animation-duration:0.3s;animation-timing-function:ease;}html[data-df-stories-dir='next']::view-transition-new(","){animation-name:",";}html[data-df-stories-dir='next']::view-transition-old(","){animation-name:",";}html[data-df-stories-dir='prev']::view-transition-new(","){animation-name:",";}html[data-df-stories-dir='prev']::view-transition-old(","){animation-name:",";}"],L,L,L,rt,L,ot,L,it,L,at),he=()=>{var Q;const{store:e,controller:t,groups:n,overlay:o,overlayColor:i,zIndex:y,groupTransition:p,arrows:u,hideDisabledArrows:v,preloadGroup:I}=Y(),{isOpen:d,groupIndex:f,slideIndex:c}=Z(e),[_,S]=s.useState(d),b=s.useRef(null);s.useEffect(()=>{d&&S(!0)},[d]),s.useEffect(()=>{var A;d&&((A=b.current)==null||A.focus())},[d]),s.useEffect(()=>{d&&I(f)},[d,f,I]);const h=_&&!d,z=s.useCallback(()=>{h&&S(!1)},[h]);if(!_||typeof document>"u")return null;const N=((Q=n[f])==null?void 0:Q.slides.length)??0,O=f>0||c>0,D=c+1<N||f+1<n.length,P=n.reduce((A,F)=>A+F.slides.length,0),T=u==="always"||u==="auto"&&P>1,j=T&&(O||!v),G=T&&(D||!v),$=A=>A.stopPropagation(),J=r.jsxs(et,{className:C.viewer,$zIndex:y,onClick:()=>t.close(),children:[o?r.jsx(tt,{className:C.overlay,$color:i,$closing:h}):null,p==="slide"?r.jsx(lt,{}):null,r.jsxs(nt,{ref:b,tabIndex:-1,className:C.stage,children:[j?r.jsx(ue,{className:C.arrowPrev,$side:"prev",$closing:h,onClick:$,children:r.jsx(U.IconButton,{size:"s",view:"white",pin:"circle-circle","aria-label":"Назад",disabled:!O,onClick:()=>t.prev(),children:r.jsx(ne.IconDisclosureLeftOutline,{size:"s"})})}):null,r.jsx(me,{closing:h,onAnimationEnd:z}),G?r.jsx(ue,{className:C.arrowNext,$side:"next",$closing:h,onClick:$,children:r.jsx(U.IconButton,{size:"s",view:"white",pin:"circle-circle","aria-label":"Вперёд",disabled:!D,onClick:()=>t.next(),children:r.jsx(ne.IconDisclosureRightOutline,{size:"s"})})}):null,r.jsx(st,{className:C.close,$closing:h,onClick:$,children:r.jsx(U.IconButton,{size:"s",view:"white",pin:"circle-circle","aria-label":"Закрыть",onClick:()=>t.close(),children:r.jsx(ne.IconClose,{size:"s"})})})]})]});return fe.createPortal(J,document.body)},dt=Object.freeze(Object.defineProperty({__proto__:null,StoriesViewer:he},Symbol.toStringTag,{value:"Module"})),we=s.lazy(()=>Promise.resolve().then(()=>dt).then(e=>({default:e.StoriesViewer}))),ct=e=>{const t=s.useRef(e);return t.current=e,s.useCallback(n=>{const o=t.current[n];if(!o)return;o.slides.forEach(y=>q.preloadImage(y.src));const i=t.current[n+1];i!=null&&i.slides[0]&&q.preloadImage(i.slides[0].src)},[])},pt={isOpen:!1,groupIndex:0,slideIndex:0,isPlaying:!0,direction:"next"},ut=e=>{let t={...pt,...e};const n=new Set;return{getSnapshot:()=>t,subscribe:o=>(n.add(o),()=>{n.delete(o)}),setState:o=>{Object.keys(o).some(p=>t[p]!==o[p])&&(t={...t,...o},n.forEach(p=>p()))}}},ft=()=>typeof document<"u"&&typeof document.startViewTransition=="function",gt=(e,t)=>{const{direction:n="next",enabled:o=!0}=t??{};if(!o||!ft()){e();return}const i=document;i.documentElement.dataset.dfStoriesDir=n,i.startViewTransition(()=>fe.flushSync(e)).finished.finally(()=>{delete i.documentElement.dataset.dfStoriesDir})},yt=l.div.withConfig({displayName:"Storiesstyled__StyledStories"})(["display:flex;align-items:flex-start;gap:16px;"]),ve=e=>s.isValidElement(e)&&e.type===oe,be=e=>{const t=[];return s.Children.forEach(e,n=>{var o;ve(n)?t.push(n):s.isValidElement(n)&&((o=n.props)!=null&&o.children)&&t.push(...be(n.props.children))}),t},Ie=(e,t)=>s.Children.map(e,n=>{var o;if(ve(n)){const i=t.value;return t.value+=1,s.cloneElement(n,{__index:i})}return s.isValidElement(n)&&((o=n.props)!=null&&o.children)?s.cloneElement(n,void 0,Ie(n.props.children,t)):n}),xt=()=>{const{store:e}=Y(),{isOpen:t}=Z(e),[n,o]=s.useState(t);return s.useEffect(()=>{t&&o(!0)},[t]),n?r.jsx(s.Suspense,{fallback:null,children:r.jsx(we,{})}):null},mt=(e,t)=>{const{children:n,defaultDuration:o=X.duration,open:i,defaultOpen:y,activeGroupIndex:p,activeSlideIndex:u,onOpenChange:v,onGroupChange:I,onSlideChange:d,onComplete:f,onGroupComplete:c,onClose:_,onError:S,renderError:b,overlay:h=!0,overlayColor:z=X.overlayColor,zIndex:N=X.zIndex,preloadOnHover:O=!0,loadingDelay:D=0,pauseHoldDelay:P=X.pauseHoldDelay,groupTransition:T="slide",arrows:j="auto",hideDisabledArrows:G=!0,mode:$,className:J}=e,A=be(n).map(R=>({slides:R.props.slides??[],defaultDuration:R.props.defaultDuration})),F=s.useRef();F.current||(F.current=ut({isOpen:y??!1}));const g=F.current,K=s.useRef(A);K.current=A;const ae=s.useRef({groupTransition:T});ae.current={groupTransition:T};const H=s.useRef({onOpenChange:v,onGroupChange:I,onSlideChange:d,onComplete:f,onGroupComplete:c,onClose:_});H.current={onOpenChange:v,onGroupChange:I,onSlideChange:d,onComplete:f,onGroupComplete:c,onClose:_};const ee=s.useRef();if(!ee.current){const R=(a,E)=>g.setState({slideIndex:a,direction:E,isPlaying:!0}),m=(a,E,k)=>gt(()=>g.setState({groupIndex:a,slideIndex:E,direction:k,isPlaying:!0}),{direction:k,enabled:ae.current.groupTransition!=="none"}),w=()=>{var a,E;(E=(a=H.current).onComplete)==null||E.call(a),g.setState({isOpen:!1,isPlaying:!1})};ee.current={open:(a,E)=>{const k=g.getSnapshot();g.setState({isOpen:!0,groupIndex:a??k.groupIndex,slideIndex:E??0,isPlaying:!0,direction:"next"})},close:()=>g.setState({isOpen:!1,isPlaying:!1}),next:()=>{var k,B,M,W,de;const a=g.getSnapshot(),E=((k=K.current[a.groupIndex])==null?void 0:k.slides.length)??0;a.slideIndex+1<E?R(a.slideIndex+1,"next"):a.groupIndex+1<K.current.length?((M=(B=H.current).onGroupComplete)==null||M.call(B,a.groupIndex),m(a.groupIndex+1,0,"next")):((de=(W=H.current).onGroupComplete)==null||de.call(W,a.groupIndex),w())},prev:()=>{const a=g.getSnapshot();a.slideIndex>0?R(a.slideIndex-1,"prev"):a.groupIndex>0&&m(a.groupIndex-1,0,"prev")},nextGroup:()=>{const a=g.getSnapshot();a.groupIndex+1<K.current.length&&m(a.groupIndex+1,0,"next")},prevGroup:()=>{const a=g.getSnapshot();a.groupIndex>0&&m(a.groupIndex-1,0,"prev")},goTo:(a,E)=>{const k=g.getSnapshot(),B=a<k.groupIndex?"prev":"next";a===k.groupIndex?R(E??0,B):m(a,E??0,B)},pause:()=>g.setState({isPlaying:!1}),resume:()=>g.setState({isPlaying:!0})}}const te=ee.current,_e=ct(A),le=s.useRef(g.getSnapshot());s.useEffect(()=>g.subscribe(()=>{var a,E,k,B,M,W;const R=le.current,m=g.getSnapshot();le.current=m;const w=H.current;if(R.isOpen!==m.isOpen){(a=w.onOpenChange)==null||a.call(w,m.isOpen,{groupIndex:m.groupIndex}),m.isOpen?((E=w.onGroupChange)==null||E.call(w,m.groupIndex),(k=w.onSlideChange)==null||k.call(w,m.groupIndex,m.slideIndex)):(B=w.onClose)==null||B.call(w);return}m.isOpen&&(R.groupIndex!==m.groupIndex&&((M=w.onGroupChange)==null||M.call(w,m.groupIndex)),(R.groupIndex!==m.groupIndex||R.slideIndex!==m.slideIndex)&&((W=w.onSlideChange)==null||W.call(w,m.groupIndex,m.slideIndex)))}),[g]),s.useEffect(()=>{i!==void 0&&g.setState({isOpen:i})},[i,g]),s.useEffect(()=>{p!==void 0&&g.setState({groupIndex:p})},[p,g]),s.useEffect(()=>{u!==void 0&&g.setState({slideIndex:u})},[u,g]),s.useImperativeHandle(t,()=>({...te,getState:()=>{const R=g.getSnapshot();return{isOpen:R.isOpen,groupIndex:R.groupIndex,slideIndex:R.slideIndex,isPlaying:R.isPlaying}}}),[te,g]);const Ce={store:g,controller:te,groups:A,defaultDuration:o,pauseHoldDelay:P,tapPrevZone:X.tapPrevZone,preloadGroup:_e,preloadOnHover:O,loadingDelay:D,overlay:h,overlayColor:z,zIndex:N,groupTransition:T,arrows:j,hideDisabledArrows:G,mode:$,onError:S,renderError:b};return r.jsxs(ke,{value:Ce,children:[r.jsx(yt,{className:[C.root,J].filter(Boolean).join(" "),children:Ie(n,{value:0})}),r.jsx(xt,{})]})},ie=s.forwardRef(mt);ie.Preview=oe;ie.displayName="Stories";exports.Stories=ie;exports.StoriesBanner=me;exports.StoriesContent=ye;exports.StoriesPreview=oe;exports.StoriesProgress=xe;exports.StoriesViewer=he;exports.StoriesViewerLazy=we;exports.storiesClassNames=C;