@rpcbase/ui 0.287.0 → 0.289.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 (738) hide show
  1. package/dist/assets/sha256.worker-DNtOSCbM.js.map +1 -0
  2. package/dist/components/FilesUploadField/index.d.ts.map +1 -1
  3. package/dist/index.js +12 -12
  4. package/dist/index10.js.map +1 -1
  5. package/dist/index100.js.map +1 -1
  6. package/dist/index101.js.map +1 -1
  7. package/dist/index102.js.map +1 -1
  8. package/dist/index103.js.map +1 -1
  9. package/dist/index104.js.map +1 -1
  10. package/dist/index105.js.map +1 -1
  11. package/dist/index106.js.map +1 -1
  12. package/dist/index107.js.map +1 -1
  13. package/dist/index108.js.map +1 -1
  14. package/dist/index109.js.map +1 -1
  15. package/dist/index11.js +96 -17
  16. package/dist/index11.js.map +1 -1
  17. package/dist/index110.js.map +1 -1
  18. package/dist/index111.js.map +1 -1
  19. package/dist/index112.js.map +1 -1
  20. package/dist/index113.js.map +1 -1
  21. package/dist/index114.js.map +1 -1
  22. package/dist/index115.js.map +1 -1
  23. package/dist/index116.js.map +1 -1
  24. package/dist/index117.js.map +1 -1
  25. package/dist/index118.js.map +1 -1
  26. package/dist/index119.js.map +1 -1
  27. package/dist/index12.js.map +1 -1
  28. package/dist/index120.js.map +1 -1
  29. package/dist/index121.js.map +1 -1
  30. package/dist/index122.js.map +1 -1
  31. package/dist/index123.js +1 -1
  32. package/dist/index123.js.map +1 -1
  33. package/dist/index124.js.map +1 -1
  34. package/dist/index125.js.map +1 -1
  35. package/dist/index126.js.map +1 -1
  36. package/dist/index127.js.map +1 -1
  37. package/dist/index128.js.map +1 -1
  38. package/dist/index129.js.map +1 -1
  39. package/dist/index13.js.map +1 -1
  40. package/dist/index130.js.map +1 -1
  41. package/dist/index131.js.map +1 -1
  42. package/dist/index132.js.map +1 -1
  43. package/dist/index133.js.map +1 -1
  44. package/dist/index134.js.map +1 -1
  45. package/dist/index135.js.map +1 -1
  46. package/dist/index136.js.map +1 -1
  47. package/dist/index137.js.map +1 -1
  48. package/dist/index138.js.map +1 -1
  49. package/dist/index139.js.map +1 -1
  50. package/dist/index14.js.map +1 -1
  51. package/dist/index140.js.map +1 -1
  52. package/dist/index141.js.map +1 -1
  53. package/dist/index142.js.map +1 -1
  54. package/dist/index143.js.map +1 -1
  55. package/dist/index144.js.map +1 -1
  56. package/dist/index145.js.map +1 -1
  57. package/dist/index146.js.map +1 -1
  58. package/dist/index147.js.map +1 -1
  59. package/dist/index148.js.map +1 -1
  60. package/dist/index149.js.map +1 -1
  61. package/dist/index15.js.map +1 -1
  62. package/dist/index150.js.map +1 -1
  63. package/dist/index151.js.map +1 -1
  64. package/dist/index152.js.map +1 -1
  65. package/dist/index153.js.map +1 -1
  66. package/dist/index154.js +4 -4
  67. package/dist/index154.js.map +1 -1
  68. package/dist/index155.js.map +1 -1
  69. package/dist/index156.js.map +1 -1
  70. package/dist/index157.js.map +1 -1
  71. package/dist/index158.js.map +1 -1
  72. package/dist/index159.js.map +1 -1
  73. package/dist/index16.js.map +1 -1
  74. package/dist/index160.js.map +1 -1
  75. package/dist/index161.js.map +1 -1
  76. package/dist/index162.js.map +1 -1
  77. package/dist/index163.js.map +1 -1
  78. package/dist/index164.js.map +1 -1
  79. package/dist/index165.js.map +1 -1
  80. package/dist/index166.js.map +1 -1
  81. package/dist/index167.js.map +1 -1
  82. package/dist/index168.js.map +1 -1
  83. package/dist/index169.js.map +1 -1
  84. package/dist/index17.js.map +1 -1
  85. package/dist/index170.js +18 -12
  86. package/dist/index170.js.map +1 -1
  87. package/dist/index171.js.map +1 -1
  88. package/dist/index172.js.map +1 -1
  89. package/dist/index173.js.map +1 -1
  90. package/dist/index174.js.map +1 -1
  91. package/dist/index175.js.map +1 -1
  92. package/dist/index176.js.map +1 -1
  93. package/dist/index177.js.map +1 -1
  94. package/dist/index178.js.map +1 -1
  95. package/dist/index179.js.map +1 -1
  96. package/dist/index18.js.map +1 -1
  97. package/dist/index180.js.map +1 -1
  98. package/dist/index181.js +1 -1
  99. package/dist/index181.js.map +1 -1
  100. package/dist/index182.js +3 -3
  101. package/dist/index182.js.map +1 -1
  102. package/dist/index183.js.map +1 -1
  103. package/dist/index184.js.map +1 -1
  104. package/dist/index185.js.map +1 -1
  105. package/dist/index186.js.map +1 -1
  106. package/dist/index187.js.map +1 -1
  107. package/dist/index188.js.map +1 -1
  108. package/dist/index189.js.map +1 -1
  109. package/dist/index19.js.map +1 -1
  110. package/dist/index190.js +9 -7
  111. package/dist/index190.js.map +1 -1
  112. package/dist/index191.js +4 -4
  113. package/dist/index191.js.map +1 -1
  114. package/dist/index192.js +4 -15
  115. package/dist/index192.js.map +1 -1
  116. package/dist/index193.js +13 -3
  117. package/dist/index193.js.map +1 -1
  118. package/dist/index194.js +2 -2
  119. package/dist/index194.js.map +1 -1
  120. package/dist/index195.js +4 -85
  121. package/dist/index195.js.map +1 -1
  122. package/dist/index196.js +79 -54
  123. package/dist/index196.js.map +1 -1
  124. package/dist/index197.js +68 -7
  125. package/dist/index197.js.map +1 -1
  126. package/dist/index198.js +3 -23
  127. package/dist/index198.js.map +1 -1
  128. package/dist/index199.js +6 -28
  129. package/dist/index199.js.map +1 -1
  130. package/dist/index20.js.map +1 -1
  131. package/dist/index200.js +4 -97
  132. package/dist/index200.js.map +1 -1
  133. package/dist/index201.js +3 -4
  134. package/dist/index201.js.map +1 -1
  135. package/dist/index202.js +23 -24
  136. package/dist/index202.js.map +1 -1
  137. package/dist/index203.js +28 -10
  138. package/dist/index203.js.map +1 -1
  139. package/dist/index204.js +97 -4
  140. package/dist/index204.js.map +1 -1
  141. package/dist/index205.js +4 -12
  142. package/dist/index205.js.map +1 -1
  143. package/dist/index206.js +22 -19
  144. package/dist/index206.js.map +1 -1
  145. package/dist/index207.js +4 -6
  146. package/dist/index207.js.map +1 -1
  147. package/dist/index208.js +4 -15
  148. package/dist/index208.js.map +1 -1
  149. package/dist/index209.js +10 -102
  150. package/dist/index209.js.map +1 -1
  151. package/dist/index210.js +21 -3
  152. package/dist/index210.js.map +1 -1
  153. package/dist/index211.js +5 -23
  154. package/dist/index211.js.map +1 -1
  155. package/dist/index212.js +15 -28
  156. package/dist/index212.js.map +1 -1
  157. package/dist/index213.js +101 -17
  158. package/dist/index213.js.map +1 -1
  159. package/dist/index214.js +3 -7
  160. package/dist/index214.js.map +1 -1
  161. package/dist/index215.js +24 -15
  162. package/dist/index215.js.map +1 -1
  163. package/dist/index216.js +27 -7
  164. package/dist/index216.js.map +1 -1
  165. package/dist/index217.js +17 -24
  166. package/dist/index217.js.map +1 -1
  167. package/dist/index218.js +6 -22
  168. package/dist/index218.js.map +1 -1
  169. package/dist/index219.js +15 -6
  170. package/dist/index219.js.map +1 -1
  171. package/dist/index220.js +8 -5
  172. package/dist/index220.js.map +1 -1
  173. package/dist/index221.js +27 -4
  174. package/dist/index221.js.map +1 -1
  175. package/dist/index222.js +23 -4
  176. package/dist/index222.js.map +1 -1
  177. package/dist/index223.js +6 -24
  178. package/dist/index223.js.map +1 -1
  179. package/dist/index224.js +5 -3
  180. package/dist/index224.js.map +1 -1
  181. package/dist/index225.js +4 -24
  182. package/dist/index225.js.map +1 -1
  183. package/dist/index226.js +4 -23
  184. package/dist/index226.js.map +1 -1
  185. package/dist/index227.js +23 -6
  186. package/dist/index227.js.map +1 -1
  187. package/dist/index228.js +22 -8
  188. package/dist/index228.js.map +1 -1
  189. package/dist/index229.js +3 -19
  190. package/dist/index229.js.map +1 -1
  191. package/dist/index23.js.map +1 -1
  192. package/dist/index230.js +22 -50
  193. package/dist/index230.js.map +1 -1
  194. package/dist/index231.js +7 -20
  195. package/dist/index231.js.map +1 -1
  196. package/dist/index232.js +9 -27
  197. package/dist/index232.js.map +1 -1
  198. package/dist/index233.js +17 -97
  199. package/dist/index233.js.map +1 -1
  200. package/dist/index234.js +50 -33
  201. package/dist/index234.js.map +1 -1
  202. package/dist/index235.js +20 -119
  203. package/dist/index235.js.map +1 -1
  204. package/dist/index236.js +28 -13
  205. package/dist/index236.js.map +1 -1
  206. package/dist/index237.js +98 -4
  207. package/dist/index237.js.map +1 -1
  208. package/dist/index238.js +33 -15
  209. package/dist/index238.js.map +1 -1
  210. package/dist/index239.js +116 -62
  211. package/dist/index239.js.map +1 -1
  212. package/dist/index24.js.map +1 -1
  213. package/dist/index240.js +13 -10
  214. package/dist/index240.js.map +1 -1
  215. package/dist/index241.js +4 -109
  216. package/dist/index241.js.map +1 -1
  217. package/dist/index242.js +14 -14
  218. package/dist/index242.js.map +1 -1
  219. package/dist/index243.js +64 -12
  220. package/dist/index243.js.map +1 -1
  221. package/dist/index244.js +10 -5
  222. package/dist/index244.js.map +1 -1
  223. package/dist/index245.js +104 -318
  224. package/dist/index245.js.map +1 -1
  225. package/dist/index246.js +14 -66
  226. package/dist/index246.js.map +1 -1
  227. package/dist/index247.js +12 -232
  228. package/dist/index247.js.map +1 -1
  229. package/dist/index248.js +4 -270
  230. package/dist/index248.js.map +1 -1
  231. package/dist/index249.js +313 -309
  232. package/dist/index249.js.map +1 -1
  233. package/dist/index25.js.map +1 -1
  234. package/dist/index250.js +60 -171
  235. package/dist/index250.js.map +1 -1
  236. package/dist/index251.js +252 -8
  237. package/dist/index251.js.map +1 -1
  238. package/dist/index252.js +268 -41
  239. package/dist/index252.js.map +1 -1
  240. package/dist/index253.js +316 -47
  241. package/dist/index253.js.map +1 -1
  242. package/dist/index254.js +179 -9
  243. package/dist/index254.js.map +1 -1
  244. package/dist/index255.js +6 -50
  245. package/dist/index255.js.map +1 -1
  246. package/dist/index256.js +41 -51
  247. package/dist/index256.js.map +1 -1
  248. package/dist/index257.js +50 -7
  249. package/dist/index257.js.map +1 -1
  250. package/dist/index258.js +9 -10
  251. package/dist/index258.js.map +1 -1
  252. package/dist/index259.js +51 -61
  253. package/dist/index259.js.map +1 -1
  254. package/dist/index26.js.map +1 -1
  255. package/dist/index260.js +53 -42
  256. package/dist/index260.js.map +1 -1
  257. package/dist/index261.js +9 -97
  258. package/dist/index261.js.map +1 -1
  259. package/dist/index262.js +31 -47
  260. package/dist/index262.js.map +1 -1
  261. package/dist/index263.js +61 -36
  262. package/dist/index263.js.map +1 -1
  263. package/dist/index264.js +43 -47
  264. package/dist/index264.js.map +1 -1
  265. package/dist/index265.js +92 -46
  266. package/dist/index265.js.map +1 -1
  267. package/dist/index266.js +48 -20
  268. package/dist/index266.js.map +1 -1
  269. package/dist/index267.js +33 -176
  270. package/dist/index267.js.map +1 -1
  271. package/dist/index268.js +49 -48
  272. package/dist/index268.js.map +1 -1
  273. package/dist/index269.js +68 -15
  274. package/dist/index269.js.map +1 -1
  275. package/dist/index27.js.map +1 -1
  276. package/dist/index270.js +20 -65
  277. package/dist/index270.js.map +1 -1
  278. package/dist/index271.js +202 -9
  279. package/dist/index271.js.map +1 -1
  280. package/dist/index272.js +48 -40
  281. package/dist/index272.js.map +1 -1
  282. package/dist/index273.js +60 -91
  283. package/dist/index273.js.map +1 -1
  284. package/dist/index274.js +9 -278
  285. package/dist/index274.js.map +1 -1
  286. package/dist/index275.js +38 -55
  287. package/dist/index275.js.map +1 -1
  288. package/dist/index276.js +91 -10
  289. package/dist/index276.js.map +1 -1
  290. package/dist/index277.js +278 -12
  291. package/dist/index277.js.map +1 -1
  292. package/dist/index278.js +58 -11
  293. package/dist/index278.js.map +1 -1
  294. package/dist/index279.js +11 -64
  295. package/dist/index279.js.map +1 -1
  296. package/dist/index28.js +5 -5
  297. package/dist/index28.js.map +1 -1
  298. package/dist/index280.js +12 -6
  299. package/dist/index280.js.map +1 -1
  300. package/dist/index281.js +3 -25
  301. package/dist/index281.js.map +1 -1
  302. package/dist/index282.js +3 -25
  303. package/dist/index282.js.map +1 -1
  304. package/dist/index283.js +12 -126
  305. package/dist/index283.js.map +1 -1
  306. package/dist/index284.js +63 -51
  307. package/dist/index284.js.map +1 -1
  308. package/dist/index285.js +5 -60
  309. package/dist/index285.js.map +1 -1
  310. package/dist/index286.js +24 -48
  311. package/dist/index286.js.map +1 -1
  312. package/dist/index287.js +24 -6
  313. package/dist/index287.js.map +1 -1
  314. package/dist/index288.js +125 -14
  315. package/dist/index288.js.map +1 -1
  316. package/dist/index289.js +51 -16
  317. package/dist/index289.js.map +1 -1
  318. package/dist/index29.js +5 -7
  319. package/dist/index29.js.map +1 -1
  320. package/dist/index290.js +56 -11
  321. package/dist/index290.js.map +1 -1
  322. package/dist/index291.js +47 -24
  323. package/dist/index291.js.map +1 -1
  324. package/dist/index292.js +7 -51
  325. package/dist/index292.js.map +1 -1
  326. package/dist/index293.js +15 -6
  327. package/dist/index293.js.map +1 -1
  328. package/dist/index294.js +18 -148
  329. package/dist/index294.js.map +1 -1
  330. package/dist/index295.js +12 -59
  331. package/dist/index295.js.map +1 -1
  332. package/dist/index296.js +25 -120
  333. package/dist/index296.js.map +1 -1
  334. package/dist/index297.js +54 -15
  335. package/dist/index297.js.map +1 -1
  336. package/dist/index298.js +5 -866
  337. package/dist/index298.js.map +1 -1
  338. package/dist/index299.js +148 -28
  339. package/dist/index299.js.map +1 -1
  340. package/dist/index3.js.map +1 -1
  341. package/dist/index30.js +6 -8
  342. package/dist/index30.js.map +1 -1
  343. package/dist/index300.js +55 -512
  344. package/dist/index300.js.map +1 -1
  345. package/dist/index301.js +111 -794
  346. package/dist/index301.js.map +1 -1
  347. package/dist/index302.js +14 -7436
  348. package/dist/index302.js.map +1 -1
  349. package/dist/index303.js +862 -6
  350. package/dist/index303.js.map +1 -1
  351. package/dist/index304.js +28 -12
  352. package/dist/index304.js.map +1 -1
  353. package/dist/index305.js +515 -5
  354. package/dist/index305.js.map +1 -1
  355. package/dist/index306.js +803 -5
  356. package/dist/index306.js.map +1 -1
  357. package/dist/index307.js +7426 -468
  358. package/dist/index307.js.map +1 -1
  359. package/dist/index308.js +6 -37
  360. package/dist/index308.js.map +1 -1
  361. package/dist/index309.js +12 -19
  362. package/dist/index309.js.map +1 -1
  363. package/dist/index31.js +5 -11
  364. package/dist/index31.js.map +1 -1
  365. package/dist/index310.js +5 -30
  366. package/dist/index310.js.map +1 -1
  367. package/dist/index311.js +5 -4
  368. package/dist/index311.js.map +1 -1
  369. package/dist/index312.js +461 -51
  370. package/dist/index312.js.map +1 -1
  371. package/dist/index313.js +36 -10
  372. package/dist/index313.js.map +1 -1
  373. package/dist/index314.js +19 -5
  374. package/dist/index314.js.map +1 -1
  375. package/dist/index315.js +29 -8
  376. package/dist/index315.js.map +1 -1
  377. package/dist/index316.js +4 -12
  378. package/dist/index316.js.map +1 -1
  379. package/dist/index317.js +60 -3
  380. package/dist/index317.js.map +1 -1
  381. package/dist/index318.js +10 -15
  382. package/dist/index318.js.map +1 -1
  383. package/dist/index319.js +5 -25
  384. package/dist/index319.js.map +1 -1
  385. package/dist/index32.js +5 -5
  386. package/dist/index32.js.map +1 -1
  387. package/dist/index320.js +9 -41
  388. package/dist/index320.js.map +1 -1
  389. package/dist/index321.js +11 -4
  390. package/dist/index321.js.map +1 -1
  391. package/dist/index322.js +3 -26
  392. package/dist/index322.js.map +1 -1
  393. package/dist/index323.js +15 -18
  394. package/dist/index323.js.map +1 -1
  395. package/dist/index324.js +22 -31
  396. package/dist/index324.js.map +1 -1
  397. package/dist/index325.js +41 -5
  398. package/dist/index325.js.map +1 -1
  399. package/dist/index326.js +4 -8
  400. package/dist/index326.js.map +1 -1
  401. package/dist/index327.js +25 -8
  402. package/dist/index327.js.map +1 -1
  403. package/dist/index328.js +19 -9
  404. package/dist/index328.js.map +1 -1
  405. package/dist/index329.js +34 -10
  406. package/dist/index329.js.map +1 -1
  407. package/dist/index33.js +9 -6
  408. package/dist/index33.js.map +1 -1
  409. package/dist/index330.js +5 -7
  410. package/dist/index330.js.map +1 -1
  411. package/dist/index331.js +9 -75
  412. package/dist/index331.js.map +1 -1
  413. package/dist/index332.js +8 -162
  414. package/dist/index332.js.map +1 -1
  415. package/dist/index333.js +9 -114
  416. package/dist/index333.js.map +1 -1
  417. package/dist/index334.js +10 -14
  418. package/dist/index334.js.map +1 -1
  419. package/dist/index335.js +7 -80
  420. package/dist/index335.js.map +1 -1
  421. package/dist/index336.js +68 -39
  422. package/dist/index336.js.map +1 -1
  423. package/dist/index337.js +160 -11
  424. package/dist/index337.js.map +1 -1
  425. package/dist/index338.js +113 -15
  426. package/dist/index338.js.map +1 -1
  427. package/dist/index339.js +13 -100
  428. package/dist/index339.js.map +1 -1
  429. package/dist/index34.js +6 -6
  430. package/dist/index34.js.map +1 -1
  431. package/dist/index340.js +73 -49
  432. package/dist/index340.js.map +1 -1
  433. package/dist/index341.js +34 -96
  434. package/dist/index341.js.map +1 -1
  435. package/dist/index342.js +12 -70
  436. package/dist/index342.js.map +1 -1
  437. package/dist/index343.js +14 -111
  438. package/dist/index343.js.map +1 -1
  439. package/dist/index344.js +94 -48
  440. package/dist/index344.js.map +1 -1
  441. package/dist/index345.js +50 -37
  442. package/dist/index345.js.map +1 -1
  443. package/dist/index346.js +89 -125
  444. package/dist/index346.js.map +1 -1
  445. package/dist/index347.js +52 -123
  446. package/dist/index347.js.map +1 -1
  447. package/dist/index348.js +54 -197
  448. package/dist/index348.js.map +1 -1
  449. package/dist/index349.js +44 -229
  450. package/dist/index349.js.map +1 -1
  451. package/dist/index35.js +9 -9
  452. package/dist/index35.js.map +1 -1
  453. package/dist/index350.js +42 -308
  454. package/dist/index350.js.map +1 -1
  455. package/dist/index351.js +144 -5
  456. package/dist/index351.js.map +1 -1
  457. package/dist/index352.js +142 -6
  458. package/dist/index352.js.map +1 -1
  459. package/dist/index353.js +257 -7
  460. package/dist/index353.js.map +1 -1
  461. package/dist/index354.js +241 -6
  462. package/dist/index354.js.map +1 -1
  463. package/dist/index355.js +309 -6
  464. package/dist/index355.js.map +1 -1
  465. package/dist/index356.js +5 -21
  466. package/dist/index356.js.map +1 -1
  467. package/dist/index357.js +6 -10
  468. package/dist/index357.js.map +1 -1
  469. package/dist/index358.js +7 -128
  470. package/dist/index358.js.map +1 -1
  471. package/dist/index359.js +6 -42
  472. package/dist/index359.js.map +1 -1
  473. package/dist/index36.js +12 -7
  474. package/dist/index36.js.map +1 -1
  475. package/dist/index360.js +6 -68
  476. package/dist/index360.js.map +1 -1
  477. package/dist/index361.js +20 -116
  478. package/dist/index361.js.map +1 -1
  479. package/dist/index362.js +10 -490
  480. package/dist/index362.js.map +1 -1
  481. package/dist/index363.js +128 -7
  482. package/dist/index363.js.map +1 -1
  483. package/dist/index364.js +42 -13
  484. package/dist/index364.js.map +1 -1
  485. package/dist/index365.js +67 -3
  486. package/dist/index365.js.map +1 -1
  487. package/dist/index366.js +115 -45
  488. package/dist/index366.js.map +1 -1
  489. package/dist/index367.js +490 -11
  490. package/dist/index367.js.map +1 -1
  491. package/dist/index368.js +8 -26
  492. package/dist/index368.js.map +1 -1
  493. package/dist/index369.js +12 -41
  494. package/dist/index369.js.map +1 -1
  495. package/dist/index37.js +13 -5
  496. package/dist/index37.js.map +1 -1
  497. package/dist/index370.js +4 -36
  498. package/dist/index370.js.map +1 -1
  499. package/dist/index371.js +45 -15
  500. package/dist/index371.js.map +1 -1
  501. package/dist/index372.js +24 -41
  502. package/dist/index372.js.map +1 -1
  503. package/dist/index373.js +3 -12
  504. package/dist/index373.js.map +1 -1
  505. package/dist/index374.js +27 -11
  506. package/dist/index374.js.map +1 -1
  507. package/dist/index375.js +40 -50
  508. package/dist/index375.js.map +1 -1
  509. package/dist/index376.js +37 -40
  510. package/dist/index376.js.map +1 -1
  511. package/dist/index377.js +12 -10
  512. package/dist/index377.js.map +1 -1
  513. package/dist/index378.js +40 -4
  514. package/dist/index378.js.map +1 -1
  515. package/dist/index379.js +7 -4
  516. package/dist/index379.js.map +1 -1
  517. package/dist/index38.js +5 -5
  518. package/dist/index38.js.map +1 -1
  519. package/dist/index380.js +29 -8
  520. package/dist/index380.js.map +1 -1
  521. package/dist/index381.js +9 -303
  522. package/dist/index381.js.map +1 -1
  523. package/dist/index382.js +57 -4
  524. package/dist/index382.js.map +1 -1
  525. package/dist/index383.js +40 -22
  526. package/dist/index383.js.map +1 -1
  527. package/dist/index384.js +15 -105
  528. package/dist/index384.js.map +1 -1
  529. package/dist/index385.js +5 -22
  530. package/dist/index385.js.map +1 -1
  531. package/dist/index386.js +10 -22
  532. package/dist/index386.js.map +1 -1
  533. package/dist/index387.js +289 -16
  534. package/dist/index387.js.map +1 -1
  535. package/dist/index388.js +4 -12
  536. package/dist/index388.js.map +1 -1
  537. package/dist/index389.js +20 -112
  538. package/dist/index389.js.map +1 -1
  539. package/dist/index39.js +6 -10
  540. package/dist/index39.js.map +1 -1
  541. package/dist/index390.js +3 -9
  542. package/dist/index390.js.map +1 -1
  543. package/dist/index391.js +104 -27
  544. package/dist/index391.js.map +1 -1
  545. package/dist/index392.js +20 -9
  546. package/dist/index392.js.map +1 -1
  547. package/dist/index393.js +20 -6
  548. package/dist/index393.js.map +1 -1
  549. package/dist/index394.js +14 -253
  550. package/dist/index394.js.map +1 -1
  551. package/dist/index395.js +12 -10
  552. package/dist/index395.js.map +1 -1
  553. package/dist/index396.js +117 -11
  554. package/dist/index396.js.map +1 -1
  555. package/dist/index397.js +8 -6
  556. package/dist/index397.js.map +1 -1
  557. package/dist/index398.js +32 -22
  558. package/dist/index398.js.map +1 -1
  559. package/dist/index399.js +9 -23
  560. package/dist/index399.js.map +1 -1
  561. package/dist/index4.js.map +1 -1
  562. package/dist/index40.js +8 -11
  563. package/dist/index40.js.map +1 -1
  564. package/dist/index400.js +6 -105
  565. package/dist/index400.js.map +1 -1
  566. package/dist/index401.js +3 -15
  567. package/dist/index401.js.map +1 -1
  568. package/dist/index402.js +251 -10
  569. package/dist/index402.js.map +1 -1
  570. package/dist/index403.js +9 -7
  571. package/dist/index403.js.map +1 -1
  572. package/dist/index404.js +11 -239
  573. package/dist/index404.js.map +1 -1
  574. package/dist/index405.js +7 -28
  575. package/dist/index405.js.map +1 -1
  576. package/dist/index406.js +21 -37
  577. package/dist/index406.js.map +1 -1
  578. package/dist/index407.js +21 -10
  579. package/dist/index407.js.map +1 -1
  580. package/dist/index408.js +97 -117
  581. package/dist/index408.js.map +1 -1
  582. package/dist/index409.js +15 -40
  583. package/dist/index409.js.map +1 -1
  584. package/dist/index41.js +6 -7
  585. package/dist/index41.js.map +1 -1
  586. package/dist/index410.js +11 -25
  587. package/dist/index410.js.map +1 -1
  588. package/dist/index411.js +7 -9
  589. package/dist/index411.js.map +1 -1
  590. package/dist/index412.js +3 -24
  591. package/dist/index412.js.map +1 -1
  592. package/dist/index413.js +226 -15
  593. package/dist/index413.js.map +1 -1
  594. package/dist/index414.js +24 -11
  595. package/dist/index414.js.map +1 -1
  596. package/dist/index415.js +38 -4
  597. package/dist/index415.js.map +1 -1
  598. package/dist/index416.js +11 -324
  599. package/dist/index416.js.map +1 -1
  600. package/dist/index417.js +119 -62
  601. package/dist/index417.js.map +1 -1
  602. package/dist/index418.js +42 -4
  603. package/dist/index418.js.map +1 -1
  604. package/dist/index419.js +25 -28
  605. package/dist/index419.js.map +1 -1
  606. package/dist/index42.js +6 -4
  607. package/dist/index42.js.map +1 -1
  608. package/dist/index420.js +11 -470
  609. package/dist/index420.js.map +1 -1
  610. package/dist/index421.js +23 -268
  611. package/dist/index421.js.map +1 -1
  612. package/dist/index422.js +24 -0
  613. package/dist/index422.js.map +1 -0
  614. package/dist/index423.js +17 -0
  615. package/dist/index423.js.map +1 -0
  616. package/dist/index424.js +8 -0
  617. package/dist/index424.js.map +1 -0
  618. package/dist/index425.js +328 -0
  619. package/dist/index425.js.map +1 -0
  620. package/dist/index426.js +66 -0
  621. package/dist/index426.js.map +1 -0
  622. package/dist/index427.js +7 -0
  623. package/dist/index427.js.map +1 -0
  624. package/dist/index428.js +31 -0
  625. package/dist/index428.js.map +1 -0
  626. package/dist/index429.js +474 -0
  627. package/dist/index429.js.map +1 -0
  628. package/dist/index43.js +68 -7
  629. package/dist/index43.js.map +1 -1
  630. package/dist/index430.js +272 -0
  631. package/dist/index430.js.map +1 -0
  632. package/dist/index44.js +7 -6
  633. package/dist/index44.js.map +1 -1
  634. package/dist/index45.js +31 -7
  635. package/dist/index45.js.map +1 -1
  636. package/dist/index46.js +10 -10
  637. package/dist/index46.js.map +1 -1
  638. package/dist/index47.js +15 -13
  639. package/dist/index47.js.map +1 -1
  640. package/dist/index48.js +201 -7
  641. package/dist/index48.js.map +1 -1
  642. package/dist/index49.js +20 -6
  643. package/dist/index49.js.map +1 -1
  644. package/dist/index5.js.map +1 -1
  645. package/dist/index50.js +16 -6
  646. package/dist/index50.js.map +1 -1
  647. package/dist/index51.js +123 -14
  648. package/dist/index51.js.map +1 -1
  649. package/dist/index52.js +19 -8
  650. package/dist/index52.js.map +1 -1
  651. package/dist/index53.js +5 -7
  652. package/dist/index53.js.map +1 -1
  653. package/dist/index54.js +9 -68
  654. package/dist/index54.js.map +1 -1
  655. package/dist/index55.js +7 -7
  656. package/dist/index55.js.map +1 -1
  657. package/dist/index56.js +9 -31
  658. package/dist/index56.js.map +1 -1
  659. package/dist/index57.js +13 -10
  660. package/dist/index57.js.map +1 -1
  661. package/dist/index58.js +8 -15
  662. package/dist/index58.js.map +1 -1
  663. package/dist/index59.js +10 -201
  664. package/dist/index59.js.map +1 -1
  665. package/dist/index6.js.map +1 -1
  666. package/dist/index60.js +13 -20
  667. package/dist/index60.js.map +1 -1
  668. package/dist/index61.js +9 -16
  669. package/dist/index61.js.map +1 -1
  670. package/dist/index62.js +10 -123
  671. package/dist/index62.js.map +1 -1
  672. package/dist/index63.js +5 -19
  673. package/dist/index63.js.map +1 -1
  674. package/dist/index64.js +42 -9
  675. package/dist/index64.js.map +1 -1
  676. package/dist/index65.js +387 -9
  677. package/dist/index65.js.map +1 -1
  678. package/dist/index66.js +37 -14
  679. package/dist/index66.js.map +1 -1
  680. package/dist/index67.js +21 -9
  681. package/dist/index67.js.map +1 -1
  682. package/dist/index68.js +4 -9
  683. package/dist/index68.js.map +1 -1
  684. package/dist/index69.js +6 -4
  685. package/dist/index69.js.map +1 -1
  686. package/dist/index7.js +3 -3
  687. package/dist/index7.js.map +1 -1
  688. package/dist/index70.js +57 -41
  689. package/dist/index70.js.map +1 -1
  690. package/dist/index71.js +5 -387
  691. package/dist/index71.js.map +1 -1
  692. package/dist/index72.js +6 -37
  693. package/dist/index72.js.map +1 -1
  694. package/dist/index73.js +5 -21
  695. package/dist/index73.js.map +1 -1
  696. package/dist/index74.js +4 -56
  697. package/dist/index74.js.map +1 -1
  698. package/dist/index75.js +7 -7
  699. package/dist/index75.js.map +1 -1
  700. package/dist/index76.js +6 -5
  701. package/dist/index76.js.map +1 -1
  702. package/dist/index77.js +6 -5
  703. package/dist/index77.js.map +1 -1
  704. package/dist/index78.js +11 -5
  705. package/dist/index78.js.map +1 -1
  706. package/dist/index79.js +11 -5
  707. package/dist/index79.js.map +1 -1
  708. package/dist/index8.js.map +1 -1
  709. package/dist/index80.js +7 -6
  710. package/dist/index80.js.map +1 -1
  711. package/dist/index81.js +10 -6
  712. package/dist/index81.js.map +1 -1
  713. package/dist/index82.js +5 -8
  714. package/dist/index82.js.map +1 -1
  715. package/dist/index83.js +6 -7
  716. package/dist/index83.js.map +1 -1
  717. package/dist/index84.js.map +1 -1
  718. package/dist/index85.js.map +1 -1
  719. package/dist/index86.js.map +1 -1
  720. package/dist/index87.js +2 -2
  721. package/dist/index87.js.map +1 -1
  722. package/dist/index88.js +31 -31
  723. package/dist/index88.js.map +1 -1
  724. package/dist/index89.js +1 -1
  725. package/dist/index89.js.map +1 -1
  726. package/dist/index9.js.map +1 -1
  727. package/dist/index90.js.map +1 -1
  728. package/dist/index91.js.map +1 -1
  729. package/dist/index92.js.map +1 -1
  730. package/dist/index93.js.map +1 -1
  731. package/dist/index94.js.map +1 -1
  732. package/dist/index95.js.map +1 -1
  733. package/dist/index96.js.map +1 -1
  734. package/dist/index97.js.map +1 -1
  735. package/dist/index98.js.map +1 -1
  736. package/dist/index99.js.map +1 -1
  737. package/package.json +13 -13
  738. package/dist/assets/sha256.worker-BEf4_Y9w.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index277.js","names":[],"sources":["../../../node_modules/@base-ui/react/internals/composite/composite.mjs"],"sourcesContent":["import { isHTMLElement } from '@floating-ui/utils/dom';\nexport { stopEvent, isIndexOutOfListBounds, isListIndexDisabled, findNonDisabledListIndex, getMaxListIndex, getMinListIndex } from \"../../floating-ui-react/utils.mjs\";\nexport const ARROW_UP = 'ArrowUp';\nexport const ARROW_DOWN = 'ArrowDown';\nexport const ARROW_LEFT = 'ArrowLeft';\nexport const ARROW_RIGHT = 'ArrowRight';\nexport const HOME = 'Home';\nexport const END = 'End';\nexport const PAGE_UP = 'PageUp';\nexport const PAGE_DOWN = 'PageDown';\nexport const COMPOSITE_KEYS = new Set([ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, HOME, END]);\nexport const SHIFT = 'Shift';\nexport const MODIFIER_KEYS = [SHIFT, 'Control', 'Alt', 'Meta'];\nfunction isInputElement(element) {\n return isHTMLElement(element) && element.tagName === 'INPUT';\n}\nexport function isNativeInput(element) {\n if (isInputElement(element) && element.selectionStart != null) {\n return true;\n }\n if (isHTMLElement(element) && element.tagName === 'TEXTAREA') {\n return true;\n }\n return false;\n}\nexport function scrollIntoViewIfNeeded(scrollContainer, element, direction, orientation) {\n if (!scrollContainer || !element || !element.scrollTo) {\n return;\n }\n let targetX = scrollContainer.scrollLeft;\n let targetY = scrollContainer.scrollTop;\n const isOverflowingX = scrollContainer.clientWidth < scrollContainer.scrollWidth;\n const isOverflowingY = scrollContainer.clientHeight < scrollContainer.scrollHeight;\n if (isOverflowingX && orientation !== 'vertical') {\n const elementOffsetLeft = getOffset(scrollContainer, element, 'left');\n const containerStyles = getStyles(scrollContainer);\n const elementStyles = getStyles(element);\n if (direction === 'ltr') {\n if (elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight > scrollContainer.scrollLeft + scrollContainer.clientWidth - containerStyles.scrollPaddingRight) {\n // overflow to the right, scroll to align right edges\n targetX = elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight - scrollContainer.clientWidth + containerStyles.scrollPaddingRight;\n } else if (elementOffsetLeft - elementStyles.scrollMarginLeft < scrollContainer.scrollLeft + containerStyles.scrollPaddingLeft) {\n // overflow to the left, scroll to align left edges\n targetX = elementOffsetLeft - elementStyles.scrollMarginLeft - containerStyles.scrollPaddingLeft;\n }\n }\n if (direction === 'rtl') {\n if (elementOffsetLeft - elementStyles.scrollMarginLeft < scrollContainer.scrollLeft + containerStyles.scrollPaddingLeft) {\n // overflow to the left, scroll to align left edges\n targetX = elementOffsetLeft - elementStyles.scrollMarginLeft - containerStyles.scrollPaddingLeft;\n } else if (elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight > scrollContainer.scrollLeft + scrollContainer.clientWidth - containerStyles.scrollPaddingRight) {\n // overflow to the right, scroll to align right edges\n targetX = elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight - scrollContainer.clientWidth + containerStyles.scrollPaddingRight;\n }\n }\n }\n if (isOverflowingY && orientation !== 'horizontal') {\n const elementOffsetTop = getOffset(scrollContainer, element, 'top');\n const containerStyles = getStyles(scrollContainer);\n const elementStyles = getStyles(element);\n if (elementOffsetTop - elementStyles.scrollMarginTop < scrollContainer.scrollTop + containerStyles.scrollPaddingTop) {\n // overflow upwards, align top edges\n targetY = elementOffsetTop - elementStyles.scrollMarginTop - containerStyles.scrollPaddingTop;\n } else if (elementOffsetTop + element.offsetHeight + elementStyles.scrollMarginBottom > scrollContainer.scrollTop + scrollContainer.clientHeight - containerStyles.scrollPaddingBottom) {\n // overflow downwards, align bottom edges\n targetY = elementOffsetTop + element.offsetHeight + elementStyles.scrollMarginBottom - scrollContainer.clientHeight + containerStyles.scrollPaddingBottom;\n }\n }\n scrollContainer.scrollTo({\n left: targetX,\n top: targetY,\n behavior: 'auto'\n });\n}\nfunction getOffset(ancestor, element, side) {\n const propName = side === 'left' ? 'offsetLeft' : 'offsetTop';\n let result = 0;\n while (element.offsetParent) {\n result += element[propName];\n if (element.offsetParent === ancestor) {\n break;\n }\n element = element.offsetParent;\n }\n return result;\n}\nfunction getStyles(element) {\n const styles = getComputedStyle(element);\n return {\n scrollMarginTop: parseFloat(styles.scrollMarginTop) || 0,\n scrollMarginRight: parseFloat(styles.scrollMarginRight) || 0,\n scrollMarginBottom: parseFloat(styles.scrollMarginBottom) || 0,\n scrollMarginLeft: parseFloat(styles.scrollMarginLeft) || 0,\n scrollPaddingTop: parseFloat(styles.scrollPaddingTop) || 0,\n scrollPaddingRight: parseFloat(styles.scrollPaddingRight) || 0,\n scrollPaddingBottom: parseFloat(styles.scrollPaddingBottom) || 0,\n scrollPaddingLeft: parseFloat(styles.scrollPaddingLeft) || 0\n };\n}"],"x_google_ignoreList":[0],"mappings":";;;AAEA,IAAa,IAAW,WACX,IAAa,aACb,IAAa,aACb,IAAc,cACd,IAAO,QAIP,oBAAiB,IAAI,IAAI;CAAC;CAAU;CAAY;CAAY;CAAa;;AAAS,CAAC"}
