@rpcbase/ui 0.245.0 → 0.246.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 (448) hide show
  1. package/dist/index149.js +5 -14
  2. package/dist/index149.js.map +1 -1
  3. package/dist/index150.js +63 -63
  4. package/dist/index150.js.map +1 -1
  5. package/dist/index151.js +2 -38
  6. package/dist/index151.js.map +1 -1
  7. package/dist/index152.js +385 -13
  8. package/dist/index152.js.map +1 -1
  9. package/dist/index153.js +261 -23
  10. package/dist/index153.js.map +1 -1
  11. package/dist/index154.js +58 -109
  12. package/dist/index154.js.map +1 -1
  13. package/dist/index155.js +47 -13
  14. package/dist/index155.js.map +1 -1
  15. package/dist/index156.js +169 -4
  16. package/dist/index156.js.map +1 -1
  17. package/dist/index157.js +110 -4
  18. package/dist/index157.js.map +1 -1
  19. package/dist/index158.js +25 -5
  20. package/dist/index158.js.map +1 -1
  21. package/dist/index159.js +8 -12
  22. package/dist/index159.js.map +1 -1
  23. package/dist/index160.js +4 -19
  24. package/dist/index160.js.map +1 -1
  25. package/dist/index161.js +6 -11
  26. package/dist/index161.js.map +1 -1
  27. package/dist/index162.js +4 -176
  28. package/dist/index162.js.map +1 -1
  29. package/dist/index163.js +476 -268
  30. package/dist/index163.js.map +1 -1
  31. package/dist/index164.js +189 -4
  32. package/dist/index164.js.map +1 -1
  33. package/dist/index165.js +14 -28
  34. package/dist/index165.js.map +1 -1
  35. package/dist/index166.js +105 -124
  36. package/dist/index166.js.map +1 -1
  37. package/dist/index167.js +262 -63
  38. package/dist/index167.js.map +1 -1
  39. package/dist/index168.js +6 -8
  40. package/dist/index168.js.map +1 -1
  41. package/dist/index169.js +40 -15
  42. package/dist/index169.js.map +1 -1
  43. package/dist/index170.js +4 -30
  44. package/dist/index170.js.map +1 -1
  45. package/dist/index171.js +14 -69
  46. package/dist/index171.js.map +1 -1
  47. package/dist/index172.js +68 -5
  48. package/dist/index172.js.map +1 -1
  49. package/dist/index173.js +35 -66
  50. package/dist/index173.js.map +1 -1
  51. package/dist/index174.js +14 -2
  52. package/dist/index174.js.map +1 -1
  53. package/dist/index175.js +22 -384
  54. package/dist/index175.js.map +1 -1
  55. package/dist/index176.js +108 -258
  56. package/dist/index176.js.map +1 -1
  57. package/dist/index177.js +13 -61
  58. package/dist/index177.js.map +1 -1
  59. package/dist/index178.js +4 -46
  60. package/dist/index178.js.map +1 -1
  61. package/dist/index179.js +4 -170
  62. package/dist/index179.js.map +1 -1
  63. package/dist/index180.js +5 -110
  64. package/dist/index180.js.map +1 -1
  65. package/dist/index181.js +11 -24
  66. package/dist/index181.js.map +1 -1
  67. package/dist/index182.js +20 -8
  68. package/dist/index182.js.map +1 -1
  69. package/dist/index183.js +11 -5
  70. package/dist/index183.js.map +1 -1
  71. package/dist/index184.js +176 -5
  72. package/dist/index184.js.map +1 -1
  73. package/dist/index185.js +279 -4
  74. package/dist/index185.js.map +1 -1
  75. package/dist/index186.js +4 -487
  76. package/dist/index186.js.map +1 -1
  77. package/dist/index187.js +27 -189
  78. package/dist/index187.js.map +1 -1
  79. package/dist/index188.js +126 -13
  80. package/dist/index188.js.map +1 -1
  81. package/dist/index189.js +63 -107
  82. package/dist/index189.js.map +1 -1
  83. package/dist/index190.js +8 -262
  84. package/dist/index190.js.map +1 -1
  85. package/dist/index191.js +16 -7
  86. package/dist/index191.js.map +1 -1
  87. package/dist/index192.js +29 -39
  88. package/dist/index192.js.map +1 -1
  89. package/dist/index193.js +69 -4
  90. package/dist/index193.js.map +1 -1
  91. package/dist/index254.js +20 -67
  92. package/dist/index254.js.map +1 -1
  93. package/dist/index255.js +66 -8
  94. package/dist/index255.js.map +1 -1
  95. package/dist/index256.js +6 -11
  96. package/dist/index256.js.map +1 -1
  97. package/dist/index257.js +5 -8
  98. package/dist/index257.js.map +1 -1
  99. package/dist/index258.js +11 -5
  100. package/dist/index258.js.map +1 -1
  101. package/dist/index259.js +3 -13
  102. package/dist/index259.js.map +1 -1
  103. package/dist/index260.js +50 -3
  104. package/dist/index260.js.map +1 -1
  105. package/dist/index261.js +4 -4
  106. package/dist/index261.js.map +1 -1
  107. package/dist/index262.js +27 -97
  108. package/dist/index262.js.map +1 -1
  109. package/dist/index263.js +15 -16
  110. package/dist/index263.js.map +1 -1
  111. package/dist/index264.js +5 -29
  112. package/dist/index264.js.map +1 -1
  113. package/dist/index265.js +21 -51
  114. package/dist/index265.js.map +1 -1
  115. package/dist/index266.js +53 -5
  116. package/dist/index266.js.map +1 -1
  117. package/dist/index267.js +20 -5
  118. package/dist/index267.js.map +1 -1
  119. package/dist/index268.js +39 -59
  120. package/dist/index268.js.map +1 -1
  121. package/dist/index269.js +36 -63
  122. package/dist/index269.js.map +1 -1
  123. package/dist/index270.js +46 -134
  124. package/dist/index270.js.map +1 -1
  125. package/dist/index271.js +19 -7
  126. package/dist/index271.js.map +1 -1
  127. package/dist/index272.js +71 -5
  128. package/dist/index272.js.map +1 -1
  129. package/dist/index273.js +18 -4
  130. package/dist/index273.js.map +1 -1
  131. package/dist/index274.js +3 -11
  132. package/dist/index274.js.map +1 -1
  133. package/dist/index275.js +11 -21
  134. package/dist/index275.js.map +1 -1
  135. package/dist/index276.js +13 -16
  136. package/dist/index276.js.map +1 -1
  137. package/dist/index277.js +17 -10
  138. package/dist/index277.js.map +1 -1
  139. package/dist/index278.js +37 -8
  140. package/dist/index278.js.map +1 -1
  141. package/dist/index279.js +237 -142
  142. package/dist/index279.js.map +1 -1
  143. package/dist/index28.js +1 -1
  144. package/dist/index280.js +249 -76
  145. package/dist/index280.js.map +1 -1
  146. package/dist/index281.js +68 -61
  147. package/dist/index281.js.map +1 -1
  148. package/dist/index282.js +100 -15
  149. package/dist/index282.js.map +1 -1
  150. package/dist/index283.js +84 -20
  151. package/dist/index283.js.map +1 -1
  152. package/dist/index284.js +3 -6
  153. package/dist/index284.js.map +1 -1
  154. package/dist/index285.js +29 -11
  155. package/dist/index285.js.map +1 -1
  156. package/dist/index286.js +16 -3
  157. package/dist/index286.js.map +1 -1
  158. package/dist/index287.js +34 -50
  159. package/dist/index287.js.map +1 -1
  160. package/dist/index288.js +16 -15
  161. package/dist/index288.js.map +1 -1
  162. package/dist/index289.js +3 -21
  163. package/dist/index289.js.map +1 -1
  164. package/dist/index29.js +1 -1
  165. package/dist/index290.js +26 -53
  166. package/dist/index290.js.map +1 -1
  167. package/dist/index291.js +28 -20
  168. package/dist/index291.js.map +1 -1
  169. package/dist/index292.js +4 -42
  170. package/dist/index292.js.map +1 -1
  171. package/dist/index293.js +73 -34
  172. package/dist/index293.js.map +1 -1
  173. package/dist/index294.js +273 -46
  174. package/dist/index294.js.map +1 -1
  175. package/dist/index295.js +11 -20
  176. package/dist/index295.js.map +1 -1
  177. package/dist/index296.js +11 -71
  178. package/dist/index296.js.map +1 -1
  179. package/dist/index297.js +25 -17
  180. package/dist/index297.js.map +1 -1
  181. package/dist/index298.js +16 -3
  182. package/dist/index298.js.map +1 -1
  183. package/dist/index299.js +124 -12
  184. package/dist/index299.js.map +1 -1
  185. package/dist/index300.js +5 -18
  186. package/dist/index300.js.map +1 -1
  187. package/dist/index301.js +64 -35
  188. package/dist/index301.js.map +1 -1
  189. package/dist/index302.js +14 -240
  190. package/dist/index302.js.map +1 -1
  191. package/dist/index303.js +7 -252
  192. package/dist/index303.js.map +1 -1
  193. package/dist/index304.js +5 -68
  194. package/dist/index304.js.map +1 -1
  195. package/dist/index305.js +3 -83
  196. package/dist/index305.js.map +1 -1
  197. package/dist/index306.js +10 -3
  198. package/dist/index306.js.map +1 -1
  199. package/dist/index307.js +7 -29
  200. package/dist/index307.js.map +1 -1
  201. package/dist/index308.js +133 -16
  202. package/dist/index308.js.map +1 -1
  203. package/dist/index309.js +397 -32
  204. package/dist/index309.js.map +1 -1
  205. package/dist/index310.js +5 -18
  206. package/dist/index310.js.map +1 -1
  207. package/dist/index311.js +52 -3
  208. package/dist/index311.js.map +1 -1
  209. package/dist/index312.js +11 -26
  210. package/dist/index312.js.map +1 -1
  211. package/dist/index313.js +25 -26
  212. package/dist/index313.js.map +1 -1
  213. package/dist/index314.js +12 -4
  214. package/dist/index314.js.map +1 -1
  215. package/dist/index315.js +151 -75
  216. package/dist/index315.js.map +1 -1
  217. package/dist/index316.js +30 -270
  218. package/dist/index316.js.map +1 -1
  219. package/dist/index317.js +11 -11
  220. package/dist/index317.js.map +1 -1
  221. package/dist/index318.js +50 -11
  222. package/dist/index318.js.map +1 -1
  223. package/dist/index319.js +8 -24
  224. package/dist/index319.js.map +1 -1
  225. package/dist/index320.js +11 -16
  226. package/dist/index320.js.map +1 -1
  227. package/dist/index321.js +42 -124
  228. package/dist/index321.js.map +1 -1
  229. package/dist/index322.js +97 -5
  230. package/dist/index322.js.map +1 -1
  231. package/dist/index323.js +82 -61
  232. package/dist/index323.js.map +1 -1
  233. package/dist/index324.js +104 -12
  234. package/dist/index324.js.map +1 -1
  235. package/dist/index325.js +52 -7
  236. package/dist/index325.js.map +1 -1
  237. package/dist/index326.js +11 -5
  238. package/dist/index326.js.map +1 -1
  239. package/dist/index327.js +4 -3
  240. package/dist/index327.js.map +1 -1
  241. package/dist/index328.js +37 -10
  242. package/dist/index328.js.map +1 -1
  243. package/dist/index329.js +8 -7
  244. package/dist/index329.js.map +1 -1
  245. package/dist/index33.js +2 -2
  246. package/dist/index330.js +121 -385
  247. package/dist/index330.js.map +1 -1
  248. package/dist/index331.js +18 -5
  249. package/dist/index331.js.map +1 -1
  250. package/dist/index332.js +14 -51
  251. package/dist/index332.js.map +1 -1
  252. package/dist/index333.js +3 -11
  253. package/dist/index333.js.map +1 -1
  254. package/dist/index334.js +34 -25
  255. package/dist/index334.js.map +1 -1
  256. package/dist/index335.js +20 -11
  257. package/dist/index335.js.map +1 -1
  258. package/dist/index336.js +9 -154
  259. package/dist/index336.js.map +1 -1
  260. package/dist/index337.js +8 -32
  261. package/dist/index337.js.map +1 -1
  262. package/dist/index338.js +24 -11
  263. package/dist/index338.js.map +1 -1
  264. package/dist/index339.js +25 -46
  265. package/dist/index339.js.map +1 -1
  266. package/dist/index34.js +5 -5
  267. package/dist/index340.js +16 -9
  268. package/dist/index340.js.map +1 -1
  269. package/dist/index341.js +8 -11
  270. package/dist/index341.js.map +1 -1
  271. package/dist/index342.js +11 -43
  272. package/dist/index342.js.map +1 -1
  273. package/dist/index343.js +7 -96
  274. package/dist/index343.js.map +1 -1
  275. package/dist/index344.js +11 -84
  276. package/dist/index344.js.map +1 -1
  277. package/dist/index345.js +3 -105
  278. package/dist/index345.js.map +1 -1
  279. package/dist/index346.js +3 -52
  280. package/dist/index346.js.map +1 -1
  281. package/dist/index347.js +16 -10
  282. package/dist/index347.js.map +1 -1
  283. package/dist/index348.js +51 -4
  284. package/dist/index348.js.map +1 -1
  285. package/dist/index349.js +5 -37
  286. package/dist/index349.js.map +1 -1
  287. package/dist/index35.js +11 -11
  288. package/dist/index350.js +61 -8
  289. package/dist/index350.js.map +1 -1
  290. package/dist/index351.js +61 -130
  291. package/dist/index351.js.map +1 -1
  292. package/dist/index352.js +8 -17
  293. package/dist/index352.js.map +1 -1
  294. package/dist/index353.js +5 -16
  295. package/dist/index353.js.map +1 -1
  296. package/dist/index354.js +11 -3
  297. package/dist/index354.js.map +1 -1
  298. package/dist/index355.js +19 -34
  299. package/dist/index355.js.map +1 -1
  300. package/dist/index356.js +16 -20
  301. package/dist/index356.js.map +1 -1
  302. package/dist/index357.js +8 -10
  303. package/dist/index357.js.map +1 -1
  304. package/dist/index358.js +144 -8
  305. package/dist/index358.js.map +1 -1
  306. package/dist/index359.js +77 -22
  307. package/dist/index359.js.map +1 -1
  308. package/dist/index36.js +3 -3
  309. package/dist/index360.js +61 -28
  310. package/dist/index360.js.map +1 -1
  311. package/dist/index361.js +15 -17
  312. package/dist/index361.js.map +1 -1
  313. package/dist/index365.js +11 -8
  314. package/dist/index365.js.map +1 -1
  315. package/dist/index366.js +4 -27
  316. package/dist/index366.js.map +1 -1
  317. package/dist/index367.js +5 -137
  318. package/dist/index367.js.map +1 -1
  319. package/dist/index368.js +3 -13
  320. package/dist/index368.js.map +1 -1
  321. package/dist/index369.js +20 -46
  322. package/dist/index369.js.map +1 -1
  323. package/dist/index37.js +4 -4
  324. package/dist/index370.js +45 -4
  325. package/dist/index370.js.map +1 -1
  326. package/dist/index371.js +17 -21
  327. package/dist/index371.js.map +1 -1
  328. package/dist/index372.js +4 -75
  329. package/dist/index372.js.map +1 -1
  330. package/dist/index373.js +200 -11
  331. package/dist/index373.js.map +1 -1
  332. package/dist/index374.js +73 -3
  333. package/dist/index374.js.map +1 -1
  334. package/dist/index375.js +122 -72
  335. package/dist/index375.js.map +1 -1
  336. package/dist/index376.js +4 -200
  337. package/dist/index376.js.map +1 -1
  338. package/dist/index377.js +20 -71
  339. package/dist/index377.js.map +1 -1
  340. package/dist/index378.js +8 -35
  341. package/dist/index378.js.map +1 -1
  342. package/dist/index379.js +27 -7
  343. package/dist/index379.js.map +1 -1
  344. package/dist/index38.js +5 -5
  345. package/dist/index380.js +136 -14
  346. package/dist/index380.js.map +1 -1
  347. package/dist/index381.js +10 -121
  348. package/dist/index381.js.map +1 -1
  349. package/dist/index382.js +47 -4
  350. package/dist/index382.js.map +1 -1
  351. package/dist/index383.js +3 -11
  352. package/dist/index383.js.map +1 -1
  353. package/dist/index384.js +21 -5
  354. package/dist/index384.js.map +1 -1
  355. package/dist/index385.js +76 -3
  356. package/dist/index385.js.map +1 -1
  357. package/dist/index386.js +12 -21
  358. package/dist/index386.js.map +1 -1
  359. package/dist/index387.js +4 -45
  360. package/dist/index387.js.map +1 -1
  361. package/dist/index388.js +70 -16
  362. package/dist/index388.js.map +1 -1
  363. package/dist/index389.js +36 -5
  364. package/dist/index389.js.map +1 -1
  365. package/dist/index39.js +3 -3
  366. package/dist/index390.js +7 -5
  367. package/dist/index390.js.map +1 -1
  368. package/dist/index391.js +15 -20
  369. package/dist/index391.js.map +1 -1
  370. package/dist/index40.js +10 -10
  371. package/dist/index409.js +3 -3
  372. package/dist/index409.js.map +1 -1
  373. package/dist/index410.js +3 -15
  374. package/dist/index410.js.map +1 -1
  375. package/dist/index411.js +3 -492
  376. package/dist/index411.js.map +1 -1
  377. package/dist/index412.js +15 -3
  378. package/dist/index412.js.map +1 -1
  379. package/dist/index413.js +492 -3
  380. package/dist/index413.js.map +1 -1
  381. package/dist/index417.js +1 -1
  382. package/dist/index419.js +1 -1
  383. package/dist/index420.js +2 -2
  384. package/dist/index421.js +7 -32
  385. package/dist/index421.js.map +1 -1
  386. package/dist/index422.js +2 -8
  387. package/dist/index422.js.map +1 -1
  388. package/dist/index423.js +44 -2
  389. package/dist/index423.js.map +1 -1
  390. package/dist/index424.js +52 -40
  391. package/dist/index424.js.map +1 -1
  392. package/dist/index425.js +7 -55
  393. package/dist/index425.js.map +1 -1
  394. package/dist/index426.js +2 -8
  395. package/dist/index426.js.map +1 -1
  396. package/dist/index427.js +55 -2
  397. package/dist/index427.js.map +1 -1
  398. package/dist/index428.js +53 -52
  399. package/dist/index428.js.map +1 -1
  400. package/dist/index429.js +32 -55
  401. package/dist/index429.js.map +1 -1
  402. package/dist/index430.js +2 -16
  403. package/dist/index430.js.map +1 -1
  404. package/dist/index431.js +2 -29
  405. package/dist/index431.js.map +1 -1
  406. package/dist/index432.js +2 -13
  407. package/dist/index432.js.map +1 -1
  408. package/dist/index433.js +2 -7
  409. package/dist/index433.js.map +1 -1
  410. package/dist/index434.js +16 -2
  411. package/dist/index434.js.map +1 -1
  412. package/dist/index435.js +29 -2
  413. package/dist/index435.js.map +1 -1
  414. package/dist/index436.js +13 -2
  415. package/dist/index436.js.map +1 -1
  416. package/dist/index437.js +7 -2
  417. package/dist/index437.js.map +1 -1
  418. package/dist/index47.js +2 -2
  419. package/dist/index48.js +36 -36
  420. package/dist/index49.js +29 -29
  421. package/dist/index50.js +2 -2
  422. package/dist/index51.js +12 -12
  423. package/dist/index52.js +4 -4
  424. package/dist/index53.js +1 -1
  425. package/dist/index54.js +21 -21
  426. package/dist/index55.js +5 -5
  427. package/dist/index56.js +5 -5
  428. package/dist/index57.js +8 -8
  429. package/dist/index58.js +5 -5
  430. package/dist/index59.js +17 -17
  431. package/dist/index60.js +5 -5
  432. package/dist/index61.js +3 -3
  433. package/dist/index64.js +5 -5
  434. package/dist/index64.js.map +1 -1
  435. package/dist/index66.js +10 -22
  436. package/dist/index66.js.map +1 -1
  437. package/dist/index67.js +17 -232
  438. package/dist/index67.js.map +1 -1
  439. package/dist/index68.js +5 -5
  440. package/dist/index68.js.map +1 -1
  441. package/dist/index70.js +22 -10
  442. package/dist/index70.js.map +1 -1
  443. package/dist/index71.js +232 -17
  444. package/dist/index71.js.map +1 -1
  445. package/dist/index76.js +1 -1
  446. package/dist/index77.js +2 -2
  447. package/dist/index78.js +2 -2
  448. package/package.json +1 -1
