@rpcbase/ui 0.244.0 → 0.245.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 (694) hide show
  1. package/dist/index10.js +2 -2
  2. package/dist/index105.js +36 -36
  3. package/dist/index106.js +1 -1
  4. package/dist/index11.js +2 -2
  5. package/dist/index117.js +6 -6
  6. package/dist/index12.js +3 -3
  7. package/dist/index120.js +10 -10
  8. package/dist/index122.js +2 -2
  9. package/dist/index123.js +3 -3
  10. package/dist/index124.js +1 -1
  11. package/dist/index126.js +2 -2
  12. package/dist/index128.js +2 -2
  13. package/dist/index13.js +2 -2
  14. package/dist/index14.js +2 -2
  15. package/dist/index149.js +14 -5
  16. package/dist/index149.js.map +1 -1
  17. package/dist/index15.js +2 -2
  18. package/dist/index150.js +63 -63
  19. package/dist/index150.js.map +1 -1
  20. package/dist/index151.js +38 -2
  21. package/dist/index151.js.map +1 -1
  22. package/dist/index152.js +13 -385
  23. package/dist/index152.js.map +1 -1
  24. package/dist/index153.js +23 -261
  25. package/dist/index153.js.map +1 -1
  26. package/dist/index154.js +109 -58
  27. package/dist/index154.js.map +1 -1
  28. package/dist/index155.js +13 -47
  29. package/dist/index155.js.map +1 -1
  30. package/dist/index156.js +4 -169
  31. package/dist/index156.js.map +1 -1
  32. package/dist/index157.js +4 -110
  33. package/dist/index157.js.map +1 -1
  34. package/dist/index158.js +5 -25
  35. package/dist/index158.js.map +1 -1
  36. package/dist/index159.js +12 -8
  37. package/dist/index159.js.map +1 -1
  38. package/dist/index16.js +8 -8
  39. package/dist/index160.js +19 -4
  40. package/dist/index160.js.map +1 -1
  41. package/dist/index161.js +11 -6
  42. package/dist/index161.js.map +1 -1
  43. package/dist/index162.js +176 -4
  44. package/dist/index162.js.map +1 -1
  45. package/dist/index163.js +268 -476
  46. package/dist/index163.js.map +1 -1
  47. package/dist/index164.js +4 -189
  48. package/dist/index164.js.map +1 -1
  49. package/dist/index165.js +28 -14
  50. package/dist/index165.js.map +1 -1
  51. package/dist/index166.js +124 -105
  52. package/dist/index166.js.map +1 -1
  53. package/dist/index167.js +63 -262
  54. package/dist/index167.js.map +1 -1
  55. package/dist/index168.js +8 -6
  56. package/dist/index168.js.map +1 -1
  57. package/dist/index169.js +15 -40
  58. package/dist/index169.js.map +1 -1
  59. package/dist/index17.js +1 -1
  60. package/dist/index170.js +30 -4
  61. package/dist/index170.js.map +1 -1
  62. package/dist/index171.js +69 -58
  63. package/dist/index171.js.map +1 -1
  64. package/dist/index172.js +5 -8
  65. package/dist/index172.js.map +1 -1
  66. package/dist/index173.js +61 -80
  67. package/dist/index173.js.map +1 -1
  68. package/dist/index174.js +2 -20
  69. package/dist/index174.js.map +1 -1
  70. package/dist/index175.js +383 -14
  71. package/dist/index175.js.map +1 -1
  72. package/dist/index176.js +260 -4
  73. package/dist/index176.js.map +1 -1
  74. package/dist/index177.js +59 -4
  75. package/dist/index177.js.map +1 -1
  76. package/dist/index178.js +46 -6
  77. package/dist/index178.js.map +1 -1
  78. package/dist/index179.js +169 -4
  79. package/dist/index179.js.map +1 -1
  80. package/dist/index18.js +7 -7
  81. package/dist/index180.js +109 -6
  82. package/dist/index180.js.map +1 -1
  83. package/dist/index181.js +24 -16
  84. package/dist/index181.js.map +1 -1
  85. package/dist/index182.js +8 -5
  86. package/dist/index182.js.map +1 -1
  87. package/dist/index183.js +4 -4
  88. package/dist/index183.js.map +1 -1
  89. package/dist/index184.js +5 -12
  90. package/dist/index184.js.map +1 -1
  91. package/dist/index185.js +4 -9
  92. package/dist/index185.js.map +1 -1
  93. package/dist/index186.js +487 -13
  94. package/dist/index186.js.map +1 -1
  95. package/dist/index187.js +189 -13
  96. package/dist/index187.js.map +1 -1
  97. package/dist/index188.js +13 -4
  98. package/dist/index188.js.map +1 -1
  99. package/dist/index189.js +107 -5
  100. package/dist/index189.js.map +1 -1
  101. package/dist/index19.js +16 -16
  102. package/dist/index190.js +262 -6
  103. package/dist/index190.js.map +1 -1
  104. package/dist/index191.js +6 -5
  105. package/dist/index191.js.map +1 -1
  106. package/dist/index192.js +39 -53
  107. package/dist/index192.js.map +1 -1
  108. package/dist/index193.js +4 -8
  109. package/dist/index193.js.map +1 -1
  110. package/dist/index194.js +58 -4
  111. package/dist/index194.js.map +1 -1
  112. package/dist/index195.js +8 -4
  113. package/dist/index195.js.map +1 -1
  114. package/dist/index196.js +87 -8
  115. package/dist/index196.js.map +1 -1
  116. package/dist/index197.js +19 -4
  117. package/dist/index197.js.map +1 -1
  118. package/dist/index198.js +16 -4
  119. package/dist/index198.js.map +1 -1
  120. package/dist/index199.js +5 -3
  121. package/dist/index199.js.map +1 -1
  122. package/dist/index200.js +5 -10
  123. package/dist/index200.js.map +1 -1
  124. package/dist/index201.js +6 -9
  125. package/dist/index201.js.map +1 -1
  126. package/dist/index202.js +4 -9
  127. package/dist/index202.js.map +1 -1
  128. package/dist/index203.js +6 -10
  129. package/dist/index203.js.map +1 -1
  130. package/dist/index204.js +16 -10
  131. package/dist/index204.js.map +1 -1
  132. package/dist/index205.js +4 -9
  133. package/dist/index205.js.map +1 -1
  134. package/dist/index206.js +4 -6
  135. package/dist/index206.js.map +1 -1
  136. package/dist/index207.js +12 -5
  137. package/dist/index207.js.map +1 -1
  138. package/dist/index208.js +9 -4
  139. package/dist/index208.js.map +1 -1
  140. package/dist/index209.js +13 -5
  141. package/dist/index209.js.map +1 -1
  142. package/dist/index21.js +1 -1
  143. package/dist/index210.js +13 -6
  144. package/dist/index210.js.map +1 -1
  145. package/dist/index211.js +4 -5
  146. package/dist/index211.js.map +1 -1
  147. package/dist/index212.js +5 -16
  148. package/dist/index212.js.map +1 -1
  149. package/dist/index213.js +6 -7
  150. package/dist/index213.js.map +1 -1
  151. package/dist/index214.js +5 -10
  152. package/dist/index214.js.map +1 -1
  153. package/dist/index215.js +54 -10
  154. package/dist/index215.js.map +1 -1
  155. package/dist/index216.js +8 -21
  156. package/dist/index216.js.map +1 -1
  157. package/dist/index217.js +4 -8
  158. package/dist/index217.js.map +1 -1
  159. package/dist/index218.js +4 -9
  160. package/dist/index218.js.map +1 -1
  161. package/dist/index219.js +8 -9
  162. package/dist/index219.js.map +1 -1
  163. package/dist/index22.js +2 -2
  164. package/dist/index220.js +4 -4
  165. package/dist/index220.js.map +1 -1
  166. package/dist/index221.js +4 -5
  167. package/dist/index221.js.map +1 -1
  168. package/dist/index222.js +3 -16
  169. package/dist/index222.js.map +1 -1
  170. package/dist/index223.js +10 -9
  171. package/dist/index223.js.map +1 -1
  172. package/dist/index224.js +9 -18
  173. package/dist/index224.js.map +1 -1
  174. package/dist/index225.js +9 -20
  175. package/dist/index225.js.map +1 -1
  176. package/dist/index226.js +10 -12
  177. package/dist/index226.js.map +1 -1
  178. package/dist/index227.js +10 -29
  179. package/dist/index227.js.map +1 -1
  180. package/dist/index228.js +9 -12
  181. package/dist/index228.js.map +1 -1
  182. package/dist/index229.js +6 -25
  183. package/dist/index229.js.map +1 -1
  184. package/dist/index23.js +1 -1
  185. package/dist/index230.js +5 -5
  186. package/dist/index230.js.map +1 -1
  187. package/dist/index231.js +5 -20
  188. package/dist/index231.js.map +1 -1
  189. package/dist/index232.js +5 -66
  190. package/dist/index232.js.map +1 -1
  191. package/dist/index233.js +6 -6
  192. package/dist/index233.js.map +1 -1
  193. package/dist/index234.js +5 -5
  194. package/dist/index234.js.map +1 -1
  195. package/dist/index235.js +16 -11
  196. package/dist/index235.js.map +1 -1
  197. package/dist/index236.js +7 -3
  198. package/dist/index236.js.map +1 -1
  199. package/dist/index237.js +9 -49
  200. package/dist/index237.js.map +1 -1
  201. package/dist/index238.js +11 -4
  202. package/dist/index238.js.map +1 -1
  203. package/dist/index239.js +20 -28
  204. package/dist/index239.js.map +1 -1
  205. package/dist/index24.js +1 -1
  206. package/dist/index240.js +8 -16
  207. package/dist/index240.js.map +1 -1
  208. package/dist/index241.js +9 -5
  209. package/dist/index241.js.map +1 -1
  210. package/dist/index242.js +9 -21
  211. package/dist/index242.js.map +1 -1
  212. package/dist/index243.js +4 -53
  213. package/dist/index243.js.map +1 -1
  214. package/dist/index244.js +5 -20
  215. package/dist/index244.js.map +1 -1
  216. package/dist/index245.js +16 -41
  217. package/dist/index245.js.map +1 -1
  218. package/dist/index246.js +9 -39
  219. package/dist/index246.js.map +1 -1
  220. package/dist/index247.js +19 -46
  221. package/dist/index247.js.map +1 -1
  222. package/dist/index248.js +17 -20
  223. package/dist/index248.js.map +1 -1
  224. package/dist/index249.js +12 -19
  225. package/dist/index249.js.map +1 -1
  226. package/dist/index25.js +1 -1
  227. package/dist/index250.js +28 -19
  228. package/dist/index250.js.map +1 -1
  229. package/dist/index251.js +10 -68
  230. package/dist/index251.js.map +1 -1
  231. package/dist/index252.js +25 -17
  232. package/dist/index252.js.map +1 -1
  233. package/dist/index253.js +5 -3
  234. package/dist/index253.js.map +1 -1
  235. package/dist/index254.js +66 -11
  236. package/dist/index254.js.map +1 -1
  237. package/dist/index255.js +8 -30
  238. package/dist/index255.js.map +1 -1
  239. package/dist/index256.js +11 -13
  240. package/dist/index256.js.map +1 -1
  241. package/dist/index257.js +8 -18
  242. package/dist/index257.js.map +1 -1
  243. package/dist/index258.js +5 -36
  244. package/dist/index258.js.map +1 -1
  245. package/dist/index259.js +12 -68
  246. package/dist/index259.js.map +1 -1
  247. package/dist/index260.js +3 -239
  248. package/dist/index260.js.map +1 -1
  249. package/dist/index261.js +3 -252
  250. package/dist/index261.js.map +1 -1
  251. package/dist/index262.js +96 -65
  252. package/dist/index262.js.map +1 -1
  253. package/dist/index263.js +16 -98
  254. package/dist/index263.js.map +1 -1
  255. package/dist/index264.js +26 -173
  256. package/dist/index264.js.map +1 -1
  257. package/dist/index265.js +47 -79
  258. package/dist/index265.js.map +1 -1
  259. package/dist/index266.js +6 -13
  260. package/dist/index266.js.map +1 -1
  261. package/dist/index267.js +5 -3
  262. package/dist/index267.js.map +1 -1
  263. package/dist/index268.js +60 -28
  264. package/dist/index268.js.map +1 -1
  265. package/dist/index269.js +66 -16
  266. package/dist/index269.js.map +1 -1
  267. package/dist/index270.js +131 -35
  268. package/dist/index270.js.map +1 -1
  269. package/dist/index271.js +8 -34
  270. package/dist/index271.js.map +1 -1
  271. package/dist/index272.js +5 -69
  272. package/dist/index272.js.map +1 -1
  273. package/dist/index273.js +4 -18
  274. package/dist/index273.js.map +1 -1
  275. package/dist/index274.js +11 -3
  276. package/dist/index274.js.map +1 -1
  277. package/dist/index275.js +17 -107
  278. package/dist/index275.js.map +1 -1
  279. package/dist/index276.js +16 -26
  280. package/dist/index276.js.map +1 -1
  281. package/dist/index277.js +11 -28
  282. package/dist/index277.js.map +1 -1
  283. package/dist/index278.js +8 -4
  284. package/dist/index278.js.map +1 -1
  285. package/dist/index279.js +142 -124
  286. package/dist/index279.js.map +1 -1
  287. package/dist/index28.js +1 -1
  288. package/dist/index280.js +79 -4
  289. package/dist/index280.js.map +1 -1
  290. package/dist/index281.js +61 -78
  291. package/dist/index281.js.map +1 -1
  292. package/dist/index282.js +15 -273
  293. package/dist/index282.js.map +1 -1
  294. package/dist/index283.js +20 -12
  295. package/dist/index283.js.map +1 -1
  296. package/dist/index284.js +7 -28
  297. package/dist/index284.js.map +1 -1
  298. package/dist/index285.js +12 -16
  299. package/dist/index285.js.map +1 -1
  300. package/dist/index286.js +3 -10
  301. package/dist/index286.js.map +1 -1
  302. package/dist/index287.js +49 -24
  303. package/dist/index287.js.map +1 -1
  304. package/dist/index288.js +15 -15
  305. package/dist/index288.js.map +1 -1
  306. package/dist/index289.js +21 -125
  307. package/dist/index289.js.map +1 -1
  308. package/dist/index29.js +3 -56
  309. package/dist/index29.js.map +1 -1
  310. package/dist/index290.js +53 -5
  311. package/dist/index290.js.map +1 -1
  312. package/dist/index291.js +19 -64
  313. package/dist/index291.js.map +1 -1
  314. package/dist/index292.js +42 -14
  315. package/dist/index292.js.map +1 -1
  316. package/dist/index293.js +40 -14
  317. package/dist/index293.js.map +1 -1
  318. package/dist/index294.js +46 -8
  319. package/dist/index294.js.map +1 -1
  320. package/dist/index295.js +21 -11
  321. package/dist/index295.js.map +1 -1
  322. package/dist/index296.js +70 -5
  323. package/dist/index296.js.map +1 -1
  324. package/dist/index297.js +17 -3
  325. package/dist/index297.js.map +1 -1
  326. package/dist/index298.js +3 -10
  327. package/dist/index298.js.map +1 -1
  328. package/dist/index299.js +13 -7
  329. package/dist/index299.js.map +1 -1
  330. package/dist/index3.js +2 -2
  331. package/dist/index30.js +242 -3
  332. package/dist/index30.js.map +1 -1
  333. package/dist/index300.js +15 -130
  334. package/dist/index300.js.map +1 -1
  335. package/dist/index301.js +34 -277
  336. package/dist/index301.js.map +1 -1
  337. package/dist/index302.js +229 -389
  338. package/dist/index302.js.map +1 -1
  339. package/dist/index303.js +253 -5
  340. package/dist/index303.js.map +1 -1
  341. package/dist/index304.js +64 -48
  342. package/dist/index304.js.map +1 -1
  343. package/dist/index305.js +83 -11
  344. package/dist/index305.js.map +1 -1
  345. package/dist/index306.js +3 -27
  346. package/dist/index306.js.map +1 -1
  347. package/dist/index307.js +29 -11
  348. package/dist/index307.js.map +1 -1
  349. package/dist/index308.js +16 -4
  350. package/dist/index308.js.map +1 -1
  351. package/dist/index309.js +35 -15
  352. package/dist/index309.js.map +1 -1
  353. package/dist/index31.js +21 -239
  354. package/dist/index31.js.map +1 -1
  355. package/dist/index310.js +18 -4
  356. package/dist/index310.js.map +1 -1
  357. package/dist/index311.js +4 -5
  358. package/dist/index311.js.map +1 -1
  359. package/dist/index312.js +26 -11
  360. package/dist/index312.js.map +1 -1
  361. package/dist/index313.js +28 -63
  362. package/dist/index313.js.map +1 -1
  363. package/dist/index314.js +4 -9
  364. package/dist/index314.js.map +1 -1
  365. package/dist/index315.js +75 -151
  366. package/dist/index315.js.map +1 -1
  367. package/dist/index316.js +270 -30
  368. package/dist/index316.js.map +1 -1
  369. package/dist/index317.js +11 -11
  370. package/dist/index317.js.map +1 -1
  371. package/dist/index318.js +11 -50
  372. package/dist/index318.js.map +1 -1
  373. package/dist/index319.js +24 -8
  374. package/dist/index319.js.map +1 -1
  375. package/dist/index32.js +4 -23
  376. package/dist/index32.js.map +1 -1
  377. package/dist/index320.js +16 -11
  378. package/dist/index320.js.map +1 -1
  379. package/dist/index321.js +124 -42
  380. package/dist/index321.js.map +1 -1
  381. package/dist/index322.js +5 -97
  382. package/dist/index322.js.map +1 -1
  383. package/dist/index323.js +61 -82
  384. package/dist/index323.js.map +1 -1
  385. package/dist/index324.js +12 -104
  386. package/dist/index324.js.map +1 -1
  387. package/dist/index325.js +7 -52
  388. package/dist/index325.js.map +1 -1
  389. package/dist/index326.js +5 -11
  390. package/dist/index326.js.map +1 -1
  391. package/dist/index327.js +3 -4
  392. package/dist/index327.js.map +1 -1
  393. package/dist/index328.js +10 -37
  394. package/dist/index328.js.map +1 -1
  395. package/dist/index329.js +7 -8
  396. package/dist/index329.js.map +1 -1
  397. package/dist/index33.js +6 -3
  398. package/dist/index33.js.map +1 -1
  399. package/dist/index330.js +385 -121
  400. package/dist/index330.js.map +1 -1
  401. package/dist/index331.js +5 -18
  402. package/dist/index331.js.map +1 -1
  403. package/dist/index332.js +51 -14
  404. package/dist/index332.js.map +1 -1
  405. package/dist/index333.js +11 -3
  406. package/dist/index333.js.map +1 -1
  407. package/dist/index334.js +25 -34
  408. package/dist/index334.js.map +1 -1
  409. package/dist/index335.js +11 -20
  410. package/dist/index335.js.map +1 -1
  411. package/dist/index336.js +154 -9
  412. package/dist/index336.js.map +1 -1
  413. package/dist/index337.js +32 -8
  414. package/dist/index337.js.map +1 -1
  415. package/dist/index338.js +11 -24
  416. package/dist/index338.js.map +1 -1
  417. package/dist/index339.js +46 -25
  418. package/dist/index339.js.map +1 -1
  419. package/dist/index34.js +38 -8
  420. package/dist/index34.js.map +1 -1
  421. package/dist/index340.js +9 -16
  422. package/dist/index340.js.map +1 -1
  423. package/dist/index341.js +11 -4
  424. package/dist/index341.js.map +1 -1
  425. package/dist/index342.js +43 -17
  426. package/dist/index342.js.map +1 -1
  427. package/dist/index343.js +97 -12
  428. package/dist/index343.js.map +1 -1
  429. package/dist/index344.js +86 -8
  430. package/dist/index344.js.map +1 -1
  431. package/dist/index345.js +105 -11
  432. package/dist/index345.js.map +1 -1
  433. package/dist/index346.js +51 -7
  434. package/dist/index346.js.map +1 -1
  435. package/dist/index347.js +10 -12
  436. package/dist/index347.js.map +1 -1
  437. package/dist/index348.js +4 -3
  438. package/dist/index348.js.map +1 -1
  439. package/dist/index349.js +37 -3
  440. package/dist/index349.js.map +1 -1
  441. package/dist/index35.js +74 -35
  442. package/dist/index35.js.map +1 -1
  443. package/dist/index350.js +9 -4
  444. package/dist/index350.js.map +1 -1
  445. package/dist/index351.js +136 -15
  446. package/dist/index351.js.map +1 -1
  447. package/dist/index352.js +17 -11
  448. package/dist/index352.js.map +1 -1
  449. package/dist/index353.js +15 -5
  450. package/dist/index353.js.map +1 -1
  451. package/dist/index354.js +4 -5
  452. package/dist/index354.js.map +1 -1
  453. package/dist/index355.js +37 -3
  454. package/dist/index355.js.map +1 -1
  455. package/dist/index356.js +19 -7
  456. package/dist/index356.js.map +1 -1
  457. package/dist/index357.js +9 -51
  458. package/dist/index357.js.map +1 -1
  459. package/dist/index358.js +8 -16
  460. package/dist/index358.js.map +1 -1
  461. package/dist/index359.js +25 -8
  462. package/dist/index359.js.map +1 -1
  463. package/dist/index36.js +20 -74
  464. package/dist/index36.js.map +1 -1
  465. package/dist/index360.js +28 -5
  466. package/dist/index360.js.map +1 -1
  467. package/dist/index361.js +15 -19
  468. package/dist/index361.js.map +1 -1
  469. package/dist/index362.js +5 -45
  470. package/dist/index362.js.map +1 -1
  471. package/dist/index363.js +16 -16
  472. package/dist/index363.js.map +1 -1
  473. package/dist/index364.js +13 -5
  474. package/dist/index364.js.map +1 -1
  475. package/dist/index365.js +7 -199
  476. package/dist/index365.js.map +1 -1
  477. package/dist/index366.js +27 -74
  478. package/dist/index366.js.map +1 -1
  479. package/dist/index367.js +131 -117
  480. package/dist/index367.js.map +1 -1
  481. package/dist/index368.js +10 -15
  482. package/dist/index368.js.map +1 -1
  483. package/dist/index369.js +44 -59
  484. package/dist/index369.js.map +1 -1
  485. package/dist/index37.js +33 -18
  486. package/dist/index37.js.map +1 -1
  487. package/dist/index370.js +3 -66
  488. package/dist/index370.js.map +1 -1
  489. package/dist/index371.js +21 -11
  490. package/dist/index371.js.map +1 -1
  491. package/dist/index372.js +74 -20
  492. package/dist/index372.js.map +1 -1
  493. package/dist/index373.js +12 -145
  494. package/dist/index373.js.map +1 -1
  495. package/dist/index374.js +3 -79
  496. package/dist/index374.js.map +1 -1
  497. package/dist/index375.js +73 -61
  498. package/dist/index375.js.map +1 -1
  499. package/dist/index376.js +200 -4
  500. package/dist/index376.js.map +1 -1
  501. package/dist/index377.js +71 -20
  502. package/dist/index377.js.map +1 -1
  503. package/dist/index378.js +35 -4
  504. package/dist/index378.js.map +1 -1
  505. package/dist/index379.js +7 -5
  506. package/dist/index379.js.map +1 -1
  507. package/dist/index38.js +26 -36
  508. package/dist/index38.js.map +1 -1
  509. package/dist/index380.js +16 -4
  510. package/dist/index380.js.map +1 -1
  511. package/dist/index381.js +123 -15
  512. package/dist/index381.js.map +1 -1
  513. package/dist/index382.js +4 -9
  514. package/dist/index382.js.map +1 -1
  515. package/dist/index383.js +11 -5
  516. package/dist/index383.js.map +1 -1
  517. package/dist/index384.js +5 -4
  518. package/dist/index384.js.map +1 -1
  519. package/dist/index385.js +3 -546
  520. package/dist/index385.js.map +1 -1
  521. package/dist/index386.js +20 -46
  522. package/dist/index386.js.map +1 -1
  523. package/dist/index387.js +45 -18
  524. package/dist/index387.js.map +1 -1
  525. package/dist/index388.js +18 -6
  526. package/dist/index388.js.map +1 -1
  527. package/dist/index389.js +5 -8
  528. package/dist/index389.js.map +1 -1
  529. package/dist/index39.js +21 -26
  530. package/dist/index39.js.map +1 -1
  531. package/dist/index390.js +4 -6
  532. package/dist/index390.js.map +1 -1
  533. package/dist/index391.js +20 -7
  534. package/dist/index391.js.map +1 -1
  535. package/dist/index392.js +4 -11
  536. package/dist/index392.js.map +1 -1
  537. package/dist/index393.js +4 -8
  538. package/dist/index393.js.map +1 -1
  539. package/dist/index394.js +4 -13
  540. package/dist/index394.js.map +1 -1
  541. package/dist/index395.js +16 -3
  542. package/dist/index395.js.map +1 -1
  543. package/dist/index396.js +9 -3
  544. package/dist/index396.js.map +1 -1
  545. package/dist/index397.js +6 -7
  546. package/dist/index397.js.map +1 -1
  547. package/dist/index398.js +4 -12
  548. package/dist/index398.js.map +1 -1
  549. package/dist/index399.js +543 -44
  550. package/dist/index399.js.map +1 -1
  551. package/dist/index4.js +2 -2
  552. package/dist/index40.js +56 -20
  553. package/dist/index40.js.map +1 -1
  554. package/dist/index400.js +44 -135
  555. package/dist/index400.js.map +1 -1
  556. package/dist/index401.js +17 -8
  557. package/dist/index401.js.map +1 -1
  558. package/dist/index402.js +6 -27
  559. package/dist/index402.js.map +1 -1
  560. package/dist/index403.js +7 -3
  561. package/dist/index403.js.map +1 -1
  562. package/dist/index404.js +6 -21
  563. package/dist/index404.js.map +1 -1
  564. package/dist/index405.js +7 -75
  565. package/dist/index405.js.map +1 -1
  566. package/dist/index406.js +12 -12
  567. package/dist/index406.js.map +1 -1
  568. package/dist/index407.js +8 -3
  569. package/dist/index407.js.map +1 -1
  570. package/dist/index408.js +12 -71
  571. package/dist/index408.js.map +1 -1
  572. package/dist/index409.js +3 -36
  573. package/dist/index409.js.map +1 -1
  574. package/dist/index41.js +51 -59
  575. package/dist/index41.js.map +1 -1
  576. package/dist/index410.js +14 -15
  577. package/dist/index410.js.map +1 -1
  578. package/dist/index411.js +491 -4
  579. package/dist/index411.js.map +1 -1
  580. package/dist/index412.js +3 -56
  581. package/dist/index412.js.map +1 -1
  582. package/dist/index413.js +3 -68
  583. package/dist/index413.js.map +1 -1
  584. package/dist/index414.js +5 -31
  585. package/dist/index414.js.map +1 -1
  586. package/dist/index415.js +56 -9
  587. package/dist/index415.js.map +1 -1
  588. package/dist/index416.js +61 -146
  589. package/dist/index416.js.map +1 -1
  590. package/dist/index417.js +26 -103
  591. package/dist/index417.js.map +1 -1
  592. package/dist/index418.js +9 -8
  593. package/dist/index418.js.map +1 -1
  594. package/dist/index419.js +153 -2
  595. package/dist/index419.js.map +1 -1
  596. package/dist/index42.js +21 -50
  597. package/dist/index42.js.map +1 -1
  598. package/dist/index420.js +107 -43
  599. package/dist/index420.js.map +1 -1
  600. package/dist/index421.js +32 -55
  601. package/dist/index421.js.map +1 -1
  602. package/dist/index422.js +6 -6
  603. package/dist/index422.js.map +1 -1
  604. package/dist/index424.js +38 -49
  605. package/dist/index424.js.map +1 -1
  606. package/dist/index425.js +50 -50
  607. package/dist/index425.js.map +1 -1
  608. package/dist/index426.js +8 -3
  609. package/dist/index426.js.map +1 -1
  610. package/dist/index427.js +2 -15
  611. package/dist/index427.js.map +1 -1
  612. package/dist/index428.js +50 -487
  613. package/dist/index428.js.map +1 -1
  614. package/dist/index429.js +55 -32
  615. package/dist/index429.js.map +1 -1
  616. package/dist/index43.js +127 -18
  617. package/dist/index43.js.map +1 -1
  618. package/dist/index430.js +16 -2
  619. package/dist/index430.js.map +1 -1
  620. package/dist/index431.js +29 -2
  621. package/dist/index431.js.map +1 -1
  622. package/dist/index432.js +13 -2
  623. package/dist/index432.js.map +1 -1
  624. package/dist/index433.js +7 -2
  625. package/dist/index433.js.map +1 -1
  626. package/dist/index434.js +2 -16
  627. package/dist/index434.js.map +1 -1
  628. package/dist/index435.js +2 -29
  629. package/dist/index435.js.map +1 -1
  630. package/dist/index436.js +2 -13
  631. package/dist/index436.js.map +1 -1
  632. package/dist/index437.js +2 -7
  633. package/dist/index437.js.map +1 -1
  634. package/dist/index44.js +39 -122
  635. package/dist/index44.js.map +1 -1
  636. package/dist/index45.js +85 -42
  637. package/dist/index45.js.map +1 -1
  638. package/dist/index46.js +123 -87
  639. package/dist/index46.js.map +1 -1
  640. package/dist/index47.js +5 -126
  641. package/dist/index47.js.map +1 -1
  642. package/dist/index48.js +332 -5
  643. package/dist/index48.js.map +1 -1
  644. package/dist/index49.js +246 -321
  645. package/dist/index49.js.map +1 -1
  646. package/dist/index5.js +2 -2
  647. package/dist/index50.js +23 -254
  648. package/dist/index50.js.map +1 -1
  649. package/dist/index51.js +129 -25
  650. package/dist/index51.js.map +1 -1
  651. package/dist/index52.js +24 -129
  652. package/dist/index52.js.map +1 -1
  653. package/dist/index53.js +19 -22
  654. package/dist/index53.js.map +1 -1
  655. package/dist/index54.js +134 -19
  656. package/dist/index54.js.map +1 -1
  657. package/dist/index55.js +30 -133
  658. package/dist/index55.js.map +1 -1
  659. package/dist/index56.js +24 -30
  660. package/dist/index56.js.map +1 -1
  661. package/dist/index57.js +38 -26
  662. package/dist/index57.js.map +1 -1
  663. package/dist/index58.js +19 -39
  664. package/dist/index58.js.map +1 -1
  665. package/dist/index59.js +133 -18
  666. package/dist/index59.js.map +1 -1
  667. package/dist/index6.js +4 -4
  668. package/dist/index60.js +49 -134
  669. package/dist/index60.js.map +1 -1
  670. package/dist/index61.js +25 -48
  671. package/dist/index61.js.map +1 -1
  672. package/dist/index62.js +57 -28
  673. package/dist/index62.js.map +1 -1
  674. package/dist/index63.js +56 -57
  675. package/dist/index63.js.map +1 -1
  676. package/dist/index64.js +5 -5
  677. package/dist/index64.js.map +1 -1
  678. package/dist/index66.js +22 -10
  679. package/dist/index66.js.map +1 -1
  680. package/dist/index67.js +232 -17
  681. package/dist/index67.js.map +1 -1
  682. package/dist/index68.js +5 -5
  683. package/dist/index68.js.map +1 -1
  684. package/dist/index7.js +11 -11
  685. package/dist/index70.js +10 -22
  686. package/dist/index70.js.map +1 -1
  687. package/dist/index71.js +17 -232
  688. package/dist/index71.js.map +1 -1
  689. package/dist/index76.js +1 -1
  690. package/dist/index77.js +2 -2
  691. package/dist/index78.js +2 -2
  692. package/dist/index8.js +2 -2
  693. package/dist/index9.js +1 -1
  694. package/package.json +1 -1
