@cp949/mui-react19 2.0.3 → 2.2.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 (990) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +16 -0
  3. package/dist/_virtual/_rolldown/runtime.cjs +1 -0
  4. package/dist/_virtual/_rolldown/runtime.js +1 -0
  5. package/dist/components/Center.cjs +2 -0
  6. package/dist/components/Center.cjs.map +1 -0
  7. package/dist/components/Center.d.cts +11 -0
  8. package/dist/components/Center.d.ts +11 -0
  9. package/dist/components/Center.js +2 -0
  10. package/dist/components/Center.js.map +1 -0
  11. package/dist/components/CooldownButton.cjs +2 -0
  12. package/dist/components/CooldownButton.cjs.map +1 -0
  13. package/dist/components/CooldownButton.d.cts +14 -0
  14. package/dist/components/CooldownButton.d.ts +14 -0
  15. package/dist/components/CooldownButton.js +2 -0
  16. package/dist/components/CooldownButton.js.map +1 -0
  17. package/dist/components/CooldownButtonBase.cjs +2 -0
  18. package/dist/components/CooldownButtonBase.cjs.map +1 -0
  19. package/dist/components/CooldownButtonBase.d.cts +14 -0
  20. package/dist/components/CooldownButtonBase.d.ts +14 -0
  21. package/dist/components/CooldownButtonBase.js +2 -0
  22. package/dist/components/CooldownButtonBase.js.map +1 -0
  23. package/dist/components/CooldownIconButton.cjs +2 -0
  24. package/dist/components/CooldownIconButton.cjs.map +1 -0
  25. package/dist/components/CooldownIconButton.d.cts +14 -0
  26. package/dist/components/CooldownIconButton.d.ts +14 -0
  27. package/dist/components/CooldownIconButton.js +2 -0
  28. package/dist/components/CooldownIconButton.js.map +1 -0
  29. package/dist/components/CopyButtonWrapper.cjs +2 -0
  30. package/dist/components/CopyButtonWrapper.cjs.map +1 -0
  31. package/dist/components/CopyButtonWrapper.d.cts +75 -0
  32. package/dist/components/CopyButtonWrapper.d.ts +75 -0
  33. package/dist/components/CopyButtonWrapper.js +2 -0
  34. package/dist/components/CopyButtonWrapper.js.map +1 -0
  35. package/dist/components/CustomTableBody.cjs +2 -0
  36. package/dist/components/CustomTableBody.cjs.map +1 -0
  37. package/dist/components/CustomTableBody.d.cts +9 -0
  38. package/dist/components/CustomTableBody.d.ts +9 -0
  39. package/dist/components/CustomTableBody.js +2 -0
  40. package/dist/components/CustomTableBody.js.map +1 -0
  41. package/dist/components/DebouncedButton.cjs +2 -0
  42. package/dist/components/DebouncedButton.cjs.map +1 -0
  43. package/dist/components/DebouncedButton.d.cts +11 -0
  44. package/dist/components/DebouncedButton.d.ts +11 -0
  45. package/dist/components/DebouncedButton.js +2 -0
  46. package/dist/components/DebouncedButton.js.map +1 -0
  47. package/dist/components/DebouncedButtonBase.cjs +2 -0
  48. package/dist/components/DebouncedButtonBase.cjs.map +1 -0
  49. package/dist/components/DebouncedButtonBase.d.cts +11 -0
  50. package/dist/components/DebouncedButtonBase.d.ts +11 -0
  51. package/dist/components/DebouncedButtonBase.js +2 -0
  52. package/dist/components/DebouncedButtonBase.js.map +1 -0
  53. package/dist/components/DebouncedIconButton.cjs +2 -0
  54. package/dist/components/DebouncedIconButton.cjs.map +1 -0
  55. package/dist/components/DebouncedIconButton.d.cts +11 -0
  56. package/dist/components/DebouncedIconButton.d.ts +11 -0
  57. package/dist/components/DebouncedIconButton.js +2 -0
  58. package/dist/components/DebouncedIconButton.js.map +1 -0
  59. package/dist/components/DebouncedRender.cjs +2 -0
  60. package/dist/components/DebouncedRender.cjs.map +1 -0
  61. package/dist/components/DebouncedRender.d.cts +31 -0
  62. package/dist/components/DebouncedRender.d.ts +31 -0
  63. package/dist/components/DebouncedRender.js +2 -0
  64. package/dist/components/DebouncedRender.js.map +1 -0
  65. package/dist/components/DelayedRender.cjs +2 -0
  66. package/dist/components/DelayedRender.cjs.map +1 -0
  67. package/dist/components/DelayedRender.d.cts +34 -0
  68. package/dist/components/DelayedRender.d.ts +34 -0
  69. package/dist/components/DelayedRender.js +2 -0
  70. package/dist/components/DelayedRender.js.map +1 -0
  71. package/dist/components/FileButton.cjs +2 -0
  72. package/dist/components/FileButton.cjs.map +1 -0
  73. package/dist/components/FileButton.d.cts +87 -0
  74. package/dist/components/FileButton.d.ts +87 -0
  75. package/dist/components/FileButton.js +2 -0
  76. package/dist/components/FileButton.js.map +1 -0
  77. package/dist/components/FlexItemsContainer.cjs +2 -0
  78. package/dist/components/FlexItemsContainer.cjs.map +1 -0
  79. package/dist/components/FlexItemsContainer.d.cts +51 -0
  80. package/dist/components/FlexItemsContainer.d.ts +51 -0
  81. package/dist/components/FlexItemsContainer.js +2 -0
  82. package/dist/components/FlexItemsContainer.js.map +1 -0
  83. package/dist/components/FloatingIndicator/FloatingIndicator.cjs +2 -0
  84. package/dist/components/FloatingIndicator/FloatingIndicator.cjs.map +1 -0
  85. package/dist/components/FloatingIndicator/FloatingIndicator.d.cts +27 -0
  86. package/dist/components/FloatingIndicator/FloatingIndicator.d.ts +27 -0
  87. package/dist/components/FloatingIndicator/FloatingIndicator.js +2 -0
  88. package/dist/components/FloatingIndicator/FloatingIndicator.js.map +1 -0
  89. package/dist/components/FloatingIndicator/index.cjs +2 -0
  90. package/dist/components/FloatingIndicator/index.cjs.map +1 -0
  91. package/dist/components/FloatingIndicator/index.d.cts +2 -0
  92. package/dist/components/FloatingIndicator/index.d.ts +2 -0
  93. package/dist/components/FloatingIndicator/index.js +2 -0
  94. package/dist/components/FloatingIndicator/index.js.map +1 -0
  95. package/dist/components/FloatingIndicator/useFloatingIndicator.cjs +2 -0
  96. package/dist/components/FloatingIndicator/useFloatingIndicator.cjs.map +1 -0
  97. package/dist/components/FloatingIndicator/useFloatingIndicator.js +2 -0
  98. package/dist/components/FloatingIndicator/useFloatingIndicator.js.map +1 -0
  99. package/dist/components/Hide.cjs +2 -0
  100. package/dist/components/Hide.cjs.map +1 -0
  101. package/dist/components/Hide.d.cts +12 -0
  102. package/dist/components/Hide.d.ts +12 -0
  103. package/dist/components/Hide.js +2 -0
  104. package/dist/components/Hide.js.map +1 -0
  105. package/dist/components/Highlight/Highlight.cjs +2 -0
  106. package/dist/components/Highlight/Highlight.cjs.map +1 -0
  107. package/dist/components/Highlight/Highlight.d.cts +93 -0
  108. package/dist/components/Highlight/Highlight.d.ts +93 -0
  109. package/dist/components/Highlight/Highlight.js +2 -0
  110. package/dist/components/Highlight/Highlight.js.map +1 -0
  111. package/dist/components/Highlight/highlighter/highlighter.cjs +2 -0
  112. package/dist/components/Highlight/highlighter/highlighter.cjs.map +1 -0
  113. package/dist/components/Highlight/highlighter/highlighter.js +2 -0
  114. package/dist/components/Highlight/highlighter/highlighter.js.map +1 -0
  115. package/dist/components/Highlight/index.d.cts +2 -0
  116. package/dist/components/Highlight/index.d.ts +2 -0
  117. package/dist/components/LengthLimitHelperText.cjs +2 -0
  118. package/dist/components/LengthLimitHelperText.cjs.map +1 -0
  119. package/dist/components/LengthLimitHelperText.d.cts +13 -0
  120. package/dist/components/LengthLimitHelperText.d.ts +13 -0
  121. package/dist/components/LengthLimitHelperText.js +2 -0
  122. package/dist/components/LengthLimitHelperText.js.map +1 -0
  123. package/dist/components/LgOrUp.cjs +2 -0
  124. package/dist/components/LgOrUp.cjs.map +1 -0
  125. package/dist/components/LgOrUp.d.cts +8 -0
  126. package/dist/components/LgOrUp.d.ts +8 -0
  127. package/dist/components/LgOrUp.js +2 -0
  128. package/dist/components/LgOrUp.js.map +1 -0
  129. package/dist/components/ListPagination.cjs +2 -0
  130. package/dist/components/ListPagination.cjs.map +1 -0
  131. package/dist/components/ListPagination.d.cts +55 -0
  132. package/dist/components/ListPagination.d.ts +55 -0
  133. package/dist/components/ListPagination.js +2 -0
  134. package/dist/components/ListPagination.js.map +1 -0
  135. package/dist/components/Mark.cjs +2 -0
  136. package/dist/components/Mark.cjs.map +1 -0
  137. package/dist/components/Mark.d.cts +17 -0
  138. package/dist/components/Mark.d.ts +17 -0
  139. package/dist/components/Mark.js +2 -0
  140. package/dist/components/Mark.js.map +1 -0
  141. package/dist/components/MdOrDown.cjs +2 -0
  142. package/dist/components/MdOrDown.cjs.map +1 -0
  143. package/dist/components/MdOrDown.d.cts +8 -0
  144. package/dist/components/MdOrDown.d.ts +8 -0
  145. package/dist/components/MdOrDown.js +2 -0
  146. package/dist/components/MdOrDown.js.map +1 -0
  147. package/dist/components/MdOrUp.cjs +2 -0
  148. package/dist/components/MdOrUp.cjs.map +1 -0
  149. package/dist/components/MdOrUp.d.cts +8 -0
  150. package/dist/components/MdOrUp.d.ts +8 -0
  151. package/dist/components/MdOrUp.js +2 -0
  152. package/dist/components/MdOrUp.js.map +1 -0
  153. package/dist/components/Paper.cjs +2 -0
  154. package/dist/components/Paper.cjs.map +1 -0
  155. package/dist/components/Paper.d.cts +10 -0
  156. package/dist/components/Paper.d.ts +10 -0
  157. package/dist/components/Paper.js +2 -0
  158. package/dist/components/Paper.js.map +1 -0
  159. package/dist/components/PasswordTextField.cjs +2 -0
  160. package/dist/components/PasswordTextField.cjs.map +1 -0
  161. package/dist/components/PasswordTextField.d.cts +25 -0
  162. package/dist/components/PasswordTextField.d.ts +25 -0
  163. package/dist/components/PasswordTextField.js +2 -0
  164. package/dist/components/PasswordTextField.js.map +1 -0
  165. package/dist/components/SearchBoxDebouncer.cjs +2 -0
  166. package/dist/components/SearchBoxDebouncer.cjs.map +1 -0
  167. package/dist/components/SearchBoxDebouncer.d.cts +46 -0
  168. package/dist/components/SearchBoxDebouncer.d.ts +46 -0
  169. package/dist/components/SearchBoxDebouncer.js +2 -0
  170. package/dist/components/SearchBoxDebouncer.js.map +1 -0
  171. package/dist/components/SegmentedControl/SegmentedControl.cjs +2 -0
  172. package/dist/components/SegmentedControl/SegmentedControl.cjs.map +1 -0
  173. package/dist/components/SegmentedControl/SegmentedControl.d.cts +57 -0
  174. package/dist/components/SegmentedControl/SegmentedControl.d.ts +57 -0
  175. package/dist/components/SegmentedControl/SegmentedControl.js +2 -0
  176. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -0
  177. package/dist/components/SegmentedControl/components.cjs +2 -0
  178. package/dist/components/SegmentedControl/components.cjs.map +1 -0
  179. package/dist/components/SegmentedControl/components.js +2 -0
  180. package/dist/components/SegmentedControl/components.js.map +1 -0
  181. package/dist/components/SegmentedControl/index.d.cts +2 -0
  182. package/dist/components/SegmentedControl/index.d.ts +2 -0
  183. package/dist/components/Show.cjs +2 -0
  184. package/dist/components/Show.cjs.map +1 -0
  185. package/dist/components/Show.d.cts +10 -0
  186. package/dist/components/Show.d.ts +10 -0
  187. package/dist/components/Show.js +2 -0
  188. package/dist/components/Show.js.map +1 -0
  189. package/dist/components/SmOrDown.cjs +2 -0
  190. package/dist/components/SmOrDown.cjs.map +1 -0
  191. package/dist/components/SmOrDown.d.cts +8 -0
  192. package/dist/components/SmOrDown.d.ts +8 -0
  193. package/dist/components/SmOrDown.js +2 -0
  194. package/dist/components/SmOrDown.js.map +1 -0
  195. package/dist/components/SmOrUp.cjs +2 -0
  196. package/dist/components/SmOrUp.cjs.map +1 -0
  197. package/dist/components/SmOrUp.d.cts +8 -0
  198. package/dist/components/SmOrUp.d.ts +8 -0
  199. package/dist/components/SmOrUp.js +2 -0
  200. package/dist/components/SmOrUp.js.map +1 -0
  201. package/dist/components/Space.cjs +2 -0
  202. package/dist/components/Space.cjs.map +1 -0
  203. package/dist/components/Space.d.cts +14 -0
  204. package/dist/components/Space.d.ts +14 -0
  205. package/dist/components/Space.js +2 -0
  206. package/dist/components/Space.js.map +1 -0
  207. package/dist/components/Spoiler.cjs +2 -0
  208. package/dist/components/Spoiler.cjs.map +1 -0
  209. package/dist/components/Spoiler.d.cts +33 -0
  210. package/dist/components/Spoiler.d.ts +33 -0
  211. package/dist/components/Spoiler.js +2 -0
  212. package/dist/components/Spoiler.js.map +1 -0
  213. package/dist/components/XsOrDown.cjs +2 -0
  214. package/dist/components/XsOrDown.cjs.map +1 -0
  215. package/dist/components/XsOrDown.d.cts +8 -0
  216. package/dist/components/XsOrDown.d.ts +8 -0
  217. package/dist/components/XsOrDown.js +2 -0
  218. package/dist/components/XsOrDown.js.map +1 -0
  219. package/dist/components/YmTypography.cjs +2 -0
  220. package/dist/components/YmTypography.cjs.map +1 -0
  221. package/dist/components/YmTypography.d.cts +23 -0
  222. package/dist/components/YmTypography.d.ts +23 -0
  223. package/dist/components/YmTypography.js +2 -0
  224. package/dist/components/YmTypography.js.map +1 -0
  225. package/dist/components/YmdTextField.cjs +2 -0
  226. package/dist/components/YmdTextField.cjs.map +1 -0
  227. package/dist/components/YmdTextField.d.cts +48 -0
  228. package/dist/components/YmdTextField.d.ts +48 -0
  229. package/dist/components/YmdTextField.js +2 -0
  230. package/dist/components/YmdTextField.js.map +1 -0
  231. package/dist/components/YmdTypography.cjs +2 -0
  232. package/dist/components/YmdTypography.cjs.map +1 -0
  233. package/dist/components/YmdTypography.d.cts +23 -0
  234. package/dist/components/YmdTypography.d.ts +23 -0
  235. package/dist/components/YmdTypography.js +2 -0
  236. package/dist/components/YmdTypography.js.map +1 -0
  237. package/dist/components/absolute-box/create-absolute-box.cjs +2 -0
  238. package/dist/components/absolute-box/create-absolute-box.cjs.map +1 -0
  239. package/dist/components/absolute-box/create-absolute-box.js +2 -0
  240. package/dist/components/absolute-box/create-absolute-box.js.map +1 -0
  241. package/dist/components/bottom-absolute/BottomAbsolute.cjs +2 -0
  242. package/dist/components/bottom-absolute/BottomAbsolute.cjs.map +1 -0
  243. package/dist/components/bottom-absolute/BottomAbsolute.d.cts +20 -0
  244. package/dist/components/bottom-absolute/BottomAbsolute.d.ts +20 -0
  245. package/dist/components/bottom-absolute/BottomAbsolute.js +2 -0
  246. package/dist/components/bottom-absolute/BottomAbsolute.js.map +1 -0
  247. package/dist/components/bottom-absolute/BottomAbsoluteCenter.cjs +2 -0
  248. package/dist/components/bottom-absolute/BottomAbsoluteCenter.cjs.map +1 -0
  249. package/dist/components/bottom-absolute/BottomAbsoluteCenter.d.cts +10 -0
  250. package/dist/components/bottom-absolute/BottomAbsoluteCenter.d.ts +10 -0
  251. package/dist/components/bottom-absolute/BottomAbsoluteCenter.js +2 -0
  252. package/dist/components/bottom-absolute/BottomAbsoluteCenter.js.map +1 -0
  253. package/dist/components/bottom-absolute/BottomAbsoluteLeft.cjs +2 -0
  254. package/dist/components/bottom-absolute/BottomAbsoluteLeft.cjs.map +1 -0
  255. package/dist/components/bottom-absolute/BottomAbsoluteLeft.d.cts +11 -0
  256. package/dist/components/bottom-absolute/BottomAbsoluteLeft.d.ts +11 -0
  257. package/dist/components/bottom-absolute/BottomAbsoluteLeft.js +2 -0
  258. package/dist/components/bottom-absolute/BottomAbsoluteLeft.js.map +1 -0
  259. package/dist/components/bottom-absolute/BottomAbsoluteRight.cjs +2 -0
  260. package/dist/components/bottom-absolute/BottomAbsoluteRight.cjs.map +1 -0
  261. package/dist/components/bottom-absolute/BottomAbsoluteRight.d.cts +11 -0
  262. package/dist/components/bottom-absolute/BottomAbsoluteRight.d.ts +11 -0
  263. package/dist/components/bottom-absolute/BottomAbsoluteRight.js +2 -0
  264. package/dist/components/bottom-absolute/BottomAbsoluteRight.js.map +1 -0
  265. package/dist/components/bottom-absolute/index.d.cts +5 -0
  266. package/dist/components/bottom-absolute/index.d.ts +5 -0
  267. package/dist/components/center-absolute/CenterAbsolute.cjs +2 -0
  268. package/dist/components/center-absolute/CenterAbsolute.cjs.map +1 -0
  269. package/dist/components/center-absolute/CenterAbsolute.d.cts +19 -0
  270. package/dist/components/center-absolute/CenterAbsolute.d.ts +19 -0
  271. package/dist/components/center-absolute/CenterAbsolute.js +2 -0
  272. package/dist/components/center-absolute/CenterAbsolute.js.map +1 -0
  273. package/dist/components/center-absolute/CenterAbsoluteCenter.cjs +2 -0
  274. package/dist/components/center-absolute/CenterAbsoluteCenter.cjs.map +1 -0
  275. package/dist/components/center-absolute/CenterAbsoluteCenter.d.cts +9 -0
  276. package/dist/components/center-absolute/CenterAbsoluteCenter.d.ts +9 -0
  277. package/dist/components/center-absolute/CenterAbsoluteCenter.js +2 -0
  278. package/dist/components/center-absolute/CenterAbsoluteCenter.js.map +1 -0
  279. package/dist/components/center-absolute/CenterAbsoluteLeft.cjs +2 -0
  280. package/dist/components/center-absolute/CenterAbsoluteLeft.cjs.map +1 -0
  281. package/dist/components/center-absolute/CenterAbsoluteLeft.d.cts +10 -0
  282. package/dist/components/center-absolute/CenterAbsoluteLeft.d.ts +10 -0
  283. package/dist/components/center-absolute/CenterAbsoluteLeft.js +2 -0
  284. package/dist/components/center-absolute/CenterAbsoluteLeft.js.map +1 -0
  285. package/dist/components/center-absolute/CenterAbsoluteRight.cjs +2 -0
  286. package/dist/components/center-absolute/CenterAbsoluteRight.cjs.map +1 -0
  287. package/dist/components/center-absolute/CenterAbsoluteRight.d.cts +10 -0
  288. package/dist/components/center-absolute/CenterAbsoluteRight.d.ts +10 -0
  289. package/dist/components/center-absolute/CenterAbsoluteRight.js +2 -0
  290. package/dist/components/center-absolute/CenterAbsoluteRight.js.map +1 -0
  291. package/dist/components/center-absolute/index.d.cts +5 -0
  292. package/dist/components/center-absolute/index.d.ts +5 -0
  293. package/dist/components/flex/FlexColumn.cjs +2 -0
  294. package/dist/components/flex/FlexColumn.cjs.map +1 -0
  295. package/dist/components/flex/FlexColumn.d.cts +23 -0
  296. package/dist/components/flex/FlexColumn.d.ts +23 -0
  297. package/dist/components/flex/FlexColumn.js +2 -0
  298. package/dist/components/flex/FlexColumn.js.map +1 -0
  299. package/dist/components/flex/FlexRow.cjs +2 -0
  300. package/dist/components/flex/FlexRow.cjs.map +1 -0
  301. package/dist/components/flex/FlexRow.d.cts +23 -0
  302. package/dist/components/flex/FlexRow.d.ts +23 -0
  303. package/dist/components/flex/FlexRow.js +2 -0
  304. package/dist/components/flex/FlexRow.js.map +1 -0
  305. package/dist/components/flex/index.d.cts +4 -0
  306. package/dist/components/flex/index.d.ts +4 -0
  307. package/dist/components/flex/types.d.cts +11 -0
  308. package/dist/components/flex/types.d.ts +11 -0
  309. package/dist/components/index.d.cts +69 -0
  310. package/dist/components/index.d.ts +69 -0
  311. package/dist/components/layout/create-layout-component.cjs +2 -0
  312. package/dist/components/layout/create-layout-component.cjs.map +1 -0
  313. package/dist/components/layout/create-layout-component.js +2 -0
  314. package/dist/components/layout/create-layout-component.js.map +1 -0
  315. package/dist/components/portlet/Portlet.cjs +2 -0
  316. package/dist/components/portlet/Portlet.cjs.map +1 -0
  317. package/dist/components/portlet/Portlet.d.cts +40 -0
  318. package/dist/components/portlet/Portlet.d.ts +40 -0
  319. package/dist/components/portlet/Portlet.js +2 -0
  320. package/dist/components/portlet/Portlet.js.map +1 -0
  321. package/dist/components/portlet/PortletContent.cjs +2 -0
  322. package/dist/components/portlet/PortletContent.cjs.map +1 -0
  323. package/dist/components/portlet/PortletContent.d.cts +21 -0
  324. package/dist/components/portlet/PortletContent.d.ts +21 -0
  325. package/dist/components/portlet/PortletContent.js +2 -0
  326. package/dist/components/portlet/PortletContent.js.map +1 -0
  327. package/dist/components/portlet/PortletFooter.cjs +2 -0
  328. package/dist/components/portlet/PortletFooter.cjs.map +1 -0
  329. package/dist/components/portlet/PortletFooter.d.cts +21 -0
  330. package/dist/components/portlet/PortletFooter.d.ts +21 -0
  331. package/dist/components/portlet/PortletFooter.js +2 -0
  332. package/dist/components/portlet/PortletFooter.js.map +1 -0
  333. package/dist/components/portlet/PortletHeader.cjs +2 -0
  334. package/dist/components/portlet/PortletHeader.cjs.map +1 -0
  335. package/dist/components/portlet/PortletHeader.d.cts +25 -0
  336. package/dist/components/portlet/PortletHeader.d.ts +25 -0
  337. package/dist/components/portlet/PortletHeader.js +2 -0
  338. package/dist/components/portlet/PortletHeader.js.map +1 -0
  339. package/dist/components/portlet/PortletLabel.cjs +2 -0
  340. package/dist/components/portlet/PortletLabel.cjs.map +1 -0
  341. package/dist/components/portlet/PortletLabel.d.cts +25 -0
  342. package/dist/components/portlet/PortletLabel.d.ts +25 -0
  343. package/dist/components/portlet/PortletLabel.js +2 -0
  344. package/dist/components/portlet/PortletLabel.js.map +1 -0
  345. package/dist/components/portlet/PortletTitle.cjs +2 -0
  346. package/dist/components/portlet/PortletTitle.cjs.map +1 -0
  347. package/dist/components/portlet/PortletTitle.d.cts +48 -0
  348. package/dist/components/portlet/PortletTitle.d.ts +48 -0
  349. package/dist/components/portlet/PortletTitle.js +2 -0
  350. package/dist/components/portlet/PortletTitle.js.map +1 -0
  351. package/dist/components/portlet/PortletToolbar.cjs +2 -0
  352. package/dist/components/portlet/PortletToolbar.cjs.map +1 -0
  353. package/dist/components/portlet/PortletToolbar.d.cts +19 -0
  354. package/dist/components/portlet/PortletToolbar.d.ts +19 -0
  355. package/dist/components/portlet/PortletToolbar.js +2 -0
  356. package/dist/components/portlet/PortletToolbar.js.map +1 -0
  357. package/dist/components/portlet/index.d.cts +8 -0
  358. package/dist/components/portlet/index.d.ts +8 -0
  359. package/dist/components/stack/StackColumn.cjs +2 -0
  360. package/dist/components/stack/StackColumn.cjs.map +1 -0
  361. package/dist/components/stack/StackColumn.d.cts +30 -0
  362. package/dist/components/stack/StackColumn.d.ts +30 -0
  363. package/dist/components/stack/StackColumn.js +2 -0
  364. package/dist/components/stack/StackColumn.js.map +1 -0
  365. package/dist/components/stack/StackRow.cjs +2 -0
  366. package/dist/components/stack/StackRow.cjs.map +1 -0
  367. package/dist/components/stack/StackRow.d.cts +29 -0
  368. package/dist/components/stack/StackRow.d.ts +29 -0
  369. package/dist/components/stack/StackRow.js +2 -0
  370. package/dist/components/stack/StackRow.js.map +1 -0
  371. package/dist/components/stack/index.d.cts +3 -0
  372. package/dist/components/stack/index.d.ts +3 -0
  373. package/dist/components/top-absolute/TopAbsolute.cjs +2 -0
  374. package/dist/components/top-absolute/TopAbsolute.cjs.map +1 -0
  375. package/dist/components/top-absolute/TopAbsolute.d.cts +38 -0
  376. package/dist/components/top-absolute/TopAbsolute.d.ts +38 -0
  377. package/dist/components/top-absolute/TopAbsolute.js +2 -0
  378. package/dist/components/top-absolute/TopAbsolute.js.map +1 -0
  379. package/dist/components/top-absolute/TopAbsoluteCenter.cjs +2 -0
  380. package/dist/components/top-absolute/TopAbsoluteCenter.cjs.map +1 -0
  381. package/dist/components/top-absolute/TopAbsoluteCenter.d.cts +40 -0
  382. package/dist/components/top-absolute/TopAbsoluteCenter.d.ts +40 -0
  383. package/dist/components/top-absolute/TopAbsoluteCenter.js +2 -0
  384. package/dist/components/top-absolute/TopAbsoluteCenter.js.map +1 -0
  385. package/dist/components/top-absolute/TopAbsoluteLeft.cjs +2 -0
  386. package/dist/components/top-absolute/TopAbsoluteLeft.cjs.map +1 -0
  387. package/dist/components/top-absolute/TopAbsoluteLeft.d.cts +46 -0
  388. package/dist/components/top-absolute/TopAbsoluteLeft.d.ts +46 -0
  389. package/dist/components/top-absolute/TopAbsoluteLeft.js +2 -0
  390. package/dist/components/top-absolute/TopAbsoluteLeft.js.map +1 -0
  391. package/dist/components/top-absolute/TopAbsoluteRight.cjs +2 -0
  392. package/dist/components/top-absolute/TopAbsoluteRight.cjs.map +1 -0
  393. package/dist/components/top-absolute/TopAbsoluteRight.d.cts +46 -0
  394. package/dist/components/top-absolute/TopAbsoluteRight.d.ts +46 -0
  395. package/dist/components/top-absolute/TopAbsoluteRight.js +2 -0
  396. package/dist/components/top-absolute/TopAbsoluteRight.js.map +1 -0
  397. package/dist/components/top-absolute/index.d.cts +5 -0
  398. package/dist/components/top-absolute/index.d.ts +5 -0
  399. package/dist/eventemitter/eventemitter3.cjs +2 -0
  400. package/dist/eventemitter/eventemitter3.cjs.map +1 -0
  401. package/dist/eventemitter/eventemitter3.d.cts +53 -0
  402. package/dist/eventemitter/eventemitter3.d.ts +53 -0
  403. package/dist/eventemitter/eventemitter3.js +2 -0
  404. package/dist/eventemitter/eventemitter3.js.map +1 -0
  405. package/dist/eventemitter/types.d.cts +17 -0
  406. package/dist/eventemitter/types.d.ts +17 -0
  407. package/dist/file-drop/handle-file-tree-drop.cjs +2 -0
  408. package/dist/file-drop/handle-file-tree-drop.cjs.map +1 -0
  409. package/dist/file-drop/handle-file-tree-drop.d.cts +46 -0
  410. package/dist/file-drop/handle-file-tree-drop.d.ts +46 -0
  411. package/dist/file-drop/handle-file-tree-drop.js +2 -0
  412. package/dist/file-drop/handle-file-tree-drop.js.map +1 -0
  413. package/dist/file-drop/index.cjs +1 -2
  414. package/dist/file-drop/index.d.cts +7 -749
  415. package/dist/file-drop/index.d.ts +7 -749
  416. package/dist/file-drop/index.js +1 -2
  417. package/dist/file-drop/internal/debug-logger.cjs +2 -0
  418. package/dist/file-drop/internal/debug-logger.cjs.map +1 -0
  419. package/dist/file-drop/internal/debug-logger.js +2 -0
  420. package/dist/file-drop/internal/debug-logger.js.map +1 -0
  421. package/dist/file-drop/internal/path-util.cjs +2 -0
  422. package/dist/file-drop/internal/path-util.cjs.map +1 -0
  423. package/dist/file-drop/internal/path-util.d.cts +39 -0
  424. package/dist/file-drop/internal/path-util.d.ts +39 -0
  425. package/dist/file-drop/internal/path-util.js +2 -0
  426. package/dist/file-drop/internal/path-util.js.map +1 -0
  427. package/dist/file-drop/internal/traverse-tree.cjs +2 -0
  428. package/dist/file-drop/internal/traverse-tree.cjs.map +1 -0
  429. package/dist/file-drop/internal/traverse-tree.js +2 -0
  430. package/dist/file-drop/internal/traverse-tree.js.map +1 -0
  431. package/dist/file-drop/internal/util.cjs +2 -0
  432. package/dist/file-drop/internal/util.cjs.map +1 -0
  433. package/dist/file-drop/internal/util.js +2 -0
  434. package/dist/file-drop/internal/util.js.map +1 -0
  435. package/dist/file-drop/internal/visit-file-system/visit-file-system-entry.cjs +2 -0
  436. package/dist/file-drop/internal/visit-file-system/visit-file-system-entry.cjs.map +1 -0
  437. package/dist/file-drop/internal/visit-file-system/visit-file-system-entry.js +2 -0
  438. package/dist/file-drop/internal/visit-file-system/visit-file-system-entry.js.map +1 -0
  439. package/dist/file-drop/internal/visit-file-system/visit-file-system-handle.cjs +2 -0
  440. package/dist/file-drop/internal/visit-file-system/visit-file-system-handle.cjs.map +1 -0
  441. package/dist/file-drop/internal/visit-file-system/visit-file-system-handle.js +2 -0
  442. package/dist/file-drop/internal/visit-file-system/visit-file-system-handle.js.map +1 -0
  443. package/dist/file-drop/process-file-drop.cjs +2 -0
  444. package/dist/file-drop/process-file-drop.cjs.map +1 -0
  445. package/dist/file-drop/process-file-drop.d.cts +133 -0
  446. package/dist/file-drop/process-file-drop.d.ts +133 -0
  447. package/dist/file-drop/process-file-drop.js +2 -0
  448. package/dist/file-drop/process-file-drop.js.map +1 -0
  449. package/dist/file-drop/types.cjs +2 -0
  450. package/dist/file-drop/types.cjs.map +1 -0
  451. package/dist/file-drop/types.d.cts +489 -0
  452. package/dist/file-drop/types.d.ts +489 -0
  453. package/dist/file-drop/types.js +2 -0
  454. package/dist/file-drop/types.js.map +1 -0
  455. package/dist/file-drop/utils/file-utils.cjs +2 -0
  456. package/dist/file-drop/utils/file-utils.cjs.map +1 -0
  457. package/dist/file-drop/utils/file-utils.d.cts +31 -0
  458. package/dist/file-drop/utils/file-utils.d.ts +31 -0
  459. package/dist/file-drop/utils/file-utils.js +2 -0
  460. package/dist/file-drop/utils/file-utils.js.map +1 -0
  461. package/dist/file-drop/utils/filter.cjs +2 -0
  462. package/dist/file-drop/utils/filter.cjs.map +1 -0
  463. package/dist/file-drop/utils/filter.d.cts +25 -0
  464. package/dist/file-drop/utils/filter.d.ts +25 -0
  465. package/dist/file-drop/utils/filter.js +2 -0
  466. package/dist/file-drop/utils/filter.js.map +1 -0
  467. package/dist/file-drop/utils/parallel-map.cjs +2 -0
  468. package/dist/file-drop/utils/parallel-map.cjs.map +1 -0
  469. package/dist/file-drop/utils/parallel-map.js +2 -0
  470. package/dist/file-drop/utils/parallel-map.js.map +1 -0
  471. package/dist/file-drop/utils/progress-tracker.cjs +2 -0
  472. package/dist/file-drop/utils/progress-tracker.cjs.map +1 -0
  473. package/dist/file-drop/utils/progress-tracker.js +2 -0
  474. package/dist/file-drop/utils/progress-tracker.js.map +1 -0
  475. package/dist/helper/index.cjs +1 -2
  476. package/dist/helper/index.d.cts +3 -113
  477. package/dist/helper/index.d.ts +3 -113
  478. package/dist/helper/index.js +1 -2
  479. package/dist/helper/mui-css-vars.cjs +2 -0
  480. package/dist/helper/mui-css-vars.cjs.map +1 -0
  481. package/dist/helper/mui-css-vars.d.cts +62 -0
  482. package/dist/helper/mui-css-vars.d.ts +62 -0
  483. package/dist/helper/mui-css-vars.js +2 -0
  484. package/dist/helper/mui-css-vars.js.map +1 -0
  485. package/dist/helper/mui-media-queries.cjs +2 -0
  486. package/dist/helper/mui-media-queries.cjs.map +1 -0
  487. package/dist/helper/mui-media-queries.d.cts +38 -0
  488. package/dist/helper/mui-media-queries.d.ts +38 -0
  489. package/dist/helper/mui-media-queries.js +2 -0
  490. package/dist/helper/mui-media-queries.js.map +1 -0
  491. package/dist/hooks/index.cjs +1 -2
  492. package/dist/hooks/index.d.cts +69 -1373
  493. package/dist/hooks/index.d.ts +69 -1373
  494. package/dist/hooks/index.js +1 -2
  495. package/dist/hooks/types.d.cts +13 -0
  496. package/dist/hooks/types.d.ts +13 -0
  497. package/dist/hooks/useAbsolutePosition.cjs +2 -0
  498. package/dist/hooks/useAbsolutePosition.cjs.map +1 -0
  499. package/dist/hooks/useAbsolutePosition.d.cts +13 -0
  500. package/dist/hooks/useAbsolutePosition.d.ts +13 -0
  501. package/dist/hooks/useAbsolutePosition.js +2 -0
  502. package/dist/hooks/useAbsolutePosition.js.map +1 -0
  503. package/dist/hooks/useAudioUnlocked.cjs +2 -0
  504. package/dist/hooks/useAudioUnlocked.cjs.map +1 -0
  505. package/dist/hooks/useAudioUnlocked.d.cts +32 -0
  506. package/dist/hooks/useAudioUnlocked.d.ts +32 -0
  507. package/dist/hooks/useAudioUnlocked.js +2 -0
  508. package/dist/hooks/useAudioUnlocked.js.map +1 -0
  509. package/dist/hooks/useBehaviorSubject.cjs +2 -0
  510. package/dist/hooks/useBehaviorSubject.cjs.map +1 -0
  511. package/dist/hooks/useBehaviorSubject.d.cts +6 -0
  512. package/dist/hooks/useBehaviorSubject.d.ts +6 -0
  513. package/dist/hooks/useBehaviorSubject.js +2 -0
  514. package/dist/hooks/useBehaviorSubject.js.map +1 -0
  515. package/dist/hooks/useCallbackRef.cjs +2 -0
  516. package/dist/hooks/useCallbackRef.cjs.map +1 -0
  517. package/dist/hooks/useCallbackRef.d.cts +33 -0
  518. package/dist/hooks/useCallbackRef.d.ts +33 -0
  519. package/dist/hooks/useCallbackRef.js +2 -0
  520. package/dist/hooks/useCallbackRef.js.map +1 -0
  521. package/dist/hooks/useCenterInView.cjs +2 -0
  522. package/dist/hooks/useCenterInView.cjs.map +1 -0
  523. package/dist/hooks/useCenterInView.d.cts +29 -0
  524. package/dist/hooks/useCenterInView.d.ts +29 -0
  525. package/dist/hooks/useCenterInView.js +2 -0
  526. package/dist/hooks/useCenterInView.js.map +1 -0
  527. package/dist/hooks/useClipboard.cjs +2 -0
  528. package/dist/hooks/useClipboard.cjs.map +1 -0
  529. package/dist/hooks/useClipboard.d.cts +36 -0
  530. package/dist/hooks/useClipboard.d.ts +36 -0
  531. package/dist/hooks/useClipboard.js +2 -0
  532. package/dist/hooks/useClipboard.js.map +1 -0
  533. package/dist/hooks/useClosableEffect.cjs +2 -0
  534. package/dist/hooks/useClosableEffect.cjs.map +1 -0
  535. package/dist/hooks/useClosableEffect.d.cts +6 -0
  536. package/dist/hooks/useClosableEffect.d.ts +6 -0
  537. package/dist/hooks/useClosableEffect.js +2 -0
  538. package/dist/hooks/useClosableEffect.js.map +1 -0
  539. package/dist/hooks/useComposedRefs.cjs +2 -0
  540. package/dist/hooks/useComposedRefs.cjs.map +1 -0
  541. package/dist/hooks/useComposedRefs.d.cts +15 -0
  542. package/dist/hooks/useComposedRefs.d.ts +15 -0
  543. package/dist/hooks/useComposedRefs.js +2 -0
  544. package/dist/hooks/useComposedRefs.js.map +1 -0
  545. package/dist/hooks/useConstant.cjs +2 -0
  546. package/dist/hooks/useConstant.cjs.map +1 -0
  547. package/dist/hooks/useConstant.d.cts +4 -0
  548. package/dist/hooks/useConstant.d.ts +4 -0
  549. package/dist/hooks/useConstant.js +2 -0
  550. package/dist/hooks/useConstant.js.map +1 -0
  551. package/dist/hooks/useCooldown.cjs +2 -0
  552. package/dist/hooks/useCooldown.cjs.map +1 -0
  553. package/dist/hooks/useCooldown.d.cts +26 -0
  554. package/dist/hooks/useCooldown.d.ts +26 -0
  555. package/dist/hooks/useCooldown.js +2 -0
  556. package/dist/hooks/useCooldown.js.map +1 -0
  557. package/dist/hooks/useCustomCompareEffect.cjs +2 -0
  558. package/dist/hooks/useCustomCompareEffect.cjs.map +1 -0
  559. package/dist/hooks/useCustomCompareEffect.d.cts +55 -0
  560. package/dist/hooks/useCustomCompareEffect.d.ts +55 -0
  561. package/dist/hooks/useCustomCompareEffect.js +2 -0
  562. package/dist/hooks/useCustomCompareEffect.js.map +1 -0
  563. package/dist/hooks/useCustomCompareMemo.cjs +2 -0
  564. package/dist/hooks/useCustomCompareMemo.cjs.map +1 -0
  565. package/dist/hooks/useCustomCompareMemo.d.cts +14 -0
  566. package/dist/hooks/useCustomCompareMemo.d.ts +14 -0
  567. package/dist/hooks/useCustomCompareMemo.js +2 -0
  568. package/dist/hooks/useCustomCompareMemo.js.map +1 -0
  569. package/dist/hooks/useDebounceEffect.cjs +2 -0
  570. package/dist/hooks/useDebounceEffect.cjs.map +1 -0
  571. package/dist/hooks/useDebounceEffect.d.cts +55 -0
  572. package/dist/hooks/useDebounceEffect.d.ts +55 -0
  573. package/dist/hooks/useDebounceEffect.js +2 -0
  574. package/dist/hooks/useDebounceEffect.js.map +1 -0
  575. package/dist/hooks/useDebounceFn.cjs +2 -0
  576. package/dist/hooks/useDebounceFn.cjs.map +1 -0
  577. package/dist/hooks/useDebounceFn.d.cts +53 -0
  578. package/dist/hooks/useDebounceFn.d.ts +53 -0
  579. package/dist/hooks/useDebounceFn.js +2 -0
  580. package/dist/hooks/useDebounceFn.js.map +1 -0
  581. package/dist/hooks/useDebouncedCallback.cjs +2 -0
  582. package/dist/hooks/useDebouncedCallback.cjs.map +1 -0
  583. package/dist/hooks/useDebouncedCallback.d.cts +39 -0
  584. package/dist/hooks/useDebouncedCallback.d.ts +39 -0
  585. package/dist/hooks/useDebouncedCallback.js +2 -0
  586. package/dist/hooks/useDebouncedCallback.js.map +1 -0
  587. package/dist/hooks/useDebouncedParams.cjs +2 -0
  588. package/dist/hooks/useDebouncedParams.cjs.map +1 -0
  589. package/dist/hooks/useDebouncedParams.d.cts +43 -0
  590. package/dist/hooks/useDebouncedParams.d.ts +43 -0
  591. package/dist/hooks/useDebouncedParams.js +2 -0
  592. package/dist/hooks/useDebouncedParams.js.map +1 -0
  593. package/dist/hooks/useDebouncedState.cjs +2 -0
  594. package/dist/hooks/useDebouncedState.cjs.map +1 -0
  595. package/dist/hooks/useDebouncedState.d.cts +36 -0
  596. package/dist/hooks/useDebouncedState.d.ts +36 -0
  597. package/dist/hooks/useDebouncedState.js +2 -0
  598. package/dist/hooks/useDebouncedState.js.map +1 -0
  599. package/dist/hooks/useDebouncedValue.cjs +2 -0
  600. package/dist/hooks/useDebouncedValue.cjs.map +1 -0
  601. package/dist/hooks/useDebouncedValue.d.cts +23 -0
  602. package/dist/hooks/useDebouncedValue.d.ts +23 -0
  603. package/dist/hooks/useDebouncedValue.js +2 -0
  604. package/dist/hooks/useDebouncedValue.js.map +1 -0
  605. package/dist/hooks/useDeepCompareEffect.cjs +2 -0
  606. package/dist/hooks/useDeepCompareEffect.cjs.map +1 -0
  607. package/dist/hooks/useDeepCompareEffect.d.cts +50 -0
  608. package/dist/hooks/useDeepCompareEffect.d.ts +50 -0
  609. package/dist/hooks/useDeepCompareEffect.js +2 -0
  610. package/dist/hooks/useDeepCompareEffect.js.map +1 -0
  611. package/dist/hooks/useDeepCompareMemo.cjs +2 -0
  612. package/dist/hooks/useDeepCompareMemo.cjs.map +1 -0
  613. package/dist/hooks/useDeepCompareMemo.d.cts +13 -0
  614. package/dist/hooks/useDeepCompareMemo.d.ts +13 -0
  615. package/dist/hooks/useDeepCompareMemo.js +2 -0
  616. package/dist/hooks/useDeepCompareMemo.js.map +1 -0
  617. package/dist/hooks/useDidUpdate.cjs +2 -0
  618. package/dist/hooks/useDidUpdate.cjs.map +1 -0
  619. package/dist/hooks/useDidUpdate.d.cts +5 -0
  620. package/dist/hooks/useDidUpdate.d.ts +5 -0
  621. package/dist/hooks/useDidUpdate.js +2 -0
  622. package/dist/hooks/useDidUpdate.js.map +1 -0
  623. package/dist/hooks/useEffectOnce.cjs +2 -0
  624. package/dist/hooks/useEffectOnce.cjs.map +1 -0
  625. package/dist/hooks/useEffectOnce.d.cts +28 -0
  626. package/dist/hooks/useEffectOnce.d.ts +28 -0
  627. package/dist/hooks/useEffectOnce.js +2 -0
  628. package/dist/hooks/useEffectOnce.js.map +1 -0
  629. package/dist/hooks/useElementSize.cjs +2 -0
  630. package/dist/hooks/useElementSize.cjs.map +1 -0
  631. package/dist/hooks/useElementSize.d.cts +30 -0
  632. package/dist/hooks/useElementSize.d.ts +30 -0
  633. package/dist/hooks/useElementSize.js +2 -0
  634. package/dist/hooks/useElementSize.js.map +1 -0
  635. package/dist/hooks/useEventListener.cjs +2 -0
  636. package/dist/hooks/useEventListener.cjs.map +1 -0
  637. package/dist/hooks/useEventListener.d.cts +4 -0
  638. package/dist/hooks/useEventListener.d.ts +4 -0
  639. package/dist/hooks/useEventListener.js +2 -0
  640. package/dist/hooks/useEventListener.js.map +1 -0
  641. package/dist/hooks/useId.cjs +2 -0
  642. package/dist/hooks/useId.cjs.map +1 -0
  643. package/dist/hooks/useId.d.cts +13 -0
  644. package/dist/hooks/useId.d.ts +13 -0
  645. package/dist/hooks/useId.js +2 -0
  646. package/dist/hooks/useId.js.map +1 -0
  647. package/dist/hooks/useIdle.cjs +2 -0
  648. package/dist/hooks/useIdle.cjs.map +1 -0
  649. package/dist/hooks/useIdle.d.cts +49 -0
  650. package/dist/hooks/useIdle.d.ts +49 -0
  651. package/dist/hooks/useIdle.js +2 -0
  652. package/dist/hooks/useIdle.js.map +1 -0
  653. package/dist/hooks/useImageLoadCallback.cjs +2 -0
  654. package/dist/hooks/useImageLoadCallback.cjs.map +1 -0
  655. package/dist/hooks/useImageLoadCallback.d.cts +44 -0
  656. package/dist/hooks/useImageLoadCallback.d.ts +44 -0
  657. package/dist/hooks/useImageLoadCallback.js +2 -0
  658. package/dist/hooks/useImageLoadCallback.js.map +1 -0
  659. package/dist/hooks/useImageUpload.cjs +2 -0
  660. package/dist/hooks/useImageUpload.cjs.map +1 -0
  661. package/dist/hooks/useImageUpload.d.cts +92 -0
  662. package/dist/hooks/useImageUpload.d.ts +92 -0
  663. package/dist/hooks/useImageUpload.js +2 -0
  664. package/dist/hooks/useImageUpload.js.map +1 -0
  665. package/dist/hooks/useInterval.cjs +2 -0
  666. package/dist/hooks/useInterval.cjs.map +1 -0
  667. package/dist/hooks/useInterval.d.cts +52 -0
  668. package/dist/hooks/useInterval.d.ts +52 -0
  669. package/dist/hooks/useInterval.js +2 -0
  670. package/dist/hooks/useInterval.js.map +1 -0
  671. package/dist/hooks/useIsomorphicEffect.cjs +2 -0
  672. package/dist/hooks/useIsomorphicEffect.cjs.map +1 -0
  673. package/dist/hooks/useIsomorphicEffect.d.cts +26 -0
  674. package/dist/hooks/useIsomorphicEffect.d.ts +26 -0
  675. package/dist/hooks/useIsomorphicEffect.js +2 -0
  676. package/dist/hooks/useIsomorphicEffect.js.map +1 -0
  677. package/dist/hooks/useLatest.cjs +2 -0
  678. package/dist/hooks/useLatest.cjs.map +1 -0
  679. package/dist/hooks/useLatest.d.cts +4 -0
  680. package/dist/hooks/useLatest.d.ts +4 -0
  681. package/dist/hooks/useLatest.js +2 -0
  682. package/dist/hooks/useLatest.js.map +1 -0
  683. package/dist/hooks/useLgOrUp.cjs +2 -0
  684. package/dist/hooks/useLgOrUp.cjs.map +1 -0
  685. package/dist/hooks/useLgOrUp.d.cts +5 -0
  686. package/dist/hooks/useLgOrUp.d.ts +5 -0
  687. package/dist/hooks/useLgOrUp.js +2 -0
  688. package/dist/hooks/useLgOrUp.js.map +1 -0
  689. package/dist/hooks/useLifecycleLogger.cjs +2 -0
  690. package/dist/hooks/useLifecycleLogger.cjs.map +1 -0
  691. package/dist/hooks/useLifecycleLogger.d.cts +11 -0
  692. package/dist/hooks/useLifecycleLogger.d.ts +11 -0
  693. package/dist/hooks/useLifecycleLogger.js +2 -0
  694. package/dist/hooks/useLifecycleLogger.js.map +1 -0
  695. package/dist/hooks/useLoadingVisible.cjs +2 -0
  696. package/dist/hooks/useLoadingVisible.cjs.map +1 -0
  697. package/dist/hooks/useLoadingVisible.d.cts +32 -0
  698. package/dist/hooks/useLoadingVisible.d.ts +32 -0
  699. package/dist/hooks/useLoadingVisible.js +2 -0
  700. package/dist/hooks/useLoadingVisible.js.map +1 -0
  701. package/dist/hooks/useLocalStorage.cjs +2 -0
  702. package/dist/hooks/useLocalStorage.cjs.map +1 -0
  703. package/dist/hooks/useLocalStorage.d.cts +12 -0
  704. package/dist/hooks/useLocalStorage.d.ts +12 -0
  705. package/dist/hooks/useLocalStorage.js +2 -0
  706. package/dist/hooks/useLocalStorage.js.map +1 -0
  707. package/dist/hooks/useLocalStorageState.cjs +2 -0
  708. package/dist/hooks/useLocalStorageState.cjs.map +1 -0
  709. package/dist/hooks/useLocalStorageState.d.cts +9 -0
  710. package/dist/hooks/useLocalStorageState.d.ts +9 -0
  711. package/dist/hooks/useLocalStorageState.js +2 -0
  712. package/dist/hooks/useLocalStorageState.js.map +1 -0
  713. package/dist/hooks/useMdOrDown.cjs +2 -0
  714. package/dist/hooks/useMdOrDown.cjs.map +1 -0
  715. package/dist/hooks/useMdOrDown.d.cts +5 -0
  716. package/dist/hooks/useMdOrDown.d.ts +5 -0
  717. package/dist/hooks/useMdOrDown.js +2 -0
  718. package/dist/hooks/useMdOrDown.js.map +1 -0
  719. package/dist/hooks/useMdOrUp.cjs +2 -0
  720. package/dist/hooks/useMdOrUp.cjs.map +1 -0
  721. package/dist/hooks/useMdOrUp.d.cts +5 -0
  722. package/dist/hooks/useMdOrUp.d.ts +5 -0
  723. package/dist/hooks/useMdOrUp.js +2 -0
  724. package/dist/hooks/useMdOrUp.js.map +1 -0
  725. package/dist/hooks/useMount.cjs +2 -0
  726. package/dist/hooks/useMount.cjs.map +1 -0
  727. package/dist/hooks/useMount.d.cts +27 -0
  728. package/dist/hooks/useMount.d.ts +27 -0
  729. package/dist/hooks/useMount.js +2 -0
  730. package/dist/hooks/useMount.js.map +1 -0
  731. package/dist/hooks/useMounted.cjs +2 -0
  732. package/dist/hooks/useMounted.cjs.map +1 -0
  733. package/dist/hooks/useMounted.d.cts +24 -0
  734. package/dist/hooks/useMounted.d.ts +24 -0
  735. package/dist/hooks/useMounted.js +2 -0
  736. package/dist/hooks/useMounted.js.map +1 -0
  737. package/dist/hooks/useMountedState.cjs +2 -0
  738. package/dist/hooks/useMountedState.cjs.map +1 -0
  739. package/dist/hooks/useMountedState.d.cts +38 -0
  740. package/dist/hooks/useMountedState.d.ts +38 -0
  741. package/dist/hooks/useMountedState.js +2 -0
  742. package/dist/hooks/useMountedState.js.map +1 -0
  743. package/dist/hooks/useMutationObserver.cjs +2 -0
  744. package/dist/hooks/useMutationObserver.cjs.map +1 -0
  745. package/dist/hooks/useMutationObserver.d.cts +28 -0
  746. package/dist/hooks/useMutationObserver.d.ts +28 -0
  747. package/dist/hooks/useMutationObserver.js +2 -0
  748. package/dist/hooks/useMutationObserver.js.map +1 -0
  749. package/dist/hooks/useObservable.cjs +2 -0
  750. package/dist/hooks/useObservable.cjs.map +1 -0
  751. package/dist/hooks/useObservable.d.cts +6 -0
  752. package/dist/hooks/useObservable.d.ts +7 -0
  753. package/dist/hooks/useObservable.js +2 -0
  754. package/dist/hooks/useObservable.js.map +1 -0
  755. package/dist/hooks/useObservableLocalStorage.cjs +2 -0
  756. package/dist/hooks/useObservableLocalStorage.cjs.map +1 -0
  757. package/dist/hooks/useObservableLocalStorage.d.cts +6 -0
  758. package/dist/hooks/useObservableLocalStorage.d.ts +6 -0
  759. package/dist/hooks/useObservableLocalStorage.js +2 -0
  760. package/dist/hooks/useObservableLocalStorage.js.map +1 -0
  761. package/dist/hooks/useObservableSessionStorage.cjs +2 -0
  762. package/dist/hooks/useObservableSessionStorage.cjs.map +1 -0
  763. package/dist/hooks/useObservableSessionStorage.d.cts +6 -0
  764. package/dist/hooks/useObservableSessionStorage.d.ts +6 -0
  765. package/dist/hooks/useObservableSessionStorage.js +2 -0
  766. package/dist/hooks/useObservableSessionStorage.js.map +1 -0
  767. package/dist/hooks/useOs.cjs +2 -0
  768. package/dist/hooks/useOs.cjs.map +1 -0
  769. package/dist/hooks/useOs.d.cts +8 -0
  770. package/dist/hooks/useOs.d.ts +8 -0
  771. package/dist/hooks/useOs.js +2 -0
  772. package/dist/hooks/useOs.js.map +1 -0
  773. package/dist/hooks/useRafState.cjs +2 -0
  774. package/dist/hooks/useRafState.cjs.map +1 -0
  775. package/dist/hooks/useRafState.d.cts +5 -0
  776. package/dist/hooks/useRafState.d.ts +5 -0
  777. package/dist/hooks/useRafState.js +2 -0
  778. package/dist/hooks/useRafState.js.map +1 -0
  779. package/dist/hooks/useRefEffect.cjs +2 -0
  780. package/dist/hooks/useRefEffect.cjs.map +1 -0
  781. package/dist/hooks/useRefEffect.d.cts +27 -0
  782. package/dist/hooks/useRefEffect.d.ts +27 -0
  783. package/dist/hooks/useRefEffect.js +2 -0
  784. package/dist/hooks/useRefEffect.js.map +1 -0
  785. package/dist/hooks/useResizeObserver.cjs +2 -0
  786. package/dist/hooks/useResizeObserver.cjs.map +1 -0
  787. package/dist/hooks/useResizeObserver.d.cts +26 -0
  788. package/dist/hooks/useResizeObserver.d.ts +26 -0
  789. package/dist/hooks/useResizeObserver.js +2 -0
  790. package/dist/hooks/useResizeObserver.js.map +1 -0
  791. package/dist/hooks/useScript.cjs +2 -0
  792. package/dist/hooks/useScript.cjs.map +1 -0
  793. package/dist/hooks/useScript.d.cts +7 -0
  794. package/dist/hooks/useScript.d.ts +7 -0
  795. package/dist/hooks/useScript.js +2 -0
  796. package/dist/hooks/useScript.js.map +1 -0
  797. package/dist/hooks/useSessionStorage.cjs +2 -0
  798. package/dist/hooks/useSessionStorage.cjs.map +1 -0
  799. package/dist/hooks/useSessionStorage.d.cts +21 -0
  800. package/dist/hooks/useSessionStorage.d.ts +21 -0
  801. package/dist/hooks/useSessionStorage.js +2 -0
  802. package/dist/hooks/useSessionStorage.js.map +1 -0
  803. package/dist/hooks/useSessionStorageState.cjs +2 -0
  804. package/dist/hooks/useSessionStorageState.cjs.map +1 -0
  805. package/dist/hooks/useSessionStorageState.d.cts +9 -0
  806. package/dist/hooks/useSessionStorageState.d.ts +9 -0
  807. package/dist/hooks/useSessionStorageState.js +2 -0
  808. package/dist/hooks/useSessionStorageState.js.map +1 -0
  809. package/dist/hooks/useSmOrDown.cjs +2 -0
  810. package/dist/hooks/useSmOrDown.cjs.map +1 -0
  811. package/dist/hooks/useSmOrDown.d.cts +5 -0
  812. package/dist/hooks/useSmOrDown.d.ts +5 -0
  813. package/dist/hooks/useSmOrDown.js +2 -0
  814. package/dist/hooks/useSmOrDown.js.map +1 -0
  815. package/dist/hooks/useSmOrUp.cjs +2 -0
  816. package/dist/hooks/useSmOrUp.cjs.map +1 -0
  817. package/dist/hooks/useSmOrUp.d.cts +5 -0
  818. package/dist/hooks/useSmOrUp.d.ts +5 -0
  819. package/dist/hooks/useSmOrUp.js +2 -0
  820. package/dist/hooks/useSmOrUp.js.map +1 -0
  821. package/dist/hooks/useThrottledCallback.cjs +2 -0
  822. package/dist/hooks/useThrottledCallback.cjs.map +1 -0
  823. package/dist/hooks/useThrottledCallback.d.cts +24 -0
  824. package/dist/hooks/useThrottledCallback.d.ts +24 -0
  825. package/dist/hooks/useThrottledCallback.js +2 -0
  826. package/dist/hooks/useThrottledCallback.js.map +1 -0
  827. package/dist/hooks/useThrottledCallbackWithClearTimeout.cjs +2 -0
  828. package/dist/hooks/useThrottledCallbackWithClearTimeout.cjs.map +1 -0
  829. package/dist/hooks/useThrottledCallbackWithClearTimeout.d.cts +30 -0
  830. package/dist/hooks/useThrottledCallbackWithClearTimeout.d.ts +30 -0
  831. package/dist/hooks/useThrottledCallbackWithClearTimeout.js +2 -0
  832. package/dist/hooks/useThrottledCallbackWithClearTimeout.js.map +1 -0
  833. package/dist/hooks/useThrottledState.cjs +2 -0
  834. package/dist/hooks/useThrottledState.cjs.map +1 -0
  835. package/dist/hooks/useThrottledState.d.cts +31 -0
  836. package/dist/hooks/useThrottledState.d.ts +31 -0
  837. package/dist/hooks/useThrottledState.js +2 -0
  838. package/dist/hooks/useThrottledState.js.map +1 -0
  839. package/dist/hooks/useThrottledValue.cjs +2 -0
  840. package/dist/hooks/useThrottledValue.cjs.map +1 -0
  841. package/dist/hooks/useThrottledValue.d.cts +21 -0
  842. package/dist/hooks/useThrottledValue.d.ts +21 -0
  843. package/dist/hooks/useThrottledValue.js +2 -0
  844. package/dist/hooks/useThrottledValue.js.map +1 -0
  845. package/dist/hooks/useTimeout.cjs +2 -0
  846. package/dist/hooks/useTimeout.cjs.map +1 -0
  847. package/dist/hooks/useTimeout.d.cts +38 -0
  848. package/dist/hooks/useTimeout.d.ts +38 -0
  849. package/dist/hooks/useTimeout.js +2 -0
  850. package/dist/hooks/useTimeout.js.map +1 -0
  851. package/dist/hooks/useTimeoutData.cjs +2 -0
  852. package/dist/hooks/useTimeoutData.cjs.map +1 -0
  853. package/dist/hooks/useTimeoutData.d.cts +7 -0
  854. package/dist/hooks/useTimeoutData.d.ts +7 -0
  855. package/dist/hooks/useTimeoutData.js +2 -0
  856. package/dist/hooks/useTimeoutData.js.map +1 -0
  857. package/dist/hooks/useUncontrolled.cjs +2 -0
  858. package/dist/hooks/useUncontrolled.cjs.map +1 -0
  859. package/dist/hooks/useUncontrolled.d.cts +47 -0
  860. package/dist/hooks/useUncontrolled.d.ts +47 -0
  861. package/dist/hooks/useUncontrolled.js +2 -0
  862. package/dist/hooks/useUncontrolled.js.map +1 -0
  863. package/dist/hooks/useUnmount.cjs +2 -0
  864. package/dist/hooks/useUnmount.cjs.map +1 -0
  865. package/dist/hooks/useUnmount.d.cts +4 -0
  866. package/dist/hooks/useUnmount.d.ts +4 -0
  867. package/dist/hooks/useUnmount.js +2 -0
  868. package/dist/hooks/useUnmount.js.map +1 -0
  869. package/dist/hooks/useUpdate.cjs +2 -0
  870. package/dist/hooks/useUpdate.cjs.map +1 -0
  871. package/dist/hooks/useUpdate.d.cts +4 -0
  872. package/dist/hooks/useUpdate.d.ts +4 -0
  873. package/dist/hooks/useUpdate.js +2 -0
  874. package/dist/hooks/useUpdate.js.map +1 -0
  875. package/dist/hooks/useUpdateEffect.cjs +2 -0
  876. package/dist/hooks/useUpdateEffect.cjs.map +1 -0
  877. package/dist/hooks/useUpdateEffect.d.cts +5 -0
  878. package/dist/hooks/useUpdateEffect.d.ts +5 -0
  879. package/dist/hooks/useUpdateEffect.js +2 -0
  880. package/dist/hooks/useUpdateEffect.js.map +1 -0
  881. package/dist/hooks/useUpdateLayoutEffect.cjs +2 -0
  882. package/dist/hooks/useUpdateLayoutEffect.cjs.map +1 -0
  883. package/dist/hooks/useUpdateLayoutEffect.d.cts +5 -0
  884. package/dist/hooks/useUpdateLayoutEffect.d.ts +5 -0
  885. package/dist/hooks/useUpdateLayoutEffect.js +2 -0
  886. package/dist/hooks/useUpdateLayoutEffect.js.map +1 -0
  887. package/dist/hooks/useWindowEvent.cjs +2 -0
  888. package/dist/hooks/useWindowEvent.cjs.map +1 -0
  889. package/dist/hooks/useWindowEvent.d.cts +24 -0
  890. package/dist/hooks/useWindowEvent.d.ts +24 -0
  891. package/dist/hooks/useWindowEvent.js +2 -0
  892. package/dist/hooks/useWindowEvent.js.map +1 -0
  893. package/dist/hooks/useWindowSize.cjs +2 -0
  894. package/dist/hooks/useWindowSize.cjs.map +1 -0
  895. package/dist/hooks/useWindowSize.d.cts +12 -0
  896. package/dist/hooks/useWindowSize.d.ts +12 -0
  897. package/dist/hooks/useWindowSize.js +2 -0
  898. package/dist/hooks/useWindowSize.js.map +1 -0
  899. package/dist/hooks/useXsOrDown.cjs +2 -0
  900. package/dist/hooks/useXsOrDown.cjs.map +1 -0
  901. package/dist/hooks/useXsOrDown.d.cts +5 -0
  902. package/dist/hooks/useXsOrDown.d.ts +5 -0
  903. package/dist/hooks/useXsOrDown.js +2 -0
  904. package/dist/hooks/useXsOrDown.js.map +1 -0
  905. package/dist/index.cjs +1 -2
  906. package/dist/index.d.cts +65 -1058
  907. package/dist/index.d.ts +65 -1058
  908. package/dist/index.js +1 -2
  909. package/dist/misc/debounce.cjs +2 -0
  910. package/dist/misc/debounce.cjs.map +1 -0
  911. package/dist/misc/debounce.js +2 -0
  912. package/dist/misc/debounce.js.map +1 -0
  913. package/dist/misc/deepEq.cjs +2 -0
  914. package/dist/misc/deepEq.cjs.map +1 -0
  915. package/dist/misc/deepEq.js +2 -0
  916. package/dist/misc/deepEq.js.map +1 -0
  917. package/dist/persistence/codec.cjs +2 -0
  918. package/dist/persistence/codec.cjs.map +1 -0
  919. package/dist/persistence/codec.d.cts +21 -0
  920. package/dist/persistence/codec.d.ts +21 -0
  921. package/dist/persistence/codec.js +2 -0
  922. package/dist/persistence/codec.js.map +1 -0
  923. package/dist/persistence/index.d.cts +2 -0
  924. package/dist/persistence/index.d.ts +2 -0
  925. package/dist/persistence/useStorageState.cjs +2 -0
  926. package/dist/persistence/useStorageState.cjs.map +1 -0
  927. package/dist/persistence/useStorageState.d.cts +39 -0
  928. package/dist/persistence/useStorageState.d.ts +39 -0
  929. package/dist/persistence/useStorageState.js +2 -0
  930. package/dist/persistence/useStorageState.js.map +1 -0
  931. package/dist/util/closables.cjs +2 -0
  932. package/dist/util/closables.cjs.map +1 -0
  933. package/dist/util/closables.d.cts +69 -0
  934. package/dist/util/closables.d.ts +69 -0
  935. package/dist/util/closables.js +2 -0
  936. package/dist/util/closables.js.map +1 -0
  937. package/dist/util/event-utils.cjs +2 -0
  938. package/dist/util/event-utils.cjs.map +1 -0
  939. package/dist/util/event-utils.d.cts +12 -0
  940. package/dist/util/event-utils.d.ts +12 -0
  941. package/dist/util/event-utils.js +2 -0
  942. package/dist/util/event-utils.js.map +1 -0
  943. package/dist/util/internal-util.cjs +2 -0
  944. package/dist/util/internal-util.cjs.map +1 -0
  945. package/dist/util/internal-util.js +2 -0
  946. package/dist/util/internal-util.js.map +1 -0
  947. package/dist/util/misc-utils.cjs +2 -0
  948. package/dist/util/misc-utils.cjs.map +1 -0
  949. package/dist/util/misc-utils.d.cts +15 -0
  950. package/dist/util/misc-utils.d.ts +15 -0
  951. package/dist/util/misc-utils.js +2 -0
  952. package/dist/util/misc-utils.js.map +1 -0
  953. package/dist/util/override-props.cjs +2 -0
  954. package/dist/util/override-props.cjs.map +1 -0
  955. package/dist/util/override-props.js +2 -0
  956. package/dist/util/override-props.js.map +1 -0
  957. package/dist/util/sx-props.cjs +2 -0
  958. package/dist/util/sx-props.cjs.map +1 -0
  959. package/dist/util/sx-props.d.cts +22 -0
  960. package/dist/util/sx-props.d.ts +22 -0
  961. package/dist/util/sx-props.js +2 -0
  962. package/dist/util/sx-props.js.map +1 -0
  963. package/dist/util/ymd-date.cjs +2 -0
  964. package/dist/util/ymd-date.cjs.map +1 -0
  965. package/dist/util/ymd-date.js +2 -0
  966. package/dist/util/ymd-date.js.map +1 -0
  967. package/llm.txt +356 -0
  968. package/package.json +29 -28
  969. package/dist/chunk-2OEB5VHZ.js +0 -2
  970. package/dist/chunk-2OEB5VHZ.js.map +0 -1
  971. package/dist/chunk-4C666HHU.js +0 -2
  972. package/dist/chunk-4C666HHU.js.map +0 -1
  973. package/dist/chunk-M4G6J7DP.cjs +0 -2
  974. package/dist/chunk-M4G6J7DP.cjs.map +0 -1
  975. package/dist/chunk-QNR3IXPA.cjs +0 -2
  976. package/dist/chunk-QNR3IXPA.cjs.map +0 -1
  977. package/dist/closables-BK0Db72u.d.cts +0 -135
  978. package/dist/closables-BK0Db72u.d.ts +0 -135
  979. package/dist/file-drop/index.cjs.map +0 -1
  980. package/dist/file-drop/index.js.map +0 -1
  981. package/dist/helper/index.cjs.map +0 -1
  982. package/dist/helper/index.js.map +0 -1
  983. package/dist/hooks/index.cjs.map +0 -1
  984. package/dist/hooks/index.js.map +0 -1
  985. package/dist/index.cjs.map +0 -1
  986. package/dist/index.js.map +0 -1
  987. package/dist/parallel-map-M764G6IE.js +0 -2
  988. package/dist/parallel-map-M764G6IE.js.map +0 -1
  989. package/dist/parallel-map-V2OVUIFQ.cjs +0 -2
  990. package/dist/parallel-map-V2OVUIFQ.cjs.map +0 -1
