@rpcbase/ui 0.181.0 → 0.183.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 (618) hide show
  1. package/dist/helpers/index.d.ts +1 -0
  2. package/dist/helpers/index.d.ts.map +1 -1
  3. package/dist/helpers/useScrollPagination.d.ts +23 -0
  4. package/dist/helpers/useScrollPagination.d.ts.map +1 -0
  5. package/dist/helpers/useScrollPagination.test.d.ts +2 -0
  6. package/dist/helpers/useScrollPagination.test.d.ts.map +1 -0
  7. package/dist/index.js +62 -60
  8. package/dist/index.js.map +1 -1
  9. package/dist/index10.js +23 -69
  10. package/dist/index10.js.map +1 -1
  11. package/dist/index100.js +5 -4
  12. package/dist/index100.js.map +1 -1
  13. package/dist/index101.js +3 -3
  14. package/dist/index101.js.map +1 -1
  15. package/dist/index102.js +4 -6
  16. package/dist/index102.js.map +1 -1
  17. package/dist/index103.js +6 -145
  18. package/dist/index103.js.map +1 -1
  19. package/dist/index104.js +144 -38
  20. package/dist/index104.js.map +1 -1
  21. package/dist/index105.js +39 -4
  22. package/dist/index105.js.map +1 -1
  23. package/dist/index106.js +4 -7
  24. package/dist/index106.js.map +1 -1
  25. package/dist/index107.js +6 -12
  26. package/dist/index107.js.map +1 -1
  27. package/dist/index108.js +13 -13
  28. package/dist/index108.js.map +1 -1
  29. package/dist/index109.js +13 -7
  30. package/dist/index109.js.map +1 -1
  31. package/dist/index11.js +62 -544
  32. package/dist/index11.js.map +1 -1
  33. package/dist/index110.js +6 -30
  34. package/dist/index110.js.map +1 -1
  35. package/dist/index111.js +31 -10
  36. package/dist/index111.js.map +1 -1
  37. package/dist/index112.js +10 -10
  38. package/dist/index112.js.map +1 -1
  39. package/dist/index113.js +10 -8
  40. package/dist/index113.js.map +1 -1
  41. package/dist/index114.js +8 -13
  42. package/dist/index114.js.map +1 -1
  43. package/dist/index115.js +13 -101
  44. package/dist/index115.js.map +1 -1
  45. package/dist/index116.js +102 -20
  46. package/dist/index116.js.map +1 -1
  47. package/dist/index117.js +20 -54
  48. package/dist/index117.js.map +1 -1
  49. package/dist/index118.js +51 -70
  50. package/dist/index118.js.map +1 -1
  51. package/dist/index119.js +72 -9
  52. package/dist/index119.js.map +1 -1
  53. package/dist/index12.js +535 -110
  54. package/dist/index12.js.map +1 -1
  55. package/dist/index120.js +9 -20
  56. package/dist/index120.js.map +1 -1
  57. package/dist/index121.js +20 -16
  58. package/dist/index121.js.map +1 -1
  59. package/dist/index122.js +16 -23
  60. package/dist/index122.js.map +1 -1
  61. package/dist/index123.js +23 -6
  62. package/dist/index123.js.map +1 -1
  63. package/dist/index124.js +6 -5
  64. package/dist/index124.js.map +1 -1
  65. package/dist/index125.js +5 -23
  66. package/dist/index125.js.map +1 -1
  67. package/dist/index126.js +24 -35
  68. package/dist/index126.js.map +1 -1
  69. package/dist/index127.js +35 -16
  70. package/dist/index127.js.map +1 -1
  71. package/dist/index128.js +16 -7
  72. package/dist/index128.js.map +1 -1
  73. package/dist/index129.js +6 -4
  74. package/dist/index129.js.map +1 -1
  75. package/dist/index13.js +122 -71
  76. package/dist/index13.js.map +1 -1
  77. package/dist/index130.js +4 -4
  78. package/dist/index130.js.map +1 -1
  79. package/dist/index131.js +4 -4
  80. package/dist/index131.js.map +1 -1
  81. package/dist/index132.js +4 -4
  82. package/dist/index132.js.map +1 -1
  83. package/dist/index133.js +4 -3
  84. package/dist/index133.js.map +1 -1
  85. package/dist/index134.js +3 -6
  86. package/dist/index134.js.map +1 -1
  87. package/dist/index135.js +7 -24
  88. package/dist/index135.js.map +1 -1
  89. package/dist/index136.js +24 -8
  90. package/dist/index136.js.map +1 -1
  91. package/dist/index137.js +7 -6
  92. package/dist/index137.js.map +1 -1
  93. package/dist/index138.js +6 -5
  94. package/dist/index138.js.map +1 -1
  95. package/dist/index139.js +5 -3
  96. package/dist/index139.js.map +1 -1
  97. package/dist/index14.js +61 -717
  98. package/dist/index14.js.map +1 -1
  99. package/dist/index140.js +3 -3
  100. package/dist/index140.js.map +1 -1
  101. package/dist/index141.js +3 -4
  102. package/dist/index141.js.map +1 -1
  103. package/dist/index142.js +4 -3
  104. package/dist/index142.js.map +1 -1
  105. package/dist/index143.js +3 -4
  106. package/dist/index143.js.map +1 -1
  107. package/dist/index144.js +4 -3
  108. package/dist/index144.js.map +1 -1
  109. package/dist/index145.js +3 -3
  110. package/dist/index145.js.map +1 -1
  111. package/dist/index146.js +3 -3
  112. package/dist/index146.js.map +1 -1
  113. package/dist/index147.js +3 -46
  114. package/dist/index147.js.map +1 -1
  115. package/dist/index148.js +2 -2
  116. package/dist/index15.js +727 -18
  117. package/dist/index15.js.map +1 -1
  118. package/dist/index150.js +2 -2
  119. package/dist/index152.js +3 -3
  120. package/dist/index153.js +40 -599
  121. package/dist/index153.js.map +1 -1
  122. package/dist/index154.js +605 -5
  123. package/dist/index154.js.map +1 -1
  124. package/dist/index155.js +5 -68
  125. package/dist/index155.js.map +1 -1
  126. package/dist/index156.js +69 -2
  127. package/dist/index156.js.map +1 -1
  128. package/dist/index157.js +2 -364
  129. package/dist/index157.js.map +1 -1
  130. package/dist/index158.js +303 -201
  131. package/dist/index158.js.map +1 -1
  132. package/dist/index159.js +247 -46
  133. package/dist/index159.js.map +1 -1
  134. package/dist/index16.js +19 -14
  135. package/dist/index16.js.map +1 -1
  136. package/dist/index160.js +56 -42
  137. package/dist/index160.js.map +1 -1
  138. package/dist/index161.js +46 -169
  139. package/dist/index161.js.map +1 -1
  140. package/dist/index162.js +156 -96
  141. package/dist/index162.js.map +1 -1
  142. package/dist/index163.js +109 -24
  143. package/dist/index163.js.map +1 -1
  144. package/dist/index164.js +25 -8
  145. package/dist/index164.js.map +1 -1
  146. package/dist/index165.js +8 -5
  147. package/dist/index165.js.map +1 -1
  148. package/dist/index166.js +4 -5
  149. package/dist/index166.js.map +1 -1
  150. package/dist/index167.js +5 -4
  151. package/dist/index167.js.map +1 -1
  152. package/dist/index168.js +4 -466
  153. package/dist/index168.js.map +1 -1
  154. package/dist/index169.js +420 -139
  155. package/dist/index169.js.map +1 -1
  156. package/dist/index17.js +13 -382
  157. package/dist/index17.js.map +1 -1
  158. package/dist/index170.js +149 -71
  159. package/dist/index170.js.map +1 -1
  160. package/dist/index171.js +74 -229
  161. package/dist/index171.js.map +1 -1
  162. package/dist/index172.js +262 -9
  163. package/dist/index172.js.map +1 -1
  164. package/dist/index173.js +9 -42
  165. package/dist/index173.js.map +1 -1
  166. package/dist/index174.js +42 -4
  167. package/dist/index174.js.map +1 -1
  168. package/dist/index175.js +4 -16
  169. package/dist/index175.js.map +1 -1
  170. package/dist/index176.js +57 -4
  171. package/dist/index176.js.map +1 -1
  172. package/dist/index177.js +8 -5
  173. package/dist/index177.js.map +1 -1
  174. package/dist/index178.js +55 -47
  175. package/dist/index178.js.map +1 -1
  176. package/dist/index179.js +17 -64
  177. package/dist/index179.js.map +1 -1
  178. package/dist/index18.js +363 -695
  179. package/dist/index18.js.map +1 -1
  180. package/dist/index180.js +16 -6
  181. package/dist/index180.js.map +1 -1
  182. package/dist/index181.js +5 -4
  183. package/dist/index181.js.map +1 -1
  184. package/dist/index182.js +5 -7
  185. package/dist/index182.js.map +1 -1
  186. package/dist/index183.js +6 -17
  187. package/dist/index183.js.map +1 -1
  188. package/dist/index184.js +4 -5
  189. package/dist/index184.js.map +1 -1
  190. package/dist/index185.js +7 -5
  191. package/dist/index185.js.map +1 -1
  192. package/dist/index186.js +17 -13
  193. package/dist/index186.js.map +1 -1
  194. package/dist/index187.js +5 -10
  195. package/dist/index187.js.map +1 -1
  196. package/dist/index188.js +5 -14
  197. package/dist/index188.js.map +1 -1
  198. package/dist/index189.js +13 -14
  199. package/dist/index189.js.map +1 -1
  200. package/dist/index19.js +685 -624
  201. package/dist/index19.js.map +1 -1
  202. package/dist/index190.js +10 -5
  203. package/dist/index190.js.map +1 -1
  204. package/dist/index191.js +14 -6
  205. package/dist/index191.js.map +1 -1
  206. package/dist/index192.js +14 -7
  207. package/dist/index192.js.map +1 -1
  208. package/dist/index193.js +5 -6
  209. package/dist/index193.js.map +1 -1
  210. package/dist/index194.js +6 -9
  211. package/dist/index194.js.map +1 -1
  212. package/dist/index195.js +7 -5
  213. package/dist/index195.js.map +1 -1
  214. package/dist/index196.js +6 -5
  215. package/dist/index196.js.map +1 -1
  216. package/dist/index197.js +9 -9
  217. package/dist/index197.js.map +1 -1
  218. package/dist/index198.js +5 -5
  219. package/dist/index198.js.map +1 -1
  220. package/dist/index199.js +5 -5
  221. package/dist/index199.js.map +1 -1
  222. package/dist/index2.js +2 -2
  223. package/dist/index20.js +640 -191
  224. package/dist/index20.js.map +1 -1
  225. package/dist/index200.js +9 -4
  226. package/dist/index200.js.map +1 -1
  227. package/dist/index201.js +5 -11
  228. package/dist/index201.js.map +1 -1
  229. package/dist/index202.js +5 -10
  230. package/dist/index202.js.map +1 -1
  231. package/dist/index203.js +4 -10
  232. package/dist/index203.js.map +1 -1
  233. package/dist/index204.js +11 -11
  234. package/dist/index204.js.map +1 -1
  235. package/dist/index205.js +10 -11
  236. package/dist/index205.js.map +1 -1
  237. package/dist/index206.js +10 -10
  238. package/dist/index206.js.map +1 -1
  239. package/dist/index207.js +11 -7
  240. package/dist/index207.js.map +1 -1
  241. package/dist/index208.js +11 -6
  242. package/dist/index208.js.map +1 -1
  243. package/dist/index209.js +10 -5
  244. package/dist/index209.js.map +1 -1
  245. package/dist/index21.js +209 -5
  246. package/dist/index21.js.map +1 -1
  247. package/dist/index210.js +7 -6
  248. package/dist/index210.js.map +1 -1
  249. package/dist/index211.js +6 -7
  250. package/dist/index211.js.map +1 -1
  251. package/dist/index212.js +5 -6
  252. package/dist/index212.js.map +1 -1
  253. package/dist/index213.js +6 -55
  254. package/dist/index213.js.map +1 -1
  255. package/dist/index214.js +7 -8
  256. package/dist/index214.js.map +1 -1
  257. package/dist/index215.js +6 -19
  258. package/dist/index215.js.map +1 -1
  259. package/dist/index216.js +54 -15
  260. package/dist/index216.js.map +1 -1
  261. package/dist/index217.js +16 -7
  262. package/dist/index217.js.map +1 -1
  263. package/dist/index218.js +7 -10
  264. package/dist/index218.js.map +1 -1
  265. package/dist/index219.js +9 -9
  266. package/dist/index219.js.map +1 -1
  267. package/dist/index22.js +5 -35
  268. package/dist/index22.js.map +1 -1
  269. package/dist/index220.js +10 -21
  270. package/dist/index220.js.map +1 -1
  271. package/dist/index221.js +21 -10
  272. package/dist/index221.js.map +1 -1
  273. package/dist/index222.js +10 -9
  274. package/dist/index222.js.map +1 -1
  275. package/dist/index223.js +6 -6
  276. package/dist/index223.js.map +1 -1
  277. package/dist/index224.js +9 -4
  278. package/dist/index224.js.map +1 -1
  279. package/dist/index225.js +4 -5
  280. package/dist/index225.js.map +1 -1
  281. package/dist/index226.js +5 -16
  282. package/dist/index226.js.map +1 -1
  283. package/dist/index227.js +16 -9
  284. package/dist/index227.js.map +1 -1
  285. package/dist/index228.js +9 -18
  286. package/dist/index228.js.map +1 -1
  287. package/dist/index229.js +15 -12
  288. package/dist/index229.js.map +1 -1
  289. package/dist/index23.js +24 -258
  290. package/dist/index23.js.map +1 -1
  291. package/dist/index230.js +12 -9
  292. package/dist/index230.js.map +1 -1
  293. package/dist/index231.js +12 -29
  294. package/dist/index231.js.map +1 -1
  295. package/dist/index232.js +28 -11
  296. package/dist/index232.js.map +1 -1
  297. package/dist/index233.js +10 -23
  298. package/dist/index233.js.map +1 -1
  299. package/dist/index234.js +25 -5
  300. package/dist/index234.js.map +1 -1
  301. package/dist/index235.js +5 -24
  302. package/dist/index235.js.map +1 -1
  303. package/dist/index236.js +24 -28
  304. package/dist/index236.js.map +1 -1
  305. package/dist/index237.js +29 -5
  306. package/dist/index237.js.map +1 -1
  307. package/dist/index238.js +5 -68
  308. package/dist/index238.js.map +1 -1
  309. package/dist/index239.js +64 -177
  310. package/dist/index239.js.map +1 -1
  311. package/dist/index24.js +254 -166
  312. package/dist/index24.js.map +1 -1
  313. package/dist/index240.js +176 -42
  314. package/dist/index240.js.map +1 -1
  315. package/dist/index241.js +45 -12
  316. package/dist/index241.js.map +1 -1
  317. package/dist/index242.js +13 -154
  318. package/dist/index242.js.map +1 -1
  319. package/dist/index243.js +151 -27
  320. package/dist/index243.js.map +1 -1
  321. package/dist/index244.js +30 -9
  322. package/dist/index244.js.map +1 -1
  323. package/dist/index245.js +9 -47
  324. package/dist/index245.js.map +1 -1
  325. package/dist/index246.js +46 -10
  326. package/dist/index246.js.map +1 -1
  327. package/dist/index247.js +11 -44
  328. package/dist/index247.js.map +1 -1
  329. package/dist/index248.js +40 -91
  330. package/dist/index248.js.map +1 -1
  331. package/dist/index249.js +85 -76
  332. package/dist/index249.js.map +1 -1
  333. package/dist/index25.js +180 -14
  334. package/dist/index25.js.map +1 -1
  335. package/dist/index250.js +69 -88
  336. package/dist/index250.js.map +1 -1
  337. package/dist/index251.js +92 -39
  338. package/dist/index251.js.map +1 -1
  339. package/dist/index252.js +51 -10
  340. package/dist/index252.js.map +1 -1
  341. package/dist/index253.js +10 -36
  342. package/dist/index253.js.map +1 -1
  343. package/dist/index254.js +37 -8
  344. package/dist/index254.js.map +1 -1
  345. package/dist/index255.js +8 -116
  346. package/dist/index255.js.map +1 -1
  347. package/dist/index256.js +115 -16
  348. package/dist/index256.js.map +1 -1
  349. package/dist/index257.js +17 -15
  350. package/dist/index257.js.map +1 -1
  351. package/dist/index258.js +15 -3
  352. package/dist/index258.js.map +1 -1
  353. package/dist/index259.js +3 -36
  354. package/dist/index259.js.map +1 -1
  355. package/dist/index26.js +15 -2763
  356. package/dist/index26.js.map +1 -1
  357. package/dist/index260.js +35 -19
  358. package/dist/index260.js.map +1 -1
  359. package/dist/index261.js +20 -9
  360. package/dist/index261.js.map +1 -1
  361. package/dist/index262.js +8 -7
  362. package/dist/index262.js.map +1 -1
  363. package/dist/index263.js +8 -19
  364. package/dist/index263.js.map +1 -1
  365. package/dist/index264.js +14 -23
  366. package/dist/index264.js.map +1 -1
  367. package/dist/index265.js +26 -14
  368. package/dist/index265.js.map +1 -1
  369. package/dist/index266.js +16 -4
  370. package/dist/index266.js.map +1 -1
  371. package/dist/index267.js +5 -19
  372. package/dist/index267.js.map +1 -1
  373. package/dist/index268.js +19 -13
  374. package/dist/index268.js.map +1 -1
  375. package/dist/index269.js +13 -5
  376. package/dist/index269.js.map +1 -1
  377. package/dist/index27.js +2761 -35
  378. package/dist/index27.js.map +1 -1
  379. package/dist/index270.js +5 -3
  380. package/dist/index270.js.map +1 -1
  381. package/dist/index271.js +3 -24
  382. package/dist/index271.js.map +1 -1
  383. package/dist/index272.js +22 -111
  384. package/dist/index272.js.map +1 -1
  385. package/dist/index273.js +111 -14
  386. package/dist/index273.js.map +1 -1
  387. package/dist/index274.js +14 -523
  388. package/dist/index274.js.map +1 -1
  389. package/dist/index275.js +511 -114
  390. package/dist/index275.js.map +1 -1
  391. package/dist/index276.js +111 -117
  392. package/dist/index276.js.map +1 -1
  393. package/dist/index277.js +133 -20
  394. package/dist/index277.js.map +1 -1
  395. package/dist/index278.js +20 -5
  396. package/dist/index278.js.map +1 -1
  397. package/dist/index279.js +5 -5
  398. package/dist/index279.js.map +1 -1
  399. package/dist/index28.js +37 -3
  400. package/dist/index28.js.map +1 -1
  401. package/dist/index280.js +6 -4
  402. package/dist/index280.js.map +1 -1
  403. package/dist/index281.js +4 -16
  404. package/dist/index281.js.map +1 -1
  405. package/dist/index282.js +14 -7
  406. package/dist/index282.js.map +1 -1
  407. package/dist/index283.js +8 -5
  408. package/dist/index283.js.map +1 -1
  409. package/dist/index284.js +5 -4
  410. package/dist/index284.js.map +1 -1
  411. package/dist/index285.js +4 -545
  412. package/dist/index285.js.map +1 -1
  413. package/dist/index286.js +544 -45
  414. package/dist/index286.js.map +1 -1
  415. package/dist/index287.js +47 -18
  416. package/dist/index287.js.map +1 -1
  417. package/dist/index288.js +17 -6
  418. package/dist/index288.js.map +1 -1
  419. package/dist/index289.js +6 -8
  420. package/dist/index289.js.map +1 -1
  421. package/dist/index29.js +3 -125
  422. package/dist/index29.js.map +1 -1
  423. package/dist/index290.js +8 -7
  424. package/dist/index290.js.map +1 -1
  425. package/dist/index291.js +7 -8
  426. package/dist/index291.js.map +1 -1
  427. package/dist/index292.js +8 -12
  428. package/dist/index292.js.map +1 -1
  429. package/dist/index293.js +12 -9
  430. package/dist/index293.js.map +1 -1
  431. package/dist/index294.js +9 -13
  432. package/dist/index294.js.map +1 -1
  433. package/dist/index295.js +14 -69
  434. package/dist/index295.js.map +1 -1
  435. package/dist/index296.js +68 -8
  436. package/dist/index296.js.map +1 -1
  437. package/dist/index297.js +9 -14
  438. package/dist/index297.js.map +1 -1
  439. package/dist/index298.js +14 -66
  440. package/dist/index298.js.map +1 -1
  441. package/dist/index299.js +65 -64
  442. package/dist/index299.js.map +1 -1
  443. package/dist/index30.js +120 -227
  444. package/dist/index30.js.map +1 -1
  445. package/dist/index300.js +64 -4
  446. package/dist/index300.js.map +1 -1
  447. package/dist/index301.js +5 -56
  448. package/dist/index301.js.map +1 -1
  449. package/dist/index302.js +54 -66
  450. package/dist/index302.js.map +1 -1
  451. package/dist/index303.js +67 -30
  452. package/dist/index303.js.map +1 -1
  453. package/dist/index304.js +31 -9
  454. package/dist/index304.js.map +1 -1
  455. package/dist/index305.js +9 -153
  456. package/dist/index305.js.map +1 -1
  457. package/dist/index306.js +142 -97
  458. package/dist/index306.js.map +1 -1
  459. package/dist/index307.js +108 -4
  460. package/dist/index307.js.map +1 -1
  461. package/dist/index308.js +3 -22
  462. package/dist/index308.js.map +1 -1
  463. package/dist/index309.js +22 -15
  464. package/dist/index309.js.map +1 -1
  465. package/dist/index31.js +229 -21
  466. package/dist/index31.js.map +1 -1
  467. package/dist/index310.js +14 -27
  468. package/dist/index310.js.map +1 -1
  469. package/dist/index311.js +27 -11
  470. package/dist/index311.js.map +1 -1
  471. package/dist/index312.js +11 -5
  472. package/dist/index312.js.map +1 -1
  473. package/dist/index313.js +6 -12
  474. package/dist/index313.js.map +1 -1
  475. package/dist/index314.js +20 -25
  476. package/dist/index314.js.map +1 -1
  477. package/dist/index315.js +12 -4
  478. package/dist/index315.js.map +1 -1
  479. package/dist/index316.js +25 -20
  480. package/dist/index316.js.map +1 -1
  481. package/dist/index317.js +8 -0
  482. package/dist/index317.js.map +1 -0
  483. package/dist/index32.js +23 -50
  484. package/dist/index32.js.map +1 -1
  485. package/dist/index33.js +50 -2640
  486. package/dist/index33.js.map +1 -1
  487. package/dist/index34.js +2598 -351
  488. package/dist/index34.js.map +1 -1
  489. package/dist/index35.js +375 -214
  490. package/dist/index35.js.map +1 -1
  491. package/dist/index36.js +230 -19
  492. package/dist/index36.js.map +1 -1
  493. package/dist/index37.js +18 -138
  494. package/dist/index37.js.map +1 -1
  495. package/dist/index38.js +125 -170
  496. package/dist/index38.js.map +1 -1
  497. package/dist/index39.js +174 -64
  498. package/dist/index39.js.map +1 -1
  499. package/dist/index40.js +72 -94
  500. package/dist/index40.js.map +1 -1
  501. package/dist/index41.js +98 -5
  502. package/dist/index41.js.map +1 -1
  503. package/dist/index42.js +5 -843
  504. package/dist/index42.js.map +1 -1
  505. package/dist/index43.js +832 -54
  506. package/dist/index43.js.map +1 -1
  507. package/dist/index44.js +66 -8
  508. package/dist/index44.js.map +1 -1
  509. package/dist/index45.js +8 -2
  510. package/dist/index45.js.map +1 -1
  511. package/dist/index46.js +2 -24
  512. package/dist/index46.js.map +1 -1
  513. package/dist/index47.js +22 -232
  514. package/dist/index47.js.map +1 -1
  515. package/dist/index48.js +233 -6
  516. package/dist/index48.js.map +1 -1
  517. package/dist/index49.js +203 -32
  518. package/dist/index49.js.map +1 -1
  519. package/dist/index5.js +1 -1
  520. package/dist/index50.js +3 -26
  521. package/dist/index50.js.map +1 -1
  522. package/dist/index51.js +6 -7
  523. package/dist/index51.js.map +1 -1
  524. package/dist/index52.js +47 -11
  525. package/dist/index52.js.map +1 -1
  526. package/dist/index53.js +26 -204
  527. package/dist/index53.js.map +1 -1
  528. package/dist/index54.js +50 -3
  529. package/dist/index54.js.map +1 -1
  530. package/dist/index55.js +7 -47
  531. package/dist/index55.js.map +1 -1
  532. package/dist/index56.js +12 -48
  533. package/dist/index56.js.map +1 -1
  534. package/dist/index57.js +133 -7
  535. package/dist/index57.js.map +1 -1
  536. package/dist/index58.js +10 -14
  537. package/dist/index58.js.map +1 -1
  538. package/dist/index59.js +210 -127
  539. package/dist/index59.js.map +1 -1
  540. package/dist/index6.js +138 -25
  541. package/dist/index6.js.map +1 -1
  542. package/dist/index60.js +12 -10
  543. package/dist/index60.js.map +1 -1
  544. package/dist/index61.js +32 -215
  545. package/dist/index61.js.map +1 -1
  546. package/dist/index62.js +47 -13
  547. package/dist/index62.js.map +1 -1
  548. package/dist/index63.js +7 -46
  549. package/dist/index63.js.map +1 -1
  550. package/dist/index67.js +2 -2
  551. package/dist/index69.js +3 -3
  552. package/dist/index7.js +26 -29
  553. package/dist/index7.js.map +1 -1
  554. package/dist/index70.js +11 -53
  555. package/dist/index70.js.map +1 -1
  556. package/dist/index71.js +54 -2
  557. package/dist/index71.js.map +1 -1
  558. package/dist/index72.js +6 -2
  559. package/dist/index72.js.map +1 -1
  560. package/dist/index73.js +7 -5
  561. package/dist/index73.js.map +1 -1
  562. package/dist/index74.js +4 -6
  563. package/dist/index74.js.map +1 -1
  564. package/dist/index75.js +2 -6
  565. package/dist/index75.js.map +1 -1
  566. package/dist/index76.js +2 -52
  567. package/dist/index76.js.map +1 -1
  568. package/dist/index77.js +52 -5
  569. package/dist/index77.js.map +1 -1
  570. package/dist/index78.js +4 -4
  571. package/dist/index78.js.map +1 -1
  572. package/dist/index79.js +4 -15
  573. package/dist/index79.js.map +1 -1
  574. package/dist/index8.js +28 -222
  575. package/dist/index8.js.map +1 -1
  576. package/dist/index80.js +15 -5
  577. package/dist/index80.js.map +1 -1
  578. package/dist/index81.js +5 -7
  579. package/dist/index81.js.map +1 -1
  580. package/dist/index82.js +6 -15
  581. package/dist/index82.js.map +1 -1
  582. package/dist/index83.js +16 -4
  583. package/dist/index83.js.map +1 -1
  584. package/dist/index84.js +1 -1
  585. package/dist/index84.js.map +1 -1
  586. package/dist/index85.js +4 -5
  587. package/dist/index85.js.map +1 -1
  588. package/dist/index86.js +4 -4
  589. package/dist/index86.js.map +1 -1
  590. package/dist/index87.js +5 -4
  591. package/dist/index87.js.map +1 -1
  592. package/dist/index88.js +2 -2
  593. package/dist/index88.js.map +1 -1
  594. package/dist/index89.js +3 -5
  595. package/dist/index89.js.map +1 -1
  596. package/dist/index9.js +226 -23
  597. package/dist/index9.js.map +1 -1
  598. package/dist/index90.js +6 -24
  599. package/dist/index90.js.map +1 -1
  600. package/dist/index91.js +24 -6
  601. package/dist/index91.js.map +1 -1
  602. package/dist/index92.js +6 -4
  603. package/dist/index92.js.map +1 -1
  604. package/dist/index93.js +3 -5
  605. package/dist/index93.js.map +1 -1
  606. package/dist/index94.js +6 -5
  607. package/dist/index94.js.map +1 -1
  608. package/dist/index95.js +5 -4
  609. package/dist/index95.js.map +1 -1
  610. package/dist/index96.js +3 -4
  611. package/dist/index96.js.map +1 -1
  612. package/dist/index97.js +5 -4
  613. package/dist/index97.js.map +1 -1
  614. package/dist/index98.js +4 -8
  615. package/dist/index98.js.map +1 -1
  616. package/dist/index99.js +8 -5
  617. package/dist/index99.js.map +1 -1
  618. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index20.js","sources":["../src/components/Select/index.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\"\nimport * as SelectPrimitive from \"@radix-ui/react-select\"\n\nimport { cn } from \"@/lib/utils\"\n\n\nconst Select = SelectPrimitive.Root\nconst SelectGroup = SelectPrimitive.Group\nconst SelectValue = SelectPrimitive.Value\n\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n))\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\n\nconst ScrollContext = React.createContext<{\n viewport: HTMLElement | null\n setViewport: (vp: HTMLElement | null) => void\n} | null>(null)\n\ninterface ScrollButtonImplProps extends React.HTMLAttributes<HTMLDivElement> {\n direction: \"up\" | \"down\"\n speed?: number\n}\n\nconst ScrollButtonImpl = React.forwardRef<HTMLDivElement, ScrollButtonImplProps>(\n ({ direction, speed = 400, className, children, ...rest }, ref) => {\n const scrollContext = React.useContext(ScrollContext)\n const [disabled, setDisabled] = React.useState(true)\n const animationRef = React.useRef<number | undefined>(undefined)\n const lastTimeRef = React.useRef<number | undefined>(undefined)\n const isScrollingRef = React.useRef(false)\n\n const viewport = scrollContext?.viewport\n\n const checkScrollability = React.useCallback(() => {\n if (!viewport) {\n setDisabled(true)\n return\n }\n\n const { scrollTop, scrollHeight, clientHeight } = viewport\n const tolerance = 2\n\n const canScrollUp = scrollTop > tolerance\n const canScrollDown = scrollTop < (scrollHeight - clientHeight - tolerance)\n const hasScrollableContent = scrollHeight > clientHeight + tolerance\n\n if (!hasScrollableContent) {\n setDisabled(true)\n return\n }\n\n const shouldDisable = direction === \"up\" ? !canScrollUp : !canScrollDown\n setDisabled(shouldDisable)\n }, [viewport, direction])\n\n React.useEffect(() => {\n if (!viewport) return\n\n checkScrollability()\n\n const handleScroll = () => checkScrollability()\n const handleResize = () => checkScrollability()\n\n viewport.addEventListener(\"scroll\", handleScroll, { passive: true })\n\n const resizeObserver = new ResizeObserver(handleResize)\n resizeObserver.observe(viewport)\n\n const mutationObserver = new MutationObserver(handleResize)\n mutationObserver.observe(viewport, { childList: true, subtree: true })\n\n return () => {\n viewport.removeEventListener(\"scroll\", handleScroll)\n resizeObserver.disconnect()\n mutationObserver.disconnect()\n }\n }, [viewport, checkScrollability])\n\n const stopScrolling = React.useCallback(() => {\n if (animationRef.current) {\n cancelAnimationFrame(animationRef.current)\n animationRef.current = undefined\n }\n isScrollingRef.current = false\n lastTimeRef.current = undefined\n }, [])\n\n const smoothScroll = React.useCallback(\n (currentTime: number) => {\n if (!viewport || disabled || !isScrollingRef.current) {\n stopScrolling()\n return\n }\n\n if (!lastTimeRef.current) {\n lastTimeRef.current = currentTime\n }\n\n const deltaTime = currentTime - lastTimeRef.current\n const distance = (speed * deltaTime) / 1000\n\n if (distance < 0.1) {\n animationRef.current = requestAnimationFrame(smoothScroll)\n return\n }\n\n const oldScrollTop = viewport.scrollTop\n const maxScroll = viewport.scrollHeight - viewport.clientHeight\n\n let newScrollTop: number\n if (direction === \"up\") {\n newScrollTop = Math.max(0, oldScrollTop - distance)\n } else {\n newScrollTop = Math.min(maxScroll, oldScrollTop + distance)\n }\n\n viewport.scrollTo({ top: newScrollTop })\n\n lastTimeRef.current = currentTime\n\n const tolerance = 1\n const canContinue =\n direction === \"up\"\n ? newScrollTop > tolerance\n : newScrollTop < (maxScroll - tolerance)\n\n if (canContinue && Math.abs(newScrollTop - oldScrollTop) > 0.01) {\n animationRef.current = requestAnimationFrame(smoothScroll)\n } else {\n stopScrolling()\n setTimeout(checkScrollability, 16)\n }\n },\n [viewport, disabled, direction, speed, stopScrolling, checkScrollability],\n )\n\n const startScrolling = React.useCallback(() => {\n if (disabled || !viewport || isScrollingRef.current) return\n\n isScrollingRef.current = true\n lastTimeRef.current = undefined\n animationRef.current = requestAnimationFrame(smoothScroll)\n }, [disabled, viewport, smoothScroll])\n\n React.useEffect(() => {\n return () => stopScrolling()\n }, [stopScrolling])\n\n return (\n <div\n {...rest}\n ref={ref}\n className={cn(\n \"flex items-center justify-center py-1 select-none\",\n disabled ? \"cursor-default opacity-40\" : \"cursor-pointer opacity-100 hover:bg-accent/20\",\n className\n )}\n onPointerEnter={e => {\n rest.onPointerEnter?.(e)\n if (!disabled) startScrolling()\n }}\n onPointerMove={e => {\n rest.onPointerMove?.(e)\n if (!disabled && !isScrollingRef.current) startScrolling()\n }}\n onPointerLeave={e => {\n rest.onPointerLeave?.(e)\n stopScrolling()\n }}\n >\n {children}\n </div>\n )\n }\n)\nScrollButtonImpl.displayName = \"ScrollButtonImpl\"\n\nconst SelectScrollUpButton = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <ScrollButtonImpl ref={ref} direction=\"up\" className={className} {...props}>\n <ChevronUp className=\"h-4 w-4\" />\n </ScrollButtonImpl>\n))\nSelectScrollUpButton.displayName = \"SelectScrollUpButton\"\n\nconst SelectScrollDownButton = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <ScrollButtonImpl ref={ref} direction=\"down\" className={className} {...props}>\n <ChevronDown className=\"h-4 w-4\" />\n </ScrollButtonImpl>\n))\nSelectScrollDownButton.displayName = \"SelectScrollDownButton\"\n\ntype SelectContentProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> & {\n autoScroll?: \"firstEnabled\" | \"firstEnabledWithContext\"\n}\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n SelectContentProps\n>(({ className, children, position = \"popper\", autoScroll, ...props }, ref) => {\n const [viewport, setViewport] = React.useState<HTMLElement | null>(null)\n const viewportRef = React.useCallback((node: HTMLElement | null) => {\n setViewport(node)\n }, [])\n\n React.useEffect(() => {\n if (!viewport || !autoScroll) return\n\n const run = () => {\n const selected = viewport.querySelector(\"[role=\\\"option\\\"][data-state=\\\"checked\\\"]\")\n if (selected instanceof HTMLElement) {\n const padding = 8\n const targetTop = selected.offsetTop - padding\n const targetBottom = selected.offsetTop + selected.offsetHeight + padding\n\n if (targetTop < viewport.scrollTop) {\n viewport.scrollTo({ top: Math.max(0, targetTop) })\n return\n }\n\n const viewportBottom = viewport.scrollTop + viewport.clientHeight\n if (targetBottom > viewportBottom) {\n viewport.scrollTo({ top: Math.max(0, targetBottom - viewport.clientHeight) })\n }\n return\n }\n\n const all = Array.from(\n viewport.querySelectorAll(\"[role=\\\"option\\\"]\")\n ) as HTMLElement[]\n if (!all.length) return\n\n let firstEnabled: HTMLElement | undefined\n let lastDisabledBefore: HTMLElement | undefined\n for (const el of all) {\n const isDisabled = el.hasAttribute(\"data-disabled\")\n if (!isDisabled) {\n firstEnabled = el\n break\n }\n lastDisabledBefore = el\n }\n\n if (!firstEnabled) return\n\n const target =\n autoScroll === \"firstEnabledWithContext\" && lastDisabledBefore\n ? lastDisabledBefore\n : firstEnabled\n\n const offset = Math.max(0, target.offsetTop - 8)\n viewport.scrollTo({ top: offset })\n }\n\n const raf = requestAnimationFrame(run)\n return () => cancelAnimationFrame(raf)\n }, [viewport, autoScroll])\n\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-[60] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className\n )}\n position={position}\n {...props}\n >\n <ScrollContext.Provider value={{ viewport, setViewport }}>\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n ref={viewportRef}\n className={cn(\n \"p-1 overflow-y-auto\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </ScrollContext.Provider>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n})\nSelectContent.displayName = SelectPrimitive.Content.displayName\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"py-1.5 pl-8 pr-2 text-sm font-semibold\", className)}\n {...props}\n />\n))\nSelectLabel.displayName = SelectPrimitive.Label.displayName\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 cursor-pointer\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n))\nSelectItem.displayName = SelectPrimitive.Item.displayName\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n}\n"],"names":["Select","SelectPrimitive.Root","SelectGroup","SelectPrimitive.Group","SelectValue","SelectPrimitive.Value","SelectTrigger","React","className","children","props","ref","jsxs","SelectPrimitive.Trigger","cn","jsx","SelectPrimitive.Icon","ChevronDown","ScrollContext","ScrollButtonImpl","direction","speed","rest","scrollContext","disabled","setDisabled","animationRef","lastTimeRef","isScrollingRef","viewport","checkScrollability","scrollTop","scrollHeight","clientHeight","tolerance","canScrollUp","canScrollDown","handleScroll","handleResize","resizeObserver","mutationObserver","stopScrolling","smoothScroll","currentTime","deltaTime","distance","oldScrollTop","maxScroll","newScrollTop","startScrolling","e","SelectScrollUpButton","ChevronUp","SelectScrollDownButton","SelectContent","position","autoScroll","setViewport","viewportRef","node","raf","selected","targetTop","targetBottom","viewportBottom","all","firstEnabled","lastDisabledBefore","el","offset","SelectPrimitive.Portal","SelectPrimitive.Content","SelectPrimitive.Viewport","SelectLabel","SelectPrimitive.Label","SelectItem","SelectPrimitive.Item","SelectPrimitive.ItemIndicator","Check","SelectPrimitive.ItemText","SelectSeparator","SelectPrimitive.Separator"],"mappings":";;;;;AAOA,MAAMA,KAASC,GACTC,KAAcC,GACdC,KAAcC,GAGdC,IAAgBC,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAASC,MACpCC,gBAAAA,EAAAA;AAAAA,EAACC;AAAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAN;AAAA,IAAA;AAAA,IAED,GAAGE;AAAA,IAEH,UAAA;AAAA,MAAAD;AAAA,MACDM,gBAAAA,EAAAA,IAACC,GAAA,EAAqB,SAAO,IAC3B,UAAAD,gBAAAA,EAAAA,IAACE,GAAA,EAAY,WAAU,qBAAA,CAAqB,EAAA,CAC9C;AAAA,IAAA;AAAA,EAAA;AACF,CACD;AACDX,EAAc,cA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,MACpCC,gBAAAA,EAAAA;AAAAA,EAACgE;AAAAA,EAAA;AAAA,IACC,KAAAjE;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAN;AAAA,IAAA;AAAA,IAED,GAAGE;AAAA,IAEJ,UAAA;AAAA,MAAAK,gBAAAA,EAAAA,IAAC,QAAA,EAAK,WAAU,gEACd,UAAAA,gBAAAA,EAAAA,IAAC8D,GAAA,EACC,UAAA9D,gBAAAA,EAAAA,IAAC+D,GAAA,EAAM,WAAU,UAAA,CAAU,EAAA,CAC7B,GACF;AAAA,MACA/D,gBAAAA,MAACgE,GAAA,EAA0B,UAAAtE,EAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AACtC,CACD;AACDkE,EAAW,cAAcC,EAAqB;AAE9C,MAAMI,IAAkBzE,EAAM,WAG5B,CAAC,EAAE,WAAAC,GAAW,GAAGE,EAAA,GAASC,MAC1BI,gBAAAA,EAAAA;AAAAA,EAACkE;AAAAA,EAAA;AAAA,IACC,KAAAtE;AAAA,IACA,WAAWG,EAAG,4BAA4BN,CAAS;AAAA,IAClD,GAAGE;AAAA,EAAA;AACN,CACD;AACDsE,EAAgB,cAAcC,EAA0B;"}