1
+ {"version":3,"file":"index277.js","names":["platform.engine.webkit","React","REASONS.listNavigation","REASONS.focusOut","React$1","ESCAPE","isStationaryWebKitPointer","webkit","event","doSwitch","orientation","vertical","horizontal","isMainOrientationKey","key","isMainOrientationToEndKey","rtl","isCrossOrientationOpenKey","ARROW_LEFT","ARROW_RIGHT","ARROW_DOWN","isCrossOrientationCloseKey","grid","ARROW_UP","useListNavigation","onNavigateProp","navigateGrid","props","isGrid","allowEscape","loopFocus","virtual","store","context","open","floatingElement","domReferenceElement","dataRef","floatingFocusElement","getFloatingFocusElement","typeableComboboxReference","isTypeableCombobox","floatingFocusElementRef","useValueAsRef","parentId","useFloatingParentNodeId","tree","useFloatingTree","externalTree","focusItemOnOpenRef","focusItemOnOpen","indexRef","selectedIndex","keyRef","isPointerModalityRef","onNavigate","useStableCallback","previousMountedRef","previousOpenRef","forceSyncFocusRef","forceScrollIntoViewRef","cancelQueuedFocusRef","disabledIndicesRef","disabledIndices","latestOpenRef","selectedIndexRef","resetOnPointerLeaveRef","resetOnPointerLeave","focusFrame","useAnimationFrame","waitForListPopulatedFrame","focusItem","runFocus","item","enqueueFocus","initialItem","listRef","forceScrollIntoView","callback","waitedItem","useIsoLayoutEffect","enabled","activeIndex","runs","waitForListPopulated","nested","getMinListIndex","getMaxListIndex","isIndexOutOfListBounds","nodes","parent","node","activeEl","activeElement","ownerDocument","treeContainsActiveEl","contains","hasActiveIndex","syncCurrentTarget","index","getParentOrientation","parentOrientation","getMinEnabledIndex","commonOnKeyDown","stopEvent","createChangeEventDetails","listNavigation","isHTMLElement","currentIndex","minIndex","maxIndex","findNonDisabledListIndex","currentTarget","focusItemOnHover","relatedTarget","floatingFocusEl","ariaActiveDescendantProp","id","floating","target","getTarget","focusOut","trigger","openOnNavigationKeyDown","checkVirtualMouse","isVirtualClick","checkVirtualPointer","isVirtualPointerEvent","currentOpen","isArrowKey","isParentCrossOpenKey","isMainKey","isNavigationKey","openOnArrowKeyDown","isParentMainKey","reference"],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/hooks/useListNavigation.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { platform } from '@base-ui/utils/platform';\nimport { isHTMLElement } from '@floating-ui/utils/dom';\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useFloatingParentNodeId, useFloatingTree } from \"../components/FloatingTree.mjs\";\nimport { findNonDisabledListIndex, getMaxListIndex, getMinListIndex, isIndexOutOfListBounds } from \"../utils/composite.mjs\";\nimport { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP } from \"../utils/constants.mjs\";\nimport { activeElement, contains, getFloatingFocusElement, getTarget, isTypeableCombobox } from \"../utils/element.mjs\";\nimport { enqueueFocus } from \"../utils/enqueueFocus.mjs\";\nimport { isVirtualClick, isVirtualPointerEvent, stopEvent } from \"../utils/event.mjs\";\nexport const ESCAPE = 'Escape';\n\n// WebKit fires zero-delta `mousemove`/`pointermove` events when the list scrolls\n// beneath a stationary pointer, moving the highlight during keyboard navigation.\n// https://github.com/mui/base-ui/issues/4002\nfunction isStationaryWebKitPointer(event) {\n return platform.engine.webkit && event.movementX === 0 && event.movementY === 0;\n}\nfunction doSwitch(orientation, vertical, horizontal) {\n switch (orientation) {\n case 'vertical':\n return vertical;\n case 'horizontal':\n return horizontal;\n default:\n return vertical || horizontal;\n }\n}\nfunction isMainOrientationKey(key, orientation) {\n const vertical = key === ARROW_UP || key === ARROW_DOWN;\n const horizontal = key === ARROW_LEFT || key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal);\n}\nfunction isMainOrientationToEndKey(key, orientation, rtl) {\n const vertical = key === ARROW_DOWN;\n const horizontal = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal) || key === 'Enter' || key === ' ' || key === '';\n}\nfunction isCrossOrientationOpenKey(key, orientation, rtl) {\n const vertical = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n const horizontal = key === ARROW_DOWN;\n return doSwitch(orientation, vertical, horizontal);\n}\nfunction isCrossOrientationCloseKey(key, orientation, rtl, grid) {\n const vertical = rtl ? key === ARROW_RIGHT : key === ARROW_LEFT;\n const horizontal = key === ARROW_UP;\n if (orientation === 'both' || orientation === 'horizontal' && grid) {\n return key === ESCAPE;\n }\n return doSwitch(orientation, vertical, horizontal);\n}\n/**\n * Adds arrow key-based navigation of a list of items, either using real DOM\n * focus or virtual focus.\n * @see https://floating-ui.com/docs/useListNavigation\n */\nexport function useListNavigation(context, props) {\n const {\n listRef,\n activeIndex,\n onNavigate: onNavigateProp = () => {},\n enabled = true,\n selectedIndex = null,\n allowEscape = false,\n loopFocus = false,\n nested = false,\n rtl = false,\n virtual = false,\n focusItemOnOpen = 'auto',\n focusItemOnHover = true,\n openOnArrowKeyDown = true,\n disabledIndices = undefined,\n orientation = 'vertical',\n parentOrientation,\n id,\n resetOnPointerLeave = true,\n externalTree,\n grid: navigateGrid\n } = props;\n const isGrid = navigateGrid != null;\n if (process.env.NODE_ENV !== 'production') {\n if (allowEscape) {\n if (!loopFocus) {\n console.warn('`useListNavigation` looping must be enabled to allow escaping.');\n }\n if (!virtual) {\n console.warn('`useListNavigation` must be virtual to allow escaping.');\n }\n }\n if (orientation === 'vertical' && isGrid) {\n console.warn('In grid list navigation mode, the `orientation` should', 'be either \"horizontal\" or \"both\".');\n }\n }\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const floatingElement = store.useState('floatingElement');\n const domReferenceElement = store.useState('domReferenceElement');\n const dataRef = store.context.dataRef;\n const floatingFocusElement = getFloatingFocusElement(floatingElement);\n const typeableComboboxReference = isTypeableCombobox(domReferenceElement);\n const floatingFocusElementRef = useValueAsRef(floatingFocusElement);\n const parentId = useFloatingParentNodeId();\n const tree = useFloatingTree(externalTree);\n const focusItemOnOpenRef = React.useRef(focusItemOnOpen);\n const indexRef = React.useRef(selectedIndex ?? -1);\n const keyRef = React.useRef(null);\n const isPointerModalityRef = React.useRef(true);\n const onNavigate = useStableCallback(event => {\n onNavigateProp(indexRef.current === -1 ? null : indexRef.current, event);\n });\n const previousMountedRef = React.useRef(!!floatingElement);\n const previousOpenRef = React.useRef(open);\n const forceSyncFocusRef = React.useRef(false);\n const forceScrollIntoViewRef = React.useRef(false);\n const cancelQueuedFocusRef = React.useRef(null);\n const disabledIndicesRef = useValueAsRef(disabledIndices);\n const latestOpenRef = useValueAsRef(open);\n const selectedIndexRef = useValueAsRef(selectedIndex);\n const resetOnPointerLeaveRef = useValueAsRef(resetOnPointerLeave);\n const focusFrame = useAnimationFrame();\n const waitForListPopulatedFrame = useAnimationFrame();\n const focusItem = useStableCallback(() => {\n function runFocus(item) {\n if (virtual) {\n tree?.events.emit('virtualfocus', item);\n } else {\n cancelQueuedFocusRef.current = enqueueFocus(item, {\n sync: forceSyncFocusRef.current,\n preventScroll: true\n });\n }\n }\n const initialItem = listRef.current[indexRef.current];\n const forceScrollIntoView = forceScrollIntoViewRef.current;\n if (initialItem) {\n runFocus(initialItem);\n }\n const scheduler = forceSyncFocusRef.current ? callback => callback() : callback => focusFrame.request(callback);\n scheduler(() => {\n const waitedItem = listRef.current[indexRef.current] || initialItem;\n if (!waitedItem) {\n return;\n }\n if (!initialItem) {\n runFocus(waitedItem);\n }\n const shouldScrollIntoView =\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n item && (forceScrollIntoView || !isPointerModalityRef.current);\n if (shouldScrollIntoView) {\n // JSDOM doesn't support `.scrollIntoView()` but it's widely supported\n // by all browsers.\n waitedItem.scrollIntoView?.({\n block: 'nearest',\n inline: 'nearest'\n });\n }\n });\n });\n useIsoLayoutEffect(() => {\n dataRef.current.orientation = orientation;\n }, [dataRef, orientation]);\n\n // Sync `selectedIndex` to be the `activeIndex` upon opening the floating\n // element. Also, reset `activeIndex` upon closing the floating element.\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return;\n }\n if (open && floatingElement) {\n indexRef.current = selectedIndex ?? -1;\n if (focusItemOnOpenRef.current && selectedIndex != null) {\n // Regardless of the pointer modality, we want to ensure the selected\n // item comes into view when the floating element is opened.\n forceScrollIntoViewRef.current = true;\n onNavigate();\n }\n } else if (previousMountedRef.current) {\n // Reset the active index when the list is no longer open and mounted (closing or\n // unmounting). `onNavigate` is a stable callback that always forwards to the latest\n // `onNavigate` prop.\n indexRef.current = -1;\n onNavigate();\n }\n }, [enabled, open, floatingElement, selectedIndex, onNavigate]);\n\n // Sync `activeIndex` to be the focused item while the floating element is\n // open.\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return;\n }\n if (!open) {\n forceSyncFocusRef.current = false;\n return;\n }\n if (!floatingElement) {\n return;\n }\n if (activeIndex == null) {\n forceSyncFocusRef.current = false;\n if (selectedIndexRef.current != null) {\n return;\n }\n\n // Reset while the floating element was open (e.g. the list changed).\n if (previousMountedRef.current) {\n indexRef.current = -1;\n focusItem();\n }\n\n // Initial sync.\n if ((!previousOpenRef.current || !previousMountedRef.current) && focusItemOnOpenRef.current && (keyRef.current != null || focusItemOnOpenRef.current === true && keyRef.current == null)) {\n let runs = 0;\n const waitForListPopulated = () => {\n if (listRef.current[0] == null) {\n // Avoid letting the browser paint if possible on the first try,\n // otherwise use rAF. Don't try more than twice, since something\n // is wrong otherwise.\n if (runs < 2) {\n const scheduler = runs ? callback => waitForListPopulatedFrame.request(callback) : queueMicrotask;\n scheduler(waitForListPopulated);\n }\n runs += 1;\n } else {\n // Initially focus the first non-disabled item. `disabledIndices` is deliberately\n // omitted here so attribute-disabled items (`disabled`/`aria-disabled`) are skipped\n // on open even when the consumer passes an empty `disabledIndices` array. Passing it\n // would regress that behavior (see mui/base-ui#2604).\n indexRef.current = keyRef.current == null || isMainOrientationToEndKey(keyRef.current, orientation, rtl) || nested ? getMinListIndex(listRef) : getMaxListIndex(listRef);\n keyRef.current = null;\n onNavigate();\n }\n };\n waitForListPopulated();\n }\n } else if (!isIndexOutOfListBounds(listRef.current, activeIndex)) {\n indexRef.current = activeIndex;\n focusItem();\n forceScrollIntoViewRef.current = false;\n }\n }, [enabled, open, floatingElement, activeIndex, selectedIndexRef, nested, listRef, orientation, rtl, onNavigate, focusItem, waitForListPopulatedFrame]);\n\n // Ensure the parent floating element has focus when a nested child closes\n // to allow arrow key navigation to work after the pointer leaves the child.\n useIsoLayoutEffect(() => {\n if (!enabled || floatingElement || !tree || virtual || !previousMountedRef.current) {\n return;\n }\n const nodes = tree.nodesRef.current;\n const parent = nodes.find(node => node.id === parentId)?.context?.elements.floating;\n // `floatingElement` is null here (see the guard above), so resolve the owner document from an\n // in-DOM element for realm-safety (shadow DOM/iframes): the reference element, falling back to\n // the parent floating element when the reference is virtual (`domReferenceElement` is null).\n const activeEl = activeElement(ownerDocument(domReferenceElement ?? parent ?? null));\n const treeContainsActiveEl = nodes.some(node => node.context && contains(node.context.elements.floating, activeEl));\n if (parent && !treeContainsActiveEl && isPointerModalityRef.current) {\n parent.focus({\n preventScroll: true\n });\n }\n }, [enabled, floatingElement, domReferenceElement, tree, parentId, virtual]);\n useIsoLayoutEffect(() => {\n previousOpenRef.current = open;\n previousMountedRef.current = !!floatingElement;\n });\n useIsoLayoutEffect(() => {\n if (!open) {\n keyRef.current = null;\n focusItemOnOpenRef.current = focusItemOnOpen;\n }\n }, [open, focusItemOnOpen]);\n const hasActiveIndex = activeIndex != null;\n const syncCurrentTarget = useStableCallback(event => {\n if (!latestOpenRef.current) {\n return;\n }\n const index = listRef.current.indexOf(event.currentTarget);\n if (index !== -1 && (indexRef.current !== index || activeIndex !== index)) {\n indexRef.current = index;\n onNavigate(event);\n }\n });\n const getParentOrientation = useStableCallback(() => {\n return parentOrientation ?? tree?.nodesRef.current.find(node => node.id === parentId)?.context?.dataRef?.current.orientation;\n });\n const getMinEnabledIndex = useStableCallback(() => {\n return getMinListIndex(listRef, disabledIndicesRef.current);\n });\n const commonOnKeyDown = useStableCallback(event => {\n isPointerModalityRef.current = false;\n forceSyncFocusRef.current = true;\n\n // When composing a character, Chrome fires ArrowDown twice. Firefox/Safari\n // don't appear to suffer from this. `event.isComposing` is avoided due to\n // Safari not supporting it properly (although it's not needed in the first\n // place for Safari, just avoiding any possible issues).\n if (event.which === 229) {\n return;\n }\n\n // If the floating element is animating out, ignore navigation. Otherwise,\n // the `activeIndex` gets set to 0 despite not being open so the next time\n // the user ArrowDowns, the first item won't be focused.\n if (!latestOpenRef.current && event.currentTarget === floatingFocusElementRef.current) {\n return;\n }\n if (nested && isCrossOrientationCloseKey(event.key, orientation, rtl, isGrid)) {\n // If the nested list's close key is also the parent navigation key,\n // let the parent navigate. Otherwise, stop propagating the event.\n if (!isMainOrientationKey(event.key, getParentOrientation())) {\n stopEvent(event);\n }\n store.setOpen(false, createChangeEventDetails(REASONS.listNavigation, event.nativeEvent));\n if (isHTMLElement(domReferenceElement)) {\n if (virtual) {\n tree?.events.emit('virtualfocus', domReferenceElement);\n } else {\n domReferenceElement.focus();\n }\n }\n return;\n }\n const currentIndex = indexRef.current;\n const minIndex = getMinListIndex(listRef, disabledIndices);\n const maxIndex = getMaxListIndex(listRef, disabledIndices);\n if (!typeableComboboxReference) {\n if (event.key === 'Home') {\n stopEvent(event);\n indexRef.current = minIndex;\n onNavigate(event);\n }\n if (event.key === 'End') {\n stopEvent(event);\n indexRef.current = maxIndex;\n onNavigate(event);\n }\n }\n\n // Grid navigation is injected by grid-capable consumers so non-grid\n // consumers (menu, select) tree-shake the grid helpers out.\n if (navigateGrid != null) {\n const index = navigateGrid(event, indexRef.current, listRef, orientation, loopFocus, rtl, disabledIndices, minIndex, maxIndex);\n if (index != null) {\n indexRef.current = index;\n onNavigate(event);\n }\n if (orientation === 'both') {\n return;\n }\n }\n if (isMainOrientationKey(event.key, orientation)) {\n stopEvent(event);\n\n // Reset the index if no item is focused.\n if (open && !virtual && activeElement(event.currentTarget.ownerDocument) === event.currentTarget) {\n indexRef.current = isMainOrientationToEndKey(event.key, orientation, rtl) ? minIndex : maxIndex;\n onNavigate(event);\n return;\n }\n if (isMainOrientationToEndKey(event.key, orientation, rtl)) {\n if (loopFocus) {\n if (currentIndex >= maxIndex) {\n if (allowEscape && currentIndex !== listRef.current.length) {\n indexRef.current = -1;\n } else {\n // Give time for virtualizers to update the listRef.\n forceSyncFocusRef.current = false;\n indexRef.current = minIndex;\n }\n } else {\n indexRef.current = findNonDisabledListIndex(listRef.current, {\n startingIndex: currentIndex,\n disabledIndices\n });\n }\n } else {\n indexRef.current = Math.min(maxIndex, findNonDisabledListIndex(listRef.current, {\n startingIndex: currentIndex,\n disabledIndices\n }));\n }\n } else if (loopFocus) {\n if (currentIndex <= minIndex) {\n if (allowEscape && currentIndex !== -1) {\n indexRef.current = listRef.current.length;\n } else {\n // Give time for virtualizers to update the listRef.\n forceSyncFocusRef.current = false;\n indexRef.current = maxIndex;\n }\n } else {\n indexRef.current = findNonDisabledListIndex(listRef.current, {\n startingIndex: currentIndex,\n decrement: true,\n disabledIndices\n });\n }\n } else {\n indexRef.current = Math.max(minIndex, findNonDisabledListIndex(listRef.current, {\n startingIndex: currentIndex,\n decrement: true,\n disabledIndices\n }));\n }\n if (isIndexOutOfListBounds(listRef.current, indexRef.current)) {\n indexRef.current = -1;\n }\n onNavigate(event);\n }\n });\n const item = React.useMemo(() => {\n const itemProps = {\n onFocus(event) {\n forceSyncFocusRef.current = true;\n syncCurrentTarget(event);\n },\n onClick: ({\n currentTarget\n }) => currentTarget.focus({\n preventScroll: true\n }),\n // Safari\n onMouseMove(event) {\n if (isStationaryWebKitPointer(event)) {\n return;\n }\n forceSyncFocusRef.current = true;\n forceScrollIntoViewRef.current = false;\n if (focusItemOnHover) {\n syncCurrentTarget(event);\n }\n },\n onPointerLeave(event) {\n if (!latestOpenRef.current || !isPointerModalityRef.current || event.pointerType === 'touch') {\n return;\n }\n forceSyncFocusRef.current = true;\n const relatedTarget = event.relatedTarget;\n if (!focusItemOnHover || listRef.current.includes(relatedTarget)) {\n return;\n }\n if (!resetOnPointerLeaveRef.current) {\n return;\n }\n cancelQueuedFocusRef.current?.();\n cancelQueuedFocusRef.current = null;\n indexRef.current = -1;\n onNavigate(event);\n if (!virtual) {\n const floatingFocusEl = floatingFocusElementRef.current;\n const activeEl = activeElement(ownerDocument(floatingFocusEl));\n if (floatingFocusEl && contains(floatingFocusEl, activeEl)) {\n floatingFocusEl.focus({\n preventScroll: true\n });\n }\n }\n }\n };\n return itemProps;\n }, [syncCurrentTarget, latestOpenRef, floatingFocusElementRef, focusItemOnHover, listRef, onNavigate, resetOnPointerLeaveRef, virtual]);\n const ariaActiveDescendantProp = React.useMemo(() => {\n return virtual && open && hasActiveIndex && {\n 'aria-activedescendant': `${id}-${activeIndex}`\n };\n }, [virtual, open, hasActiveIndex, id, activeIndex]);\n const floating = React.useMemo(() => {\n return {\n ...(!typeableComboboxReference ? ariaActiveDescendantProp : {}),\n onKeyDown(event) {\n // Close submenu on Shift+Tab\n if (event.key === 'Tab' && event.shiftKey && open && !virtual) {\n // If the event originated from within a nested element (e.g., a Dialog opened from\n // within the menu), don't close the menu. The nested element has its own focus\n // management and should handle the Tab key.\n const target = getTarget(event.nativeEvent);\n if (target && !contains(floatingFocusElementRef.current, target)) {\n return;\n }\n stopEvent(event);\n store.setOpen(false, createChangeEventDetails(REASONS.focusOut, event.nativeEvent));\n if (isHTMLElement(domReferenceElement)) {\n domReferenceElement.focus();\n }\n return;\n }\n commonOnKeyDown(event);\n },\n onPointerMove(event) {\n if (isStationaryWebKitPointer(event)) {\n return;\n }\n isPointerModalityRef.current = true;\n }\n };\n }, [ariaActiveDescendantProp, commonOnKeyDown, floatingFocusElementRef, typeableComboboxReference, store, open, virtual, domReferenceElement]);\n const trigger = React.useMemo(() => {\n function openOnNavigationKeyDown(event) {\n store.setOpen(true, createChangeEventDetails(REASONS.listNavigation, event.nativeEvent, event.currentTarget));\n }\n function checkVirtualMouse(event) {\n if (focusItemOnOpen === 'auto' && isVirtualClick(event.nativeEvent)) {\n focusItemOnOpenRef.current = !virtual;\n }\n }\n function checkVirtualPointer(event) {\n // `pointerdown` fires first, reset the state then perform the checks.\n focusItemOnOpenRef.current = focusItemOnOpen;\n if (focusItemOnOpen === 'auto' && isVirtualPointerEvent(event.nativeEvent)) {\n focusItemOnOpenRef.current = true;\n }\n }\n return {\n onKeyDown(event) {\n // non-reactive open state (to prevent re-creation of the handler)\n const currentOpen = store.select('open');\n isPointerModalityRef.current = false;\n const isArrowKey = event.key.startsWith('Arrow');\n const isParentCrossOpenKey = isCrossOrientationOpenKey(event.key, getParentOrientation(), rtl);\n const isMainKey = isMainOrientationKey(event.key, orientation);\n const isNavigationKey = (nested ? isParentCrossOpenKey : isMainKey) || event.key === 'Enter' || event.key.trim() === '';\n if (virtual && currentOpen) {\n return commonOnKeyDown(event);\n }\n\n // If a floating element should not open on arrow key down, avoid\n // setting `activeIndex` while it's closed.\n if (!currentOpen && !openOnArrowKeyDown && isArrowKey) {\n return undefined;\n }\n if (isNavigationKey) {\n const isParentMainKey = isMainOrientationKey(event.key, getParentOrientation());\n keyRef.current = nested && isParentMainKey ? null : event.key;\n }\n if (nested) {\n if (isParentCrossOpenKey) {\n stopEvent(event);\n if (currentOpen) {\n indexRef.current = getMinEnabledIndex();\n onNavigate(event);\n } else {\n openOnNavigationKeyDown(event);\n }\n }\n return undefined;\n }\n if (isMainKey) {\n if (selectedIndexRef.current != null) {\n indexRef.current = selectedIndexRef.current;\n }\n stopEvent(event);\n if (!currentOpen && openOnArrowKeyDown) {\n openOnNavigationKeyDown(event);\n } else {\n commonOnKeyDown(event);\n }\n if (currentOpen) {\n onNavigate(event);\n }\n }\n return undefined;\n },\n onFocus(event) {\n if (store.select('open') && !virtual) {\n indexRef.current = -1;\n onNavigate(event);\n }\n },\n onPointerDown: checkVirtualPointer,\n onPointerEnter: checkVirtualPointer,\n onMouseDown: checkVirtualMouse,\n onClick: checkVirtualMouse\n };\n }, [commonOnKeyDown, focusItemOnOpen, getMinEnabledIndex, nested, onNavigate, store, openOnArrowKeyDown, orientation, getParentOrientation, rtl, selectedIndexRef, virtual]);\n const reference = React.useMemo(() => {\n return {\n ...ariaActiveDescendantProp,\n ...trigger\n };\n }, [ariaActiveDescendantProp, trigger]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n item,\n trigger\n } : {}, [enabled, reference, floating, trigger, item]);\n}"],"ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,IAAaK,IAAS;AAKtB,SAASC,GAA0B,GAAO;CACxC,OAAON,KAA0BQ,EAAM,cAAc,KAAKA,EAAM,cAAc;AAChF;AACA,SAASC,EAAS,GAAa,GAAU,GAAY;CACnD,QAAQC,GAAR;EACE,KAAK,YACH,OAAOC;EACT,KAAK,cACH,OAAOC;EACT,SACE,OAAOD,KAAYC;CACvB;AACF;AACA,SAASC,EAAqB,G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AEnBwH,KACFzE,EAAW/C,CAAK;IAxBpB;GA4BF;GACA,QAAQ,GAAO;IACb,AAAIwB,EAAM,OAAO,MAAM,KAAK,CAACD,MAC3B,EAAS,UAAU,IACnBwB,EAAW/C,CAAK;GAEpB;GACA,eAAesH;GACf,gBAAgBA;GAChB,aAAaF;GACb,SAASA;EACX;CACF,GAAG;EAACrB;EAAiBrD;EAAiBoD;EAAoBjB;EAAQ9B;EAAYvB;EAAOqG;EAAoB3H;EAAa0F;EAAsBpF;EAAKiD;EAAkBlC;CAAO,CAAC,GACrKwG,KAAYtI,EAAM,eACf;EACL,GAAGmH;EACH,GAAGM;CACL,IACC,CAACN,GAA0BM,CAAO,CAAC;CACtC,OAAOzH,EAAM,cAAcgF,IAAU;EACnC;EACA;EACA;EACA;CACF,IAAI,CAAC,GAAG;EAACA;EAASsD;EAAWjB;EAAUI;EAASjD;CAAI,CAAC;AACvD"}
package/dist/index278.js CHANGED
@@ -1,14 +1,61 @@
1
- import { transitionStatusMapping as e } from "./index197.js";
2
- import { popupStateMapping as t } from "./index198.js";
3
- //#region ../../node_modules/@base-ui/react/dialog/utils/stateAttributesMapping.mjs
4
- var n = {
5
- ...t,
6
- ...e,
7
- nestedDialogOpen(e) {
8
- return e ? { "data-nested-dialog-open": "" } : null;
9
- }
10
- };
1
+ "use client";
2
+ import { EMPTY_ARRAY as e } from "./index192.js";
3
+ import { useStableCallback as t } from "./index206.js";
4
+ import { useIsoLayoutEffect as n } from "./index208.js";
5
+ import { useTimeout as r } from "./index221.js";
6
+ import { stopEvent as i } from "./index227.js";
7
+ import { contains as a } from "./index228.js";
8
+ import { isElementVisible as o, isListIndexDisabled as s } from "./index238.js";
9
+ import * as c from "react";
10
+ //#region ../../node_modules/@base-ui/react/floating-ui-react/hooks/useTypeahead.mjs
11
+ function l(l, u) {
12
+ let { listRef: d, elementsRef: f, activeIndex: p, onMatch: m, disabledIndices: h, onTyping: g, enabled: _ = !0, resetMs: v = 750, selectedIndex: y = null } = u, b = "rootStore" in l ? l.rootStore : l, x = b.useState("open"), S = r(), C = c.useRef(""), w = c.useRef(y ?? p ?? -1), T = c.useRef(null), E = t((t) => {
13
+ function n(e) {
14
+ return f?.current[e];
15
+ }
16
+ function r(t) {
17
+ let r = n(t);
18
+ return r && !o(r) || r?.matches(":disabled") ? !1 : h == null || !s(e, t, h);
19
+ }
20
+ function a(e, t, n = 0) {
21
+ if (e.length === 0) return -1;
22
+ let i = (n % e.length + e.length) % e.length, a = t.toLowerCase();
23
+ for (let t = 0; t < e.length; t += 1) {
24
+ let n = (i + t) % e.length;
25
+ if (e[n]?.toLowerCase().startsWith(a) && r(n)) return n;
26
+ }
27
+ return -1;
28
+ }
29
+ let c = d.current;
30
+ if (C.current.length > 0 && t.key === " " && (i(t), g?.(!0)), C.current.length > 0 && C.current[0] !== " " && a(c, C.current) === -1 && t.key !== " " && g?.(!1), c == null || t.key.length !== 1 || t.ctrlKey || t.metaKey || t.altKey) return;
31
+ x && t.key !== " " && (i(t), g?.(!0));
32
+ let l = C.current === "";
33
+ l && (w.current = y ?? p ?? -1), c.every((e, t) => e && r(t) ? e[0]?.toLowerCase() !== e[1]?.toLowerCase() : !0) && C.current === t.key && (C.current = "", w.current = T.current), C.current += t.key, S.start(v, () => {
34
+ C.current = "", w.current = T.current, g?.(!1);
35
+ });
36
+ let u = ((l ? y ?? p ?? -1 : w.current) ?? 0) + 1, _ = a(c, C.current, u);
37
+ _ === -1 ? t.key !== " " && (C.current = "", g?.(!1)) : (m?.(_), T.current = _);
38
+ }), D = t((e) => {
39
+ let t = e.relatedTarget, n = b.select("domReferenceElement"), r = b.select("floatingElement");
40
+ a(n, t) || a(r, t) || (S.clear(), C.current = "", w.current = T.current, g?.(!1));
41
+ });
42
+ n(() => {
43
+ (x || y === null) && (S.clear(), T.current = null, C.current !== "" && (C.current = ""));
44
+ }, [
45
+ x,
46
+ y,
47
+ S
48
+ ]);
49
+ let O = c.useMemo(() => ({
50
+ onKeyDown: E,
51
+ onBlur: D
52
+ }), [E, D]);
53
+ return c.useMemo(() => _ ? {
54
+ reference: O,
55
+ floating: O
56
+ } : {}, [_, O]);
57
+ }
11
58
  //#endregion