package/dist/index.js CHANGED
@@ -1,2 +1 @@
1
- import{A as Or,B as Vr,C as jr,a as T,b as ye,f as _,g as w,i as F,m as be,n as Ce,o as H,p as W,r as Pe,t as Er,u as Ir,v as Lr,w as Mr,x as Dr,y as Hr,z as Wr}from"./chunk-2OEB5VHZ.js";import"./chunk-4C666HHU.js";import{Box as ot}from"@mui/material";import{jsx as rt}from"react/jsx-runtime";function x(e){let t=(o=>{let{sx:r,ref:n,...s}=o,i;e.supportsFullWidth&&(i=s.fullWidth,delete s.fullWidth);let a={};for(let u of e.axes)a[u.cssProp]=s[u.cssProp]??u.defaultValue,delete s[u.cssProp];return rt(ot,{ref:n,sx:[{position:"absolute",...a,...e.fixedStyle,...i?{width:"100%"}:{}},...Array.isArray(r)?r:[r]],...s})});return t.displayName=e.displayName,t}var ge=x({displayName:"BottomAbsolute.Center",axes:[{cssProp:"bottom",defaultValue:0}],fixedStyle:{left:"50%",transform:"translate(-50%, -50%)"},supportsFullWidth:!0});var he=x({displayName:"BottomAbsolute.Left",axes:[{cssProp:"left",defaultValue:0},{cssProp:"bottom",defaultValue:0}],supportsFullWidth:!0});var Se=x({displayName:"BottomAbsolute.Right",axes:[{cssProp:"right",defaultValue:0},{cssProp:"bottom",defaultValue:0}],supportsFullWidth:!0});var nt=x({displayName:"BottomAbsolute",axes:[{cssProp:"bottom",defaultValue:0},{cssProp:"left",defaultValue:0},{cssProp:"right",defaultValue:0}],supportsFullWidth:!1}),Q=nt;Q.Left=he;Q.Right=Se;Q.Center=ge;import{Box as st}from"@mui/material";import{jsx as at}from"react/jsx-runtime";var it=({vertical:e=!1,sx:t,ref:o,...r})=>at(st,{ref:o,sx:[{display:"flex",flexDirection:e?"column":"row",alignItems:"center",justifyContent:"center"},...Array.isArray(t)?t:[t]],...r});it.displayName="Center";import{Button as lt}from"@mui/material";import{jsx as ut}from"react/jsx-runtime";var pt=({cooldown:e=1e3,onClick:t,disabled:o,ref:r,...n})=>{let{isCooldown:s,trigger:i}=T(t,e);return ut(lt,{...n,ref:r,onClick:i,disabled:o||s,children:n.children})};pt.displayName="CooldownButton";import{ButtonBase as mt}from"@mui/material";import{jsx as dt}from"react/jsx-runtime";var ct=({cooldown:e=1e3,onClick:t,disabled:o,ref:r,...n})=>{let{isCooldown:s,trigger:i}=T(t,e);return dt(mt,{...n,ref:r,onClick:i,disabled:o||s,children:n.children})};ct.displayName="CooldownButtonBase";import{IconButton as ft}from"@mui/material";import{jsx as yt}from"react/jsx-runtime";var xt=({cooldown:e=700,onClick:t,disabled:o,ref:r,...n})=>{let{isCooldown:s,trigger:i}=T(t,e);return yt(ft,{...n,ref:r,onClick:i,disabled:o||s,children:n.children})};xt.displayName="CooldownIconButton";import{Fragment as bt,jsx as Ct}from"react/jsx-runtime";function Pn(e){let{children:t,onCopySuccess:o,value:r,timeout:n=1e3}=e,s=ye({timeout:n});return Ct(bt,{children:t({copy:()=>{let a=typeof r=="function"?r():r;typeof a=="string"&&a.length>0&&s.copy(a).then(u=>{u&&o?.(a)})},copied:s.copied})})}import{TableBody as Pt}from"@mui/material";import gt from"clsx";import{jsx as ht}from"react/jsx-runtime";function Rn(e){let{sx:t,className:o,loading:r,stripe:n,...s}=e;return ht(Pt,{className:gt("CustomTableBody-root",o,{"CustomTableBody-stripe":!!n,"CustomTableBody-loading":!!r}),sx:[{"&.CustomTableBody-loading":{opacity:.5},"&.CustomTableBody-stripe":{"& .MuiTableRow-root:nth-of-type(even)":{backgroundColor:"action.hover"}}},...Array.isArray(t)?t:[t??!1]],...s})}var Be=x({displayName:"CenterAbsolute.Center",axes:[],fixedStyle:{top:"50%",left:"50%",transform:"translate(-50%, -50%)"},supportsFullWidth:!0});var Re=x({displayName:"CenterAbsolute.Left",axes:[{cssProp:"left",defaultValue:0}],fixedStyle:{top:"50%",transform:"translateY(-50%)"},supportsFullWidth:!0});var Te=x({displayName:"CenterAbsolute.Right",axes:[{cssProp:"right",defaultValue:0}],fixedStyle:{top:"50%",transform:"translateY(-50%)"},supportsFullWidth:!0});var St=x({displayName:"CenterAbsolute",axes:[{cssProp:"left",defaultValue:0},{cssProp:"right",defaultValue:0}],fixedStyle:{top:"50%",transform:"translateY(-50%)"},supportsFullWidth:!1}),X=St;X.Left=Re;X.Right=Te;X.Center=Be;import{Button as Bt}from"@mui/material";import{jsx as Rt}from"react/jsx-runtime";var Vn=({debounce:e=700,onClick:t,disabled:o,children:r,ref:n,...s})=>{let i=w(a=>{!o&&t&&t(a)},e);return Rt(Bt,{...s,ref:n,onClick:i,disabled:o,children:r})};import{ButtonBase as Tt}from"@mui/material";import{jsx as wt}from"react/jsx-runtime";var Gn=({debounce:e=700,onClick:t,disabled:o,children:r,ref:n,...s})=>{let i=w(a=>{!o&&t&&t(a)},e);return wt(Tt,{...s,ref:n,onClick:i,disabled:o,children:r})};import{IconButton as Ft}from"@mui/material";import{jsx as At}from"react/jsx-runtime";var Yn=({debounce:e=700,onClick:t,disabled:o,ref:r,...n})=>{let s=w(i=>{!o&&t&&t(i)},e);return At(Ft,{...n,ref:r,onClick:s,disabled:o,children:n.children})};import{useCallback as kt,useEffect as Nt,useRef as we,useState as vt}from"react";import{Fragment as Et,jsx as It}from"react/jsx-runtime";var es=({children:e,leading:t=!1,trailing:o=!0,maxWait:r=100})=>{let[n,s]=vt(t?e:void 0),i=we(null),a=we(null),u=kt(()=>{i.current&&clearTimeout(i.current)},[]);return Nt(()=>{let p=Date.now(),m=()=>{s(e),a.current=p};return t&&a.current===null&&m(),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{o&&m(),i.current=null},r),t&&a.current!==null&&p-(a.current||0)>=r&&m(),()=>{i.current&&clearTimeout(i.current)}},[e,t,o,r,u]),It(Et,{children:n})};import{useCallback as Fe,useEffect as Ae,useRef as Lt,useState as Mt}from"react";import{Fragment as Wt,jsx as Ht,jsxs as Ot}from"react/jsx-runtime";function ke(e,t){typeof e=="function"?e(t):typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}var Dt=(e=>{let{ref:t,onChange:o,children:r,multiple:n,accept:s,name:i,form:a,resetRef:u,disabled:p,capture:m,inputProps:d}=e,y=Lt(null),[f,l]=Mt(0),C=Fe(()=>{p||l(S=>S+1)},[p]);Ae(()=>{f!==0&&y.current?.click()},[f]);let P=S=>{let h=S.currentTarget?.files;if(h)if(n)o(Array.from(h));else{let g=h[0];g&&o(g)}},B=Fe(()=>{y.current&&(y.current.value="")},[]);return Ae(()=>{if(u)return ke(u,B),()=>{ke(u,()=>{})}},[u,B]),Ot(Wt,{children:[r({onClick:C}),Ht("input",{style:{display:"none"},type:"file",accept:s,multiple:n,onChange:P,ref:F(t,y),name:i,form:a,capture:m,...d})]})});Dt.displayName="FileButton";import{Grid as Y}from"@mui/material";import Vt from"clsx";function O(e){return typeof e>"u"||e===null}function Ne(e){return!O(e)}import{jsx as q}from"react/jsx-runtime";function jt(e){let{className:t,items:o,getItemKey:r,getItemSize:n,isLineBreakItem:s,breakBefore:i,breakAfter:a,children:u,lineBreakHeight:p,lineBreakGroup:m,...d}=e;return Array.isArray(o)?q(Y,{className:Vt("FlexItemsContainer-root",t),container:!0,role:"grid",...d,children:zt({items:o,isLineBreakItem:s,lineBreakGroup:m,lineBreakHeight:p,breakBefore:i,breakAfter:a,getItemKey:r,getItemSize:n,renderItem:u})}):(console.error("FlexItemsContainer: items must be an array"),null)}jt.displayName="FlexItemsContainer";function zt(e){let{items:t,getItemKey:o,getItemSize:r,isLineBreakItem:n,lineBreakHeight:s=0,lineBreakGroup:i,breakBefore:a,breakAfter:u,renderItem:p}=e,m=[],d=!0,y;return t.forEach((f,l)=>{if(n?.(f,l)){d||(d=!0,m.push(V(l,"break-item",s)));return}if(i){let C=i(f,l);Kt(y,C)&&(y=C,d||(d=!0,m.push(V(l,"group",s))))}!d&&a?.(f,l)&&(d=!0,m.push(V(l,"break-before",s))),d=!1,m.push(q(Y,{size:r?.(f,l),children:p(f,l)},o(f,l))),u?.(f,l)&&(d=!0,m.push(V(l,"break-after",s)))}),d&&m.length>0&&m.pop(),m}function Kt(e,t){return O(e)&&O(t)?!1:e!==t}function V(e,t,o){return q(Y,{className:"FlexItemsContainer-emptyLine",size:"auto",style:{flexBasis:"100%",width:0,height:o}},`FlexItemsContainer:${t}:${e}`)}import{Box as Gt}from"@mui/material";import Ut from"clsx";import{useRef as _t}from"react";import{useEffect as ve,useRef as J,useState as Ee}from"react";function A(e){return e?parseInt(e,10):0}function $t(e,t){if(!t||!e)return!1;let o=t.parentNode;for(;Ne(o);){if(o===e)return!0;o=o.parentNode}return!1}function Ie({target:e,parent:t,indicatorRef:o,excludeTargetBorderWidth:r=!1,displayAfterTransitionEnd:n=!1}){let s=J(-1),[i,a]=Ee(!1),[u,p]=Ee(n),m=_(()=>{if(!e||!t||!o.current)return;let l=e.getBoundingClientRect(),C=t.getBoundingClientRect(),P=window.getComputedStyle(e),B=window.getComputedStyle(t),S={top:A(B.borderTopWidth),left:A(B.borderLeftWidth)},h={top:A(P.borderTopWidth),bottom:A(P.borderBottomWidth),left:A(P.borderLeftWidth),right:A(P.borderRightWidth)},g={top:l.top-C.top-S.top,left:l.left-C.left-S.left,width:l.width,height:l.height};r&&(g.top+=h.top,g.left+=h.left,g.height-=h.top+h.bottom,g.width-=h.left+h.right),o.current.style.transform=`translateX(${g.left}px) translateY(${g.top}px)`,o.current.style.width=`${g.width}px`,o.current.style.height=`${g.height}px`}),d=_(()=>{window.clearTimeout(s.current),o.current&&(o.current.style.transitionDuration="0ms"),m.current(),s.current=window.setTimeout(()=>{o.current&&(o.current.style.transitionDuration="")},30)}),y=J(null),f=J(null);return ve(()=>{if(m.current(),e)return y.current=new ResizeObserver(d.current),y.current.observe(e),t&&(f.current=new ResizeObserver(d.current),f.current.observe(t)),()=>{y.current?.disconnect(),f.current?.disconnect()}},[t,e,m,d]),ve(()=>{if(t){let l=C=>{$t(C.target,t)&&(d.current(),p(!1))};return t.addEventListener("transitionend",l),()=>{t.removeEventListener("transitionend",l)}}},[t,d]),Ce(()=>{a(!0)},20,{autoInvoke:!0}),be(l=>{l.forEach(C=>{C.type==="attributes"&&C.attributeName==="dir"&&d.current()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:i,hidden:u}}import{jsx as Qt}from"react/jsx-runtime";var Le=e=>{let{target:t,parent:o,transitionDuration:r=150,excludeTargetBorderWidth:n=!1,displayAfterTransitionEnd:s,sx:i,className:a,ref:u,...p}=e,m=_t(null),{initialized:d,hidden:y}=Ie({target:t,parent:o,indicatorRef:m,excludeTargetBorderWidth:n,displayAfterTransitionEnd:s}),f=F(u,m);return!t||!o?null:Qt(Gt,{className:Ut("FloatingIndicator-root",a),ref:f,sx:[{position:"absolute",top:0,left:0,transition:`transform ${r}ms`,opacity:d?1:0,...y?{display:"none"}:void 0},...Array.isArray(i)?i:[i??!1]],...p})};var Me=Le;import{Box as Xt,Stack as Yt}from"@mui/material";function Z(e,...t){let o=Object.fromEntries(Object.entries(e).filter(([n,s])=>s!==void 0)),r=t.reduce((n,s)=>{let i=Object.fromEntries(Object.entries(s).filter(([a,u])=>u!==void 0));return Object.assign(n,i),n},{});return{...o,...r}}import{jsx as De}from"react/jsx-runtime";function c(e){let t=e.defaultProps??{},o=(r=>{let{center:n,alignItems:s,justifyContent:i,flexWrap:a,inlineFlex:u,sx:p,ref:m,...d}=r,y=!!(e.supportsCenterProp&&n),f={alignItems:"center",justifyContent:"center"},l;e.base==="stack"?l=y?f:Z(t,{alignItems:s,justifyContent:i}):l=Z(y?f:t,{alignItems:s,justifyContent:i,flexWrap:a});let C=Array.isArray(p)?p:[p];return e.base==="stack"?De(Yt,{direction:e.direction,...d,ref:m,sx:[l,...C]}):De(Xt,{ref:m,sx:[{display:u?"inline-flex":"flex",flexDirection:e.direction,...l},...C],...d})});return o.displayName=e.displayName,o}var qt=c({displayName:"FlexColumn.Start",base:"box",direction:"column",defaultProps:{justifyContent:"flex-start"}}),Jt=c({displayName:"FlexColumn.End",base:"box",direction:"column",defaultProps:{justifyContent:"flex-end"}}),Zt=c({displayName:"FlexColumn.Center",base:"box",direction:"column",defaultProps:{justifyContent:"center"}}),eo=c({displayName:"FlexColumn.Around",base:"box",direction:"column",defaultProps:{justifyContent:"space-around"}}),to=c({displayName:"FlexColumn.Between",base:"box",direction:"column",defaultProps:{justifyContent:"space-between"}}),oo=c({displayName:"FlexColumn.Evenly",base:"box",direction:"column",defaultProps:{justifyContent:"space-evenly"}}),ro=c({displayName:"FlexColumn",base:"box",direction:"column",supportsCenterProp:!0}),k=ro;k.Start=qt;k.End=Jt;k.Center=Zt;k.Between=to;k.Evenly=oo;k.Around=eo;var no=c({displayName:"FlexRow.Start",base:"box",direction:"row",defaultProps:{justifyContent:"flex-start"}}),so=c({displayName:"FlexRow.End",base:"box",direction:"row",defaultProps:{justifyContent:"flex-end"}}),io=c({displayName:"FlexRow.Around",base:"box",direction:"row",defaultProps:{justifyContent:"space-around"}}),ao=c({displayName:"FlexRow.Between",base:"box",direction:"row",defaultProps:{justifyContent:"space-between"}}),lo=c({displayName:"FlexRow.Evenly",base:"box",direction:"row",defaultProps:{justifyContent:"space-evenly"}}),po=c({displayName:"FlexRow.Center",base:"box",direction:"row",defaultProps:{justifyContent:"center"}}),uo=c({displayName:"FlexRow",base:"box",direction:"row",supportsCenterProp:!0}),N=uo;N.Start=no;N.End=so;N.Center=po;N.Between=ao;N.Around=io;N.Evenly=lo;function Ws(e){return null}import{Typography as xo}from"@mui/material";import yo from"clsx";import{useMemo as bo}from"react";import{Box as mo}from"@mui/material";import co from"clsx";import{jsx as fo}from"react/jsx-runtime";var j=e=>{let{sx:t,className:o,color:r="#000",bgcolor:n="#ff0",children:s,ref:i,...a}=e;return fo(mo,{className:co("Mark-root",o),component:"mark",ref:i,sx:[{display:"inline-block",color:r,bgcolor:n},...Array.isArray(t)?t:[t??!1]],...a,children:s})};j.displayName="Mark";function He(e){return e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")}function We(e,t,o){if(!t||t.length===0)return[{chunk:e,highlighted:!1}];let r=o?.ignorecase??!0,n=Array.isArray(t)?t.map(He):He(t);if(!(Array.isArray(n)?n.filter(p=>p.trim().length>0).length>0:n.trim()!==""))return[{chunk:e,highlighted:!1}];let i=typeof n=="string"?n.trim():n.filter(p=>p.trim().length!==0).map(p=>p.trim()).sort((p,m)=>m.length-p.length).join("|"),a=new RegExp(`(${i})`,r?"gi":"g");return e.split(a).map(p=>({chunk:p,highlighted:a.test(p)})).filter(({chunk:p})=>p)}import{jsx as z}from"react/jsx-runtime";var Oe=e=>{let{sx:t,className:o,style:r,variant:n,highlight:s,color:i,highlightSx:a,ignorecase:u=!1,includeDataAttribute:p=!1,children:m,ref:d,...y}=e,f=bo(()=>We(m,s,{ignorecase:u}),[m,s,u]);return z(xo,{ref:d,variant:n,className:yo("Highlight-root",o),sx:t,style:r,...y,children:f.map(({chunk:l,highlighted:C},P)=>C?p?z(j,{color:i,sx:a,"data-highlight":l,children:l},P):z(j,{color:i,sx:a,children:l},P):z("span",{children:l},P))})};Oe.displayName="Highlight";import{Box as ee}from"@mui/material";import Ve from"clsx";import{jsx as Co,jsxs as te}from"react/jsx-runtime";function oi(e){let{sx:t,className:o,text:r,maxLen:n,currentLen:s=0}=e,i=s>n;return r?te(ee,{className:Ve("LengthLimitHelperText-root",o),component:"span",sx:[{display:"flex",justifyContent:"space-between",alignItems:"center",color:i?"error.main":"text.secondary"},...Array.isArray(t)?t:[t??!1]],children:[typeof r=="string"?Co("span",{children:r}):r,te(ee,{component:"span",sx:{ml:2,whiteSpace:"nowrap"},children:[s," / ",n]})]}):te(ee,{className:Ve("LengthLimitHelperText-root",o),component:"span",sx:[{display:"flex",justifyContent:"flex-end",alignItems:"center",color:i?"error.main":"text.secondary",whiteSpace:"nowrap"},...Array.isArray(t)?t:[t??!1]],children:[s," / ",n]})}import{useMediaQuery as Po}from"@mui/material";import{Fragment as go,jsx as ho}from"react/jsx-runtime";function ii(e){let{children:t}=e;return!Po(r=>r.breakpoints.up("lg"))||!t?null:ho(go,{children:t})}import{useMediaQuery as So}from"@mui/material";import{Fragment as Bo,jsx as Ro}from"react/jsx-runtime";function ui(e){let{children:t}=e;return!So(r=>r.breakpoints.down("lg"))||!t?null:Ro(Bo,{children:t})}import{useMediaQuery as To}from"@mui/material";import{Fragment as wo,jsx as Fo}from"react/jsx-runtime";function fi(e){let{children:t}=e;return!To(r=>r.breakpoints.up("md"))||!t?null:Fo(wo,{children:t})}import{Paper as Ao}from"@mui/material";import ko from"clsx";import{jsx as No}from"react/jsx-runtime";function Pi(e){let{className:t,sx:o,squared:r,outlined:n,children:s,...i}=e;return No(Ao,{...i,className:ko("Paper-root",t),sx:[{borderRadius:r?0:1,border:n?"1px solid #ddd":"none"},...Array.isArray(o)?o:[o??!1]],children:s})}import{Paper as Go}from"@mui/material";import{clsx as Uo}from"clsx";import{Box as vo}from"@mui/material";import{clsx as Eo}from"clsx";import{jsx as Io}from"react/jsx-runtime";var oe=e=>{let{noPadding:t=!1,className:o,sx:r,children:n,ref:s,...i}=e;return Io(vo,{...i,className:Eo("PortletContent-root",o,{"PortletContent-noPadding":t}),ref:s,sx:[a=>({flex:1,p:a.spacing(2,3),"&.PortletContent-noPadding":{p:0}}),...Array.isArray(r)?r:[r??!1]],children:n})};oe.displayName="PortletContent";import{Box as Lo}from"@mui/material";import{clsx as Mo}from"clsx";import{jsx as Do}from"react/jsx-runtime";var re=e=>{let{noDivider:t,sx:o,className:r,children:n,ref:s,...i}=e;return Do(Lo,{...i,className:Mo("PortletFooter-root",r,{"PortletFooter-noDivider":t}),ref:s,sx:[a=>({p:a.spacing(1,2),borderTop:"1px solid #E0E4EE",borderBottomLeftRadius:"2px",borderBottomRightRadius:"2px","&.PortletFooter-noDivider":{borderTop:"none"}}),...Array.isArray(o)?o:[o??!1]],children:n})};re.displayName="PortletFooter";import{Box as Ho}from"@mui/material";import{clsx as Wo}from"clsx";import{jsx as Oo}from"react/jsx-runtime";var ne=e=>{let{children:t,noDivider:o,className:r,noPadding:n=!1,sx:s,ref:i,...a}=e;return Oo(Ho,{...a,className:Wo("PortletHeader-root",r,{"PortletHeader-noPadding":n,"PortletHeader-noDivider":o}),ref:i,sx:[u=>({position:"relative",display:"flex",justifyContent:"space-between",alignItems:"center",borderBottom:"1px solid #E0E4EE",borderTopLeftRadius:2,borderTopRightRadius:2,height:56,minHeight:56,p:u.spacing(.5,1,.5,3),"&.PortletHeader-noPadding":{p:u.spacing(.5,0,.5,0)},"&.PortletHeader-noDivider":{borderBottom:"none"}}),...Array.isArray(s)?s:[s??!1]],children:t})};ne.displayName="PortletHeader";import{Box as je,Typography as ze}from"@mui/material";import{clsx as Vo}from"clsx";import{jsx as se,jsxs as jo}from"react/jsx-runtime";var ie=e=>{let{icon:t,title:o,subtitle:r,className:n,sx:s,ref:i,...a}=e;return jo(je,{...a,className:Vo("PortletLabel-root",n),ref:i,sx:[{display:"flex",alignItems:"center"},...Array.isArray(s)?s:[s??!1]],children:[t&&se(je,{component:"span",sx:{fontSize:"1.2rem",mr:1,color:"text.secondary",alignItems:"center",display:"flex"},children:t}),o&&se(ze,{sx:{fontWeight:500,fontSize:"1.1rem"},variant:"h6",children:o}),r&&se(ze,{variant:"subtitle2",sx:{fontWeight:400,ml:1,color:"text.secondary"},children:r})]})};ie.displayName="PortletLabel";import{Box as zo}from"@mui/material";import{clsx as Ko}from"clsx";import{jsx as $o}from"react/jsx-runtime";var ae=e=>{let{className:t,sx:o,children:r,ref:n,...s}=e;return $o(zo,{...s,ref:n,className:Ko("PortletToolbar-root",t),sx:[{display:"flex",alignItems:"center",justifyContent:"flex-end",ml:"auto"},...Array.isArray(o)?o:[o??!1]],children:r})};ae.displayName="PortletToolbar";import{jsx as Qo}from"react/jsx-runtime";var _o={square:!0},v=(e=>{let{sx:t,className:o,children:r,ref:n,...s}=e;return Qo(Go,{..._o,...s,elevation:0,ref:n,component:"div",className:Uo("Portlet-root",o),sx:[{display:"flex",flexDirection:"column",alignItems:"stretch",border:"1px solid #E0E4EE"},...Array.isArray(t)?t:[t??!1]],children:r})});v.displayName="Portlet";v.Content=oe;v.Header=ne;v.Footer=re;v.Label=ie;v.Toolbar=ae;import{Box as Xo}from"@mui/material";import $e from"clsx";import{useState as Ge}from"react";import{Box as K,styled as $}from"@mui/material";var le=$(K)(({theme:e})=>({position:"relative",display:"inline-flex",flexDirection:"row",width:"auto",borderRadius:e.shape.borderRadius,overflow:"hidden",padding:"0.25rem",backgroundColor:"#f1f3f5",'&[data-vertical="true"]':{display:"flex",flexDirection:"column",width:"max-content"},'&[data-fullwidth="true"]':{display:"flex",width:"auto"},'&[data-size="small"]':{padding:"0.15rem"},'&[data-size="large"]':{padding:"0.35rem"}}));le.displayName="SegmentedControlRoot";var pe=$(K,{shouldForwardProp:e=>e!=="transitionDuration"&&e!=="transitionTimingFunction"})(({theme:e,transitionDuration:t=150,transitionTimingFunction:o="ease"})=>({position:"relative",flex:1,zIndex:2,transition:`border-color ${t}ms ${o}`,'.SegmentedControl-root[data-with-item-border="true"] &::before':{content:'""',position:"absolute",top:0,bottom:0,insetInlineStart:0,backgroundColor:e.palette.divider,width:"1px",transition:`background-color ${t}ms ${o}`},'.SegmentedControl-root[data-with-item-border="true"] &:first-of-type::before':{backgroundColor:"transparent"},'.SegmentedControl-root[data-vertical="true"] &::before':{top:0,insetInline:0,bottom:"auto",height:"1px",width:"auto"}}));pe.displayName="SegmentedControlItem";var ue=$(K)(()=>({height:0,width:0,position:"absolute",overflow:"hidden",whiteSpace:"nowrap",opacity:0}));ue.displayName="SegmentedControlInput";function Ke(e,t){if(!t)return;let o=["primary","secondary","info","warning","error","success"],r=["textPrimary","textSecondary","textDisabled"];if(o.includes(t))return e.palette[t].main;if(r.includes(t)){let n=t.substring(4).toLowerCase();return e.palette.text[n]}return t}var me=$(K,{shouldForwardProp:e=>e!=="transitionDuration"&&e!=="transitionTimingFunction"&&e!=="primaryColor"&&e!=="secondaryColor"})(({theme:e,transitionDuration:t=150,transitionTimingFunction:o="ease",primaryColor:r,secondaryColor:n})=>{let s=Ke(e,r)??e.palette.primary.main,i=Ke(e,n)??e.palette.text.secondary;return{fontWeight:500,display:"block",textAlign:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",userSelect:"none",borderRadius:1,padding:"0.3125rem 0.625rem",fontSize:e.typography.body1.fontSize,cursor:"pointer",color:i,transition:`color ${t}ms ${o}`,".SegmentedControl-item.Mui-active > &&":{color:s,"&::before":{content:'""',position:"absolute",inset:0,zIndex:0}},".SegmentedControl-item.Mui-readOnly > &&":{cursor:"default"},".SegmentedControl-item.Mui-disabled > &&":{cursor:"not-allowed",color:e.palette.text.disabled,opacity:.7},'.SegmentedControl-root[data-size="small"] &':{padding:"0.2rem 0.4rem",fontSize:"0.7rem"},'.SegmentedControl-root[data-size="large"] &':{padding:"0.4rem 0.8rem",fontSize:e.typography.subtitle1.fontSize}}});me.displayName="SegmentedControlLabel";import{jsx as G,jsxs as Ue}from"react/jsx-runtime";function ce(e){return e?!0:void 0}var aa=e=>{let{sx:t,className:o,style:r,disabled:n,data:s,value:i,defaultValue:a,onChange:u,fullWidth:p,withItemBorder:m,primaryColor:d="primary",secondaryColor:y="textSecondary",transitionDuration:f,transitionTimingFunction:l,vertical:C,readOnly:P,size:B="medium",indicator:S,ref:h}=e,g=s.map(b=>typeof b=="string"?{label:b,value:b}:b),[L,M]=Ge(null),[R,qe]=Ge({}),Je=b=>tt=>{R[b]=tt,qe(R)},[D,Ze]=W({value:i,defaultValue:a,finalValue:Array.isArray(s)?g.find(b=>!b.disabled)?.value??g[0]?.value??void 0:void 0,onChange:u}),U=H(),et=F(h,M);return s.length===0?null:Ue(le,{className:$e("SegmentedControl-root",o,{x_readOnly:P,x_fullWidth:p,"Mui-disabled":n,"Mui-readOnly":P}),sx:t,style:r,ref:et,role:"radiogroup","data-vertical":ce(C),"data-fullwidth":ce(p),"data-with-item-border":ce(m),"data-size":B,children:[typeof D=="string"&&G(Me,{className:"SegmentedControl-indicator",component:"span",target:R[D],parent:L,transitionDuration:f,sx:{display:"block",zIndex:1,borderRadius:1,bgcolor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 1px 3px 0px, rgba(0, 0, 0, 0.1) 0px 1px 2px 0px"},children:S}),g.map(b=>Ue(pe,{className:$e("SegmentedControl-item",{"Mui-active":D===b.value,"Mui-disabled":b.disabled||n,"Mui-readOnly":P}),transitionDuration:f,transitionTimingFunction:l,children:[G(ue,{component:"input",className:"SegmentedControl-input",type:"radio",name:U,value:b.value,checked:D===b.value,id:`${U}-${b.value}`,onChange:()=>{!P&&!b.disabled&&!n&&Ze(b.value)}},`${b.value}-input`),G(me,{component:"label",className:"SegmentedControl-label",ref:Je(b.value),htmlFor:`${U}-${b.value}`,primaryColor:d,secondaryColor:y,transitionDuration:f,transitionTimingFunction:l,children:G(Xo,{component:"span",sx:{position:"relative",zIndex:2},children:b.label})},`${b.value}-label`)]},b.value))]})};var Yo=({when:e,fallback:t,children:o})=>e?o:t;Yo.displayName="Show";import{useMediaQuery as qo}from"@mui/material";import{Fragment as Jo,jsx as Zo}from"react/jsx-runtime";function ca(e){let{children:t}=e;return!qo(r=>r.breakpoints.down("md"))||!t?null:Zo(Jo,{children:t})}import{useMediaQuery as er}from"@mui/material";import{Fragment as tr,jsx as or}from"react/jsx-runtime";function ya(e){let{children:t}=e;return!er(r=>r.breakpoints.up("sm"))||!t?null:or(tr,{children:t})}import{Box as rr}from"@mui/material";import{jsx as sr}from"react/jsx-runtime";var nr=({width:e,height:t,minWidth:o,minHeight:r,sx:n,ref:s,...i})=>sr(rr,{ref:s,sx:[{width:e,height:t,minWidth:o??e,minHeight:r??t},...Array.isArray(n)?n:[n]],...i});nr.displayName="Space";import{Box as _e,Link as ir,styled as fe}from"@mui/material";import ar from"clsx";import{jsx as de,jsxs as cr}from"react/jsx-runtime";var lr=e=>{let{sx:t,className:o,style:r,id:n,initialState:s,maxHeight:i=100,hideLabel:a,showLabel:u,expanded:p,onExpandedChange:m,controlRef:d,children:y,transitionDuration:f=100,ref:l,...C}=e,P=H(n),B=`${P}-region`,[S,h]=W({value:p,defaultValue:s,finalValue:!1,onChange:m}),{ref:g,height:L}=Pe(),M=S?a:u,R=M!==null&&i<L;return cr(pr,{className:ar("Spoiler-root",o),sx:[t,...Array.isArray(t)?t:[t??!1]],style:r,id:P,ref:l,"data-has-spoiler":R,...C,children:[R&&de(ur,{component:"button",ref:d,onClick:()=>{h(!S)},"aria-expanded":S,"aria-controls":B,children:M}),de(mr,{"data-reduce-motion":!0,role:"region",id:B,transitionDuration:f,style:{maxHeight:S?L??void 0:i},children:de("div",{ref:g,children:y})})]})};lr.displayName="Spoiler";var pr=fe(_e)(()=>({position:"relative",'&:where([data-has-spoiler="true"])':{marginBottom:24}})),ur=fe(ir)(()=>({position:"absolute",insetInlineStart:0,top:"100%",height:32,textDecoration:"none","&:hover":{textDecoration:"underline"}})),mr=fe(_e,{shouldForwardProp:e=>e!=="transitionDuration"})(({transitionDuration:e=200})=>({display:"flex",flexDirection:"column",overflow:"hidden",transition:`max-height ${e}ms ease`}));var dr=c({displayName:"StackColumn.Center",base:"stack",direction:"column",defaultProps:{justifyContent:"center"}}),fr=c({displayName:"StackColumn.Start",base:"stack",direction:"column",defaultProps:{justifyContent:"flex-start"}}),xr=c({displayName:"StackColumn.End",base:"stack",direction:"column",defaultProps:{justifyContent:"flex-end"}}),yr=c({displayName:"StackColumn.Between",base:"stack",direction:"column",defaultProps:{justifyContent:"space-between"}}),br=c({displayName:"StackColumn.Around",base:"stack",direction:"column",defaultProps:{justifyContent:"space-around"}}),Cr=c({displayName:"StackColumn.Evenly",base:"stack",direction:"column",defaultProps:{justifyContent:"space-evenly"}}),Pr=c({displayName:"StackColumn",base:"stack",direction:"column",supportsCenterProp:!0}),E=Pr;E.Start=fr;E.End=xr;E.Between=yr;E.Around=br;E.Center=dr;E.Evenly=Cr;var gr=c({displayName:"StackRow.Center",base:"stack",direction:"row",defaultProps:{justifyContent:"center"}}),hr=c({displayName:"StackRow.Start",base:"stack",direction:"row",defaultProps:{justifyContent:"flex-start"}}),Sr=c({displayName:"StackRow.End",base:"stack",direction:"row",defaultProps:{justifyContent:"flex-end"}}),Br=c({displayName:"StackRow.Between",base:"stack",direction:"row",defaultProps:{justifyContent:"space-between"}}),Rr=c({displayName:"StackRow.Around",base:"stack",direction:"row",defaultProps:{justifyContent:"space-around"}}),Tr=c({displayName:"StackRow.Evenly",base:"stack",direction:"row",defaultProps:{justifyContent:"space-evenly"}}),wr=c({displayName:"StackRow",base:"stack",direction:"row",supportsCenterProp:!0}),I=wr;I.Start=hr;I.End=Sr;I.Between=Br;I.Around=Rr;I.Center=gr;I.Evenly=Tr;var Qe=x({displayName:"TopAbsolute.Center",axes:[{cssProp:"top"}],fixedStyle:{left:"50%",transform:"translate(-50%, -50%)"},supportsFullWidth:!0});var Xe=x({displayName:"TopAbsolute.Left",axes:[{cssProp:"left",defaultValue:0},{cssProp:"top",defaultValue:0}],supportsFullWidth:!0});var Ye=x({displayName:"TopAbsolute.Right",axes:[{cssProp:"right",defaultValue:0},{cssProp:"top",defaultValue:0}],supportsFullWidth:!0});var Fr=x({displayName:"TopAbsolute",axes:[{cssProp:"top",defaultValue:0},{cssProp:"left",defaultValue:0},{cssProp:"right",defaultValue:0}],supportsFullWidth:!1}),xe=Fr;xe.Left=Xe;xe.Right=Ye;xe.Center=Qe;import{useMediaQuery as Ar}from"@mui/material";import{Fragment as kr,jsx as Nr}from"react/jsx-runtime";function Ga(e){let{children:t}=e;return!Ar(r=>r.breakpoints.down("sm"))||!t?null:Nr(kr,{children:t})}var Qa=e=>!e.shiftKey&&e.key==="Tab",Xa=e=>e.key==="Enter"||!e.shiftKey&&e.key==="Tab",Ya=e=>e.key==="Enter",qa=e=>e.key==="Escape",Ja=e=>!!e.touches?.length,Za=e=>!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0)),el=(e,t=-1)=>{let o=e.target;o&&typeof o.blur=="function"&&(t>=0?setTimeout(()=>{o.blur()},t):o.blur())};function vr(...e){let t=[];return e.forEach(o=>{o&&(Array.isArray(o)?o.forEach(r=>{r&&t.push(r)}):t.push(o))}),t}function ol(...e){let t=vr(...e);return t.length>0?t[0]:void 0}var rl=(e="height",t=100)=>({"& .MuiDialog-scrollPaper > .MuiDialog-paper":{[e]:`calc(${t}% - 64px)`}});export{Q as BottomAbsolute,it as Center,X as CenterAbsolute,Er as Closables,pt as CooldownButton,ct as CooldownButtonBase,xt as CooldownIconButton,Pn as CopyButtonWrapper,Rn as CustomTableBody,Vn as DebouncedButton,Gn as DebouncedButtonBase,Yn as DebouncedIconButton,es as DebouncedRender,Dt as FileButton,k as FlexColumn,jt as FlexItemsContainer,N as FlexRow,Le as FloatingIndicator,Ws as Hide,Oe as Highlight,oi as LengthLimitHelperText,ii as LgOrUp,j as Mark,ui as MdOrDown,fi as MdOrUp,Pi as Paper,v as Portlet,aa as SegmentedControl,Yo as Show,ca as SmOrDown,ya as SmOrUp,nr as Space,lr as Spoiler,E as StackColumn,I as StackRow,xe as TopAbsolute,Ga as XsOrDown,el as blurEventTarget,ol as firstSx,vr as flatSx,Wr as getAbsolutePosition,Or as isBrowser,Ya as isEnterKeyEvent,Xa as isEnterOrTabKeyEvent,qa as isEscapeKeyEvent,Za as isMouseEvent,Vr as isNavigator,Qa as isTabKeyEvent,Dr as isTouchDevice,Ja as isTouchEvent,Mr as isWebSerialSupportBrowser,Hr as matchesOrClosest,jr as noop,Ir as requestFocusSelector,Lr as requestSelector,rl as sxDialogHeight};
2
- //# sourceMappingURL=index.js.map
1
+ import{BottomAbsolute as e}from"./components/bottom-absolute/BottomAbsolute.js";import{Center as t}from"./components/Center.js";import{CooldownButton as n}from"./components/CooldownButton.js";import{CooldownButtonBase as r}from"./components/CooldownButtonBase.js";import{CooldownIconButton as i}from"./components/CooldownIconButton.js";import{CopyButtonWrapper as a}from"./components/CopyButtonWrapper.js";import{CustomTableBody as o}from"./components/CustomTableBody.js";import{CenterAbsolute as s}from"./components/center-absolute/CenterAbsolute.js";import{DebouncedButton as c}from"./components/DebouncedButton.js";import{DebouncedButtonBase as l}from"./components/DebouncedButtonBase.js";import{DebouncedIconButton as u}from"./components/DebouncedIconButton.js";import{DebouncedRender as d}from"./components/DebouncedRender.js";import{DelayedRender as f}from"./components/DelayedRender.js";import{FileButton as p}from"./components/FileButton.js";import{FlexItemsContainer as m}from"./components/FlexItemsContainer.js";import{FloatingIndicator as h}from"./components/FloatingIndicator/FloatingIndicator.js";import{FlexColumn as g}from"./components/flex/FlexColumn.js";import{FlexRow as _}from"./components/flex/FlexRow.js";import{Hide as v}from"./components/Hide.js";import{Mark as y}from"./components/Mark.js";import{Highlight as b}from"./components/Highlight/Highlight.js";import{LengthLimitHelperText as x}from"./components/LengthLimitHelperText.js";import{LgOrUp as S}from"./components/LgOrUp.js";import{ListPagination as C}from"./components/ListPagination.js";import{MdOrDown as w}from"./components/MdOrDown.js";import{MdOrUp as T}from"./components/MdOrUp.js";import{Paper as E}from"./components/Paper.js";import{PasswordTextField as D}from"./components/PasswordTextField.js";import{PortletContent as O}from"./components/portlet/PortletContent.js";import{PortletFooter as k}from"./components/portlet/PortletFooter.js";import{PortletHeader as A}from"./components/portlet/PortletHeader.js";import{PortletLabel as j}from"./components/portlet/PortletLabel.js";import{PortletTitle as M}from"./components/portlet/PortletTitle.js";import{PortletToolbar as N}from"./components/portlet/PortletToolbar.js";import{Portlet as P}from"./components/portlet/Portlet.js";import{SearchBoxDebouncer as F}from"./components/SearchBoxDebouncer.js";import{SegmentedControl as I}from"./components/SegmentedControl/SegmentedControl.js";import{Show as L}from"./components/Show.js";import{SmOrDown as R}from"./components/SmOrDown.js";import{SmOrUp as z}from"./components/SmOrUp.js";import{Space as B}from"./components/Space.js";import{Spoiler as V}from"./components/Spoiler.js";import{StackColumn as H}from"./components/stack/StackColumn.js";import{StackRow as U}from"./components/stack/StackRow.js";import{TopAbsolute as W}from"./components/top-absolute/TopAbsolute.js";import{XsOrDown as G}from"./components/XsOrDown.js";import{YmdTextField as K}from"./components/YmdTextField.js";import{YmdTypography as q}from"./components/YmdTypography.js";import{YmTypography as J}from"./components/YmTypography.js";import{Closables as Y}from"./util/closables.js";import{blurEventTarget as X,isEnterKeyEvent as Z,isEnterOrTabKeyEvent as Q,isEscapeKeyEvent as $,isMouseEvent as ee,isTabKeyEvent as te,isTouchEvent as ne}from"./util/event-utils.js";import{getAbsolutePosition as re,isBrowser as ie,isNavigator as ae,isTouchDevice as oe,isWebSerialSupportBrowser as se,matchesOrClosest as ce,noop as le,requestFocusSelector as ue,requestSelector as de}from"./util/misc-utils.js";import{firstSx as fe,flatSx as pe,sxDialogHeight as me}from"./util/sx-props.js";export{e as BottomAbsolute,t as Center,s as CenterAbsolute,Y as Closables,n as CooldownButton,r as CooldownButtonBase,i as CooldownIconButton,a as CopyButtonWrapper,o as CustomTableBody,c as DebouncedButton,l as DebouncedButtonBase,u as DebouncedIconButton,d as DebouncedRender,f as DelayedRender,p as FileButton,g as FlexColumn,m as FlexItemsContainer,_ as FlexRow,h as FloatingIndicator,v as Hide,b as Highlight,x as LengthLimitHelperText,S as LgOrUp,C as ListPagination,y as Mark,w as MdOrDown,T as MdOrUp,E as Paper,D as PasswordTextField,P as Portlet,O as PortletContent,k as PortletFooter,A as PortletHeader,j as PortletLabel,M as PortletTitle,N as PortletToolbar,F as SearchBoxDebouncer,I as SegmentedControl,L as Show,R as SmOrDown,z as SmOrUp,B as Space,V as Spoiler,H as StackColumn,U as StackRow,W as TopAbsolute,G as XsOrDown,J as YmTypography,K as YmdTextField,q as YmdTypography,X as blurEventTarget,fe as firstSx,pe as flatSx,re as getAbsolutePosition,ie as isBrowser,Z as isEnterKeyEvent,Q as isEnterOrTabKeyEvent,$ as isEscapeKeyEvent,ee as isMouseEvent,ae as isNavigator,te as isTabKeyEvent,oe as isTouchDevice,ne as isTouchEvent,se as isWebSerialSupportBrowser,ce as matchesOrClosest,le as noop,ue as requestFocusSelector,de as requestSelector,me as sxDialogHeight};
@@ -0,0 +1,2 @@
1
+ function e(e,t=0,n={}){let r,i,a,o,s,c,l=0,{leading:u=!1,trailing:d=!0,maxWait:f}=n;if(typeof e!=`function`)throw TypeError(`Expected a function`);typeof f==`number`&&(a=Math.max(f,t));function p(){return Date.now()}function m(t){let n=r,a=i;return r=void 0,i=void 0,l=t,o=e.apply(a,n),o}function h(e){return l=e,s=setTimeout(v,t),u?m(e):o}function g(e){let n=e-(c||0),r=e-l,i=t-n;return a===void 0?i:Math.min(i,a-r)}function _(e){let n=e-(c||0),r=e-l;return c===void 0||n>=t||n<0||a!==void 0&&r>=a}function v(){let e=p();if(_(e))return y(e);s=setTimeout(v,g(e))}function y(e){return s=void 0,d&&r?m(e):(r=void 0,i=void 0,o)}function b(){s!==void 0&&clearTimeout(s),l=0,r=void 0,c=void 0,i=void 0,s=void 0}function x(){return s===void 0?o:y(p())}function S(...e){let n=p(),l=_(n);if(r=e,i=this,c=n,l){if(s===void 0)return h(c);if(a!==void 0)return clearTimeout(s),s=setTimeout(v,t),m(c)}return s===void 0&&(s=setTimeout(v,t)),o}return S.cancel=b,S.flush=x,S}function t(t,n=0,r={}){return e(t,n,{leading:r.leading??!0,trailing:r.trailing??!0,maxWait:n})}exports.debounce=e,exports.throttle=t;
2
+ //# sourceMappingURL=debounce.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounce.cjs","names":["debounce","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","userMaxWait","options","func","wait","now","invokeFunc","args","thisArg","time","leadingEdge","timerExpired","leading","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","trailing","cancel","flush","debounced","isInvoking","throttle"],"sources":["../../src/misc/debounce.ts"],"sourcesContent":["/**\n * debounce와 throttle 타이밍 제어 유틸을 제공한다.\n *\n * lodash 의존성을 늘리지 않기 위해 필요한 동작만 내부 구현으로 유지한다.\n */\n\n/** 지연 실행 함수에 정리와 즉시 실행 제어 메서드를 더한 타입 */\ntype DebouncedFunction<T extends (...args: any[]) => any> = T & {\n /** 예약된 trailing 호출 취소 */\n cancel: () => void;\n\n /** 예약된 trailing 호출 즉시 실행 */\n flush: () => ReturnType<T> | undefined;\n};\n\n/** debounce 실행 시점 제어 옵션 */\ninterface DebounceOptions {\n /** 첫 호출 시 즉시 실행 여부 */\n leading?: boolean;\n\n /** 마지막 호출을 wait 이후 실행할지 여부 */\n trailing?: boolean;\n\n /** 연속 호출 중에도 실행을 보장할 최대 대기 시간 */\n maxWait?: number;\n}\n\n/** throttle에서 노출하는 실행 시점 옵션 */\ntype ThrottleOptions = Pick<DebounceOptions, 'leading' | 'trailing'>;\n\n/**\n * 연속 호출이 멈춘 뒤 지정한 시간만큼 기다렸다가 마지막 호출을 실행한다.\n *\n * @param func 지연 실행할 함수\n * @param wait 호출을 미룰 시간\n * @param options leading, trailing, maxWait 실행 정책\n * @returns 취소와 즉시 실행 제어가 가능한 함수\n */\nfunction debounce<T extends (...args: any[]) => any>(\n func: T,\n wait: number = 0,\n options: DebounceOptions = {},\n): DebouncedFunction<T> {\n let lastArgs: any;\n let lastThis: any;\n let maxWait: number | undefined;\n let result: ReturnType<T>;\n let timerId: ReturnType<typeof setTimeout> | undefined;\n let lastCallTime: number | undefined;\n let lastInvokeTime = 0;\n const { leading = false, trailing = true, maxWait: userMaxWait } = options;\n\n if (typeof func !== 'function') {\n throw new TypeError('Expected a function');\n }\n\n if (typeof userMaxWait === 'number') {\n maxWait = Math.max(userMaxWait, wait);\n }\n\n // 테스트와 런타임에서 같은 시간 기준을 사용하도록 현재 시각 조회를 한곳에 모은다.\n function now(): number {\n return Date.now();\n }\n\n // 마지막 호출 인자와 this를 사용해 실제 함수를 실행하고 대기 상태를 비운다.\n function invokeFunc(time: number) {\n const args = lastArgs;\n const thisArg = lastThis;\n\n lastArgs = undefined;\n lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n // leading 실행 여부와 관계없이 다음 trailing 판단을 위한 타이머를 시작한다.\n function leadingEdge(time: number) {\n lastInvokeTime = time;\n timerId = setTimeout(timerExpired, wait);\n return leading ? invokeFunc(time) : result;\n }\n\n // wait와 maxWait 중 먼저 도달하는 시점을 다음 확인 시각으로 사용한다.\n function remainingWait(time: number): number {\n const timeSinceLastCall = time - (lastCallTime || 0);\n const timeSinceLastInvoke = time - lastInvokeTime;\n const timeWaiting = wait - timeSinceLastCall;\n\n return maxWait !== undefined\n ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n // 첫 호출, wait 경과, 시계 보정, maxWait 도달 여부를 실행 기준으로 삼는다.\n function shouldInvoke(time: number): boolean {\n const timeSinceLastCall = time - (lastCallTime || 0);\n const timeSinceLastInvoke = time - lastInvokeTime;\n\n return (\n lastCallTime === undefined ||\n timeSinceLastCall >= wait ||\n timeSinceLastCall < 0 ||\n (maxWait !== undefined && timeSinceLastInvoke >= maxWait)\n );\n }\n\n // 아직 실행 조건이 아니면 남은 시간만큼 다시 예약한다.\n function timerExpired() {\n const time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n // trailing 정책이 켜져 있고 마지막 호출 정보가 남아 있을 때만 실행한다.\n function trailingEdge(time: number) {\n timerId = undefined;\n\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = undefined;\n lastThis = undefined;\n return result;\n }\n\n // 예약된 타이머와 마지막 호출 정보를 모두 초기화한다.\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = undefined;\n lastCallTime = undefined;\n lastThis = undefined;\n timerId = undefined;\n }\n\n // 예약된 trailing 호출이 있으면 즉시 실행하고, 없으면 마지막 결과를 반환한다.\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n // 호출 정보는 항상 최신 값으로 갱신하고, 실행 가능 여부만 정책으로 판단한다.\n function debounced(this: any, ...args: any[]) {\n const time = now();\n const isInvoking = shouldInvoke(time);\n\n lastArgs = args;\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n\n // maxWait가 있으면 연속 호출 중에도 주기적으로 실제 함수를 실행한다.\n if (maxWait !== undefined) {\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced as DebouncedFunction<T>;\n}\n\n/**\n * 지정한 시간 간격 안에서 함수 실행 빈도를 제한한다.\n *\n * debounce에 maxWait를 적용해 lodash throttle과 같은 기본 정책을 제공한다.\n *\n * @param func 실행 빈도를 제한할 함수\n * @param wait 최소 실행 간격\n * @param options leading과 trailing 실행 여부\n * @returns 취소와 즉시 실행 제어가 가능한 함수\n */\nfunction throttle<T extends (...args: any[]) => any>(\n func: T,\n wait: number = 0,\n options: ThrottleOptions = {},\n): DebouncedFunction<T> {\n return debounce(func, wait, {\n leading: options.leading ?? true,\n trailing: options.trailing ?? true,\n maxWait: wait,\n });\n}\n\nexport { debounce, throttle };\n"],"mappings":"AAsCA,SAASA,EACP,EACA,EAAe,EACf,EAA2B,CAAC,EACN,CACtB,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAAiB,EACf,CAAE,UAAU,GAAO,WAAW,GAAM,QAASC,GAAgBC,EAEnE,GAAI,OAAOC,GAAS,WAClB,MAAU,UAAU,qBAAqB,EAGvC,OAAOF,GAAgB,WACzB,EAAU,KAAK,IAAIA,EAAaG,CAAI,GAItC,SAASC,GAAc,CACrB,OAAO,KAAK,IAAI,CAClB,CAGA,SAASC,EAAW,EAAc,CAChC,IAAMC,EAAOb,EACPc,EAAUb,EAMhB,MAJA,GAAW,IAAA,GACX,EAAW,IAAA,GACX,EAAiBc,EACjB,EAASN,EAAK,MAAMK,EAASD,CAAI,EAC1BV,CACT,CAGA,SAASa,EAAY,EAAc,CAGjC,MAFA,GAAiBD,EACjB,EAAU,WAAWE,EAAcP,CAAI,EAChCQ,EAAUN,EAAWG,CAAI,EAAIZ,CACtC,CAGA,SAASgB,EAAc,EAAsB,CAC3C,IAAMC,EAAoBL,GAAQV,GAAgB,GAC5CgB,EAAsBN,EAAOT,EAC7BgB,EAAcZ,EAAOU,EAE3B,OAAOlB,IAAY,IAAA,GAEfoB,EADA,KAAK,IAAIA,EAAapB,EAAUmB,CAAmB,CAEzD,CAGA,SAASE,EAAa,EAAuB,CAC3C,IAAMH,EAAoBL,GAAQV,GAAgB,GAC5CgB,EAAsBN,EAAOT,EAEnC,OACED,IAAiB,IAAA,IACjBe,GAAqBV,GACrBU,EAAoB,GACnBlB,IAAY,IAAA,IAAamB,GAAuBnB,CAErD,CAGA,SAASe,GAAe,CACtB,IAAMF,EAAOJ,EAAI,EACjB,GAAIY,EAAaR,CAAI,EACnB,OAAOS,EAAaT,CAAI,EAE1B,EAAU,WAAWE,EAAcE,EAAcJ,CAAI,CAAC,CACxD,CAGA,SAASS,EAAa,EAAc,CAQlC,MAPA,GAAU,IAAA,GAENC,GAAYzB,EACPY,EAAWG,CAAI,GAExB,EAAW,IAAA,GACX,EAAW,IAAA,GACJZ,EACT,CAGA,SAASuB,GAAS,CACZtB,IAAY,IAAA,IACd,aAAaA,CAAO,EAEtB,EAAiB,EACjB,EAAW,IAAA,GACX,EAAe,IAAA,GACf,EAAW,IAAA,GACX,EAAU,IAAA,EACZ,CAGA,SAASuB,GAAQ,CACf,OAAOvB,IAAY,IAAA,GAAYD,EAASqB,EAAab,EAAI,CAAC,CAC5D,CAGA,SAASiB,EAAqB,GAAGf,EAAa,CAC5C,IAAME,EAAOJ,EAAI,EACXkB,EAAaN,EAAaR,CAAI,EAOpC,GALA,EAAWF,EAEX,EAAW,KACX,EAAeE,EAEXc,EAAY,CACd,GAAIzB,IAAY,IAAA,GACd,OAAOY,EAAYX,CAAY,EAIjC,GAAIH,IAAY,IAAA,GAGd,OAFA,aAAaE,CAAO,EACpB,EAAU,WAAWa,EAAcP,CAAI,EAChCE,EAAWP,CAAY,CAElC,CAKA,OAHID,IAAY,IAAA,KACd,EAAU,WAAWa,EAAcP,CAAI,GAElCP,CACT,CAIA,MAFA,GAAU,OAASuB,EACnB,EAAU,MAAQC,EACXC,CACT,CAYA,SAASE,EACP,EACA,EAAe,EACf,EAA2B,CAAC,EACN,CACtB,OAAO/B,EAASU,EAAMC,EAAM,CAC1B,QAASF,EAAQ,SAAW,GAC5B,SAAUA,EAAQ,UAAY,GAC9B,QAASE,CACX,CAAC,CACH"}
@@ -0,0 +1,2 @@
1
+ function e(e,t=0,n={}){let r,i,a,o,s,c,l=0,{leading:u=!1,trailing:d=!0,maxWait:f}=n;if(typeof e!=`function`)throw TypeError(`Expected a function`);typeof f==`number`&&(a=Math.max(f,t));function p(){return Date.now()}function m(t){let n=r,a=i;return r=void 0,i=void 0,l=t,o=e.apply(a,n),o}function h(e){return l=e,s=setTimeout(v,t),u?m(e):o}function g(e){let n=e-(c||0),r=e-l,i=t-n;return a===void 0?i:Math.min(i,a-r)}function _(e){let n=e-(c||0),r=e-l;return c===void 0||n>=t||n<0||a!==void 0&&r>=a}function v(){let e=p();if(_(e))return y(e);s=setTimeout(v,g(e))}function y(e){return s=void 0,d&&r?m(e):(r=void 0,i=void 0,o)}function b(){s!==void 0&&clearTimeout(s),l=0,r=void 0,c=void 0,i=void 0,s=void 0}function x(){return s===void 0?o:y(p())}function S(...e){let n=p(),l=_(n);if(r=e,i=this,c=n,l){if(s===void 0)return h(c);if(a!==void 0)return clearTimeout(s),s=setTimeout(v,t),m(c)}return s===void 0&&(s=setTimeout(v,t)),o}return S.cancel=b,S.flush=x,S}function t(t,n=0,r={}){return e(t,n,{leading:r.leading??!0,trailing:r.trailing??!0,maxWait:n})}export{e as debounce,t as throttle};
2
+ //# sourceMappingURL=debounce.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounce.js","names":["debounce","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","userMaxWait","options","func","wait","now","invokeFunc","args","thisArg","time","leadingEdge","timerExpired","leading","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","trailing","cancel","flush","debounced","isInvoking","throttle"],"sources":["../../src/misc/debounce.ts"],"sourcesContent":["/**\n * debounce와 throttle 타이밍 제어 유틸을 제공한다.\n *\n * lodash 의존성을 늘리지 않기 위해 필요한 동작만 내부 구현으로 유지한다.\n */\n\n/** 지연 실행 함수에 정리와 즉시 실행 제어 메서드를 더한 타입 */\ntype DebouncedFunction<T extends (...args: any[]) => any> = T & {\n /** 예약된 trailing 호출 취소 */\n cancel: () => void;\n\n /** 예약된 trailing 호출 즉시 실행 */\n flush: () => ReturnType<T> | undefined;\n};\n\n/** debounce 실행 시점 제어 옵션 */\ninterface DebounceOptions {\n /** 첫 호출 시 즉시 실행 여부 */\n leading?: boolean;\n\n /** 마지막 호출을 wait 이후 실행할지 여부 */\n trailing?: boolean;\n\n /** 연속 호출 중에도 실행을 보장할 최대 대기 시간 */\n maxWait?: number;\n}\n\n/** throttle에서 노출하는 실행 시점 옵션 */\ntype ThrottleOptions = Pick<DebounceOptions, 'leading' | 'trailing'>;\n\n/**\n * 연속 호출이 멈춘 뒤 지정한 시간만큼 기다렸다가 마지막 호출을 실행한다.\n *\n * @param func 지연 실행할 함수\n * @param wait 호출을 미룰 시간\n * @param options leading, trailing, maxWait 실행 정책\n * @returns 취소와 즉시 실행 제어가 가능한 함수\n */\nfunction debounce<T extends (...args: any[]) => any>(\n func: T,\n wait: number = 0,\n options: DebounceOptions = {},\n): DebouncedFunction<T> {\n let lastArgs: any;\n let lastThis: any;\n let maxWait: number | undefined;\n let result: ReturnType<T>;\n let timerId: ReturnType<typeof setTimeout> | undefined;\n let lastCallTime: number | undefined;\n let lastInvokeTime = 0;\n const { leading = false, trailing = true, maxWait: userMaxWait } = options;\n\n if (typeof func !== 'function') {\n throw new TypeError('Expected a function');\n }\n\n if (typeof userMaxWait === 'number') {\n maxWait = Math.max(userMaxWait, wait);\n }\n\n // 테스트와 런타임에서 같은 시간 기준을 사용하도록 현재 시각 조회를 한곳에 모은다.\n function now(): number {\n return Date.now();\n }\n\n // 마지막 호출 인자와 this를 사용해 실제 함수를 실행하고 대기 상태를 비운다.\n function invokeFunc(time: number) {\n const args = lastArgs;\n const thisArg = lastThis;\n\n lastArgs = undefined;\n lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n // leading 실행 여부와 관계없이 다음 trailing 판단을 위한 타이머를 시작한다.\n function leadingEdge(time: number) {\n lastInvokeTime = time;\n timerId = setTimeout(timerExpired, wait);\n return leading ? invokeFunc(time) : result;\n }\n\n // wait와 maxWait 중 먼저 도달하는 시점을 다음 확인 시각으로 사용한다.\n function remainingWait(time: number): number {\n const timeSinceLastCall = time - (lastCallTime || 0);\n const timeSinceLastInvoke = time - lastInvokeTime;\n const timeWaiting = wait - timeSinceLastCall;\n\n return maxWait !== undefined\n ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n // 첫 호출, wait 경과, 시계 보정, maxWait 도달 여부를 실행 기준으로 삼는다.\n function shouldInvoke(time: number): boolean {\n const timeSinceLastCall = time - (lastCallTime || 0);\n const timeSinceLastInvoke = time - lastInvokeTime;\n\n return (\n lastCallTime === undefined ||\n timeSinceLastCall >= wait ||\n timeSinceLastCall < 0 ||\n (maxWait !== undefined && timeSinceLastInvoke >= maxWait)\n );\n }\n\n // 아직 실행 조건이 아니면 남은 시간만큼 다시 예약한다.\n function timerExpired() {\n const time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n // trailing 정책이 켜져 있고 마지막 호출 정보가 남아 있을 때만 실행한다.\n function trailingEdge(time: number) {\n timerId = undefined;\n\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = undefined;\n lastThis = undefined;\n return result;\n }\n\n // 예약된 타이머와 마지막 호출 정보를 모두 초기화한다.\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = undefined;\n lastCallTime = undefined;\n lastThis = undefined;\n timerId = undefined;\n }\n\n // 예약된 trailing 호출이 있으면 즉시 실행하고, 없으면 마지막 결과를 반환한다.\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n // 호출 정보는 항상 최신 값으로 갱신하고, 실행 가능 여부만 정책으로 판단한다.\n function debounced(this: any, ...args: any[]) {\n const time = now();\n const isInvoking = shouldInvoke(time);\n\n lastArgs = args;\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n\n // maxWait가 있으면 연속 호출 중에도 주기적으로 실제 함수를 실행한다.\n if (maxWait !== undefined) {\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced as DebouncedFunction<T>;\n}\n\n/**\n * 지정한 시간 간격 안에서 함수 실행 빈도를 제한한다.\n *\n * debounce에 maxWait를 적용해 lodash throttle과 같은 기본 정책을 제공한다.\n *\n * @param func 실행 빈도를 제한할 함수\n * @param wait 최소 실행 간격\n * @param options leading과 trailing 실행 여부\n * @returns 취소와 즉시 실행 제어가 가능한 함수\n */\nfunction throttle<T extends (...args: any[]) => any>(\n func: T,\n wait: number = 0,\n options: ThrottleOptions = {},\n): DebouncedFunction<T> {\n return debounce(func, wait, {\n leading: options.leading ?? true,\n trailing: options.trailing ?? true,\n maxWait: wait,\n });\n}\n\nexport { debounce, throttle };\n"],"mappings":"AAsCA,SAASA,EACP,EACA,EAAe,EACf,EAA2B,CAAC,EACN,CACtB,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAAiB,EACf,CAAE,UAAU,GAAO,WAAW,GAAM,QAASC,GAAgBC,EAEnE,GAAI,OAAOC,GAAS,WAClB,MAAU,UAAU,qBAAqB,EAGvC,OAAOF,GAAgB,WACzB,EAAU,KAAK,IAAIA,EAAaG,CAAI,GAItC,SAASC,GAAc,CACrB,OAAO,KAAK,IAAI,CAClB,CAGA,SAASC,EAAW,EAAc,CAChC,IAAMC,EAAOb,EACPc,EAAUb,EAMhB,MAJA,GAAW,IAAA,GACX,EAAW,IAAA,GACX,EAAiBc,EACjB,EAASN,EAAK,MAAMK,EAASD,CAAI,EAC1BV,CACT,CAGA,SAASa,EAAY,EAAc,CAGjC,MAFA,GAAiBD,EACjB,EAAU,WAAWE,EAAcP,CAAI,EAChCQ,EAAUN,EAAWG,CAAI,EAAIZ,CACtC,CAGA,SAASgB,EAAc,EAAsB,CAC3C,IAAMC,EAAoBL,GAAQV,GAAgB,GAC5CgB,EAAsBN,EAAOT,EAC7BgB,EAAcZ,EAAOU,EAE3B,OAAOlB,IAAY,IAAA,GAEfoB,EADA,KAAK,IAAIA,EAAapB,EAAUmB,CAAmB,CAEzD,CAGA,SAASE,EAAa,EAAuB,CAC3C,IAAMH,EAAoBL,GAAQV,GAAgB,GAC5CgB,EAAsBN,EAAOT,EAEnC,OACED,IAAiB,IAAA,IACjBe,GAAqBV,GACrBU,EAAoB,GACnBlB,IAAY,IAAA,IAAamB,GAAuBnB,CAErD,CAGA,SAASe,GAAe,CACtB,IAAMF,EAAOJ,EAAI,EACjB,GAAIY,EAAaR,CAAI,EACnB,OAAOS,EAAaT,CAAI,EAE1B,EAAU,WAAWE,EAAcE,EAAcJ,CAAI,CAAC,CACxD,CAGA,SAASS,EAAa,EAAc,CAQlC,MAPA,GAAU,IAAA,GAENC,GAAYzB,EACPY,EAAWG,CAAI,GAExB,EAAW,IAAA,GACX,EAAW,IAAA,GACJZ,EACT,CAGA,SAASuB,GAAS,CACZtB,IAAY,IAAA,IACd,aAAaA,CAAO,EAEtB,EAAiB,EACjB,EAAW,IAAA,GACX,EAAe,IAAA,GACf,EAAW,IAAA,GACX,EAAU,IAAA,EACZ,CAGA,SAASuB,GAAQ,CACf,OAAOvB,IAAY,IAAA,GAAYD,EAASqB,EAAab,EAAI,CAAC,CAC5D,CAGA,SAASiB,EAAqB,GAAGf,EAAa,CAC5C,IAAME,EAAOJ,EAAI,EACXkB,EAAaN,EAAaR,CAAI,EAOpC,GALA,EAAWF,EAEX,EAAW,KACX,EAAeE,EAEXc,EAAY,CACd,GAAIzB,IAAY,IAAA,GACd,OAAOY,EAAYX,CAAY,EAIjC,GAAIH,IAAY,IAAA,GAGd,OAFA,aAAaE,CAAO,EACpB,EAAU,WAAWa,EAAcP,CAAI,EAChCE,EAAWP,CAAY,CAElC,CAKA,OAHID,IAAY,IAAA,KACd,EAAU,WAAWa,EAAcP,CAAI,GAElCP,CACT,CAIA,MAFA,GAAU,OAASuB,EACnB,EAAU,MAAQC,EACXC,CACT,CAYA,SAASE,EACP,EACA,EAAe,EACf,EAA2B,CAAC,EACN,CACtB,OAAO/B,EAASU,EAAMC,EAAM,CAC1B,QAASF,EAAQ,SAAW,GAC5B,SAAUA,EAAQ,UAAY,GAC9B,QAASE,CACX,CAAC,CACH"}
@@ -0,0 +1,2 @@
1
+ function e(t,n){if(t===n)return!0;let r=typeof t;if(r!==typeof n||r!==`object`||t===null||n===null)return!1;if(Array.isArray(t)&&Array.isArray(n))return t.length===n.length&&t.every((t,r)=>e(t,n[r]));let i=t,a=n,o=Object.keys(i),s=Object.keys(a);return o.length===s.length&&o.every(t=>e(i[t],a[t]))}exports.deepEq=e;
2
+ //# sourceMappingURL=deepEq.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepEq.cjs","names":["deepEq","a","b","t1","item","index","aObj","bObj","aKeys","bKeys","key"],"sources":["../../src/misc/deepEq.ts"],"sourcesContent":["export function deepEq<T>(a: T, b: T): boolean {\n if (a === b) {\n return true; // 같은 참조를 가리키면 true\n }\n\n const t1 = typeof a;\n const t2 = typeof b;\n if (t1 !== t2) {\n // 타입이 다르면 false\n return false;\n }\n\n if (t1 !== 'object' || a === null || b === null) {\n return false; // 하나가 null이거나 객체가 아닌 경우 false\n }\n\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) {\n return false;\n }\n return a.every((item, index) => deepEq(item, b[index]));\n }\n\n const aObj = a as Record<string, unknown>;\n const bObj = b as Record<string, unknown>;\n const aKeys = Object.keys(aObj);\n const bKeys = Object.keys(bObj);\n\n if (aKeys.length !== bKeys.length) {\n return false; // 속성의 개수가 다르면 false\n }\n\n return aKeys.every((key) => deepEq(aObj[key], bObj[key]));\n}\n"],"mappings":"AAAA,SAAgBA,EAAU,EAAM,EAAe,CAC7C,GAAIC,IAAMC,EACR,MAAO,GAGT,IAAMC,EAAK,OAAOF,EAOlB,GALIE,IAAO,OADOD,GAMdC,IAAO,UAAYF,IAAM,MAAQC,IAAM,KACzC,MAAO,GAGT,GAAI,MAAM,QAAQD,CAAC,GAAK,MAAM,QAAQC,CAAC,EAIrC,OAHID,EAAE,SAAWC,EAAE,QAGZD,EAAE,OAAO,EAAM,IAAUD,EAAOI,EAAMF,EAAEG,EAAM,CAAC,EAGxD,IAAMC,EAAOL,EACPM,EAAOL,EACPM,EAAQ,OAAO,KAAKF,CAAI,EACxBG,EAAQ,OAAO,KAAKF,CAAI,EAM9B,OAJIC,EAAM,SAAWC,EAAM,QAIpBD,EAAM,MAAO,GAAQR,EAAOM,EAAKI,GAAMH,EAAKG,EAAI,CAAC,CAC1D"}
@@ -0,0 +1,2 @@
1
+ function e(t,n){if(t===n)return!0;let r=typeof t;if(r!==typeof n||r!==`object`||t===null||n===null)return!1;if(Array.isArray(t)&&Array.isArray(n))return t.length===n.length&&t.every((t,r)=>e(t,n[r]));let i=t,a=n,o=Object.keys(i),s=Object.keys(a);return o.length===s.length&&o.every(t=>e(i[t],a[t]))}export{e as deepEq};
2
+ //# sourceMappingURL=deepEq.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepEq.js","names":["deepEq","a","b","t1","item","index","aObj","bObj","aKeys","bKeys","key"],"sources":["../../src/misc/deepEq.ts"],"sourcesContent":["export function deepEq<T>(a: T, b: T): boolean {\n if (a === b) {\n return true; // 같은 참조를 가리키면 true\n }\n\n const t1 = typeof a;\n const t2 = typeof b;\n if (t1 !== t2) {\n // 타입이 다르면 false\n return false;\n }\n\n if (t1 !== 'object' || a === null || b === null) {\n return false; // 하나가 null이거나 객체가 아닌 경우 false\n }\n\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) {\n return false;\n }\n return a.every((item, index) => deepEq(item, b[index]));\n }\n\n const aObj = a as Record<string, unknown>;\n const bObj = b as Record<string, unknown>;\n const aKeys = Object.keys(aObj);\n const bKeys = Object.keys(bObj);\n\n if (aKeys.length !== bKeys.length) {\n return false; // 속성의 개수가 다르면 false\n }\n\n return aKeys.every((key) => deepEq(aObj[key], bObj[key]));\n}\n"],"mappings":"AAAA,SAAgBA,EAAU,EAAM,EAAe,CAC7C,GAAIC,IAAMC,EACR,MAAO,GAGT,IAAMC,EAAK,OAAOF,EAOlB,GALIE,IAAO,OADOD,GAMdC,IAAO,UAAYF,IAAM,MAAQC,IAAM,KACzC,MAAO,GAGT,GAAI,MAAM,QAAQD,CAAC,GAAK,MAAM,QAAQC,CAAC,EAIrC,OAHID,EAAE,SAAWC,EAAE,QAGZD,EAAE,OAAO,EAAM,IAAUD,EAAOI,EAAMF,EAAEG,EAAM,CAAC,EAGxD,IAAMC,EAAOL,EACPM,EAAOL,EACPM,EAAQ,OAAO,KAAKF,CAAI,EACxBG,EAAQ,OAAO,KAAKF,CAAI,EAM9B,OAJIC,EAAM,SAAWC,EAAM,QAIpBD,EAAM,MAAO,GAAQR,EAAOM,EAAKI,GAAMH,EAAKG,EAAI,CAAC,CAC1D"}
@@ -0,0 +1,2 @@
1
+ const e={parse:e=>e,stringify:e=>e};exports.CODEC_STRING=e;
2
+ //# sourceMappingURL=codec.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec.cjs","names":["CODEC_STRING","value"],"sources":["../../src/persistence/codec.tsx"],"sourcesContent":["/**\n * A codec that can encode and decode values of type V to and from strings.\n * @typeParam V The type of values that can be encoded and decoded.\n */\nexport interface Codec<V> {\n /**\n * Decodes a string value into a value of type V.\n * @param value The value to decode.\n * @returns The decoded value.\n */\n parse: (value: string) => V;\n /**\n * Encodes a value of type V into a string.\n * @param value The value to encode.\n * @returns The encoded value.\n */\n stringify: (value: V) => string;\n}\n\n/**\n * A codec that can encode and decode Date objects to and from strings.\n */\nexport const CODEC_DATE: Codec<Date> = {\n parse: (value) => new Date(value),\n stringify: (value) => value.toISOString(),\n};\n\n/**\n * A codec that can encode and decode Date objects to and from strings, but only the date part.\n */\nexport const CODEC_DATE_ONLY: Codec<Date> = {\n parse: (value) => new Date(value),\n stringify: (value) => value.toISOString().split('T')[0],\n};\n\n/**\n * A codec that can encode and decode numbers to and from strings.\n */\nexport const CODEC_NUMBER: Codec<number> = {\n parse: (value) => Number(value),\n stringify: (value) => String(value),\n};\n\n/**\n * A codec that can encode and decode boolean values to and from strings.\n */\nexport const CODE_BOOLEAN: Codec<boolean> = {\n parse: (value) => value === 'true',\n stringify: (value) => String(value),\n};\n\n/**\n * A codec that can encode and decode JSON values to and from strings.\n */\nexport const CODEC_JSON: Codec<unknown> = {\n parse: (value) => {\n try {\n return JSON.parse(value);\n } catch {\n return null;\n }\n },\n stringify: (value) => JSON.stringify(value),\n};\n\n/**\n * A codec that can encode and decode JSON values to and from strings.\n * If the JSON value is invalid, parsing will fail.\n */\nexport const CODEC_JSON_STRICT: Codec<unknown> = {\n parse: (value) => JSON.parse(value),\n stringify: (value) => JSON.stringify(value),\n};\n\n/**\n * A codec that can encode and decode strings to and from strings.\n */\nexport const CODEC_STRING: Codec<string> = {\n parse: (value) => value,\n stringify: (value) => value,\n};\n"],"mappings":"AA6EA,MAAaA,EAA8B,CACzC,MAAQ,GAAUC,EAClB,UAAY,GAAUA,CACxB"}
@@ -0,0 +1,21 @@
1
+ //#region src/persistence/codec.d.ts
2
+ /**
3
+ * A codec that can encode and decode values of type V to and from strings.
4
+ * @typeParam V The type of values that can be encoded and decoded.
5
+ */
6
+ export interface Codec<V> {
7
+ /**
8
+ * Decodes a string value into a value of type V.
9
+ * @param value The value to decode.
10
+ * @returns The decoded value.
11
+ */
12
+ parse: (value: string) => V;
13
+ /**
14
+ * Encodes a value of type V into a string.
15
+ * @param value The value to encode.
16
+ * @returns The encoded value.
17
+ */
18
+ stringify: (value: V) => string;
19
+ }
20
+ //#endregion
21
+ //# sourceMappingURL=codec.d.cts.map
@@ -0,0 +1,21 @@
1
+ //#region src/persistence/codec.d.ts
2
+ /**
3
+ * A codec that can encode and decode values of type V to and from strings.
4
+ * @typeParam V The type of values that can be encoded and decoded.
5
+ */
6
+ export interface Codec<V> {
7
+ /**
8
+ * Decodes a string value into a value of type V.
9
+ * @param value The value to decode.
10
+ * @returns The decoded value.
11
+ */
12
+ parse: (value: string) => V;
13
+ /**
14
+ * Encodes a value of type V into a string.
15
+ * @param value The value to encode.
16
+ * @returns The encoded value.
17
+ */
18
+ stringify: (value: V) => string;
19
+ }
20
+ //#endregion
21
+ //# sourceMappingURL=codec.d.ts.map
@@ -0,0 +1,2 @@
1
+ const e={parse:e=>e,stringify:e=>e};export{e as CODEC_STRING};
2
+ //# sourceMappingURL=codec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec.js","names":["CODEC_STRING","value"],"sources":["../../src/persistence/codec.tsx"],"sourcesContent":["/**\n * A codec that can encode and decode values of type V to and from strings.\n * @typeParam V The type of values that can be encoded and decoded.\n */\nexport interface Codec<V> {\n /**\n * Decodes a string value into a value of type V.\n * @param value The value to decode.\n * @returns The decoded value.\n */\n parse: (value: string) => V;\n /**\n * Encodes a value of type V into a string.\n * @param value The value to encode.\n * @returns The encoded value.\n */\n stringify: (value: V) => string;\n}\n\n/**\n * A codec that can encode and decode Date objects to and from strings.\n */\nexport const CODEC_DATE: Codec<Date> = {\n parse: (value) => new Date(value),\n stringify: (value) => value.toISOString(),\n};\n\n/**\n * A codec that can encode and decode Date objects to and from strings, but only the date part.\n */\nexport const CODEC_DATE_ONLY: Codec<Date> = {\n parse: (value) => new Date(value),\n stringify: (value) => value.toISOString().split('T')[0],\n};\n\n/**\n * A codec that can encode and decode numbers to and from strings.\n */\nexport const CODEC_NUMBER: Codec<number> = {\n parse: (value) => Number(value),\n stringify: (value) => String(value),\n};\n\n/**\n * A codec that can encode and decode boolean values to and from strings.\n */\nexport const CODE_BOOLEAN: Codec<boolean> = {\n parse: (value) => value === 'true',\n stringify: (value) => String(value),\n};\n\n/**\n * A codec that can encode and decode JSON values to and from strings.\n */\nexport const CODEC_JSON: Codec<unknown> = {\n parse: (value) => {\n try {\n return JSON.parse(value);\n } catch {\n return null;\n }\n },\n stringify: (value) => JSON.stringify(value),\n};\n\n/**\n * A codec that can encode and decode JSON values to and from strings.\n * If the JSON value is invalid, parsing will fail.\n */\nexport const CODEC_JSON_STRICT: Codec<unknown> = {\n parse: (value) => JSON.parse(value),\n stringify: (value) => JSON.stringify(value),\n};\n\n/**\n * A codec that can encode and decode strings to and from strings.\n */\nexport const CODEC_STRING: Codec<string> = {\n parse: (value) => value,\n stringify: (value) => value,\n};\n"],"mappings":"AA6EA,MAAaA,EAA8B,CACzC,MAAQ,GAAUC,EAClB,UAAY,GAAUA,CACxB"}
@@ -0,0 +1,2 @@
1
+ import { DefaultStorageStateoptions, StorageStateInitializer, StorageStateOptions, UseStorageState, UseStorageStateHookResult } from "./useStorageState.cjs";
2
+ export { DefaultStorageStateoptions, StorageStateInitializer, StorageStateOptions, UseStorageState, UseStorageStateHookResult };
@@ -0,0 +1,2 @@
1
+ import { DefaultStorageStateoptions, StorageStateInitializer, StorageStateOptions, UseStorageState, UseStorageStateHookResult } from "./useStorageState.js";
2
+ export { DefaultStorageStateoptions, StorageStateInitializer, StorageStateOptions, UseStorageState, UseStorageStateHookResult };
@@ -0,0 +1,2 @@
1
+ "use client";const e=require("./codec.cjs");let t=require("react");const n=/* @__PURE__ */ new Map;function r(e,t){let r=n.get(e);r||(r=/* @__PURE__ */ new Set,n.set(e,r)),r.add(t)}function i(e,t){let r=n.get(e);r&&(r.delete(t),r.size===0&&n.delete(e))}function a(e){let t=n.get(e);t&&t.forEach(e=>{e()})}if(typeof window<`u`){let e=window.localStorage.setItem;window.localStorage.setItem=function(t,n){let r=e.call(this,t,n);return a(t),r}}function o(e,t,n){if(!t)return()=>{};let a=r=>{r.storageArea===e&&r.key===t&&n()};return window.addEventListener(`storage`,a),r(t,n),()=>{window.removeEventListener(`storage`,a),i(t,n)}}function s(e,t){if(!t)return null;try{return e.getItem(t)}catch{return null}}function c(e,t,n){if(t){try{n===null?e.removeItem(t):e.setItem(t,String(n))}catch{return}a(t)}}const l=[null,()=>{}];function u(){return l}function d(e,t){return t===null?null:e.stringify(t)}function f(e,t){return t===null?null:e.parse(t)}const p=()=>null;function m(n,r,i=null,a){let l=a?.codec??e.CODEC_STRING,[u]=(0,t.useState)(i),m=(0,t.useMemo)(()=>d(l,u),[l,u]),h=(0,t.useCallback)(e=>o(n,r,e),[n,r]),g=(0,t.useCallback)(()=>s(n,r)??m,[n,m,r]),_=(0,t.useSyncExternalStore)(h,g,p),v=(0,t.useMemo)(()=>f(l,_),[l,_]),y=(0,t.useCallback)(e=>{let t=e instanceof Function?e(v):e;c(n,r,d(l,t))},[n,l,v,r]),[b,x]=(0,t.useState)(u);return r?[v,y]:[b,x]}exports.useStorageState=m,exports.useStorageStateServer=u;
2
+ //# sourceMappingURL=useStorageState.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStorageState.cjs","names":["CODEC_STRING","useState","useMemo","useCallback","useSyncExternalStore","require_codec","react","currentTabChangeListeners","onCurrentTabStorageChange","listeners","key","handler","offCurrentTabStorageChange","emitCurrentTabStorageChange","listener","origSetItem","result","value","subscribe","storageHandler","event","area","callback","getSnapshot","setValue","serverValue","useStorageStateServer","encode","codec","decode","getKeyServerSnapshot","useStorageState","options","initialValue","initializer","encodedInitialValue","subscribeKey","getKeySnapshot","encodedStoredValue","storedValue","setStoredValue","valueToStore","nonStoredValue","setNonStoredValue"],"sources":["../../src/persistence/useStorageState.tsx"],"sourcesContent":["'use client';\n\nimport type { Dispatch, SetStateAction } from 'react';\nimport { useCallback, useMemo, useState, useSyncExternalStore } from 'react';\nimport type { Codec } from './codec.js';\nimport { CODEC_STRING } from './codec.js';\n\n// storage events only work across tabs, we'll use an event emitter to announce within the current tab\nconst currentTabChangeListeners = new Map<string, Set<() => void>>();\n\nfunction onCurrentTabStorageChange(key: string, handler: () => void) {\n let listeners = currentTabChangeListeners.get(key);\n\n if (!listeners) {\n listeners = new Set();\n currentTabChangeListeners.set(key, listeners);\n }\n\n listeners.add(handler);\n}\n\nfunction offCurrentTabStorageChange(key: string, handler: () => void) {\n const listeners = currentTabChangeListeners.get(key);\n if (!listeners) {\n return;\n }\n\n listeners.delete(handler);\n\n if (listeners.size === 0) {\n currentTabChangeListeners.delete(key);\n }\n}\n\nfunction emitCurrentTabStorageChange(key: string) {\n const listeners = currentTabChangeListeners.get(key);\n if (listeners) {\n listeners.forEach((listener) => {\n listener();\n });\n }\n}\n\nif (typeof window !== 'undefined') {\n const origSetItem = window.localStorage.setItem;\n window.localStorage.setItem = function setItem(key, value) {\n const result = origSetItem.call(this, key, value);\n emitCurrentTabStorageChange(key);\n return result;\n };\n}\n\nfunction subscribe(area: Storage, key: string | null, callback: () => void): () => void {\n if (!key) {\n return () => {};\n }\n const storageHandler = (event: StorageEvent) => {\n if (event.storageArea === area && event.key === key) {\n callback();\n }\n };\n window.addEventListener('storage', storageHandler);\n onCurrentTabStorageChange(key, callback);\n return () => {\n window.removeEventListener('storage', storageHandler);\n offCurrentTabStorageChange(key, callback);\n };\n}\n\nfunction getSnapshot(area: Storage, key: string | null): string | null {\n if (!key) {\n return null;\n }\n try {\n return area.getItem(key);\n } catch {\n // ignore\n // See https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API#feature-detecting_localstorage\n return null;\n }\n}\n\nfunction setValue(area: Storage, key: string | null, value: string | null) {\n if (!key) {\n return;\n }\n try {\n if (value === null) {\n area.removeItem(key);\n } else {\n area.setItem(key, String(value));\n }\n } catch {\n // ignore\n // See https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API#feature-detecting_localstorage\n return;\n }\n emitCurrentTabStorageChange(key);\n}\n\nexport type StorageStateInitializer<T> = () => T | null;\n\nexport type UseStorageStateHookResult<T> = [T | null, Dispatch<SetStateAction<T | null>>];\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst serverValue: UseStorageStateHookResult<any> = [null, () => {}];\n\nexport function useStorageStateServer<T = string>(): UseStorageStateHookResult<T> {\n return serverValue;\n}\n\nexport interface DefaultStorageStateoptions<T = string> {\n codec?: Codec<T>;\n}\n\nexport interface StorageStateOptions<T> extends DefaultStorageStateoptions<T> {\n codec: Codec<T>;\n}\n\nfunction encode<V>(codec: Codec<V>, value: V | null): string | null {\n return value === null ? null : codec.stringify(value);\n}\n\nfunction decode<V>(codec: Codec<V>, value: string | null): V | null {\n return value === null ? null : codec.parse(value);\n}\n\n// Start with null for the hydration, and then switch to the actual value.\nconst getKeyServerSnapshot = () => null;\n\n/**\n * Sync state to local storage so that it persists through a page refresh. Usage is\n * similar to useState except we pass in a storage key so that we can default\n * to that value on page load instead of the specified initial value.\n *\n * Since the storage API isn't available in server-rendering environments, we\n * return null during SSR and hydration.\n */\nexport function useStorageState(\n area: Storage,\n key: string | null,\n initializer?: string | null | StorageStateInitializer<string>,\n options?: DefaultStorageStateoptions,\n): UseStorageStateHookResult<string>;\n\nexport function useStorageState<T>(\n area: Storage,\n key: string | null,\n initializer: T | null | StorageStateInitializer<T>,\n options: StorageStateOptions<T>,\n): UseStorageStateHookResult<T>;\n\nexport function useStorageState<T = string>(\n area: Storage,\n key: string | null,\n initializer: T | null | StorageStateInitializer<T> = null,\n options?: DefaultStorageStateoptions | StorageStateOptions<T>,\n): UseStorageStateHookResult<T> {\n const codec = (options?.codec ?? CODEC_STRING) as Codec<T>;\n\n const [initialValue] = useState(initializer);\n const encodedInitialValue = useMemo(() => encode(codec, initialValue), [codec, initialValue]);\n\n const subscribeKey = useCallback(\n (callback: () => void) => subscribe(area, key, callback),\n [area, key],\n );\n\n const getKeySnapshot = useCallback<() => string | null>(\n () => getSnapshot(area, key) ?? encodedInitialValue,\n [area, encodedInitialValue, key],\n );\n\n const encodedStoredValue = useSyncExternalStore(\n subscribeKey,\n getKeySnapshot,\n getKeyServerSnapshot,\n );\n\n const storedValue = useMemo(() => decode(codec, encodedStoredValue), [codec, encodedStoredValue]);\n\n const setStoredValue = useCallback(\n (value: SetStateAction<T | null>) => {\n const valueToStore = value instanceof Function ? value(storedValue) : value;\n const encodedValueToStore = encode(codec, valueToStore);\n setValue(area, key, encodedValueToStore);\n },\n [area, codec, storedValue, key],\n );\n\n const [nonStoredValue, setNonStoredValue] = useState(initialValue);\n\n if (!key) {\n return [nonStoredValue, setNonStoredValue];\n }\n\n return [storedValue, setStoredValue];\n}\n\nexport interface UseStorageState {\n /**\n * Sync state to local or session storage so that it persists through a page refresh. Usage is\n * similar to useState except we pass in a storage key that uniquely identifies the value.\n * @param key The key to use for storing the value in local or session storage.\n * @param initializer The initial value to use if the key is not present in storage.\n * @param options Additional options for the storage state.\n */\n (\n key: string | null,\n initializer?: string | null | StorageStateInitializer<string>,\n options?: DefaultStorageStateoptions,\n ): UseStorageStateHookResult<string>;\n\n /**\n * Sync state to local or session storage so that it persists through a page refresh. Usage is\n * similar to useState except we pass in a storage key that uniquely identifies the value.\n * @param key The key to use for storing the value in local or session storage.\n * @param initializer The initial value to use if the key is not present in storage.\n * @param options Additional options for the storage state.\n */\n <T>(\n key: string | null,\n initializer: T | null | StorageStateInitializer<T>,\n options: StorageStateOptions<T>,\n ): UseStorageStateHookResult<T>;\n\n /**\n * Sync state to local or session storage so that it persists through a page refresh. Usage is\n * similar to useState except we pass in a storage key that uniquely identifies the value.\n * @param key The key to use for storing the value in local or session storage.\n * @param initializer The initial value to use if the key is not present in storage.\n * @param options Additional options for the storage state.\n */\n <T>(\n key: string | null,\n initializer?: T | null | StorageStateInitializer<T>,\n options?: StorageStateOptions<T>,\n ): UseStorageStateHookResult<T>;\n}\n"],"mappings":"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"}
@@ -0,0 +1,39 @@
1
+ import { Codec } from "./codec.cjs";
2
+ import { Dispatch, SetStateAction } from "react";
3
+ //#region src/persistence/useStorageState.d.ts
4
+ export type StorageStateInitializer<T> = () => T | null;
5
+ export type UseStorageStateHookResult<T> = [T | null, Dispatch<SetStateAction<T | null>>];
6
+ export interface DefaultStorageStateoptions<T = string> {
7
+ codec?: Codec<T>;
8
+ }
9
+ export interface StorageStateOptions<T> extends DefaultStorageStateoptions<T> {
10
+ codec: Codec<T>;
11
+ }
12
+ export interface UseStorageState {
13
+ /**
14
+ * Sync state to local or session storage so that it persists through a page refresh. Usage is
15
+ * similar to useState except we pass in a storage key that uniquely identifies the value.
16
+ * @param key The key to use for storing the value in local or session storage.
17
+ * @param initializer The initial value to use if the key is not present in storage.
18
+ * @param options Additional options for the storage state.
19
+ */
20
+ (key: string | null, initializer?: string | null | StorageStateInitializer<string>, options?: DefaultStorageStateoptions): UseStorageStateHookResult<string>;
21
+ /**
22
+ * Sync state to local or session storage so that it persists through a page refresh. Usage is
23
+ * similar to useState except we pass in a storage key that uniquely identifies the value.
24
+ * @param key The key to use for storing the value in local or session storage.
25
+ * @param initializer The initial value to use if the key is not present in storage.
26
+ * @param options Additional options for the storage state.
27
+ */
28
+ <T>(key: string | null, initializer: T | null | StorageStateInitializer<T>, options: StorageStateOptions<T>): UseStorageStateHookResult<T>;
29
+ /**
30
+ * Sync state to local or session storage so that it persists through a page refresh. Usage is
31
+ * similar to useState except we pass in a storage key that uniquely identifies the value.
32
+ * @param key The key to use for storing the value in local or session storage.
33
+ * @param initializer The initial value to use if the key is not present in storage.
34
+ * @param options Additional options for the storage state.
35
+ */
36
+ <T>(key: string | null, initializer?: T | null | StorageStateInitializer<T>, options?: StorageStateOptions<T>): UseStorageStateHookResult<T>;
37
+ }
38
+ //#endregion
39
+ //# sourceMappingURL=useStorageState.d.cts.map
@@ -0,0 +1,39 @@
1
+ import { Codec } from "./codec.js";
2
+ import { Dispatch, SetStateAction } from "react";
3
+ //#region src/persistence/useStorageState.d.ts
4
+ export type StorageStateInitializer<T> = () => T | null;
5
+ export type UseStorageStateHookResult<T> = [T | null, Dispatch<SetStateAction<T | null>>];
6
+ export interface DefaultStorageStateoptions<T = string> {
7
+ codec?: Codec<T>;
8
+ }
9
+ export interface StorageStateOptions<T> extends DefaultStorageStateoptions<T> {
10
+ codec: Codec<T>;
11
+ }
12
+ export interface UseStorageState {
13
+ /**
14
+ * Sync state to local or session storage so that it persists through a page refresh. Usage is
15
+ * similar to useState except we pass in a storage key that uniquely identifies the value.
16
+ * @param key The key to use for storing the value in local or session storage.
17
+ * @param initializer The initial value to use if the key is not present in storage.
18
+ * @param options Additional options for the storage state.
19
+ */
20
+ (key: string | null, initializer?: string | null | StorageStateInitializer<string>, options?: DefaultStorageStateoptions): UseStorageStateHookResult<string>;
21
+ /**
22
+ * Sync state to local or session storage so that it persists through a page refresh. Usage is
23
+ * similar to useState except we pass in a storage key that uniquely identifies the value.
24
+ * @param key The key to use for storing the value in local or session storage.
25
+ * @param initializer The initial value to use if the key is not present in storage.
26
+ * @param options Additional options for the storage state.
27
+ */
28
+ <T>(key: string | null, initializer: T | null | StorageStateInitializer<T>, options: StorageStateOptions<T>): UseStorageStateHookResult<T>;
29
+ /**
30
+ * Sync state to local or session storage so that it persists through a page refresh. Usage is
31
+ * similar to useState except we pass in a storage key that uniquely identifies the value.
32
+ * @param key The key to use for storing the value in local or session storage.
33
+ * @param initializer The initial value to use if the key is not present in storage.
34
+ * @param options Additional options for the storage state.
35
+ */
36
+ <T>(key: string | null, initializer?: T | null | StorageStateInitializer<T>, options?: StorageStateOptions<T>): UseStorageStateHookResult<T>;
37
+ }
38
+ //#endregion
39
+ //# sourceMappingURL=useStorageState.d.ts.map
@@ -0,0 +1,2 @@
1
+ "use client";import{CODEC_STRING as e}from"./codec.js";import{useCallback as t,useMemo as n,useState as r,useSyncExternalStore as i}from"react";const a=/* @__PURE__ */ new Map;function o(e,t){let n=a.get(e);n||(n=/* @__PURE__ */ new Set,a.set(e,n)),n.add(t)}function s(e,t){let n=a.get(e);n&&(n.delete(t),n.size===0&&a.delete(e))}function c(e){let t=a.get(e);t&&t.forEach(e=>{e()})}if(typeof window<`u`){let e=window.localStorage.setItem;window.localStorage.setItem=function(t,n){let r=e.call(this,t,n);return c(t),r}}function l(e,t,n){if(!t)return()=>{};let r=r=>{r.storageArea===e&&r.key===t&&n()};return window.addEventListener(`storage`,r),o(t,n),()=>{window.removeEventListener(`storage`,r),s(t,n)}}function u(e,t){if(!t)return null;try{return e.getItem(t)}catch{return null}}function d(e,t,n){if(t){try{n===null?e.removeItem(t):e.setItem(t,String(n))}catch{return}c(t)}}const f=[null,()=>{}];function p(){return f}function m(e,t){return t===null?null:e.stringify(t)}function h(e,t){return t===null?null:e.parse(t)}const g=()=>null;function _(a,o,s=null,c){let f=c?.codec??e,[p]=r(s),_=n(()=>m(f,p),[f,p]),v=t(e=>l(a,o,e),[a,o]),y=t(()=>u(a,o)??_,[a,_,o]),b=i(v,y,g),x=n(()=>h(f,b),[f,b]),S=t(e=>{let t=e instanceof Function?e(x):e;d(a,o,m(f,t))},[a,f,x,o]),[C,w]=r(p);return o?[x,S]:[C,w]}export{_ as useStorageState,p as useStorageStateServer};
2
+ //# sourceMappingURL=useStorageState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStorageState.js","names":["currentTabChangeListeners","onCurrentTabStorageChange","listeners","key","handler","offCurrentTabStorageChange","emitCurrentTabStorageChange","listener","origSetItem","result","value","subscribe","storageHandler","event","area","callback","getSnapshot","setValue","serverValue","useStorageStateServer","encode","codec","decode","getKeyServerSnapshot","useStorageState","options","CODEC_STRING","initialValue","useState","initializer","encodedInitialValue","useMemo","subscribeKey","useCallback","getKeySnapshot","encodedStoredValue","useSyncExternalStore","storedValue","setStoredValue","valueToStore","nonStoredValue","setNonStoredValue"],"sources":["../../src/persistence/useStorageState.tsx"],"sourcesContent":["'use client';\n\nimport type { Dispatch, SetStateAction } from 'react';\nimport { useCallback, useMemo, useState, useSyncExternalStore } from 'react';\nimport type { Codec } from './codec.js';\nimport { CODEC_STRING } from './codec.js';\n\n// storage events only work across tabs, we'll use an event emitter to announce within the current tab\nconst currentTabChangeListeners = new Map<string, Set<() => void>>();\n\nfunction onCurrentTabStorageChange(key: string, handler: () => void) {\n let listeners = currentTabChangeListeners.get(key);\n\n if (!listeners) {\n listeners = new Set();\n currentTabChangeListeners.set(key, listeners);\n }\n\n listeners.add(handler);\n}\n\nfunction offCurrentTabStorageChange(key: string, handler: () => void) {\n const listeners = currentTabChangeListeners.get(key);\n if (!listeners) {\n return;\n }\n\n listeners.delete(handler);\n\n if (listeners.size === 0) {\n currentTabChangeListeners.delete(key);\n }\n}\n\nfunction emitCurrentTabStorageChange(key: string) {\n const listeners = currentTabChangeListeners.get(key);\n if (listeners) {\n listeners.forEach((listener) => {\n listener();\n });\n }\n}\n\nif (typeof window !== 'undefined') {\n const origSetItem = window.localStorage.setItem;\n window.localStorage.setItem = function setItem(key, value) {\n const result = origSetItem.call(this, key, value);\n emitCurrentTabStorageChange(key);\n return result;\n };\n}\n\nfunction subscribe(area: Storage, key: string | null, callback: () => void): () => void {\n if (!key) {\n return () => {};\n }\n const storageHandler = (event: StorageEvent) => {\n if (event.storageArea === area && event.key === key) {\n callback();\n }\n };\n window.addEventListener('storage', storageHandler);\n onCurrentTabStorageChange(key, callback);\n return () => {\n window.removeEventListener('storage', storageHandler);\n offCurrentTabStorageChange(key, callback);\n };\n}\n\nfunction getSnapshot(area: Storage, key: string | null): string | null {\n if (!key) {\n return null;\n }\n try {\n return area.getItem(key);\n } catch {\n // ignore\n // See https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API#feature-detecting_localstorage\n return null;\n }\n}\n\nfunction setValue(area: Storage, key: string | null, value: string | null) {\n if (!key) {\n return;\n }\n try {\n if (value === null) {\n area.removeItem(key);\n } else {\n area.setItem(key, String(value));\n }\n } catch {\n // ignore\n // See https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API#feature-detecting_localstorage\n return;\n }\n emitCurrentTabStorageChange(key);\n}\n\nexport type StorageStateInitializer<T> = () => T | null;\n\nexport type UseStorageStateHookResult<T> = [T | null, Dispatch<SetStateAction<T | null>>];\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst serverValue: UseStorageStateHookResult<any> = [null, () => {}];\n\nexport function useStorageStateServer<T = string>(): UseStorageStateHookResult<T> {\n return serverValue;\n}\n\nexport interface DefaultStorageStateoptions<T = string> {\n codec?: Codec<T>;\n}\n\nexport interface StorageStateOptions<T> extends DefaultStorageStateoptions<T> {\n codec: Codec<T>;\n}\n\nfunction encode<V>(codec: Codec<V>, value: V | null): string | null {\n return value === null ? null : codec.stringify(value);\n}\n\nfunction decode<V>(codec: Codec<V>, value: string | null): V | null {\n return value === null ? null : codec.parse(value);\n}\n\n// Start with null for the hydration, and then switch to the actual value.\nconst getKeyServerSnapshot = () => null;\n\n/**\n * Sync state to local storage so that it persists through a page refresh. Usage is\n * similar to useState except we pass in a storage key so that we can default\n * to that value on page load instead of the specified initial value.\n *\n * Since the storage API isn't available in server-rendering environments, we\n * return null during SSR and hydration.\n */\nexport function useStorageState(\n area: Storage,\n key: string | null,\n initializer?: string | null | StorageStateInitializer<string>,\n options?: DefaultStorageStateoptions,\n): UseStorageStateHookResult<string>;\n\nexport function useStorageState<T>(\n area: Storage,\n key: string | null,\n initializer: T | null | StorageStateInitializer<T>,\n options: StorageStateOptions<T>,\n): UseStorageStateHookResult<T>;\n\nexport function useStorageState<T = string>(\n area: Storage,\n key: string | null,\n initializer: T | null | StorageStateInitializer<T> = null,\n options?: DefaultStorageStateoptions | StorageStateOptions<T>,\n): UseStorageStateHookResult<T> {\n const codec = (options?.codec ?? CODEC_STRING) as Codec<T>;\n\n const [initialValue] = useState(initializer);\n const encodedInitialValue = useMemo(() => encode(codec, initialValue), [codec, initialValue]);\n\n const subscribeKey = useCallback(\n (callback: () => void) => subscribe(area, key, callback),\n [area, key],\n );\n\n const getKeySnapshot = useCallback<() => string | null>(\n () => getSnapshot(area, key) ?? encodedInitialValue,\n [area, encodedInitialValue, key],\n );\n\n const encodedStoredValue = useSyncExternalStore(\n subscribeKey,\n getKeySnapshot,\n getKeyServerSnapshot,\n );\n\n const storedValue = useMemo(() => decode(codec, encodedStoredValue), [codec, encodedStoredValue]);\n\n const setStoredValue = useCallback(\n (value: SetStateAction<T | null>) => {\n const valueToStore = value instanceof Function ? value(storedValue) : value;\n const encodedValueToStore = encode(codec, valueToStore);\n setValue(area, key, encodedValueToStore);\n },\n [area, codec, storedValue, key],\n );\n\n const [nonStoredValue, setNonStoredValue] = useState(initialValue);\n\n if (!key) {\n return [nonStoredValue, setNonStoredValue];\n }\n\n return [storedValue, setStoredValue];\n}\n\nexport interface UseStorageState {\n /**\n * Sync state to local or session storage so that it persists through a page refresh. Usage is\n * similar to useState except we pass in a storage key that uniquely identifies the value.\n * @param key The key to use for storing the value in local or session storage.\n * @param initializer The initial value to use if the key is not present in storage.\n * @param options Additional options for the storage state.\n */\n (\n key: string | null,\n initializer?: string | null | StorageStateInitializer<string>,\n options?: DefaultStorageStateoptions,\n ): UseStorageStateHookResult<string>;\n\n /**\n * Sync state to local or session storage so that it persists through a page refresh. Usage is\n * similar to useState except we pass in a storage key that uniquely identifies the value.\n * @param key The key to use for storing the value in local or session storage.\n * @param initializer The initial value to use if the key is not present in storage.\n * @param options Additional options for the storage state.\n */\n <T>(\n key: string | null,\n initializer: T | null | StorageStateInitializer<T>,\n options: StorageStateOptions<T>,\n ): UseStorageStateHookResult<T>;\n\n /**\n * Sync state to local or session storage so that it persists through a page refresh. Usage is\n * similar to useState except we pass in a storage key that uniquely identifies the value.\n * @param key The key to use for storing the value in local or session storage.\n * @param initializer The initial value to use if the key is not present in storage.\n * @param options Additional options for the storage state.\n */\n <T>(\n key: string | null,\n initializer?: T | null | StorageStateInitializer<T>,\n options?: StorageStateOptions<T>,\n ): UseStorageStateHookResult<T>;\n}\n"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ const e=require("../eventemitter/eventemitter3.cjs");let t=require("rxjs");var n=class n{#e=/* @__PURE__ */ new Set;#t;#n=new e.EventEmitter;get events(){return this.#n}get closeTrigger$(){return this.#t||=new t.Subject,this.#t}add=(...e)=>(e.forEach(e=>{this.#e.add(e)}),this);remove=(...e)=>(e.forEach(e=>{this.#e.delete(e)}),this);addRx=(...e)=>(e.forEach(e=>{this.#e.add(()=>{e.unsubscribe()})}),this);addUnsubscribe=this.addRx;addClose=(...e)=>(e.forEach(e=>{this.#e.add(()=>{e.close()})}),this);addDispose=(...e)=>(e.forEach(e=>{this.#e.add(()=>{e.dispose()})}),this);addDestroy=(...e)=>(e.forEach(e=>{this.#e.add(()=>{e.destroy()})}),this);addShutdown=(...e)=>(e.forEach(e=>{this.#e.add(()=>{e.shutdown()})}),this);addTerminate=(...e)=>(e.forEach(e=>{this.#e.add(()=>{e.terminate()})}),this);addElementListener=(e,t,n,r)=>(e.addEventListener(t,n,r),this.#e.add(()=>{e.removeEventListener(t,n,r)}),this);addDocumentListener=(e,t,n)=>(document.addEventListener(e,t,n),this.#e.add(()=>{document.removeEventListener(e,t,n)}),this);addWindowListener=(e,t,n)=>(window.addEventListener(e,t,n),this.#e.add(()=>{window.removeEventListener(e,t,n)}),this);get count(){return this.#e.size}close=()=>{this.#n.emit(`closed`),this.#n.removeAllListeners(),this.#t&&=(this.#t.next(1),void 0),this.#e.size>0&&(Array.from(this.#e).forEach(e=>{e()}),this.#e.clear())};static create=(...e)=>{let t=new n;return t.add(...e),t};static createWindowListener=(e,t,r)=>{let i=new n;return i.addWindowListener(e,t,r),i};static createDocumentListener=(e,t,r)=>{let i=new n;return i.addDocumentListener(e,t,r),i};static createElementListener=(e,t,r,i)=>{let a=new n;return a.addElementListener(e,t,r,i),a};static createRx=(...e)=>{let t=new n;return t.addRx(...e),t};static createClose=(...e)=>{let t=new n;return t.addClose(...e),t};static createTerminate=(...e)=>{let t=new n;return t.addTerminate(...e),t};static createShutdown=(...e)=>{let t=new n;return t.addShutdown(...e),t};static createDestroy=(...e)=>{let t=new n;return t.addDestroy(...e),t};static createDispose=(...e)=>{let t=new n;return t.addDispose(...e),t}};exports.Closables=n;
2
+ //# sourceMappingURL=closables.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"closables.cjs","names":["EventEmitter","Subject","require_eventemitter3","rxjs","Closables","#events","#closeTrigger$","closables","#store","it","s","elem","type","listener","options","fn","c"],"sources":["../../src/util/closables.ts"],"sourcesContent":["import { Subject } from 'rxjs';\nimport { EventEmitter } from '../eventemitter/eventemitter3.js';\n\ntype WinEventType = keyof WindowEventMap;\ntype WinEventListener<K extends WinEventType> = (this: Window, ev: WindowEventMap[K]) => void;\ntype EventOptions = boolean | AddEventListenerOptions;\n\ntype DocEventType = keyof DocumentEventMap;\n\ntype DocEventListener<K extends DocEventType> = (this: Document, ev: DocumentEventMap[K]) => void;\n\ntype ElemEventType = keyof HTMLElementEventMap;\ntype ElemEventListener<K extends ElemEventType> = (\n this: HTMLElement,\n ev: HTMLElementEventMap[K],\n) => void;\n\nexport class Closables {\n #store = new Set<() => void>();\n #closeTrigger$: Subject<unknown> | undefined;\n #events = new EventEmitter<{ closed: () => void }>();\n\n get events() {\n return this.#events;\n }\n\n get closeTrigger$(): Subject<unknown> {\n if (!this.#closeTrigger$) {\n this.#closeTrigger$ = new Subject();\n }\n return this.#closeTrigger$;\n }\n\n add = (...closables: (() => void)[]): this => {\n closables.forEach((it) => {\n this.#store.add(it);\n });\n return this;\n };\n\n remove = (...closables: (() => void)[]): this => {\n closables.forEach((it) => {\n this.#store.delete(it);\n });\n return this;\n };\n\n addRx = (...closables: Array<{ unsubscribe: () => void }>): this => {\n closables.forEach((s) => {\n this.#store.add(() => {\n s.unsubscribe();\n });\n });\n return this;\n };\n\n addUnsubscribe = this.addRx;\n\n addClose = (...closables: Array<{ close: () => void }>): this => {\n closables.forEach((s) => {\n this.#store.add(() => {\n s.close();\n });\n });\n return this;\n };\n\n addDispose = (...closables: Array<{ dispose: () => void }>): this => {\n closables.forEach((s) => {\n this.#store.add(() => {\n s.dispose();\n });\n });\n return this;\n };\n\n addDestroy = (...closables: Array<{ destroy: () => void }>): this => {\n closables.forEach((s) => {\n this.#store.add(() => {\n s.destroy();\n });\n });\n return this;\n };\n\n addShutdown = (...closables: Array<{ shutdown: () => void }>): this => {\n closables.forEach((s) => {\n this.#store.add(() => {\n s.shutdown();\n });\n });\n return this;\n };\n\n addTerminate = (...closables: Array<{ terminate: () => void }>): this => {\n closables.forEach((s) => {\n this.#store.add(() => {\n s.terminate();\n });\n });\n return this;\n };\n\n addElementListener = <K extends ElemEventType>(\n elem: HTMLElement,\n type: K,\n listener: ElemEventListener<K>,\n options?: EventOptions,\n ): this => {\n elem.addEventListener(type, listener, options);\n this.#store.add(() => {\n elem.removeEventListener(type, listener, options);\n });\n return this;\n };\n\n addDocumentListener = <K extends DocEventType>(\n type: K,\n listener: DocEventListener<K>,\n options?: EventOptions,\n ): this => {\n document.addEventListener(type, listener, options);\n this.#store.add(() => {\n document.removeEventListener(type, listener, options);\n });\n return this;\n };\n\n addWindowListener = <K extends WinEventType>(\n type: K,\n listener: WinEventListener<K>,\n options?: EventOptions,\n ): this => {\n window.addEventListener(type, listener, options);\n this.#store.add(() => {\n window.removeEventListener(type, listener, options);\n });\n return this;\n };\n\n get count() {\n return this.#store.size;\n }\n\n close = () => {\n this.#events.emit('closed');\n this.#events.removeAllListeners();\n if (this.#closeTrigger$) {\n this.#closeTrigger$.next(1);\n this.#closeTrigger$ = undefined;\n }\n\n if (this.#store.size > 0) {\n Array.from(this.#store).forEach((fn) => {\n fn();\n });\n this.#store.clear();\n }\n };\n\n static create = (...closables: (() => void)[]) => {\n const c = new Closables();\n c.add(...closables);\n return c;\n };\n\n static createWindowListener = <K extends WinEventType>(\n type: K,\n listener: WinEventListener<K>,\n options?: EventOptions,\n ) => {\n const c = new Closables();\n c.addWindowListener(type, listener, options);\n return c;\n };\n\n static createDocumentListener = <K extends DocEventType>(\n type: K,\n listener: DocEventListener<K>,\n options?: EventOptions,\n ) => {\n const c = new Closables();\n c.addDocumentListener(type, listener, options);\n return c;\n };\n\n static createElementListener = <K extends ElemEventType>(\n elem: HTMLElement,\n type: K,\n listener: ElemEventListener<K>,\n options?: EventOptions,\n ) => {\n const c = new Closables();\n c.addElementListener(elem, type, listener, options);\n return c;\n };\n\n static createRx = (...closables: { unsubscribe: () => void }[]) => {\n const c = new Closables();\n c.addRx(...closables);\n return c;\n };\n\n static createClose = (...closables: { close: () => void }[]) => {\n const c = new Closables();\n c.addClose(...closables);\n return c;\n };\n\n static createTerminate = (...closables: { terminate: () => void }[]) => {\n const c = new Closables();\n c.addTerminate(...closables);\n return c;\n };\n\n static createShutdown = (...closables: { shutdown: () => void }[]) => {\n const c = new Closables();\n c.addShutdown(...closables);\n return c;\n };\n\n static createDestroy = (...closables: { destroy: () => void }[]) => {\n const c = new Closables();\n c.addDestroy(...closables);\n return c;\n };\n\n static createDispose = (...closables: { dispose: () => void }[]) => {\n const c = new Closables();\n c.addDispose(...closables);\n return c;\n };\n}\n"],"mappings":"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"}
@@ -0,0 +1,69 @@
1
+ import { EventEmitter } from "../eventemitter/eventemitter3.cjs";
2
+ import { Subject } from "rxjs";
3
+ //#region src/util/closables.d.ts
4
+ type WinEventType = keyof WindowEventMap;
5
+ type WinEventListener<K extends WinEventType> = (this: Window, ev: WindowEventMap[K]) => void;
6
+ type EventOptions = boolean | AddEventListenerOptions;
7
+ type DocEventType = keyof DocumentEventMap;
8
+ type DocEventListener<K extends DocEventType> = (this: Document, ev: DocumentEventMap[K]) => void;
9
+ type ElemEventType = keyof HTMLElementEventMap;
10
+ type ElemEventListener<K extends ElemEventType> = (this: HTMLElement, ev: HTMLElementEventMap[K]) => void;
11
+ export declare class Closables {
12
+ #private;
13
+ get events(): EventEmitter<{
14
+ closed: () => void;
15
+ }, any>;
16
+ get closeTrigger$(): Subject<unknown>;
17
+ add: (...closables: (() => void)[]) => this;
18
+ remove: (...closables: (() => void)[]) => this;
19
+ addRx: (...closables: Array<{
20
+ unsubscribe: () => void;
21
+ }>) => this;
22
+ addUnsubscribe: (...closables: Array<{
23
+ unsubscribe: () => void;
24
+ }>) => this;
25
+ addClose: (...closables: Array<{
26
+ close: () => void;
27
+ }>) => this;
28
+ addDispose: (...closables: Array<{
29
+ dispose: () => void;
30
+ }>) => this;
31
+ addDestroy: (...closables: Array<{
32
+ destroy: () => void;
33
+ }>) => this;
34
+ addShutdown: (...closables: Array<{
35
+ shutdown: () => void;
36
+ }>) => this;
37
+ addTerminate: (...closables: Array<{
38
+ terminate: () => void;
39
+ }>) => this;
40
+ addElementListener: <K extends ElemEventType>(elem: HTMLElement, type: K, listener: ElemEventListener<K>, options?: EventOptions) => this;
41
+ addDocumentListener: <K extends DocEventType>(type: K, listener: DocEventListener<K>, options?: EventOptions) => this;
42
+ addWindowListener: <K extends WinEventType>(type: K, listener: WinEventListener<K>, options?: EventOptions) => this;
43
+ get count(): number;
44
+ close: () => void;
45
+ static create: (...closables: (() => void)[]) => Closables;
46
+ static createWindowListener: <K extends WinEventType>(type: K, listener: WinEventListener<K>, options?: EventOptions) => Closables;
47
+ static createDocumentListener: <K extends DocEventType>(type: K, listener: DocEventListener<K>, options?: EventOptions) => Closables;
48
+ static createElementListener: <K extends ElemEventType>(elem: HTMLElement, type: K, listener: ElemEventListener<K>, options?: EventOptions) => Closables;
49
+ static createRx: (...closables: {
50
+ unsubscribe: () => void;
51
+ }[]) => Closables;
52
+ static createClose: (...closables: {
53
+ close: () => void;
54
+ }[]) => Closables;
55
+ static createTerminate: (...closables: {
56
+ terminate: () => void;
57
+ }[]) => Closables;
58
+ static createShutdown: (...closables: {
59
+ shutdown: () => void;
60
+ }[]) => Closables;
61
+ static createDestroy: (...closables: {
62
+ destroy: () => void;
63
+ }[]) => Closables;
64
+ static createDispose: (...closables: {
65
+ dispose: () => void;
66
+ }[]) => Closables;
67
+ }
68
+ //#endregion
69
+ //# sourceMappingURL=closables.d.cts.map
@@ -0,0 +1,69 @@
1
+ import { EventEmitter } from "../eventemitter/eventemitter3.js";
2
+ import { Subject } from "rxjs";
3
+ //#region src/util/closables.d.ts
4
+ type WinEventType = keyof WindowEventMap;
5
+ type WinEventListener<K extends WinEventType> = (this: Window, ev: WindowEventMap[K]) => void;
6
+ type EventOptions = boolean | AddEventListenerOptions;
7
+ type DocEventType = keyof DocumentEventMap;
8
+ type DocEventListener<K extends DocEventType> = (this: Document, ev: DocumentEventMap[K]) => void;
9
+ type ElemEventType = keyof HTMLElementEventMap;
10
+ type ElemEventListener<K extends ElemEventType> = (this: HTMLElement, ev: HTMLElementEventMap[K]) => void;
11
+ export declare class Closables {
12
+ #private;
13
+ get events(): EventEmitter<{
14
+ closed: () => void;
15
+ }, any>;
16
+ get closeTrigger$(): Subject<unknown>;
17
+ add: (...closables: (() => void)[]) => this;
18
+ remove: (...closables: (() => void)[]) => this;
19
+ addRx: (...closables: Array<{
20
+ unsubscribe: () => void;
21
+ }>) => this;
22
+ addUnsubscribe: (...closables: Array<{
23
+ unsubscribe: () => void;
24
+ }>) => this;
25
+ addClose: (...closables: Array<{
26
+ close: () => void;
27
+ }>) => this;
28
+ addDispose: (...closables: Array<{
29
+ dispose: () => void;
30
+ }>) => this;
31
+ addDestroy: (...closables: Array<{
32
+ destroy: () => void;
33
+ }>) => this;
34
+ addShutdown: (...closables: Array<{
35
+ shutdown: () => void;
36
+ }>) => this;
37
+ addTerminate: (...closables: Array<{
38
+ terminate: () => void;
39
+ }>) => this;
40
+ addElementListener: <K extends ElemEventType>(elem: HTMLElement, type: K, listener: ElemEventListener<K>, options?: EventOptions) => this;
41
+ addDocumentListener: <K extends DocEventType>(type: K, listener: DocEventListener<K>, options?: EventOptions) => this;
42
+ addWindowListener: <K extends WinEventType>(type: K, listener: WinEventListener<K>, options?: EventOptions) => this;
43
+ get count(): number;
44
+ close: () => void;
45
+ static create: (...closables: (() => void)[]) => Closables;
46
+ static createWindowListener: <K extends WinEventType>(type: K, listener: WinEventListener<K>, options?: EventOptions) => Closables;
47
+ static createDocumentListener: <K extends DocEventType>(type: K, listener: DocEventListener<K>, options?: EventOptions) => Closables;
48
+ static createElementListener: <K extends ElemEventType>(elem: HTMLElement, type: K, listener: ElemEventListener<K>, options?: EventOptions) => Closables;
49
+ static createRx: (...closables: {
50
+ unsubscribe: () => void;
51
+ }[]) => Closables;
52
+ static createClose: (...closables: {
53
+ close: () => void;
54
+ }[]) => Closables;
55
+ static createTerminate: (...closables: {
56
+ terminate: () => void;
57
+ }[]) => Closables;
58
+ static createShutdown: (...closables: {
59
+ shutdown: () => void;
60
+ }[]) => Closables;
61
+ static createDestroy: (...closables: {
62
+ destroy: () => void;
63
+ }[]) => Closables;
64
+ static createDispose: (...closables: {
65
+ dispose: () => void;
66
+ }[]) => Closables;
67
+ }
68
+ //#endregion
69
+ //# sourceMappingURL=closables.d.ts.map
@@ -0,0 +1,2 @@
1
+ import{EventEmitter as e}from"../eventemitter/eventemitter3.js";import{Subject as t}from"rxjs";var n=class n{#e=/* @__PURE__ */ new Set;#t;#n=new e;get events(){return this.#n}get closeTrigger$(){return this.#t||=new t,this.#t}add=(...e)=>(e.forEach(e=>{this.#e.add(e)}),this);remove=(...e)=>(e.forEach(e=>{this.#e.delete(e)}),this);addRx=(...e)=>(e.forEach(e=>{this.#e.add(()=>{e.unsubscribe()})}),this);addUnsubscribe=this.addRx;addClose=(...e)=>(e.forEach(e=>{this.#e.add(()=>{e.close()})}),this);addDispose=(...e)=>(e.forEach(e=>{this.#e.add(()=>{e.dispose()})}),this);addDestroy=(...e)=>(e.forEach(e=>{this.#e.add(()=>{e.destroy()})}),this);addShutdown=(...e)=>(e.forEach(e=>{this.#e.add(()=>{e.shutdown()})}),this);addTerminate=(...e)=>(e.forEach(e=>{this.#e.add(()=>{e.terminate()})}),this);addElementListener=(e,t,n,r)=>(e.addEventListener(t,n,r),this.#e.add(()=>{e.removeEventListener(t,n,r)}),this);addDocumentListener=(e,t,n)=>(document.addEventListener(e,t,n),this.#e.add(()=>{document.removeEventListener(e,t,n)}),this);addWindowListener=(e,t,n)=>(window.addEventListener(e,t,n),this.#e.add(()=>{window.removeEventListener(e,t,n)}),this);get count(){return this.#e.size}close=()=>{this.#n.emit(`closed`),this.#n.removeAllListeners(),this.#t&&=(this.#t.next(1),void 0),this.#e.size>0&&(Array.from(this.#e).forEach(e=>{e()}),this.#e.clear())};static create=(...e)=>{let t=new n;return t.add(...e),t};static createWindowListener=(e,t,r)=>{let i=new n;return i.addWindowListener(e,t,r),i};static createDocumentListener=(e,t,r)=>{let i=new n;return i.addDocumentListener(e,t,r),i};static createElementListener=(e,t,r,i)=>{let a=new n;return a.addElementListener(e,t,r,i),a};static createRx=(...e)=>{let t=new n;return t.addRx(...e),t};static createClose=(...e)=>{let t=new n;return t.addClose(...e),t};static createTerminate=(...e)=>{let t=new n;return t.addTerminate(...e),t};static createShutdown=(...e)=>{let t=new n;return t.addShutdown(...e),t};static createDestroy=(...e)=>{let t=new n;return t.addDestroy(...e),t};static createDispose=(...e)=>{let t=new n;return t.addDispose(...e),t}};export{n as Closables};
2
+ //# sourceMappingURL=closables.js.map