1
+ {"version":3,"file":"index20.js","sources":["../src/components/PhoneNumberInput/index.tsx"],"sourcesContent":["import * as React from \"react\"\nimport type { CountryCode } from \"libphonenumber-js\"\nimport { getCountryCallingCode } from \"libphonenumber-js\"\nimport Select, {\n type Props as SelectProps,\n type SingleValue,\n type StylesConfig,\n} from \"react-select\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport type {\n CountryOption,\n PhoneNumberChangeDetails,\n PhoneNumberInputProps,\n PhoneNumberSelectedCountry,\n} from \"./types\"\nimport { resolveMessages } from \"./messages\"\nimport {\n DEFAULT_COUNTRY,\n COMMON_IDD_PREFIXES,\n buildFallbackSelectedCountry,\n getCachedCountryOptions,\n getLocaleCacheKey,\n getValidCountry,\n normalizeSearchValue,\n optionMatchIndex,\n parseLocaleCacheKey,\n toSelectedCountry,\n} from \"./country-options\"\nimport {\n detectNationalPrefixForDisplay,\n formatWithAsYouType,\n getLengthIssue,\n getSuggestionState,\n injectNationalPrefixDisplay,\n normalizeInputValue,\n sanitizeDigits,\n shouldDisplayExplicitCountrySelection,\n stripPrefix,\n type LengthIssue,\n} from \"./normalization\"\nimport {\n captureSelectionSnapshot,\n resolveSelection,\n skipFormattingCharactersLeft,\n skipFormattingCharactersRight,\n} from \"./selection\"\nimport {\n HiddenControl,\n NullComponent,\n SuggestionContext,\n SuggestionOption,\n formatCountryOption,\n suggestionSelectStyles,\n type SuggestionContextValue,\n} from \"./suggestions\"\n\n\nexport type {\n CountryOption,\n PhoneNumberChangeDetails,\n PhoneNumberInputMessages,\n PhoneNumberInputProps,\n PhoneNumberInputValidationCode,\n PhoneNumberSelectedCountry,\n} from \"./types\"\n\nexport const PhoneNumberInput = React.forwardRef<HTMLInputElement, PhoneNumberInputProps>(\n function PhoneNumberInput(props, forwardedRef) {\n const {\n value,\n defaultCountry,\n country: countryProp,\n locale,\n onChange,\n onCountryChange,\n className,\n inputClassName,\n disabled,\n readOnly,\n selectProps,\n autofillShimName,\n messages: messagesProp,\n renderValidationMessage,\n ...restProps\n } = props\n\n const {\n onFocus: onInputFocus,\n onBlur: onInputBlur,\n onKeyDown: onInputKeyDown,\n name: inputName,\n autoComplete: inputAutoComplete,\n ...restInputProps\n } = restProps\n\n const hasConfiguredCountry =\n typeof defaultCountry === \"string\" || typeof countryProp === \"string\"\n\n const localeCacheKey = getLocaleCacheKey(locale)\n const localeForBuild = React.useMemo(\n () => parseLocaleCacheKey(localeCacheKey),\n [localeCacheKey]\n )\n const resolvedMessages = React.useMemo(\n () => resolveMessages(localeForBuild, messagesProp),\n [localeForBuild, messagesProp]\n )\n const countryOptions = React.useMemo(\n () => getCachedCountryOptions(localeForBuild, localeCacheKey),\n [localeCacheKey, localeForBuild]\n )\n const resolveSelectedCountry = React.useCallback(\n (country: CountryCode): PhoneNumberSelectedCountry => {\n const match = countryOptions.find((candidate) => candidate.value === country)\n if (match) {\n return toSelectedCountry(match)\n }\n return buildFallbackSelectedCountry(country)\n },\n [countryOptions]\n )\n const fallbackCountry = React.useMemo(() => {\n const candidate = getValidCountry(defaultCountry ?? countryProp ?? DEFAULT_COUNTRY)\n if (countryOptions.some((option) => option.value === candidate)) {\n return candidate\n }\n return countryOptions[0]?.value ?? DEFAULT_COUNTRY\n }, [countryOptions, countryProp, defaultCountry])\n\n const hasResolvedCountryRef = React.useRef<boolean>(hasConfiguredCountry)\n\n const initialStateRef = React.useRef<{\n country: CountryCode\n inputValue: string\n normalizedValue: string\n hasExplicitCountrySelection: boolean\n } | null>(null)\n const lastNormalizedRef = React.useRef<string>(\"\")\n\n if (!initialStateRef.current) {\n if (!value) {\n initialStateRef.current = {\n country: fallbackCountry,\n inputValue: \"\",\n normalizedValue: \"\",\n hasExplicitCountrySelection: false,\n }\n lastNormalizedRef.current = \"\"\n } else {\n const baseCountryForInit = hasConfiguredCountry ? fallbackCountry : undefined\n const normalized = normalizeInputValue(value, baseCountryForInit, { allowJustPlus: true })\n if (!normalized) {\n initialStateRef.current = {\n country: fallbackCountry,\n inputValue: \"\",\n normalizedValue: \"\",\n hasExplicitCountrySelection: false,\n }\n lastNormalizedRef.current = \"\"\n } else {\n const {\n international,\n phoneNumber,\n detectedCountry,\n inferredCountry,\n hasExplicitInternationalPrefix,\n } = formatWithAsYouType(normalized, baseCountryForInit)\n const canonicalDetectedCountry = detectedCountry ?? undefined\n let resolvedCountry = canonicalDetectedCountry ?? fallbackCountry\n const rawDigits = sanitizeDigits(value ?? \"\")\n const hasExplicitPlus = typeof value === \"string\" ? /^\\s*\\+/.test(value) : false\n const internationalDigits = sanitizeDigits(international)\n const initialDialCode = getCountryCallingCode(resolvedCountry)\n const initialHasPrefix = detectNationalPrefixForDisplay(\n rawDigits,\n internationalDigits,\n initialDialCode,\n hasExplicitPlus\n )\n\n const suggestion = getSuggestionState(\n normalized,\n baseCountryForInit,\n phoneNumber ?? undefined,\n {\n hasRemovedNationalPrefix: initialHasPrefix,\n detectedCountry: canonicalDetectedCountry,\n hasExplicitInternationalPrefix,\n }\n )\n\n const inferredCountryToApply =\n !suggestion.shouldSuggest && !canonicalDetectedCountry ? inferredCountry : undefined\n\n\n if (inferredCountryToApply) {\n resolvedCountry = inferredCountryToApply\n }\n\n const resolvedFromValue =\n Boolean(canonicalDetectedCountry) || Boolean(inferredCountryToApply)\n if (resolvedFromValue) {\n hasResolvedCountryRef.current = true\n }\n\n const nextDialCode = getCountryCallingCode(resolvedCountry)\n const finalHasPrefix = inferredCountryToApply\n ? detectNationalPrefixForDisplay(\n rawDigits,\n internationalDigits,\n nextDialCode,\n hasExplicitPlus\n )\n : initialHasPrefix\n\n const displayValue = injectNationalPrefixDisplay(international, nextDialCode, {\n force: finalHasPrefix,\n })\n\n const displayDetectedCountry = canonicalDetectedCountry ?? undefined\n const allowInlineFlag = hasResolvedCountryRef.current\n initialStateRef.current = {\n country: resolvedCountry,\n inputValue: displayValue,\n normalizedValue: normalized,\n hasExplicitCountrySelection:\n allowInlineFlag &&\n shouldDisplayExplicitCountrySelection(suggestion, {\n detectedCountry: displayDetectedCountry,\n hasExplicitInternationalPrefix,\n }),\n }\n lastNormalizedRef.current = normalized\n }\n }\n }\n\n const initialState = initialStateRef.current\n\n const [uncontrolledCountry, setUncontrolledCountry] = React.useState(initialState.country)\n const [inputValueState, setInputValueState] = React.useState(initialState.inputValue)\n const [countryQuery, setCountryQuery] = React.useState(\"\")\n const [showSuggestions, setShowSuggestions] = React.useState(false)\n const [highlightedIndex, setHighlightedIndex] = React.useState<number>(-1)\n const [isFocused, setIsFocused] = React.useState(false)\n const [lengthIssue, setLengthIssue] = React.useState<LengthIssue | null>(null)\n const [hasExplicitCountrySelection, setHasExplicitCountrySelection] = React.useState(\n initialState.hasExplicitCountrySelection\n )\n const manualSelectionCountryRef = React.useRef<CountryCode | null>(null)\n\n const keyboardBufferRef = React.useRef(\"\")\n const bufferTimeoutRef = React.useRef<number | null>(null)\n const scrollBehaviorRef = React.useRef<ScrollBehavior>(\"smooth\")\n const pendingSelectionRef = React.useRef<{ start: number; end: number } | null>(null)\n const consumeScrollBehavior = React.useCallback(() => {\n const behavior = scrollBehaviorRef.current\n scrollBehaviorRef.current = \"smooth\"\n return behavior\n }, [])\n\n const isCountryControlled = typeof countryProp === \"string\"\n const selectedCountry = isCountryControlled ? countryProp : uncontrolledCountry\n const activeCountry = selectedCountry ?? fallbackCountry\n\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n\n React.useImperativeHandle(forwardedRef, () => inputRef.current as HTMLInputElement, [])\n\n React.useLayoutEffect(() => {\n const selection = pendingSelectionRef.current\n if (!selection) {\n return\n }\n\n const input = inputRef.current\n pendingSelectionRef.current = null\n if (!input) {\n return\n }\n\n const { start, end } = selection\n input.setSelectionRange(start, end)\n }, [inputValueState])\n\n const selectOverrides = selectProps ?? {}\n const {\n styles: userSelectStyles,\n components: userSelectComponents,\n classNamePrefix: userClassNamePrefix,\n formatOptionLabel: userFormatOptionLabel,\n ...forwardedSelectProps\n } = selectOverrides\n const { noOptionsMessage, ...restForwardedSelectProps } = forwardedSelectProps\n\n const mergedSelectStyles = React.useMemo<StylesConfig<CountryOption, false>>(\n () => ({\n ...suggestionSelectStyles,\n ...(userSelectStyles ?? {}),\n }),\n [userSelectStyles]\n )\n\n const mergedSelectComponents = React.useMemo(() => {\n const baseComponents = {\n Control: HiddenControl,\n IndicatorsContainer: NullComponent,\n DropdownIndicator: NullComponent,\n IndicatorSeparator: NullComponent,\n ValueContainer: NullComponent,\n }\n\n const overrides = userSelectComponents ?? {}\n\n if (!overrides.Option) {\n return {\n ...baseComponents,\n ...overrides,\n Option: SuggestionOption,\n }\n }\n\n return {\n ...baseComponents,\n ...overrides,\n }\n }, [userSelectComponents])\n\n const hasAnnouncedCountryRef = React.useRef(false)\n\n const notifyCountryChange = React.useCallback(\n (country: CountryCode) => {\n hasAnnouncedCountryRef.current = true\n const selection = resolveSelectedCountry(country)\n onCountryChange?.(country, selection)\n return selection\n },\n [onCountryChange, resolveSelectedCountry]\n )\n\n React.useEffect(() => () => {\n if (bufferTimeoutRef.current != null && typeof window !== \"undefined\") {\n window.clearTimeout(bufferTimeoutRef.current)\n }\n }, [])\n\n React.useEffect(() => {\n if (value == null) {\n return\n }\n\n const baseCountryForSync = hasResolvedCountryRef.current ? activeCountry : undefined\n const previousNormalized = lastNormalizedRef.current\n const normalized = normalizeInputValue(value, baseCountryForSync, {\n allowJustPlus: true,\n previousValue: previousNormalized,\n })\n lastNormalizedRef.current = normalized\n keyboardBufferRef.current = \"\"\n\n if (!normalized) {\n setInputValueState(\"\")\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n return\n }\n\n if (normalized === \"0\") {\n setInputValueState(\"0\")\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n return\n }\n\n if (normalized === \"+\") {\n setInputValueState(\"+\")\n setShowSuggestions(true)\n setCountryQuery(\"\")\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n return\n }\n\n const {\n international,\n phoneNumber,\n detectedCountry,\n inferredCountry,\n hasExplicitInternationalPrefix,\n } = formatWithAsYouType(normalized, baseCountryForSync)\n const canonicalDetectedCountry = detectedCountry ?? undefined\n let nextCountry = canonicalDetectedCountry ?? baseCountryForSync ?? activeCountry\n const rawDigits = sanitizeDigits(value ?? \"\")\n const hasExplicitPlus = typeof value === \"string\" ? /^\\s*\\+/.test(value) : false\n const internationalDigits = sanitizeDigits(international)\n const initialDialCode = getCountryCallingCode(nextCountry)\n const initialHasTypedTrunk = detectNationalPrefixForDisplay(\n rawDigits,\n internationalDigits,\n initialDialCode,\n hasExplicitPlus\n )\n\n const suggestion = getSuggestionState(\n normalized,\n baseCountryForSync,\n phoneNumber ?? undefined,\n {\n hasRemovedNationalPrefix: initialHasTypedTrunk,\n detectedCountry: canonicalDetectedCountry,\n hasExplicitInternationalPrefix,\n }\n )\n\n const inferredCountryToApply =\n !suggestion.shouldSuggest && !canonicalDetectedCountry ? inferredCountry : undefined\n const finalCountry = inferredCountryToApply ?? nextCountry\n\n const resolvedFromValue =\n Boolean(canonicalDetectedCountry) || Boolean(inferredCountryToApply)\n if (resolvedFromValue) {\n hasResolvedCountryRef.current = true\n }\n\n if (!isCountryControlled && finalCountry !== uncontrolledCountry) {\n setUncontrolledCountry(finalCountry)\n notifyCountryChange(finalCountry)\n }\n\n nextCountry = finalCountry\n\n if (\n manualSelectionCountryRef.current &&\n manualSelectionCountryRef.current !== nextCountry\n ) {\n manualSelectionCountryRef.current = null\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n const hasTypedTrunk = inferredCountryToApply\n ? detectNationalPrefixForDisplay(\n rawDigits,\n internationalDigits,\n nextDialCode,\n hasExplicitPlus\n )\n : initialHasTypedTrunk\n\n const displayValue = injectNationalPrefixDisplay(international, nextDialCode, {\n force: hasTypedTrunk,\n })\n const displayDetectedCountry = canonicalDetectedCountry ?? undefined\n const manualSelectionActive = manualSelectionCountryRef.current != null\n const shouldShowInlineFlag =\n manualSelectionActive ||\n shouldDisplayExplicitCountrySelection(suggestion, {\n detectedCountry: displayDetectedCountry,\n hasExplicitInternationalPrefix,\n })\n\n setInputValueState(displayValue)\n setShowSuggestions(suggestion.shouldSuggest)\n setCountryQuery(suggestion.query)\n setLengthIssue(hasResolvedCountryRef.current ? getLengthIssue(normalized, nextCountry) : null)\n setHasExplicitCountrySelection(hasResolvedCountryRef.current && shouldShowInlineFlag)\n }, [\n value,\n activeCountry,\n fallbackCountry,\n hasConfiguredCountry,\n isCountryControlled,\n notifyCountryChange,\n uncontrolledCountry,\n ])\n\n React.useEffect(() => {\n if (hasAnnouncedCountryRef.current) {\n return\n }\n if (!hasResolvedCountryRef.current) {\n return\n }\n const current = selectedCountry ?? fallbackCountry\n if (!current) {\n return\n }\n notifyCountryChange(current)\n }, [fallbackCountry, notifyCountryChange, selectedCountry])\n\n React.useEffect(() => {\n if (isCountryControlled && countryProp && countryProp !== uncontrolledCountry) {\n setUncontrolledCountry(countryProp)\n }\n }, [countryProp, isCountryControlled, uncontrolledCountry])\n\n const emitChange = React.useCallback(\n (details: Omit<PhoneNumberChangeDetails, \"selectedCountry\">) => {\n const selection = resolveSelectedCountry(details.country)\n onChange?.({\n ...details,\n selectedCountry: selection,\n })\n },\n [onChange, resolveSelectedCountry]\n )\n\n const scheduleBufferReset = React.useCallback(() => {\n if (typeof window === \"undefined\") {\n return\n }\n\n if (bufferTimeoutRef.current != null) {\n window.clearTimeout(bufferTimeoutRef.current)\n }\n\n bufferTimeoutRef.current = window.setTimeout(() => {\n keyboardBufferRef.current = \"\"\n bufferTimeoutRef.current = null\n }, 800)\n }, [])\n\n const handleInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const target = event.target\n const snapshot = captureSelectionSnapshot(target)\n const raw = target.value\n keyboardBufferRef.current = \"\"\n\n const baseCountryForInput = hasResolvedCountryRef.current ? activeCountry : undefined\n const dialCode = baseCountryForInput ? getCountryCallingCode(baseCountryForInput) : \"\"\n const typedDigits = sanitizeDigits(raw)\n const hasExplicitPlus = raw.trim().startsWith(\"+\")\n const startsWithDialCode = dialCode ? typedDigits.startsWith(dialCode) : false\n const hasLeadingZero = typedDigits.startsWith(\"0\")\n const isIddPrefix = COMMON_IDD_PREFIXES.some((prefix) => typedDigits.startsWith(prefix))\n\n const shouldRemoveNationalPrefix =\n Boolean(baseCountryForInput) &&\n !isIddPrefix &&\n ((startsWithDialCode && typedDigits.slice(dialCode.length).startsWith(\"0\")) ||\n (!hasExplicitPlus && hasLeadingZero && typedDigits.length > 1) ||\n (hasExplicitPlus && hasLeadingZero && typedDigits.length > 1 && !startsWithDialCode))\n\n const previousNormalized = lastNormalizedRef.current\n const normalized = normalizeInputValue(raw, baseCountryForInput, {\n allowJustPlus: true,\n removeNationalPrefix: shouldRemoveNationalPrefix,\n previousValue: previousNormalized,\n })\n lastNormalizedRef.current = normalized\n\n if (!normalized) {\n setInputValueState(\"\")\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n pendingSelectionRef.current = resolveSelection(snapshot, \"\")\n\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n emitChange({\n formattedInternational: \"\",\n formattedNational: \"\",\n e164: null,\n country: nextCountry,\n countryCallingCode: nextDialCode,\n nationalNumber: \"\",\n rawInput: \"\",\n isValid: false,\n })\n return\n }\n\n if (normalized === \"0\") {\n setInputValueState(\"0\")\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n pendingSelectionRef.current = resolveSelection(snapshot, \"0\")\n\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n emitChange({\n formattedInternational: \"0\",\n formattedNational: \"0\",\n e164: null,\n country: nextCountry,\n countryCallingCode: nextDialCode,\n nationalNumber: \"0\",\n rawInput: \"0\",\n isValid: false,\n })\n return\n }\n\n if (normalized === \"+\") {\n setInputValueState(\"+\")\n setShowSuggestions(true)\n setCountryQuery(\"\")\n setHighlightedIndex(0)\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n pendingSelectionRef.current = resolveSelection(snapshot, \"+\")\n\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n emitChange({\n formattedInternational: \"+\",\n formattedNational: \"\",\n e164: null,\n country: nextCountry,\n countryCallingCode: nextDialCode,\n nationalNumber: \"\",\n rawInput: \"+\",\n isValid: false,\n })\n return\n }\n\n const {\n international,\n national,\n phoneNumber,\n detectedCountry,\n inferredCountry,\n hasExplicitInternationalPrefix,\n } = formatWithAsYouType(normalized, baseCountryForInput)\n const canonicalDetectedCountry = detectedCountry ?? undefined\n let nextCountry = canonicalDetectedCountry ?? baseCountryForInput ?? activeCountry\n\n const internationalDigits = sanitizeDigits(international)\n const initialDialCode = getCountryCallingCode(nextCountry)\n const initialHasTypedTrunk = detectNationalPrefixForDisplay(\n typedDigits,\n internationalDigits,\n initialDialCode,\n hasExplicitPlus\n )\n\n const suggestion = getSuggestionState(\n normalized,\n baseCountryForInput,\n phoneNumber ?? undefined,\n {\n hasRemovedNationalPrefix: initialHasTypedTrunk,\n detectedCountry: canonicalDetectedCountry,\n hasExplicitInternationalPrefix,\n }\n )\n\n const inferredCountryToApply =\n !suggestion.shouldSuggest && !canonicalDetectedCountry ? inferredCountry : undefined\n const finalCountry = inferredCountryToApply ?? nextCountry\n\n const resolvedFromInput =\n Boolean(canonicalDetectedCountry) || Boolean(inferredCountryToApply)\n if (resolvedFromInput) {\n hasResolvedCountryRef.current = true\n }\n\n if (!isCountryControlled && finalCountry !== uncontrolledCountry) {\n setUncontrolledCountry(finalCountry)\n notifyCountryChange(finalCountry)\n }\n\n nextCountry = finalCountry\n\n if (\n manualSelectionCountryRef.current &&\n manualSelectionCountryRef.current !== nextCountry\n ) {\n manualSelectionCountryRef.current = null\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n const normalizedDigits = sanitizeDigits(normalized)\n const nationalDigits = stripPrefix(normalizedDigits, nextDialCode)\n const hasTypedTrunk = inferredCountryToApply\n ? detectNationalPrefixForDisplay(\n typedDigits,\n internationalDigits,\n nextDialCode,\n hasExplicitPlus\n )\n : initialHasTypedTrunk\n\n const displayValue = injectNationalPrefixDisplay(international, nextDialCode, {\n force: hasTypedTrunk,\n })\n\n const displayDetectedCountry = canonicalDetectedCountry ?? undefined\n\n pendingSelectionRef.current = resolveSelection(snapshot, displayValue)\n setInputValueState(displayValue)\n setShowSuggestions(suggestion.shouldSuggest)\n setCountryQuery(suggestion.query)\n setHighlightedIndex(suggestion.shouldSuggest ? 0 : -1)\n setLengthIssue(hasResolvedCountryRef.current ? getLengthIssue(normalized, nextCountry) : null)\n const manualSelectionActive = manualSelectionCountryRef.current != null\n const shouldShowInlineFlag =\n manualSelectionActive ||\n shouldDisplayExplicitCountrySelection(suggestion, {\n detectedCountry: displayDetectedCountry,\n hasExplicitInternationalPrefix,\n })\n setHasExplicitCountrySelection(hasResolvedCountryRef.current && shouldShowInlineFlag)\n emitChange({\n formattedInternational: international,\n formattedNational: national,\n e164: phoneNumber?.number ?? null,\n country: nextCountry,\n countryCallingCode: nextDialCode,\n nationalNumber: nationalDigits,\n rawInput: normalized,\n isValid: phoneNumber?.isValid() ?? false,\n })\n },\n [\n activeCountry,\n emitChange,\n fallbackCountry,\n hasConfiguredCountry,\n isCountryControlled,\n notifyCountryChange,\n uncontrolledCountry,\n ]\n )\n\n const handleCountrySelect = React.useCallback(\n (option: SingleValue<CountryOption>) => {\n if (!option) {\n return\n }\n\n const previousDigits = sanitizeDigits(lastNormalizedRef.current || inputValueState)\n const currentDial = getCountryCallingCode(activeCountry)\n const digitsWithoutCurrentDial = previousDigits.startsWith(currentDial)\n ? previousDigits.slice(currentDial.length)\n : previousDigits\n let rebasedDigits = digitsWithoutCurrentDial\n if (!rebasedDigits) {\n rebasedDigits = option.dialCode\n } else if (!rebasedDigits.startsWith(option.dialCode)) {\n rebasedDigits = `${option.dialCode}${rebasedDigits}`\n }\n const normalized = `+${rebasedDigits}`\n lastNormalizedRef.current = normalized\n const { international, national, phoneNumber } = formatWithAsYouType(\n normalized,\n option.value\n )\n const nextCountry = option.value\n manualSelectionCountryRef.current = nextCountry\n hasResolvedCountryRef.current = true\n\n setInputValueState(international)\n pendingSelectionRef.current = {\n start: international.length,\n end: international.length,\n }\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(getLengthIssue(normalized, nextCountry))\n\n if (!isCountryControlled && nextCountry !== uncontrolledCountry) {\n setUncontrolledCountry(nextCountry)\n }\n\n notifyCountryChange(nextCountry)\n\n const normalizedDigits = sanitizeDigits(normalized)\n const dialCode = phoneNumber?.countryCallingCode ?? option.dialCode\n const nationalDigits = stripPrefix(normalizedDigits, dialCode)\n setHasExplicitCountrySelection(true)\n emitChange({\n formattedInternational: international,\n formattedNational: national,\n e164: phoneNumber?.number ?? null,\n country: nextCountry,\n countryCallingCode: dialCode,\n nationalNumber: nationalDigits,\n rawInput: normalized,\n isValid: phoneNumber?.isValid() ?? false,\n })\n\n requestAnimationFrame(() => {\n inputRef.current?.focus()\n })\n },\n [activeCountry, emitChange, inputValueState, isCountryControlled, notifyCountryChange, uncontrolledCountry]\n )\n\n const filteredOptions = React.useMemo(() => {\n if (!showSuggestions) {\n return [] as CountryOption[]\n }\n\n const results: CountryOption[] = []\n\n const pushUnique = (option: CountryOption) => {\n if (!results.some((existing) => existing.value === option.value)) {\n results.push(option)\n }\n }\n\n const fallbackOption = countryOptions.find((option) => option.value === fallbackCountry)\n const currentOption = countryOptions.find((option) => option.value === activeCountry)\n const query = countryQuery.trim()\n const digitQuery = sanitizeDigits(query)\n const normalizedQuery = normalizeSearchValue(query)\n\n if (!digitQuery && !normalizedQuery) {\n if (fallbackOption) {\n pushUnique(fallbackOption)\n }\n if (currentOption) {\n pushUnique(currentOption)\n }\n countryOptions.forEach(pushUnique)\n return results\n }\n\n if (digitQuery) {\n const dialMatches = countryOptions\n .filter((option) => option.dialCode.startsWith(digitQuery))\n .sort((a, b) => {\n const aExact = a.dialCode === digitQuery\n const bExact = b.dialCode === digitQuery\n if (aExact && !bExact) {\n return -1\n }\n if (!aExact && bExact) {\n return 1\n }\n return a.dialCode.length - b.dialCode.length\n })\n dialMatches.forEach(pushUnique)\n }\n\n if (normalizedQuery) {\n const nameMatches = countryOptions\n .filter((option) =>\n option.normalizedSearchableTokens.some((token) => token.includes(normalizedQuery))\n )\n .sort((a, b) => {\n const aIndex = optionMatchIndex(a.normalizedSearchableTokens, normalizedQuery)\n const bIndex = optionMatchIndex(b.normalizedSearchableTokens, normalizedQuery)\n if (aIndex !== bIndex) {\n return aIndex - bIndex\n }\n return a.name.localeCompare(b.name)\n })\n nameMatches.forEach(pushUnique)\n }\n\n if (currentOption) {\n pushUnique(currentOption)\n }\n if (fallbackOption) {\n pushUnique(fallbackOption)\n }\n if (results.length === 0) {\n countryOptions.forEach(pushUnique)\n }\n\n return results\n }, [activeCountry, countryOptions, countryQuery, fallbackCountry, showSuggestions])\n\n const suggestionMenuIsOpen = isFocused && showSuggestions && filteredOptions.length > 0\n\n React.useEffect(() => {\n if (!suggestionMenuIsOpen) {\n scrollBehaviorRef.current = \"smooth\"\n }\n }, [suggestionMenuIsOpen])\n\n React.useEffect(() => {\n if (!suggestionMenuIsOpen) {\n setHighlightedIndex(-1)\n return\n }\n\n if (filteredOptions.length === 0) {\n setHighlightedIndex(-1)\n return\n }\n\n setHighlightedIndex((current) => {\n if (current < 0 || current >= filteredOptions.length) {\n return 0\n }\n return current\n })\n }, [filteredOptions, suggestionMenuIsOpen])\n\n const highlightedOption =\n highlightedIndex >= 0 ? filteredOptions[highlightedIndex] ?? null : null\n React.useEffect(() => {\n if (highlightedIndex < 0) {\n scrollBehaviorRef.current = \"smooth\"\n }\n }, [highlightedIndex])\n\n const updateHighlightedOption = React.useCallback(\n (option: CountryOption) => {\n const index = filteredOptions.findIndex((candidate) => candidate.value === option.value)\n if (index !== -1) {\n setHighlightedIndex(index)\n }\n },\n [filteredOptions]\n )\n\n const selectFormatOptionLabel = React.useCallback<\n NonNullable<SelectProps<CountryOption, false>[\"formatOptionLabel\"]>\n >(\n (option, meta) => {\n if (userFormatOptionLabel) {\n return userFormatOptionLabel(option, meta)\n }\n return formatCountryOption(option)\n },\n [userFormatOptionLabel]\n )\n\n const optionLabelRenderer = React.useCallback(\n (option: CountryOption) =>\n selectFormatOptionLabel(option, {\n context: \"menu\",\n inputValue: countryQuery,\n selectValue: [],\n }),\n [countryQuery, selectFormatOptionLabel]\n )\n\n const highlightContextValue = React.useMemo<SuggestionContextValue>(\n () => ({\n highlightedValue: highlightedOption?.value ?? null,\n setHighlightedOption: updateHighlightedOption,\n renderOptionLabel: optionLabelRenderer,\n consumeScrollBehavior,\n }),\n [consumeScrollBehavior, highlightedOption, optionLabelRenderer, updateHighlightedOption]\n )\n\n const activeOption = countryOptions.find((option) => option.value === activeCountry)\n const activeFlag = activeOption?.flag ?? \"\"\n const inlineFlagLabel = hasExplicitCountrySelection\n ? resolvedMessages.selectedCountryLabel(activeOption?.name ?? activeCountry ?? null)\n : resolvedMessages.selectCountryLabel\n const hasInlineFlag = hasExplicitCountrySelection && Boolean(activeFlag)\n const lengthHint =\n lengthIssue === \"TOO_LONG\"\n ? resolvedMessages.lengthTooLong(activeOption?.name ?? activeCountry ?? null)\n : null\n const countryName = activeOption?.name ?? activeCountry ?? null\n\n let validationNode: React.ReactNode = null\n if (lengthHint) {\n const rendered = renderValidationMessage?.({\n message: lengthHint,\n code: \"TOO_LONG\",\n countryName,\n })\n validationNode =\n rendered === undefined ? (\n <p className=\"mt-1 text-xs text-destructive\">\n <span>{lengthHint}</span>\n </p>\n ) : (\n rendered\n )\n }\n\n const appendToBuffer = React.useCallback(\n (char: string) => {\n keyboardBufferRef.current = `${keyboardBufferRef.current}${char}`.slice(-12)\n setCountryQuery(keyboardBufferRef.current)\n setShowSuggestions(true)\n scheduleBufferReset()\n },\n [scheduleBufferReset]\n )\n\n const popBuffer = React.useCallback(() => {\n const current = keyboardBufferRef.current\n if (!current) {\n return\n }\n keyboardBufferRef.current = current.slice(0, -1)\n setCountryQuery(keyboardBufferRef.current)\n if (keyboardBufferRef.current) {\n scheduleBufferReset()\n }\n }, [scheduleBufferReset])\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLInputElement>) => {\n onInputKeyDown?.(event)\n if (event.defaultPrevented) {\n return\n }\n\n const key = event.key\n\n if (event.metaKey || event.ctrlKey || event.altKey) {\n return\n }\n\n const target = event.currentTarget\n const value = target.value\n const selectionStart = target.selectionStart ?? 0\n const selectionEnd = target.selectionEnd ?? selectionStart\n const isCollapsedSelection = selectionStart === selectionEnd\n\n if (key === \"Backspace\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersLeft(value, selectionStart)\n if (nextStart !== selectionStart) {\n target.setSelectionRange(nextStart, nextStart)\n }\n } else if (key === \"ArrowLeft\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersLeft(value, selectionStart)\n if (nextStart !== selectionStart) {\n event.preventDefault()\n target.setSelectionRange(nextStart, nextStart)\n return\n }\n } else if (key === \"ArrowRight\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersRight(value, selectionEnd)\n if (nextStart !== selectionEnd) {\n event.preventDefault()\n target.setSelectionRange(nextStart, nextStart)\n return\n }\n }\n\n if (key === \"ArrowDown\") {\n scrollBehaviorRef.current = event.repeat ? \"auto\" : \"smooth\"\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? 0 : -1)\n return\n }\n\n if (filteredOptions.length > 0) {\n setHighlightedIndex((current) => {\n const next = current < 0 ? 0 : (current + 1) % filteredOptions.length\n return next\n })\n }\n return\n }\n\n if (key === \"ArrowUp\") {\n scrollBehaviorRef.current = event.repeat ? \"auto\" : \"smooth\"\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? filteredOptions.length - 1 : -1)\n return\n }\n\n if (filteredOptions.length > 0) {\n setHighlightedIndex((current) => {\n if (current < 0) {\n return filteredOptions.length - 1\n }\n return (current - 1 + filteredOptions.length) % filteredOptions.length\n })\n }\n return\n }\n\n if (/^[a-z]$/i.test(key)) {\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? 0 : -1)\n }\n appendToBuffer(key.toLowerCase())\n return\n }\n\n if (suggestionMenuIsOpen) {\n if (key === \"Backspace\" && keyboardBufferRef.current) {\n event.preventDefault()\n popBuffer()\n return\n }\n\n if (key === \"Escape\") {\n event.preventDefault()\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n setShowSuggestions(false)\n return\n }\n\n if (key === \"Enter\" && filteredOptions.length > 0) {\n event.preventDefault()\n const target = highlightedOption ?? filteredOptions[0]\n handleCountrySelect(target)\n return\n }\n }\n },\n [\n appendToBuffer,\n filteredOptions,\n handleCountrySelect,\n highlightedOption,\n onInputKeyDown,\n popBuffer,\n showSuggestions,\n suggestionMenuIsOpen,\n ]\n )\n\n const handleFocus = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true)\n onInputFocus?.(event)\n },\n [onInputFocus]\n )\n\n const handleBlur = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(false)\n setShowSuggestions(false)\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n onInputBlur?.(event)\n },\n [onInputBlur]\n )\n\n const openCountryMenu = React.useCallback(() => {\n if (disabled || readOnly) {\n return\n }\n\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n setShowSuggestions(true)\n setHighlightedIndex((current) => (current < 0 ? 0 : current))\n\n requestAnimationFrame(() => {\n inputRef.current?.focus()\n })\n }, [disabled, readOnly])\n\n const shimName = autofillShimName ?? (inputName ? `${inputName}_shim` : undefined)\n\n return (\n <div className={cn(\"relative flex flex-col\", className)}>\n <div className=\"relative\">\n <input\n {...restInputProps}\n ref={inputRef}\n type=\"tel\"\n className={cn(\n \"flex h-10 w-full rounded-md border border-input bg-background py-2 text-base ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"pl-11 pr-3\",\n inputClassName\n )}\n name={inputName}\n value={inputValueState}\n onChange={handleInputChange}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n readOnly={readOnly}\n autoComplete={inputAutoComplete ?? \"off\"}\n />\n <button\n type=\"button\"\n className={cn(\n \"absolute left-3 top-1/2 flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded border text-lg leading-none transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n hasInlineFlag\n ? \"border-transparent\"\n : \"border-dashed border-border text-muted-foreground\",\n disabled\n ? \"cursor-not-allowed opacity-50\"\n : readOnly\n ? \"cursor-default\"\n : \"cursor-pointer hover:bg-muted\"\n )}\n aria-label={inlineFlagLabel}\n onMouseDown={(event) => event.preventDefault()}\n onClick={openCountryMenu}\n tabIndex={-1}\n disabled={disabled}\n >\n <span aria-hidden=\"true\">\n {hasInlineFlag ? activeFlag : \"?\"}\n </span>\n </button>\n </div>\n\n {shimName ? (\n <input\n tabIndex={-1}\n autoComplete=\"tel\"\n name={shimName}\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute left-0 top-0 h-0 w-0 opacity-0\"\n />\n ) : null}\n\n <div\n className=\"absolute left-0 top-full z-30 mt-1\"\n style={{\n pointerEvents: suggestionMenuIsOpen ? \"auto\" : \"none\",\n width: \"min(260px, 100%)\",\n }}\n onMouseDown={(event) => event.preventDefault()}\n >\n <SuggestionContext.Provider value={highlightContextValue}>\n <Select<CountryOption, false>\n {...restForwardedSelectProps}\n menuIsOpen={suggestionMenuIsOpen}\n options={filteredOptions}\n value={null}\n components={mergedSelectComponents}\n styles={mergedSelectStyles}\n isClearable={false}\n isSearchable={false}\n backspaceRemovesValue={false}\n tabSelectsValue={false}\n menuShouldScrollIntoView={false}\n onChange={handleCountrySelect}\n classNamePrefix={userClassNamePrefix ?? \"phone-number-suggestions\"}\n placeholder=\"\"\n formatOptionLabel={selectFormatOptionLabel}\n noOptionsMessage={\n noOptionsMessage ?? (() => resolvedMessages.noMatches)\n }\n />\n </SuggestionContext.Provider>\n </div>\n\n {validationNode}\n </div>\n )\n }\n)\n\nPhoneNumberInput.displayName = \"PhoneNumberInput\"\n"],"names":["PhoneNumberInput","React","props","forwardedRef","value","defaultCountry","countryProp","locale","onChange","onCountryChange","className","inputClassName","disabled","readOnly","selectProps","autofillShimName","messagesProp","renderValidationMessage","restProps","onInputFocus","onInputBlur","onInputKeyDown","inputName","inputAutoComplete","restInputProps","hasConfiguredCountry","localeCacheKey","getLocaleCacheKey","localeForBuild","parseLocaleCacheKey","resolvedMessages","resolveMessages","countryOptions","getCachedCountryOptions","resolveSelectedCountry","country","match","candidate","toSelectedCountry","buildFallbackSelectedCountry","fallbackCountry","getValidCountry","DEFAULT_COUNTRY","option","hasResolvedCountryRef","initialStateRef","lastNormalizedRef","baseCountryForInit","normalized","normalizeInputValue","international","phoneNumber","detectedCountry","inferredCountry","hasExplicitInternationalPrefix","formatWithAsYouType","canonicalDetectedCountry","resolvedCountry","rawDigits","sanitizeDigits","hasExplicitPlus","internationalDigits","initialDialCode","getCountryCallingCode","initialHasPrefix","detectNationalPrefixForDisplay","suggestion","getSuggestionState","inferredCountryToApply","nextDialCode","finalHasPrefix","displayValue","injectNationalPrefixDisplay","displayDetectedCountry","allowInlineFlag","shouldDisplayExplicitCountrySelection","initialState","uncontrolledCountry","setUncontrolledCountry","inputValueState","setInputValueState","countryQuery","setCountryQuery","showSuggestions","setShowSuggestions","highlightedIndex","setHighlightedIndex","isFocused","setIsFocused","lengthIssue","setLengthIssue","hasExplicitCountrySelection","setHasExplicitCountrySelection","manualSelectionCountryRef","keyboardBufferRef","bufferTimeoutRef","scrollBehaviorRef","pendingSelectionRef","consumeScrollBehavior","behavior","isCountryControlled","selectedCountry","activeCountry","inputRef","selection","input","start","end","selectOverrides","userSelectStyles","userSelectComponents","userClassNamePrefix","userFormatOptionLabel","forwardedSelectProps","noOptionsMessage","restForwardedSelectProps","mergedSelectStyles","suggestionSelectStyles","mergedSelectComponents","baseComponents","HiddenControl","NullComponent","overrides","SuggestionOption","hasAnnouncedCountryRef","notifyCountryChange","baseCountryForSync","previousNormalized","nextCountry","initialHasTypedTrunk","finalCountry","hasTypedTrunk","shouldShowInlineFlag","getLengthIssue","current","emitChange","details","scheduleBufferReset","handleInputChange","event","target","snapshot","captureSelectionSnapshot","raw","baseCountryForInput","dialCode","typedDigits","startsWithDialCode","hasLeadingZero","isIddPrefix","COMMON_IDD_PREFIXES","prefix","shouldRemoveNationalPrefix","resolveSelection","national","normalizedDigits","nationalDigits","stripPrefix","handleCountrySelect","previousDigits","currentDial","rebasedDigits","filteredOptions","results","pushUnique","existing","fallbackOption","currentOption","query","digitQuery","normalizedQuery","normalizeSearchValue","a","b","aExact","bExact","token","aIndex","optionMatchIndex","bIndex","suggestionMenuIsOpen","highlightedOption","updateHighlightedOption","index","selectFormatOptionLabel","meta","formatCountryOption","optionLabelRenderer","highlightContextValue","activeOption","activeFlag","inlineFlagLabel","hasInlineFlag","lengthHint","countryName","validationNode","rendered","jsx","appendToBuffer","char","popBuffer","handleKeyDown","key","selectionStart","selectionEnd","isCollapsedSelection","nextStart","skipFormattingCharactersLeft","skipFormattingCharactersRight","handleFocus","handleBlur","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MAAUA,EAAM,eAAA;AAAA,UAE9B,UAAA0D,gBAAAA,EAAAA,IAACkB,GAAkB,UAAlB,EAA2B,OAAO3B,IACjC,UAAAS,gBAAAA,EAAAA;AAAAA,YAACmB;AAAA,YAAA;AAAA,cACE,GAAGrG;AAAA,cACJ,YAAYiE;AAAA,cACZ,SAASlB;AAAA,cACT,OAAO;AAAA,cACP,YAAY5C;AAAA,cACZ,QAAQF;AAAA,cACR,aAAa;AAAA,cACb,cAAc;AAAA,cACd,uBAAuB;AAAA,cACvB,iBAAiB;AAAA,cACjB,0BAA0B;AAAA,cAC1B,UAAU0C;AAAA,cACV,iBAAiB/C,MAAuB;AAAA,cACxC,aAAY;AAAA,cACZ,mBAAmByE;AAAA,cACnB,kBACAtE,OAAqB,MAAMpF,GAAiB;AAAA,YAAA;AAAA,UAAA,EAEhD,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,MAGCqK;AAAA,IAAA,GACH;AAAA,EAEJ;AACF;AAEAnM,GAAiB,cAAc;"}
package/dist/index200.js CHANGED
@@ -1,8 +1,13 @@
1
- function e(t) {
2
- return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
1
+ import { millisecondsInWeek as f } from "./index281.js";
2
+ import { startOfWeek as m } from "./index214.js";
3
+ import { startOfWeekYear as a } from "./index294.js";
4
+ import { toDate as i } from "./index280.js";
5
+ function k(r, t) {
6
+ const e = i(r, t?.in), o = +m(e, t) - +a(e, t);
7
+ return Math.round(o / f) + 1;
3
8
  }
4
9
  export {
5
- e as default,
6
- e as isDate
10
+ k as default,
11
+ k as getWeek
7
12
  };
8
13
  //# sourceMappingURL=index200.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index200.js","sources":["../../../node_modules/date-fns/isDate.js"],"sourcesContent":["/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n return (\n value instanceof Date ||\n (typeof value === \"object\" &&\n Object.prototype.toString.call(value) === \"[object Date]\")\n );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n"],"names":["isDate","value"],"mappings":"AAgCO,SAASA,EAAOC,GAAO;AAC5B,SACEA,aAAiB,QAChB,OAAOA,KAAU,YAChB,OAAO,UAAU,SAAS,KAAKA,CAAK,MAAM;AAEhD;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index200.js","sources":["../../../node_modules/date-fns/getWeek.js"],"sourcesContent":["import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { startOfWeekYear } from \"./startOfWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> 53\n */\nexport function getWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n"],"names":["getWeek","date","options","_date","toDate","diff","startOfWeek","startOfWeekYear","millisecondsInWeek"],"mappings":";;;;AA2CO,SAASA,EAAQC,GAAMC,GAAS;AACrC,QAAMC,IAAQC,EAAOH,GAAMC,GAAS,EAAE,GAChCG,IAAO,CAACC,EAAYH,GAAOD,CAAO,IAAI,CAACK,EAAgBJ,GAAOD,CAAO;AAK3E,SAAO,KAAK,MAAMG,IAAOG,CAAkB,IAAI;AACjD;","x_google_ignoreList":[0]}
package/dist/index201.js CHANGED
@@ -1,15 +1,9 @@
1
- import { normalizeDates as f } from "./index282.js";
2
- import { startOfDay as t } from "./index208.js";
3
- function s(a, e, r) {
4
- const [o, i] = f(
5
- r?.in,
6
- a,
7
- e
8
- );
9
- return +t(o) == +t(i);
1
+ import { toDate as t } from "./index280.js";
2
+ function f(r, e) {
3
+ return +t(r) > +t(e);
10
4
  }
11
5
  export {
12
- s as default,
13
- s as isSameDay
6
+ f as default,
7
+ f as isAfter
14
8
  };
15
9
  //# sourceMappingURL=index201.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index201.js","sources":["../../../node_modules/date-fns/isSameDay.js"],"sourcesContent":["import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link isSameDay} function options.\n */\n\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same day (and year and month)\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n *\n * @example\n * // Are 4 September and 4 October in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n *\n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\nexport function isSameDay(laterDate, earlierDate, options) {\n const [dateLeft_, dateRight_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return +startOfDay(dateLeft_) === +startOfDay(dateRight_);\n}\n\n// Fallback for modularized imports:\nexport default isSameDay;\n"],"names":["isSameDay","laterDate","earlierDate","options","dateLeft_","dateRight_","normalizeDates","startOfDay"],"mappings":";;AAoCO,SAASA,EAAUC,GAAWC,GAAaC,GAAS;AACzD,QAAM,CAACC,GAAWC,CAAU,IAAIC;AAAA,IAC9BH,GAAS;AAAA,IACTF;AAAA,IACAC;AAAA,EACJ;AACE,SAAO,CAACK,EAAWH,CAAS,KAAM,CAACG,EAAWF,CAAU;AAC1D;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index201.js","sources":["../../../node_modules/date-fns/isAfter.js"],"sourcesContent":["import { toDate } from \"./toDate.js\";\n\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param date - The date that should be after the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nexport function isAfter(date, dateToCompare) {\n return +toDate(date) > +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isAfter;\n"],"names":["isAfter","date","dateToCompare","toDate"],"mappings":";AAoBO,SAASA,EAAQC,GAAMC,GAAe;AAC3C,SAAO,CAACC,EAAOF,CAAI,IAAI,CAACE,EAAOD,CAAa;AAC9C;","x_google_ignoreList":[0]}
package/dist/index202.js CHANGED
@@ -1,14 +1,9 @@
1
- import { normalizeDates as o } from "./index282.js";
2
- function i(a, r, n) {
3
- const [e, t] = o(
4
- n?.in,
5
- a,
6
- r
7
- );
8
- return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth();
1
+ import { toDate as t } from "./index280.js";
2
+ function f(e, o) {
3
+ return +t(e) < +t(o);
9
4
  }
10
5
  export {
11
- i as default,
12
- i as isSameMonth
6
+ f as default,
7
+ f as isBefore
13
8
  };
14
9
  //# sourceMappingURL=index202.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index202.js","sources":["../../../node_modules/date-fns/isSameMonth.js"],"sourcesContent":["import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameMonth} function options.\n */\n\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same month (and year)\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\nexport function isSameMonth(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return (\n laterDate_.getFullYear() === earlierDate_.getFullYear() &&\n laterDate_.getMonth() === earlierDate_.getMonth()\n );\n}\n\n// Fallback for modularized imports:\nexport default isSameMonth;\n"],"names":["isSameMonth","laterDate","earlierDate","options","laterDate_","earlierDate_","normalizeDates"],"mappings":";AA8BO,SAASA,EAAYC,GAAWC,GAAaC,GAAS;AAC3D,QAAM,CAACC,GAAYC,CAAY,IAAIC;AAAA,IACjCH,GAAS;AAAA,IACTF;AAAA,IACAC;AAAA,EACJ;AACE,SACEE,EAAW,YAAW,MAAOC,EAAa,YAAW,KACrDD,EAAW,eAAeC,EAAa,SAAQ;AAEnD;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index202.js","sources":["../../../node_modules/date-fns/isBefore.js"],"sourcesContent":["import { toDate } from \"./toDate.js\";\n\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param date - The date that should be before the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nexport function isBefore(date, dateToCompare) {\n return +toDate(date) < +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isBefore;\n"],"names":["isBefore","date","dateToCompare","toDate"],"mappings":";AAoBO,SAASA,EAASC,GAAMC,GAAe;AAC5C,SAAO,CAACC,EAAOF,CAAI,IAAI,CAACE,EAAOD,CAAa;AAC9C;","x_google_ignoreList":[0]}
package/dist/index203.js CHANGED
@@ -1,14 +1,8 @@
1
- import { normalizeDates as i } from "./index282.js";
2
- function o(e, a, r) {
3
- const [t, l] = i(
4
- r?.in,
5
- e,
6
- a
7
- );
8
- return t.getFullYear() === l.getFullYear();
1
+ function e(t) {
2
+ return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
9
3
  }
10
4
  export {
11
- o as default,
12
- o as isSameYear
5
+ e as default,
6
+ e as isDate
13
7
  };
14
8
  //# sourceMappingURL=index203.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index203.js","sources":["../../../node_modules/date-fns/isSameYear.js"],"sourcesContent":["import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameYear} function options.\n */\n\n/**\n * @name isSameYear\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same year\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\nexport function isSameYear(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return laterDate_.getFullYear() === earlierDate_.getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default isSameYear;\n"],"names":["isSameYear","laterDate","earlierDate","options","laterDate_","earlierDate_","normalizeDates"],"mappings":";AAyBO,SAASA,EAAWC,GAAWC,GAAaC,GAAS;AAC1D,QAAM,CAACC,GAAYC,CAAY,IAAIC;AAAA,IACjCH,GAAS;AAAA,IACTF;AAAA,IACAC;AAAA,EACJ;AACE,SAAOE,EAAW,kBAAkBC,EAAa,YAAW;AAC9D;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index203.js","sources":["../../../node_modules/date-fns/isDate.js"],"sourcesContent":["/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n return (\n value instanceof Date ||\n (typeof value === \"object\" &&\n Object.prototype.toString.call(value) === \"[object Date]\")\n );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n"],"names":["isDate","value"],"mappings":"AAgCO,SAASA,EAAOC,GAAO;AAC5B,SACEA,aAAiB,QAChB,OAAOA,KAAU,YAChB,OAAO,UAAU,SAAS,KAAKA,CAAK,MAAM;AAEhD;","x_google_ignoreList":[0]}
package/dist/index204.js CHANGED
@@ -1,15 +1,15 @@
1
- import { constructFrom as n } from "./index278.js";
2
- import { toDate as c } from "./index279.js";
3
- function m(f, i) {
4
- let t, o = i?.in;
5
- return f.forEach((r) => {
6
- !o && typeof r == "object" && (o = n.bind(null, r));
7
- const e = c(r, o);
8
- (!t || t < e || isNaN(+e)) && (t = e);
9
- }), n(o, t || NaN);
1
+ import { normalizeDates as f } from "./index283.js";
2
+ import { startOfDay as t } from "./index211.js";
3
+ function s(a, e, r) {
4
+ const [o, i] = f(
5
+ r?.in,
6
+ a,
7
+ e
8
+ );
9
+ return +t(o) == +t(i);
10
10
  }
11
11
  export {
12
- m as default,
13
- m as max
12
+ s as default,
13
+ s as isSameDay
14
14
  };
15
15
  //# sourceMappingURL=index204.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index204.js","sources":["../../../node_modules/date-fns/max.js"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link max} function options.\n */\n\n/**\n * @name max\n * @category Common Helpers\n * @summary Return the latest of the given dates.\n *\n * @description\n * Return the latest of the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param dates - The dates to compare\n *\n * @returns The latest of the dates\n *\n * @example\n * // Which of these dates is the latest?\n * const result = max([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Sun Jul 02 1995 00:00:00\n */\nexport function max(dates, options) {\n let result;\n let context = options?.in;\n\n dates.forEach((date) => {\n // Use the first date object as the context function\n if (!context && typeof date === \"object\")\n context = constructFrom.bind(null, date);\n\n const date_ = toDate(date, context);\n if (!result || result < date_ || isNaN(+date_)) result = date_;\n });\n\n return constructFrom(context, result || NaN);\n}\n\n// Fallback for modularized imports:\nexport default max;\n"],"names":["max","dates","options","result","context","date","constructFrom","date_","toDate"],"mappings":";;AAgCO,SAASA,EAAIC,GAAOC,GAAS;AAClC,MAAIC,GACAC,IAAUF,GAAS;AAEvB,SAAAD,EAAM,QAAQ,CAACI,MAAS;AAEtB,IAAI,CAACD,KAAW,OAAOC,KAAS,aAC9BD,IAAUE,EAAc,KAAK,MAAMD,CAAI;AAEzC,UAAME,IAAQC,EAAOH,GAAMD,CAAO;AAClC,KAAI,CAACD,KAAUA,IAASI,KAAS,MAAM,CAACA,CAAK,OAAGJ,IAASI;AAAA,EAC3D,CAAC,GAEMD,EAAcF,GAASD,KAAU,GAAG;AAC7C;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index204.js","sources":["../../../node_modules/date-fns/isSameDay.js"],"sourcesContent":["import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link isSameDay} function options.\n */\n\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same day (and year and month)\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n *\n * @example\n * // Are 4 September and 4 October in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n *\n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\nexport function isSameDay(laterDate, earlierDate, options) {\n const [dateLeft_, dateRight_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return +startOfDay(dateLeft_) === +startOfDay(dateRight_);\n}\n\n// Fallback for modularized imports:\nexport default isSameDay;\n"],"names":["isSameDay","laterDate","earlierDate","options","dateLeft_","dateRight_","normalizeDates","startOfDay"],"mappings":";;AAoCO,SAASA,EAAUC,GAAWC,GAAaC,GAAS;AACzD,QAAM,CAACC,GAAWC,CAAU,IAAIC;AAAA,IAC9BH,GAAS;AAAA,IACTF;AAAA,IACAC;AAAA,EACJ;AACE,SAAO,CAACK,EAAWH,CAAS,KAAM,CAACG,EAAWF,CAAU;AAC1D;","x_google_ignoreList":[0]}
package/dist/index205.js CHANGED
@@ -1,15 +1,14 @@
1
- import { constructFrom as e } from "./index278.js";
2
- import { toDate as c } from "./index279.js";
3
- function u(i, f) {
4
- let t, o = f?.in;
5
- return i.forEach((r) => {
6
- !o && typeof r == "object" && (o = e.bind(null, r));
7
- const n = c(r, o);
8
- (!t || t > n || isNaN(+n)) && (t = n);
9
- }), e(o, t || NaN);
1
+ import { normalizeDates as o } from "./index283.js";
2
+ function i(a, r, n) {
3
+ const [e, t] = o(
4
+ n?.in,
5
+ a,
6
+ r
7
+ );
8
+ return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth();
10
9
  }
11
10
  export {
12
- u as default,
13
- u as min
11
+ i as default,
12
+ i as isSameMonth
14
13
  };
15
14
  //# sourceMappingURL=index205.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index205.js","sources":["../../../node_modules/date-fns/min.js"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link min} function options.\n */\n\n/**\n * @name min\n * @category Common Helpers\n * @summary Returns the earliest of the given dates.\n *\n * @description\n * Returns the earliest of the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param dates - The dates to compare\n *\n * @returns The earliest of the dates\n *\n * @example\n * // Which of these dates is the earliest?\n * const result = min([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Wed Feb 11 1987 00:00:00\n */\nexport function min(dates, options) {\n let result;\n let context = options?.in;\n\n dates.forEach((date) => {\n // Use the first date object as the context function\n if (!context && typeof date === \"object\")\n context = constructFrom.bind(null, date);\n\n const date_ = toDate(date, context);\n if (!result || result > date_ || isNaN(+date_)) result = date_;\n });\n\n return constructFrom(context, result || NaN);\n}\n\n// Fallback for modularized imports:\nexport default min;\n"],"names":["min","dates","options","result","context","date","constructFrom","date_","toDate"],"mappings":";;AAgCO,SAASA,EAAIC,GAAOC,GAAS;AAClC,MAAIC,GACAC,IAAUF,GAAS;AAEvB,SAAAD,EAAM,QAAQ,CAACI,MAAS;AAEtB,IAAI,CAACD,KAAW,OAAOC,KAAS,aAC9BD,IAAUE,EAAc,KAAK,MAAMD,CAAI;AAEzC,UAAME,IAAQC,EAAOH,GAAMD,CAAO;AAClC,KAAI,CAACD,KAAUA,IAASI,KAAS,MAAM,CAACA,CAAK,OAAGJ,IAASI;AAAA,EAC3D,CAAC,GAEMD,EAAcF,GAASD,KAAU,GAAG;AAC7C;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index205.js","sources":["../../../node_modules/date-fns/isSameMonth.js"],"sourcesContent":["import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameMonth} function options.\n */\n\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same month (and year)\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\nexport function isSameMonth(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return (\n laterDate_.getFullYear() === earlierDate_.getFullYear() &&\n laterDate_.getMonth() === earlierDate_.getMonth()\n );\n}\n\n// Fallback for modularized imports:\nexport default isSameMonth;\n"],"names":["isSameMonth","laterDate","earlierDate","options","laterDate_","earlierDate_","normalizeDates"],"mappings":";AA8BO,SAASA,EAAYC,GAAWC,GAAaC,GAAS;AAC3D,QAAM,CAACC,GAAYC,CAAY,IAAIC;AAAA,IACjCH,GAAS;AAAA,IACTF;AAAA,IACAC;AAAA,EACJ;AACE,SACEE,EAAW,YAAW,MAAOC,EAAa,YAAW,KACrDD,EAAW,eAAeC,EAAa,SAAQ;AAEnD;","x_google_ignoreList":[0]}
package/dist/index206.js CHANGED
@@ -1,14 +1,14 @@
1
- import { constructFrom as m } from "./index278.js";
2
- import { getDaysInMonth as i } from "./index290.js";
3
- import { toDate as u } from "./index279.js";
4
- function l(n, e, r) {
5
- const t = u(n, r?.in), s = t.getFullYear(), a = t.getDate(), o = m(n, 0);
6
- o.setFullYear(s, e, 15), o.setHours(0, 0, 0, 0);
7
- const c = i(o);
8
- return t.setMonth(e, Math.min(a, c)), t;
1
+ import { normalizeDates as i } from "./index283.js";
2
+ function o(e, a, r) {
3
+ const [t, l] = i(
4
+ r?.in,
5
+ e,
6
+ a
7
+ );
8
+ return t.getFullYear() === l.getFullYear();
9
9
  }
10
10
  export {
11
- l as default,
12
- l as setMonth
11
+ o as default,
12
+ o as isSameYear
13
13
  };
14
14
  //# sourceMappingURL=index206.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index206.js","sources":["../../../node_modules/date-fns/setMonth.js"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\nimport { getDaysInMonth } from \"./getDaysInMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setMonth} function options.\n */\n\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param month - The month index to set (0-11)\n * @param options - The options\n *\n * @returns The new date with the month set\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nexport function setMonth(date, month, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const day = _date.getDate();\n\n const midMonth = constructFrom(options?.in || date, 0);\n midMonth.setFullYear(year, month, 15);\n midMonth.setHours(0, 0, 0, 0);\n const daysInMonth = getDaysInMonth(midMonth);\n\n // Set the earlier date, allows to wrap Jan 31 to Feb 28\n _date.setMonth(month, Math.min(day, daysInMonth));\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setMonth;\n"],"names":["setMonth","date","month","options","_date","toDate","year","day","midMonth","constructFrom","daysInMonth","getDaysInMonth"],"mappings":";;;AA8BO,SAASA,EAASC,GAAMC,GAAOC,GAAS;AAC7C,QAAMC,IAAQC,EAAOJ,GAAME,GAAS,EAAE,GAChCG,IAAOF,EAAM,YAAW,GACxBG,IAAMH,EAAM,QAAO,GAEnBI,IAAWC,EAA6BR,GAAM,CAAC;AACrD,EAAAO,EAAS,YAAYF,GAAMJ,GAAO,EAAE,GACpCM,EAAS,SAAS,GAAG,GAAG,GAAG,CAAC;AAC5B,QAAME,IAAcC,EAAeH,CAAQ;AAG3C,SAAAJ,EAAM,SAASF,GAAO,KAAK,IAAIK,GAAKG,CAAW,CAAC,GACzCN;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index206.js","sources":["../../../node_modules/date-fns/isSameYear.js"],"sourcesContent":["import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameYear} function options.\n */\n\n/**\n * @name isSameYear\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same year\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\nexport function isSameYear(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return laterDate_.getFullYear() === earlierDate_.getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default isSameYear;\n"],"names":["isSameYear","laterDate","earlierDate","options","laterDate_","earlierDate_","normalizeDates"],"mappings":";AAyBO,SAASA,EAAWC,GAAWC,GAAaC,GAAS;AAC1D,QAAM,CAACC,GAAYC,CAAY,IAAIC;AAAA,IACjCH,GAAS;AAAA,IACTF;AAAA,IACAC;AAAA,EACJ;AACE,SAAOE,EAAW,kBAAkBC,EAAa,YAAW;AAC9D;","x_google_ignoreList":[0]}
package/dist/index207.js CHANGED
@@ -1,11 +1,15 @@
1
- import { constructFrom as a } from "./index278.js";
2
- import { toDate as n } from "./index279.js";
3
- function u(r, o, e) {
4
- const t = n(r, e?.in);
5
- return isNaN(+t) ? a(r, NaN) : (t.setFullYear(o), t);
1
+ import { constructFrom as n } from "./index279.js";
2
+ import { toDate as c } from "./index280.js";
3
+ function m(f, i) {
4
+ let t, o = i?.in;
5
+ return f.forEach((r) => {
6
+ !o && typeof r == "object" && (o = n.bind(null, r));
7
+ const e = c(r, o);
8
+ (!t || t < e || isNaN(+e)) && (t = e);
9
+ }), n(o, t || NaN);
6
10
  }
7
11
  export {
8
- u as default,
9
- u as setYear
12
+ m as default,
13
+ m as max
10
14
  };
11
15
  //# sourceMappingURL=index207.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index207.js","sources":["../../../node_modules/date-fns/setYear.js"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setYear} function options.\n */\n\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param year - The year of the new date\n * @param options - An object with options.\n *\n * @returns The new date with the year set\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\nexport function setYear(date, year, options) {\n const date_ = toDate(date, options?.in);\n\n // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n if (isNaN(+date_)) return constructFrom(options?.in || date, NaN);\n\n date_.setFullYear(year);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default setYear;\n"],"names":["setYear","date","year","options","date_","toDate","constructFrom"],"mappings":";;AA6BO,SAASA,EAAQC,GAAMC,GAAMC,GAAS;AAC3C,QAAMC,IAAQC,EAAOJ,GAAME,GAAS,EAAE;AAGtC,SAAI,MAAM,CAACC,CAAK,IAAUE,EAA6BL,GAAM,GAAG,KAEhEG,EAAM,YAAYF,CAAI,GACfE;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index207.js","sources":["../../../node_modules/date-fns/max.js"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link max} function options.\n */\n\n/**\n * @name max\n * @category Common Helpers\n * @summary Return the latest of the given dates.\n *\n * @description\n * Return the latest of the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param dates - The dates to compare\n *\n * @returns The latest of the dates\n *\n * @example\n * // Which of these dates is the latest?\n * const result = max([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Sun Jul 02 1995 00:00:00\n */\nexport function max(dates, options) {\n let result;\n let context = options?.in;\n\n dates.forEach((date) => {\n // Use the first date object as the context function\n if (!context && typeof date === \"object\")\n context = constructFrom.bind(null, date);\n\n const date_ = toDate(date, context);\n if (!result || result < date_ || isNaN(+date_)) result = date_;\n });\n\n return constructFrom(context, result || NaN);\n}\n\n// Fallback for modularized imports:\nexport default max;\n"],"names":["max","dates","options","result","context","date","constructFrom","date_","toDate"],"mappings":";;AAgCO,SAASA,EAAIC,GAAOC,GAAS;AAClC,MAAIC,GACAC,IAAUF,GAAS;AAEvB,SAAAD,EAAM,QAAQ,CAACI,MAAS;AAEtB,IAAI,CAACD,KAAW,OAAOC,KAAS,aAC9BD,IAAUE,EAAc,KAAK,MAAMD,CAAI;AAEzC,UAAME,IAAQC,EAAOH,GAAMD,CAAO;AAClC,KAAI,CAACD,KAAUA,IAASI,KAAS,MAAM,CAACA,CAAK,OAAGJ,IAASI;AAAA,EAC3D,CAAC,GAEMD,EAAcF,GAASD,KAAU,GAAG;AAC7C;","x_google_ignoreList":[0]}
package/dist/index208.js CHANGED
@@ -1,10 +1,15 @@
1
- import { toDate as a } from "./index279.js";
2
- function n(o, r) {
3
- const t = a(o, r?.in);
4
- return t.setHours(0, 0, 0, 0), t;
1
+ import { constructFrom as e } from "./index279.js";
2
+ import { toDate as c } from "./index280.js";
3
+ function u(i, f) {
4
+ let t, o = f?.in;
5
+ return i.forEach((r) => {
6
+ !o && typeof r == "object" && (o = e.bind(null, r));
7
+ const n = c(r, o);
8
+ (!t || t > n || isNaN(+n)) && (t = n);
9
+ }), e(o, t || NaN);
5
10
  }
6
11
  export {
7
- n as default,
8
- n as startOfDay
12
+ u as default,
13
+ u as min
9
14
  };
10
15
  //# sourceMappingURL=index208.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index208.js","sources":["../../../node_modules/date-fns/startOfDay.js"],"sourcesContent":["import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfDay} function options.\n */\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n"],"names":["startOfDay","date","options","_date","toDate"],"mappings":";AA4BO,SAASA,EAAWC,GAAMC,GAAS;AACxC,QAAMC,IAAQC,EAAOH,GAAMC,GAAS,EAAE;AACtC,SAAAC,EAAM,SAAS,GAAG,GAAG,GAAG,CAAC,GAClBA;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index208.js","sources":["../../../node_modules/date-fns/min.js"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link min} function options.\n */\n\n/**\n * @name min\n * @category Common Helpers\n * @summary Returns the earliest of the given dates.\n *\n * @description\n * Returns the earliest of the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param dates - The dates to compare\n *\n * @returns The earliest of the dates\n *\n * @example\n * // Which of these dates is the earliest?\n * const result = min([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Wed Feb 11 1987 00:00:00\n */\nexport function min(dates, options) {\n let result;\n let context = options?.in;\n\n dates.forEach((date) => {\n // Use the first date object as the context function\n if (!context && typeof date === \"object\")\n context = constructFrom.bind(null, date);\n\n const date_ = toDate(date, context);\n if (!result || result > date_ || isNaN(+date_)) result = date_;\n });\n\n return constructFrom(context, result || NaN);\n}\n\n// Fallback for modularized imports:\nexport default min;\n"],"names":["min","dates","options","result","context","date","constructFrom","date_","toDate"],"mappings":";;AAgCO,SAASA,EAAIC,GAAOC,GAAS;AAClC,MAAIC,GACAC,IAAUF,GAAS;AAEvB,SAAAD,EAAM,QAAQ,CAACI,MAAS;AAEtB,IAAI,CAACD,KAAW,OAAOC,KAAS,aAC9BD,IAAUE,EAAc,KAAK,MAAMD,CAAI;AAEzC,UAAME,IAAQC,EAAOH,GAAMD,CAAO;AAClC,KAAI,CAACD,KAAUA,IAASI,KAAS,MAAM,CAACA,CAAK,OAAGJ,IAASI;AAAA,EAC3D,CAAC,GAEMD,EAAcF,GAASD,KAAU,GAAG;AAC7C;","x_google_ignoreList":[0]}