12
- export { n as dialogStateAttributesMapping };
59
+ export { l as useTypeahead };
13
60
 
14
61
  //# sourceMappingURL=index278.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index278.js","names":[],"sources":["../../../node_modules/@base-ui/react/dialog/utils/stateAttributesMapping.mjs"],"sourcesContent":["import { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\nimport { popupStateMapping } from \"../../utils/popupStateMapping.mjs\";\n/**\n * Shared by `Dialog.Popup` and `Dialog.Viewport`, whose states have the same shape.\n * `nested` is not mapped: unmapped `true` booleans already render as `data-nested`.\n */\nexport const dialogStateAttributesMapping = {\n ...popupStateMapping,\n ...transitionStatusMapping,\n nestedDialogOpen(value) {\n return value ? {\n 'data-nested-dialog-open': ''\n } : null;\n }\n};"],"x_google_ignoreList":[0],"mappings":";;;AAMA,IAAa,IAA+B;CAC1C,GAAG;CACH,GAAG;CACH,iBAAiB,GAAO;EACtB,OAAO,IAAQ,EACb,2BAA2B,GAC7B,IAAI;CACN;AACF"}
1
+ {"version":3,"file":"index278.js","names":["React","React$1","useTypeahead","onMatchProp","props","store","context","open","timeout","useTimeout","stringRef","prevIndexRef","selectedIndex","activeIndex","matchIndexRef","onKeyDown","useStableCallback","getElement","elementsRef","index","isItemAvailable","element","isElementVisible","disabledIndices","isListIndexDisabled","EMPTY_ARRAY","getMatchingIndex","list","normalizedStartIndex","startIndex","lowerString","string","offset","listContent","listRef","event","stopEvent","onTyping","isNewSession","text","resetMs","onBlur","next","currentDomReferenceElement","currentFloatingElement","contains","sharedProps","enabled"],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/hooks/useTypeahead.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { EMPTY_ARRAY } from '@base-ui/utils/empty';\nimport { isElementVisible, isListIndexDisabled } from \"../utils/composite.mjs\";\nimport { contains } from \"../utils/element.mjs\";\nimport { stopEvent } from \"../utils/event.mjs\";\n/**\n * Provides a matching callback that can be used to focus an item as the user\n * types, often used in tandem with `useListNavigation()`.\n * @see https://floating-ui.com/docs/useTypeahead\n */\nexport function useTypeahead(context, props) {\n const {\n listRef,\n elementsRef,\n activeIndex,\n onMatch: onMatchProp,\n disabledIndices,\n onTyping,\n enabled = true,\n resetMs = 750,\n selectedIndex = null\n } = props;\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const timeout = useTimeout();\n const stringRef = React.useRef('');\n const prevIndexRef = React.useRef(selectedIndex ?? activeIndex ?? -1);\n const matchIndexRef = React.useRef(null);\n const onKeyDown = useStableCallback(event => {\n function getElement(index) {\n return elementsRef?.current[index];\n }\n function isItemAvailable(index) {\n const element = getElement(index);\n if (element && !isElementVisible(element) || element?.matches(':disabled')) {\n return false;\n }\n // Visibility and native disabled state are handled above; pass an empty\n // element list so `isListIndexDisabled` resolves only the explicit\n // `disabledIndices` (array/predicate) and skips its own fallbacks.\n // Consumers that don't pass `disabledIndices` keep matching every visible\n // item except native disabled elements provided through `elementsRef`.\n return disabledIndices == null || !isListIndexDisabled(EMPTY_ARRAY, index, disabledIndices);\n }\n function getMatchingIndex(list, string, startIndex = 0) {\n if (list.length === 0) {\n return -1;\n }\n const normalizedStartIndex = (startIndex % list.length + list.length) % list.length;\n const lowerString = string.toLowerCase();\n for (let offset = 0; offset < list.length; offset += 1) {\n const index = (normalizedStartIndex + offset) % list.length;\n const text = list[index];\n if (!text?.toLowerCase().startsWith(lowerString) || !isItemAvailable(index)) {\n continue;\n }\n return index;\n }\n return -1;\n }\n const listContent = listRef.current;\n if (stringRef.current.length > 0 && event.key === ' ') {\n // Space should continue the in-progress typeahead session.\n stopEvent(event);\n onTyping?.(true);\n }\n if (stringRef.current.length > 0 && stringRef.current[0] !== ' ') {\n if (getMatchingIndex(listContent, stringRef.current) === -1 && event.key !== ' ') {\n onTyping?.(false);\n }\n }\n if (listContent == null ||\n // Character key.\n event.key.length !== 1 ||\n // Modifier key.\n event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n if (open && event.key !== ' ') {\n stopEvent(event);\n onTyping?.(true);\n }\n\n // Capture whether this is a new typing session before mutating the string.\n const isNewSession = stringRef.current === '';\n if (isNewSession) {\n prevIndexRef.current = selectedIndex ?? activeIndex ?? -1;\n }\n\n // Bail out if the list contains a word like \"llama\" or \"aaron\". TODO:\n // allow it in this case, too. Unavailable items are skipped while matching, so\n // they must be ignored here as well — otherwise a hidden or disabled double-letter\n // label would block rapid cycling through the available items.\n const allowRapidSuccessionOfFirstLetter = listContent.every((text, index) => text && isItemAvailable(index) ? text[0]?.toLowerCase() !== text[1]?.toLowerCase() : true);\n\n // Allows the user to cycle through items that start with the same letter\n // in rapid succession.\n if (allowRapidSuccessionOfFirstLetter && stringRef.current === event.key) {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n }\n stringRef.current += event.key;\n timeout.start(resetMs, () => {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n onTyping?.(false);\n });\n\n // Compute the starting index for this search.\n // If this is a new typing session (string is empty), base it on the current\n // selection/active item; otherwise continue from the last matched index.\n const prevIndex = isNewSession ? selectedIndex ?? activeIndex ?? -1 : prevIndexRef.current;\n const startIndex = (prevIndex ?? 0) + 1;\n const index = getMatchingIndex(listContent, stringRef.current, startIndex);\n if (index !== -1) {\n onMatchProp?.(index);\n matchIndexRef.current = index;\n } else if (event.key !== ' ') {\n stringRef.current = '';\n onTyping?.(false);\n }\n });\n const onBlur = useStableCallback(event => {\n const next = event.relatedTarget;\n const currentDomReferenceElement = store.select('domReferenceElement');\n const currentFloatingElement = store.select('floatingElement');\n const withinComposite = contains(currentDomReferenceElement, next) || contains(currentFloatingElement, next);\n\n // Keep the session if focus moves within the composite (reference <-> floating).\n if (withinComposite) {\n return;\n }\n\n // End the current typing session when focus leaves the composite entirely.\n timeout.clear();\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n onTyping?.(false);\n });\n useIsoLayoutEffect(() => {\n if (!open && selectedIndex !== null) {\n return;\n }\n timeout.clear();\n matchIndexRef.current = null;\n if (stringRef.current !== '') {\n stringRef.current = '';\n }\n }, [open, selectedIndex, timeout]);\n const sharedProps = React.useMemo(() => ({\n onKeyDown,\n onBlur\n }), [onKeyDown, onBlur]);\n return React.useMemo(() => enabled ? {\n reference: sharedProps,\n floating: sharedProps\n } : {}, [enabled, sharedProps]);\n}"],"ignoreList":[0],"mappings":";;;;;;;;;;AAeA,SAAgBE,EAAa,GAAS,GAAO;CAC3C,IAAM,EACJ,YACA,gBACA,gBACA,SAASC,GACT,oBACA,aACA,aAAU,IACV,aAAU,KACV,mBAAgB,SACdC,GACEC,IAAQ,eAAeC,IAAUA,EAAQ,YAAYA,GACrDC,IAAOF,EAAM,SAAS,MAAM,GAC5BG,IAAUC,EAAW,GACrBC,IAAYV,EAAM,OAAO,EAAE,GAC3BW,IAAeX,EAAM,OAAOY,KAAiBC,KAAe,EAAE,GAC9DC,IAAgBd,EAAM,OAAO,IAAI,GACjCe,IAAYC,GAAkB,MAAS;EAC3C,SAASC,EAAW,GAAO;GACzB,OAAOC,GAAa,QAAQC;EAC9B;EACA,SAASC,EAAgB,GAAO;GAC9B,IAAMC,IAAUJ,EAAWE,CAAK;GAShC,OARIE,KAAW,CAACC,EAAiBD,CAAO,KAAKA,GAAS,QAAQ,WAAW,IAChE,KAOFE,KAAmB,QAAQ,CAACC,EAAoBC,GAAaN,GAAOI,CAAe;EAC5F;EACA,SAASG,EAAiB,GAAM,GAAQ,IAAa,GAAG;GACtD,IAAIC,EAAK,WAAW,GAClB,OAAO;GAET,IAAMC,KAAwBC,IAAaF,EAAK,SAASA,EAAK,UAAUA,EAAK,QACvEG,IAAc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AU,KAGHgB,EAAM,QAAQ,QACvB,EAAU,UAAU,IACpBE,IAAW,EAAK,MAJhBlC,IAAcgB,CAAK,GACnB,EAAc,UAAUA;CAK5B,CAAC,GACKsB,IAASzB,GAAkB,MAAS;EACxC,IAAM0B,IAAOP,EAAM,eACbQ,IAA6BtC,EAAM,OAAO,qBAAqB,GAC/DuC,IAAyBvC,EAAM,OAAO,iBAAiB;EAI7D,AAHwBwC,EAASF,GAA4BD,CAAI,KAAKG,EAASD,GAAwBF,CAAI,MAQ3GlC,EAAQ,MAAM,GACd,EAAU,UAAU,IACpB,EAAa,UAAUM,EAAc,SACrCuB,IAAW,EAAK;CAClB,CAAC;CACD,QAAyB;EACvB,CAAK9B,KAAQK,MAAkB,UAG/BJ,EAAQ,MAAM,GACd,EAAc,UAAU,MACpBE,EAAU,YAAY,OACxB,EAAU,UAAU;CAExB,GAAG;EAACH;EAAMK;EAAeJ;CAAO,CAAC;CACjC,IAAMsC,IAAc9C,EAAM,eAAe;EACvC;EACA;CACF,IAAI,CAACe,GAAW0B,CAAM,CAAC;CACvB,OAAOzC,EAAM,cAAc+C,IAAU;EACnC,WAAWD;EACX,UAAUA;CACZ,IAAI,CAAC,GAAG,CAACC,GAASD,CAAW,CAAC;AAChC"}
package/dist/index279.js CHANGED
@@ -1,68 +1,15 @@
1
1
  "use client";
