yummies 5.7.0 → 5.8.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 (393) hide show
  1. package/async.js +26 -59
  2. package/async.js.map +1 -0
  3. package/common.d.ts +1 -1
  4. package/common.d.ts.map +1 -1
  5. package/common.js +5 -13
  6. package/common.js.map +1 -0
  7. package/complex/global-config.d.ts +1 -1
  8. package/complex/global-config.d.ts.map +1 -1
  9. package/complex/index.d.ts +3 -3
  10. package/complex/index.d.ts.map +1 -1
  11. package/complex/modules-factory.d.ts +1 -1
  12. package/complex/modules-factory.d.ts.map +1 -1
  13. package/complex.js +66 -0
  14. package/complex.js.map +1 -0
  15. package/cookie.d.ts +1 -1
  16. package/cookie.d.ts.map +1 -1
  17. package/cookie.js +4 -8
  18. package/cookie.js.map +1 -0
  19. package/css.d.ts +1 -1
  20. package/css.js +2780 -49
  21. package/css.js.map +1 -0
  22. package/data.js +32 -50
  23. package/data.js.map +1 -0
  24. package/date-time.d.ts +2 -3
  25. package/date-time.d.ts.map +1 -1
  26. package/date-time.js +588 -154
  27. package/date-time.js.map +1 -0
  28. package/device.js +23 -20
  29. package/device.js.map +1 -0
  30. package/encodings.js +269 -265
  31. package/encodings.js.map +1 -0
  32. package/errors.d.ts +1 -1
  33. package/errors.d.ts.map +1 -1
  34. package/errors.js +8 -29
  35. package/errors.js.map +1 -0
  36. package/file.js +19 -23
  37. package/file.js.map +1 -0
  38. package/format/_exports.d.ts +4 -4
  39. package/format/_exports.d.ts.map +1 -1
  40. package/format/index.d.ts +1 -1
  41. package/format/index.d.ts.map +1 -1
  42. package/format/number.d.ts +1 -1
  43. package/format/number.d.ts.map +1 -1
  44. package/format/percent.d.ts +2 -2
  45. package/format/percent.d.ts.map +1 -1
  46. package/format.js +27 -0
  47. package/format.js.map +1 -0
  48. package/html.d.ts +2 -2
  49. package/html.d.ts.map +1 -1
  50. package/html.js +636 -169
  51. package/html.js.map +1 -0
  52. package/id.js +25 -70
  53. package/id.js.map +1 -0
  54. package/imports.js +22 -37
  55. package/imports.js.map +1 -0
  56. package/math.d.ts +1 -1
  57. package/math.d.ts.map +1 -1
  58. package/math.js +10 -14
  59. package/math.js.map +1 -0
  60. package/media.js +54 -96
  61. package/media.js.map +1 -0
  62. package/mobx/apply-observable.d.ts +1 -1
  63. package/mobx/apply-observable.d.ts.map +1 -1
  64. package/mobx/create-enhanced-atom.d.ts +2 -2
  65. package/mobx/create-enhanced-atom.d.ts.map +1 -1
  66. package/mobx/deep-observable-struct.d.ts +1 -1
  67. package/mobx/deep-observable-struct.d.ts.map +1 -1
  68. package/mobx/get-mobx-administration.d.ts +2 -2
  69. package/mobx/get-mobx-administration.d.ts.map +1 -1
  70. package/mobx/index.d.ts +5 -5
  71. package/mobx/index.d.ts.map +1 -1
  72. package/mobx/lazy-observe.d.ts +6 -0
  73. package/mobx/lazy-observe.d.ts.map +1 -1
  74. package/mobx.js +89 -0
  75. package/mobx.js.map +1 -0
  76. package/ms.js +12 -17
  77. package/ms.js.map +1 -0
  78. package/number.js +9 -12
  79. package/number.js.map +1 -0
  80. package/package.json +93 -92
  81. package/parser/_exports.d.ts +3 -3
  82. package/parser/_exports.d.ts.map +1 -1
  83. package/parser/index.d.ts +1 -1
  84. package/parser/index.d.ts.map +1 -1
  85. package/parser/number.d.ts +1 -1
  86. package/parser/number.d.ts.map +1 -1
  87. package/parser/percent.d.ts +2 -2
  88. package/parser/percent.d.ts.map +1 -1
  89. package/parser/string.d.ts +1 -1
  90. package/parser/string.d.ts.map +1 -1
  91. package/parser.js +15 -0
  92. package/parser.js.map +1 -0
  93. package/price.js +13 -16
  94. package/price.js.map +1 -0
  95. package/random.js +11 -13
  96. package/random.js.map +1 -0
  97. package/react/hooks/index.d.ts +21 -21
  98. package/react/hooks/index.d.ts.map +1 -1
  99. package/react/hooks/use-click-outside.d.ts +1 -1
  100. package/react/hooks/use-define-ref.d.ts +1 -1
  101. package/react/hooks/use-element-ref.d.ts +1 -1
  102. package/react/hooks/use-event.d.ts +1 -1
  103. package/react/hooks/use-event.d.ts.map +1 -1
  104. package/react/hooks/use-initial-height.d.ts +1 -1
  105. package/react/hooks/use-last-value-ref.d.ts +1 -1
  106. package/react/hooks/use-resize-observer.d.ts +1 -1
  107. package/react/hooks/use-sync-ref.d.ts +1 -1
  108. package/react/hooks/use-toggle.d.ts +1 -1
  109. package/react/hooks/use-value.d.ts +1 -1
  110. package/react/index.d.ts +1 -1
  111. package/react/index.d.ts.map +1 -1
  112. package/react.js +152 -0
  113. package/react.js.map +1 -0
  114. package/sound.js +7 -11
  115. package/sound.js.map +1 -0
  116. package/text.js +20 -46
  117. package/text.js.map +1 -0
  118. package/type-guard/_exports.d.ts +1 -1
  119. package/type-guard/_exports.d.ts.map +1 -1
  120. package/type-guard/index.d.ts +1 -1
  121. package/type-guard/index.d.ts.map +1 -1
  122. package/type-guard.js +5 -0
  123. package/type-guard.js.map +1 -0
  124. package/utility-types.d.ts.map +1 -0
  125. package/utility-types.js +2 -0
  126. package/utility-types.js.map +1 -0
  127. package/utils/types.js +2 -1
  128. package/utils/types.js.map +1 -0
  129. package/vibrate.js +6 -7
  130. package/vibrate.js.map +1 -0
  131. package/~index-C3wKHvHr.js +80 -0
  132. package/~index-C3wKHvHr.js.map +1 -0
  133. package/~number-EWff2XI6.js +25 -0
  134. package/~number-EWff2XI6.js.map +1 -0
  135. package/~number-baxVnzrJ.js +32 -0
  136. package/~number-baxVnzrJ.js.map +1 -0
  137. package/async.cjs +0 -70
  138. package/async.d.cts +0 -28
  139. package/async.d.cts.map +0 -1
  140. package/common.cjs +0 -18
  141. package/common.d.cts +0 -15
  142. package/common.d.cts.map +0 -1
  143. package/complex/counter.cjs +0 -21
  144. package/complex/counter.d.cts +0 -15
  145. package/complex/counter.d.cts.map +0 -1
  146. package/complex/counter.js +0 -17
  147. package/complex/global-config.cjs +0 -46
  148. package/complex/global-config.d.cts +0 -11
  149. package/complex/global-config.d.cts.map +0 -1
  150. package/complex/global-config.js +0 -41
  151. package/complex/index.cjs +0 -19
  152. package/complex/index.d.cts +0 -4
  153. package/complex/index.d.cts.map +0 -1
  154. package/complex/index.js +0 -3
  155. package/complex/modules-factory.cjs +0 -50
  156. package/complex/modules-factory.d.cts +0 -49
  157. package/complex/modules-factory.d.cts.map +0 -1
  158. package/complex/modules-factory.js +0 -46
  159. package/cookie.cjs +0 -13
  160. package/cookie.d.cts +0 -3
  161. package/cookie.d.cts.map +0 -1
  162. package/css.cjs +0 -64
  163. package/css.d.cts +0 -42
  164. package/css.d.cts.map +0 -1
  165. package/data.cjs +0 -58
  166. package/data.d.cts +0 -4
  167. package/data.d.cts.map +0 -1
  168. package/date-time.cjs +0 -171
  169. package/date-time.d.cts +0 -28
  170. package/date-time.d.cts.map +0 -1
  171. package/device.cjs +0 -28
  172. package/device.d.cts +0 -8
  173. package/device.d.cts.map +0 -1
  174. package/encodings.cjs +0 -270
  175. package/encodings.d.cts +0 -2
  176. package/encodings.d.cts.map +0 -1
  177. package/errors.cjs +0 -34
  178. package/errors.d.cts +0 -19
  179. package/errors.d.cts.map +0 -1
  180. package/file.cjs +0 -29
  181. package/file.d.cts +0 -3
  182. package/file.d.cts.map +0 -1
  183. package/format/_exports.cjs +0 -20
  184. package/format/_exports.d.cts +0 -5
  185. package/format/_exports.d.cts.map +0 -1
  186. package/format/_exports.js +0 -4
  187. package/format/constants.cjs +0 -6
  188. package/format/constants.d.cts +0 -4
  189. package/format/constants.d.cts.map +0 -1
  190. package/format/constants.js +0 -3
  191. package/format/index.cjs +0 -40
  192. package/format/index.d.cts +0 -3
  193. package/format/index.d.cts.map +0 -1
  194. package/format/index.js +0 -4
  195. package/format/number.cjs +0 -48
  196. package/format/number.d.cts +0 -36
  197. package/format/number.d.cts.map +0 -1
  198. package/format/number.js +0 -44
  199. package/format/percent.cjs +0 -27
  200. package/format/percent.d.cts +0 -15
  201. package/format/percent.d.cts.map +0 -1
  202. package/format/percent.js +0 -23
  203. package/format/skip-spaces.cjs +0 -8
  204. package/format/skip-spaces.d.cts +0 -5
  205. package/format/skip-spaces.d.cts.map +0 -1
  206. package/format/skip-spaces.js +0 -4
  207. package/html.cjs +0 -202
  208. package/html.d.cts +0 -44
  209. package/html.d.cts.map +0 -1
  210. package/id.cjs +0 -76
  211. package/id.d.cts +0 -63
  212. package/id.d.cts.map +0 -1
  213. package/imports.cjs +0 -45
  214. package/imports.d.cts +0 -15
  215. package/imports.d.cts.map +0 -1
  216. package/math.cjs +0 -23
  217. package/math.d.cts +0 -13
  218. package/math.d.cts.map +0 -1
  219. package/media.cjs +0 -115
  220. package/media.d.cts +0 -20
  221. package/media.d.cts.map +0 -1
  222. package/mobx/apply-observable.cjs +0 -16
  223. package/mobx/apply-observable.d.cts +0 -4
  224. package/mobx/apply-observable.d.cts.map +0 -1
  225. package/mobx/apply-observable.js +0 -12
  226. package/mobx/create-enhanced-atom.cjs +0 -16
  227. package/mobx/create-enhanced-atom.d.cts +0 -11
  228. package/mobx/create-enhanced-atom.d.cts.map +0 -1
  229. package/mobx/create-enhanced-atom.js +0 -12
  230. package/mobx/deep-observable-struct.cjs +0 -61
  231. package/mobx/deep-observable-struct.d.cts +0 -7
  232. package/mobx/deep-observable-struct.d.cts.map +0 -1
  233. package/mobx/deep-observable-struct.js +0 -57
  234. package/mobx/get-mobx-administration.cjs +0 -6
  235. package/mobx/get-mobx-administration.d.cts +0 -6
  236. package/mobx/get-mobx-administration.d.cts.map +0 -1
  237. package/mobx/get-mobx-administration.js +0 -2
  238. package/mobx/index.cjs +0 -21
  239. package/mobx/index.d.cts +0 -6
  240. package/mobx/index.d.cts.map +0 -1
  241. package/mobx/index.js +0 -5
  242. package/mobx/lazy-observe.cjs +0 -52
  243. package/mobx/lazy-observe.d.cts +0 -8
  244. package/mobx/lazy-observe.d.cts.map +0 -1
  245. package/mobx/lazy-observe.js +0 -48
  246. package/ms.cjs +0 -22
  247. package/ms.d.cts +0 -19
  248. package/ms.d.cts.map +0 -1
  249. package/number.cjs +0 -16
  250. package/number.d.cts +0 -8
  251. package/number.d.cts.map +0 -1
  252. package/parser/_exports.cjs +0 -19
  253. package/parser/_exports.d.cts +0 -4
  254. package/parser/_exports.d.cts.map +0 -1
  255. package/parser/_exports.js +0 -3
  256. package/parser/index.cjs +0 -40
  257. package/parser/index.d.cts +0 -3
  258. package/parser/index.d.cts.map +0 -1
  259. package/parser/index.js +0 -4
  260. package/parser/number.cjs +0 -48
  261. package/parser/number.d.cts +0 -21
  262. package/parser/number.d.cts.map +0 -1
  263. package/parser/number.js +0 -44
  264. package/parser/percent.cjs +0 -8
  265. package/parser/percent.d.cts +0 -4
  266. package/parser/percent.d.cts.map +0 -1
  267. package/parser/percent.js +0 -4
  268. package/parser/string.cjs +0 -18
  269. package/parser/string.d.cts +0 -7
  270. package/parser/string.d.cts.map +0 -1
  271. package/parser/string.js +0 -14
  272. package/price.cjs +0 -21
  273. package/price.d.cts +0 -6
  274. package/price.d.cts.map +0 -1
  275. package/random.cjs +0 -25
  276. package/random.d.cts +0 -9
  277. package/random.d.cts.map +0 -1
  278. package/react/hooks/index.cjs +0 -37
  279. package/react/hooks/index.d.cts +0 -22
  280. package/react/hooks/index.d.cts.map +0 -1
  281. package/react/hooks/index.js +0 -21
  282. package/react/hooks/use-abort-controller.cjs +0 -15
  283. package/react/hooks/use-abort-controller.d.cts +0 -2
  284. package/react/hooks/use-abort-controller.d.cts.map +0 -1
  285. package/react/hooks/use-abort-controller.js +0 -11
  286. package/react/hooks/use-abort-signal.cjs +0 -8
  287. package/react/hooks/use-abort-signal.d.cts +0 -2
  288. package/react/hooks/use-abort-signal.d.cts.map +0 -1
  289. package/react/hooks/use-abort-signal.js +0 -4
  290. package/react/hooks/use-click-outside.cjs +0 -17
  291. package/react/hooks/use-click-outside.d.cts +0 -9
  292. package/react/hooks/use-click-outside.d.cts.map +0 -1
  293. package/react/hooks/use-click-outside.js +0 -13
  294. package/react/hooks/use-constant.cjs +0 -19
  295. package/react/hooks/use-constant.d.cts +0 -9
  296. package/react/hooks/use-constant.d.cts.map +0 -1
  297. package/react/hooks/use-constant.js +0 -15
  298. package/react/hooks/use-define-ref.cjs +0 -19
  299. package/react/hooks/use-define-ref.d.cts +0 -10
  300. package/react/hooks/use-define-ref.d.cts.map +0 -1
  301. package/react/hooks/use-define-ref.js +0 -15
  302. package/react/hooks/use-element-ref.cjs +0 -12
  303. package/react/hooks/use-element-ref.d.cts +0 -2
  304. package/react/hooks/use-element-ref.d.cts.map +0 -1
  305. package/react/hooks/use-element-ref.js +0 -8
  306. package/react/hooks/use-event-listener.cjs +0 -17
  307. package/react/hooks/use-event-listener.d.cts +0 -8
  308. package/react/hooks/use-event-listener.d.cts.map +0 -1
  309. package/react/hooks/use-event-listener.js +0 -13
  310. package/react/hooks/use-event.cjs +0 -23
  311. package/react/hooks/use-event.d.cts +0 -3
  312. package/react/hooks/use-event.d.cts.map +0 -1
  313. package/react/hooks/use-event.js +0 -19
  314. package/react/hooks/use-flag.cjs +0 -19
  315. package/react/hooks/use-flag.d.cts +0 -8
  316. package/react/hooks/use-flag.d.cts.map +0 -1
  317. package/react/hooks/use-flag.js +0 -15
  318. package/react/hooks/use-force-update.cjs +0 -11
  319. package/react/hooks/use-force-update.d.cts +0 -2
  320. package/react/hooks/use-force-update.d.cts.map +0 -1
  321. package/react/hooks/use-force-update.js +0 -7
  322. package/react/hooks/use-initial-height.cjs +0 -15
  323. package/react/hooks/use-initial-height.d.cts +0 -5
  324. package/react/hooks/use-initial-height.d.cts.map +0 -1
  325. package/react/hooks/use-initial-height.js +0 -11
  326. package/react/hooks/use-instance.cjs +0 -31
  327. package/react/hooks/use-instance.d.cts +0 -27
  328. package/react/hooks/use-instance.d.cts.map +0 -1
  329. package/react/hooks/use-instance.js +0 -27
  330. package/react/hooks/use-intersection-observer.cjs +0 -14
  331. package/react/hooks/use-intersection-observer.d.cts +0 -2
  332. package/react/hooks/use-intersection-observer.d.cts.map +0 -1
  333. package/react/hooks/use-intersection-observer.js +0 -10
  334. package/react/hooks/use-last-defined-value.cjs +0 -12
  335. package/react/hooks/use-last-defined-value.d.cts +0 -2
  336. package/react/hooks/use-last-defined-value.d.cts.map +0 -1
  337. package/react/hooks/use-last-defined-value.js +0 -8
  338. package/react/hooks/use-last-value-ref.cjs +0 -12
  339. package/react/hooks/use-last-value-ref.d.cts +0 -2
  340. package/react/hooks/use-last-value-ref.d.cts.map +0 -1
  341. package/react/hooks/use-last-value-ref.js +0 -8
  342. package/react/hooks/use-life-cycle.cjs +0 -14
  343. package/react/hooks/use-life-cycle.d.cts +0 -5
  344. package/react/hooks/use-life-cycle.d.cts.map +0 -1
  345. package/react/hooks/use-life-cycle.js +0 -10
  346. package/react/hooks/use-resize-observer.cjs +0 -15
  347. package/react/hooks/use-resize-observer.d.cts +0 -2
  348. package/react/hooks/use-resize-observer.d.cts.map +0 -1
  349. package/react/hooks/use-resize-observer.js +0 -11
  350. package/react/hooks/use-sync-ref.cjs +0 -10
  351. package/react/hooks/use-sync-ref.d.cts +0 -2
  352. package/react/hooks/use-sync-ref.d.cts.map +0 -1
  353. package/react/hooks/use-sync-ref.js +0 -6
  354. package/react/hooks/use-toggle.cjs +0 -10
  355. package/react/hooks/use-toggle.d.cts +0 -2
  356. package/react/hooks/use-toggle.d.cts.map +0 -1
  357. package/react/hooks/use-toggle.js +0 -6
  358. package/react/hooks/use-value.cjs +0 -12
  359. package/react/hooks/use-value.d.cts +0 -5
  360. package/react/hooks/use-value.d.cts.map +0 -1
  361. package/react/hooks/use-value.js +0 -8
  362. package/react/hooks/use-visibility-state.cjs +0 -18
  363. package/react/hooks/use-visibility-state.d.cts +0 -2
  364. package/react/hooks/use-visibility-state.d.cts.map +0 -1
  365. package/react/hooks/use-visibility-state.js +0 -14
  366. package/react/index.cjs +0 -17
  367. package/react/index.d.cts +0 -2
  368. package/react/index.d.cts.map +0 -1
  369. package/react/index.js +0 -1
  370. package/sound.cjs +0 -16
  371. package/sound.d.cts +0 -7
  372. package/sound.d.cts.map +0 -1
  373. package/storage.cjs +0 -48
  374. package/storage.d.cts +0 -39
  375. package/storage.d.cts.map +0 -1
  376. package/storage.js +0 -43
  377. package/text.cjs +0 -53
  378. package/text.d.cts +0 -15
  379. package/text.d.cts.map +0 -1
  380. package/type-guard/_exports.cjs +0 -129
  381. package/type-guard/_exports.d.cts +0 -86
  382. package/type-guard/_exports.d.cts.map +0 -1
  383. package/type-guard/_exports.js +0 -125
  384. package/type-guard/index.cjs +0 -40
  385. package/type-guard/index.d.cts +0 -3
  386. package/type-guard/index.d.cts.map +0 -1
  387. package/type-guard/index.js +0 -4
  388. package/utils/types.cjs +0 -2
  389. package/utils/types.d.cts +0 -395
  390. package/utils/types.d.cts.map +0 -1
  391. package/vibrate.cjs +0 -12
  392. package/vibrate.d.cts +0 -5
  393. package/vibrate.d.cts.map +0 -1