package/dist/index301.js CHANGED
@@ -1,283 +1,40 @@
1
- import * as E from "react";
2
- import { isHTMLElement as q, getNodeName as Se, getWindow as Be } from "./index300.js";
3
- import { addEventListener as I } from "./index290.js";
4
- import { mergeCleanups as ge } from "./index401.js";
5
- import { useMergedRefs as Ee } from "./index232.js";
6
- import { useValueAsRef as $ } from "./index240.js";
7
- import { useStableCallback as oe } from "./index239.js";
8
- import { useIsoLayoutEffect as W } from "./index238.js";
9
- import { useTimeout as Fe } from "./index268.js";
10
- import { useAnimationFrame as Ue } from "./index291.js";
11
- import { ownerDocument as O } from "./index267.js";
12
- import { FocusGuard as Te } from "./index402.js";
13
- import { isTypeableCombobox as xe, getFloatingFocusElement as ye, isTypeableElement as $e } from "./index276.js";
14
- import { isVirtualClick as ze, isVirtualPointerEvent as Je, stopEvent as Qe } from "./index306.js";
15
- import { isOutsideEvent as Ie, getNextTabbable as Xe, getPreviousTabbable as Ye, tabbable as De, isTabbable as ie, focusable as Ze } from "./index400.js";
16
- import { getNodeAncestors as ve, getNodeChildren as he } from "./index398.js";
17
- import { isElementVisible as et } from "./index399.js";
18
- import { createChangeEventDetails as tt } from "./index248.js";
19
- import { createAttribute as Ae } from "./index403.js";
20
- import { enqueueFocus as se } from "./index404.js";
21
- import { markOthers as Ce } from "./index405.js";
22
- import { usePortalContext as nt } from "./index279.js";
23
- import { useFloatingTree as rt } from "./index406.js";
24
- import { CLICK_TRIGGER_IDENTIFIER as ot } from "./index285.js";
25
- import { resolveRef as w } from "./index407.js";
26
- import { j as ue } from "./index30.js";
27
- import { activeElement as N, contains as c, getTarget as z } from "./index277.js";
28
- import { triggerHover as st, outsidePress as ut, focusOut as it } from "./index266.js";
29
- import { webkit as ct } from "./index303.js";
30
- function ft(n, D) {
31
- const M = Be(z(n));
32
- return n instanceof M.KeyboardEvent ? "keyboard" : n instanceof M.FocusEvent ? D || "keyboard" : "pointerType" in n ? n.pointerType || "keyboard" : "touches" in n ? "touch" : n instanceof M.MouseEvent ? D || (n.detail === 0 ? "keyboard" : "mouse") : "";
33
- }
34
- const ke = 20;
35
- let S = [];
36
- function ce() {
37
- S = S.filter((n) => n.deref()?.isConnected);
38
- }
39
- function Oe(n) {
40
- ce(), n && Se(n) !== "body" && (S.push(new WeakRef(n)), S.length > ke && (S = S.slice(-ke)));
41
- }
42
- function we() {
43
- return ce(), S[S.length - 1]?.deref();
44
- }
45
- function at(n) {
46
- return n ? ie(n) ? n : De(n)[0] || n : null;
47
- }
48
- function Ne(n) {
49
- if (n.hasAttribute("tabindex") && !n.hasAttribute("data-tabindex") || !n.getAttribute("role")?.includes("dialog"))
50
- return;
51
- const M = Ze(n).filter((P) => {
52
- const J = P.getAttribute("data-tabindex") || "";
53
- return ie(P) || P.hasAttribute("data-tabindex") && !J.startsWith("-");
54
- }), f = n.getAttribute("tabindex");
55
- M.length === 0 ? f !== "0" && (n.setAttribute("tabindex", "0"), n.setAttribute("data-tabindex", "0")) : (f !== "-1" || n.hasAttribute("data-tabindex") && n.getAttribute("data-tabindex") !== "-1") && (n.setAttribute("tabindex", "-1"), n.setAttribute("data-tabindex", "-1"));
56
- }
57
- function Lt(n) {
1
+ import { isElement as l } from "./index270.js";
2
+ import { useId as c } from "./index263.js";
3
+ import { useIsoLayoutEffect as a } from "./index273.js";
4
+ import { useRefWithInit as m } from "./index284.js";
5
+ import { useFloatingParentNodeId as u } from "./index373.js";
6
+ import { FloatingRootStore as p } from "./index377.js";
7
+ import { PopupTriggerMap as d } from "./index281.js";
8
+ function y(s) {
58
9
  const {
59
- context: D,
60
- children: M,
61
- disabled: f = !1,
62
- initialFocus: P = !0,
63
- returnFocus: J = !0,
64
- restoreFocus: Q = !1,
65
- modal: g = !0,
66
- closeOnFocusOut: L = !0,
67
- openInteractionType: Me = "",
68
- nextFocusableElement: j,
69
- previousFocusableElement: H,
70
- beforeContentFocusGuardRef: Pe,
71
- externalTree: Ge,
72
- getInsideElements: Ve
73
- } = n, v = "rootStore" in D ? D.rootStore : D, T = v.useState("open"), d = v.useState("domReferenceElement"), i = v.useState("floatingElement"), {
74
- events: X,
75
- dataRef: G
76
- } = v.context, V = oe(() => G.current.floatingContext?.nodeId), qe = P === !1, h = xe(d) && qe, fe = $(P), Y = $(J), _ = $(Me), ae = $(T), x = rt(Ge), s = nt(), y = E.useRef(!1), K = E.useRef(!1), Z = E.useRef(!1), le = E.useRef(null), de = E.useRef(""), ee = E.useRef(""), te = E.useRef(null), ne = E.useRef(null), Le = Ee(te, Pe, s?.beforeInsideRef), je = Ee(ne, s?.afterInsideRef), me = Fe(), B = Fe(), be = Ue(), He = s != null, o = ye(i), C = oe((r = o) => r ? De(r) : []), k = oe(() => Ve?.().filter((r) => r != null) ?? []);
77
- E.useEffect(() => {
78
- if (f || !g)
79
- return;
80
- function r(b) {
81
- b.key === "Tab" && c(o, N(O(o))) && C().length === 0 && !h && Qe(b);
82
- }
83
- const a = O(o);
84
- return I(a, "keydown", r);
85
- }, [f, o, g, h, C]), E.useEffect(() => {
86
- if (f || !T)
87
- return;
88
- const r = O(o);
89
- function a() {
90
- Z.current = !1;
91
- }
92
- function b(A) {
93
- const e = z(A), u = k(), t = c(i, e) || c(d, e) || c(s?.portalNode, e) || u.some((l) => l === e || c(l, e));
94
- Z.current = !t, ee.current = A.pointerType || "keyboard", e?.closest(`[${ot}]`) && (K.current = !0, B.start(0, () => {
95
- K.current = !1;
96
- }));
97
- }
98
- function p() {
99
- ee.current = "keyboard";
100
- }
101
- return ge(
102
- I(r, "pointerdown", b, !0),
103
- I(r, "pointerup", a, !0),
104
- I(r, "pointercancel", a, !0),
105
- I(r, "keydown", p, !0),
106
- // Avoid a stale `true` leaking into the next open (e.g. keep-mounted popups)
107
- // if the popup dismissed between pointerdown and pointerup.
108
- a
109
- );
110
- }, [f, i, d, o, T, s, B, k]), E.useEffect(() => {
111
- if (f || !L)
112
- return;
113
- const r = O(o);
114
- function a() {
115
- K.current = !0, B.start(0, () => {
116
- K.current = !1;
117
- });
118
- }
119
- function b(u) {
120
- const t = z(u);
121
- ie(t) && (le.current = t);
122
- }
123
- function p(u) {
124
- const t = u.relatedTarget, l = u.currentTarget, R = z(u);
125
- g && t == null && R != null && c(i, R) && Oe(R), queueMicrotask(() => {
126
- const F = V(), U = v.context.triggerElements, Ke = k(), We = t?.hasAttribute(Ae("focus-guard")) && [te.current, ne.current, s?.beforeInsideRef.current, s?.afterInsideRef.current, s?.beforeOutsideRef.current, s?.afterOutsideRef.current, w(H), w(j)].includes(t), _e = !(c(d, t) || c(i, t) || c(t, i) || c(s?.portalNode, t) || Ke.some((m) => m === t || c(m, t)) || t != null && U.hasElement(t) || U.hasMatchingElement((m) => c(m, t)) || We || x && (he(x.nodesRef.current, F).find((m) => c(m.context?.elements.floating, t) || c(m.context?.elements.domReference, t)) || ve(x.nodesRef.current, F).find((m) => [m.context?.elements.floating, ye(m.context?.elements.floating)].includes(t) || m.context?.elements.domReference === t)));
127
- if (l === d && o && Ne(o), Q && l !== d && !et(R) && N(r) === r.body) {
128
- if (q(o) && (o.focus(), Q === "popup")) {
129
- be.request(() => {
130
- o.focus();
131
- });
132
- return;
133
- }
134
- const m = C(), re = le.current, Re = (re && m.includes(re) ? re : null) || m[m.length - 1] || o;
135
- q(Re) && Re.focus();
136
- }
137
- if (G.current.insideReactTree) {
138
- G.current.insideReactTree = !1;
139
- return;
140
- }
141
- (h || !g) && t && _e && !K.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
142
- // For an "untrapped" typeable combobox (input role=combobox with
143
- // initialFocus=false), re-opening the popup and tabbing out should still close it even
144
- // when the previously focused element (e.g. the next tabbable outside the popup) is
145
- // focused again. Otherwise, the popup remains open on the second Tab sequence:
146
- // click input -> Tab (closes) -> click input -> Tab.
147
- // Allow closing when `isUntrappedTypeableCombobox` regardless of the previously focused element.
148
- (h || t !== we()) && (y.current = !0, v.setOpen(!1, tt(it, u)));
149
- });
150
- }
151
- function A() {
152
- Z.current || (G.current.insideReactTree = !0, me.start(0, () => {
153
- G.current.insideReactTree = !1;
154
- }));
155
- }
156
- const e = q(d) ? d : null;
157
- if (!(!i && !e))
158
- return ge(e && I(e, "focusout", p), e && I(e, "pointerdown", a), i && I(i, "focusin", b), i && I(i, "focusout", p), i && s && I(i, "focusout", A, !0));
159
- }, [f, d, i, o, g, x, s, v, L, Q, C, h, V, G, me, B, be, j, H, k]), E.useEffect(() => {
160
- if (f || !i || !T)
161
- return;
162
- const r = Array.from(s?.portalNode?.querySelectorAll(`[${Ae("portal")}]`) || []), b = (x ? ve(x.nodesRef.current, V()) : []).find((l) => xe(l.context?.elements.domReference || null))?.context?.elements.domReference, A = [...[i, ...r, te.current, ne.current, s?.beforeOutsideRef.current, s?.afterOutsideRef.current, ...k()], b, w(H), w(j), h ? d : null].filter((l) => l != null), e = Ce(A, {
163
- ariaHidden: g || h,
164
- mark: !1
165
- }), u = [i, ...r].filter((l) => l != null), t = Ce(u);
166
- return () => {
167
- t(), e();
168
- };
169
- }, [T, f, d, i, g, s, h, x, V, j, H, k]), W(() => {
170
- if (!T || f || !q(o))
171
- return;
172
- const r = O(o), a = N(r);
173
- queueMicrotask(() => {
174
- const b = fe.current, p = typeof b == "function" ? b(_.current || "") : b;
175
- if (p === void 0 || p === !1 || c(o, a))
176
- return;
177
- let e = null;
178
- const u = () => (e == null && (e = C(o)), e[0] || o);
179
- let t;
180
- p === !0 || p === null ? t = u() : t = w(p), t = t || u();
181
- const l = c(o, N(r));
182
- se(t, {
183
- preventScroll: t === o,
184
- shouldFocus() {
185
- if (!ae.current)
186
- return !1;
187
- if (l)
188
- return !0;
189
- const R = N(r);
190
- return !(R !== t && c(o, R));
191
- }
192
- });
193
- });
194
- }, [f, T, o, C, fe, _, ae]), W(() => {
195
- if (f || !o)
196
- return;
197
- const r = O(o), a = N(r), b = _.current == null;
198
- Oe(a);
199
- function p(e) {
200
- if (e.open || (de.current = ft(e.nativeEvent, ee.current)), e.reason === st && e.nativeEvent.type === "mouseleave" && (y.current = !0), e.reason === ut)
201
- if (e.nested)
202
- y.current = !1;
203
- else if (ze(e.nativeEvent) || Je(e.nativeEvent))
204
- y.current = !1;
205
- else {
206
- let u = !1;
207
- O(o).createElement("div").focus({
208
- get preventScroll() {
209
- return u = !0, !1;
210
- }
211
- }), u ? y.current = !1 : y.current = !0;
212
- }
213
- }
214
- X.on("openchange", p);
215
- function A() {
216
- const e = Y.current;
217
- let u = typeof e == "function" ? e(de.current) : e;
218
- if (u === void 0 || u === !1)
219
- return null;
220
- u === null && (u = !0);
221
- const t = d?.isConnected ? d : null, l = a?.isConnected && Se(a) !== "body" ? a : null;
222
- let R = b ? l || t : t || l;
223
- return R || (R = we() || null), typeof u == "boolean" ? R : w(u) || R || null;
224
- }
225
- return () => {
226
- X.off("openchange", p);
227
- const e = N(r), u = k(), t = c(i, e) || u.some((F) => F === e || c(F, e)) || x && he(x.nodesRef.current, V(), !1).some((F) => c(F.context?.elements.floating, e)), l = Y.current, R = A();
228
- queueMicrotask(() => {
229
- const F = at(R), U = typeof l != "boolean";
230
- l && !y.current && q(F) && // If the focus moved somewhere else after mount, avoid returning focus
231
- // since it likely entered a different element which should be
232
- // respected: https://github.com/floating-ui/floating-ui/issues/2607
233
- (!(!U && F !== e && e !== r.body) || t) && F.focus({
234
- preventScroll: !0
235
- }), y.current = !1;
236
- });
10
+ open: o = !1,
11
+ onOpenChange: f,
12
+ elements: e = {}
13
+ } = s, r = c(), i = u() != null;
14
+ if (process.env.NODE_ENV !== "production") {
15
+ const n = e.reference;
16
+ n && !l(n) && console.error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `context.setPositionReference()`", "instead.");
17
+ }
18
+ const t = m(() => new p({
19
+ open: o,
20
+ transitionStatus: void 0,
21
+ onOpenChange: f,
22
+ referenceElement: e.reference ?? null,
23
+ floatingElement: e.floating ?? null,
24
+ triggerElements: new d(),
25
+ floatingId: r,
26
+ syncOnly: !1,
27
+ nested: i
28
+ })).current;
29
+ return a(() => {
30
+ const n = {
31
+ open: o,
32
+ floatingId: r
237
33
  };
238
- }, [f, i, o, Y, _, X, x, d, V, k]), W(() => {
239
- if (!ct || T || !i)
240
- return;
241
- const r = N(O(i));
242
- !q(r) || !$e(r) || c(i, r) && r.blur();
243
- }, [T, i]), W(() => {
244
- if (!(f || !s))
245
- return s.setFocusManagerState({
246
- modal: g,
247
- closeOnFocusOut: L,
248
- open: T,
249
- onOpenChange: v.setOpen,
250
- domReference: d
251
- }), () => {
252
- s.setFocusManagerState(null);
253
- };
254
- }, [f, s, g, T, v, L, d]), W(() => {
255
- if (!(f || !o))
256
- return Ne(o), () => {
257
- queueMicrotask(ce);
258
- };
259
- }, [f, o]);
260
- const pe = !f && (g ? !h : !0) && (He || g);
261
- return /* @__PURE__ */ ue.jsxs(E.Fragment, {
262
- children: [pe && /* @__PURE__ */ ue.jsx(Te, {
263
- "data-type": "inside",
264
- ref: Le,
265
- onFocus: (r) => {
266
- if (g) {
267
- const a = C();
268
- se(a[a.length - 1]);
269
- } else s?.portalNode && (y.current = !1, Ie(r, s.portalNode) ? Xe(d)?.focus() : w(H ?? s.beforeOutsideRef)?.focus());
270
- }
271
- }), M, pe && /* @__PURE__ */ ue.jsx(Te, {
272
- "data-type": "inside",
273
- ref: je,
274
- onFocus: (r) => {
275
- g ? se(C()[0]) : s?.portalNode && (L && (y.current = !0), Ie(r, s.portalNode) ? Ye(d)?.focus() : w(j ?? s.afterOutsideRef)?.focus());
276
- }
277
- })]
278
- });
34
+ e.reference !== void 0 && (n.referenceElement = e.reference, n.domReferenceElement = l(e.reference) ? e.reference : null), e.floating !== void 0 && (n.floatingElement = e.floating), t.update(n);
35
+ }, [o, r, e.reference, e.floating, t]), t.context.onOpenChange = f, t.context.nested = i, t;
279
36
  }
280
37
  export {
281
- Lt as FloatingFocusManager
38
+ y as useFloatingRootContext
282
39
  };
283
40
  //# sourceMappingURL=index301.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index301.js","sources":["../../../node_modules/@base-ui/react/floating-ui-react/components/FloatingFocusManager.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getNodeName, isHTMLElement } from '@floating-ui/utils/dom';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { mergeCleanups } from '@base-ui/utils/mergeCleanups';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { platform } from '@base-ui/utils/platform';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { FocusGuard } from \"../../utils/FocusGuard.mjs\";\nimport { activeElement, contains, getTarget, isTypeableCombobox, getFloatingFocusElement, isTypeableElement } from \"../utils/element.mjs\";\nimport { isVirtualClick, isVirtualPointerEvent, stopEvent } from \"../utils/event.mjs\";\nimport { tabbable, focusable, isOutsideEvent, isTabbable, getNextTabbable, getPreviousTabbable } from \"../utils/tabbable.mjs\";\nimport { getNodeAncestors, getNodeChildren } from \"../utils/nodes.mjs\";\nimport { isElementVisible } from \"../utils/composite.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { createAttribute } from \"../utils/createAttribute.mjs\";\nimport { enqueueFocus } from \"../utils/enqueueFocus.mjs\";\nimport { markOthers } from \"../utils/markOthers.mjs\";\nimport { usePortalContext } from \"./FloatingPortal.mjs\";\nimport { useFloatingTree } from \"./FloatingTree.mjs\";\nimport { CLICK_TRIGGER_IDENTIFIER } from \"../../internals/constants.mjs\";\nimport { resolveRef } from \"../../utils/resolveRef.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction getEventType(event, lastInteractionType) {\n const win = ownerWindow(getTarget(event));\n if (event instanceof win.KeyboardEvent) {\n return 'keyboard';\n }\n if (event instanceof win.FocusEvent) {\n // Focus events can be caused by a preceding pointer interaction (e.g., focusout on outside press).\n // Prefer the last known pointer type if provided, else treat as keyboard.\n return lastInteractionType || 'keyboard';\n }\n if ('pointerType' in event) {\n return event.pointerType || 'keyboard';\n }\n if ('touches' in event) {\n return 'touch';\n }\n if (event instanceof win.MouseEvent) {\n // onClick events may not contain pointer events, and will fall through to here\n return lastInteractionType || (event.detail === 0 ? 'keyboard' : 'mouse');\n }\n return '';\n}\nconst LIST_LIMIT = 20;\nlet previouslyFocusedElements = [];\nfunction clearDisconnectedPreviouslyFocusedElements() {\n previouslyFocusedElements = previouslyFocusedElements.filter(entry => {\n return entry.deref()?.isConnected;\n });\n}\nfunction addPreviouslyFocusedElement(element) {\n clearDisconnectedPreviouslyFocusedElements();\n if (element && getNodeName(element) !== 'body') {\n previouslyFocusedElements.push(new WeakRef(element));\n if (previouslyFocusedElements.length > LIST_LIMIT) {\n previouslyFocusedElements = previouslyFocusedElements.slice(-LIST_LIMIT);\n }\n }\n}\nfunction getPreviouslyFocusedElement() {\n clearDisconnectedPreviouslyFocusedElements();\n return previouslyFocusedElements[previouslyFocusedElements.length - 1]?.deref();\n}\nfunction getFirstTabbableElement(container) {\n if (!container) {\n return null;\n }\n if (isTabbable(container)) {\n return container;\n }\n return tabbable(container)[0] || container;\n}\nfunction handleTabIndex(floatingFocusElement) {\n if (floatingFocusElement.hasAttribute('tabindex') && !floatingFocusElement.hasAttribute('data-tabindex')) {\n return;\n }\n if (!floatingFocusElement.getAttribute('role')?.includes('dialog')) {\n return;\n }\n const focusableElements = focusable(floatingFocusElement);\n const tabbableContent = focusableElements.filter(element => {\n const dataTabIndex = element.getAttribute('data-tabindex') || '';\n return isTabbable(element) || element.hasAttribute('data-tabindex') && !dataTabIndex.startsWith('-');\n });\n const tabIndex = floatingFocusElement.getAttribute('tabindex');\n if (tabbableContent.length === 0) {\n if (tabIndex !== '0') {\n floatingFocusElement.setAttribute('tabindex', '0');\n // Mark our own write so the externally-managed early-return above doesn't\n // mistake it for a user-authored `tabindex` and freeze management.\n floatingFocusElement.setAttribute('data-tabindex', '0');\n }\n } else if (tabIndex !== '-1' || floatingFocusElement.hasAttribute('data-tabindex') && floatingFocusElement.getAttribute('data-tabindex') !== '-1') {\n floatingFocusElement.setAttribute('tabindex', '-1');\n floatingFocusElement.setAttribute('data-tabindex', '-1');\n }\n}\n/**\n * Provides focus management for the floating element.\n * @see https://floating-ui.com/docs/FloatingFocusManager\n * @internal\n */\nexport function FloatingFocusManager(props) {\n const {\n context,\n children,\n disabled = false,\n initialFocus = true,\n returnFocus = true,\n restoreFocus = false,\n modal = true,\n closeOnFocusOut = true,\n openInteractionType = '',\n nextFocusableElement,\n previousFocusableElement,\n beforeContentFocusGuardRef,\n externalTree,\n getInsideElements\n } = props;\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const domReference = store.useState('domReferenceElement');\n const floating = store.useState('floatingElement');\n const {\n events,\n dataRef\n } = store.context;\n const getNodeId = useStableCallback(() => dataRef.current.floatingContext?.nodeId);\n const ignoreInitialFocus = initialFocus === false;\n // If the reference is a combobox and is typeable (e.g. input/textarea),\n // there are different focus semantics. The guards should not be rendered, but\n // aria-hidden should be applied to all nodes still. Further, the visually\n // hidden dismiss button should only appear at the end of the list, not the\n // start.\n const isUntrappedTypeableCombobox = isTypeableCombobox(domReference) && ignoreInitialFocus;\n const initialFocusRef = useValueAsRef(initialFocus);\n const returnFocusRef = useValueAsRef(returnFocus);\n const openInteractionTypeRef = useValueAsRef(openInteractionType);\n const openRef = useValueAsRef(open);\n const tree = useFloatingTree(externalTree);\n const portalContext = usePortalContext();\n const preventReturnFocusRef = React.useRef(false);\n const isPointerDownRef = React.useRef(false);\n const pointerDownOutsideRef = React.useRef(false);\n const lastFocusedTabbableRef = React.useRef(null);\n const closeTypeRef = React.useRef('');\n const lastInteractionTypeRef = React.useRef('');\n const beforeGuardRef = React.useRef(null);\n const afterGuardRef = React.useRef(null);\n const mergedBeforeGuardRef = useMergedRefs(beforeGuardRef, beforeContentFocusGuardRef, portalContext?.beforeInsideRef);\n const mergedAfterGuardRef = useMergedRefs(afterGuardRef, portalContext?.afterInsideRef);\n const blurTimeout = useTimeout();\n const pointerDownTimeout = useTimeout();\n const restoreFocusFrame = useAnimationFrame();\n const isInsidePortal = portalContext != null;\n const floatingFocusElement = getFloatingFocusElement(floating);\n const getTabbableContent = useStableCallback((container = floatingFocusElement) => {\n return container ? tabbable(container) : [];\n });\n const getResolvedInsideElements = useStableCallback(() => getInsideElements?.().filter(element => element != null) ?? []);\n\n // Prevent Tab from escaping the modal when there are no tabbable elements.\n React.useEffect(() => {\n if (disabled || !modal) {\n return undefined;\n }\n function onKeyDown(event) {\n if (event.key === 'Tab') {\n // The focus guards have nothing to focus, so we need to stop the event.\n if (contains(floatingFocusElement, activeElement(ownerDocument(floatingFocusElement))) && getTabbableContent().length === 0 && !isUntrappedTypeableCombobox) {\n stopEvent(event);\n }\n }\n }\n const doc = ownerDocument(floatingFocusElement);\n return addEventListener(doc, 'keydown', onKeyDown);\n }, [disabled, floatingFocusElement, modal, isUntrappedTypeableCombobox, getTabbableContent]);\n\n // Track pointer/keyboard interactions to disambiguate focus and outside presses.\n React.useEffect(() => {\n if (disabled || !open) {\n return undefined;\n }\n const doc = ownerDocument(floatingFocusElement);\n function clearPointerDownOutside() {\n pointerDownOutsideRef.current = false;\n }\n function onPointerDown(event) {\n const target = getTarget(event);\n const insideElements = getResolvedInsideElements();\n const pointerTargetInside = contains(floating, target) || contains(domReference, target) || contains(portalContext?.portalNode, target) || insideElements.some(element => element === target || contains(element, target));\n pointerDownOutsideRef.current = !pointerTargetInside;\n lastInteractionTypeRef.current = event.pointerType || 'keyboard';\n if (target?.closest(`[${CLICK_TRIGGER_IDENTIFIER}]`)) {\n isPointerDownRef.current = true;\n // Reset on the next tick so a single click on a click-trigger doesn't\n // permanently suppress focus-out closing for the lifetime of the instance.\n pointerDownTimeout.start(0, () => {\n isPointerDownRef.current = false;\n });\n }\n }\n function onKeyDown() {\n lastInteractionTypeRef.current = 'keyboard';\n }\n return mergeCleanups(addEventListener(doc, 'pointerdown', onPointerDown, true), addEventListener(doc, 'pointerup', clearPointerDownOutside, true), addEventListener(doc, 'pointercancel', clearPointerDownOutside, true), addEventListener(doc, 'keydown', onKeyDown, true),\n // Avoid a stale `true` leaking into the next open (e.g. keep-mounted popups)\n // if the popup dismissed between pointerdown and pointerup.\n clearPointerDownOutside);\n }, [disabled, floating, domReference, floatingFocusElement, open, portalContext, pointerDownTimeout, getResolvedInsideElements]);\n\n // Close on focus out and restore focus within the floating tree when needed.\n React.useEffect(() => {\n if (disabled || !closeOnFocusOut) {\n return undefined;\n }\n const doc = ownerDocument(floatingFocusElement);\n\n // In Safari, buttons lose focus when pressing them.\n function handlePointerDown() {\n isPointerDownRef.current = true;\n pointerDownTimeout.start(0, () => {\n isPointerDownRef.current = false;\n });\n }\n function handleFocusIn(event) {\n const target = getTarget(event);\n if (isTabbable(target)) {\n lastFocusedTabbableRef.current = target;\n }\n }\n function handleFocusOutside(event) {\n const relatedTarget = event.relatedTarget;\n const currentTarget = event.currentTarget;\n const target = getTarget(event);\n\n // When focus is lost to the body (e.g. on a backdrop press), record the element that\n // had focus so a confirmation dialog opened while the body is focused can return focus\n // to it. Scoped to `modal` to avoid non-modal popups polluting the shared stack.\n if (modal && relatedTarget == null && target != null && contains(floating, target)) {\n addPreviouslyFocusedElement(target);\n }\n queueMicrotask(() => {\n const nodeId = getNodeId();\n const triggers = store.context.triggerElements;\n const insideElements = getResolvedInsideElements();\n const isRelatedFocusGuard = relatedTarget?.hasAttribute(createAttribute('focus-guard')) && [beforeGuardRef.current, afterGuardRef.current, portalContext?.beforeInsideRef.current, portalContext?.afterInsideRef.current, portalContext?.beforeOutsideRef.current, portalContext?.afterOutsideRef.current, resolveRef(previousFocusableElement), resolveRef(nextFocusableElement)].includes(relatedTarget);\n const movedToUnrelatedNode = !(contains(domReference, relatedTarget) || contains(floating, relatedTarget) || contains(relatedTarget, floating) || contains(portalContext?.portalNode, relatedTarget) || insideElements.some(element => element === relatedTarget || contains(element, relatedTarget)) || relatedTarget != null && triggers.hasElement(relatedTarget) || triggers.hasMatchingElement(trigger => contains(trigger, relatedTarget)) || isRelatedFocusGuard || tree && (getNodeChildren(tree.nodesRef.current, nodeId).find(node => contains(node.context?.elements.floating, relatedTarget) || contains(node.context?.elements.domReference, relatedTarget)) || getNodeAncestors(tree.nodesRef.current, nodeId).find(node => [node.context?.elements.floating, getFloatingFocusElement(node.context?.elements.floating)].includes(relatedTarget) || node.context?.elements.domReference === relatedTarget)));\n if (currentTarget === domReference && floatingFocusElement) {\n handleTabIndex(floatingFocusElement);\n }\n\n // Restore focus to the previous tabbable element index to prevent\n // focus from being lost outside the floating tree.\n if (restoreFocus && currentTarget !== domReference && !isElementVisible(target) && activeElement(doc) === doc.body) {\n // Let `FloatingPortal` effect knows that focus is still inside the\n // floating tree.\n if (isHTMLElement(floatingFocusElement)) {\n floatingFocusElement.focus();\n // If explicitly requested to restore focus to the popup container, do not search\n // for the next/previous tabbable element.\n if (restoreFocus === 'popup') {\n // If the element is removed on pointerdown, focus tries to move it,\n // but since it's removed at the same time, focus gets lost as it\n // happens after the .focus() call above.\n // In this case, focus needs to be moved asynchronously.\n restoreFocusFrame.request(() => {\n floatingFocusElement.focus();\n });\n return;\n }\n }\n const tabbableContent = getTabbableContent();\n const prevTabbable = lastFocusedTabbableRef.current;\n const nodeToFocus = (prevTabbable && tabbableContent.includes(prevTabbable) ? prevTabbable : null) || tabbableContent[tabbableContent.length - 1] || floatingFocusElement;\n if (isHTMLElement(nodeToFocus)) {\n nodeToFocus.focus();\n }\n }\n\n // https://github.com/floating-ui/floating-ui/issues/3060\n if (dataRef.current.insideReactTree) {\n dataRef.current.insideReactTree = false;\n return;\n }\n\n // Focus did not move inside the floating tree, and there are no tabbable\n // portal guards to handle closing.\n if ((isUntrappedTypeableCombobox ? true : !modal) && relatedTarget && movedToUnrelatedNode && !isPointerDownRef.current && (\n // Fix React 18 Strict Mode returnFocus due to double rendering.\n // For an \"untrapped\" typeable combobox (input role=combobox with\n // initialFocus=false), re-opening the popup and tabbing out should still close it even\n // when the previously focused element (e.g. the next tabbable outside the popup) is\n // focused again. Otherwise, the popup remains open on the second Tab sequence:\n // click input -> Tab (closes) -> click input -> Tab.\n // Allow closing when `isUntrappedTypeableCombobox` regardless of the previously focused element.\n isUntrappedTypeableCombobox || relatedTarget !== getPreviouslyFocusedElement())) {\n preventReturnFocusRef.current = true;\n store.setOpen(false, createChangeEventDetails(REASONS.focusOut, event));\n }\n });\n }\n function markInsideReactTree() {\n if (pointerDownOutsideRef.current) {\n return;\n }\n dataRef.current.insideReactTree = true;\n blurTimeout.start(0, () => {\n dataRef.current.insideReactTree = false;\n });\n }\n const domReferenceElement = isHTMLElement(domReference) ? domReference : null;\n if (!floating && !domReferenceElement) {\n return undefined;\n }\n return mergeCleanups(domReferenceElement && addEventListener(domReferenceElement, 'focusout', handleFocusOutside), domReferenceElement && addEventListener(domReferenceElement, 'pointerdown', handlePointerDown), floating && addEventListener(floating, 'focusin', handleFocusIn), floating && addEventListener(floating, 'focusout', handleFocusOutside), floating && portalContext && addEventListener(floating, 'focusout', markInsideReactTree, true));\n }, [disabled, domReference, floating, floatingFocusElement, modal, tree, portalContext, store, closeOnFocusOut, restoreFocus, getTabbableContent, isUntrappedTypeableCombobox, getNodeId, dataRef, blurTimeout, pointerDownTimeout, restoreFocusFrame, nextFocusableElement, previousFocusableElement, getResolvedInsideElements]);\n\n // Hide everything outside the floating tree from assistive tech while open.\n React.useEffect(() => {\n if (disabled || !floating || !open) {\n return undefined;\n }\n\n // Don't hide portals nested within the parent portal.\n const portalNodes = Array.from(portalContext?.portalNode?.querySelectorAll(`[${createAttribute('portal')}]`) || []);\n const ancestors = tree ? getNodeAncestors(tree.nodesRef.current, getNodeId()) : [];\n const rootAncestorComboboxDomReference = ancestors.find(node => isTypeableCombobox(node.context?.elements.domReference || null))?.context?.elements.domReference;\n const controlInsideElements = [floating, ...portalNodes, beforeGuardRef.current, afterGuardRef.current, portalContext?.beforeOutsideRef.current, portalContext?.afterOutsideRef.current, ...getResolvedInsideElements()];\n const insideElements = [...controlInsideElements, rootAncestorComboboxDomReference, resolveRef(previousFocusableElement), resolveRef(nextFocusableElement), isUntrappedTypeableCombobox ? domReference : null].filter(x => x != null);\n const ariaHiddenCleanup = markOthers(insideElements, {\n ariaHidden: modal || isUntrappedTypeableCombobox,\n mark: false\n });\n const markerInsideElements = [floating, ...portalNodes].filter(x => x != null);\n const markerCleanup = markOthers(markerInsideElements);\n return () => {\n markerCleanup();\n ariaHiddenCleanup();\n };\n }, [open, disabled, domReference, floating, modal, portalContext, isUntrappedTypeableCombobox, tree, getNodeId, nextFocusableElement, previousFocusableElement, getResolvedInsideElements]);\n\n // Focus the initial element when the floating element opens.\n useIsoLayoutEffect(() => {\n if (!open || disabled || !isHTMLElement(floatingFocusElement)) {\n return;\n }\n const doc = ownerDocument(floatingFocusElement);\n const previouslyFocusedElement = activeElement(doc);\n\n // Wait for any layout effect state setters to execute to set `tabIndex`.\n queueMicrotask(() => {\n const initialFocusValueOrFn = initialFocusRef.current;\n const resolvedInitialFocus = typeof initialFocusValueOrFn === 'function' ? initialFocusValueOrFn(openInteractionTypeRef.current || '') : initialFocusValueOrFn;\n\n // `null` should fallback to default behavior in case of an empty ref.\n if (resolvedInitialFocus === undefined || resolvedInitialFocus === false) {\n return;\n }\n const focusAlreadyInsideFloatingEl = contains(floatingFocusElement, previouslyFocusedElement);\n if (focusAlreadyInsideFloatingEl) {\n return;\n }\n let focusableElements = null;\n const getDefaultFocusElement = () => {\n if (focusableElements == null) {\n focusableElements = getTabbableContent(floatingFocusElement);\n }\n return focusableElements[0] || floatingFocusElement;\n };\n let elToFocus;\n if (resolvedInitialFocus === true || resolvedInitialFocus === null) {\n elToFocus = getDefaultFocusElement();\n } else {\n elToFocus = resolveRef(resolvedInitialFocus);\n }\n elToFocus = elToFocus || getDefaultFocusElement();\n const hadFocusInside = contains(floatingFocusElement, activeElement(doc));\n enqueueFocus(elToFocus, {\n preventScroll: elToFocus === floatingFocusElement,\n shouldFocus() {\n // This focus is queued on the next animation frame. If the floating element has closed\n // before it runs — e.g. tabbing out of a kept-mounted popup — don't pull focus back\n // onto the initial element after it has legitimately moved elsewhere.\n if (!openRef.current) {\n return false;\n }\n if (hadFocusInside) {\n return true;\n }\n const currentActiveElement = activeElement(doc);\n const focusMovedInside = currentActiveElement !== elToFocus && contains(floatingFocusElement, currentActiveElement);\n return !focusMovedInside;\n }\n });\n });\n }, [disabled, open, floatingFocusElement, getTabbableContent, initialFocusRef, openInteractionTypeRef, openRef]);\n\n // Track return focus targets and restore focus on unmount/close.\n useIsoLayoutEffect(() => {\n if (disabled || !floatingFocusElement) {\n return undefined;\n }\n const doc = ownerDocument(floatingFocusElement);\n const elementFocusedBeforeOpen = activeElement(doc);\n // Only nullish interaction types represent programmatic opens. The empty\n // string default is intentionally not treated as programmatic.\n const preferPreviousFocus = openInteractionTypeRef.current == null;\n addPreviouslyFocusedElement(elementFocusedBeforeOpen);\n\n // Dismissing via outside press should always ignore `returnFocus` to\n // prevent unwanted scrolling.\n function onOpenChangeLocal(details) {\n if (!details.open) {\n closeTypeRef.current = getEventType(details.nativeEvent, lastInteractionTypeRef.current);\n }\n if (details.reason === REASONS.triggerHover && details.nativeEvent.type === 'mouseleave') {\n preventReturnFocusRef.current = true;\n }\n if (details.reason !== REASONS.outsidePress) {\n return;\n }\n if (details.nested) {\n preventReturnFocusRef.current = false;\n } else if (isVirtualClick(details.nativeEvent) || isVirtualPointerEvent(details.nativeEvent)) {\n preventReturnFocusRef.current = false;\n } else {\n let isPreventScrollSupported = false;\n ownerDocument(floatingFocusElement).createElement('div').focus({\n get preventScroll() {\n isPreventScrollSupported = true;\n return false;\n }\n });\n if (isPreventScrollSupported) {\n preventReturnFocusRef.current = false;\n } else {\n preventReturnFocusRef.current = true;\n }\n }\n }\n events.on('openchange', onOpenChangeLocal);\n function getReturnElement() {\n const returnFocusValueOrFn = returnFocusRef.current;\n let resolvedReturnFocusValue = typeof returnFocusValueOrFn === 'function' ? returnFocusValueOrFn(closeTypeRef.current) : returnFocusValueOrFn;\n\n // `null` should fallback to default behavior in case of an empty ref.\n if (resolvedReturnFocusValue === undefined || resolvedReturnFocusValue === false) {\n return null;\n }\n if (resolvedReturnFocusValue === null) {\n resolvedReturnFocusValue = true;\n }\n const referenceReturnElement = domReference?.isConnected ? domReference : null;\n const previousReturnElement = elementFocusedBeforeOpen?.isConnected && getNodeName(elementFocusedBeforeOpen) !== 'body' ? elementFocusedBeforeOpen : null;\n let defaultReturnElement = preferPreviousFocus ? previousReturnElement || referenceReturnElement : referenceReturnElement || previousReturnElement;\n if (!defaultReturnElement) {\n defaultReturnElement = getPreviouslyFocusedElement() || null;\n }\n if (typeof resolvedReturnFocusValue === 'boolean') {\n return defaultReturnElement;\n }\n return resolveRef(resolvedReturnFocusValue) || defaultReturnElement || null;\n }\n return () => {\n events.off('openchange', onOpenChangeLocal);\n const activeEl = activeElement(doc);\n const insideElements = getResolvedInsideElements();\n const isFocusInsideFloatingTree = contains(floating, activeEl) || insideElements.some(element => element === activeEl || contains(element, activeEl)) || tree && getNodeChildren(tree.nodesRef.current, getNodeId(), false).some(node => contains(node.context?.elements.floating, activeEl));\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const returnFocusValueOrFn = returnFocusRef.current;\n const returnElement = getReturnElement();\n queueMicrotask(() => {\n // This is `returnElement`, if it's tabbable, or its first tabbable child.\n const tabbableReturnElement = getFirstTabbableElement(returnElement);\n const hasExplicitReturnFocus = typeof returnFocusValueOrFn !== 'boolean';\n if (returnFocusValueOrFn && !preventReturnFocusRef.current && isHTMLElement(tabbableReturnElement) && (\n // If the focus moved somewhere else after mount, avoid returning focus\n // since it likely entered a different element which should be\n // respected: https://github.com/floating-ui/floating-ui/issues/2607\n !hasExplicitReturnFocus && tabbableReturnElement !== activeEl && activeEl !== doc.body ? isFocusInsideFloatingTree : true)) {\n tabbableReturnElement.focus({\n preventScroll: true\n });\n }\n preventReturnFocusRef.current = false;\n });\n };\n }, [disabled, floating, floatingFocusElement, returnFocusRef, openInteractionTypeRef, events, tree, domReference, getNodeId, getResolvedInsideElements]);\n\n // Safari may randomly scroll to the bottom of the page if an input inside a popup has focus\n // when the popup unmounts from the DOM.\n // By blurring it before the popup unmounts, we can prevent this behavior.\n useIsoLayoutEffect(() => {\n if (!platform.engine.webkit || open || !floating) {\n return;\n }\n const activeEl = activeElement(ownerDocument(floating));\n if (!isHTMLElement(activeEl) || !isTypeableElement(activeEl)) {\n return;\n }\n if (contains(floating, activeEl)) {\n activeEl.blur();\n }\n }, [open, floating]);\n\n // Synchronize the `context` & `modal` value to the FloatingPortal context.\n // It will decide whether or not it needs to render its own guards.\n useIsoLayoutEffect(() => {\n if (disabled || !portalContext) {\n return undefined;\n }\n portalContext.setFocusManagerState({\n modal,\n closeOnFocusOut,\n open,\n onOpenChange: store.setOpen,\n domReference\n });\n return () => {\n portalContext.setFocusManagerState(null);\n };\n }, [disabled, portalContext, modal, open, store, closeOnFocusOut, domReference]);\n\n // Keep the floating element tabIndex in sync and clear stale focus records.\n useIsoLayoutEffect(() => {\n if (disabled || !floatingFocusElement) {\n return undefined;\n }\n handleTabIndex(floatingFocusElement);\n return () => {\n queueMicrotask(clearDisconnectedPreviouslyFocusedElements);\n };\n }, [disabled, floatingFocusElement]);\n const shouldRenderGuards = !disabled && (modal ? !isUntrappedTypeableCombobox : true) && (isInsidePortal || modal);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [shouldRenderGuards && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedBeforeGuardRef,\n onFocus: event => {\n if (modal) {\n const els = getTabbableContent();\n enqueueFocus(els[els.length - 1]);\n } else if (portalContext?.portalNode) {\n preventReturnFocusRef.current = false;\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const nextTabbable = getNextTabbable(domReference);\n nextTabbable?.focus();\n } else {\n resolveRef(previousFocusableElement ?? portalContext.beforeOutsideRef)?.focus();\n }\n }\n }\n }), children, shouldRenderGuards && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedAfterGuardRef,\n onFocus: event => {\n if (modal) {\n enqueueFocus(getTabbableContent()[0]);\n } else if (portalContext?.portalNode) {\n if (closeOnFocusOut) {\n preventReturnFocusRef.current = true;\n }\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const prevTabbable = getPreviousTabbable(domReference);\n prevTabbable?.focus();\n } else {\n resolveRef(nextFocusableElement ?? portalContext.afterOutsideRef)?.focus();\n }\n }\n }\n })]\n });\n}"],"names":["getEventType","event","lastInteractionType","win","ownerWindow","getTarget","LIST_LIMIT","previouslyFocusedElements","clearDisconnectedPreviouslyFocusedElements","entry","addPreviouslyFocusedElement","element","getNodeName","getPreviouslyFocusedElement","getFirstTabbableElement","container","isTabbable","tabbable","handleTabIndex","floatingFocusElement","tabbableContent","focusable","dataTabIndex","tabIndex","FloatingFocusManager","props","context","children","disabled","initialFocus","returnFocus","restoreFocus","modal","closeOnFocusOut","openInteractionType","nextFocusableElement","previousFocusableElement","beforeContentFocusGuardRef","externalTree","getInsideElements","store","open","domReference","floating","events","dataRef","getNodeId","useStableCallback","ignoreInitialFocus","isUntrappedTypeableCombobox","isTypeableCombobox","initialFocusRef","useValueAsRef","returnFocusRef","openInteractionTypeRef","openRef","tree","useFloatingTree","portalContext","usePortalContext","preventReturnFocusRef","React","isPointerDownRef","pointerDownOutsideRef","lastFocusedTabbableRef","closeTypeRef","lastInteractionTypeRef","beforeGuardRef","afterGuardRef","mergedBeforeGuardRef","useMergedRefs","mergedAfterGuardRef","blurTimeout","useTimeout","pointerDownTimeout","restoreFocusFrame","useAnimationFrame","isInsidePortal","getFloatingFocusElement","getTabbableContent","getResolvedInsideElements","onKeyDown","contains","activeElement","ownerDocument","stopEvent","doc","addEventListener","clearPointerDownOutside","onPointerDown","target","insideElements","pointerTargetInside","CLICK_TRIGGER_IDENTIFIER","mergeCleanups","handlePointerDown","handleFocusIn","handleFocusOutside","relatedTarget","currentTarget","nodeId","triggers","isRelatedFocusGuard","createAttribute","resolveRef","movedToUnrelatedNode","trigger","getNodeChildren","node","getNodeAncestors","isElementVisible","isHTMLElement","prevTabbable","nodeToFocus","createChangeEventDetails","REASONS.focusOut","markInsideReactTree","domReferenceElement","portalNodes","rootAncestorComboboxDomReference","x","ariaHiddenCleanup","markOthers","markerInsideElements","markerCleanup","useIsoLayoutEffect","previouslyFocusedElement","initialFocusValueOrFn","resolvedInitialFocus","focusableElements","getDefaultFocusElement","elToFocus","hadFocusInside","enqueueFocus","currentActiveElement","elementFocusedBeforeOpen","preferPreviousFocus","onOpenChangeLocal","details","REASONS.triggerHover","REASONS.outsidePress","isVirtualClick","isVirtualPointerEvent","isPreventScrollSupported","getReturnElement","returnFocusValueOrFn","resolvedReturnFocusValue","referenceReturnElement","previousReturnElement","defaultReturnElement","activeEl","isFocusInsideFloatingTree","returnElement","tabbableReturnElement","hasExplicitReturnFocus","platform.engine.webkit","isTypeableElement","shouldRenderGuards","_jsxs","_jsx","FocusGuard","els","isOutsideEvent","getNextTabbable","getPreviousTabbable"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAASA,GAAaC,GAAOC,GAAqB;AAChD,QAAMC,IAAMC,GAAYC,EAAUJ,CAAK,CAAC;AACxC,SAAIA,aAAiBE,EAAI,gBAChB,aAELF,aAAiBE,EAAI,aAGhBD,KAAuB,aAE5B,iBAAiBD,IACZA,EAAM,eAAe,aAE1B,aAAaA,IACR,UAELA,aAAiBE,EAAI,aAEhBD,MAAwBD,EAAM,WAAW,IAAI,aAAa,WAE5D;AACT;AACA,MAAMK,KAAa;AACnB,IAAIC,IAA4B,CAAA;AAChC,SAASC,KAA6C;AACpD,EAAAD,IAA4BA,EAA0B,OAAO,CAAAE,MACpDA,EAAM,MAAK,GAAI,WACvB;AACH;AACA,SAASC,GAA4BC,GAAS;AAC5C,EAAAH,GAA0C,GACtCG,KAAWC,GAA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CAAC;AACnC,QAAM0I,KAAqB,CAACjI,MAAaI,IAAQ,CAACiB,IAA8B,QAAU4B,MAAkB7C;AAC5G,SAAoB8H,gBAAAA,GAAAA,KAAMjG,EAAM,UAAU;AAAA,IACxC,UAAU,CAACgG,MAAmCE,gBAAAA,GAAAA,IAAKC,IAAY;AAAA,MAC7D,aAAa;AAAA,MACb,KAAK3F;AAAA,MACL,SAAS,CAAApE,MAAS;AAChB,YAAI+B,GAAO;AACT,gBAAMiI,IAAMlF,EAAkB;AAC9B,UAAAsD,GAAa4B,EAAIA,EAAI,SAAS,CAAC,CAAC;AAAA,QAClC,MAAO,CAAIvG,GAAe,eACxBE,EAAsB,UAAU,IAC5BsG,GAAejK,GAAOyD,EAAc,UAAU,IAC3ByG,GAAgBzH,CAAY,GACnC,MAAK,IAEnB8D,EAAWpE,KAA4BsB,EAAc,gBAAgB,GAAG,MAAK;AAAA,MAGnF;AAAA,IACN,CAAK,GAAG/B,GAAUkI,MAAmCE,gBAAAA,GAAAA,IAAKC,IAAY;AAAA,MAChE,aAAa;AAAA,MACb,KAAKzF;AAAA,MACL,SAAS,CAAAtE,MAAS;AAChB,QAAI+B,IACFqG,GAAatD,IAAqB,CAAC,CAAC,IAC3BrB,GAAe,eACpBzB,MACF2B,EAAsB,UAAU,KAE9BsG,GAAejK,GAAOyD,EAAc,UAAU,IAC3B0G,GAAoB1H,CAAY,GACvC,MAAK,IAEnB8D,EAAWrE,KAAwBuB,EAAc,eAAe,GAAG,MAAK;AAAA,MAG9E;AAAA,IACN,CAAK,CAAC;AAAA,EACN,CAAG;AACH;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index301.js","sources":["../../../node_modules/@base-ui/react/floating-ui-react/hooks/useFloatingRootContext.mjs"],"sourcesContent":["'use client';\n\nimport { isElement } from '@floating-ui/utils/dom';\nimport { useId } from '@base-ui/utils/useId';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { PopupTriggerMap } from \"../../utils/popups/index.mjs\";\nimport { useFloatingParentNodeId } from \"../components/FloatingTree.mjs\";\nimport { FloatingRootStore } from \"../components/FloatingRootStore.mjs\";\nexport function useFloatingRootContext(options) {\n const {\n open = false,\n onOpenChange,\n elements = {}\n } = options;\n const floatingId = useId();\n const nested = useFloatingParentNodeId() != null;\n if (process.env.NODE_ENV !== 'production') {\n const optionDomReference = elements.reference;\n if (optionDomReference && !isElement(optionDomReference)) {\n console.error('Cannot pass a virtual element to the `elements.reference` option,', 'as it must be a real DOM element. Use `context.setPositionReference()`', 'instead.');\n }\n }\n const store = useRefWithInit(() => new FloatingRootStore({\n open,\n transitionStatus: undefined,\n onOpenChange,\n referenceElement: elements.reference ?? null,\n floatingElement: elements.floating ?? null,\n triggerElements: new PopupTriggerMap(),\n floatingId,\n syncOnly: false,\n nested\n })).current;\n useIsoLayoutEffect(() => {\n const valuesToSync = {\n open,\n floatingId\n };\n\n // Only sync elements that are defined to avoid overwriting existing ones\n if (elements.reference !== undefined) {\n valuesToSync.referenceElement = elements.reference;\n valuesToSync.domReferenceElement = isElement(elements.reference) ? elements.reference : null;\n }\n if (elements.floating !== undefined) {\n valuesToSync.floatingElement = elements.floating;\n }\n store.update(valuesToSync);\n }, [open, floatingId, elements.reference, elements.floating, store]);\n store.context.onOpenChange = onOpenChange;\n store.context.nested = nested;\n return store;\n}"],"names":["useFloatingRootContext","options","open","onOpenChange","elements","floatingId","useId","nested","useFloatingParentNodeId","optionDomReference","isElement","store","useRefWithInit","FloatingRootStore","PopupTriggerMap","useIsoLayoutEffect","valuesToSync"],"mappings":";;;;;;;AASO,SAASA,EAAuBC,GAAS;AAC9C,QAAM;AAAA,IACJ,MAAAC,IAAO;AAAA,IACP,cAAAC;AAAA,IACA,UAAAC,IAAW,CAAA;AAAA,EACf,IAAMH,GACEI,IAAaC,EAAK,GAClBC,IAASC,EAAuB,KAAM;AAC5C,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,UAAMC,IAAqBL,EAAS;AACpC,IAAIK,KAAsB,CAACC,EAAUD,CAAkB,KACrD,QAAQ,MAAM,qEAAqE,0EAA0E,UAAU;AAAA,EAE3K;AACA,QAAME,IAAQC,EAAe,MAAM,IAAIC,EAAkB;AAAA,IACvD,MAAAX;AAAA,IACA,kBAAkB;AAAA,IAClB,cAAAC;AAAA,IACA,kBAAkBC,EAAS,aAAa;AAAA,IACxC,iBAAiBA,EAAS,YAAY;AAAA,IACtC,iBAAiB,IAAIU,EAAe;AAAA,IACpC,YAAAT;AAAA,IACA,UAAU;AAAA,IACV,QAAAE;AAAA,EACJ,CAAG,CAAC,EAAE;AACJ,SAAAQ,EAAmB,MAAM;AACvB,UAAMC,IAAe;AAAA,MACnB,MAAAd;AAAA,MACA,YAAAG;AAAA,IACN;AAGI,IAAID,EAAS,cAAc,WACzBY,EAAa,mBAAmBZ,EAAS,WACzCY,EAAa,sBAAsBN,EAAUN,EAAS,SAAS,IAAIA,EAAS,YAAY,OAEtFA,EAAS,aAAa,WACxBY,EAAa,kBAAkBZ,EAAS,WAE1CO,EAAM,OAAOK,CAAY;AAAA,EAC3B,GAAG,CAACd,GAAMG,GAAYD,EAAS,WAAWA,EAAS,UAAUO,CAAK,CAAC,GACnEA,EAAM,QAAQ,eAAeR,GAC7BQ,EAAM,QAAQ,SAASJ,GAChBI;AACT;","x_google_ignoreList":[0]}