2
- import { useDialogRootContext as e } from "./index184.js";
3
- import { useRenderElement as t } from "./index196.js";
4
- import { FloatingFocusManager as n } from "./index245.js";
5
- import { useOpenChangeComplete as r } from "./index266.js";
6
- import { FOCUSABLE_POPUP_PROPS as i, createDefaultInitialFocus as a } from "./index267.js";
7
- import { useDialogPortalContext as o } from "./index276.js";
8
- import { COMPOSITE_KEYS as s } from "./index277.js";
9
- import { dialogStateAttributesMapping as c } from "./index278.js";
10
- import * as l from "react";
11
- import { jsx as u } from "react/jsx-runtime";
12
- //#region ../../node_modules/@base-ui/react/dialog/popup/DialogPopup.mjs
13
- var d = /*#__PURE__*/ l.forwardRef(function(l, d) {
14
- let { render: f, className: p, style: m, finalFocus: h, initialFocus: g, ..._ } = l, v = e(), y = v.useState("descriptionElementId"), b = v.useState("disablePointerDismissal"), x = v.useState("floatingRootContext"), S = v.useState("popupProps"), C = v.useState("modal"), w = v.useState("mounted"), T = v.useState("nested"), E = v.useState("nestedOpenDialogCount"), D = v.useState("open"), O = v.useState("openMethod"), k = v.useState("titleElementId"), A = v.useState("transitionStatus"), j = v.useState("role"), M = x.useState("floatingId");
15
- o(), r({
16
- open: D,
17
- ref: v.context.popupRef,
18
- onComplete() {
19
- D && v.context.onOpenChangeComplete?.(!0);
20
- }
21
- });
22
- let N = g === void 0 ? a(v.context.popupRef) : g, P = E > 0, F = v.useStateSetter("popupElement"), I = t("div", l, {
23
- state: {
24
- open: D,
25
- nested: T,
26
- transitionStatus: A,
27
- nestedDialogOpen: P
28
- },
29
- props: [
30
- S,
31
- {
32
- id: M,
33
- "aria-labelledby": k,
34
- "aria-describedby": y,
35
- role: j,
36
- ...i,
37
- hidden: !w,
38
- onKeyDown(e) {
39
- s.has(e.key) && e.stopPropagation();
40
- },
41
- style: { "--nested-dialogs": E }
42
- },
43
- _
44
- ],
45
- ref: [
46
- d,
47
- v.context.popupRef,
48
- F
49
- ],
50
- stateAttributesMapping: c
51
- });
52
- return /*#__PURE__*/ u(n, {
53
- context: x,
54
- openInteractionType: O,
55
- disabled: !w,
56
- closeOnFocusOut: !b,
57
- initialFocus: N,
58
- returnFocus: h,
59
- modal: C !== !1,
60
- restoreFocus: "popup",
61
- children: I
62
- });
63
- });
64
- process.env.NODE_ENV !== "production" && (d.displayName = "DialogPopup");
2
+ import e from "./index183.js";
3
+ import * as t from "react";
4
+ //#region ../../node_modules/@base-ui/react/dialog/portal/DialogPortalContext.mjs
5
+ var n = /*#__PURE__*/ t.createContext(void 0);
6
+ process.env.NODE_ENV !== "production" && (n.displayName = "DialogPortalContext");
7
+ function r() {
8
+ let r = t.useContext(n);
9
+ if (r === void 0) throw Error(process.env.NODE_ENV === "production" ? e(26) : "Base UI: <Dialog.Portal> is missing.");
10
+ return r;
11
+ }
65
12
  //#endregion