package/dist/index163.js CHANGED
@@ -1,283 +1,491 @@
1
- import * as E from "react";
2
- import { isHTMLElement as q, getNodeName as Se, getWindow as Be } from "./index270.js";
3
- import { addEventListener as I } from "./index322.js";
4
- import { mergeCleanups as ge } from "./index365.js";
5
- import { useMergedRefs as Ee } from "./index254.js";
6
- import { useValueAsRef as $ } from "./index288.js";
7
- import { useStableCallback as oe } from "./index264.js";
8
- import { useIsoLayoutEffect as W } from "./index273.js";
9
- import { useTimeout as Fe } from "./index307.js";
10
- import { useAnimationFrame as Ue } from "./index323.js";
11
- import { ownerDocument as O } from "./index306.js";
12
- import { FocusGuard as Te } from "./index366.js";
13
- import { isTypeableCombobox as xe, getFloatingFocusElement as ye, isTypeableElement as $e } from "./index312.js";
14
- import { isVirtualClick as ze, isVirtualPointerEvent as Je, stopEvent as Qe } from "./index334.js";
15
- import { isOutsideEvent as Ie, getNextTabbable as Xe, getPreviousTabbable as Ye, tabbable as De, isTabbable as ie, focusable as Ze } from "./index367.js";
16
- import { getNodeAncestors as ve, getNodeChildren as he } from "./index368.js";
17
- import { isElementVisible as et } from "./index369.js";
18
- import { createChangeEventDetails as tt } from "./index153.js";
19
- import { createAttribute as Ae } from "./index370.js";
20
- import { enqueueFocus as se } from "./index371.js";
21
- import { markOthers as Ce } from "./index372.js";
22
- import { usePortalContext as nt } from "./index166.js";
23
- import { useFloatingTree as rt } from "./index373.js";
24
- import { CLICK_TRIGGER_IDENTIFIER as ot } from "./index169.js";
25
- import { resolveRef as w } from "./index374.js";
26
- import { j as ue } from "./index28.js";
27
- import { activeElement as N, contains as c, getTarget as z } from "./index313.js";
28
- import { triggerHover as st, outsidePress as ut, focusOut as it } from "./index155.js";
29
- import { webkit as ct } from "./index331.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") : "";
1
+ import h from "./index326.js";
2
+ import l from "./index170.js";
3
+ import v from "./index327.js";
4
+ function o(n) {
5
+ "@babel/helpers - typeof";
6
+ return o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
7
+ return typeof t;
8
+ } : function(t) {
9
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
10
+ }, o(n);
33
11
  }