package/date-time.js CHANGED
@@ -1,160 +1,594 @@
1
- import dayjs from 'dayjs';
2
- import duration from 'dayjs/plugin/duration.js';
3
- import relativeTime from 'dayjs/plugin/relativeTime.js';
4
- import { format } from "./format/index.js";
5
- import { unitsToMs } from "./ms.js";
6
- import { declension } from "./text.js";
7
- import { typeGuard } from "./type-guard/index.js";
8
- import 'dayjs/locale/ru.js';
9
- dayjs.extend(relativeTime);
10
- dayjs.extend(duration);
11
- dayjs.locale('ru');
12
- const toLibFormat = (value, asTime) => {
13
- if (typeGuard.isNumber(value)) {
14
- if (asTime) {
15
- return dayjs.duration(value);
16
- }
17
- return dayjs(value);
18
- }
19
- else if (dayjs.isDayjs(value)) {
20
- return value;
21
- }
22
- else {
23
- return dayjs(value);
24
- }
25
- };
26
- export const formatDate = (value, settings) => {
27
- const dateFormat = settings?.format;
28
- const datePattern = settings?.pattern;
29
- const asTime = settings?.asTime;
30
- value = toLibFormat(value, asTime);
31
- if (typeGuard.isUndefined(value) || !value.isValid()) {
32
- return format.NO_VALUE;
33
- }
34
- if (datePattern) {
35
- return value.format(datePattern);
36
- }
37
- switch (dateFormat) {
38
- case 'human': {
39
- return value.fromNow();
40
- }
41
- case 'spent-time': {
42
- return value.fromNow(true);
43
- }
44
- case 'full': {
45
- return value.format('DD MMM YYYY HH:mm:ss');
46
- }
47
- case 'short': {
48
- return value.format('DD MMM HH:mm');
49
- }
50
- case 'time': {
51
- return value.format('HH:mm:ss');
52
- }
53
- case 'time-short': {
54
- return value.format('HH:mm');
55
- }
56
- case 'day': {
57
- return value.format('DD MMM YYYY');
1
+ import { N as ht } from "./~number-baxVnzrJ.js";
2
+ import "./~number-EWff2XI6.js";
3
+ import { c as mt, a as lt } from "./~index-C3wKHvHr.js";
4
+ import { unitsToMs as E } from "./ms.js";
5
+ import { declension as X } from "./text.js";
6
+ function st(u) {
7
+ return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
8
+ }
9
+ var tt = { exports: {} }, $t = tt.exports, it;
10
+ function ct() {
11
+ return it || (it = 1, function(u, $) {
12
+ (function(p, c) {
13
+ u.exports = c();
14
+ })($t, function() {
15
+ var p = 1e3, c = 6e4, v = 36e5, y = "millisecond", S = "second", D = "minute", j = "hour", M = "day", Y = "week", w = "month", N = "quarter", O = "year", m = "date", H = "Invalid Date", I = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, b = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, A = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(s) {
16
+ var n = ["th", "st", "nd", "rd"], t = s % 100;
17
+ return "[" + s + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
18
+ } }, C = function(s, n, t) {
19
+ var i = String(s);
20
+ return !i || i.length >= n ? s : "" + Array(n + 1 - i.length).join(t) + s;
21
+ }, R = { s: C, z: function(s) {
22
+ var n = -s.utcOffset(), t = Math.abs(n), i = Math.floor(t / 60), e = t % 60;
23
+ return (n <= 0 ? "+" : "-") + C(i, 2, "0") + ":" + C(e, 2, "0");
24
+ }, m: function s(n, t) {
25
+ if (n.date() < t.date()) return -s(t, n);
26
+ var i = 12 * (t.year() - n.year()) + (t.month() - n.month()), e = n.clone().add(i, w), d = t - e < 0, f = n.clone().add(i + (d ? -1 : 1), w);
27
+ return +(-(i + (t - e) / (d ? e - f : f - e)) || 0);
28
+ }, a: function(s) {
29
+ return s < 0 ? Math.ceil(s) || 0 : Math.floor(s);
30
+ }, p: function(s) {
31
+ return { M: w, y: O, w: Y, d: M, D: m, h: j, m: D, s: S, ms: y, Q: N }[s] || String(s || "").toLowerCase().replace(/s$/, "");
32
+ }, u: function(s) {
33
+ return s === void 0;
34
+ } }, L = "en", h = {};
35
+ h[L] = A;
36
+ var o = "$isDayjsObject", r = function(s) {
37
+ return s instanceof T || !(!s || !s[o]);
38
+ }, _ = function s(n, t, i) {
39
+ var e;
40
+ if (!n) return L;
41
+ if (typeof n == "string") {
42
+ var d = n.toLowerCase();
43
+ h[d] && (e = d), t && (h[d] = t, e = d);
44
+ var f = n.split("-");
45
+ if (!e && f.length > 1) return s(f[0]);
46
+ } else {
47
+ var g = n.name;
48
+ h[g] = n, e = g;
58
49
  }
59
- case 'month': {
60
- return value.format('MMMM YYYY');
50
+ return !i && e && (L = e), e || !i && L;
51
+ }, l = function(s, n) {
52
+ if (r(s)) return s.clone();
53
+ var t = typeof n == "object" ? n : {};
54
+ return t.date = s, t.args = arguments, new T(t);
55
+ }, a = R;
56
+ a.l = _, a.i = r, a.w = function(s, n) {
57
+ return l(s, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
58
+ };
59
+ var T = function() {
60
+ function s(t) {
61
+ this.$L = _(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[o] = !0;
61
62
  }
62
- default: {
63
- return value.format('DD.MM.YYYY');
63
+ var n = s.prototype;
64
+ return n.parse = function(t) {
65
+ this.$d = function(i) {
66
+ var e = i.date, d = i.utc;
67
+ if (e === null) return /* @__PURE__ */ new Date(NaN);
68
+ if (a.u(e)) return /* @__PURE__ */ new Date();
69
+ if (e instanceof Date) return new Date(e);
70
+ if (typeof e == "string" && !/Z$/i.test(e)) {
71
+ var f = e.match(I);
72
+ if (f) {
73
+ var g = f[2] - 1 || 0, x = (f[7] || "0").substring(0, 3);
74
+ return d ? new Date(Date.UTC(f[1], g, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, x)) : new Date(f[1], g, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, x);
75
+ }
76
+ }
77
+ return new Date(e);
78
+ }(t), this.init();
79
+ }, n.init = function() {
80
+ var t = this.$d;
81
+ this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
82
+ }, n.$utils = function() {
83
+ return a;
84
+ }, n.isValid = function() {
85
+ return this.$d.toString() !== H;
86
+ }, n.isSame = function(t, i) {
87
+ var e = l(t);
88
+ return this.startOf(i) <= e && e <= this.endOf(i);
89
+ }, n.isAfter = function(t, i) {
90
+ return l(t) < this.startOf(i);
91
+ }, n.isBefore = function(t, i) {
92
+ return this.endOf(i) < l(t);
93
+ }, n.$g = function(t, i, e) {
94
+ return a.u(t) ? this[i] : this.set(e, t);
95
+ }, n.unix = function() {
96
+ return Math.floor(this.valueOf() / 1e3);
97
+ }, n.valueOf = function() {
98
+ return this.$d.getTime();
99
+ }, n.startOf = function(t, i) {
100
+ var e = this, d = !!a.u(i) || i, f = a.p(t), g = function(z, q) {
101
+ var J = a.w(e.$u ? Date.UTC(e.$y, q, z) : new Date(e.$y, q, z), e);
102
+ return d ? J : J.endOf(M);
103
+ }, x = function(z, q) {
104
+ return a.w(e.toDate()[z].apply(e.toDate("s"), (d ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(q)), e);
105
+ }, k = this.$W, W = this.$M, P = this.$D, B = "set" + (this.$u ? "UTC" : "");
106
+ switch (f) {
107
+ case O:
108
+ return d ? g(1, 0) : g(31, 11);
109
+ case w:
110
+ return d ? g(1, W) : g(0, W + 1);
111
+ case Y:
112
+ var Z = this.$locale().weekStart || 0, Q = (k < Z ? k + 7 : k) - Z;
113
+ return g(d ? P - Q : P + (6 - Q), W);
114
+ case M:
115
+ case m:
116
+ return x(B + "Hours", 0);
117
+ case j:
118
+ return x(B + "Minutes", 1);
119
+ case D:
120
+ return x(B + "Seconds", 2);
121
+ case S:
122
+ return x(B + "Milliseconds", 3);
123
+ default:
124
+ return this.clone();
125
+ }
126
+ }, n.endOf = function(t) {
127
+ return this.startOf(t, !1);
128
+ }, n.$set = function(t, i) {
129
+ var e, d = a.p(t), f = "set" + (this.$u ? "UTC" : ""), g = (e = {}, e[M] = f + "Date", e[m] = f + "Date", e[w] = f + "Month", e[O] = f + "FullYear", e[j] = f + "Hours", e[D] = f + "Minutes", e[S] = f + "Seconds", e[y] = f + "Milliseconds", e)[d], x = d === M ? this.$D + (i - this.$W) : i;
130
+ if (d === w || d === O) {
131
+ var k = this.clone().set(m, 1);
132
+ k.$d[g](x), k.init(), this.$d = k.set(m, Math.min(this.$D, k.daysInMonth())).$d;
133
+ } else g && this.$d[g](x);
134
+ return this.init(), this;
135
+ }, n.set = function(t, i) {
136
+ return this.clone().$set(t, i);
137
+ }, n.get = function(t) {
138
+ return this[a.p(t)]();
139
+ }, n.add = function(t, i) {
140
+ var e, d = this;
141
+ t = Number(t);
142
+ var f = a.p(i), g = function(W) {
143
+ var P = l(d);
144
+ return a.w(P.date(P.date() + Math.round(W * t)), d);
145
+ };
146
+ if (f === w) return this.set(w, this.$M + t);
147
+ if (f === O) return this.set(O, this.$y + t);
148
+ if (f === M) return g(1);
149
+ if (f === Y) return g(7);
150
+ var x = (e = {}, e[D] = c, e[j] = v, e[S] = p, e)[f] || 1, k = this.$d.getTime() + t * x;
151
+ return a.w(k, this);
152
+ }, n.subtract = function(t, i) {
153
+ return this.add(-1 * t, i);
154
+ }, n.format = function(t) {
155
+ var i = this, e = this.$locale();
156
+ if (!this.isValid()) return e.invalidDate || H;
157
+ var d = t || "YYYY-MM-DDTHH:mm:ssZ", f = a.z(this), g = this.$H, x = this.$m, k = this.$M, W = e.weekdays, P = e.months, B = e.meridiem, Z = function(q, J, G, K) {
158
+ return q && (q[J] || q(i, d)) || G[J].slice(0, K);
159
+ }, Q = function(q) {
160
+ return a.s(g % 12 || 12, q, "0");
161
+ }, z = B || function(q, J, G) {
162
+ var K = q < 12 ? "AM" : "PM";
163
+ return G ? K.toLowerCase() : K;
164
+ };
165
+ return d.replace(b, function(q, J) {
166
+ return J || function(G) {
167
+ switch (G) {
168
+ case "YY":
169
+ return String(i.$y).slice(-2);
170
+ case "YYYY":
171
+ return a.s(i.$y, 4, "0");
172
+ case "M":
173
+ return k + 1;
174
+ case "MM":
175
+ return a.s(k + 1, 2, "0");
176
+ case "MMM":
177
+ return Z(e.monthsShort, k, P, 3);
178
+ case "MMMM":
179
+ return Z(P, k);
180
+ case "D":
181
+ return i.$D;
182
+ case "DD":
183
+ return a.s(i.$D, 2, "0");
184
+ case "d":
185
+ return String(i.$W);
186
+ case "dd":
187
+ return Z(e.weekdaysMin, i.$W, W, 2);
188
+ case "ddd":
189
+ return Z(e.weekdaysShort, i.$W, W, 3);
190
+ case "dddd":
191
+ return W[i.$W];
192
+ case "H":
193
+ return String(g);
194
+ case "HH":
195
+ return a.s(g, 2, "0");
196
+ case "h":
197
+ return Q(1);
198
+ case "hh":
199
+ return Q(2);
200
+ case "a":
201
+ return z(g, x, !0);
202
+ case "A":
203
+ return z(g, x, !1);
204
+ case "m":
205
+ return String(x);
206
+ case "mm":
207
+ return a.s(x, 2, "0");
208
+ case "s":
209
+ return String(i.$s);
210
+ case "ss":
211
+ return a.s(i.$s, 2, "0");
212
+ case "SSS":
213
+ return a.s(i.$ms, 3, "0");
214
+ case "Z":
215
+ return f;
216
+ }
217
+ return null;
218
+ }(q) || f.replace(":", "");
219
+ });
220
+ }, n.utcOffset = function() {
221
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
222
+ }, n.diff = function(t, i, e) {
223
+ var d, f = this, g = a.p(i), x = l(t), k = (x.utcOffset() - this.utcOffset()) * c, W = this - x, P = function() {
224
+ return a.m(f, x);
225
+ };
226
+ switch (g) {
227
+ case O:
228
+ d = P() / 12;
229
+ break;
230
+ case w:
231
+ d = P();
232
+ break;
233
+ case N:
234
+ d = P() / 3;
235
+ break;
236
+ case Y:
237
+ d = (W - k) / 6048e5;
238
+ break;
239
+ case M:
240
+ d = (W - k) / 864e5;
241
+ break;
242
+ case j:
243
+ d = W / v;
244
+ break;
245
+ case D:
246
+ d = W / c;
247
+ break;
248
+ case S:
249
+ d = W / p;
250
+ break;
251
+ default:
252
+ d = W;
253
+ }
254
+ return e ? d : a.a(d);
255
+ }, n.daysInMonth = function() {
256
+ return this.endOf(w).$D;
257
+ }, n.$locale = function() {
258
+ return h[this.$L];
259
+ }, n.locale = function(t, i) {
260
+ if (!t) return this.$L;
261
+ var e = this.clone(), d = _(t, i, !0);
262
+ return d && (e.$L = d), e;
263
+ }, n.clone = function() {
264
+ return a.w(this.$d, this);
265
+ }, n.toDate = function() {
266
+ return new Date(this.valueOf());
267
+ }, n.toJSON = function() {
268
+ return this.isValid() ? this.toISOString() : null;
269
+ }, n.toISOString = function() {
270
+ return this.$d.toISOString();
271
+ }, n.toString = function() {
272
+ return this.$d.toUTCString();
273
+ }, s;
274
+ }(), F = T.prototype;
275
+ return l.prototype = F, [["$ms", y], ["$s", S], ["$m", D], ["$H", j], ["$W", M], ["$M", w], ["$y", O], ["$D", m]].forEach(function(s) {
276
+ F[s[1]] = function(n) {
277
+ return this.$g(n, s[0], s[1]);
278
+ };
279
+ }), l.extend = function(s, n) {
280
+ return s.$i || (s(n, T, l), s.$i = !0), l;
281
+ }, l.locale = _, l.isDayjs = r, l.unix = function(s) {
282
+ return l(1e3 * s);
283
+ }, l.en = h[L], l.Ls = h, l.p = {}, l;
284
+ });
285
+ }(tt)), tt.exports;
286
+ }
287
+ var Mt = ct();
288
+ const U = /* @__PURE__ */ st(Mt);
289
+ var et = { exports: {} }, pt = et.exports, ot;
290
+ function yt() {
291
+ return ot || (ot = 1, function(u, $) {
292
+ (function(p, c) {
293
+ u.exports = c();
294
+ })(pt, function() {
295
+ var p, c, v = 1e3, y = 6e4, S = 36e5, D = 864e5, j = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = 31536e6, Y = 2628e6, w = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, N = { years: M, months: Y, days: D, hours: S, minutes: y, seconds: v, milliseconds: 1, weeks: 6048e5 }, O = function(h) {
296
+ return h instanceof R;
297
+ }, m = function(h, o, r) {
298
+ return new R(h, r, o.$l);
299
+ }, H = function(h) {
300
+ return c.p(h) + "s";
301
+ }, I = function(h) {
302
+ return h < 0;
303
+ }, b = function(h) {
304
+ return I(h) ? Math.ceil(h) : Math.floor(h);
305
+ }, A = function(h) {
306
+ return Math.abs(h);
307
+ }, C = function(h, o) {
308
+ return h ? I(h) ? { negative: !0, format: "" + A(h) + o } : { negative: !1, format: "" + h + o } : { negative: !1, format: "" };
309
+ }, R = function() {
310
+ function h(r, _, l) {
311
+ var a = this;
312
+ if (this.$d = {}, this.$l = l, r === void 0 && (this.$ms = 0, this.parseFromMilliseconds()), _) return m(r * N[H(_)], this);
313
+ if (typeof r == "number") return this.$ms = r, this.parseFromMilliseconds(), this;
314
+ if (typeof r == "object") return Object.keys(r).forEach(function(s) {
315
+ a.$d[H(s)] = r[s];
316
+ }), this.calMilliseconds(), this;
317
+ if (typeof r == "string") {
318
+ var T = r.match(w);
319
+ if (T) {
320
+ var F = T.slice(2).map(function(s) {
321
+ return s != null ? Number(s) : 0;
322
+ });
323
+ return this.$d.years = F[0], this.$d.months = F[1], this.$d.weeks = F[2], this.$d.days = F[3], this.$d.hours = F[4], this.$d.minutes = F[5], this.$d.seconds = F[6], this.calMilliseconds(), this;
324
+ }
325
+ }
326
+ return this;
64
327
  }
65
- }
66
- };
67
- export const dayTimeDuration = (timeInMs) => {
68
- let left = Math.max(timeInMs, 0);
69
- const days = Math.floor(left / unitsToMs.day);
70
- left = left % unitsToMs.day;
71
- const hours = Math.floor(left / unitsToMs.hour);
72
- left = left % unitsToMs.hour;
73
- const minutes = Math.floor(left / unitsToMs.min);
74
- left = left % unitsToMs.min;
75
- const seconds = Math.floor(left / unitsToMs.sec);
76
- left = left % unitsToMs.sec;
77
- const milliseconds = Math.floor(left);
78
- return {
79
- days,
80
- hours,
81
- minutes,
82
- seconds,
83
- milliseconds,
84
- };
85
- };
86
- export const changeDate = (date, ...args) => {
87
- let wrappedDate = toLibFormat(date);
88
- for (let i = 0; i < args.length; i += 2) {
89
- const amount = args[i];
90
- const unit = args[i + 1];
91
- if (unit != null) {
92
- wrappedDate = wrappedDate.add(amount, unit);
328
+ var o = h.prototype;
329
+ return o.calMilliseconds = function() {
330
+ var r = this;
331
+ this.$ms = Object.keys(this.$d).reduce(function(_, l) {
332
+ return _ + (r.$d[l] || 0) * N[l];
333
+ }, 0);
334
+ }, o.parseFromMilliseconds = function() {
335
+ var r = this.$ms;
336
+ this.$d.years = b(r / M), r %= M, this.$d.months = b(r / Y), r %= Y, this.$d.days = b(r / D), r %= D, this.$d.hours = b(r / S), r %= S, this.$d.minutes = b(r / y), r %= y, this.$d.seconds = b(r / v), r %= v, this.$d.milliseconds = r;
337
+ }, o.toISOString = function() {
338
+ var r = C(this.$d.years, "Y"), _ = C(this.$d.months, "M"), l = +this.$d.days || 0;
339
+ this.$d.weeks && (l += 7 * this.$d.weeks);
340
+ var a = C(l, "D"), T = C(this.$d.hours, "H"), F = C(this.$d.minutes, "M"), s = this.$d.seconds || 0;
341
+ this.$d.milliseconds && (s += this.$d.milliseconds / 1e3, s = Math.round(1e3 * s) / 1e3);
342
+ var n = C(s, "S"), t = r.negative || _.negative || a.negative || T.negative || F.negative || n.negative, i = T.format || F.format || n.format ? "T" : "", e = (t ? "-" : "") + "P" + r.format + _.format + a.format + i + T.format + F.format + n.format;
343
+ return e === "P" || e === "-P" ? "P0D" : e;
344
+ }, o.toJSON = function() {
345
+ return this.toISOString();
346
+ }, o.format = function(r) {
347
+ var _ = r || "YYYY-MM-DDTHH:mm:ss", l = { Y: this.$d.years, YY: c.s(this.$d.years, 2, "0"), YYYY: c.s(this.$d.years, 4, "0"), M: this.$d.months, MM: c.s(this.$d.months, 2, "0"), D: this.$d.days, DD: c.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: c.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: c.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: c.s(this.$d.seconds, 2, "0"), SSS: c.s(this.$d.milliseconds, 3, "0") };
348
+ return _.replace(j, function(a, T) {
349
+ return T || String(l[a]);
350
+ });
351
+ }, o.as = function(r) {
352
+ return this.$ms / N[H(r)];
353
+ }, o.get = function(r) {
354
+ var _ = this.$ms, l = H(r);
355
+ return l === "milliseconds" ? _ %= 1e3 : _ = l === "weeks" ? b(_ / N[l]) : this.$d[l], _ || 0;
356
+ }, o.add = function(r, _, l) {
357
+ var a;
358
+ return a = _ ? r * N[H(_)] : O(r) ? r.$ms : m(r, this).$ms, m(this.$ms + a * (l ? -1 : 1), this);
359
+ }, o.subtract = function(r, _) {
360
+ return this.add(r, _, !0);
361
+ }, o.locale = function(r) {
362
+ var _ = this.clone();
363
+ return _.$l = r, _;
364
+ }, o.clone = function() {
365
+ return m(this.$ms, this);
366
+ }, o.humanize = function(r) {
367
+ return p().add(this.$ms, "ms").locale(this.$l).fromNow(!r);
368
+ }, o.valueOf = function() {
369
+ return this.asMilliseconds();
370
+ }, o.milliseconds = function() {
371
+ return this.get("milliseconds");
372
+ }, o.asMilliseconds = function() {
373
+ return this.as("milliseconds");
374
+ }, o.seconds = function() {
375
+ return this.get("seconds");
376
+ }, o.asSeconds = function() {
377
+ return this.as("seconds");
378
+ }, o.minutes = function() {
379
+ return this.get("minutes");
380
+ }, o.asMinutes = function() {
381
+ return this.as("minutes");
382
+ }, o.hours = function() {
383
+ return this.get("hours");
384
+ }, o.asHours = function() {
385
+ return this.as("hours");
386
+ }, o.days = function() {
387
+ return this.get("days");
388
+ }, o.asDays = function() {
389
+ return this.as("days");
390
+ }, o.weeks = function() {
391
+ return this.get("weeks");
392
+ }, o.asWeeks = function() {
393
+ return this.as("weeks");
394
+ }, o.months = function() {
395
+ return this.get("months");
396
+ }, o.asMonths = function() {
397
+ return this.as("months");
398
+ }, o.years = function() {
399
+ return this.get("years");
400
+ }, o.asYears = function() {
401
+ return this.as("years");
402
+ }, h;
403
+ }(), L = function(h, o, r) {
404
+ return h.add(o.years() * r, "y").add(o.months() * r, "M").add(o.days() * r, "d").add(o.hours() * r, "h").add(o.minutes() * r, "m").add(o.seconds() * r, "s").add(o.milliseconds() * r, "ms");
405
+ };
406
+ return function(h, o, r) {
407
+ p = r, c = r().$utils(), r.duration = function(a, T) {
408
+ var F = r.locale();
409
+ return m(a, { $l: F }, T);
410
+ }, r.isDuration = O;
411
+ var _ = o.prototype.add, l = o.prototype.subtract;
412
+ o.prototype.add = function(a, T) {
413
+ return O(a) ? L(this, a, 1) : _.bind(this)(a, T);
414
+ }, o.prototype.subtract = function(a, T) {
415
+ return O(a) ? L(this, a, -1) : l.bind(this)(a, T);
416
+ };
417
+ };
418
+ });
419
+ }(et)), et.exports;
420
+ }
421
+ var _t = yt();
422
+ const vt = /* @__PURE__ */ st(_t);
423
+ var rt = { exports: {} }, Dt = rt.exports, ut;
424
+ function gt() {
425
+ return ut || (ut = 1, function(u, $) {
426
+ (function(p, c) {
427
+ u.exports = c();
428
+ })(Dt, function() {
429
+ return function(p, c, v) {
430
+ p = p || {};
431
+ var y = c.prototype, S = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
432
+ function D(M, Y, w, N) {
433
+ return y.fromToBase(M, Y, w, N);
93
434
  }
94
- }
95
- return wrappedDate.toDate();
96
- };
97
- export const timeDuration = (timeInMs) => {
98
- const { days, hours, milliseconds, minutes, seconds } = dayTimeDuration(timeInMs);
99
- return {
100
- hours: hours + unitsToMs.day * days,
101
- milliseconds,
102
- minutes,
103
- seconds,
104
- };
105
- };
106
- const durationFormatLabels = {
107
- days: { compact: 'д', full: ['день', 'дня', 'дней'] },
108
- hours: { compact: 'ч', full: ['час', 'часа', 'часов'] },
109
- minutes: { compact: 'мин', full: ['минута', 'минуты', 'минут'] },
110
- seconds: { compact: 'сек', full: ['секунда', 'секунды', 'секунд'] },
435
+ v.en.relativeTime = S, y.fromToBase = function(M, Y, w, N, O) {
436
+ for (var m, H, I, b = w.$locale().relativeTime || S, A = p.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], C = A.length, R = 0; R < C; R += 1) {
437
+ var L = A[R];
438
+ L.d && (m = N ? v(M).diff(w, L.d, !0) : w.diff(M, L.d, !0));
439
+ var h = (p.rounding || Math.round)(Math.abs(m));
440
+ if (I = m > 0, h <= L.r || !L.r) {
441
+ h <= 1 && R > 0 && (L = A[R - 1]);
442
+ var o = b[L.l];
443
+ O && (h = O("" + h)), H = typeof o == "string" ? o.replace("%d", h) : o(h, Y, L.l, I);
444
+ break;
445
+ }
446
+ }
447
+ if (Y) return H;
448
+ var r = I ? b.future : b.past;
449
+ return typeof r == "function" ? r(H) : r.replace("%s", H);
450
+ }, y.to = function(M, Y) {
451
+ return D(M, Y, this, !0);
452
+ }, y.from = function(M, Y) {
453
+ return D(M, Y, this);
454
+ };
455
+ var j = function(M) {
456
+ return M.$u ? v.utc() : v();
457
+ };
458
+ y.toNow = function(M) {
459
+ return this.to(j(this), M);
460
+ }, y.fromNow = function(M) {
461
+ return this.from(j(this), M);
462
+ };
463
+ };
464
+ });
465
+ }(rt)), rt.exports;
466
+ }
467
+ var Yt = gt();
468
+ const St = /* @__PURE__ */ st(Yt);
469
+ var nt = { exports: {} }, wt = nt.exports, at;
470
+ function bt() {
471
+ return at || (at = 1, function(u, $) {
472
+ (function(p, c) {
473
+ u.exports = c(ct());
474
+ })(wt, function(p) {
475
+ function c(m) {
476
+ return m && typeof m == "object" && "default" in m ? m : { default: m };
477
+ }
478
+ var v = c(p), y = "января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"), S = "январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"), D = "янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"), j = "янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"), M = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;
479
+ function Y(m, H, I) {
480
+ var b, A;
481
+ return I === "m" ? H ? "минута" : "минуту" : m + " " + (b = +m, A = { mm: H ? "минута_минуты_минут" : "минуту_минуты_минут", hh: "час_часа_часов", dd: "день_дня_дней", MM: "месяц_месяца_месяцев", yy: "год_года_лет" }[I].split("_"), b % 10 == 1 && b % 100 != 11 ? A[0] : b % 10 >= 2 && b % 10 <= 4 && (b % 100 < 10 || b % 100 >= 20) ? A[1] : A[2]);
482
+ }
483
+ var w = function(m, H) {
484
+ return M.test(H) ? y[m.month()] : S[m.month()];
485
+ };
486
+ w.s = S, w.f = y;
487
+ var N = function(m, H) {
488
+ return M.test(H) ? D[m.month()] : j[m.month()];
489
+ };
490
+ N.s = j, N.f = D;
491
+ var O = { name: "ru", weekdays: "воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"), weekdaysShort: "вск_пнд_втр_срд_чтв_птн_сбт".split("_"), weekdaysMin: "вс_пн_вт_ср_чт_пт_сб".split("_"), months: w, monthsShort: N, weekStart: 1, yearStart: 4, formats: { LT: "H:mm", LTS: "H:mm:ss", L: "DD.MM.YYYY", LL: "D MMMM YYYY г.", LLL: "D MMMM YYYY г., H:mm", LLLL: "dddd, D MMMM YYYY г., H:mm" }, relativeTime: { future: "через %s", past: "%s назад", s: "несколько секунд", m: Y, mm: Y, h: "час", hh: Y, d: "день", dd: Y, M: "месяц", MM: Y, y: "год", yy: Y }, ordinal: function(m) {
492
+ return m;
493
+ }, meridiem: function(m) {
494
+ return m < 4 ? "ночи" : m < 12 ? "утра" : m < 17 ? "дня" : "вечера";
495
+ } };
496
+ return v.default.locale(O, null, !0), O;
497
+ });
498
+ }(nt)), nt.exports;
499
+ }
500
+ bt();
501
+ U.extend(St);
502
+ U.extend(vt);
503
+ U.locale("ru");
504
+ const dt = (u, $) => lt(u) ? $ ? U.duration(u) : U(u) : U.isDayjs(u) ? u : U(u), Lt = (u, $) => {
505
+ const p = $?.format, c = $?.pattern, v = $?.asTime;
506
+ if (u = dt(u, v), mt(u) || !u.isValid())
507
+ return ht;
508
+ if (c)
509
+ return u.format(c);
510
+ switch (p) {
511
+ case "human":
512
+ return u.fromNow();
513
+ case "spent-time":
514
+ return u.fromNow(!0);
515
+ case "full":
516
+ return u.format("DD MMM YYYY HH:mm:ss");
517
+ case "short":
518
+ return u.format("DD MMM HH:mm");
519
+ case "time":
520
+ return u.format("HH:mm:ss");
521
+ case "time-short":
522
+ return u.format("HH:mm");
523
+ case "day":
524
+ return u.format("DD MMM YYYY");
525
+ case "month":
526
+ return u.format("MMMM YYYY");
527
+ default:
528
+ return u.format("DD.MM.YYYY");
529
+ }
530
+ }, ft = (u) => {
531
+ let $ = Math.max(u, 0);
532
+ const p = Math.floor($ / E.day);
533
+ $ = $ % E.day;
534
+ const c = Math.floor($ / E.hour);
535
+ $ = $ % E.hour;
536
+ const v = Math.floor($ / E.min);
537
+ $ = $ % E.min;
538
+ const y = Math.floor($ / E.sec);
539
+ $ = $ % E.sec;
540
+ const S = Math.floor($);
541
+ return {
542
+ days: p,
543
+ hours: c,
544
+ minutes: v,
545
+ seconds: y,
546
+ milliseconds: S
547
+ };
548
+ }, jt = (u, ...$) => {
549
+ let p = dt(u);
550
+ for (let c = 0; c < $.length; c += 2) {
551
+ const v = $[c], y = $[c + 1];
552
+ y != null && (p = p.add(v, y));
553
+ }
554
+ return p.toDate();
555
+ }, Nt = (u) => {
556
+ const { days: $, hours: p, milliseconds: c, minutes: v, seconds: y } = ft(u);
557
+ return {
558
+ hours: p + E.day * $,
559
+ milliseconds: c,
560
+ minutes: v,
561
+ seconds: y
562
+ };
563
+ }, V = {
564
+ days: { compact: "д", full: ["день", "дня", "дней"] },
565
+ hours: { compact: "ч", full: ["час", "часа", "часов"] },
566
+ minutes: { compact: "мин", full: ["минута", "минуты", "минут"] },
567
+ seconds: { compact: "сек", full: ["секунда", "секунды", "секунд"] }
111
568
  };
112
- export function getFormatDuration(...args) {
113
- let compact = false;
114
- let diff = 0;
115
- if (args[0] instanceof Date) {
116
- const startedDate = dayjs(args[0]);
117
- const endedDate = dayjs(args[1]);
118
- diff = endedDate.diff(startedDate, 'ms');
119
- compact = args[2] === true;
120
- }
121
- else {
122
- diff = args[0];
123
- compact = args[1] === true;
124
- }
125
- const { days, hours, minutes, seconds } = dayTimeDuration(diff);
126
- const formattedParts = [];
127
- if (days) {
128
- if (compact) {
129
- formattedParts.push(`${days} ${durationFormatLabels.days.compact}`);
130
- }
131
- else {
132
- formattedParts.push(`${days} ${declension(days, durationFormatLabels.days.full)}`);
133
- }
134
- }
135
- if (hours) {
136
- if (compact) {
137
- formattedParts.push(`${hours} ${durationFormatLabels.hours.compact}`);
138
- }
139
- else {
140
- formattedParts.push(`${hours} ${declension(hours, durationFormatLabels.hours.full)}`);
141
- }
142
- }
143
- if (minutes) {
144
- if (compact) {
145
- formattedParts.push(`${minutes} ${durationFormatLabels.minutes.compact}`);
146
- }
147
- else {
148
- formattedParts.push(`${minutes} ${declension(minutes, durationFormatLabels.minutes.full)}`);
149
- }
150
- }
151
- if (seconds) {
152
- if (compact) {
153
- formattedParts.push(`${seconds} ${durationFormatLabels.seconds.compact}`);
154
- }
155
- else {
156
- formattedParts.push(`${seconds} ${declension(seconds, durationFormatLabels.seconds.full)}`);
157
- }
158
- }
159
- return formattedParts.join(' ');
569
+ function Ft(...u) {
570
+ let $ = !1, p = 0;
571
+ if (u[0] instanceof Date) {
572
+ const j = U(u[0]);
573
+ p = U(u[1]).diff(j, "ms"), $ = u[2] === !0;
574
+ } else
575
+ p = u[0], $ = u[1] === !0;
576
+ const { days: c, hours: v, minutes: y, seconds: S } = ft(p), D = [];
577
+ return c && ($ ? D.push(`${c} ${V.days.compact}`) : D.push(
578
+ `${c} ${X(c, V.days.full)}`
579
+ )), v && ($ ? D.push(`${v} ${V.hours.compact}`) : D.push(
580
+ `${v} ${X(v, V.hours.full)}`
581
+ )), y && ($ ? D.push(`${y} ${V.minutes.compact}`) : D.push(
582
+ `${y} ${X(y, V.minutes.full)}`
583
+ )), S && ($ ? D.push(`${S} ${V.seconds.compact}`) : D.push(
584
+ `${S} ${X(S, V.seconds.full)}`
585
+ )), D.join(" ");
160
586
  }
587
+ export {
588
+ jt as changeDate,
589
+ ft as dayTimeDuration,
590
+ Lt as formatDate,
591
+ Ft as getFormatDuration,
592
+ Nt as timeDuration
593
+ };
594
+ //# sourceMappingURL=date-time.js.map