66
- export { d as DialogPopup };
13
+ export { n as DialogPortalContext, r as useDialogPortalContext };
67
14
 
68
15
  //# sourceMappingURL=index279.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index279.js","names":[],"sources":["../../../node_modules/@base-ui/react/dialog/popup/DialogPopup.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { FloatingFocusManager } from \"../../floating-ui-react/index.mjs\";\nimport { useDialogRootContext } from \"../root/DialogRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useDialogPortalContext } from \"../portal/DialogPortalContext.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { COMPOSITE_KEYS } from \"../../internals/composite/composite.mjs\";\nimport { FOCUSABLE_POPUP_PROPS, createDefaultInitialFocus } from \"../../utils/popups/index.mjs\";\nimport { dialogStateAttributesMapping } from \"../utils/stateAttributesMapping.mjs\";\n\n/**\n * A container for the dialog contents.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const DialogPopup = /*#__PURE__*/React.forwardRef(function DialogPopup(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n finalFocus,\n initialFocus,\n ...elementProps\n } = componentProps;\n const store = useDialogRootContext();\n const descriptionElementId = store.useState('descriptionElementId');\n const disablePointerDismissal = store.useState('disablePointerDismissal');\n const floatingRootContext = store.useState('floatingRootContext');\n const rootPopupProps = store.useState('popupProps');\n const modal = store.useState('modal');\n const mounted = store.useState('mounted');\n const nested = store.useState('nested');\n const nestedOpenDialogCount = store.useState('nestedOpenDialogCount');\n const open = store.useState('open');\n const openMethod = store.useState('openMethod');\n const titleElementId = store.useState('titleElementId');\n const transitionStatus = store.useState('transitionStatus');\n const role = store.useState('role');\n const floatingId = floatingRootContext.useState('floatingId');\n useDialogPortalContext();\n useOpenChangeComplete({\n open,\n ref: store.context.popupRef,\n onComplete() {\n if (open) {\n store.context.onOpenChangeComplete?.(true);\n }\n }\n });\n const resolvedInitialFocus = initialFocus === undefined ? createDefaultInitialFocus(store.context.popupRef) : initialFocus;\n const nestedDialogOpen = nestedOpenDialogCount > 0;\n const setPopupElement = store.useStateSetter('popupElement');\n const state = {\n open,\n nested,\n transitionStatus,\n nestedDialogOpen\n };\n const element = useRenderElement('div', componentProps, {\n state,\n props: [rootPopupProps, {\n id: floatingId,\n 'aria-labelledby': titleElementId,\n 'aria-describedby': descriptionElementId,\n role,\n ...FOCUSABLE_POPUP_PROPS,\n hidden: !mounted,\n onKeyDown(event) {\n if (COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n },\n style: {\n '--nested-dialogs': nestedOpenDialogCount\n }\n }, elementProps],\n ref: [forwardedRef, store.context.popupRef, setPopupElement],\n stateAttributesMapping: dialogStateAttributesMapping\n });\n return /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingRootContext,\n openInteractionType: openMethod,\n disabled: !mounted,\n closeOnFocusOut: !disablePointerDismissal,\n initialFocus: resolvedInitialFocus,\n returnFocus: finalFocus,\n modal: modal !== false,\n restoreFocus: \"popup\",\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogPopup.displayName = \"DialogPopup\";"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;AAmBA,IAAa,IAA2B,gBAAM,WAAW,SAAqB,GAAgB,GAAc;CAC1G,IAAM,EACJ,WACA,cACA,UACA,eACA,iBACA,GAAG,MACD,GACE,IAAQ,EAAqB,GAC7B,IAAuB,EAAM,SAAS,sBAAsB,GAC5D,IAA0B,EAAM,SAAS,yBAAyB,GAClE,IAAsB,EAAM,SAAS,qBAAqB,GAC1D,IAAiB,EAAM,SAAS,YAAY,GAC5C,IAAQ,EAAM,SAAS,OAAO,GAC9B,IAAU,EAAM,SAAS,SAAS,GAClC,IAAS,EAAM,SAAS,QAAQ,GAChC,IAAwB,EAAM,SAAS,uBAAuB,GAC9D,IAAO,EAAM,SAAS,MAAM,GAC5B,IAAa,EAAM,SAAS,YAAY,GACxC,IAAiB,EAAM,SAAS,gBAAgB,GAChD,IAAmB,EAAM,SAAS,kBAAkB,GACpD,IAAO,EAAM,SAAS,MAAM,GAC5B,IAAa,EAAoB,SAAS,YAAY;CAE5D,AADA,EAAuB,GACvB,EAAsB;EACpB;EACA,KAAK,EAAM,QAAQ;EACnB,aAAa;GACX,AAAI,KACF,EAAM,QAAQ,uBAAuB,EAAI;EAE7C;CACF,CAAC;CACD,IAAM,IAAuB,MAAiB,KAAA,IAAY,EAA0B,EAAM,QAAQ,QAAQ,IAAI,GACxG,IAAmB,IAAwB,GAC3C,IAAkB,EAAM,eAAe,cAAc,GAOrD,IAAU,EAAiB,OAAO,GAAgB;EACtD,OAAA;GANA;GACA;GACA;GACA;EAGI;EACJ,OAAO;GAAC;GAAgB;IACtB,IAAI;IACJ,mBAAmB;IACnB,oBAAoB;IACpB;IACA,GAAG;IACH,QAAQ,CAAC;IACT,UAAU,GAAO;KACf,AAAI,EAAe,IAAI,EAAM,GAAG,KAC9B,EAAM,gBAAgB;IAE1B;IACA,OAAO,EACL,oBAAoB,EACtB;GACF;GAAG;EAAY;EACf,KAAK;GAAC;GAAc,EAAM,QAAQ;GAAU;EAAe;EAC3D,wBAAwB;CAC1B,CAAC;CACD,OAAoB,gBAAK,GAAsB;EAC7C,SAAS;EACT,qBAAqB;EACrB,UAAU,CAAC;EACX,iBAAiB,CAAC;EAClB,cAAc;EACd,aAAa;EACb,OAAO,MAAU;EACjB,cAAc;EACd,UAAU;CACZ,CAAC;AACH,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAY,cAAc"}