34
- const ke = 20;
35
- let S = [];
36
- function ce() {
37
- S = S.filter((n) => n.deref()?.isConnected);
12
+ function u(n, t) {
13
+ if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function");
38
14
  }
39
- function Oe(n) {
40
- ce(), n && Se(n) !== "body" && (S.push(new WeakRef(n)), S.length > ke && (S = S.slice(-ke)));
15
+ function d(n, t) {
16
+ for (var e = 0; e < t.length; e++) {
17
+ var a = t[e];
18
+ a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(n, P(a.key), a);
19
+ }
41
20
  }
42
- function we() {
43
- return ce(), S[S.length - 1]?.deref();
21
+ function s(n, t, e) {
22
+ return t && d(n.prototype, t), Object.defineProperty(n, "prototype", { writable: !1 }), n;
44
23
  }
45
- function at(n) {
46
- return n ? ie(n) ? n : De(n)[0] || n : null;
24
+ function P(n) {
25
+ var t = C(n, "string");
26
+ return o(t) == "symbol" ? t : t + "";
47
27
  }
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"));
28
+ function C(n, t) {
29
+ if (o(n) != "object" || !n) return n;
30
+ var e = n[Symbol.toPrimitive];
31
+ if (e !== void 0) {
32
+ var a = e.call(n, t);
33
+ if (o(a) != "object") return a;
34
+ throw new TypeError("@@toPrimitive must return a primitive value.");
35
+ }
36
+ return String(n);
56
37
  }
57
- function Lt(n) {
58
- 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;
38
+ var p = "1.2.0", b = "1.7.35", g = " ext. ", F = /* @__PURE__ */ (function() {
39
+ function n(t) {
40
+ u(this, n), N(t), this.metadata = t, m.call(this, t);
41
+ }
42
+ return s(n, [{
43
+ key: "getCountries",
44
+ value: function() {
45
+ return Object.keys(this.metadata.countries).filter(function(e) {
46
+ return e !== "001";
117
47
  });
118
48
  }
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
- });
49
+ }, {
50
+ key: "getCountryMetadata",
51
+ value: function(e) {
52
+ return this.metadata.countries[e];
150
53
  }
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
- });
237
- };
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());
54
+ }, {
55
+ key: "nonGeographic",
56
+ value: function() {
57
+ if (!(this.v1 || this.v2 || this.v3))
58
+ return this.metadata.nonGeographic || this.metadata.nonGeographical;
59
+ }
60
+ }, {
61
+ key: "hasCountry",
62
+ value: function(e) {
63
+ return this.getCountryMetadata(e) !== void 0;
64
+ }
65
+ }, {
66
+ key: "hasCallingCode",
67
+ value: function(e) {
68
+ if (this.getCountryCodesForCallingCode(e))
69
+ return !0;
70
+ if (this.nonGeographic()) {
71
+ if (this.nonGeographic()[e])
72
+ return !0;
73
+ } else {
74
+ var a = this.countryCallingCodes()[e];
75
+ if (a && a.length === 1 && a[0] === "001")
76
+ return !0;
270
77
  }
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());
78
+ }
79
+ }, {
80
+ key: "isNonGeographicCallingCode",
81
+ value: function(e) {
82
+ return this.nonGeographic() ? !!this.nonGeographic()[e] : !this.getCountryCodesForCallingCode(e);
83
+ }
84
+ // Deprecated.
85
+ }, {
86
+ key: "country",
87
+ value: function(e) {
88
+ return this.selectNumberingPlan(e);
89
+ }
90
+ /**
91
+ * Selects a telephone numbering plan based on either a country code or a calling code.
92
+ * @param {string} argument — Country code or calling code.
93
+ * @param {string} legacyArgumentCallingCode — Legacy argument: calling code, if the first argument is not passed.
94
+ */
95
+ }, {
96
+ key: "selectNumberingPlan",
97
+ value: function(e, a) {
98
+ var i, r;
99
+ if (e && (v(e) ? r = e : i = e), a && (r = a), i && i !== "001") {
100
+ var f = this.getCountryMetadata(i);
101
+ if (!f)
102
+ throw new Error("Unknown country: ".concat(i));
103
+ this.numberingPlan = new c(f, this);
104
+ } else if (r) {
105
+ if (!this.hasCallingCode(r))
106
+ throw new Error("Unknown calling code: ".concat(r));
107
+ this.numberingPlan = new c(this.getNumberingPlanMetadata(r), this);
108
+ } else
109
+ this.numberingPlan = void 0;
110
+ return this;
111
+ }
112
+ }, {
113
+ key: "getCountryCodesForCallingCode",
114
+ value: function(e) {
115
+ var a = this.countryCallingCodes()[e];
116
+ if (a)
117
+ return a.length === 1 && a[0].length === 3 ? void 0 : a;
118
+ }
119
+ }, {
120
+ key: "getCountryCodeForCallingCode",
121
+ value: function(e) {
122
+ var a = this.getCountryCodesForCallingCode(e);
123
+ if (a)
124
+ return a[0];
125
+ }
126
+ }, {
127
+ key: "getNumberingPlanMetadata",
128
+ value: function(e) {
129
+ var a = this.getCountryCodeForCallingCode(e);
130
+ if (a)
131
+ return this.getCountryMetadata(a);
132
+ if (this.nonGeographic()) {
133
+ var i = this.nonGeographic()[e];
134
+ if (i)
135
+ return i;
136
+ } else {
137
+ var r = this.countryCallingCodes()[e];
138
+ if (r && r.length === 1 && r[0] === "001")
139
+ return this.metadata.countries["001"];
276
140
  }
277
- })]
278
- });
141
+ }
142
+ // Deprecated.
143
+ }, {
144
+ key: "countryCallingCode",
145
+ value: function() {
146
+ return this.numberingPlan.callingCode();
147
+ }
148
+ // Deprecated.
149
+ }, {
150
+ key: "IDDPrefix",
151
+ value: function() {
152
+ return this.numberingPlan.IDDPrefix();
153
+ }
154
+ // Deprecated.
155
+ }, {
156
+ key: "defaultIDDPrefix",
157
+ value: function() {
158
+ return this.numberingPlan.defaultIDDPrefix();
159
+ }
160
+ // Deprecated.
161
+ }, {
162
+ key: "nationalNumberPattern",
163
+ value: function() {
164
+ return this.numberingPlan.nationalNumberPattern();
165
+ }
166
+ // Deprecated.
167
+ }, {
168
+ key: "possibleLengths",
169
+ value: function() {
170
+ return this.numberingPlan.possibleLengths();
171
+ }
172
+ // Deprecated.
173
+ }, {
174
+ key: "formats",
175
+ value: function() {
176
+ return this.numberingPlan.formats();
177
+ }
178
+ // Deprecated.
179
+ }, {
180
+ key: "nationalPrefixForParsing",
181
+ value: function() {
182
+ return this.numberingPlan.nationalPrefixForParsing();
183
+ }
184
+ // Deprecated.
185
+ }, {
186
+ key: "nationalPrefixTransformRule",
187
+ value: function() {
188
+ return this.numberingPlan.nationalPrefixTransformRule();
189
+ }
190
+ // Deprecated.
191
+ }, {
192
+ key: "leadingDigits",
193
+ value: function() {
194
+ return this.numberingPlan.leadingDigits();
195
+ }
196
+ // Deprecated.
197
+ }, {
198
+ key: "hasTypes",
199
+ value: function() {
200
+ return this.numberingPlan.hasTypes();
201
+ }
202
+ // Deprecated.
203
+ }, {
204
+ key: "type",
205
+ value: function(e) {
206
+ return this.numberingPlan.type(e);
207
+ }
208
+ // Deprecated.
209
+ }, {
210
+ key: "ext",
211
+ value: function() {
212
+ return this.numberingPlan.ext();
213
+ }
214
+ }, {
215
+ key: "countryCallingCodes",
216
+ value: function() {
217
+ return this.v1 ? this.metadata.country_phone_code_to_countries : this.metadata.country_calling_codes;
218
+ }
219
+ // Deprecated.
220
+ }, {
221
+ key: "chooseCountryByCountryCallingCode",
222
+ value: function(e) {
223
+ return this.selectNumberingPlan(e);
224
+ }
225
+ }, {
226
+ key: "hasSelectedNumberingPlan",
227
+ value: function() {
228
+ return this.numberingPlan !== void 0;
229
+ }
230
+ }]);
231
+ })(), c = /* @__PURE__ */ (function() {
232
+ function n(t, e) {
233
+ u(this, n), this.globalMetadataObject = e, this.metadata = t, m.call(this, e.metadata);
234
+ }
235
+ return s(n, [{
236
+ key: "callingCode",
237
+ value: function() {
238
+ return this.metadata[0];
239
+ }
240
+ // When multiple countries share the same calling code,
241
+ // all phone number formatting rules are included in the metadata
242
+ // of the "default" country for that calling code.
243
+ // Any other countries' metdata doesn't include any formatting rules.
244
+ // Google developers said that such storage architecture was chosen for performance reasons.
245
+ //
246
+ // For example, for NANPA region ("North American Numbering Plan Administration",
247
+ // which includes USA, Canada, Cayman Islands, Bahamas, etc) all formatting rules
248
+ // are contained in the metadata of `US` country.
249
+ //
250
+ // This is not public API.
251
+ //
252
+ }, {
253
+ key: "_getDefaultCountryMetadataForThisCallingCode",
254
+ value: function() {
255
+ return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode());
256
+ }
257
+ // Deprecated.
258
+ }, {
259
+ key: "getDefaultCountryMetadataForRegion",
260
+ value: function() {
261
+ return this._getDefaultCountryMetadataForThisCallingCode();
262
+ }
263
+ // Is always present.
264
+ }, {
265
+ key: "IDDPrefix",
266
+ value: function() {
267
+ if (!(this.v1 || this.v2))
268
+ return this.metadata[1];
269
+ }
270
+ // Is only present when a country supports multiple IDD prefixes.
271
+ }, {
272
+ key: "defaultIDDPrefix",
273
+ value: function() {
274
+ if (!(this.v1 || this.v2))
275
+ return this.metadata[12];
276
+ }
277
+ }, {
278
+ key: "nationalNumberPattern",
279
+ value: function() {
280
+ return this.v1 || this.v2 ? this.metadata[1] : this.metadata[2];
281
+ }
282
+ // "possible length" data is always present in Google's metadata.
283
+ }, {
284
+ key: "possibleLengths",
285
+ value: function() {
286
+ if (!this.v1)
287
+ return this.metadata[this.v2 ? 2 : 3];
288
+ }
289
+ }, {
290
+ key: "_getFormats",
291
+ value: function(e) {
292
+ return e[this.v1 ? 2 : this.v2 ? 3 : 4];
293
+ }
294
+ // For countries of the same region (e.g. NANPA)
295
+ // formats are all stored in the "main" country for that region.
296
+ // E.g. "RU" and "KZ", "US" and "CA".
297
+ }, {
298
+ key: "formats",
299
+ value: function() {
300
+ var e = this, a = this._getFormats(this.metadata) || this._getFormats(this._getDefaultCountryMetadataForThisCallingCode()) || [];
301
+ return a.map(function(i) {
302
+ return new k(i, e);
303
+ });
304
+ }
305
+ }, {
306
+ key: "nationalPrefix",
307
+ value: function() {
308
+ return this.metadata[this.v1 ? 3 : this.v2 ? 4 : 5];
309
+ }
310
+ }, {
311
+ key: "_getNationalPrefixFormattingRule",
312
+ value: function(e) {
313
+ return e[this.v1 ? 4 : this.v2 ? 5 : 6];
314
+ }
315
+ // For countries of the same region (e.g. NANPA)
316
+ // national prefix formatting rule is stored in the "main" country for that region.
317
+ // E.g. "RU" and "KZ", "US" and "CA".
318
+ }, {
319
+ key: "nationalPrefixFormattingRule",
320
+ value: function() {
321
+ return this._getNationalPrefixFormattingRule(this.metadata) || this._getNationalPrefixFormattingRule(this._getDefaultCountryMetadataForThisCallingCode());
322
+ }
323
+ }, {
324
+ key: "_nationalPrefixForParsing",
325
+ value: function() {
326
+ return this.metadata[this.v1 ? 5 : this.v2 ? 6 : 7];
327
+ }
328
+ }, {
329
+ key: "nationalPrefixForParsing",
330
+ value: function() {
331
+ return this._nationalPrefixForParsing() || this.nationalPrefix();
332
+ }
333
+ }, {
334
+ key: "nationalPrefixTransformRule",
335
+ value: function() {
336
+ return this.metadata[this.v1 ? 6 : this.v2 ? 7 : 8];
337
+ }
338
+ }, {
339
+ key: "_getNationalPrefixIsOptionalWhenFormatting",
340
+ value: function() {
341
+ return !!this.metadata[this.v1 ? 7 : this.v2 ? 8 : 9];
342
+ }
343
+ // For countries of the same region (e.g. NANPA)
344
+ // "national prefix is optional when formatting" flag is
345
+ // stored in the "main" country for that region.
346
+ // E.g. "RU" and "KZ", "US" and "CA".
347
+ }, {
348
+ key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat",
349
+ value: function() {
350
+ return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata) || this._getNationalPrefixIsOptionalWhenFormatting(this._getDefaultCountryMetadataForThisCallingCode());
351
+ }
352
+ }, {
353
+ key: "leadingDigits",
354
+ value: function() {
355
+ return this.metadata[this.v1 ? 8 : this.v2 ? 9 : 10];
356
+ }
357
+ }, {
358
+ key: "types",
359
+ value: function() {
360
+ return this.metadata[this.v1 ? 9 : this.v2 ? 10 : 11];
361
+ }
362
+ }, {
363
+ key: "hasTypes",
364
+ value: function() {
365
+ return this.types() && this.types().length === 0 ? !1 : !!this.types();
366
+ }
367
+ }, {
368
+ key: "type",
369
+ value: function(e) {
370
+ if (this.hasTypes() && y(this.types(), e))
371
+ return new _(y(this.types(), e), this);
372
+ }
373
+ }, {
374
+ key: "ext",
375
+ value: function() {
376
+ return this.v1 || this.v2 ? g : this.metadata[13] || g;
377
+ }
378
+ }]);
379
+ })(), k = /* @__PURE__ */ (function() {
380
+ function n(t, e) {
381
+ u(this, n), this._format = t, this.metadata = e;
382
+ }
383
+ return s(n, [{
384
+ key: "pattern",
385
+ value: function() {
386
+ return this._format[0];
387
+ }
388
+ }, {
389
+ key: "format",
390
+ value: function() {
391
+ return this._format[1];
392
+ }
393
+ }, {
394
+ key: "leadingDigitsPatterns",
395
+ value: function() {
396
+ return this._format[2] || [];
397
+ }
398
+ }, {
399
+ key: "nationalPrefixFormattingRule",
400
+ value: function() {
401
+ return this._format[3] || this.metadata.nationalPrefixFormattingRule();
402
+ }
403
+ }, {
404
+ key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat",
405
+ value: function() {
406
+ return !!this._format[4] || this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat();
407
+ }
408
+ }, {
409
+ key: "nationalPrefixIsMandatoryWhenFormattingInNationalFormat",
410
+ value: function() {
411
+ return this.usesNationalPrefix() && !this.nationalPrefixIsOptionalWhenFormattingInNationalFormat();
412
+ }
413
+ // Checks whether national prefix formatting rule contains national prefix.
414
+ }, {
415
+ key: "usesNationalPrefix",
416
+ value: function() {
417
+ return !!(this.nationalPrefixFormattingRule() && // Check that national prefix formatting rule is not a "dummy" one.
418
+ !x.test(this.nationalPrefixFormattingRule()));
419
+ }
420
+ }, {
421
+ key: "internationalFormat",
422
+ value: function() {
423
+ return this._format[5] || this.format();
424
+ }
425
+ }]);
426
+ })(), x = /^\(?\$1\)?$/, _ = /* @__PURE__ */ (function() {
427
+ function n(t, e) {
428
+ u(this, n), this.type = t, this.metadata = e;
429
+ }
430
+ return s(n, [{
431
+ key: "pattern",
432
+ value: function() {
433
+ return this.metadata.v1 ? this.type : this.type[0];
434
+ }
435
+ }, {
436
+ key: "possibleLengths",
437
+ value: function() {
438
+ if (!this.metadata.v1)
439
+ return this.type[1] || this.metadata.possibleLengths();
440
+ }
441
+ }]);
442
+ })();
443
+ function y(n, t) {
444
+ switch (t) {
445
+ case "FIXED_LINE":
446
+ return n[0];
447
+ case "MOBILE":
448
+ return n[1];
449
+ case "TOLL_FREE":
450
+ return n[2];
451
+ case "PREMIUM_RATE":
452
+ return n[3];
453
+ case "PERSONAL_NUMBER":
454
+ return n[4];
455
+ case "VOICEMAIL":
456
+ return n[5];
457
+ case "UAN":
458
+ return n[6];
459
+ case "PAGER":
460
+ return n[7];
461
+ case "VOIP":
462
+ return n[8];
463
+ case "SHARED_COST":
464
+ return n[9];
465
+ }
466
+ }
467
+ function N(n) {
468
+ if (!n)
469
+ throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");
470
+ if (!l(n) || !l(n.countries))
471
+ throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(l(n) ? "an object of shape: { " + Object.keys(n).join(", ") + " }" : "a " + I(n) + ": " + n, "."));
472
+ }
473
+ var I = function(t) {
474
+ return o(t);
475
+ };
476
+ function M(n, t) {
477
+ var e = new F(t);
478
+ if (e.hasCountry(n))
479
+ return e.selectNumberingPlan(n).countryCallingCode();
480
+ throw new Error("Unknown country: ".concat(n));
481
+ }
482
+ function m(n) {
483
+ var t = n.version;
484
+ typeof t == "number" ? (this.v1 = t === 1, this.v2 = t === 2, this.v3 = t === 3, this.v4 = t === 4) : t ? h(t, p) === -1 ? this.v2 = !0 : h(t, b) === -1 ? this.v3 = !0 : this.v4 = !0 : this.v1 = !0;
279
485
  }
280
486
  export {
281
- Lt as FloatingFocusManager
487
+ F as default,
488
+ M as getCountryCallingCode,
489
+ N as validateMetadata
282
490
  };
283
491
  //# sourceMappingURL=index163.js.map