1
+ {"version":3,"file":"index279.js","names":["React","_formatErrorMessage","formatErrorMessage","React$1","DialogPortalContext","useDialogPortalContext","value"],"sources":["../../../node_modules/@base-ui/react/dialog/portal/DialogPortalContext.mjs"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const DialogPortalContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") DialogPortalContext.displayName = \"DialogPortalContext\";\nexport function useDialogPortalContext() {\n const value = React.useContext(DialogPortalContext);\n if (value === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Dialog.Portal> is missing.' : _formatErrorMessage(26));\n }\n return value;\n}"],"ignoreList":[0],"mappings":";;;;AAIA,IAAaI,IAAmC,gBAAM,cAAc,KAAA,CAAS;AAC7E,QAAA,IAAA,aAA6B,iBAAc,EAAoB,cAAc;AAC7E,SAAgBC,IAAyB;CACvC,IAAMC,IAAQN,EAAM,WAAWI,CAAmB;CAClD,IAAIE,MAAU,KAAA,GACZ,MAAU,MAAA,QAAA,IAAA,aAA+B,eAAwDL,EAAoB,EAAE,IAA/D,sCAAgE;CAE1H,OAAOK;AACT"}
package/dist/index28.js CHANGED
@@ -1,9 +1,9 @@
1
- //#region ../../node_modules/date-fns/_lib/defaultOptions.js
2
- var e = {};
3
- function t() {
4
- return e;
1
+ import { addDays as e } from "./index26.js";
2
+ //#region ../../node_modules/date-fns/addWeeks.js
3
+ function t(t, n, r) {
4
+ return e(t, n * 7, r);
5
5
  }
6
6
  //#endregion
7
- export { t as getDefaultOptions };
7
+ export { t as addWeeks, t as default };
8
8
 
9
9
  //# sourceMappingURL=index28.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index28.js","names":[],"sources":["../../../node_modules/date-fns/_lib/defaultOptions.js"],"sourcesContent":["let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAI,IAAiB,CAAC;AAEtB,SAAgB,IAAoB;CAClC,OAAO;AACT"}
1
+ {"version":3,"file":"index28.js","names":["addWeeks","addDays","date","amount","options"],"sources":["../../../node_modules/date-fns/addWeeks.js"],"sourcesContent":["import { addDays } from \"./addDays.js\";\n\n/**\n * The {@link addWeeks} function options.\n */\n\n/**\n * @name addWeeks\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of weeks 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 amount - The amount of weeks to be added.\n * @param options - An object with options\n *\n * @returns The new date with the weeks added\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * const result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\nexport function addWeeks(date, amount, options) {\n return addDays(date, amount * 7, options);\n}\n\n// Fallback for modularized imports:\nexport default addWeeks;\n"],"ignoreList":[0],"mappings":";;AA4BA,SAAgBA,EAAS,GAAM,GAAQ,GAAS;CAC9C,OAAOC,EAAQC,GAAMC,IAAS,GAAGC,CAAO;AAC1C"}
package/dist/index280.js CHANGED
@@ -1,9 +1,15 @@
1
- import { isReactVersionAtLeast as e } from "./index187.js";
2
- //#region ../../node_modules/@base-ui/utils/inertValue.mjs
3
- function t(t) {
4
- return e(19) ? t : t ? "true" : void 0;
5
- }
1
+ import "./index227.js";
2
+ import "./index238.js";
3
+ //#region ../../node_modules/@base-ui/react/internals/composite/composite.mjs
4
+ var e = "ArrowUp", t = "ArrowDown", n = "ArrowLeft", r = "ArrowRight", i = "Home", a = /* @__PURE__ */ new Set([
5
+ e,
6
+ t,
7
+ n,
8
+ r,
9
+ i,
10
+ "End"
11
+ ]);
6
12
  //#endregion
7
- export { t as inertValue };
13
+ export { t as ARROW_DOWN, n as ARROW_LEFT, r as ARROW_RIGHT, e as ARROW_UP, a as COMPOSITE_KEYS, i as HOME };
8
14
 
9
15
  //# sourceMappingURL=index280.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index280.js","names":[],"sources":["../../../node_modules/@base-ui/utils/inertValue.mjs"],"sourcesContent":["import { isReactVersionAtLeast } from \"./reactVersion.mjs\";\nexport function inertValue(value) {\n if (isReactVersionAtLeast(19)) {\n return value;\n }\n // compatibility with React < 19\n return value ? 'true' : undefined;\n}"],"x_google_ignoreList":[0],"mappings":";;AACA,SAAgB,EAAW,GAAO;CAKhC,OAJI,EAAsB,EAAE,IACnB,IAGF,IAAQ,SAAS,KAAA;AAC1B"}
1
+ {"version":3,"file":"index280.js","names":["ARROW_UP","ARROW_DOWN","ARROW_LEFT","ARROW_RIGHT","HOME","COMPOSITE_KEYS"],"sources":["../../../node_modules/@base-ui/react/internals/composite/composite.mjs"],"sourcesContent":["import { isHTMLElement } from '@floating-ui/utils/dom';\nexport { stopEvent, isIndexOutOfListBounds, isListIndexDisabled, findNonDisabledListIndex, getMaxListIndex, getMinListIndex } from \"../../floating-ui-react/utils.mjs\";\nexport const ARROW_UP = 'ArrowUp';\nexport const ARROW_DOWN = 'ArrowDown';\nexport const ARROW_LEFT = 'ArrowLeft';\nexport const ARROW_RIGHT = 'ArrowRight';\nexport const HOME = 'Home';\nexport const END = 'End';\nexport const PAGE_UP = 'PageUp';\nexport const PAGE_DOWN = 'PageDown';\nexport const COMPOSITE_KEYS = new Set([ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, HOME, END]);\nexport const SHIFT = 'Shift';\nexport const MODIFIER_KEYS = [SHIFT, 'Control', 'Alt', 'Meta'];\nfunction isInputElement(element) {\n return isHTMLElement(element) && element.tagName === 'INPUT';\n}\nexport function isNativeInput(element) {\n if (isInputElement(element) && element.selectionStart != null) {\n return true;\n }\n if (isHTMLElement(element) && element.tagName === 'TEXTAREA') {\n return true;\n }\n return false;\n}\nexport function scrollIntoViewIfNeeded(scrollContainer, element, direction, orientation) {\n if (!scrollContainer || !element || !element.scrollTo) {\n return;\n }\n let targetX = scrollContainer.scrollLeft;\n let targetY = scrollContainer.scrollTop;\n const isOverflowingX = scrollContainer.clientWidth < scrollContainer.scrollWidth;\n const isOverflowingY = scrollContainer.clientHeight < scrollContainer.scrollHeight;\n if (isOverflowingX && orientation !== 'vertical') {\n const elementOffsetLeft = getOffset(scrollContainer, element, 'left');\n const containerStyles = getStyles(scrollContainer);\n const elementStyles = getStyles(element);\n if (direction === 'ltr') {\n if (elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight > scrollContainer.scrollLeft + scrollContainer.clientWidth - containerStyles.scrollPaddingRight) {\n // overflow to the right, scroll to align right edges\n targetX = elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight - scrollContainer.clientWidth + containerStyles.scrollPaddingRight;\n } else if (elementOffsetLeft - elementStyles.scrollMarginLeft < scrollContainer.scrollLeft + containerStyles.scrollPaddingLeft) {\n // overflow to the left, scroll to align left edges\n targetX = elementOffsetLeft - elementStyles.scrollMarginLeft - containerStyles.scrollPaddingLeft;\n }\n }\n if (direction === 'rtl') {\n if (elementOffsetLeft - elementStyles.scrollMarginLeft < scrollContainer.scrollLeft + containerStyles.scrollPaddingLeft) {\n // overflow to the left, scroll to align left edges\n targetX = elementOffsetLeft - elementStyles.scrollMarginLeft - containerStyles.scrollPaddingLeft;\n } else if (elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight > scrollContainer.scrollLeft + scrollContainer.clientWidth - containerStyles.scrollPaddingRight) {\n // overflow to the right, scroll to align right edges\n targetX = elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight - scrollContainer.clientWidth + containerStyles.scrollPaddingRight;\n }\n }\n }\n if (isOverflowingY && orientation !== 'horizontal') {\n const elementOffsetTop = getOffset(scrollContainer, element, 'top');\n const containerStyles = getStyles(scrollContainer);\n const elementStyles = getStyles(element);\n if (elementOffsetTop - elementStyles.scrollMarginTop < scrollContainer.scrollTop + containerStyles.scrollPaddingTop) {\n // overflow upwards, align top edges\n targetY = elementOffsetTop - elementStyles.scrollMarginTop - containerStyles.scrollPaddingTop;\n } else if (elementOffsetTop + element.offsetHeight + elementStyles.scrollMarginBottom > scrollContainer.scrollTop + scrollContainer.clientHeight - containerStyles.scrollPaddingBottom) {\n // overflow downwards, align bottom edges\n targetY = elementOffsetTop + element.offsetHeight + elementStyles.scrollMarginBottom - scrollContainer.clientHeight + containerStyles.scrollPaddingBottom;\n }\n }\n scrollContainer.scrollTo({\n left: targetX,\n top: targetY,\n behavior: 'auto'\n });\n}\nfunction getOffset(ancestor, element, side) {\n const propName = side === 'left' ? 'offsetLeft' : 'offsetTop';\n let result = 0;\n while (element.offsetParent) {\n result += element[propName];\n if (element.offsetParent === ancestor) {\n break;\n }\n element = element.offsetParent;\n }\n return result;\n}\nfunction getStyles(element) {\n const styles = getComputedStyle(element);\n return {\n scrollMarginTop: parseFloat(styles.scrollMarginTop) || 0,\n scrollMarginRight: parseFloat(styles.scrollMarginRight) || 0,\n scrollMarginBottom: parseFloat(styles.scrollMarginBottom) || 0,\n scrollMarginLeft: parseFloat(styles.scrollMarginLeft) || 0,\n scrollPaddingTop: parseFloat(styles.scrollPaddingTop) || 0,\n scrollPaddingRight: parseFloat(styles.scrollPaddingRight) || 0,\n scrollPaddingBottom: parseFloat(styles.scrollPaddingBottom) || 0,\n scrollPaddingLeft: parseFloat(styles.scrollPaddingLeft) || 0\n };\n}"],"ignoreList":[0],"mappings":";;;AAEA,IAAaA,IAAW,WACXC,IAAa,aACbC,IAAa,aACbC,IAAc,cACdC,IAAO,QAIPC,oBAAiB,IAAI,IAAI;CAACL;CAAUC;CAAYC;CAAYC;CAAaC;;AAAS,CAAC"}
package/dist/index281.js CHANGED
@@ -1,28 +1,6 @@
1
- import * as e from "react";
2
- import { jsx as t } from "react/jsx-runtime";
3
- //#region ../../node_modules/@base-ui/react/utils/InternalBackdrop.mjs
4
- var n = /*#__PURE__*/ e.forwardRef(function(e, n) {
5
- let { cutout: r, ...i } = e, a;
6
- if (r) {
7
- let e = r.getBoundingClientRect();
8
- a = `polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`;
9
- }
10
- return /*#__PURE__*/ t("div", {
11
- ref: n,
12
- role: "presentation",
13
- "data-base-ui-inert": "",
14
- ...i,
15
- style: {
16
- position: "fixed",
17
- inset: 0,
18
- userSelect: "none",
19
- WebkitUserSelect: "none",
20
- clipPath: a
21
- }
22
- });
23
- });
24
- process.env.NODE_ENV !== "production" && (n.displayName = "InternalBackdrop");
1
+ //#region ../../node_modules/@base-ui/react/dialog/popup/DialogPopupCssVars.mjs
2
+ var e = "--nested-dialogs";
25
3
  //#endregion
26
- export { n as InternalBackdrop };
4
+ export { e as nestedDialogs };
27
5
 
28
6
  //# sourceMappingURL=index281.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index281.js","names":[],"sources":["../../../node_modules/@base-ui/react/utils/InternalBackdrop.mjs"],"sourcesContent":["import * as React from 'react';\n\n/**\n * @internal\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const InternalBackdrop = /*#__PURE__*/React.forwardRef(function InternalBackdrop(props, ref) {\n const {\n cutout,\n ...otherProps\n } = props;\n let clipPath;\n if (cutout) {\n const rect = cutout.getBoundingClientRect();\n clipPath = `polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${rect.left}px ${rect.top}px,${rect.left}px ${rect.bottom}px,${rect.right}px ${rect.bottom}px,${rect.right}px ${rect.top}px,${rect.left}px ${rect.top}px)`;\n }\n return /*#__PURE__*/_jsx(\"div\", {\n ref: ref,\n role: \"presentation\"\n // Ensures Floating UI's outside press detection runs, as it considers\n // it an element that existed when the popup rendered.\n ,\n \"data-base-ui-inert\": \"\",\n ...otherProps,\n style: {\n position: 'fixed',\n inset: 0,\n userSelect: 'none',\n WebkitUserSelect: 'none',\n clipPath\n }\n });\n});\nif (process.env.NODE_ENV !== \"production\") InternalBackdrop.displayName = \"InternalBackdrop\";"],"x_google_ignoreList":[0],"mappings":";;;AAMA,IAAa,IAAgC,gBAAM,WAAW,SAA0B,GAAO,GAAK;CAClG,IAAM,EACJ,WACA,GAAG,MACD,GACA;CACJ,IAAI,GAAQ;EACV,IAAM,IAAO,EAAO,sBAAsB;EAC1C,IAAW,iDAAiD,EAAK,KAAK,KAAK,EAAK,IAAI,KAAK,EAAK,KAAK,KAAK,EAAK,OAAO,KAAK,EAAK,MAAM,KAAK,EAAK,OAAO,KAAK,EAAK,MAAM,KAAK,EAAK,IAAI,KAAK,EAAK,KAAK,KAAK,EAAK,IAAI;CAClN;CACA,OAAoB,gBAAK,OAAO;EACzB;EACL,MAAM;EAIN,sBAAsB;EACtB,GAAG;EACH,OAAO;GACL,UAAU;GACV,OAAO;GACP,YAAY;GACZ,kBAAkB;GAClB;EACF;CACF,CAAC;AACH,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAiB,cAAc"}
1
+ {"version":3,"file":"index281.js","names":["nestedDialogs"],"sources":["../../../node_modules/@base-ui/react/dialog/popup/DialogPopupCssVars.mjs"],"sourcesContent":["/**\n * Indicates how many dialogs are nested within.\n * @type {number}\n */\nexport const nestedDialogs = '--nested-dialogs';"],"ignoreList":[0],"mappings":";AAIA,IAAaA,IAAgB"}
package/dist/index282.js CHANGED
@@ -1,28 +1,6 @@
1
- "use client";
2
- import { useDialogRootContext as e } from "./index184.js";
3
- import { FloatingPortal as t } from "./index241.js";
4
- import { DialogPortalContext as n } from "./index276.js";
5
- import { inertValue as r } from "./index280.js";
6
- import { InternalBackdrop as i } from "./index281.js";
7
- import * as a from "react";
8
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
9
- //#region ../../node_modules/@base-ui/react/dialog/portal/DialogPortal.mjs
10
- var c = /*#__PURE__*/ a.forwardRef(function(a, c) {
11
- let { keepMounted: l = !1, ...u } = a, d = e(), f = d.useState("mounted"), p = d.useState("modal"), m = d.useState("open");
12
- return f || l ? /*#__PURE__*/ o(n.Provider, {
13
- value: l,
14
- children: /*#__PURE__*/ s(t, {
15
- ref: c,
16
- ...u,
17
- children: [f && p === !0 && /*#__PURE__*/ o(i, {
18
- ref: d.context.internalBackdropRef,
19
- inert: r(!m)
20
- }), a.children]
21
- })
22
- }) : null;
23
- });
24
- process.env.NODE_ENV !== "production" && (c.displayName = "DialogPortal");
1
+ import "./index200.js";
2
+ var e = "data-nested-dialog-open";
25
3
  //#endregion
26
- export { c as DialogPortal };
4
+ export { e as nestedDialogOpen };
27
5
 
28
6
  //# sourceMappingURL=index282.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index282.js","names":[],"sources":["../../../node_modules/@base-ui/react/dialog/portal/DialogPortal.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { inertValue } from '@base-ui/utils/inertValue';\nimport { FloatingPortal } from \"../../floating-ui-react/index.mjs\";\nimport { useDialogRootContext } from \"../root/DialogRootContext.mjs\";\nimport { DialogPortalContext } from \"./DialogPortalContext.mjs\";\nimport { InternalBackdrop } from \"../../utils/InternalBackdrop.mjs\";\n\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const DialogPortal = /*#__PURE__*/React.forwardRef(function DialogPortal(props, forwardedRef) {\n const {\n keepMounted = false,\n ...portalProps\n } = props;\n const store = useDialogRootContext();\n const mounted = store.useState('mounted');\n const modal = store.useState('modal');\n const open = store.useState('open');\n const shouldRender = mounted || keepMounted;\n if (!shouldRender) {\n return null;\n }\n return /*#__PURE__*/_jsx(DialogPortalContext.Provider, {\n value: keepMounted,\n children: /*#__PURE__*/_jsxs(FloatingPortal, {\n ref: forwardedRef,\n ...portalProps,\n children: [mounted && modal === true && /*#__PURE__*/_jsx(InternalBackdrop, {\n ref: store.context.internalBackdropRef,\n inert: inertValue(!open)\n }), props.children]\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogPortal.displayName = \"DialogPortal\";"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;AAiBA,IAAa,IAA4B,gBAAM,WAAW,SAAsB,GAAO,GAAc;CACnG,IAAM,EACJ,iBAAc,IACd,GAAG,MACD,GACE,IAAQ,EAAqB,GAC7B,IAAU,EAAM,SAAS,SAAS,GAClC,IAAQ,EAAM,SAAS,OAAO,GAC9B,IAAO,EAAM,SAAS,MAAM;CAKlC,OAJqB,KAAW,IAIZ,gBAAK,EAAoB,UAAU;EACrD,OAAO;EACP,UAAuB,gBAAM,GAAgB;GAC3C,KAAK;GACL,GAAG;GACH,UAAU,CAAC,KAAW,MAAU,MAAqB,gBAAK,GAAkB;IAC1E,KAAK,EAAM,QAAQ;IACnB,OAAO,EAAW,CAAC,CAAI;GACzB,CAAC,GAAG,EAAM,QAAQ;EACpB,CAAC;CACH,CAAC,IAZQ;AAaX,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAa,cAAc"}
1
+ {"version":3,"file":"index282.js","names":["CommonPopupDataAttributes.open","CommonPopupDataAttributes.closed","CommonPopupDataAttributes.startingStyle","CommonPopupDataAttributes.endingStyle","nestedDialogOpen"],"sources":["../../../node_modules/@base-ui/react/dialog/popup/DialogPopupDataAttributes.mjs"],"sourcesContent":["import { CommonPopupDataAttributes } from \"../../utils/popupStateMapping.mjs\";\n\n/**\n * Present when the dialog is open.\n */\nexport const open = CommonPopupDataAttributes.open;\n/**\n * Present when the dialog is closed.\n */\nexport const closed = CommonPopupDataAttributes.closed;\n/**\n * Present when the dialog begins animating in.\n */\nexport const startingStyle = CommonPopupDataAttributes.startingStyle;\n/**\n * Present when the dialog is animating out.\n */\nexport const endingStyle = CommonPopupDataAttributes.endingStyle;\n/**\n * Present when the dialog is nested within another dialog.\n */\nexport const nested = 'data-nested';\n/**\n * Present when the dialog has other open dialogs nested within it.\n */\nexport const nestedDialogOpen = 'data-nested-dialog-open';"],"ignoreList":[0],"mappings":";AAyBA,IAAaI,IAAmB"}
package/dist/index283.js CHANGED
@@ -1,129 +1,15 @@
1
- "use client";
2
- import { getWindow as e, isOverflowElement as t } from "./index200.js";
3
- import { useIsoLayoutEffect as n } from "./index204.js";
4
- import { ownerDocument as r } from "./index207.js";
5
- import { Timeout as i } from "./index217.js";
6
- import { ios as a } from "./index219.js";
7
- import { webkit as o } from "./index220.js";
8
- import { addEventListener as s } from "./index227.js";
9
- import { AnimationFrame as c } from "./index230.js";
10
- //#region ../../node_modules/@base-ui/utils/useScrollLock.mjs
11
- var l = {}, u = {}, d = "";
12
- function f(e, n) {
13
- return t(e) ? e : n;
14
- }
15
- function p(e, t, n) {
16
- return /hidden|clip/.test(e.getComputedStyle(f(t, n)).overflowY);
17
- }
18
- function m(t) {
19
- if (typeof document > "u") return !1;
20
- let n = r(t);
21
- return e(n).innerWidth - n.documentElement.clientWidth > 0;
22
- }
23
- function h(e) {
24
- if (!(typeof CSS < "u" && CSS.supports && CSS.supports("scrollbar-gutter", "stable")) || typeof document > "u") return !1;
25
- let t = r(e), n = t.documentElement, i = t.body, a = f(n, i), o = a.style.overflowY, s = n.style.scrollbarGutter;
26
- n.style.scrollbarGutter = "stable", a.style.overflowY = "scroll";
27
- let c = a.offsetWidth;
28
- a.style.overflowY = "hidden";
29
- let l = a.offsetWidth;
30
- return a.style.overflowY = o, n.style.scrollbarGutter = s, c === l;
31
- }
32
- function g(e) {
33
- let t = r(e), n = t.documentElement, i = t.body, a = f(n, i), o = {
34
- overflowY: a.style.overflowY,
35
- overflowX: a.style.overflowX
36
- };
37
- return Object.assign(a.style, {
38
- overflowY: "hidden",
39
- overflowX: "hidden"
40
- }), () => {
41
- Object.assign(a.style, o);
42
- };
43
- }
44
- function _(t) {
45
- let n = r(t), i = n.documentElement, a = n.body, p = e(i), m = 0, g = 0, _ = !1, v = c.create();
46
- if (o && (p.visualViewport?.scale ?? 1) !== 1) return () => {};
47
- function y() {
48
- let e = p.getComputedStyle(i), n = p.getComputedStyle(a), r = (e.scrollbarGutter || "").includes("both-edges") ? "stable both-edges" : "stable";
49
- m = i.scrollTop, g = i.scrollLeft, l = {
50
- scrollbarGutter: i.style.scrollbarGutter,
51
- overflowY: i.style.overflowY,
52
- overflowX: i.style.overflowX
53
- }, d = i.style.scrollBehavior, u = {
54
- position: a.style.position,
55
- height: a.style.height,
56
- width: a.style.width,
57
- boxSizing: a.style.boxSizing,
58
- overflowY: a.style.overflowY,
59
- overflowX: a.style.overflowX,
60
- scrollBehavior: a.style.scrollBehavior
61
- };
62
- let o = i.scrollHeight > i.clientHeight, s = i.scrollWidth > i.clientWidth, c = e.overflowY === "scroll" || n.overflowY === "scroll", v = e.overflowX === "scroll" || n.overflowX === "scroll", y = Math.max(0, p.innerWidth - a.clientWidth), b = Math.max(0, p.innerHeight - a.clientHeight), x = parseFloat(n.marginTop) + parseFloat(n.marginBottom), S = parseFloat(n.marginLeft) + parseFloat(n.marginRight), C = f(i, a);
63
- if (_ = h(t), _) {
64
- i.style.scrollbarGutter = r, C.style.overflowY = "hidden", C.style.overflowX = "hidden";
65
- return;
66
- }
67
- Object.assign(i.style, {
68
- scrollbarGutter: r,
69
- overflowY: "hidden",
70
- overflowX: "hidden"
71
- }), (o || c) && (i.style.overflowY = "scroll"), (s || v) && (i.style.overflowX = "scroll"), Object.assign(a.style, {
72
- position: "relative",
73
- height: x || b ? `calc(100dvh - ${x + b}px)` : "100dvh",
74
- width: S || y ? `calc(100vw - ${S + y}px)` : "100vw",
75
- boxSizing: "border-box",
76
- overflowY: "hidden",
77
- overflowX: "hidden",
78
- scrollBehavior: "unset"
79
- }), a.scrollTop = m, a.scrollLeft = g, i.setAttribute("data-base-ui-scroll-locked", ""), i.style.scrollBehavior = "unset";
80
- }
81
- function b() {
82
- Object.assign(i.style, l), Object.assign(a.style, u), _ || (i.scrollTop = m, i.scrollLeft = g, i.removeAttribute("data-base-ui-scroll-locked"), i.style.scrollBehavior = d);
83
- }
84
- function x() {
85
- b(), v.request(y);
86
- }
87
- y();
88
- let S = s(p, "resize", x);
89
- return () => {
90
- v.cancel(), b(), typeof p.removeEventListener == "function" && S();
91
- };
92
- }
93
- var v = new class {
94
- lockCount = 0;
95
- restore = null;
96
- timeoutLock = i.create();
97
- timeoutUnlock = i.create();
98
- acquire(e) {
99
- return this.lockCount += 1, this.lockCount === 1 && this.restore === null && this.timeoutLock.start(0, () => this.lock(e)), this.release;
100
- }
101
- release = () => {
102
- --this.lockCount, this.lockCount === 0 && this.restore && this.timeoutUnlock.start(0, this.unlock);
103
- };
104
- unlock = () => {
105
- this.lockCount === 0 && this.restore && (this.restore?.(), this.restore = null);
106
- };
107
- lock(t) {
108
- if (this.lockCount === 0 || this.restore !== null) return;
109
- let n = r(t), i = n.documentElement, o = n.body, s = e(i);
110
- if (p(s, i, o)) {
111
- let e = new s.MutationObserver(() => {
112
- p(s, i, o) || (e.disconnect(), this.restore = null, this.lock(t));
113
- }), n = { attributes: !0 };
114
- e.observe(i, n), e.observe(o, n), this.restore = () => e.disconnect();
115
- return;
116
- }
117
- let c = a || !m(t);
118
- this.restore = c ? g(t) : _(t);
119
- }
120
- }();
121
- function y(e = !0, t = null) {
122
- n(() => {
123
- if (e) return v.acquire(t);
124
- }, [e, t]);
125
- }
1
+ import { transitionStatusMapping as e } from "./index199.js";
2
+ import { popupStateMapping as t } from "./index202.js";
3
+ import { nestedDialogOpen as n } from "./index282.js";
4
+ //#region ../../node_modules/@base-ui/react/dialog/utils/stateAttributesMapping.mjs
5
+ var r = {
6
+ ...t,
7
+ ...e,
8
+ nestedDialogOpen(e) {
9
+ return e ? { [n]: "" } : null;
10
+ }
11
+ };
126
12
  //#endregion
127
- export { y as useScrollLock };
13
+ export { r as dialogStateAttributesMapping };
128
14
 
129
15
  //# sourceMappingURL=index283.js.map