@selvajs/selva 2.0.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 (769) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +9 -0
  3. package/build/client/_app/immutable/assets/0.B0phAlf7.css +1 -0
  4. package/build/client/_app/immutable/assets/0.B0phAlf7.css.br +0 -0
  5. package/build/client/_app/immutable/assets/0.B0phAlf7.css.gz +0 -0
  6. package/build/client/_app/immutable/assets/20.DzF5JyuX.css +1 -0
  7. package/build/client/_app/immutable/assets/20.DzF5JyuX.css.br +0 -0
  8. package/build/client/_app/immutable/assets/20.DzF5JyuX.css.gz +0 -0
  9. package/build/client/_app/immutable/assets/index.CV-KWLNP.css +1 -0
  10. package/build/client/_app/immutable/assets/index.CV-KWLNP.css.br +1 -0
  11. package/build/client/_app/immutable/assets/index.CV-KWLNP.css.gz +0 -0
  12. package/build/client/_app/immutable/chunks/1s2jTHrf.js +1 -0
  13. package/build/client/_app/immutable/chunks/1s2jTHrf.js.br +0 -0
  14. package/build/client/_app/immutable/chunks/1s2jTHrf.js.gz +0 -0
  15. package/build/client/_app/immutable/chunks/2XlIPTRw.js +1 -0
  16. package/build/client/_app/immutable/chunks/2XlIPTRw.js.br +1 -0
  17. package/build/client/_app/immutable/chunks/2XlIPTRw.js.gz +0 -0
  18. package/build/client/_app/immutable/chunks/2_FEXmq1.js +9 -0
  19. package/build/client/_app/immutable/chunks/2_FEXmq1.js.br +0 -0
  20. package/build/client/_app/immutable/chunks/2_FEXmq1.js.gz +0 -0
  21. package/build/client/_app/immutable/chunks/2dX6Wjni.js +1 -0
  22. package/build/client/_app/immutable/chunks/2dX6Wjni.js.br +0 -0
  23. package/build/client/_app/immutable/chunks/2dX6Wjni.js.gz +0 -0
  24. package/build/client/_app/immutable/chunks/4tskcAVN.js +1 -0
  25. package/build/client/_app/immutable/chunks/4tskcAVN.js.br +0 -0
  26. package/build/client/_app/immutable/chunks/4tskcAVN.js.gz +0 -0
  27. package/build/client/_app/immutable/chunks/4y4xLOS_.js +1 -0
  28. package/build/client/_app/immutable/chunks/4y4xLOS_.js.br +0 -0
  29. package/build/client/_app/immutable/chunks/4y4xLOS_.js.gz +0 -0
  30. package/build/client/_app/immutable/chunks/AEyooZaf.js +1 -0
  31. package/build/client/_app/immutable/chunks/AEyooZaf.js.br +0 -0
  32. package/build/client/_app/immutable/chunks/AEyooZaf.js.gz +0 -0
  33. package/build/client/_app/immutable/chunks/B1aRL9Hz.js +1 -0
  34. package/build/client/_app/immutable/chunks/B1aRL9Hz.js.br +0 -0
  35. package/build/client/_app/immutable/chunks/B1aRL9Hz.js.gz +0 -0
  36. package/build/client/_app/immutable/chunks/B8uG8z2c.js +1 -0
  37. package/build/client/_app/immutable/chunks/B8uG8z2c.js.br +0 -0
  38. package/build/client/_app/immutable/chunks/B8uG8z2c.js.gz +0 -0
  39. package/build/client/_app/immutable/chunks/B8zY50Bc.js +1 -0
  40. package/build/client/_app/immutable/chunks/B8zY50Bc.js.br +5 -0
  41. package/build/client/_app/immutable/chunks/B8zY50Bc.js.gz +0 -0
  42. package/build/client/_app/immutable/chunks/BCse3N0b.js +1 -0
  43. package/build/client/_app/immutable/chunks/BCse3N0b.js.br +0 -0
  44. package/build/client/_app/immutable/chunks/BCse3N0b.js.gz +0 -0
  45. package/build/client/_app/immutable/chunks/BFXFuY-o.js +3 -0
  46. package/build/client/_app/immutable/chunks/BFXFuY-o.js.br +0 -0
  47. package/build/client/_app/immutable/chunks/BFXFuY-o.js.gz +0 -0
  48. package/build/client/_app/immutable/chunks/BGxzXVpM.js +1 -0
  49. package/build/client/_app/immutable/chunks/BGxzXVpM.js.br +0 -0
  50. package/build/client/_app/immutable/chunks/BGxzXVpM.js.gz +0 -0
  51. package/build/client/_app/immutable/chunks/BM4_iXSA.js +1 -0
  52. package/build/client/_app/immutable/chunks/BM4_iXSA.js.br +0 -0
  53. package/build/client/_app/immutable/chunks/BM4_iXSA.js.gz +0 -0
  54. package/build/client/_app/immutable/chunks/BMGykAfL.js +2 -0
  55. package/build/client/_app/immutable/chunks/BMGykAfL.js.br +0 -0
  56. package/build/client/_app/immutable/chunks/BMGykAfL.js.gz +0 -0
  57. package/build/client/_app/immutable/chunks/BNScKugQ.js +1 -0
  58. package/build/client/_app/immutable/chunks/BNScKugQ.js.br +0 -0
  59. package/build/client/_app/immutable/chunks/BNScKugQ.js.gz +0 -0
  60. package/build/client/_app/immutable/chunks/BNzEBMy8.js +1 -0
  61. package/build/client/_app/immutable/chunks/BNzEBMy8.js.br +0 -0
  62. package/build/client/_app/immutable/chunks/BNzEBMy8.js.gz +0 -0
  63. package/build/client/_app/immutable/chunks/BU9URCkw.js +1 -0
  64. package/build/client/_app/immutable/chunks/BU9URCkw.js.br +0 -0
  65. package/build/client/_app/immutable/chunks/BU9URCkw.js.gz +0 -0
  66. package/build/client/_app/immutable/chunks/BW4xleRz.js +1 -0
  67. package/build/client/_app/immutable/chunks/BW4xleRz.js.br +0 -0
  68. package/build/client/_app/immutable/chunks/BW4xleRz.js.gz +0 -0
  69. package/build/client/_app/immutable/chunks/BZmrLQwT.js +1 -0
  70. package/build/client/_app/immutable/chunks/BZmrLQwT.js.br +0 -0
  71. package/build/client/_app/immutable/chunks/BZmrLQwT.js.gz +0 -0
  72. package/build/client/_app/immutable/chunks/B_Lmgh7q.js +1 -0
  73. package/build/client/_app/immutable/chunks/B_Lmgh7q.js.br +0 -0
  74. package/build/client/_app/immutable/chunks/B_Lmgh7q.js.gz +0 -0
  75. package/build/client/_app/immutable/chunks/BapAUJpM.js +1 -0
  76. package/build/client/_app/immutable/chunks/BapAUJpM.js.br +0 -0
  77. package/build/client/_app/immutable/chunks/BapAUJpM.js.gz +0 -0
  78. package/build/client/_app/immutable/chunks/Bb9xebuT.js +1 -0
  79. package/build/client/_app/immutable/chunks/Bb9xebuT.js.br +0 -0
  80. package/build/client/_app/immutable/chunks/Bb9xebuT.js.gz +0 -0
  81. package/build/client/_app/immutable/chunks/BjkQG7dw.js +1 -0
  82. package/build/client/_app/immutable/chunks/BjkQG7dw.js.br +0 -0
  83. package/build/client/_app/immutable/chunks/BjkQG7dw.js.gz +0 -0
  84. package/build/client/_app/immutable/chunks/Bmz9gLBz.js +1 -0
  85. package/build/client/_app/immutable/chunks/Bmz9gLBz.js.br +0 -0
  86. package/build/client/_app/immutable/chunks/Bmz9gLBz.js.gz +0 -0
  87. package/build/client/_app/immutable/chunks/Bnpwcepm.js +1 -0
  88. package/build/client/_app/immutable/chunks/Bnpwcepm.js.br +0 -0
  89. package/build/client/_app/immutable/chunks/Bnpwcepm.js.gz +0 -0
  90. package/build/client/_app/immutable/chunks/BoR6OKl6.js +1 -0
  91. package/build/client/_app/immutable/chunks/BoR6OKl6.js.br +0 -0
  92. package/build/client/_app/immutable/chunks/BoR6OKl6.js.gz +0 -0
  93. package/build/client/_app/immutable/chunks/Br5bpmJC.js +1 -0
  94. package/build/client/_app/immutable/chunks/Br5bpmJC.js.br +0 -0
  95. package/build/client/_app/immutable/chunks/Br5bpmJC.js.gz +0 -0
  96. package/build/client/_app/immutable/chunks/BxCHY0iG.js +1 -0
  97. package/build/client/_app/immutable/chunks/BxCHY0iG.js.br +0 -0
  98. package/build/client/_app/immutable/chunks/BxCHY0iG.js.gz +0 -0
  99. package/build/client/_app/immutable/chunks/C1Sz0rtw.js +1 -0
  100. package/build/client/_app/immutable/chunks/C1Sz0rtw.js.br +0 -0
  101. package/build/client/_app/immutable/chunks/C1Sz0rtw.js.gz +0 -0
  102. package/build/client/_app/immutable/chunks/C1aQuqo_.js +2 -0
  103. package/build/client/_app/immutable/chunks/C1aQuqo_.js.br +0 -0
  104. package/build/client/_app/immutable/chunks/C1aQuqo_.js.gz +0 -0
  105. package/build/client/_app/immutable/chunks/C26nmevH.js +1 -0
  106. package/build/client/_app/immutable/chunks/C26nmevH.js.br +0 -0
  107. package/build/client/_app/immutable/chunks/C26nmevH.js.gz +0 -0
  108. package/build/client/_app/immutable/chunks/C8ko2SLk.js +1 -0
  109. package/build/client/_app/immutable/chunks/C8ko2SLk.js.br +0 -0
  110. package/build/client/_app/immutable/chunks/C8ko2SLk.js.gz +0 -0
  111. package/build/client/_app/immutable/chunks/CAMhfNhW.js +1 -0
  112. package/build/client/_app/immutable/chunks/CAMhfNhW.js.br +0 -0
  113. package/build/client/_app/immutable/chunks/CAMhfNhW.js.gz +0 -0
  114. package/build/client/_app/immutable/chunks/CEnIp_6Y.js +1 -0
  115. package/build/client/_app/immutable/chunks/CEnIp_6Y.js.br +3 -0
  116. package/build/client/_app/immutable/chunks/CEnIp_6Y.js.gz +0 -0
  117. package/build/client/_app/immutable/chunks/CMjc_m7Z.js +1 -0
  118. package/build/client/_app/immutable/chunks/CMjc_m7Z.js.br +0 -0
  119. package/build/client/_app/immutable/chunks/CMjc_m7Z.js.gz +0 -0
  120. package/build/client/_app/immutable/chunks/CRRzXoPz.js +5 -0
  121. package/build/client/_app/immutable/chunks/CRRzXoPz.js.br +0 -0
  122. package/build/client/_app/immutable/chunks/CRRzXoPz.js.gz +0 -0
  123. package/build/client/_app/immutable/chunks/CXh1ITwj.js +1 -0
  124. package/build/client/_app/immutable/chunks/CXh1ITwj.js.br +0 -0
  125. package/build/client/_app/immutable/chunks/CXh1ITwj.js.gz +0 -0
  126. package/build/client/_app/immutable/chunks/CZ1oTCKP.js +1 -0
  127. package/build/client/_app/immutable/chunks/CZ1oTCKP.js.br +0 -0
  128. package/build/client/_app/immutable/chunks/CZ1oTCKP.js.gz +0 -0
  129. package/build/client/_app/immutable/chunks/Cbu9Tg11.js +1 -0
  130. package/build/client/_app/immutable/chunks/Cbu9Tg11.js.br +0 -0
  131. package/build/client/_app/immutable/chunks/Cbu9Tg11.js.gz +0 -0
  132. package/build/client/_app/immutable/chunks/CcYNc8-G.js +1 -0
  133. package/build/client/_app/immutable/chunks/CcYNc8-G.js.br +0 -0
  134. package/build/client/_app/immutable/chunks/CcYNc8-G.js.gz +0 -0
  135. package/build/client/_app/immutable/chunks/Cdcajer6.js +1 -0
  136. package/build/client/_app/immutable/chunks/Cdcajer6.js.br +0 -0
  137. package/build/client/_app/immutable/chunks/Cdcajer6.js.gz +0 -0
  138. package/build/client/_app/immutable/chunks/Ce2MupFq.js +1 -0
  139. package/build/client/_app/immutable/chunks/Ce2MupFq.js.br +0 -0
  140. package/build/client/_app/immutable/chunks/Ce2MupFq.js.gz +0 -0
  141. package/build/client/_app/immutable/chunks/CfP1DoGT.js +1 -0
  142. package/build/client/_app/immutable/chunks/CfP1DoGT.js.br +0 -0
  143. package/build/client/_app/immutable/chunks/CfP1DoGT.js.gz +0 -0
  144. package/build/client/_app/immutable/chunks/CfhPDo21.js +1 -0
  145. package/build/client/_app/immutable/chunks/CfhPDo21.js.br +1 -0
  146. package/build/client/_app/immutable/chunks/CfhPDo21.js.gz +0 -0
  147. package/build/client/_app/immutable/chunks/ChSMnQMB.js +2 -0
  148. package/build/client/_app/immutable/chunks/ChSMnQMB.js.br +0 -0
  149. package/build/client/_app/immutable/chunks/ChSMnQMB.js.gz +0 -0
  150. package/build/client/_app/immutable/chunks/CkW8YtSm.js +1 -0
  151. package/build/client/_app/immutable/chunks/CkW8YtSm.js.br +0 -0
  152. package/build/client/_app/immutable/chunks/CkW8YtSm.js.gz +0 -0
  153. package/build/client/_app/immutable/chunks/CoR7xVWs.js +1 -0
  154. package/build/client/_app/immutable/chunks/CoR7xVWs.js.br +0 -0
  155. package/build/client/_app/immutable/chunks/CoR7xVWs.js.gz +0 -0
  156. package/build/client/_app/immutable/chunks/CpGv0MSX.js +1 -0
  157. package/build/client/_app/immutable/chunks/CpGv0MSX.js.br +0 -0
  158. package/build/client/_app/immutable/chunks/CpGv0MSX.js.gz +0 -0
  159. package/build/client/_app/immutable/chunks/Cvr8AlQE.js +1 -0
  160. package/build/client/_app/immutable/chunks/Cvr8AlQE.js.br +0 -0
  161. package/build/client/_app/immutable/chunks/Cvr8AlQE.js.gz +0 -0
  162. package/build/client/_app/immutable/chunks/D0QMYypb.js +1 -0
  163. package/build/client/_app/immutable/chunks/D0QMYypb.js.br +0 -0
  164. package/build/client/_app/immutable/chunks/D0QMYypb.js.gz +0 -0
  165. package/build/client/_app/immutable/chunks/D40b34QZ.js +1 -0
  166. package/build/client/_app/immutable/chunks/D40b34QZ.js.br +0 -0
  167. package/build/client/_app/immutable/chunks/D40b34QZ.js.gz +0 -0
  168. package/build/client/_app/immutable/chunks/D6MI_dhi.js +1 -0
  169. package/build/client/_app/immutable/chunks/D6MI_dhi.js.br +0 -0
  170. package/build/client/_app/immutable/chunks/D6MI_dhi.js.gz +0 -0
  171. package/build/client/_app/immutable/chunks/D7PHp8xb.js +1 -0
  172. package/build/client/_app/immutable/chunks/D7PHp8xb.js.br +0 -0
  173. package/build/client/_app/immutable/chunks/D7PHp8xb.js.gz +0 -0
  174. package/build/client/_app/immutable/chunks/D7l1JayF.js +1 -0
  175. package/build/client/_app/immutable/chunks/D7l1JayF.js.br +0 -0
  176. package/build/client/_app/immutable/chunks/D7l1JayF.js.gz +0 -0
  177. package/build/client/_app/immutable/chunks/D99uXqZb.js +1 -0
  178. package/build/client/_app/immutable/chunks/D99uXqZb.js.br +0 -0
  179. package/build/client/_app/immutable/chunks/D99uXqZb.js.gz +0 -0
  180. package/build/client/_app/immutable/chunks/DEBBEmC0.js +1 -0
  181. package/build/client/_app/immutable/chunks/DEBBEmC0.js.br +0 -0
  182. package/build/client/_app/immutable/chunks/DEBBEmC0.js.gz +0 -0
  183. package/build/client/_app/immutable/chunks/DHWrMZkd.js +1 -0
  184. package/build/client/_app/immutable/chunks/DHWrMZkd.js.br +0 -0
  185. package/build/client/_app/immutable/chunks/DHWrMZkd.js.gz +0 -0
  186. package/build/client/_app/immutable/chunks/DNsLImlA.js +64 -0
  187. package/build/client/_app/immutable/chunks/DNsLImlA.js.br +0 -0
  188. package/build/client/_app/immutable/chunks/DNsLImlA.js.gz +0 -0
  189. package/build/client/_app/immutable/chunks/DRDjLZb3.js +1 -0
  190. package/build/client/_app/immutable/chunks/DRDjLZb3.js.br +3 -0
  191. package/build/client/_app/immutable/chunks/DRDjLZb3.js.gz +0 -0
  192. package/build/client/_app/immutable/chunks/DTJeGfAL.js +1 -0
  193. package/build/client/_app/immutable/chunks/DTJeGfAL.js.br +0 -0
  194. package/build/client/_app/immutable/chunks/DTJeGfAL.js.gz +0 -0
  195. package/build/client/_app/immutable/chunks/DZFqETAQ.js +1 -0
  196. package/build/client/_app/immutable/chunks/DZFqETAQ.js.br +0 -0
  197. package/build/client/_app/immutable/chunks/DZFqETAQ.js.gz +0 -0
  198. package/build/client/_app/immutable/chunks/D_wr-JLf.js +1 -0
  199. package/build/client/_app/immutable/chunks/D_wr-JLf.js.br +0 -0
  200. package/build/client/_app/immutable/chunks/D_wr-JLf.js.gz +0 -0
  201. package/build/client/_app/immutable/chunks/DdaJZmuM.js +1 -0
  202. package/build/client/_app/immutable/chunks/DdaJZmuM.js.br +0 -0
  203. package/build/client/_app/immutable/chunks/DdaJZmuM.js.gz +0 -0
  204. package/build/client/_app/immutable/chunks/Dl4WTuMB.js +1 -0
  205. package/build/client/_app/immutable/chunks/Dl4WTuMB.js.br +0 -0
  206. package/build/client/_app/immutable/chunks/Dl4WTuMB.js.gz +0 -0
  207. package/build/client/_app/immutable/chunks/Doks8ISn.js +1 -0
  208. package/build/client/_app/immutable/chunks/Doks8ISn.js.br +0 -0
  209. package/build/client/_app/immutable/chunks/Doks8ISn.js.gz +0 -0
  210. package/build/client/_app/immutable/chunks/DsnmJJEf.js +1 -0
  211. package/build/client/_app/immutable/chunks/DsnmJJEf.js.br +2 -0
  212. package/build/client/_app/immutable/chunks/DsnmJJEf.js.gz +0 -0
  213. package/build/client/_app/immutable/chunks/E3yOQTT0.js +1 -0
  214. package/build/client/_app/immutable/chunks/E3yOQTT0.js.br +0 -0
  215. package/build/client/_app/immutable/chunks/E3yOQTT0.js.gz +0 -0
  216. package/build/client/_app/immutable/chunks/Gxlzmh6y.js +1 -0
  217. package/build/client/_app/immutable/chunks/Gxlzmh6y.js.br +0 -0
  218. package/build/client/_app/immutable/chunks/Gxlzmh6y.js.gz +0 -0
  219. package/build/client/_app/immutable/chunks/Ib-7xmHT.js +1 -0
  220. package/build/client/_app/immutable/chunks/Ib-7xmHT.js.br +0 -0
  221. package/build/client/_app/immutable/chunks/Ib-7xmHT.js.gz +0 -0
  222. package/build/client/_app/immutable/chunks/P4Np3c9O.js +1 -0
  223. package/build/client/_app/immutable/chunks/P4Np3c9O.js.br +0 -0
  224. package/build/client/_app/immutable/chunks/P4Np3c9O.js.gz +0 -0
  225. package/build/client/_app/immutable/chunks/Zf7VV5ZB.js +1 -0
  226. package/build/client/_app/immutable/chunks/Zf7VV5ZB.js.br +0 -0
  227. package/build/client/_app/immutable/chunks/Zf7VV5ZB.js.gz +0 -0
  228. package/build/client/_app/immutable/chunks/_OLpdTiI.js +1 -0
  229. package/build/client/_app/immutable/chunks/_OLpdTiI.js.br +0 -0
  230. package/build/client/_app/immutable/chunks/_OLpdTiI.js.gz +0 -0
  231. package/build/client/_app/immutable/chunks/azBeeLR0.js +1 -0
  232. package/build/client/_app/immutable/chunks/azBeeLR0.js.br +0 -0
  233. package/build/client/_app/immutable/chunks/azBeeLR0.js.gz +0 -0
  234. package/build/client/_app/immutable/chunks/gMllmzma.js +1 -0
  235. package/build/client/_app/immutable/chunks/gMllmzma.js.br +0 -0
  236. package/build/client/_app/immutable/chunks/gMllmzma.js.gz +0 -0
  237. package/build/client/_app/immutable/chunks/hRoV10UM.js +1 -0
  238. package/build/client/_app/immutable/chunks/hRoV10UM.js.br +0 -0
  239. package/build/client/_app/immutable/chunks/hRoV10UM.js.gz +0 -0
  240. package/build/client/_app/immutable/chunks/iEBlyxZv.js +1 -0
  241. package/build/client/_app/immutable/chunks/iEBlyxZv.js.br +0 -0
  242. package/build/client/_app/immutable/chunks/iEBlyxZv.js.gz +0 -0
  243. package/build/client/_app/immutable/chunks/jFKgkeON.js +1 -0
  244. package/build/client/_app/immutable/chunks/jFKgkeON.js.br +0 -0
  245. package/build/client/_app/immutable/chunks/jFKgkeON.js.gz +0 -0
  246. package/build/client/_app/immutable/chunks/ooPBmYPj.js +1 -0
  247. package/build/client/_app/immutable/chunks/ooPBmYPj.js.br +0 -0
  248. package/build/client/_app/immutable/chunks/ooPBmYPj.js.gz +0 -0
  249. package/build/client/_app/immutable/chunks/pRg-f8xU.js +1 -0
  250. package/build/client/_app/immutable/chunks/pRg-f8xU.js.br +0 -0
  251. package/build/client/_app/immutable/chunks/pRg-f8xU.js.gz +0 -0
  252. package/build/client/_app/immutable/chunks/uINs3xv3.js +1 -0
  253. package/build/client/_app/immutable/chunks/uINs3xv3.js.br +0 -0
  254. package/build/client/_app/immutable/chunks/uINs3xv3.js.gz +0 -0
  255. package/build/client/_app/immutable/chunks/wamM80bu.js +1 -0
  256. package/build/client/_app/immutable/chunks/wamM80bu.js.br +0 -0
  257. package/build/client/_app/immutable/chunks/wamM80bu.js.gz +0 -0
  258. package/build/client/_app/immutable/entry/app.CY1cyDxx.js +2 -0
  259. package/build/client/_app/immutable/entry/app.CY1cyDxx.js.br +0 -0
  260. package/build/client/_app/immutable/entry/app.CY1cyDxx.js.gz +0 -0
  261. package/build/client/_app/immutable/entry/start.ByTVZFMZ.js +1 -0
  262. package/build/client/_app/immutable/entry/start.ByTVZFMZ.js.br +2 -0
  263. package/build/client/_app/immutable/entry/start.ByTVZFMZ.js.gz +0 -0
  264. package/build/client/_app/immutable/nodes/0.CQbbSrko.js +1 -0
  265. package/build/client/_app/immutable/nodes/0.CQbbSrko.js.br +0 -0
  266. package/build/client/_app/immutable/nodes/0.CQbbSrko.js.gz +0 -0
  267. package/build/client/_app/immutable/nodes/1.WcE6FOcF.js +1 -0
  268. package/build/client/_app/immutable/nodes/1.WcE6FOcF.js.br +0 -0
  269. package/build/client/_app/immutable/nodes/1.WcE6FOcF.js.gz +0 -0
  270. package/build/client/_app/immutable/nodes/10.Bl4yPogx.js +3 -0
  271. package/build/client/_app/immutable/nodes/10.Bl4yPogx.js.br +0 -0
  272. package/build/client/_app/immutable/nodes/10.Bl4yPogx.js.gz +0 -0
  273. package/build/client/_app/immutable/nodes/11.kVvSmSNV.js +2 -0
  274. package/build/client/_app/immutable/nodes/11.kVvSmSNV.js.br +0 -0
  275. package/build/client/_app/immutable/nodes/11.kVvSmSNV.js.gz +0 -0
  276. package/build/client/_app/immutable/nodes/12.BoPfAFdi.js +1 -0
  277. package/build/client/_app/immutable/nodes/12.BoPfAFdi.js.br +0 -0
  278. package/build/client/_app/immutable/nodes/12.BoPfAFdi.js.gz +0 -0
  279. package/build/client/_app/immutable/nodes/13.JyGUEsdb.js +2 -0
  280. package/build/client/_app/immutable/nodes/13.JyGUEsdb.js.br +0 -0
  281. package/build/client/_app/immutable/nodes/13.JyGUEsdb.js.gz +0 -0
  282. package/build/client/_app/immutable/nodes/14.BbJglRXt.js +2 -0
  283. package/build/client/_app/immutable/nodes/14.BbJglRXt.js.br +0 -0
  284. package/build/client/_app/immutable/nodes/14.BbJglRXt.js.gz +0 -0
  285. package/build/client/_app/immutable/nodes/15.94-Zje0s.js +13 -0
  286. package/build/client/_app/immutable/nodes/15.94-Zje0s.js.br +0 -0
  287. package/build/client/_app/immutable/nodes/15.94-Zje0s.js.gz +0 -0
  288. package/build/client/_app/immutable/nodes/16.DRADdurD.js +6 -0
  289. package/build/client/_app/immutable/nodes/16.DRADdurD.js.br +0 -0
  290. package/build/client/_app/immutable/nodes/16.DRADdurD.js.gz +0 -0
  291. package/build/client/_app/immutable/nodes/17.DOsqdwdd.js +2 -0
  292. package/build/client/_app/immutable/nodes/17.DOsqdwdd.js.br +0 -0
  293. package/build/client/_app/immutable/nodes/17.DOsqdwdd.js.gz +0 -0
  294. package/build/client/_app/immutable/nodes/18.BpVlwZ30.js +1 -0
  295. package/build/client/_app/immutable/nodes/18.BpVlwZ30.js.br +0 -0
  296. package/build/client/_app/immutable/nodes/18.BpVlwZ30.js.gz +0 -0
  297. package/build/client/_app/immutable/nodes/19.S2J54AdY.js +2 -0
  298. package/build/client/_app/immutable/nodes/19.S2J54AdY.js.br +0 -0
  299. package/build/client/_app/immutable/nodes/19.S2J54AdY.js.gz +0 -0
  300. package/build/client/_app/immutable/nodes/2.CKVtP2Ky.js +1 -0
  301. package/build/client/_app/immutable/nodes/2.CKVtP2Ky.js.br +0 -0
  302. package/build/client/_app/immutable/nodes/2.CKVtP2Ky.js.gz +0 -0
  303. package/build/client/_app/immutable/nodes/20.BCasu2g4.js +4116 -0
  304. package/build/client/_app/immutable/nodes/20.BCasu2g4.js.br +0 -0
  305. package/build/client/_app/immutable/nodes/20.BCasu2g4.js.gz +0 -0
  306. package/build/client/_app/immutable/nodes/21.C1aTaoAB.js +3 -0
  307. package/build/client/_app/immutable/nodes/21.C1aTaoAB.js.br +0 -0
  308. package/build/client/_app/immutable/nodes/21.C1aTaoAB.js.gz +0 -0
  309. package/build/client/_app/immutable/nodes/23.DP5Be3HR.js +16 -0
  310. package/build/client/_app/immutable/nodes/23.DP5Be3HR.js.br +0 -0
  311. package/build/client/_app/immutable/nodes/23.DP5Be3HR.js.gz +0 -0
  312. package/build/client/_app/immutable/nodes/24.BB6fXxnh.js +6 -0
  313. package/build/client/_app/immutable/nodes/24.BB6fXxnh.js.br +0 -0
  314. package/build/client/_app/immutable/nodes/24.BB6fXxnh.js.gz +0 -0
  315. package/build/client/_app/immutable/nodes/25.oeBaWIUn.js +1 -0
  316. package/build/client/_app/immutable/nodes/25.oeBaWIUn.js.br +0 -0
  317. package/build/client/_app/immutable/nodes/25.oeBaWIUn.js.gz +0 -0
  318. package/build/client/_app/immutable/nodes/26.lPx5SjN1.js +3 -0
  319. package/build/client/_app/immutable/nodes/26.lPx5SjN1.js.br +0 -0
  320. package/build/client/_app/immutable/nodes/26.lPx5SjN1.js.gz +0 -0
  321. package/build/client/_app/immutable/nodes/27.DB7PVQXo.js +4 -0
  322. package/build/client/_app/immutable/nodes/27.DB7PVQXo.js.br +0 -0
  323. package/build/client/_app/immutable/nodes/27.DB7PVQXo.js.gz +0 -0
  324. package/build/client/_app/immutable/nodes/28.Cf2R7A3f.js +4 -0
  325. package/build/client/_app/immutable/nodes/28.Cf2R7A3f.js.br +0 -0
  326. package/build/client/_app/immutable/nodes/28.Cf2R7A3f.js.gz +0 -0
  327. package/build/client/_app/immutable/nodes/29.CyJS5sye.js +2 -0
  328. package/build/client/_app/immutable/nodes/29.CyJS5sye.js.br +0 -0
  329. package/build/client/_app/immutable/nodes/29.CyJS5sye.js.gz +0 -0
  330. package/build/client/_app/immutable/nodes/3.DWyky0UV.js +1 -0
  331. package/build/client/_app/immutable/nodes/3.DWyky0UV.js.br +0 -0
  332. package/build/client/_app/immutable/nodes/3.DWyky0UV.js.gz +0 -0
  333. package/build/client/_app/immutable/nodes/30.BFpYKBJh.js +2 -0
  334. package/build/client/_app/immutable/nodes/30.BFpYKBJh.js.br +0 -0
  335. package/build/client/_app/immutable/nodes/30.BFpYKBJh.js.gz +0 -0
  336. package/build/client/_app/immutable/nodes/31.DKnO7o1W.js +2 -0
  337. package/build/client/_app/immutable/nodes/31.DKnO7o1W.js.br +0 -0
  338. package/build/client/_app/immutable/nodes/31.DKnO7o1W.js.gz +0 -0
  339. package/build/client/_app/immutable/nodes/32.D4xYDWvG.js +3 -0
  340. package/build/client/_app/immutable/nodes/32.D4xYDWvG.js.br +0 -0
  341. package/build/client/_app/immutable/nodes/32.D4xYDWvG.js.gz +0 -0
  342. package/build/client/_app/immutable/nodes/4.0a-qdY5B.js +1 -0
  343. package/build/client/_app/immutable/nodes/4.0a-qdY5B.js.br +0 -0
  344. package/build/client/_app/immutable/nodes/4.0a-qdY5B.js.gz +0 -0
  345. package/build/client/_app/immutable/nodes/5.BzQBSRbS.js +1 -0
  346. package/build/client/_app/immutable/nodes/5.BzQBSRbS.js.br +0 -0
  347. package/build/client/_app/immutable/nodes/5.BzQBSRbS.js.gz +0 -0
  348. package/build/client/_app/immutable/nodes/6.gJ2nhxWc.js +1 -0
  349. package/build/client/_app/immutable/nodes/6.gJ2nhxWc.js.br +0 -0
  350. package/build/client/_app/immutable/nodes/6.gJ2nhxWc.js.gz +0 -0
  351. package/build/client/_app/immutable/nodes/7.tBTDolnc.js +1 -0
  352. package/build/client/_app/immutable/nodes/7.tBTDolnc.js.br +0 -0
  353. package/build/client/_app/immutable/nodes/7.tBTDolnc.js.gz +0 -0
  354. package/build/client/_app/immutable/nodes/8.BJK9n85D.js +2 -0
  355. package/build/client/_app/immutable/nodes/8.BJK9n85D.js.br +0 -0
  356. package/build/client/_app/immutable/nodes/8.BJK9n85D.js.gz +0 -0
  357. package/build/client/_app/immutable/nodes/9.un0j6nRP.js +1 -0
  358. package/build/client/_app/immutable/nodes/9.un0j6nRP.js.br +0 -0
  359. package/build/client/_app/immutable/nodes/9.un0j6nRP.js.gz +0 -0
  360. package/build/client/_app/version.json +1 -0
  361. package/build/client/_app/version.json.br +1 -0
  362. package/build/client/_app/version.json.gz +0 -0
  363. package/build/client/baseHDR.hdr +0 -0
  364. package/build/client/favicon/apple-touch-icon.png +0 -0
  365. package/build/client/favicon/favicon-96x96.png +0 -0
  366. package/build/client/favicon/favicon.ico +0 -0
  367. package/build/client/favicon/favicon.svg +1 -0
  368. package/build/client/favicon/favicon.svg.br +0 -0
  369. package/build/client/favicon/favicon.svg.gz +0 -0
  370. package/build/client/favicon/site.webmanifest +21 -0
  371. package/build/client/favicon/web-app-manifest-192x192.png +0 -0
  372. package/build/client/favicon/web-app-manifest-512x512.png +0 -0
  373. package/build/client/robots.txt +3 -0
  374. package/build/client/robots.txt.br +0 -0
  375. package/build/client/robots.txt.gz +0 -0
  376. package/build/env.js +94 -0
  377. package/build/handler.js +1494 -0
  378. package/build/index.js +345 -0
  379. package/build/server/chunks/0-BRU03dEw.js +55 -0
  380. package/build/server/chunks/0-BRU03dEw.js.map +1 -0
  381. package/build/server/chunks/1-m_oCIIXD.js +9 -0
  382. package/build/server/chunks/1-m_oCIIXD.js.map +1 -0
  383. package/build/server/chunks/10-J_ZMrbXX.js +220 -0
  384. package/build/server/chunks/10-J_ZMrbXX.js.map +1 -0
  385. package/build/server/chunks/11-Dz77N9MO.js +57 -0
  386. package/build/server/chunks/11-Dz77N9MO.js.map +1 -0
  387. package/build/server/chunks/12-CrOqT0Q5.js +52 -0
  388. package/build/server/chunks/12-CrOqT0Q5.js.map +1 -0
  389. package/build/server/chunks/13-DQGOyx8W.js +56 -0
  390. package/build/server/chunks/13-DQGOyx8W.js.map +1 -0
  391. package/build/server/chunks/14-Dl5jyPyO.js +99 -0
  392. package/build/server/chunks/14-Dl5jyPyO.js.map +1 -0
  393. package/build/server/chunks/15-CNzxJkd-.js +38 -0
  394. package/build/server/chunks/15-CNzxJkd-.js.map +1 -0
  395. package/build/server/chunks/16-5ZcnQNjK.js +83 -0
  396. package/build/server/chunks/16-5ZcnQNjK.js.map +1 -0
  397. package/build/server/chunks/17-C4Zpziyd.js +9 -0
  398. package/build/server/chunks/17-C4Zpziyd.js.map +1 -0
  399. package/build/server/chunks/18-DFxW4YE_.js +74 -0
  400. package/build/server/chunks/18-DFxW4YE_.js.map +1 -0
  401. package/build/server/chunks/19-C8RtlFzY.js +92 -0
  402. package/build/server/chunks/19-C8RtlFzY.js.map +1 -0
  403. package/build/server/chunks/2-tPIqsVg3.js +40 -0
  404. package/build/server/chunks/2-tPIqsVg3.js.map +1 -0
  405. package/build/server/chunks/20-DLtIYsB6.js +172 -0
  406. package/build/server/chunks/20-DLtIYsB6.js.map +1 -0
  407. package/build/server/chunks/21-Bs7WlXoO.js +74 -0
  408. package/build/server/chunks/21-Bs7WlXoO.js.map +1 -0
  409. package/build/server/chunks/22-Bweil5nd.js +23 -0
  410. package/build/server/chunks/22-Bweil5nd.js.map +1 -0
  411. package/build/server/chunks/23-dTtOINB8.js +136 -0
  412. package/build/server/chunks/23-dTtOINB8.js.map +1 -0
  413. package/build/server/chunks/24-DFoVUKXD.js +144 -0
  414. package/build/server/chunks/24-DFoVUKXD.js.map +1 -0
  415. package/build/server/chunks/25-DstWRI72.js +51 -0
  416. package/build/server/chunks/25-DstWRI72.js.map +1 -0
  417. package/build/server/chunks/26-CI8uo3hW.js +9 -0
  418. package/build/server/chunks/26-CI8uo3hW.js.map +1 -0
  419. package/build/server/chunks/27-CpQEotb7.js +57 -0
  420. package/build/server/chunks/27-CpQEotb7.js.map +1 -0
  421. package/build/server/chunks/28-B-G5uvxa.js +68 -0
  422. package/build/server/chunks/28-B-G5uvxa.js.map +1 -0
  423. package/build/server/chunks/29-BFo4HkLa.js +55 -0
  424. package/build/server/chunks/29-BFo4HkLa.js.map +1 -0
  425. package/build/server/chunks/3-BU-Ucrf8.js +9 -0
  426. package/build/server/chunks/3-BU-Ucrf8.js.map +1 -0
  427. package/build/server/chunks/30-zdVVQ-al.js +57 -0
  428. package/build/server/chunks/30-zdVVQ-al.js.map +1 -0
  429. package/build/server/chunks/31-Cba3pMW9.js +42 -0
  430. package/build/server/chunks/31-Cba3pMW9.js.map +1 -0
  431. package/build/server/chunks/32-BmfoNY4G.js +34 -0
  432. package/build/server/chunks/32-BmfoNY4G.js.map +1 -0
  433. package/build/server/chunks/4-rU40n2rV.js +9 -0
  434. package/build/server/chunks/4-rU40n2rV.js.map +1 -0
  435. package/build/server/chunks/5-CsoWfpGS.js +32 -0
  436. package/build/server/chunks/5-CsoWfpGS.js.map +1 -0
  437. package/build/server/chunks/6-D7wR-syA.js +40 -0
  438. package/build/server/chunks/6-D7wR-syA.js.map +1 -0
  439. package/build/server/chunks/7-uEz6AFkY.js +19 -0
  440. package/build/server/chunks/7-uEz6AFkY.js.map +1 -0
  441. package/build/server/chunks/8-BF-aCqND.js +130 -0
  442. package/build/server/chunks/8-BF-aCqND.js.map +1 -0
  443. package/build/server/chunks/9-BSxBuZbd.js +46 -0
  444. package/build/server/chunks/9-BSxBuZbd.js.map +1 -0
  445. package/build/server/chunks/AppHeader-BGs-cVxu.js +270 -0
  446. package/build/server/chunks/AppHeader-BGs-cVxu.js.map +1 -0
  447. package/build/server/chunks/DataTable-Calmth3f.js +26 -0
  448. package/build/server/chunks/DataTable-Calmth3f.js.map +1 -0
  449. package/build/server/chunks/DefinitionCard-p4VxRESg.js +257 -0
  450. package/build/server/chunks/DefinitionCard-p4VxRESg.js.map +1 -0
  451. package/build/server/chunks/EmptyState-Vs823elu.js +53 -0
  452. package/build/server/chunks/EmptyState-Vs823elu.js.map +1 -0
  453. package/build/server/chunks/ErrorScreen-Btv-WHiu.js +131 -0
  454. package/build/server/chunks/ErrorScreen-Btv-WHiu.js.map +1 -0
  455. package/build/server/chunks/FilterableDropdown-B2_HPO_D.js +61 -0
  456. package/build/server/chunks/FilterableDropdown-B2_HPO_D.js.map +1 -0
  457. package/build/server/chunks/SectionHeader-C1XxBz32.js +32 -0
  458. package/build/server/chunks/SectionHeader-C1XxBz32.js.map +1 -0
  459. package/build/server/chunks/SideNav-B8LeM-P_.js +87 -0
  460. package/build/server/chunks/SideNav-B8LeM-P_.js.map +1 -0
  461. package/build/server/chunks/StatCard--Plm6nsA.js +50 -0
  462. package/build/server/chunks/StatCard--Plm6nsA.js.map +1 -0
  463. package/build/server/chunks/UserAvatar-CaOe1AcR.js +13 -0
  464. package/build/server/chunks/UserAvatar-CaOe1AcR.js.map +1 -0
  465. package/build/server/chunks/UserChip-vdJXrk99.js +1113 -0
  466. package/build/server/chunks/UserChip-vdJXrk99.js.map +1 -0
  467. package/build/server/chunks/_error.svelte-Bifw6LEZ.js +27 -0
  468. package/build/server/chunks/_error.svelte-Bifw6LEZ.js.map +1 -0
  469. package/build/server/chunks/_error.svelte-C2KGldTD.js +29 -0
  470. package/build/server/chunks/_error.svelte-C2KGldTD.js.map +1 -0
  471. package/build/server/chunks/_layout.svelte-1of9r1N3.js +42 -0
  472. package/build/server/chunks/_layout.svelte-1of9r1N3.js.map +1 -0
  473. package/build/server/chunks/_layout.svelte-CGIvkx7D.js +152 -0
  474. package/build/server/chunks/_layout.svelte-CGIvkx7D.js.map +1 -0
  475. package/build/server/chunks/_layout.svelte-CyAPRqZR.js +10 -0
  476. package/build/server/chunks/_layout.svelte-CyAPRqZR.js.map +1 -0
  477. package/build/server/chunks/_layout.svelte-Czx3WsTK.js +795 -0
  478. package/build/server/chunks/_layout.svelte-Czx3WsTK.js.map +1 -0
  479. package/build/server/chunks/_layout.svelte-HGSVxA0R.js +105 -0
  480. package/build/server/chunks/_layout.svelte-HGSVxA0R.js.map +1 -0
  481. package/build/server/chunks/_page.svelte-4090fhI5.js +83 -0
  482. package/build/server/chunks/_page.svelte-4090fhI5.js.map +1 -0
  483. package/build/server/chunks/_page.svelte-5X2iRv32.js +711 -0
  484. package/build/server/chunks/_page.svelte-5X2iRv32.js.map +1 -0
  485. package/build/server/chunks/_page.svelte-BO2coOCw.js +10510 -0
  486. package/build/server/chunks/_page.svelte-BO2coOCw.js.map +1 -0
  487. package/build/server/chunks/_page.svelte-BfQQ6DpG.js +276 -0
  488. package/build/server/chunks/_page.svelte-BfQQ6DpG.js.map +1 -0
  489. package/build/server/chunks/_page.svelte-Br3YjZJA.js +595 -0
  490. package/build/server/chunks/_page.svelte-Br3YjZJA.js.map +1 -0
  491. package/build/server/chunks/_page.svelte-BvG__sle.js +119 -0
  492. package/build/server/chunks/_page.svelte-BvG__sle.js.map +1 -0
  493. package/build/server/chunks/_page.svelte-C2Pa9XCr.js +119 -0
  494. package/build/server/chunks/_page.svelte-C2Pa9XCr.js.map +1 -0
  495. package/build/server/chunks/_page.svelte-C48Yzxtt.js +330 -0
  496. package/build/server/chunks/_page.svelte-C48Yzxtt.js.map +1 -0
  497. package/build/server/chunks/_page.svelte-C4V_xDVU.js +329 -0
  498. package/build/server/chunks/_page.svelte-C4V_xDVU.js.map +1 -0
  499. package/build/server/chunks/_page.svelte-CFbpEr-L.js +249 -0
  500. package/build/server/chunks/_page.svelte-CFbpEr-L.js.map +1 -0
  501. package/build/server/chunks/_page.svelte-CGuEBnqj.js +168 -0
  502. package/build/server/chunks/_page.svelte-CGuEBnqj.js.map +1 -0
  503. package/build/server/chunks/_page.svelte-CWJ99QbZ.js +500 -0
  504. package/build/server/chunks/_page.svelte-CWJ99QbZ.js.map +1 -0
  505. package/build/server/chunks/_page.svelte-CX9DKxIH.js +520 -0
  506. package/build/server/chunks/_page.svelte-CX9DKxIH.js.map +1 -0
  507. package/build/server/chunks/_page.svelte-Cn6-gBTd.js +56 -0
  508. package/build/server/chunks/_page.svelte-Cn6-gBTd.js.map +1 -0
  509. package/build/server/chunks/_page.svelte-D2rnbrpK.js +423 -0
  510. package/build/server/chunks/_page.svelte-D2rnbrpK.js.map +1 -0
  511. package/build/server/chunks/_page.svelte-DIgP7KVt.js +549 -0
  512. package/build/server/chunks/_page.svelte-DIgP7KVt.js.map +1 -0
  513. package/build/server/chunks/_page.svelte-DMn46_VU.js +301 -0
  514. package/build/server/chunks/_page.svelte-DMn46_VU.js.map +1 -0
  515. package/build/server/chunks/_page.svelte-DQeDu6UN.js +146 -0
  516. package/build/server/chunks/_page.svelte-DQeDu6UN.js.map +1 -0
  517. package/build/server/chunks/_page.svelte-DSpONoJg.js +252 -0
  518. package/build/server/chunks/_page.svelte-DSpONoJg.js.map +1 -0
  519. package/build/server/chunks/_page.svelte-DciqGYJp.js +609 -0
  520. package/build/server/chunks/_page.svelte-DciqGYJp.js.map +1 -0
  521. package/build/server/chunks/_page.svelte-DfCFSzaO.js +3847 -0
  522. package/build/server/chunks/_page.svelte-DfCFSzaO.js.map +1 -0
  523. package/build/server/chunks/_page.svelte-DtUlWJaB.js +113 -0
  524. package/build/server/chunks/_page.svelte-DtUlWJaB.js.map +1 -0
  525. package/build/server/chunks/_page.svelte-KapMJV5_.js +452 -0
  526. package/build/server/chunks/_page.svelte-KapMJV5_.js.map +1 -0
  527. package/build/server/chunks/_page.svelte-wsvtYRRE.js +69 -0
  528. package/build/server/chunks/_page.svelte-wsvtYRRE.js.map +1 -0
  529. package/build/server/chunks/_page.svelte-zL7ihDzp.js +13 -0
  530. package/build/server/chunks/_page.svelte-zL7ihDzp.js.map +1 -0
  531. package/build/server/chunks/_server.ts-0ncRaWJ_.js +39 -0
  532. package/build/server/chunks/_server.ts-0ncRaWJ_.js.map +1 -0
  533. package/build/server/chunks/_server.ts-7hKc3tb_.js +28 -0
  534. package/build/server/chunks/_server.ts-7hKc3tb_.js.map +1 -0
  535. package/build/server/chunks/_server.ts-B0wiCYbB.js +36 -0
  536. package/build/server/chunks/_server.ts-B0wiCYbB.js.map +1 -0
  537. package/build/server/chunks/_server.ts-BJWFkEuu.js +94 -0
  538. package/build/server/chunks/_server.ts-BJWFkEuu.js.map +1 -0
  539. package/build/server/chunks/_server.ts-BLHjzdRp.js +30 -0
  540. package/build/server/chunks/_server.ts-BLHjzdRp.js.map +1 -0
  541. package/build/server/chunks/_server.ts-BUc1sqlR.js +58 -0
  542. package/build/server/chunks/_server.ts-BUc1sqlR.js.map +1 -0
  543. package/build/server/chunks/_server.ts-B_MVq_5r.js +72 -0
  544. package/build/server/chunks/_server.ts-B_MVq_5r.js.map +1 -0
  545. package/build/server/chunks/_server.ts-Bb3Kpo0Y.js +38 -0
  546. package/build/server/chunks/_server.ts-Bb3Kpo0Y.js.map +1 -0
  547. package/build/server/chunks/_server.ts-BemU6FO1.js +64 -0
  548. package/build/server/chunks/_server.ts-BemU6FO1.js.map +1 -0
  549. package/build/server/chunks/_server.ts-BkKg2yyC.js +75 -0
  550. package/build/server/chunks/_server.ts-BkKg2yyC.js.map +1 -0
  551. package/build/server/chunks/_server.ts-BpAINcOs.js +276 -0
  552. package/build/server/chunks/_server.ts-BpAINcOs.js.map +1 -0
  553. package/build/server/chunks/_server.ts-BpkR7TzP.js +30 -0
  554. package/build/server/chunks/_server.ts-BpkR7TzP.js.map +1 -0
  555. package/build/server/chunks/_server.ts-BrZXNFlK.js +78 -0
  556. package/build/server/chunks/_server.ts-BrZXNFlK.js.map +1 -0
  557. package/build/server/chunks/_server.ts-C-XniPo8.js +41 -0
  558. package/build/server/chunks/_server.ts-C-XniPo8.js.map +1 -0
  559. package/build/server/chunks/_server.ts-C0F30GT4.js +61 -0
  560. package/build/server/chunks/_server.ts-C0F30GT4.js.map +1 -0
  561. package/build/server/chunks/_server.ts-C4WRZSco.js +32 -0
  562. package/build/server/chunks/_server.ts-C4WRZSco.js.map +1 -0
  563. package/build/server/chunks/_server.ts-CAcgx11J.js +37 -0
  564. package/build/server/chunks/_server.ts-CAcgx11J.js.map +1 -0
  565. package/build/server/chunks/_server.ts-CFIgn6q6.js +293 -0
  566. package/build/server/chunks/_server.ts-CFIgn6q6.js.map +1 -0
  567. package/build/server/chunks/_server.ts-CaHe7mo6.js +81 -0
  568. package/build/server/chunks/_server.ts-CaHe7mo6.js.map +1 -0
  569. package/build/server/chunks/_server.ts-CcQbKaET.js +38 -0
  570. package/build/server/chunks/_server.ts-CcQbKaET.js.map +1 -0
  571. package/build/server/chunks/_server.ts-Ch_RLYHQ.js +48 -0
  572. package/build/server/chunks/_server.ts-Ch_RLYHQ.js.map +1 -0
  573. package/build/server/chunks/_server.ts-CkXnisqg.js +85 -0
  574. package/build/server/chunks/_server.ts-CkXnisqg.js.map +1 -0
  575. package/build/server/chunks/_server.ts-CmGWhrdf.js +110 -0
  576. package/build/server/chunks/_server.ts-CmGWhrdf.js.map +1 -0
  577. package/build/server/chunks/_server.ts-CmUr8pln.js +37 -0
  578. package/build/server/chunks/_server.ts-CmUr8pln.js.map +1 -0
  579. package/build/server/chunks/_server.ts-D-QkfF2o.js +106 -0
  580. package/build/server/chunks/_server.ts-D-QkfF2o.js.map +1 -0
  581. package/build/server/chunks/_server.ts-D1AD48e8.js +81 -0
  582. package/build/server/chunks/_server.ts-D1AD48e8.js.map +1 -0
  583. package/build/server/chunks/_server.ts-DBh0rJrm.js +86 -0
  584. package/build/server/chunks/_server.ts-DBh0rJrm.js.map +1 -0
  585. package/build/server/chunks/_server.ts-DJUYnHrj.js +49 -0
  586. package/build/server/chunks/_server.ts-DJUYnHrj.js.map +1 -0
  587. package/build/server/chunks/_server.ts-DNPb5zS6.js +76 -0
  588. package/build/server/chunks/_server.ts-DNPb5zS6.js.map +1 -0
  589. package/build/server/chunks/_server.ts-DXPhlUCi.js +101 -0
  590. package/build/server/chunks/_server.ts-DXPhlUCi.js.map +1 -0
  591. package/build/server/chunks/_server.ts-Dmo73WWA.js +42 -0
  592. package/build/server/chunks/_server.ts-Dmo73WWA.js.map +1 -0
  593. package/build/server/chunks/_server.ts-DxKERFAd.js +35 -0
  594. package/build/server/chunks/_server.ts-DxKERFAd.js.map +1 -0
  595. package/build/server/chunks/_server.ts-MOiQ4br_.js +31 -0
  596. package/build/server/chunks/_server.ts-MOiQ4br_.js.map +1 -0
  597. package/build/server/chunks/_server.ts-Z87uowZI.js +71 -0
  598. package/build/server/chunks/_server.ts-Z87uowZI.js.map +1 -0
  599. package/build/server/chunks/_server.ts-_NTv7i9z.js +94 -0
  600. package/build/server/chunks/_server.ts-_NTv7i9z.js.map +1 -0
  601. package/build/server/chunks/_server.ts-gic0t4mu.js +52 -0
  602. package/build/server/chunks/_server.ts-gic0t4mu.js.map +1 -0
  603. package/build/server/chunks/_server.ts-la-ySldK.js +39 -0
  604. package/build/server/chunks/_server.ts-la-ySldK.js.map +1 -0
  605. package/build/server/chunks/_server.ts-pDmNGXOa.js +70 -0
  606. package/build/server/chunks/_server.ts-pDmNGXOa.js.map +1 -0
  607. package/build/server/chunks/access.server-GvriCjXN.js +389 -0
  608. package/build/server/chunks/access.server-GvriCjXN.js.map +1 -0
  609. package/build/server/chunks/activity-5BrQjmZv.js +18 -0
  610. package/build/server/chunks/activity-5BrQjmZv.js.map +1 -0
  611. package/build/server/chunks/admin-auth.server-CdTfBMI5.js +78 -0
  612. package/build/server/chunks/admin-auth.server-CdTfBMI5.js.map +1 -0
  613. package/build/server/chunks/alert-description-CJHDA62x.js +59 -0
  614. package/build/server/chunks/alert-description-CJHDA62x.js.map +1 -0
  615. package/build/server/chunks/api-errors-Dk5z97zb.js +36 -0
  616. package/build/server/chunks/api-errors-Dk5z97zb.js.map +1 -0
  617. package/build/server/chunks/arrow-left-Bg-KTjhY.js +14 -0
  618. package/build/server/chunks/arrow-left-Bg-KTjhY.js.map +1 -0
  619. package/build/server/chunks/arrow-right-BvyjMBhI.js +14 -0
  620. package/build/server/chunks/arrow-right-BvyjMBhI.js.map +1 -0
  621. package/build/server/chunks/auth-bootstrap.server-CfD5CPTj.js +38 -0
  622. package/build/server/chunks/auth-bootstrap.server-CfD5CPTj.js.map +1 -0
  623. package/build/server/chunks/badge-DP8t-wkc.js +50 -0
  624. package/build/server/chunks/badge-DP8t-wkc.js.map +1 -0
  625. package/build/server/chunks/bootHealth.server-Bn7taneH.js +58 -0
  626. package/build/server/chunks/bootHealth.server-Bn7taneH.js.map +1 -0
  627. package/build/server/chunks/building-2-DzHZbdjX.js +22 -0
  628. package/build/server/chunks/building-2-DzHZbdjX.js.map +1 -0
  629. package/build/server/chunks/button-5YNnSoty.js +73 -0
  630. package/build/server/chunks/button-5YNnSoty.js.map +1 -0
  631. package/build/server/chunks/card-content-PfaaTs7O.js +46 -0
  632. package/build/server/chunks/card-content-PfaaTs7O.js.map +1 -0
  633. package/build/server/chunks/card-description-BfE_PWv4.js +26 -0
  634. package/build/server/chunks/card-description-BfE_PWv4.js.map +1 -0
  635. package/build/server/chunks/card-title-CV7CjSMp.js +46 -0
  636. package/build/server/chunks/card-title-CV7CjSMp.js.map +1 -0
  637. package/build/server/chunks/check-6xLpsphW.js +11 -0
  638. package/build/server/chunks/check-6xLpsphW.js.map +1 -0
  639. package/build/server/chunks/chevron-down-DdRkfYjQ.js +11 -0
  640. package/build/server/chunks/chevron-down-DdRkfYjQ.js.map +1 -0
  641. package/build/server/chunks/chevron-right-yB_oBTHp.js +11 -0
  642. package/build/server/chunks/chevron-right-yB_oBTHp.js.map +1 -0
  643. package/build/server/chunks/chevron-up-CskoDtlM.js +11 -0
  644. package/build/server/chunks/chevron-up-CskoDtlM.js.map +1 -0
  645. package/build/server/chunks/circle-CcD9wKGy.js +11 -0
  646. package/build/server/chunks/circle-CcD9wKGy.js.map +1 -0
  647. package/build/server/chunks/circle-alert-DKo6GQWU.js +18 -0
  648. package/build/server/chunks/circle-alert-DKo6GQWU.js.map +1 -0
  649. package/build/server/chunks/client-CUfa2kzY.js +39 -0
  650. package/build/server/chunks/client-CUfa2kzY.js.map +1 -0
  651. package/build/server/chunks/computeLimits-FIJ-Mzn4.js +26 -0
  652. package/build/server/chunks/computeLimits-FIJ-Mzn4.js.map +1 -0
  653. package/build/server/chunks/context-9tV9WxQ5.js +134 -0
  654. package/build/server/chunks/context-9tV9WxQ5.js.map +1 -0
  655. package/build/server/chunks/copy-B82RxBlo.js +29 -0
  656. package/build/server/chunks/copy-B82RxBlo.js.map +1 -0
  657. package/build/server/chunks/create-id-BYuAt6fp.js +653 -0
  658. package/build/server/chunks/create-id-BYuAt6fp.js.map +1 -0
  659. package/build/server/chunks/dialog-description-Cp1dB1if.js +523 -0
  660. package/build/server/chunks/dialog-description-Cp1dB1if.js.map +1 -0
  661. package/build/server/chunks/events-Dh5zddQQ.js +119 -0
  662. package/build/server/chunks/events-Dh5zddQQ.js.map +1 -0
  663. package/build/server/chunks/folder-kanban-srfqpNh0.js +21 -0
  664. package/build/server/chunks/folder-kanban-srfqpNh0.js.map +1 -0
  665. package/build/server/chunks/folder-open-LjMDYW2a.js +18 -0
  666. package/build/server/chunks/folder-open-LjMDYW2a.js.map +1 -0
  667. package/build/server/chunks/folders-BMeWz5-X.js +24 -0
  668. package/build/server/chunks/folders-BMeWz5-X.js.map +1 -0
  669. package/build/server/chunks/footerContext.svelte-QTotPOm_.js +523 -0
  670. package/build/server/chunks/footerContext.svelte-QTotPOm_.js.map +1 -0
  671. package/build/server/chunks/hooks.server-CMWyl1Gd.js +197 -0
  672. package/build/server/chunks/hooks.server-CMWyl1Gd.js.map +1 -0
  673. package/build/server/chunks/html-FW6Ia4bL.js +8 -0
  674. package/build/server/chunks/html-FW6Ia4bL.js.map +1 -0
  675. package/build/server/chunks/index-DwB9DMAB.js +28 -0
  676. package/build/server/chunks/index-DwB9DMAB.js.map +1 -0
  677. package/build/server/chunks/index-server-DMc-UvjC.js +19 -0
  678. package/build/server/chunks/index-server-DMc-UvjC.js.map +1 -0
  679. package/build/server/chunks/index2-olcdaqbX.js +4379 -0
  680. package/build/server/chunks/index2-olcdaqbX.js.map +1 -0
  681. package/build/server/chunks/index3-Ye-aF_FM.js +541 -0
  682. package/build/server/chunks/index3-Ye-aF_FM.js.map +1 -0
  683. package/build/server/chunks/input-BIyn3mzZ.js +53 -0
  684. package/build/server/chunks/input-BIyn3mzZ.js.map +1 -0
  685. package/build/server/chunks/label-CTvvOsnE.js +112 -0
  686. package/build/server/chunks/label-CTvvOsnE.js.map +1 -0
  687. package/build/server/chunks/link-2-DyFf_-Tu.js +15 -0
  688. package/build/server/chunks/link-2-DyFf_-Tu.js.map +1 -0
  689. package/build/server/chunks/mail-DS_q8hHt.js +17 -0
  690. package/build/server/chunks/mail-DS_q8hHt.js.map +1 -0
  691. package/build/server/chunks/noop-CzO8kTeB.js +138 -0
  692. package/build/server/chunks/noop-CzO8kTeB.js.map +1 -0
  693. package/build/server/chunks/permissions-compat.server-DSV7bClF.js +19 -0
  694. package/build/server/chunks/permissions-compat.server-DSV7bClF.js.map +1 -0
  695. package/build/server/chunks/permissions.server-Co6VKW9f.js +8 -0
  696. package/build/server/chunks/permissions.server-Co6VKW9f.js.map +1 -0
  697. package/build/server/chunks/plus-kUAGz2vQ.js +11 -0
  698. package/build/server/chunks/plus-kUAGz2vQ.js.map +1 -0
  699. package/build/server/chunks/providers.server-C32WKtDL.js +4486 -0
  700. package/build/server/chunks/providers.server-C32WKtDL.js.map +1 -0
  701. package/build/server/chunks/randomId-8gj3Lbuq.js +25 -0
  702. package/build/server/chunks/randomId-8gj3Lbuq.js.map +1 -0
  703. package/build/server/chunks/renderer-BFEBS3DQ.js +3757 -0
  704. package/build/server/chunks/renderer-BFEBS3DQ.js.map +1 -0
  705. package/build/server/chunks/resolve.server-DYsU4jL3.js +11 -0
  706. package/build/server/chunks/resolve.server-DYsU4jL3.js.map +1 -0
  707. package/build/server/chunks/resolve.server2-Co65XNMI.js +50 -0
  708. package/build/server/chunks/resolve.server2-Co65XNMI.js.map +1 -0
  709. package/build/server/chunks/root-DfWNVuNE.js +1134 -0
  710. package/build/server/chunks/root-DfWNVuNE.js.map +1 -0
  711. package/build/server/chunks/rotate-ccw-BhVSWSeP.js +17 -0
  712. package/build/server/chunks/rotate-ccw-BhVSWSeP.js.map +1 -0
  713. package/build/server/chunks/scroll-lock-BNv9iOMl.js +1558 -0
  714. package/build/server/chunks/scroll-lock-BNv9iOMl.js.map +1 -0
  715. package/build/server/chunks/scroll-text-DqHQWAWm.js +21 -0
  716. package/build/server/chunks/scroll-text-DqHQWAWm.js.map +1 -0
  717. package/build/server/chunks/server-CtTftue_.js +36 -0
  718. package/build/server/chunks/server-CtTftue_.js.map +1 -0
  719. package/build/server/chunks/settings-DUGFWkVU.js +19 -0
  720. package/build/server/chunks/settings-DUGFWkVU.js.map +1 -0
  721. package/build/server/chunks/shared-server-DaWdgxVh.js +11 -0
  722. package/build/server/chunks/shared-server-DaWdgxVh.js.map +1 -0
  723. package/build/server/chunks/shield-DcFe9IEC.js +18 -0
  724. package/build/server/chunks/shield-DcFe9IEC.js.map +1 -0
  725. package/build/server/chunks/shield-check-BpiYOxKK.js +19 -0
  726. package/build/server/chunks/shield-check-BpiYOxKK.js.map +1 -0
  727. package/build/server/chunks/slug-BGuFQjqe.js +6 -0
  728. package/build/server/chunks/slug-BGuFQjqe.js.map +1 -0
  729. package/build/server/chunks/star-CyFkn9su.js +18 -0
  730. package/build/server/chunks/star-CyFkn9su.js.map +1 -0
  731. package/build/server/chunks/stores-r9x46ujW.js +31 -0
  732. package/build/server/chunks/stores-r9x46ujW.js.map +1 -0
  733. package/build/server/chunks/textarea-BCZD0juO.js +685 -0
  734. package/build/server/chunks/textarea-BCZD0juO.js.map +1 -0
  735. package/build/server/chunks/toast-state.svelte-CW-nObZ9.js +185 -0
  736. package/build/server/chunks/toast-state.svelte-CW-nObZ9.js.map +1 -0
  737. package/build/server/chunks/token.server-B8XVPI0F.js +25 -0
  738. package/build/server/chunks/token.server-B8XVPI0F.js.map +1 -0
  739. package/build/server/chunks/token.server2-D0Z99lBB.js +22 -0
  740. package/build/server/chunks/token.server2-D0Z99lBB.js.map +1 -0
  741. package/build/server/chunks/trash-2-DWN_oRG7.js +17 -0
  742. package/build/server/chunks/trash-2-DWN_oRG7.js.map +1 -0
  743. package/build/server/chunks/triangle-alert-DYYSX_Mf.js +444 -0
  744. package/build/server/chunks/triangle-alert-DYYSX_Mf.js.map +1 -0
  745. package/build/server/chunks/types-DxzJoaA4.js +11 -0
  746. package/build/server/chunks/types-DxzJoaA4.js.map +1 -0
  747. package/build/server/chunks/types2-DdHhYSMF.js +4 -0
  748. package/build/server/chunks/types2-DdHhYSMF.js.map +1 -0
  749. package/build/server/chunks/upload-DREoObmA.js +62 -0
  750. package/build/server/chunks/upload-DREoObmA.js.map +1 -0
  751. package/build/server/chunks/user-plus-Nb35DNnT.js +16 -0
  752. package/build/server/chunks/user-plus-Nb35DNnT.js.map +1 -0
  753. package/build/server/chunks/users-DMh0XDYp.js +16 -0
  754. package/build/server/chunks/users-DMh0XDYp.js.map +1 -0
  755. package/build/server/chunks/utils2-Sy-_rI-0.js +56 -0
  756. package/build/server/chunks/utils2-Sy-_rI-0.js.map +1 -0
  757. package/build/server/chunks/utils3-AZ8FPfBW.js +80 -0
  758. package/build/server/chunks/utils3-AZ8FPfBW.js.map +1 -0
  759. package/build/server/chunks/x-wRP5erhc.js +14 -0
  760. package/build/server/chunks/x-wRP5erhc.js.map +1 -0
  761. package/build/server/index.js +5380 -0
  762. package/build/server/index.js.map +1 -0
  763. package/build/server/manifest.js +517 -0
  764. package/build/server/manifest.js.map +1 -0
  765. package/build/shims.js +32 -0
  766. package/package.json +57 -0
  767. package/templates/.env.example +339 -0
  768. package/templates/ecosystem.config.cjs +52 -0
  769. package/templates/selva.config.example.js +338 -0
@@ -0,0 +1,4379 @@
1
+ import { ar as bind_props, ai as ensure_array_like, _ as derived, af as spread_props, aj as attributes, at as props_id, aq as escape_html } from './renderer-BFEBS3DQ.js';
2
+ import { c as cn } from './utils3-AZ8FPfBW.js';
3
+ import { l as styleToString, c as createBitsAttrs, b as boxWith, s as simpleBox, n as boolToTrueOrUndef, m as mergeProps, a as createId, d as attachRef, e as boolToEmptyStrOrUndef, g as getDataOpenClosed, f as boolToStr, h as getDataTransitionAttrs, o as boxFrom, p as boolToStrTrueOrUndef, q as cssToStyleObj } from './create-id-BYuAt6fp.js';
4
+ import { n as noop, w as watch, C as Context, A as ARROW_UP, e as ARROW_DOWN, E as ENTER, S as SPACE, T as TAB, P as PAGE_UP, H as HOME, f as PAGE_DOWN, g as END, h as isNotNull, j as defaultWindow, c as isIOS } from './noop-CzO8kTeB.js';
5
+ import { C as Check } from './check-6xLpsphW.js';
6
+ import { C as Chevron_up } from './chevron-up-CskoDtlM.js';
7
+ import { C as Chevron_down } from './chevron-down-DdRkfYjQ.js';
8
+ import { a as afterTick, c as DOMContext, P as PresenceManager, b as Portal, d as afterSleep, u as useId, g as getWindow$1, S as Scroll_lock, F as Focus_scope, E as Escape_layer, D as Dismissible_layer, T as Text_selection_layer } from './scroll-lock-BNv9iOMl.js';
9
+ import 'clsx';
10
+ import { c as createSubscriber } from './index-server-DMc-UvjC.js';
11
+ import { o as on } from './events-Dh5zddQQ.js';
12
+
13
+ const srOnlyStyles = {
14
+ position: "absolute",
15
+ width: "1px",
16
+ height: "1px",
17
+ padding: "0",
18
+ margin: "-1px",
19
+ overflow: "hidden",
20
+ clip: "rect(0, 0, 0, 0)",
21
+ whiteSpace: "nowrap",
22
+ borderWidth: "0",
23
+ transform: "translateX(-100%)"
24
+ };
25
+ styleToString(srOnlyStyles);
26
+ function isFunction(value) {
27
+ return typeof value === "function";
28
+ }
29
+ function get$1(value) {
30
+ if (isFunction(value)) {
31
+ return value();
32
+ }
33
+ return value;
34
+ }
35
+ class ElementSize {
36
+ // no need to use `$state` here since we are using createSubscriber
37
+ #size = { width: 0, height: 0 };
38
+ #observed = false;
39
+ #options;
40
+ #node;
41
+ #window;
42
+ // we use a derived here to extract the width so that if the width doesn't change we don't get a state update
43
+ // which we would get if we would just use a getter since the version of the subscriber will be changing
44
+ #width = derived(() => {
45
+ this.#subscribe()?.();
46
+ return this.getSize().width;
47
+ });
48
+ // we use a derived here to extract the height so that if the height doesn't change we don't get a state update
49
+ // which we would get if we would just use a getter since the version of the subscriber will be changing
50
+ #height = derived(() => {
51
+ this.#subscribe()?.();
52
+ return this.getSize().height;
53
+ });
54
+ // we need to use a derived here because the class will be created before the node is bound to the ref
55
+ #subscribe = derived(() => {
56
+ const node$ = get$1(this.#node);
57
+ if (!node$) return;
58
+ return createSubscriber();
59
+ });
60
+ constructor(node, options = { box: "border-box" }) {
61
+ this.#window = options.window ?? defaultWindow;
62
+ this.#options = options;
63
+ this.#node = node;
64
+ this.#size = { width: 0, height: 0 };
65
+ }
66
+ calculateSize() {
67
+ const element = get$1(this.#node);
68
+ if (!element || !this.#window) {
69
+ return;
70
+ }
71
+ const offsetWidth = element.offsetWidth;
72
+ const offsetHeight = element.offsetHeight;
73
+ if (this.#options.box === "border-box") {
74
+ return { width: offsetWidth, height: offsetHeight };
75
+ }
76
+ const style = this.#window.getComputedStyle(element);
77
+ const paddingWidth = parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
78
+ const paddingHeight = parseFloat(style.paddingTop) + parseFloat(style.paddingBottom);
79
+ const borderWidth = parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth);
80
+ const borderHeight = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
81
+ const contentWidth = offsetWidth - paddingWidth - borderWidth;
82
+ const contentHeight = offsetHeight - paddingHeight - borderHeight;
83
+ return { width: contentWidth, height: contentHeight };
84
+ }
85
+ getSize() {
86
+ return this.#observed ? this.#size : this.calculateSize() ?? this.#size;
87
+ }
88
+ get current() {
89
+ this.#subscribe()?.();
90
+ return this.getSize();
91
+ }
92
+ get width() {
93
+ return this.#width();
94
+ }
95
+ get height() {
96
+ return this.#height();
97
+ }
98
+ }
99
+ class Previous {
100
+ #previousCallback = () => void 0;
101
+ #previous = derived(() => this.#previousCallback());
102
+ constructor(getter, initialValue) {
103
+ let actualPrevious = void 0;
104
+ if (initialValue !== void 0) actualPrevious = initialValue;
105
+ this.#previousCallback = () => {
106
+ try {
107
+ return actualPrevious;
108
+ } finally {
109
+ actualPrevious = getter();
110
+ }
111
+ };
112
+ }
113
+ get current() {
114
+ return this.#previous();
115
+ }
116
+ }
117
+ function isValidIndex(index, arr) {
118
+ return index >= 0 && index < arr.length;
119
+ }
120
+ function next(array, index, loop = true) {
121
+ if (array.length === 0 || index < 0 || index >= array.length)
122
+ return;
123
+ if (array.length === 1 && index === 0)
124
+ return array[0];
125
+ if (index === array.length - 1)
126
+ return loop ? array[0] : void 0;
127
+ return array[index + 1];
128
+ }
129
+ function prev(array, index, loop = true) {
130
+ if (array.length === 0 || index < 0 || index >= array.length)
131
+ return;
132
+ if (array.length === 1 && index === 0)
133
+ return array[0];
134
+ if (index === 0)
135
+ return loop ? array[array.length - 1] : void 0;
136
+ return array[index - 1];
137
+ }
138
+ function forward(array, index, increment, loop = true) {
139
+ if (array.length === 0 || index < 0 || index >= array.length)
140
+ return;
141
+ let targetIndex = index + increment;
142
+ if (loop) {
143
+ targetIndex = (targetIndex % array.length + array.length) % array.length;
144
+ } else {
145
+ targetIndex = Math.max(0, Math.min(targetIndex, array.length - 1));
146
+ }
147
+ return array[targetIndex];
148
+ }
149
+ function backward(array, index, decrement, loop = true) {
150
+ if (array.length === 0 || index < 0 || index >= array.length)
151
+ return;
152
+ let targetIndex = index - decrement;
153
+ if (loop) {
154
+ targetIndex = (targetIndex % array.length + array.length) % array.length;
155
+ } else {
156
+ targetIndex = Math.max(0, Math.min(targetIndex, array.length - 1));
157
+ }
158
+ return array[targetIndex];
159
+ }
160
+ function getNextMatch(values, search, currentMatch) {
161
+ const lowerSearch = search.toLowerCase();
162
+ if (lowerSearch.endsWith(" ")) {
163
+ const searchWithoutSpace = lowerSearch.slice(0, -1);
164
+ const matchesWithoutSpace = values.filter((value) => value.toLowerCase().startsWith(searchWithoutSpace));
165
+ if (matchesWithoutSpace.length <= 1) {
166
+ return getNextMatch(values, searchWithoutSpace, currentMatch);
167
+ }
168
+ const currentMatchLowercase = currentMatch?.toLowerCase();
169
+ if (currentMatchLowercase && currentMatchLowercase.startsWith(searchWithoutSpace) && currentMatchLowercase.charAt(searchWithoutSpace.length) === " " && search.trim() === searchWithoutSpace) {
170
+ return currentMatch;
171
+ }
172
+ const spacedMatches = values.filter((value) => value.toLowerCase().startsWith(lowerSearch));
173
+ if (spacedMatches.length > 0) {
174
+ const currentMatchIndex2 = currentMatch ? values.indexOf(currentMatch) : -1;
175
+ let wrappedMatches = wrapArray(spacedMatches, Math.max(currentMatchIndex2, 0));
176
+ const nextMatch2 = wrappedMatches.find((match) => match !== currentMatch);
177
+ return nextMatch2 || currentMatch;
178
+ }
179
+ }
180
+ const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);
181
+ const normalizedSearch = isRepeated ? search[0] : search;
182
+ const normalizedLowerSearch = normalizedSearch.toLowerCase();
183
+ const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;
184
+ let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));
185
+ const excludeCurrentMatch = normalizedSearch.length === 1;
186
+ if (excludeCurrentMatch)
187
+ wrappedValues = wrappedValues.filter((v) => v !== currentMatch);
188
+ const nextMatch = wrappedValues.find((value) => value?.toLowerCase().startsWith(normalizedLowerSearch));
189
+ return nextMatch !== currentMatch ? nextMatch : void 0;
190
+ }
191
+ function wrapArray(array, startIndex) {
192
+ return array.map((_, index) => array[(startIndex + index) % array.length]);
193
+ }
194
+ const defaultOptions = { afterMs: 1e4, onChange: noop };
195
+ function boxAutoReset(defaultValue, options) {
196
+ const { afterMs, onChange, getWindow: getWindow2 } = { ...defaultOptions, ...options };
197
+ let timeout = null;
198
+ let value = defaultValue;
199
+ function resetAfter() {
200
+ return getWindow2().setTimeout(
201
+ () => {
202
+ value = defaultValue;
203
+ onChange?.(defaultValue);
204
+ },
205
+ afterMs
206
+ );
207
+ }
208
+ return boxWith(() => value, (v) => {
209
+ value = v;
210
+ onChange?.(v);
211
+ if (timeout) getWindow2().clearTimeout(timeout);
212
+ timeout = resetAfter();
213
+ });
214
+ }
215
+ class DOMTypeahead {
216
+ #opts;
217
+ #search;
218
+ #onMatch = derived(() => {
219
+ if (this.#opts.onMatch) return this.#opts.onMatch;
220
+ return (node) => node.focus();
221
+ });
222
+ #getCurrentItem = derived(() => {
223
+ if (this.#opts.getCurrentItem) return this.#opts.getCurrentItem;
224
+ return this.#opts.getActiveElement;
225
+ });
226
+ constructor(opts) {
227
+ this.#opts = opts;
228
+ this.#search = boxAutoReset("", { afterMs: 1e3, getWindow: opts.getWindow });
229
+ this.handleTypeaheadSearch = this.handleTypeaheadSearch.bind(this);
230
+ this.resetTypeahead = this.resetTypeahead.bind(this);
231
+ }
232
+ handleTypeaheadSearch(key, candidates) {
233
+ if (!candidates.length) return;
234
+ this.#search.current = this.#search.current + key;
235
+ const currentItem = this.#getCurrentItem()();
236
+ const currentMatch = candidates.find((item) => item === currentItem)?.textContent?.trim() ?? "";
237
+ const values = candidates.map((item) => item.textContent?.trim() ?? "");
238
+ const nextMatch = getNextMatch(values, this.#search.current, currentMatch);
239
+ const newItem = candidates.find((item) => item.textContent?.trim() === nextMatch);
240
+ if (newItem) this.#onMatch()(newItem);
241
+ return newItem;
242
+ }
243
+ resetTypeahead() {
244
+ this.#search.current = "";
245
+ }
246
+ get search() {
247
+ return this.#search.current;
248
+ }
249
+ }
250
+ function Hidden_input($$renderer, $$props) {
251
+ $$renderer.component(($$renderer2) => {
252
+ let { value = void 0, $$slots, $$events, ...restProps } = $$props;
253
+ const mergedProps = derived(() => mergeProps(restProps, {
254
+ "aria-hidden": "true",
255
+ tabindex: -1,
256
+ style: { ...srOnlyStyles, position: "absolute", top: "0", left: "0" }
257
+ }));
258
+ if (mergedProps().type === "checkbox") {
259
+ $$renderer2.push("<!--[0-->");
260
+ $$renderer2.push(`<input${attributes({ ...mergedProps(), value }, void 0, void 0, void 0, 4)}/>`);
261
+ } else {
262
+ $$renderer2.push("<!--[-1-->");
263
+ $$renderer2.push(`<input${attributes({ value, ...mergedProps() }, void 0, void 0, void 0, 4)}/>`);
264
+ }
265
+ $$renderer2.push(`<!--]-->`);
266
+ bind_props($$props, { value });
267
+ });
268
+ }
269
+ const sides = ["top", "right", "bottom", "left"];
270
+ const min = Math.min;
271
+ const max = Math.max;
272
+ const round = Math.round;
273
+ const createCoords = (v) => ({
274
+ x: v,
275
+ y: v
276
+ });
277
+ const oppositeSideMap = {
278
+ left: "right",
279
+ right: "left",
280
+ bottom: "top",
281
+ top: "bottom"
282
+ };
283
+ function clamp(start, value, end) {
284
+ return max(start, min(value, end));
285
+ }
286
+ function evaluate(value, param) {
287
+ return typeof value === "function" ? value(param) : value;
288
+ }
289
+ function getSide(placement) {
290
+ return placement.split("-")[0];
291
+ }
292
+ function getAlignment(placement) {
293
+ return placement.split("-")[1];
294
+ }
295
+ function getOppositeAxis(axis) {
296
+ return axis === "x" ? "y" : "x";
297
+ }
298
+ function getAxisLength(axis) {
299
+ return axis === "y" ? "height" : "width";
300
+ }
301
+ function getSideAxis(placement) {
302
+ const firstChar = placement[0];
303
+ return firstChar === "t" || firstChar === "b" ? "y" : "x";
304
+ }
305
+ function getAlignmentAxis(placement) {
306
+ return getOppositeAxis(getSideAxis(placement));
307
+ }
308
+ function getAlignmentSides(placement, rects, rtl) {
309
+ if (rtl === void 0) {
310
+ rtl = false;
311
+ }
312
+ const alignment = getAlignment(placement);
313
+ const alignmentAxis = getAlignmentAxis(placement);
314
+ const length = getAxisLength(alignmentAxis);
315
+ let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
316
+ if (rects.reference[length] > rects.floating[length]) {
317
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
318
+ }
319
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
320
+ }
321
+ function getExpandedPlacements(placement) {
322
+ const oppositePlacement = getOppositePlacement(placement);
323
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
324
+ }
325
+ function getOppositeAlignmentPlacement(placement) {
326
+ return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
327
+ }
328
+ const lrPlacement = ["left", "right"];
329
+ const rlPlacement = ["right", "left"];
330
+ const tbPlacement = ["top", "bottom"];
331
+ const btPlacement = ["bottom", "top"];
332
+ function getSideList(side, isStart, rtl) {
333
+ switch (side) {
334
+ case "top":
335
+ case "bottom":
336
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
337
+ return isStart ? lrPlacement : rlPlacement;
338
+ case "left":
339
+ case "right":
340
+ return isStart ? tbPlacement : btPlacement;
341
+ default:
342
+ return [];
343
+ }
344
+ }
345
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
346
+ const alignment = getAlignment(placement);
347
+ let list = getSideList(getSide(placement), direction === "start", rtl);
348
+ if (alignment) {
349
+ list = list.map((side) => side + "-" + alignment);
350
+ if (flipAlignment) {
351
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
352
+ }
353
+ }
354
+ return list;
355
+ }
356
+ function getOppositePlacement(placement) {
357
+ const side = getSide(placement);
358
+ return oppositeSideMap[side] + placement.slice(side.length);
359
+ }
360
+ function expandPaddingObject(padding) {
361
+ return {
362
+ top: 0,
363
+ right: 0,
364
+ bottom: 0,
365
+ left: 0,
366
+ ...padding
367
+ };
368
+ }
369
+ function getPaddingObject(padding) {
370
+ return typeof padding !== "number" ? expandPaddingObject(padding) : {
371
+ top: padding,
372
+ right: padding,
373
+ bottom: padding,
374
+ left: padding
375
+ };
376
+ }
377
+ function rectToClientRect(rect) {
378
+ const {
379
+ x,
380
+ y,
381
+ width,
382
+ height
383
+ } = rect;
384
+ return {
385
+ width,
386
+ height,
387
+ top: y,
388
+ left: x,
389
+ right: x + width,
390
+ bottom: y + height,
391
+ x,
392
+ y
393
+ };
394
+ }
395
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
396
+ let {
397
+ reference,
398
+ floating
399
+ } = _ref;
400
+ const sideAxis = getSideAxis(placement);
401
+ const alignmentAxis = getAlignmentAxis(placement);
402
+ const alignLength = getAxisLength(alignmentAxis);
403
+ const side = getSide(placement);
404
+ const isVertical = sideAxis === "y";
405
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
406
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
407
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
408
+ let coords;
409
+ switch (side) {
410
+ case "top":
411
+ coords = {
412
+ x: commonX,
413
+ y: reference.y - floating.height
414
+ };
415
+ break;
416
+ case "bottom":
417
+ coords = {
418
+ x: commonX,
419
+ y: reference.y + reference.height
420
+ };
421
+ break;
422
+ case "right":
423
+ coords = {
424
+ x: reference.x + reference.width,
425
+ y: commonY
426
+ };
427
+ break;
428
+ case "left":
429
+ coords = {
430
+ x: reference.x - floating.width,
431
+ y: commonY
432
+ };
433
+ break;
434
+ default:
435
+ coords = {
436
+ x: reference.x,
437
+ y: reference.y
438
+ };
439
+ }
440
+ switch (getAlignment(placement)) {
441
+ case "start":
442
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
443
+ break;
444
+ case "end":
445
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
446
+ break;
447
+ }
448
+ return coords;
449
+ }
450
+ async function detectOverflow(state, options) {
451
+ var _await$platform$isEle;
452
+ if (options === void 0) {
453
+ options = {};
454
+ }
455
+ const {
456
+ x,
457
+ y,
458
+ platform: platform2,
459
+ rects,
460
+ elements,
461
+ strategy
462
+ } = state;
463
+ const {
464
+ boundary = "clippingAncestors",
465
+ rootBoundary = "viewport",
466
+ elementContext = "floating",
467
+ altBoundary = false,
468
+ padding = 0
469
+ } = evaluate(options, state);
470
+ const paddingObject = getPaddingObject(padding);
471
+ const altContext = elementContext === "floating" ? "reference" : "floating";
472
+ const element = elements[altBoundary ? altContext : elementContext];
473
+ const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
474
+ element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)),
475
+ boundary,
476
+ rootBoundary,
477
+ strategy
478
+ }));
479
+ const rect = elementContext === "floating" ? {
480
+ x,
481
+ y,
482
+ width: rects.floating.width,
483
+ height: rects.floating.height
484
+ } : rects.reference;
485
+ const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
486
+ const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
487
+ x: 1,
488
+ y: 1
489
+ } : {
490
+ x: 1,
491
+ y: 1
492
+ };
493
+ const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
494
+ elements,
495
+ rect,
496
+ offsetParent,
497
+ strategy
498
+ }) : rect);
499
+ return {
500
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
501
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
502
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
503
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
504
+ };
505
+ }
506
+ const MAX_RESET_COUNT = 50;
507
+ const computePosition$1 = async (reference, floating, config) => {
508
+ const {
509
+ placement = "bottom",
510
+ strategy = "absolute",
511
+ middleware = [],
512
+ platform: platform2
513
+ } = config;
514
+ const platformWithDetectOverflow = platform2.detectOverflow ? platform2 : {
515
+ ...platform2,
516
+ detectOverflow
517
+ };
518
+ const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating));
519
+ let rects = await platform2.getElementRects({
520
+ reference,
521
+ floating,
522
+ strategy
523
+ });
524
+ let {
525
+ x,
526
+ y
527
+ } = computeCoordsFromPlacement(rects, placement, rtl);
528
+ let statefulPlacement = placement;
529
+ let resetCount = 0;
530
+ const middlewareData = {};
531
+ for (let i = 0; i < middleware.length; i++) {
532
+ const currentMiddleware = middleware[i];
533
+ if (!currentMiddleware) {
534
+ continue;
535
+ }
536
+ const {
537
+ name,
538
+ fn
539
+ } = currentMiddleware;
540
+ const {
541
+ x: nextX,
542
+ y: nextY,
543
+ data,
544
+ reset
545
+ } = await fn({
546
+ x,
547
+ y,
548
+ initialPlacement: placement,
549
+ placement: statefulPlacement,
550
+ strategy,
551
+ middlewareData,
552
+ rects,
553
+ platform: platformWithDetectOverflow,
554
+ elements: {
555
+ reference,
556
+ floating
557
+ }
558
+ });
559
+ x = nextX != null ? nextX : x;
560
+ y = nextY != null ? nextY : y;
561
+ middlewareData[name] = {
562
+ ...middlewareData[name],
563
+ ...data
564
+ };
565
+ if (reset && resetCount < MAX_RESET_COUNT) {
566
+ resetCount++;
567
+ if (typeof reset === "object") {
568
+ if (reset.placement) {
569
+ statefulPlacement = reset.placement;
570
+ }
571
+ if (reset.rects) {
572
+ rects = reset.rects === true ? await platform2.getElementRects({
573
+ reference,
574
+ floating,
575
+ strategy
576
+ }) : reset.rects;
577
+ }
578
+ ({
579
+ x,
580
+ y
581
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
582
+ }
583
+ i = -1;
584
+ }
585
+ }
586
+ return {
587
+ x,
588
+ y,
589
+ placement: statefulPlacement,
590
+ strategy,
591
+ middlewareData
592
+ };
593
+ };
594
+ const arrow$1 = (options) => ({
595
+ name: "arrow",
596
+ options,
597
+ async fn(state) {
598
+ const {
599
+ x,
600
+ y,
601
+ placement,
602
+ rects,
603
+ platform: platform2,
604
+ elements,
605
+ middlewareData
606
+ } = state;
607
+ const {
608
+ element,
609
+ padding = 0
610
+ } = evaluate(options, state) || {};
611
+ if (element == null) {
612
+ return {};
613
+ }
614
+ const paddingObject = getPaddingObject(padding);
615
+ const coords = {
616
+ x,
617
+ y
618
+ };
619
+ const axis = getAlignmentAxis(placement);
620
+ const length = getAxisLength(axis);
621
+ const arrowDimensions = await platform2.getDimensions(element);
622
+ const isYAxis = axis === "y";
623
+ const minProp = isYAxis ? "top" : "left";
624
+ const maxProp = isYAxis ? "bottom" : "right";
625
+ const clientProp = isYAxis ? "clientHeight" : "clientWidth";
626
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
627
+ const startDiff = coords[axis] - rects.reference[axis];
628
+ const arrowOffsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(element));
629
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
630
+ if (!clientSize || !await (platform2.isElement == null ? void 0 : platform2.isElement(arrowOffsetParent))) {
631
+ clientSize = elements.floating[clientProp] || rects.floating[length];
632
+ }
633
+ const centerToReference = endDiff / 2 - startDiff / 2;
634
+ const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
635
+ const minPadding = min(paddingObject[minProp], largestPossiblePadding);
636
+ const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
637
+ const min$1 = minPadding;
638
+ const max2 = clientSize - arrowDimensions[length] - maxPadding;
639
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
640
+ const offset2 = clamp(min$1, center, max2);
641
+ const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset2 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
642
+ const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max2 : 0;
643
+ return {
644
+ [axis]: coords[axis] + alignmentOffset,
645
+ data: {
646
+ [axis]: offset2,
647
+ centerOffset: center - offset2 - alignmentOffset,
648
+ ...shouldAddOffset && {
649
+ alignmentOffset
650
+ }
651
+ },
652
+ reset: shouldAddOffset
653
+ };
654
+ }
655
+ });
656
+ const flip$1 = function(options) {
657
+ if (options === void 0) {
658
+ options = {};
659
+ }
660
+ return {
661
+ name: "flip",
662
+ options,
663
+ async fn(state) {
664
+ var _middlewareData$arrow, _middlewareData$flip;
665
+ const {
666
+ placement,
667
+ middlewareData,
668
+ rects,
669
+ initialPlacement,
670
+ platform: platform2,
671
+ elements
672
+ } = state;
673
+ const {
674
+ mainAxis: checkMainAxis = true,
675
+ crossAxis: checkCrossAxis = true,
676
+ fallbackPlacements: specifiedFallbackPlacements,
677
+ fallbackStrategy = "bestFit",
678
+ fallbackAxisSideDirection = "none",
679
+ flipAlignment = true,
680
+ ...detectOverflowOptions
681
+ } = evaluate(options, state);
682
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
683
+ return {};
684
+ }
685
+ const side = getSide(placement);
686
+ const initialSideAxis = getSideAxis(initialPlacement);
687
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
688
+ const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
689
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
690
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
691
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
692
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
693
+ }
694
+ const placements = [initialPlacement, ...fallbackPlacements];
695
+ const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
696
+ const overflows = [];
697
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
698
+ if (checkMainAxis) {
699
+ overflows.push(overflow[side]);
700
+ }
701
+ if (checkCrossAxis) {
702
+ const sides2 = getAlignmentSides(placement, rects, rtl);
703
+ overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
704
+ }
705
+ overflowsData = [...overflowsData, {
706
+ placement,
707
+ overflows
708
+ }];
709
+ if (!overflows.every((side2) => side2 <= 0)) {
710
+ var _middlewareData$flip2, _overflowsData$filter;
711
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
712
+ const nextPlacement = placements[nextIndex];
713
+ if (nextPlacement) {
714
+ const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
715
+ if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
716
+ // overflows the main axis.
717
+ overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
718
+ return {
719
+ data: {
720
+ index: nextIndex,
721
+ overflows: overflowsData
722
+ },
723
+ reset: {
724
+ placement: nextPlacement
725
+ }
726
+ };
727
+ }
728
+ }
729
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
730
+ if (!resetPlacement) {
731
+ switch (fallbackStrategy) {
732
+ case "bestFit": {
733
+ var _overflowsData$filter2;
734
+ const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
735
+ if (hasFallbackAxisSideDirection) {
736
+ const currentSideAxis = getSideAxis(d.placement);
737
+ return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
738
+ // reading directions favoring greater width.
739
+ currentSideAxis === "y";
740
+ }
741
+ return true;
742
+ }).map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
743
+ if (placement2) {
744
+ resetPlacement = placement2;
745
+ }
746
+ break;
747
+ }
748
+ case "initialPlacement":
749
+ resetPlacement = initialPlacement;
750
+ break;
751
+ }
752
+ }
753
+ if (placement !== resetPlacement) {
754
+ return {
755
+ reset: {
756
+ placement: resetPlacement
757
+ }
758
+ };
759
+ }
760
+ }
761
+ return {};
762
+ }
763
+ };
764
+ };
765
+ function getSideOffsets(overflow, rect) {
766
+ return {
767
+ top: overflow.top - rect.height,
768
+ right: overflow.right - rect.width,
769
+ bottom: overflow.bottom - rect.height,
770
+ left: overflow.left - rect.width
771
+ };
772
+ }
773
+ function isAnySideFullyClipped(overflow) {
774
+ return sides.some((side) => overflow[side] >= 0);
775
+ }
776
+ const hide$1 = function(options) {
777
+ if (options === void 0) {
778
+ options = {};
779
+ }
780
+ return {
781
+ name: "hide",
782
+ options,
783
+ async fn(state) {
784
+ const {
785
+ rects,
786
+ platform: platform2
787
+ } = state;
788
+ const {
789
+ strategy = "referenceHidden",
790
+ ...detectOverflowOptions
791
+ } = evaluate(options, state);
792
+ switch (strategy) {
793
+ case "referenceHidden": {
794
+ const overflow = await platform2.detectOverflow(state, {
795
+ ...detectOverflowOptions,
796
+ elementContext: "reference"
797
+ });
798
+ const offsets = getSideOffsets(overflow, rects.reference);
799
+ return {
800
+ data: {
801
+ referenceHiddenOffsets: offsets,
802
+ referenceHidden: isAnySideFullyClipped(offsets)
803
+ }
804
+ };
805
+ }
806
+ case "escaped": {
807
+ const overflow = await platform2.detectOverflow(state, {
808
+ ...detectOverflowOptions,
809
+ altBoundary: true
810
+ });
811
+ const offsets = getSideOffsets(overflow, rects.floating);
812
+ return {
813
+ data: {
814
+ escapedOffsets: offsets,
815
+ escaped: isAnySideFullyClipped(offsets)
816
+ }
817
+ };
818
+ }
819
+ default: {
820
+ return {};
821
+ }
822
+ }
823
+ }
824
+ };
825
+ };
826
+ const originSides = /* @__PURE__ */ new Set(["left", "top"]);
827
+ async function convertValueToCoords(state, options) {
828
+ const {
829
+ placement,
830
+ platform: platform2,
831
+ elements
832
+ } = state;
833
+ const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
834
+ const side = getSide(placement);
835
+ const alignment = getAlignment(placement);
836
+ const isVertical = getSideAxis(placement) === "y";
837
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
838
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
839
+ const rawValue = evaluate(options, state);
840
+ let {
841
+ mainAxis,
842
+ crossAxis,
843
+ alignmentAxis
844
+ } = typeof rawValue === "number" ? {
845
+ mainAxis: rawValue,
846
+ crossAxis: 0,
847
+ alignmentAxis: null
848
+ } : {
849
+ mainAxis: rawValue.mainAxis || 0,
850
+ crossAxis: rawValue.crossAxis || 0,
851
+ alignmentAxis: rawValue.alignmentAxis
852
+ };
853
+ if (alignment && typeof alignmentAxis === "number") {
854
+ crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
855
+ }
856
+ return isVertical ? {
857
+ x: crossAxis * crossAxisMulti,
858
+ y: mainAxis * mainAxisMulti
859
+ } : {
860
+ x: mainAxis * mainAxisMulti,
861
+ y: crossAxis * crossAxisMulti
862
+ };
863
+ }
864
+ const offset$1 = function(options) {
865
+ if (options === void 0) {
866
+ options = 0;
867
+ }
868
+ return {
869
+ name: "offset",
870
+ options,
871
+ async fn(state) {
872
+ var _middlewareData$offse, _middlewareData$arrow;
873
+ const {
874
+ x,
875
+ y,
876
+ placement,
877
+ middlewareData
878
+ } = state;
879
+ const diffCoords = await convertValueToCoords(state, options);
880
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
881
+ return {};
882
+ }
883
+ return {
884
+ x: x + diffCoords.x,
885
+ y: y + diffCoords.y,
886
+ data: {
887
+ ...diffCoords,
888
+ placement
889
+ }
890
+ };
891
+ }
892
+ };
893
+ };
894
+ const shift$1 = function(options) {
895
+ if (options === void 0) {
896
+ options = {};
897
+ }
898
+ return {
899
+ name: "shift",
900
+ options,
901
+ async fn(state) {
902
+ const {
903
+ x,
904
+ y,
905
+ placement,
906
+ platform: platform2
907
+ } = state;
908
+ const {
909
+ mainAxis: checkMainAxis = true,
910
+ crossAxis: checkCrossAxis = false,
911
+ limiter = {
912
+ fn: (_ref) => {
913
+ let {
914
+ x: x2,
915
+ y: y2
916
+ } = _ref;
917
+ return {
918
+ x: x2,
919
+ y: y2
920
+ };
921
+ }
922
+ },
923
+ ...detectOverflowOptions
924
+ } = evaluate(options, state);
925
+ const coords = {
926
+ x,
927
+ y
928
+ };
929
+ const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
930
+ const crossAxis = getSideAxis(getSide(placement));
931
+ const mainAxis = getOppositeAxis(crossAxis);
932
+ let mainAxisCoord = coords[mainAxis];
933
+ let crossAxisCoord = coords[crossAxis];
934
+ if (checkMainAxis) {
935
+ const minSide = mainAxis === "y" ? "top" : "left";
936
+ const maxSide = mainAxis === "y" ? "bottom" : "right";
937
+ const min2 = mainAxisCoord + overflow[minSide];
938
+ const max2 = mainAxisCoord - overflow[maxSide];
939
+ mainAxisCoord = clamp(min2, mainAxisCoord, max2);
940
+ }
941
+ if (checkCrossAxis) {
942
+ const minSide = crossAxis === "y" ? "top" : "left";
943
+ const maxSide = crossAxis === "y" ? "bottom" : "right";
944
+ const min2 = crossAxisCoord + overflow[minSide];
945
+ const max2 = crossAxisCoord - overflow[maxSide];
946
+ crossAxisCoord = clamp(min2, crossAxisCoord, max2);
947
+ }
948
+ const limitedCoords = limiter.fn({
949
+ ...state,
950
+ [mainAxis]: mainAxisCoord,
951
+ [crossAxis]: crossAxisCoord
952
+ });
953
+ return {
954
+ ...limitedCoords,
955
+ data: {
956
+ x: limitedCoords.x - x,
957
+ y: limitedCoords.y - y,
958
+ enabled: {
959
+ [mainAxis]: checkMainAxis,
960
+ [crossAxis]: checkCrossAxis
961
+ }
962
+ }
963
+ };
964
+ }
965
+ };
966
+ };
967
+ const limitShift$1 = function(options) {
968
+ if (options === void 0) {
969
+ options = {};
970
+ }
971
+ return {
972
+ options,
973
+ fn(state) {
974
+ const {
975
+ x,
976
+ y,
977
+ placement,
978
+ rects,
979
+ middlewareData
980
+ } = state;
981
+ const {
982
+ offset: offset2 = 0,
983
+ mainAxis: checkMainAxis = true,
984
+ crossAxis: checkCrossAxis = true
985
+ } = evaluate(options, state);
986
+ const coords = {
987
+ x,
988
+ y
989
+ };
990
+ const crossAxis = getSideAxis(placement);
991
+ const mainAxis = getOppositeAxis(crossAxis);
992
+ let mainAxisCoord = coords[mainAxis];
993
+ let crossAxisCoord = coords[crossAxis];
994
+ const rawOffset = evaluate(offset2, state);
995
+ const computedOffset = typeof rawOffset === "number" ? {
996
+ mainAxis: rawOffset,
997
+ crossAxis: 0
998
+ } : {
999
+ mainAxis: 0,
1000
+ crossAxis: 0,
1001
+ ...rawOffset
1002
+ };
1003
+ if (checkMainAxis) {
1004
+ const len = mainAxis === "y" ? "height" : "width";
1005
+ const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
1006
+ const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
1007
+ if (mainAxisCoord < limitMin) {
1008
+ mainAxisCoord = limitMin;
1009
+ } else if (mainAxisCoord > limitMax) {
1010
+ mainAxisCoord = limitMax;
1011
+ }
1012
+ }
1013
+ if (checkCrossAxis) {
1014
+ var _middlewareData$offse, _middlewareData$offse2;
1015
+ const len = mainAxis === "y" ? "width" : "height";
1016
+ const isOriginSide = originSides.has(getSide(placement));
1017
+ const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
1018
+ const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
1019
+ if (crossAxisCoord < limitMin) {
1020
+ crossAxisCoord = limitMin;
1021
+ } else if (crossAxisCoord > limitMax) {
1022
+ crossAxisCoord = limitMax;
1023
+ }
1024
+ }
1025
+ return {
1026
+ [mainAxis]: mainAxisCoord,
1027
+ [crossAxis]: crossAxisCoord
1028
+ };
1029
+ }
1030
+ };
1031
+ };
1032
+ const size$1 = function(options) {
1033
+ if (options === void 0) {
1034
+ options = {};
1035
+ }
1036
+ return {
1037
+ name: "size",
1038
+ options,
1039
+ async fn(state) {
1040
+ var _state$middlewareData, _state$middlewareData2;
1041
+ const {
1042
+ placement,
1043
+ rects,
1044
+ platform: platform2,
1045
+ elements
1046
+ } = state;
1047
+ const {
1048
+ apply = () => {
1049
+ },
1050
+ ...detectOverflowOptions
1051
+ } = evaluate(options, state);
1052
+ const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
1053
+ const side = getSide(placement);
1054
+ const alignment = getAlignment(placement);
1055
+ const isYAxis = getSideAxis(placement) === "y";
1056
+ const {
1057
+ width,
1058
+ height
1059
+ } = rects.floating;
1060
+ let heightSide;
1061
+ let widthSide;
1062
+ if (side === "top" || side === "bottom") {
1063
+ heightSide = side;
1064
+ widthSide = alignment === (await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
1065
+ } else {
1066
+ widthSide = side;
1067
+ heightSide = alignment === "end" ? "top" : "bottom";
1068
+ }
1069
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
1070
+ const maximumClippingWidth = width - overflow.left - overflow.right;
1071
+ const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
1072
+ const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
1073
+ const noShift = !state.middlewareData.shift;
1074
+ let availableHeight = overflowAvailableHeight;
1075
+ let availableWidth = overflowAvailableWidth;
1076
+ if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
1077
+ availableWidth = maximumClippingWidth;
1078
+ }
1079
+ if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
1080
+ availableHeight = maximumClippingHeight;
1081
+ }
1082
+ if (noShift && !alignment) {
1083
+ const xMin = max(overflow.left, 0);
1084
+ const xMax = max(overflow.right, 0);
1085
+ const yMin = max(overflow.top, 0);
1086
+ const yMax = max(overflow.bottom, 0);
1087
+ if (isYAxis) {
1088
+ availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
1089
+ } else {
1090
+ availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
1091
+ }
1092
+ }
1093
+ await apply({
1094
+ ...state,
1095
+ availableWidth,
1096
+ availableHeight
1097
+ });
1098
+ const nextDimensions = await platform2.getDimensions(elements.floating);
1099
+ if (width !== nextDimensions.width || height !== nextDimensions.height) {
1100
+ return {
1101
+ reset: {
1102
+ rects: true
1103
+ }
1104
+ };
1105
+ }
1106
+ return {};
1107
+ }
1108
+ };
1109
+ };
1110
+ function hasWindow() {
1111
+ return typeof window !== "undefined";
1112
+ }
1113
+ function getNodeName(node) {
1114
+ if (isNode(node)) {
1115
+ return (node.nodeName || "").toLowerCase();
1116
+ }
1117
+ return "#document";
1118
+ }
1119
+ function getWindow(node) {
1120
+ var _node$ownerDocument;
1121
+ return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1122
+ }
1123
+ function getDocumentElement(node) {
1124
+ var _ref;
1125
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1126
+ }
1127
+ function isNode(value) {
1128
+ if (!hasWindow()) {
1129
+ return false;
1130
+ }
1131
+ return value instanceof Node || value instanceof getWindow(value).Node;
1132
+ }
1133
+ function isElement(value) {
1134
+ if (!hasWindow()) {
1135
+ return false;
1136
+ }
1137
+ return value instanceof Element || value instanceof getWindow(value).Element;
1138
+ }
1139
+ function isHTMLElement(value) {
1140
+ if (!hasWindow()) {
1141
+ return false;
1142
+ }
1143
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1144
+ }
1145
+ function isShadowRoot(value) {
1146
+ if (!hasWindow() || typeof ShadowRoot === "undefined") {
1147
+ return false;
1148
+ }
1149
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1150
+ }
1151
+ function isOverflowElement(element) {
1152
+ const {
1153
+ overflow,
1154
+ overflowX,
1155
+ overflowY,
1156
+ display
1157
+ } = getComputedStyle$1(element);
1158
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
1159
+ }
1160
+ function isTableElement(element) {
1161
+ return /^(table|td|th)$/.test(getNodeName(element));
1162
+ }
1163
+ function isTopLayer(element) {
1164
+ try {
1165
+ if (element.matches(":popover-open")) {
1166
+ return true;
1167
+ }
1168
+ } catch (_e) {
1169
+ }
1170
+ try {
1171
+ return element.matches(":modal");
1172
+ } catch (_e) {
1173
+ return false;
1174
+ }
1175
+ }
1176
+ const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
1177
+ const containRe = /paint|layout|strict|content/;
1178
+ const isNotNone = (value) => !!value && value !== "none";
1179
+ let isWebKitValue;
1180
+ function isContainingBlock(elementOrCss) {
1181
+ const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
1182
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
1183
+ }
1184
+ function getContainingBlock(element) {
1185
+ let currentNode = getParentNode(element);
1186
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1187
+ if (isContainingBlock(currentNode)) {
1188
+ return currentNode;
1189
+ } else if (isTopLayer(currentNode)) {
1190
+ return null;
1191
+ }
1192
+ currentNode = getParentNode(currentNode);
1193
+ }
1194
+ return null;
1195
+ }
1196
+ function isWebKit() {
1197
+ if (isWebKitValue == null) {
1198
+ isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
1199
+ }
1200
+ return isWebKitValue;
1201
+ }
1202
+ function isLastTraversableNode(node) {
1203
+ return /^(html|body|#document)$/.test(getNodeName(node));
1204
+ }
1205
+ function getComputedStyle$1(element) {
1206
+ return getWindow(element).getComputedStyle(element);
1207
+ }
1208
+ function getNodeScroll(element) {
1209
+ if (isElement(element)) {
1210
+ return {
1211
+ scrollLeft: element.scrollLeft,
1212
+ scrollTop: element.scrollTop
1213
+ };
1214
+ }
1215
+ return {
1216
+ scrollLeft: element.scrollX,
1217
+ scrollTop: element.scrollY
1218
+ };
1219
+ }
1220
+ function getParentNode(node) {
1221
+ if (getNodeName(node) === "html") {
1222
+ return node;
1223
+ }
1224
+ const result = (
1225
+ // Step into the shadow DOM of the parent of a slotted node.
1226
+ node.assignedSlot || // DOM Element detected.
1227
+ node.parentNode || // ShadowRoot detected.
1228
+ isShadowRoot(node) && node.host || // Fallback.
1229
+ getDocumentElement(node)
1230
+ );
1231
+ return isShadowRoot(result) ? result.host : result;
1232
+ }
1233
+ function getNearestOverflowAncestor(node) {
1234
+ const parentNode = getParentNode(node);
1235
+ if (isLastTraversableNode(parentNode)) {
1236
+ return node.ownerDocument ? node.ownerDocument.body : node.body;
1237
+ }
1238
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1239
+ return parentNode;
1240
+ }
1241
+ return getNearestOverflowAncestor(parentNode);
1242
+ }
1243
+ function getOverflowAncestors(node, list, traverseIframes) {
1244
+ var _node$ownerDocument2;
1245
+ if (list === void 0) {
1246
+ list = [];
1247
+ }
1248
+ const scrollableAncestor = getNearestOverflowAncestor(node);
1249
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1250
+ const win = getWindow(scrollableAncestor);
1251
+ if (isBody) {
1252
+ getFrameElement(win);
1253
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], []);
1254
+ } else {
1255
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, []));
1256
+ }
1257
+ }
1258
+ function getFrameElement(win) {
1259
+ return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1260
+ }
1261
+ function getCssDimensions(element) {
1262
+ const css = getComputedStyle$1(element);
1263
+ let width = parseFloat(css.width) || 0;
1264
+ let height = parseFloat(css.height) || 0;
1265
+ const hasOffset = isHTMLElement(element);
1266
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
1267
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
1268
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
1269
+ if (shouldFallback) {
1270
+ width = offsetWidth;
1271
+ height = offsetHeight;
1272
+ }
1273
+ return {
1274
+ width,
1275
+ height,
1276
+ $: shouldFallback
1277
+ };
1278
+ }
1279
+ function unwrapElement(element) {
1280
+ return !isElement(element) ? element.contextElement : element;
1281
+ }
1282
+ function getScale(element) {
1283
+ const domElement = unwrapElement(element);
1284
+ if (!isHTMLElement(domElement)) {
1285
+ return createCoords(1);
1286
+ }
1287
+ const rect = domElement.getBoundingClientRect();
1288
+ const {
1289
+ width,
1290
+ height,
1291
+ $
1292
+ } = getCssDimensions(domElement);
1293
+ let x = ($ ? round(rect.width) : rect.width) / width;
1294
+ let y = ($ ? round(rect.height) : rect.height) / height;
1295
+ if (!x || !Number.isFinite(x)) {
1296
+ x = 1;
1297
+ }
1298
+ if (!y || !Number.isFinite(y)) {
1299
+ y = 1;
1300
+ }
1301
+ return {
1302
+ x,
1303
+ y
1304
+ };
1305
+ }
1306
+ const noOffsets = /* @__PURE__ */ createCoords(0);
1307
+ function getVisualOffsets(element) {
1308
+ const win = getWindow(element);
1309
+ if (!isWebKit() || !win.visualViewport) {
1310
+ return noOffsets;
1311
+ }
1312
+ return {
1313
+ x: win.visualViewport.offsetLeft,
1314
+ y: win.visualViewport.offsetTop
1315
+ };
1316
+ }
1317
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
1318
+ if (isFixed === void 0) {
1319
+ isFixed = false;
1320
+ }
1321
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
1322
+ return false;
1323
+ }
1324
+ return isFixed;
1325
+ }
1326
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
1327
+ if (includeScale === void 0) {
1328
+ includeScale = false;
1329
+ }
1330
+ if (isFixedStrategy === void 0) {
1331
+ isFixedStrategy = false;
1332
+ }
1333
+ const clientRect = element.getBoundingClientRect();
1334
+ const domElement = unwrapElement(element);
1335
+ let scale = createCoords(1);
1336
+ if (includeScale) {
1337
+ if (offsetParent) {
1338
+ if (isElement(offsetParent)) {
1339
+ scale = getScale(offsetParent);
1340
+ }
1341
+ } else {
1342
+ scale = getScale(element);
1343
+ }
1344
+ }
1345
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
1346
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
1347
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
1348
+ let width = clientRect.width / scale.x;
1349
+ let height = clientRect.height / scale.y;
1350
+ if (domElement) {
1351
+ const win = getWindow(domElement);
1352
+ const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
1353
+ let currentWin = win;
1354
+ let currentIFrame = getFrameElement(currentWin);
1355
+ while (currentIFrame && offsetParent && offsetWin !== currentWin) {
1356
+ const iframeScale = getScale(currentIFrame);
1357
+ const iframeRect = currentIFrame.getBoundingClientRect();
1358
+ const css = getComputedStyle$1(currentIFrame);
1359
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
1360
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
1361
+ x *= iframeScale.x;
1362
+ y *= iframeScale.y;
1363
+ width *= iframeScale.x;
1364
+ height *= iframeScale.y;
1365
+ x += left;
1366
+ y += top;
1367
+ currentWin = getWindow(currentIFrame);
1368
+ currentIFrame = getFrameElement(currentWin);
1369
+ }
1370
+ }
1371
+ return rectToClientRect({
1372
+ width,
1373
+ height,
1374
+ x,
1375
+ y
1376
+ });
1377
+ }
1378
+ function getWindowScrollBarX(element, rect) {
1379
+ const leftScroll = getNodeScroll(element).scrollLeft;
1380
+ if (!rect) {
1381
+ return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
1382
+ }
1383
+ return rect.left + leftScroll;
1384
+ }
1385
+ function getHTMLOffset(documentElement, scroll) {
1386
+ const htmlRect = documentElement.getBoundingClientRect();
1387
+ const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
1388
+ const y = htmlRect.top + scroll.scrollTop;
1389
+ return {
1390
+ x,
1391
+ y
1392
+ };
1393
+ }
1394
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1395
+ let {
1396
+ elements,
1397
+ rect,
1398
+ offsetParent,
1399
+ strategy
1400
+ } = _ref;
1401
+ const isFixed = strategy === "fixed";
1402
+ const documentElement = getDocumentElement(offsetParent);
1403
+ const topLayer = elements ? isTopLayer(elements.floating) : false;
1404
+ if (offsetParent === documentElement || topLayer && isFixed) {
1405
+ return rect;
1406
+ }
1407
+ let scroll = {
1408
+ scrollLeft: 0,
1409
+ scrollTop: 0
1410
+ };
1411
+ let scale = createCoords(1);
1412
+ const offsets = createCoords(0);
1413
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1414
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1415
+ if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
1416
+ scroll = getNodeScroll(offsetParent);
1417
+ }
1418
+ if (isOffsetParentAnElement) {
1419
+ const offsetRect = getBoundingClientRect(offsetParent);
1420
+ scale = getScale(offsetParent);
1421
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1422
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1423
+ }
1424
+ }
1425
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1426
+ return {
1427
+ width: rect.width * scale.x,
1428
+ height: rect.height * scale.y,
1429
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
1430
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
1431
+ };
1432
+ }
1433
+ function getClientRects(element) {
1434
+ return Array.from(element.getClientRects());
1435
+ }
1436
+ function getDocumentRect(element) {
1437
+ const html = getDocumentElement(element);
1438
+ const scroll = getNodeScroll(element);
1439
+ const body = element.ownerDocument.body;
1440
+ const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
1441
+ const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
1442
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
1443
+ const y = -scroll.scrollTop;
1444
+ if (getComputedStyle$1(body).direction === "rtl") {
1445
+ x += max(html.clientWidth, body.clientWidth) - width;
1446
+ }
1447
+ return {
1448
+ width,
1449
+ height,
1450
+ x,
1451
+ y
1452
+ };
1453
+ }
1454
+ const SCROLLBAR_MAX = 25;
1455
+ function getViewportRect(element, strategy) {
1456
+ const win = getWindow(element);
1457
+ const html = getDocumentElement(element);
1458
+ const visualViewport = win.visualViewport;
1459
+ let width = html.clientWidth;
1460
+ let height = html.clientHeight;
1461
+ let x = 0;
1462
+ let y = 0;
1463
+ if (visualViewport) {
1464
+ width = visualViewport.width;
1465
+ height = visualViewport.height;
1466
+ const visualViewportBased = isWebKit();
1467
+ if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
1468
+ x = visualViewport.offsetLeft;
1469
+ y = visualViewport.offsetTop;
1470
+ }
1471
+ }
1472
+ const windowScrollbarX = getWindowScrollBarX(html);
1473
+ if (windowScrollbarX <= 0) {
1474
+ const doc = html.ownerDocument;
1475
+ const body = doc.body;
1476
+ const bodyStyles = getComputedStyle(body);
1477
+ const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
1478
+ const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
1479
+ if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
1480
+ width -= clippingStableScrollbarWidth;
1481
+ }
1482
+ } else if (windowScrollbarX <= SCROLLBAR_MAX) {
1483
+ width += windowScrollbarX;
1484
+ }
1485
+ return {
1486
+ width,
1487
+ height,
1488
+ x,
1489
+ y
1490
+ };
1491
+ }
1492
+ function getInnerBoundingClientRect(element, strategy) {
1493
+ const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
1494
+ const top = clientRect.top + element.clientTop;
1495
+ const left = clientRect.left + element.clientLeft;
1496
+ const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
1497
+ const width = element.clientWidth * scale.x;
1498
+ const height = element.clientHeight * scale.y;
1499
+ const x = left * scale.x;
1500
+ const y = top * scale.y;
1501
+ return {
1502
+ width,
1503
+ height,
1504
+ x,
1505
+ y
1506
+ };
1507
+ }
1508
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
1509
+ let rect;
1510
+ if (clippingAncestor === "viewport") {
1511
+ rect = getViewportRect(element, strategy);
1512
+ } else if (clippingAncestor === "document") {
1513
+ rect = getDocumentRect(getDocumentElement(element));
1514
+ } else if (isElement(clippingAncestor)) {
1515
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
1516
+ } else {
1517
+ const visualOffsets = getVisualOffsets(element);
1518
+ rect = {
1519
+ x: clippingAncestor.x - visualOffsets.x,
1520
+ y: clippingAncestor.y - visualOffsets.y,
1521
+ width: clippingAncestor.width,
1522
+ height: clippingAncestor.height
1523
+ };
1524
+ }
1525
+ return rectToClientRect(rect);
1526
+ }
1527
+ function hasFixedPositionAncestor(element, stopNode) {
1528
+ const parentNode = getParentNode(element);
1529
+ if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
1530
+ return false;
1531
+ }
1532
+ return getComputedStyle$1(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
1533
+ }
1534
+ function getClippingElementAncestors(element, cache) {
1535
+ const cachedResult = cache.get(element);
1536
+ if (cachedResult) {
1537
+ return cachedResult;
1538
+ }
1539
+ let result = getOverflowAncestors(element, []).filter((el) => isElement(el) && getNodeName(el) !== "body");
1540
+ let currentContainingBlockComputedStyle = null;
1541
+ const elementIsFixed = getComputedStyle$1(element).position === "fixed";
1542
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
1543
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1544
+ const computedStyle = getComputedStyle$1(currentNode);
1545
+ const currentNodeIsContaining = isContainingBlock(currentNode);
1546
+ if (!currentNodeIsContaining && computedStyle.position === "fixed") {
1547
+ currentContainingBlockComputedStyle = null;
1548
+ }
1549
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
1550
+ if (shouldDropCurrentNode) {
1551
+ result = result.filter((ancestor) => ancestor !== currentNode);
1552
+ } else {
1553
+ currentContainingBlockComputedStyle = computedStyle;
1554
+ }
1555
+ currentNode = getParentNode(currentNode);
1556
+ }
1557
+ cache.set(element, result);
1558
+ return result;
1559
+ }
1560
+ function getClippingRect(_ref) {
1561
+ let {
1562
+ element,
1563
+ boundary,
1564
+ rootBoundary,
1565
+ strategy
1566
+ } = _ref;
1567
+ const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
1568
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
1569
+ const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
1570
+ let top = firstRect.top;
1571
+ let right = firstRect.right;
1572
+ let bottom = firstRect.bottom;
1573
+ let left = firstRect.left;
1574
+ for (let i = 1; i < clippingAncestors.length; i++) {
1575
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
1576
+ top = max(rect.top, top);
1577
+ right = min(rect.right, right);
1578
+ bottom = min(rect.bottom, bottom);
1579
+ left = max(rect.left, left);
1580
+ }
1581
+ return {
1582
+ width: right - left,
1583
+ height: bottom - top,
1584
+ x: left,
1585
+ y: top
1586
+ };
1587
+ }
1588
+ function getDimensions(element) {
1589
+ const {
1590
+ width,
1591
+ height
1592
+ } = getCssDimensions(element);
1593
+ return {
1594
+ width,
1595
+ height
1596
+ };
1597
+ }
1598
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1599
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1600
+ const documentElement = getDocumentElement(offsetParent);
1601
+ const isFixed = strategy === "fixed";
1602
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
1603
+ let scroll = {
1604
+ scrollLeft: 0,
1605
+ scrollTop: 0
1606
+ };
1607
+ const offsets = createCoords(0);
1608
+ function setLeftRTLScrollbarOffset() {
1609
+ offsets.x = getWindowScrollBarX(documentElement);
1610
+ }
1611
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1612
+ if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
1613
+ scroll = getNodeScroll(offsetParent);
1614
+ }
1615
+ if (isOffsetParentAnElement) {
1616
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
1617
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1618
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1619
+ } else if (documentElement) {
1620
+ setLeftRTLScrollbarOffset();
1621
+ }
1622
+ }
1623
+ if (isFixed && !isOffsetParentAnElement && documentElement) {
1624
+ setLeftRTLScrollbarOffset();
1625
+ }
1626
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1627
+ const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
1628
+ const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
1629
+ return {
1630
+ x,
1631
+ y,
1632
+ width: rect.width,
1633
+ height: rect.height
1634
+ };
1635
+ }
1636
+ function isStaticPositioned(element) {
1637
+ return getComputedStyle$1(element).position === "static";
1638
+ }
1639
+ function getTrueOffsetParent(element, polyfill) {
1640
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") {
1641
+ return null;
1642
+ }
1643
+ if (polyfill) {
1644
+ return polyfill(element);
1645
+ }
1646
+ let rawOffsetParent = element.offsetParent;
1647
+ if (getDocumentElement(element) === rawOffsetParent) {
1648
+ rawOffsetParent = rawOffsetParent.ownerDocument.body;
1649
+ }
1650
+ return rawOffsetParent;
1651
+ }
1652
+ function getOffsetParent(element, polyfill) {
1653
+ const win = getWindow(element);
1654
+ if (isTopLayer(element)) {
1655
+ return win;
1656
+ }
1657
+ if (!isHTMLElement(element)) {
1658
+ let svgOffsetParent = getParentNode(element);
1659
+ while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
1660
+ if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
1661
+ return svgOffsetParent;
1662
+ }
1663
+ svgOffsetParent = getParentNode(svgOffsetParent);
1664
+ }
1665
+ return win;
1666
+ }
1667
+ let offsetParent = getTrueOffsetParent(element, polyfill);
1668
+ while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
1669
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
1670
+ }
1671
+ if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
1672
+ return win;
1673
+ }
1674
+ return offsetParent || getContainingBlock(element) || win;
1675
+ }
1676
+ const getElementRects = async function(data) {
1677
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
1678
+ const getDimensionsFn = this.getDimensions;
1679
+ const floatingDimensions = await getDimensionsFn(data.floating);
1680
+ return {
1681
+ reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
1682
+ floating: {
1683
+ x: 0,
1684
+ y: 0,
1685
+ width: floatingDimensions.width,
1686
+ height: floatingDimensions.height
1687
+ }
1688
+ };
1689
+ };
1690
+ function isRTL(element) {
1691
+ return getComputedStyle$1(element).direction === "rtl";
1692
+ }
1693
+ const platform = {
1694
+ convertOffsetParentRelativeRectToViewportRelativeRect,
1695
+ getDocumentElement,
1696
+ getClippingRect,
1697
+ getOffsetParent,
1698
+ getElementRects,
1699
+ getClientRects,
1700
+ getDimensions,
1701
+ getScale,
1702
+ isElement,
1703
+ isRTL
1704
+ };
1705
+ const offset = offset$1;
1706
+ const shift = shift$1;
1707
+ const flip = flip$1;
1708
+ const size = size$1;
1709
+ const hide = hide$1;
1710
+ const arrow = arrow$1;
1711
+ const limitShift = limitShift$1;
1712
+ const computePosition = (reference, floating, options) => {
1713
+ const cache = /* @__PURE__ */ new Map();
1714
+ const mergedOptions = {
1715
+ platform,
1716
+ ...options
1717
+ };
1718
+ const platformWithCache = {
1719
+ ...mergedOptions.platform,
1720
+ _c: cache
1721
+ };
1722
+ return computePosition$1(reference, floating, {
1723
+ ...mergedOptions,
1724
+ platform: platformWithCache
1725
+ });
1726
+ };
1727
+ function get(valueOrGetValue) {
1728
+ return typeof valueOrGetValue === "function" ? valueOrGetValue() : valueOrGetValue;
1729
+ }
1730
+ function getDPR(element) {
1731
+ if (typeof window === "undefined") return 1;
1732
+ const win = element.ownerDocument.defaultView || window;
1733
+ return win.devicePixelRatio || 1;
1734
+ }
1735
+ function roundByDPR(element, value) {
1736
+ const dpr = getDPR(element);
1737
+ return Math.round(value * dpr) / dpr;
1738
+ }
1739
+ function getFloatingContentCSSVars(name) {
1740
+ return {
1741
+ [`--bits-${name}-content-transform-origin`]: `var(--bits-floating-transform-origin)`,
1742
+ [`--bits-${name}-content-available-width`]: `var(--bits-floating-available-width)`,
1743
+ [`--bits-${name}-content-available-height`]: `var(--bits-floating-available-height)`,
1744
+ [`--bits-${name}-anchor-width`]: `var(--bits-floating-anchor-width)`,
1745
+ [`--bits-${name}-anchor-height`]: `var(--bits-floating-anchor-height)`
1746
+ };
1747
+ }
1748
+ function useFloating(options) {
1749
+ const openOption = derived(() => get(options.open) ?? true);
1750
+ const middlewareOption = derived(() => get(options.middleware));
1751
+ const transformOption = derived(() => get(options.transform) ?? true);
1752
+ const placementOption = derived(() => get(options.placement) ?? "bottom");
1753
+ const strategyOption = derived(() => get(options.strategy) ?? "absolute");
1754
+ const sideOffsetOption = derived(() => get(options.sideOffset) ?? 0);
1755
+ const alignOffsetOption = derived(() => get(options.alignOffset) ?? 0);
1756
+ const reference = options.reference;
1757
+ let x = 0;
1758
+ let y = 0;
1759
+ const floating = simpleBox(null);
1760
+ let strategy = strategyOption();
1761
+ let placement = placementOption();
1762
+ let middlewareData = {};
1763
+ let isPositioned = false;
1764
+ let updateRequestId = 0;
1765
+ const floatingStyles = derived(() => {
1766
+ const xVal = floating.current ? roundByDPR(floating.current, x) : x;
1767
+ const yVal = floating.current ? roundByDPR(floating.current, y) : y;
1768
+ if (transformOption()) {
1769
+ return {
1770
+ position: strategy,
1771
+ left: "0",
1772
+ top: "0",
1773
+ transform: `translate(${xVal}px, ${yVal}px)`,
1774
+ ...floating.current && getDPR(floating.current) >= 1.5 && { willChange: "transform" }
1775
+ };
1776
+ }
1777
+ return { position: strategy, left: `${xVal}px`, top: `${yVal}px` };
1778
+ });
1779
+ function update() {
1780
+ if (reference.current === null || floating.current === null) return;
1781
+ const referenceNode = reference.current;
1782
+ const floatingNode = floating.current;
1783
+ const requestId = ++updateRequestId;
1784
+ computePosition(referenceNode, floatingNode, {
1785
+ middleware: middlewareOption(),
1786
+ placement: placementOption(),
1787
+ strategy: strategyOption()
1788
+ }).then((position) => {
1789
+ if (requestId !== updateRequestId) return;
1790
+ if (reference.current !== referenceNode || floating.current !== floatingNode) return;
1791
+ const referenceHidden = isReferenceHidden(referenceNode);
1792
+ if (referenceHidden) {
1793
+ middlewareData = {
1794
+ ...middlewareData,
1795
+ hide: {
1796
+ // oxlint-disable-next-line no-explicit-any
1797
+ ...middlewareData.hide,
1798
+ referenceHidden: true
1799
+ }
1800
+ };
1801
+ return;
1802
+ }
1803
+ if (!openOption() && x !== 0 && y !== 0) {
1804
+ const maxExpectedOffset = Math.max(Math.abs(sideOffsetOption()), Math.abs(alignOffsetOption()), 15);
1805
+ if (position.x <= maxExpectedOffset && position.y <= maxExpectedOffset) return;
1806
+ }
1807
+ x = position.x;
1808
+ y = position.y;
1809
+ strategy = position.strategy;
1810
+ placement = position.placement;
1811
+ middlewareData = position.middlewareData;
1812
+ isPositioned = true;
1813
+ });
1814
+ }
1815
+ return {
1816
+ floating,
1817
+ reference,
1818
+ get strategy() {
1819
+ return strategy;
1820
+ },
1821
+ get placement() {
1822
+ return placement;
1823
+ },
1824
+ get middlewareData() {
1825
+ return middlewareData;
1826
+ },
1827
+ get isPositioned() {
1828
+ return isPositioned;
1829
+ },
1830
+ get floatingStyles() {
1831
+ return floatingStyles();
1832
+ },
1833
+ get update() {
1834
+ return update;
1835
+ }
1836
+ };
1837
+ }
1838
+ function isReferenceHidden(node) {
1839
+ if (!(node instanceof Element)) return false;
1840
+ if (!node.isConnected) return true;
1841
+ if (node instanceof HTMLElement && node.hidden) return true;
1842
+ return node.getClientRects().length === 0;
1843
+ }
1844
+ const OPPOSITE_SIDE = { top: "bottom", right: "left", bottom: "top", left: "right" };
1845
+ const FloatingRootContext = new Context("Floating.Root");
1846
+ const FloatingContentContext = new Context("Floating.Content");
1847
+ const FloatingTooltipRootContext = new Context("Floating.Root");
1848
+ class FloatingRootState {
1849
+ static create(tooltip = false) {
1850
+ return tooltip ? FloatingTooltipRootContext.set(new FloatingRootState()) : FloatingRootContext.set(new FloatingRootState());
1851
+ }
1852
+ anchorNode = simpleBox(null);
1853
+ customAnchorNode = simpleBox(null);
1854
+ triggerNode = simpleBox(null);
1855
+ constructor() {
1856
+ }
1857
+ }
1858
+ class FloatingContentState {
1859
+ static create(opts, tooltip = false) {
1860
+ return tooltip ? FloatingContentContext.set(new FloatingContentState(opts, FloatingTooltipRootContext.get())) : FloatingContentContext.set(new FloatingContentState(opts, FloatingRootContext.get()));
1861
+ }
1862
+ opts;
1863
+ root;
1864
+ // nodes
1865
+ contentRef = simpleBox(null);
1866
+ wrapperRef = simpleBox(null);
1867
+ arrowRef = simpleBox(null);
1868
+ contentAttachment = attachRef(this.contentRef);
1869
+ wrapperAttachment = attachRef(this.wrapperRef);
1870
+ arrowAttachment = attachRef(this.arrowRef);
1871
+ // ids
1872
+ arrowId = simpleBox(useId());
1873
+ #transformedStyle = derived(() => {
1874
+ if (typeof this.opts.style === "string") return cssToStyleObj(this.opts.style);
1875
+ if (!this.opts.style) return {};
1876
+ });
1877
+ #updatePositionStrategy = void 0;
1878
+ #arrowSize = new ElementSize(() => this.arrowRef.current ?? void 0);
1879
+ #arrowWidth = derived(() => this.#arrowSize?.width ?? 0);
1880
+ #arrowHeight = derived(() => this.#arrowSize?.height ?? 0);
1881
+ #desiredPlacement = derived(() => this.opts.side?.current + (this.opts.align.current !== "center" ? `-${this.opts.align.current}` : ""));
1882
+ #boundary = derived(() => Array.isArray(this.opts.collisionBoundary.current) ? this.opts.collisionBoundary.current : [this.opts.collisionBoundary.current]);
1883
+ #hasExplicitBoundaries = derived(() => this.#boundary().length > 0);
1884
+ get hasExplicitBoundaries() {
1885
+ return this.#hasExplicitBoundaries();
1886
+ }
1887
+ set hasExplicitBoundaries($$value) {
1888
+ return this.#hasExplicitBoundaries($$value);
1889
+ }
1890
+ #detectOverflowOptions = derived(() => ({
1891
+ padding: this.opts.collisionPadding.current,
1892
+ boundary: this.#boundary().filter(isNotNull),
1893
+ altBoundary: this.hasExplicitBoundaries
1894
+ }));
1895
+ get detectOverflowOptions() {
1896
+ return this.#detectOverflowOptions();
1897
+ }
1898
+ set detectOverflowOptions($$value) {
1899
+ return this.#detectOverflowOptions($$value);
1900
+ }
1901
+ #availableWidth = void 0;
1902
+ #availableHeight = void 0;
1903
+ #anchorWidth = void 0;
1904
+ #anchorHeight = void 0;
1905
+ #middleware = derived(() => [
1906
+ offset({
1907
+ mainAxis: this.opts.sideOffset.current + this.#arrowHeight(),
1908
+ alignmentAxis: this.opts.alignOffset.current
1909
+ }),
1910
+ this.opts.avoidCollisions.current && shift({
1911
+ mainAxis: true,
1912
+ crossAxis: false,
1913
+ limiter: this.opts.sticky.current === "partial" ? limitShift() : void 0,
1914
+ ...this.detectOverflowOptions
1915
+ }),
1916
+ this.opts.avoidCollisions.current && flip({ ...this.detectOverflowOptions }),
1917
+ size({
1918
+ ...this.detectOverflowOptions,
1919
+ apply: ({ rects, availableWidth, availableHeight }) => {
1920
+ const { width: anchorWidth, height: anchorHeight } = rects.reference;
1921
+ this.#availableWidth = availableWidth;
1922
+ this.#availableHeight = availableHeight;
1923
+ this.#anchorWidth = anchorWidth;
1924
+ this.#anchorHeight = anchorHeight;
1925
+ }
1926
+ }),
1927
+ this.arrowRef.current && arrow({
1928
+ element: this.arrowRef.current,
1929
+ padding: this.opts.arrowPadding.current
1930
+ }),
1931
+ transformOrigin({
1932
+ arrowWidth: this.#arrowWidth(),
1933
+ arrowHeight: this.#arrowHeight()
1934
+ }),
1935
+ this.opts.hideWhenDetached.current && hide({ strategy: "referenceHidden", ...this.detectOverflowOptions })
1936
+ ].filter(Boolean));
1937
+ get middleware() {
1938
+ return this.#middleware();
1939
+ }
1940
+ set middleware($$value) {
1941
+ return this.#middleware($$value);
1942
+ }
1943
+ floating;
1944
+ #placedSide = derived(() => getSideFromPlacement(this.floating.placement));
1945
+ get placedSide() {
1946
+ return this.#placedSide();
1947
+ }
1948
+ set placedSide($$value) {
1949
+ return this.#placedSide($$value);
1950
+ }
1951
+ #placedAlign = derived(() => getAlignFromPlacement(this.floating.placement));
1952
+ get placedAlign() {
1953
+ return this.#placedAlign();
1954
+ }
1955
+ set placedAlign($$value) {
1956
+ return this.#placedAlign($$value);
1957
+ }
1958
+ #arrowX = derived(() => this.floating.middlewareData.arrow?.x ?? 0);
1959
+ get arrowX() {
1960
+ return this.#arrowX();
1961
+ }
1962
+ set arrowX($$value) {
1963
+ return this.#arrowX($$value);
1964
+ }
1965
+ #arrowY = derived(() => this.floating.middlewareData.arrow?.y ?? 0);
1966
+ get arrowY() {
1967
+ return this.#arrowY();
1968
+ }
1969
+ set arrowY($$value) {
1970
+ return this.#arrowY($$value);
1971
+ }
1972
+ #cannotCenterArrow = derived(() => this.floating.middlewareData.arrow?.centerOffset !== 0);
1973
+ get cannotCenterArrow() {
1974
+ return this.#cannotCenterArrow();
1975
+ }
1976
+ set cannotCenterArrow($$value) {
1977
+ return this.#cannotCenterArrow($$value);
1978
+ }
1979
+ contentZIndex;
1980
+ #arrowBaseSide = derived(() => OPPOSITE_SIDE[this.placedSide]);
1981
+ get arrowBaseSide() {
1982
+ return this.#arrowBaseSide();
1983
+ }
1984
+ set arrowBaseSide($$value) {
1985
+ return this.#arrowBaseSide($$value);
1986
+ }
1987
+ #wrapperProps = derived(() => ({
1988
+ id: this.opts.wrapperId.current,
1989
+ "data-bits-floating-content-wrapper": "",
1990
+ style: {
1991
+ ...this.floating.floatingStyles,
1992
+ transform: this.floating.isPositioned ? this.floating.floatingStyles.transform : "translate(0, -200%)",
1993
+ minWidth: "max-content",
1994
+ zIndex: this.contentZIndex,
1995
+ "--bits-floating-transform-origin": `${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,
1996
+ "--bits-floating-available-width": `${this.#availableWidth}px`,
1997
+ "--bits-floating-available-height": `${this.#availableHeight}px`,
1998
+ "--bits-floating-anchor-width": `${this.#anchorWidth}px`,
1999
+ "--bits-floating-anchor-height": `${this.#anchorHeight}px`,
2000
+ ...this.floating.middlewareData.hide?.referenceHidden && { visibility: "hidden", "pointer-events": "none" },
2001
+ ...this.#transformedStyle()
2002
+ },
2003
+ dir: this.opts.dir.current,
2004
+ ...this.wrapperAttachment
2005
+ }));
2006
+ get wrapperProps() {
2007
+ return this.#wrapperProps();
2008
+ }
2009
+ set wrapperProps($$value) {
2010
+ return this.#wrapperProps($$value);
2011
+ }
2012
+ #props = derived(() => ({
2013
+ "data-side": this.placedSide,
2014
+ "data-align": this.placedAlign,
2015
+ style: styleToString({ ...this.#transformedStyle() }),
2016
+ ...this.contentAttachment
2017
+ }));
2018
+ get props() {
2019
+ return this.#props();
2020
+ }
2021
+ set props($$value) {
2022
+ return this.#props($$value);
2023
+ }
2024
+ #arrowStyle = derived(() => ({
2025
+ position: "absolute",
2026
+ left: this.arrowX ? `${this.arrowX}px` : void 0,
2027
+ top: this.arrowY ? `${this.arrowY}px` : void 0,
2028
+ [this.arrowBaseSide]: 0,
2029
+ "transform-origin": { top: "", right: "0 0", bottom: "center 0", left: "100% 0" }[this.placedSide],
2030
+ transform: {
2031
+ top: "translateY(100%)",
2032
+ right: "translateY(50%) rotate(90deg) translateX(-50%)",
2033
+ bottom: "rotate(180deg)",
2034
+ left: "translateY(50%) rotate(-90deg) translateX(50%)"
2035
+ }[this.placedSide],
2036
+ visibility: this.cannotCenterArrow ? "hidden" : void 0
2037
+ }));
2038
+ get arrowStyle() {
2039
+ return this.#arrowStyle();
2040
+ }
2041
+ set arrowStyle($$value) {
2042
+ return this.#arrowStyle($$value);
2043
+ }
2044
+ constructor(opts, root) {
2045
+ this.opts = opts;
2046
+ this.root = root;
2047
+ this.#updatePositionStrategy = opts.updatePositionStrategy;
2048
+ if (opts.customAnchor) {
2049
+ this.root.customAnchorNode.current = opts.customAnchor.current;
2050
+ }
2051
+ watch(() => opts.customAnchor.current, (customAnchor) => {
2052
+ this.root.customAnchorNode.current = customAnchor;
2053
+ });
2054
+ this.floating = useFloating({
2055
+ strategy: () => this.opts.strategy.current,
2056
+ placement: () => this.#desiredPlacement(),
2057
+ middleware: () => this.middleware,
2058
+ reference: this.root.anchorNode,
2059
+ open: () => this.opts.enabled.current,
2060
+ sideOffset: () => this.opts.sideOffset.current,
2061
+ alignOffset: () => this.opts.alignOffset.current
2062
+ });
2063
+ watch(() => this.contentRef.current, (contentNode) => {
2064
+ if (!contentNode || !this.opts.enabled.current) return;
2065
+ const win = getWindow$1(contentNode);
2066
+ const rafId = win.requestAnimationFrame(() => {
2067
+ if (this.contentRef.current !== contentNode || !this.opts.enabled.current) return;
2068
+ const zIndex = win.getComputedStyle(contentNode).zIndex;
2069
+ if (zIndex !== this.contentZIndex) {
2070
+ this.contentZIndex = zIndex;
2071
+ }
2072
+ });
2073
+ return () => {
2074
+ win.cancelAnimationFrame(rafId);
2075
+ };
2076
+ });
2077
+ }
2078
+ }
2079
+ class FloatingAnchorState {
2080
+ static create(opts, tooltip = false) {
2081
+ return tooltip ? new FloatingAnchorState(opts, FloatingTooltipRootContext.get()) : new FloatingAnchorState(opts, FloatingRootContext.get());
2082
+ }
2083
+ opts;
2084
+ root;
2085
+ constructor(opts, root) {
2086
+ this.opts = opts;
2087
+ this.root = root;
2088
+ if (opts.virtualEl && opts.virtualEl.current) {
2089
+ root.triggerNode = boxFrom(opts.virtualEl.current);
2090
+ } else {
2091
+ root.triggerNode = opts.ref;
2092
+ }
2093
+ }
2094
+ }
2095
+ function transformOrigin(options) {
2096
+ return {
2097
+ name: "transformOrigin",
2098
+ options,
2099
+ fn(data) {
2100
+ const { placement, rects, middlewareData } = data;
2101
+ const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
2102
+ const isArrowHidden = cannotCenterArrow;
2103
+ const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
2104
+ const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
2105
+ const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
2106
+ const noArrowAlign = { start: "0%", center: "50%", end: "100%" }[placedAlign];
2107
+ const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;
2108
+ const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;
2109
+ let x = "";
2110
+ let y = "";
2111
+ if (placedSide === "bottom") {
2112
+ x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
2113
+ y = `${-arrowHeight}px`;
2114
+ } else if (placedSide === "top") {
2115
+ x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
2116
+ y = `${rects.floating.height + arrowHeight}px`;
2117
+ } else if (placedSide === "right") {
2118
+ x = `${-arrowHeight}px`;
2119
+ y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
2120
+ } else if (placedSide === "left") {
2121
+ x = `${rects.floating.width + arrowHeight}px`;
2122
+ y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
2123
+ }
2124
+ return { data: { x, y } };
2125
+ }
2126
+ };
2127
+ }
2128
+ function getSideAndAlignFromPlacement(placement) {
2129
+ const [side, align = "center"] = placement.split("-");
2130
+ return [side, align];
2131
+ }
2132
+ function getSideFromPlacement(placement) {
2133
+ return getSideAndAlignFromPlacement(placement)[0];
2134
+ }
2135
+ function getAlignFromPlacement(placement) {
2136
+ return getSideAndAlignFromPlacement(placement)[1];
2137
+ }
2138
+ function Floating_layer($$renderer, $$props) {
2139
+ $$renderer.component(($$renderer2) => {
2140
+ let { children, tooltip = false } = $$props;
2141
+ FloatingRootState.create(tooltip);
2142
+ children?.($$renderer2);
2143
+ $$renderer2.push(`<!---->`);
2144
+ });
2145
+ }
2146
+ class DataTypeahead {
2147
+ #opts;
2148
+ #candidateValues = derived(() => this.#opts.candidateValues());
2149
+ #search;
2150
+ constructor(opts) {
2151
+ this.#opts = opts;
2152
+ this.#search = boxAutoReset("", { afterMs: 1e3, getWindow: this.#opts.getWindow });
2153
+ this.handleTypeaheadSearch = this.handleTypeaheadSearch.bind(this);
2154
+ this.resetTypeahead = this.resetTypeahead.bind(this);
2155
+ }
2156
+ handleTypeaheadSearch(key) {
2157
+ if (!this.#opts.enabled() || !this.#candidateValues().length) return;
2158
+ this.#search.current = this.#search.current + key;
2159
+ const currentItem = this.#opts.getCurrentItem();
2160
+ const currentMatch = this.#candidateValues().find((item) => item === currentItem) ?? "";
2161
+ const values = this.#candidateValues().map((item) => item ?? "");
2162
+ const nextMatch = getNextMatch(values, this.#search.current, currentMatch);
2163
+ const newItem = this.#candidateValues().find((item) => item === nextMatch);
2164
+ if (newItem) {
2165
+ this.#opts.onMatch(newItem);
2166
+ }
2167
+ return newItem;
2168
+ }
2169
+ resetTypeahead() {
2170
+ this.#search.current = "";
2171
+ }
2172
+ }
2173
+ const FIRST_KEYS = [ARROW_DOWN, PAGE_UP, HOME];
2174
+ const LAST_KEYS = [ARROW_UP, PAGE_DOWN, END];
2175
+ const FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];
2176
+ const selectAttrs = createBitsAttrs({
2177
+ component: "select",
2178
+ parts: [
2179
+ "trigger",
2180
+ "content",
2181
+ "item",
2182
+ "viewport",
2183
+ "scroll-up-button",
2184
+ "scroll-down-button",
2185
+ "group",
2186
+ "group-label",
2187
+ "separator",
2188
+ "arrow",
2189
+ "input",
2190
+ "content-wrapper",
2191
+ "item-text",
2192
+ "value"
2193
+ ]
2194
+ });
2195
+ const SelectRootContext = new Context("Select.Root | Combobox.Root");
2196
+ const SelectContentContext = new Context("Select.Content | Combobox.Content");
2197
+ class SelectBaseRootState {
2198
+ opts;
2199
+ touchedInput = false;
2200
+ inputNode = null;
2201
+ contentNode = null;
2202
+ contentPresence;
2203
+ viewportNode = null;
2204
+ triggerNode = null;
2205
+ valueNode = null;
2206
+ valueId = "";
2207
+ highlightedNode = null;
2208
+ #highlightedValue = derived(() => {
2209
+ if (!this.highlightedNode) return null;
2210
+ return this.highlightedNode.getAttribute("data-value");
2211
+ });
2212
+ get highlightedValue() {
2213
+ return this.#highlightedValue();
2214
+ }
2215
+ set highlightedValue($$value) {
2216
+ return this.#highlightedValue($$value);
2217
+ }
2218
+ #highlightedId = derived(() => {
2219
+ if (!this.highlightedNode) return void 0;
2220
+ return this.highlightedNode.id;
2221
+ });
2222
+ get highlightedId() {
2223
+ return this.#highlightedId();
2224
+ }
2225
+ set highlightedId($$value) {
2226
+ return this.#highlightedId($$value);
2227
+ }
2228
+ #highlightedLabel = derived(() => {
2229
+ if (!this.highlightedNode) return null;
2230
+ return this.highlightedNode.getAttribute("data-label");
2231
+ });
2232
+ get highlightedLabel() {
2233
+ return this.#highlightedLabel();
2234
+ }
2235
+ set highlightedLabel($$value) {
2236
+ return this.#highlightedLabel($$value);
2237
+ }
2238
+ contentIsPositioned = false;
2239
+ isUsingKeyboard = false;
2240
+ isCombobox = false;
2241
+ domContext = new DOMContext(() => null);
2242
+ constructor(opts) {
2243
+ this.opts = opts;
2244
+ this.isCombobox = opts.isCombobox;
2245
+ this.contentPresence = new PresenceManager({
2246
+ ref: boxWith(() => this.contentNode),
2247
+ open: this.opts.open,
2248
+ onComplete: () => {
2249
+ this.opts.onOpenChangeComplete.current(this.opts.open.current);
2250
+ }
2251
+ });
2252
+ }
2253
+ setHighlightedNode(node, initial = false) {
2254
+ this.highlightedNode = node;
2255
+ if (node && (this.isUsingKeyboard || initial)) {
2256
+ this.scrollHighlightedNodeIntoView(node);
2257
+ }
2258
+ }
2259
+ scrollHighlightedNodeIntoView(node) {
2260
+ if (!this.viewportNode || !this.contentIsPositioned) return;
2261
+ node.scrollIntoView({ block: this.opts.scrollAlignment.current });
2262
+ }
2263
+ getCandidateNodes() {
2264
+ const node = this.contentNode;
2265
+ if (!node) return [];
2266
+ return Array.from(node.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`));
2267
+ }
2268
+ setHighlightedToFirstCandidate(initial = false) {
2269
+ this.setHighlightedNode(null);
2270
+ let nodes = this.getCandidateNodes();
2271
+ if (!nodes.length) return;
2272
+ if (this.viewportNode) {
2273
+ const viewportRect = this.viewportNode.getBoundingClientRect();
2274
+ nodes = nodes.filter((node) => {
2275
+ if (!this.viewportNode) return false;
2276
+ const nodeRect = node.getBoundingClientRect();
2277
+ const isNodeFullyVisible = nodeRect.right <= viewportRect.right && nodeRect.left >= viewportRect.left && nodeRect.bottom <= viewportRect.bottom && nodeRect.top >= viewportRect.top;
2278
+ return isNodeFullyVisible;
2279
+ });
2280
+ }
2281
+ this.setHighlightedNode(nodes[0], initial);
2282
+ }
2283
+ getNodeByValue(value) {
2284
+ const candidateNodes = this.getCandidateNodes();
2285
+ return candidateNodes.find((node) => node.dataset.value === value) ?? null;
2286
+ }
2287
+ /**
2288
+ * Resolves the display label for a value: `items` entry when present, otherwise the
2289
+ * mounted item's `data-label` or its text content.
2290
+ */
2291
+ getLabelForValue(value) {
2292
+ if (value === "") return "";
2293
+ const fromItems = this.opts.items.current.find((item) => item.value === value)?.label;
2294
+ if (fromItems !== void 0) return fromItems;
2295
+ const node = this.getNodeByValue(value);
2296
+ if (node) {
2297
+ const dataLabel = node.getAttribute("data-label");
2298
+ if (dataLabel !== null && dataLabel !== "") return dataLabel;
2299
+ return node.textContent?.trim() ?? value;
2300
+ }
2301
+ return value;
2302
+ }
2303
+ setOpen(open) {
2304
+ this.opts.open.current = open;
2305
+ }
2306
+ toggleOpen() {
2307
+ this.opts.open.current = !this.opts.open.current;
2308
+ }
2309
+ handleOpen() {
2310
+ this.setOpen(true);
2311
+ }
2312
+ handleClose() {
2313
+ this.setHighlightedNode(null);
2314
+ this.setOpen(false);
2315
+ }
2316
+ toggleMenu() {
2317
+ this.toggleOpen();
2318
+ }
2319
+ getBitsAttr = (part) => {
2320
+ return selectAttrs.getAttr(part, this.isCombobox ? "combobox" : void 0);
2321
+ };
2322
+ }
2323
+ class SelectSingleRootState extends SelectBaseRootState {
2324
+ opts;
2325
+ isMulti = false;
2326
+ #hasValue = derived(() => this.opts.value.current !== "");
2327
+ get hasValue() {
2328
+ return this.#hasValue();
2329
+ }
2330
+ set hasValue($$value) {
2331
+ return this.#hasValue($$value);
2332
+ }
2333
+ #currentLabel = derived(() => {
2334
+ if (!this.opts.items.current.length) return "";
2335
+ return this.opts.items.current.find((item) => item.value === this.opts.value.current)?.label ?? "";
2336
+ });
2337
+ get currentLabel() {
2338
+ return this.#currentLabel();
2339
+ }
2340
+ set currentLabel($$value) {
2341
+ return this.#currentLabel($$value);
2342
+ }
2343
+ #candidateLabels = derived(() => {
2344
+ if (!this.opts.items.current.length) return [];
2345
+ const filteredItems = this.opts.items.current.filter((item) => !item.disabled);
2346
+ return filteredItems.map((item) => item.label);
2347
+ });
2348
+ get candidateLabels() {
2349
+ return this.#candidateLabels();
2350
+ }
2351
+ set candidateLabels($$value) {
2352
+ return this.#candidateLabels($$value);
2353
+ }
2354
+ #dataTypeaheadEnabled = derived(() => {
2355
+ if (this.isMulti) return false;
2356
+ if (this.opts.items.current.length === 0) return false;
2357
+ return true;
2358
+ });
2359
+ get dataTypeaheadEnabled() {
2360
+ return this.#dataTypeaheadEnabled();
2361
+ }
2362
+ set dataTypeaheadEnabled($$value) {
2363
+ return this.#dataTypeaheadEnabled($$value);
2364
+ }
2365
+ constructor(opts) {
2366
+ super(opts);
2367
+ this.opts = opts;
2368
+ watch(() => this.opts.open.current, () => {
2369
+ if (!this.opts.open.current) return;
2370
+ this.setInitialHighlightedNode();
2371
+ });
2372
+ }
2373
+ includesItem(itemValue) {
2374
+ return this.opts.value.current === itemValue;
2375
+ }
2376
+ toggleItem(itemValue, itemLabel = itemValue) {
2377
+ const newValue = this.includesItem(itemValue) ? "" : itemValue;
2378
+ this.opts.value.current = newValue;
2379
+ if (newValue !== "") {
2380
+ this.opts.inputValue.current = itemLabel;
2381
+ }
2382
+ }
2383
+ setInitialHighlightedNode() {
2384
+ afterTick(() => {
2385
+ if (this.highlightedNode && this.domContext.getDocument().contains(this.highlightedNode)) return;
2386
+ if (this.opts.value.current !== "") {
2387
+ const node = this.getNodeByValue(this.opts.value.current);
2388
+ if (node) {
2389
+ this.setHighlightedNode(node, true);
2390
+ return;
2391
+ }
2392
+ }
2393
+ this.setHighlightedToFirstCandidate(true);
2394
+ });
2395
+ }
2396
+ }
2397
+ class SelectMultipleRootState extends SelectBaseRootState {
2398
+ opts;
2399
+ isMulti = true;
2400
+ #hasValue = derived(() => this.opts.value.current.length > 0);
2401
+ get hasValue() {
2402
+ return this.#hasValue();
2403
+ }
2404
+ set hasValue($$value) {
2405
+ return this.#hasValue($$value);
2406
+ }
2407
+ constructor(opts) {
2408
+ super(opts);
2409
+ this.opts = opts;
2410
+ watch(() => this.opts.open.current, () => {
2411
+ if (!this.opts.open.current) return;
2412
+ this.setInitialHighlightedNode();
2413
+ });
2414
+ }
2415
+ includesItem(itemValue) {
2416
+ return this.opts.value.current.includes(itemValue);
2417
+ }
2418
+ toggleItem(itemValue, itemLabel = itemValue) {
2419
+ if (this.includesItem(itemValue)) {
2420
+ this.opts.value.current = this.opts.value.current.filter((v) => v !== itemValue);
2421
+ } else {
2422
+ this.opts.value.current = [...this.opts.value.current, itemValue];
2423
+ }
2424
+ this.opts.inputValue.current = itemLabel;
2425
+ }
2426
+ setInitialHighlightedNode() {
2427
+ afterTick(() => {
2428
+ if (!this.domContext) return;
2429
+ if (this.highlightedNode && this.domContext.getDocument().contains(this.highlightedNode)) return;
2430
+ if (this.opts.value.current.length && this.opts.value.current[0] !== "") {
2431
+ const node = this.getNodeByValue(this.opts.value.current[0]);
2432
+ if (node) {
2433
+ this.setHighlightedNode(node, true);
2434
+ return;
2435
+ }
2436
+ }
2437
+ this.setHighlightedToFirstCandidate(true);
2438
+ });
2439
+ }
2440
+ }
2441
+ class SelectRootState {
2442
+ static create(props) {
2443
+ const { type, ...rest } = props;
2444
+ const rootState = type === "single" ? new SelectSingleRootState(rest) : new SelectMultipleRootState(rest);
2445
+ return SelectRootContext.set(rootState);
2446
+ }
2447
+ }
2448
+ class SelectTriggerState {
2449
+ static create(opts) {
2450
+ return new SelectTriggerState(opts, SelectRootContext.get());
2451
+ }
2452
+ opts;
2453
+ root;
2454
+ attachment;
2455
+ #domTypeahead;
2456
+ #dataTypeahead;
2457
+ constructor(opts, root) {
2458
+ this.opts = opts;
2459
+ this.root = root;
2460
+ this.attachment = attachRef(opts.ref, (v) => this.root.triggerNode = v);
2461
+ this.root.domContext = new DOMContext(opts.ref);
2462
+ this.#domTypeahead = new DOMTypeahead({
2463
+ getCurrentItem: () => this.root.highlightedNode,
2464
+ onMatch: (node) => {
2465
+ this.root.setHighlightedNode(node);
2466
+ },
2467
+ getActiveElement: () => this.root.domContext.getActiveElement(),
2468
+ getWindow: () => this.root.domContext.getWindow()
2469
+ });
2470
+ this.#dataTypeahead = new DataTypeahead({
2471
+ getCurrentItem: () => {
2472
+ if (this.root.isMulti) return "";
2473
+ return this.root.currentLabel;
2474
+ },
2475
+ onMatch: (label) => {
2476
+ if (this.root.isMulti) return;
2477
+ if (!this.root.opts.items.current) return;
2478
+ const matchedItem = this.root.opts.items.current.find((item) => item.label === label);
2479
+ if (!matchedItem) return;
2480
+ this.root.opts.value.current = matchedItem.value;
2481
+ },
2482
+ enabled: () => !this.root.isMulti && this.root.dataTypeaheadEnabled,
2483
+ candidateValues: () => this.root.isMulti ? [] : this.root.candidateLabels,
2484
+ getWindow: () => this.root.domContext.getWindow()
2485
+ });
2486
+ this.onkeydown = this.onkeydown.bind(this);
2487
+ this.onpointerdown = this.onpointerdown.bind(this);
2488
+ this.onpointerup = this.onpointerup.bind(this);
2489
+ this.onclick = this.onclick.bind(this);
2490
+ }
2491
+ #handleOpen() {
2492
+ this.root.opts.open.current = true;
2493
+ this.#dataTypeahead.resetTypeahead();
2494
+ this.#domTypeahead.resetTypeahead();
2495
+ }
2496
+ #handlePointerOpen(_) {
2497
+ this.#handleOpen();
2498
+ }
2499
+ /**
2500
+ * Logic used to handle keyboard selection/deselection.
2501
+ *
2502
+ * If it returns true, it means the item was selected and whatever is calling
2503
+ * this function should return early
2504
+ *
2505
+ */
2506
+ #handleKeyboardSelection() {
2507
+ const isCurrentSelectedValue = this.root.highlightedValue === this.root.opts.value.current;
2508
+ if (!this.root.opts.allowDeselect.current && isCurrentSelectedValue && !this.root.isMulti) {
2509
+ this.root.handleClose();
2510
+ return true;
2511
+ }
2512
+ if (this.root.highlightedValue !== null) {
2513
+ this.root.toggleItem(this.root.highlightedValue, this.root.highlightedLabel ?? void 0);
2514
+ }
2515
+ if (!this.root.isMulti && !isCurrentSelectedValue) {
2516
+ this.root.handleClose();
2517
+ return true;
2518
+ }
2519
+ return false;
2520
+ }
2521
+ onkeydown(e) {
2522
+ this.root.isUsingKeyboard = true;
2523
+ if (e.key === ARROW_UP || e.key === ARROW_DOWN) e.preventDefault();
2524
+ if (!this.root.opts.open.current) {
2525
+ if (e.key === ENTER || e.key === SPACE || e.key === ARROW_DOWN || e.key === ARROW_UP) {
2526
+ e.preventDefault();
2527
+ this.root.handleOpen();
2528
+ } else if (!this.root.isMulti && this.root.dataTypeaheadEnabled) {
2529
+ this.#dataTypeahead.handleTypeaheadSearch(e.key);
2530
+ return;
2531
+ }
2532
+ if (this.root.hasValue) return;
2533
+ const candidateNodes2 = this.root.getCandidateNodes();
2534
+ if (!candidateNodes2.length) return;
2535
+ if (e.key === ARROW_DOWN) {
2536
+ const firstCandidate = candidateNodes2[0];
2537
+ this.root.setHighlightedNode(firstCandidate);
2538
+ } else if (e.key === ARROW_UP) {
2539
+ const lastCandidate = candidateNodes2[candidateNodes2.length - 1];
2540
+ this.root.setHighlightedNode(lastCandidate);
2541
+ }
2542
+ return;
2543
+ }
2544
+ if (e.key === TAB) {
2545
+ this.root.handleClose();
2546
+ return;
2547
+ }
2548
+ if ((e.key === ENTER || // if we're currently "typing ahead", we don't want to select the item
2549
+ // just yet as the item the user is trying to get to may have a space in it,
2550
+ // so we defer handling the close for this case until further down
2551
+ e.key === SPACE && this.#domTypeahead.search === "") && !e.isComposing) {
2552
+ e.preventDefault();
2553
+ const shouldReturn = this.#handleKeyboardSelection();
2554
+ if (shouldReturn) return;
2555
+ }
2556
+ if (e.key === ARROW_UP && e.altKey) {
2557
+ this.root.handleClose();
2558
+ }
2559
+ if (FIRST_LAST_KEYS.includes(e.key)) {
2560
+ e.preventDefault();
2561
+ const candidateNodes2 = this.root.getCandidateNodes();
2562
+ const currHighlightedNode = this.root.highlightedNode;
2563
+ const currIndex = currHighlightedNode ? candidateNodes2.indexOf(currHighlightedNode) : -1;
2564
+ const loop = this.root.opts.loop.current;
2565
+ let nextItem;
2566
+ if (e.key === ARROW_DOWN) {
2567
+ nextItem = next(candidateNodes2, currIndex, loop);
2568
+ } else if (e.key === ARROW_UP) {
2569
+ nextItem = prev(candidateNodes2, currIndex, loop);
2570
+ } else if (e.key === PAGE_DOWN) {
2571
+ nextItem = forward(candidateNodes2, currIndex, 10, loop);
2572
+ } else if (e.key === PAGE_UP) {
2573
+ nextItem = backward(candidateNodes2, currIndex, 10, loop);
2574
+ } else if (e.key === HOME) {
2575
+ nextItem = candidateNodes2[0];
2576
+ } else if (e.key === END) {
2577
+ nextItem = candidateNodes2[candidateNodes2.length - 1];
2578
+ }
2579
+ if (!nextItem) return;
2580
+ this.root.setHighlightedNode(nextItem);
2581
+ return;
2582
+ }
2583
+ const isModifierKey = e.ctrlKey || e.altKey || e.metaKey;
2584
+ const isCharacterKey = e.key.length === 1;
2585
+ const isSpaceKey = e.key === SPACE;
2586
+ const candidateNodes = this.root.getCandidateNodes();
2587
+ if (e.key === TAB) return;
2588
+ if (!isModifierKey && (isCharacterKey || isSpaceKey)) {
2589
+ const matchedNode = this.#domTypeahead.handleTypeaheadSearch(e.key, candidateNodes);
2590
+ if (!matchedNode && isSpaceKey) {
2591
+ e.preventDefault();
2592
+ this.#handleKeyboardSelection();
2593
+ }
2594
+ return;
2595
+ }
2596
+ if (!this.root.highlightedNode) {
2597
+ this.root.setHighlightedToFirstCandidate();
2598
+ }
2599
+ }
2600
+ onclick(e) {
2601
+ const currTarget = e.currentTarget;
2602
+ currTarget.focus();
2603
+ }
2604
+ onpointerdown(e) {
2605
+ if (this.root.opts.disabled.current) return;
2606
+ if (e.pointerType === "touch") return e.preventDefault();
2607
+ const target = e.target;
2608
+ if (target?.hasPointerCapture(e.pointerId)) {
2609
+ target?.releasePointerCapture(e.pointerId);
2610
+ }
2611
+ if (e.button === 0 && e.ctrlKey === false) {
2612
+ if (this.root.opts.open.current === false) {
2613
+ this.#handlePointerOpen(e);
2614
+ } else {
2615
+ this.root.handleClose();
2616
+ }
2617
+ }
2618
+ }
2619
+ onpointerup(e) {
2620
+ if (this.root.opts.disabled.current) return;
2621
+ e.preventDefault();
2622
+ if (e.pointerType === "touch") {
2623
+ if (this.root.opts.open.current === false) {
2624
+ this.#handlePointerOpen(e);
2625
+ } else {
2626
+ this.root.handleClose();
2627
+ }
2628
+ }
2629
+ }
2630
+ #props = derived(() => ({
2631
+ id: this.opts.id.current,
2632
+ disabled: this.root.opts.disabled.current ? true : void 0,
2633
+ "aria-haspopup": "listbox",
2634
+ "aria-expanded": boolToStr(this.root.opts.open.current),
2635
+ "aria-activedescendant": this.root.highlightedId,
2636
+ "data-state": getDataOpenClosed(this.root.opts.open.current),
2637
+ "data-disabled": boolToEmptyStrOrUndef(this.root.opts.disabled.current),
2638
+ "data-placeholder": this.root.hasValue ? void 0 : "",
2639
+ [this.root.getBitsAttr("trigger")]: "",
2640
+ onpointerdown: this.onpointerdown,
2641
+ onkeydown: this.onkeydown,
2642
+ onclick: this.onclick,
2643
+ onpointerup: this.onpointerup,
2644
+ ...this.attachment
2645
+ }));
2646
+ get props() {
2647
+ return this.#props();
2648
+ }
2649
+ set props($$value) {
2650
+ return this.#props($$value);
2651
+ }
2652
+ }
2653
+ class SelectContentState {
2654
+ static create(opts) {
2655
+ return SelectContentContext.set(new SelectContentState(opts, SelectRootContext.get()));
2656
+ }
2657
+ opts;
2658
+ root;
2659
+ attachment;
2660
+ isPositioned = false;
2661
+ domContext;
2662
+ constructor(opts, root) {
2663
+ this.opts = opts;
2664
+ this.root = root;
2665
+ this.attachment = attachRef(opts.ref, (v) => this.root.contentNode = v);
2666
+ this.domContext = new DOMContext(this.opts.ref);
2667
+ if (this.root.domContext === null) {
2668
+ this.root.domContext = this.domContext;
2669
+ }
2670
+ watch(() => this.root.opts.open.current, () => {
2671
+ if (this.root.opts.open.current) return;
2672
+ this.root.contentIsPositioned = false;
2673
+ this.isPositioned = false;
2674
+ });
2675
+ watch([() => this.isPositioned, () => this.root.highlightedNode], () => {
2676
+ if (!this.isPositioned || !this.root.highlightedNode) return;
2677
+ this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode);
2678
+ });
2679
+ this.onpointermove = this.onpointermove.bind(this);
2680
+ }
2681
+ onpointermove(_) {
2682
+ this.root.isUsingKeyboard = false;
2683
+ }
2684
+ #styles = derived(() => {
2685
+ return getFloatingContentCSSVars(this.root.isCombobox ? "combobox" : "select");
2686
+ });
2687
+ onInteractOutside = (e) => {
2688
+ if (e.target === this.root.triggerNode || e.target === this.root.inputNode) {
2689
+ e.preventDefault();
2690
+ return;
2691
+ }
2692
+ this.opts.onInteractOutside.current(e);
2693
+ if (e.defaultPrevented) return;
2694
+ this.root.handleClose();
2695
+ };
2696
+ onEscapeKeydown = (e) => {
2697
+ this.opts.onEscapeKeydown.current(e);
2698
+ if (e.defaultPrevented) return;
2699
+ this.root.handleClose();
2700
+ };
2701
+ onOpenAutoFocus = (e) => {
2702
+ e.preventDefault();
2703
+ };
2704
+ onCloseAutoFocus = (e) => {
2705
+ e.preventDefault();
2706
+ };
2707
+ get shouldRender() {
2708
+ return this.root.contentPresence.shouldRender;
2709
+ }
2710
+ #snippetProps = derived(() => ({ open: this.root.opts.open.current }));
2711
+ get snippetProps() {
2712
+ return this.#snippetProps();
2713
+ }
2714
+ set snippetProps($$value) {
2715
+ return this.#snippetProps($$value);
2716
+ }
2717
+ #props = derived(() => ({
2718
+ id: this.opts.id.current,
2719
+ role: "listbox",
2720
+ "aria-multiselectable": this.root.isMulti ? "true" : void 0,
2721
+ "data-state": getDataOpenClosed(this.root.opts.open.current),
2722
+ ...getDataTransitionAttrs(this.root.contentPresence.transitionStatus),
2723
+ [this.root.getBitsAttr("content")]: "",
2724
+ style: {
2725
+ display: "flex",
2726
+ flexDirection: "column",
2727
+ outline: "none",
2728
+ boxSizing: "border-box",
2729
+ pointerEvents: "auto",
2730
+ ...this.#styles()
2731
+ },
2732
+ onpointermove: this.onpointermove,
2733
+ ...this.attachment
2734
+ }));
2735
+ get props() {
2736
+ return this.#props();
2737
+ }
2738
+ set props($$value) {
2739
+ return this.#props($$value);
2740
+ }
2741
+ popperProps = {
2742
+ onInteractOutside: this.onInteractOutside,
2743
+ onEscapeKeydown: this.onEscapeKeydown,
2744
+ onOpenAutoFocus: this.onOpenAutoFocus,
2745
+ onCloseAutoFocus: this.onCloseAutoFocus,
2746
+ trapFocus: false,
2747
+ loop: false,
2748
+ onPlaced: () => {
2749
+ if (this.root.opts.open.current) {
2750
+ this.root.contentIsPositioned = true;
2751
+ this.isPositioned = true;
2752
+ }
2753
+ }
2754
+ };
2755
+ }
2756
+ class SelectItemState {
2757
+ static create(opts) {
2758
+ return new SelectItemState(opts, SelectRootContext.get());
2759
+ }
2760
+ opts;
2761
+ root;
2762
+ attachment;
2763
+ #isSelected = derived(() => this.root.includesItem(this.opts.value.current));
2764
+ get isSelected() {
2765
+ return this.#isSelected();
2766
+ }
2767
+ set isSelected($$value) {
2768
+ return this.#isSelected($$value);
2769
+ }
2770
+ #isHighlighted = derived(() => this.root.highlightedValue === this.opts.value.current);
2771
+ get isHighlighted() {
2772
+ return this.#isHighlighted();
2773
+ }
2774
+ set isHighlighted($$value) {
2775
+ return this.#isHighlighted($$value);
2776
+ }
2777
+ prevHighlighted = new Previous(() => this.isHighlighted);
2778
+ mounted = false;
2779
+ constructor(opts, root) {
2780
+ this.opts = opts;
2781
+ this.root = root;
2782
+ this.attachment = attachRef(opts.ref);
2783
+ watch([() => this.isHighlighted, () => this.prevHighlighted.current], () => {
2784
+ if (this.isHighlighted) {
2785
+ this.opts.onHighlight.current();
2786
+ } else if (this.prevHighlighted.current) {
2787
+ this.opts.onUnhighlight.current();
2788
+ }
2789
+ });
2790
+ watch(() => this.mounted, () => {
2791
+ if (!this.mounted) return;
2792
+ this.root.setInitialHighlightedNode();
2793
+ });
2794
+ this.onpointerdown = this.onpointerdown.bind(this);
2795
+ this.onpointerup = this.onpointerup.bind(this);
2796
+ this.onpointermove = this.onpointermove.bind(this);
2797
+ }
2798
+ handleSelect() {
2799
+ if (this.opts.disabled.current) return;
2800
+ const isCurrentSelectedValue = this.opts.value.current === this.root.opts.value.current;
2801
+ if (!this.root.opts.allowDeselect.current && isCurrentSelectedValue && !this.root.isMulti) {
2802
+ this.root.handleClose();
2803
+ return;
2804
+ }
2805
+ this.root.toggleItem(this.opts.value.current, this.opts.label.current);
2806
+ if (!this.root.isMulti && !isCurrentSelectedValue) {
2807
+ this.root.handleClose();
2808
+ }
2809
+ }
2810
+ #snippetProps = derived(() => ({ selected: this.isSelected, highlighted: this.isHighlighted }));
2811
+ get snippetProps() {
2812
+ return this.#snippetProps();
2813
+ }
2814
+ set snippetProps($$value) {
2815
+ return this.#snippetProps($$value);
2816
+ }
2817
+ onpointerdown(e) {
2818
+ e.preventDefault();
2819
+ }
2820
+ /**
2821
+ * Using `pointerup` instead of `click` allows power users to pointerdown
2822
+ * the trigger, then release pointerup on an item to select it vs having to do
2823
+ * multiple clicks.
2824
+ */
2825
+ onpointerup(e) {
2826
+ if (e.defaultPrevented || !this.opts.ref.current) return;
2827
+ if (e.pointerType === "touch" && !isIOS) {
2828
+ on(
2829
+ this.opts.ref.current,
2830
+ "click",
2831
+ () => {
2832
+ this.handleSelect();
2833
+ this.root.setHighlightedNode(this.opts.ref.current);
2834
+ },
2835
+ { once: true }
2836
+ );
2837
+ return;
2838
+ }
2839
+ e.preventDefault();
2840
+ this.handleSelect();
2841
+ if (e.pointerType === "touch") {
2842
+ this.root.setHighlightedNode(this.opts.ref.current);
2843
+ }
2844
+ }
2845
+ onpointermove(e) {
2846
+ if (e.pointerType === "touch") return;
2847
+ if (this.root.highlightedNode !== this.opts.ref.current) {
2848
+ this.root.setHighlightedNode(this.opts.ref.current);
2849
+ }
2850
+ }
2851
+ #props = derived(() => ({
2852
+ id: this.opts.id.current,
2853
+ role: "option",
2854
+ "aria-selected": this.root.includesItem(this.opts.value.current) ? "true" : void 0,
2855
+ "data-value": this.opts.value.current,
2856
+ "data-disabled": boolToEmptyStrOrUndef(this.opts.disabled.current),
2857
+ "data-highlighted": this.root.highlightedValue === this.opts.value.current && !this.opts.disabled.current ? "" : void 0,
2858
+ "data-selected": this.root.includesItem(this.opts.value.current) ? "" : void 0,
2859
+ "data-label": this.opts.label.current,
2860
+ [this.root.getBitsAttr("item")]: "",
2861
+ onpointermove: this.onpointermove,
2862
+ onpointerdown: this.onpointerdown,
2863
+ onpointerup: this.onpointerup,
2864
+ ...this.attachment
2865
+ }));
2866
+ get props() {
2867
+ return this.#props();
2868
+ }
2869
+ set props($$value) {
2870
+ return this.#props($$value);
2871
+ }
2872
+ }
2873
+ class SelectHiddenInputState {
2874
+ static create(opts) {
2875
+ return new SelectHiddenInputState(opts, SelectRootContext.get());
2876
+ }
2877
+ opts;
2878
+ root;
2879
+ #shouldRender = derived(() => this.root.opts.name.current !== "");
2880
+ get shouldRender() {
2881
+ return this.#shouldRender();
2882
+ }
2883
+ set shouldRender($$value) {
2884
+ return this.#shouldRender($$value);
2885
+ }
2886
+ constructor(opts, root) {
2887
+ this.opts = opts;
2888
+ this.root = root;
2889
+ this.onfocus = this.onfocus.bind(this);
2890
+ }
2891
+ onfocus(e) {
2892
+ e.preventDefault();
2893
+ if (!this.root.isCombobox) {
2894
+ this.root.triggerNode?.focus();
2895
+ } else {
2896
+ this.root.inputNode?.focus();
2897
+ }
2898
+ }
2899
+ #props = derived(() => ({
2900
+ disabled: boolToTrueOrUndef(this.root.opts.disabled.current),
2901
+ required: boolToTrueOrUndef(this.root.opts.required.current),
2902
+ name: this.root.opts.name.current,
2903
+ value: this.opts.value.current,
2904
+ onfocus: this.onfocus
2905
+ }));
2906
+ get props() {
2907
+ return this.#props();
2908
+ }
2909
+ set props($$value) {
2910
+ return this.#props($$value);
2911
+ }
2912
+ }
2913
+ class SelectViewportState {
2914
+ static create(opts) {
2915
+ return new SelectViewportState(opts, SelectContentContext.get());
2916
+ }
2917
+ opts;
2918
+ content;
2919
+ root;
2920
+ attachment;
2921
+ prevScrollTop = 0;
2922
+ constructor(opts, content) {
2923
+ this.opts = opts;
2924
+ this.content = content;
2925
+ this.root = content.root;
2926
+ this.attachment = attachRef(opts.ref, (v) => {
2927
+ this.root.viewportNode = v;
2928
+ });
2929
+ }
2930
+ #props = derived(() => ({
2931
+ id: this.opts.id.current,
2932
+ role: "presentation",
2933
+ [this.root.getBitsAttr("viewport")]: "",
2934
+ style: {
2935
+ // we use position: 'relative' here on the `viewport` so that when we call
2936
+ // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
2937
+ // (independent of the scrollUpButton).
2938
+ position: "relative",
2939
+ flex: 1,
2940
+ overflow: "auto"
2941
+ },
2942
+ ...this.attachment
2943
+ }));
2944
+ get props() {
2945
+ return this.#props();
2946
+ }
2947
+ set props($$value) {
2948
+ return this.#props($$value);
2949
+ }
2950
+ }
2951
+ class SelectScrollButtonImplState {
2952
+ opts;
2953
+ content;
2954
+ root;
2955
+ attachment;
2956
+ autoScrollTimer = null;
2957
+ userScrollTimer = -1;
2958
+ isUserScrolling = false;
2959
+ onAutoScroll = noop;
2960
+ mounted = false;
2961
+ constructor(opts, content) {
2962
+ this.opts = opts;
2963
+ this.content = content;
2964
+ this.root = content.root;
2965
+ this.attachment = attachRef(opts.ref);
2966
+ watch([() => this.mounted], () => {
2967
+ if (!this.mounted) {
2968
+ this.isUserScrolling = false;
2969
+ return;
2970
+ }
2971
+ if (this.isUserScrolling) return;
2972
+ });
2973
+ this.onpointerdown = this.onpointerdown.bind(this);
2974
+ this.onpointermove = this.onpointermove.bind(this);
2975
+ this.onpointerleave = this.onpointerleave.bind(this);
2976
+ }
2977
+ handleUserScroll() {
2978
+ this.content.domContext.clearTimeout(this.userScrollTimer);
2979
+ this.isUserScrolling = true;
2980
+ this.userScrollTimer = this.content.domContext.setTimeout(
2981
+ () => {
2982
+ this.isUserScrolling = false;
2983
+ },
2984
+ 200
2985
+ );
2986
+ }
2987
+ clearAutoScrollInterval() {
2988
+ if (this.autoScrollTimer === null) return;
2989
+ this.content.domContext.clearTimeout(this.autoScrollTimer);
2990
+ this.autoScrollTimer = null;
2991
+ }
2992
+ onpointerdown(_) {
2993
+ if (this.autoScrollTimer !== null) return;
2994
+ const autoScroll = (tick) => {
2995
+ this.onAutoScroll();
2996
+ this.autoScrollTimer = this.content.domContext.setTimeout(() => autoScroll(tick + 1), this.opts.delay.current(tick));
2997
+ };
2998
+ this.autoScrollTimer = this.content.domContext.setTimeout(() => autoScroll(1), this.opts.delay.current(0));
2999
+ }
3000
+ onpointermove(e) {
3001
+ this.onpointerdown(e);
3002
+ }
3003
+ onpointerleave(_) {
3004
+ this.clearAutoScrollInterval();
3005
+ }
3006
+ #props = derived(() => ({
3007
+ id: this.opts.id.current,
3008
+ "aria-hidden": boolToStrTrueOrUndef(true),
3009
+ style: { flexShrink: 0 },
3010
+ onpointerdown: this.onpointerdown,
3011
+ onpointermove: this.onpointermove,
3012
+ onpointerleave: this.onpointerleave,
3013
+ ...this.attachment
3014
+ }));
3015
+ get props() {
3016
+ return this.#props();
3017
+ }
3018
+ set props($$value) {
3019
+ return this.#props($$value);
3020
+ }
3021
+ }
3022
+ class SelectScrollDownButtonState {
3023
+ static create(opts) {
3024
+ return new SelectScrollDownButtonState(new SelectScrollButtonImplState(opts, SelectContentContext.get()));
3025
+ }
3026
+ scrollButtonState;
3027
+ content;
3028
+ root;
3029
+ canScrollDown = false;
3030
+ scrollIntoViewTimer = null;
3031
+ constructor(scrollButtonState) {
3032
+ this.scrollButtonState = scrollButtonState;
3033
+ this.content = scrollButtonState.content;
3034
+ this.root = scrollButtonState.root;
3035
+ this.scrollButtonState.onAutoScroll = this.handleAutoScroll;
3036
+ watch(
3037
+ [
3038
+ () => this.root.viewportNode,
3039
+ () => this.content.isPositioned
3040
+ ],
3041
+ () => {
3042
+ if (!this.root.viewportNode || !this.content.isPositioned) return;
3043
+ this.handleScroll(true);
3044
+ return on(this.root.viewportNode, "scroll", () => this.handleScroll());
3045
+ }
3046
+ );
3047
+ watch(
3048
+ [
3049
+ () => this.root.opts.inputValue.current,
3050
+ () => this.root.viewportNode,
3051
+ () => this.content.isPositioned
3052
+ ],
3053
+ () => {
3054
+ if (!this.root.viewportNode || !this.content.isPositioned) return;
3055
+ this.handleScroll(true);
3056
+ }
3057
+ );
3058
+ watch(() => this.scrollButtonState.mounted, () => {
3059
+ if (!this.scrollButtonState.mounted) return;
3060
+ if (this.scrollIntoViewTimer) {
3061
+ clearTimeout(this.scrollIntoViewTimer);
3062
+ }
3063
+ this.scrollIntoViewTimer = afterSleep(5, () => {
3064
+ const activeItem = this.root.highlightedNode;
3065
+ if (!activeItem) return;
3066
+ this.root.scrollHighlightedNodeIntoView(activeItem);
3067
+ });
3068
+ });
3069
+ }
3070
+ /**
3071
+ * @param manual - if true, it means the function was invoked manually outside of an event
3072
+ * listener, so we don't call `handleUserScroll` to prevent the auto scroll from kicking in.
3073
+ */
3074
+ handleScroll = (manual = false) => {
3075
+ if (!manual) {
3076
+ this.scrollButtonState.handleUserScroll();
3077
+ }
3078
+ if (!this.root.viewportNode) return;
3079
+ const maxScroll = this.root.viewportNode.scrollHeight - this.root.viewportNode.clientHeight;
3080
+ const paddingTop = Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop, 10);
3081
+ this.canScrollDown = Math.ceil(this.root.viewportNode.scrollTop) < maxScroll - paddingTop;
3082
+ };
3083
+ handleAutoScroll = () => {
3084
+ const viewport = this.root.viewportNode;
3085
+ const selectedItem = this.root.highlightedNode;
3086
+ if (!viewport || !selectedItem) return;
3087
+ viewport.scrollTop = viewport.scrollTop + selectedItem.offsetHeight;
3088
+ };
3089
+ #props = derived(() => ({
3090
+ ...this.scrollButtonState.props,
3091
+ [this.root.getBitsAttr("scroll-down-button")]: ""
3092
+ }));
3093
+ get props() {
3094
+ return this.#props();
3095
+ }
3096
+ set props($$value) {
3097
+ return this.#props($$value);
3098
+ }
3099
+ }
3100
+ class SelectScrollUpButtonState {
3101
+ static create(opts) {
3102
+ return new SelectScrollUpButtonState(new SelectScrollButtonImplState(opts, SelectContentContext.get()));
3103
+ }
3104
+ scrollButtonState;
3105
+ content;
3106
+ root;
3107
+ canScrollUp = false;
3108
+ constructor(scrollButtonState) {
3109
+ this.scrollButtonState = scrollButtonState;
3110
+ this.content = scrollButtonState.content;
3111
+ this.root = scrollButtonState.root;
3112
+ this.scrollButtonState.onAutoScroll = this.handleAutoScroll;
3113
+ watch(
3114
+ [
3115
+ () => this.root.viewportNode,
3116
+ () => this.content.isPositioned
3117
+ ],
3118
+ () => {
3119
+ if (!this.root.viewportNode || !this.content.isPositioned) return;
3120
+ this.handleScroll(true);
3121
+ return on(this.root.viewportNode, "scroll", () => this.handleScroll());
3122
+ }
3123
+ );
3124
+ }
3125
+ /**
3126
+ * @param manual - if true, it means the function was invoked manually outside of an event
3127
+ * listener, so we don't call `handleUserScroll` to prevent the auto scroll from kicking in.
3128
+ */
3129
+ handleScroll = (manual = false) => {
3130
+ if (!manual) {
3131
+ this.scrollButtonState.handleUserScroll();
3132
+ }
3133
+ if (!this.root.viewportNode) return;
3134
+ const paddingTop = Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop, 10);
3135
+ this.canScrollUp = this.root.viewportNode.scrollTop - paddingTop > 0.1;
3136
+ };
3137
+ handleAutoScroll = () => {
3138
+ if (!this.root.viewportNode || !this.root.highlightedNode) return;
3139
+ this.root.viewportNode.scrollTop = this.root.viewportNode.scrollTop - this.root.highlightedNode.offsetHeight;
3140
+ };
3141
+ #props = derived(() => ({
3142
+ ...this.scrollButtonState.props,
3143
+ [this.root.getBitsAttr("scroll-up-button")]: ""
3144
+ }));
3145
+ get props() {
3146
+ return this.#props();
3147
+ }
3148
+ set props($$value) {
3149
+ return this.#props($$value);
3150
+ }
3151
+ }
3152
+ function Select_hidden_input($$renderer, $$props) {
3153
+ $$renderer.component(($$renderer2) => {
3154
+ let { value = void 0, autocomplete } = $$props;
3155
+ const hiddenInputState = SelectHiddenInputState.create({ value: boxWith(() => value) });
3156
+ let $$settled = true;
3157
+ let $$inner_renderer;
3158
+ function $$render_inner($$renderer3) {
3159
+ if (hiddenInputState.shouldRender) {
3160
+ $$renderer3.push("<!--[0-->");
3161
+ Hidden_input($$renderer3, spread_props([
3162
+ hiddenInputState.props,
3163
+ {
3164
+ autocomplete,
3165
+ get value() {
3166
+ return value;
3167
+ },
3168
+ set value($$value) {
3169
+ value = $$value;
3170
+ $$settled = false;
3171
+ }
3172
+ }
3173
+ ]));
3174
+ } else {
3175
+ $$renderer3.push("<!--[-1-->");
3176
+ }
3177
+ $$renderer3.push(`<!--]-->`);
3178
+ }
3179
+ do {
3180
+ $$settled = true;
3181
+ $$inner_renderer = $$renderer2.copy();
3182
+ $$render_inner($$inner_renderer);
3183
+ } while (!$$settled);
3184
+ $$renderer2.subsume($$inner_renderer);
3185
+ bind_props($$props, { value });
3186
+ });
3187
+ }
3188
+ function Floating_layer_anchor($$renderer, $$props) {
3189
+ $$renderer.component(($$renderer2) => {
3190
+ let { id, children, virtualEl, ref, tooltip = false } = $$props;
3191
+ FloatingAnchorState.create(
3192
+ {
3193
+ id: boxWith(() => id),
3194
+ virtualEl: boxWith(() => virtualEl),
3195
+ ref
3196
+ },
3197
+ tooltip
3198
+ );
3199
+ children?.($$renderer2);
3200
+ $$renderer2.push(`<!---->`);
3201
+ });
3202
+ }
3203
+ function Floating_layer_content($$renderer, $$props) {
3204
+ $$renderer.component(($$renderer2) => {
3205
+ let {
3206
+ content,
3207
+ side = "bottom",
3208
+ sideOffset = 0,
3209
+ align = "center",
3210
+ alignOffset = 0,
3211
+ id,
3212
+ arrowPadding = 0,
3213
+ avoidCollisions = true,
3214
+ collisionBoundary = [],
3215
+ collisionPadding = 0,
3216
+ hideWhenDetached = false,
3217
+ onPlaced = () => {
3218
+ },
3219
+ sticky = "partial",
3220
+ updatePositionStrategy = "optimized",
3221
+ strategy = "fixed",
3222
+ dir = "ltr",
3223
+ style = {},
3224
+ wrapperId = useId(),
3225
+ customAnchor = null,
3226
+ enabled,
3227
+ tooltip = false
3228
+ } = $$props;
3229
+ const contentState = FloatingContentState.create(
3230
+ {
3231
+ side: boxWith(() => side),
3232
+ sideOffset: boxWith(() => sideOffset),
3233
+ align: boxWith(() => align),
3234
+ alignOffset: boxWith(() => alignOffset),
3235
+ id: boxWith(() => id),
3236
+ arrowPadding: boxWith(() => arrowPadding),
3237
+ avoidCollisions: boxWith(() => avoidCollisions),
3238
+ collisionBoundary: boxWith(() => collisionBoundary),
3239
+ collisionPadding: boxWith(() => collisionPadding),
3240
+ hideWhenDetached: boxWith(() => hideWhenDetached),
3241
+ onPlaced: boxWith(() => onPlaced),
3242
+ sticky: boxWith(() => sticky),
3243
+ updatePositionStrategy: boxWith(() => updatePositionStrategy),
3244
+ strategy: boxWith(() => strategy),
3245
+ dir: boxWith(() => dir),
3246
+ style: boxWith(() => style),
3247
+ enabled: boxWith(() => enabled),
3248
+ wrapperId: boxWith(() => wrapperId),
3249
+ customAnchor: boxWith(() => customAnchor)
3250
+ },
3251
+ tooltip
3252
+ );
3253
+ const mergedProps = derived(() => mergeProps(contentState.wrapperProps, { style: { pointerEvents: "auto" } }));
3254
+ content?.($$renderer2, { props: contentState.props, wrapperProps: mergedProps() });
3255
+ $$renderer2.push(`<!---->`);
3256
+ });
3257
+ }
3258
+ function Floating_layer_content_static($$renderer, $$props) {
3259
+ $$renderer.component(($$renderer2) => {
3260
+ let { content } = $$props;
3261
+ content?.($$renderer2, { props: {}, wrapperProps: {} });
3262
+ $$renderer2.push(`<!---->`);
3263
+ });
3264
+ }
3265
+ function Popper_content($$renderer, $$props) {
3266
+ let {
3267
+ content,
3268
+ isStatic = false,
3269
+ onPlaced,
3270
+ $$slots,
3271
+ $$events,
3272
+ ...restProps
3273
+ } = $$props;
3274
+ if (isStatic) {
3275
+ $$renderer.push("<!--[0-->");
3276
+ Floating_layer_content_static($$renderer, { content });
3277
+ } else {
3278
+ $$renderer.push("<!--[-1-->");
3279
+ Floating_layer_content($$renderer, spread_props([{ content, onPlaced }, restProps]));
3280
+ }
3281
+ $$renderer.push(`<!--]-->`);
3282
+ }
3283
+ function Popper_layer_inner($$renderer, $$props) {
3284
+ $$renderer.component(($$renderer2) => {
3285
+ let {
3286
+ popper,
3287
+ onEscapeKeydown,
3288
+ escapeKeydownBehavior,
3289
+ preventOverflowTextSelection,
3290
+ id,
3291
+ onPointerDown,
3292
+ onPointerUp,
3293
+ side,
3294
+ sideOffset,
3295
+ align,
3296
+ alignOffset,
3297
+ arrowPadding,
3298
+ avoidCollisions,
3299
+ collisionBoundary,
3300
+ collisionPadding,
3301
+ sticky,
3302
+ hideWhenDetached,
3303
+ updatePositionStrategy,
3304
+ strategy,
3305
+ dir,
3306
+ preventScroll,
3307
+ wrapperId,
3308
+ style,
3309
+ onPlaced,
3310
+ onInteractOutside,
3311
+ onCloseAutoFocus,
3312
+ onOpenAutoFocus,
3313
+ onFocusOutside,
3314
+ interactOutsideBehavior = "close",
3315
+ loop,
3316
+ trapFocus = true,
3317
+ isValidEvent = () => false,
3318
+ customAnchor = null,
3319
+ isStatic = false,
3320
+ enabled,
3321
+ ref,
3322
+ tooltip = false,
3323
+ contentPointerEvents = "auto",
3324
+ $$slots,
3325
+ $$events,
3326
+ ...restProps
3327
+ } = $$props;
3328
+ const resolvedPreventScroll = derived(() => preventScroll ?? true);
3329
+ const effectiveStrategy = derived(() => strategy ?? (resolvedPreventScroll() ? "fixed" : "absolute"));
3330
+ {
3331
+ let content = function($$renderer3, { props: floatingProps, wrapperProps }) {
3332
+ if (restProps.forceMount && enabled) {
3333
+ $$renderer3.push("<!--[0-->");
3334
+ Scroll_lock($$renderer3, { preventScroll: resolvedPreventScroll() });
3335
+ } else if (!restProps.forceMount) {
3336
+ $$renderer3.push("<!--[1-->");
3337
+ Scroll_lock($$renderer3, { preventScroll: resolvedPreventScroll() });
3338
+ } else {
3339
+ $$renderer3.push("<!--[-1-->");
3340
+ }
3341
+ $$renderer3.push(`<!--]--> `);
3342
+ {
3343
+ let focusScope = function($$renderer4, { props: focusScopeProps }) {
3344
+ Escape_layer($$renderer4, {
3345
+ onEscapeKeydown,
3346
+ escapeKeydownBehavior,
3347
+ enabled,
3348
+ ref,
3349
+ children: ($$renderer5) => {
3350
+ {
3351
+ let children = function($$renderer6, { props: dismissibleProps }) {
3352
+ Text_selection_layer($$renderer6, {
3353
+ id,
3354
+ preventOverflowTextSelection,
3355
+ onPointerDown,
3356
+ onPointerUp,
3357
+ enabled,
3358
+ ref,
3359
+ children: ($$renderer7) => {
3360
+ popper?.($$renderer7, {
3361
+ props: mergeProps(restProps, floatingProps, dismissibleProps, focusScopeProps, { style: { pointerEvents: contentPointerEvents } }),
3362
+ wrapperProps
3363
+ });
3364
+ $$renderer7.push(`<!---->`);
3365
+ }
3366
+ });
3367
+ };
3368
+ Dismissible_layer($$renderer5, {
3369
+ id,
3370
+ onInteractOutside,
3371
+ onFocusOutside,
3372
+ interactOutsideBehavior,
3373
+ isValidEvent,
3374
+ enabled,
3375
+ ref,
3376
+ children
3377
+ });
3378
+ }
3379
+ }
3380
+ });
3381
+ };
3382
+ Focus_scope($$renderer3, {
3383
+ onOpenAutoFocus,
3384
+ onCloseAutoFocus,
3385
+ loop,
3386
+ enabled,
3387
+ trapFocus,
3388
+ forceMount: restProps.forceMount,
3389
+ ref,
3390
+ focusScope
3391
+ });
3392
+ }
3393
+ $$renderer3.push(`<!---->`);
3394
+ };
3395
+ Popper_content($$renderer2, {
3396
+ isStatic,
3397
+ id,
3398
+ side,
3399
+ sideOffset,
3400
+ align,
3401
+ alignOffset,
3402
+ arrowPadding,
3403
+ avoidCollisions,
3404
+ collisionBoundary,
3405
+ collisionPadding,
3406
+ sticky,
3407
+ hideWhenDetached,
3408
+ updatePositionStrategy,
3409
+ strategy: effectiveStrategy(),
3410
+ dir,
3411
+ wrapperId,
3412
+ style,
3413
+ onPlaced,
3414
+ customAnchor,
3415
+ enabled,
3416
+ tooltip,
3417
+ content,
3418
+ $$slots: { content: true }
3419
+ });
3420
+ }
3421
+ });
3422
+ }
3423
+ function Popper_layer($$renderer, $$props) {
3424
+ let {
3425
+ popper,
3426
+ open,
3427
+ onEscapeKeydown,
3428
+ escapeKeydownBehavior,
3429
+ preventOverflowTextSelection,
3430
+ id,
3431
+ onPointerDown,
3432
+ onPointerUp,
3433
+ side,
3434
+ sideOffset,
3435
+ align,
3436
+ alignOffset,
3437
+ arrowPadding,
3438
+ avoidCollisions,
3439
+ collisionBoundary,
3440
+ collisionPadding,
3441
+ sticky,
3442
+ hideWhenDetached,
3443
+ updatePositionStrategy,
3444
+ strategy,
3445
+ dir,
3446
+ preventScroll,
3447
+ wrapperId,
3448
+ style,
3449
+ onPlaced,
3450
+ onInteractOutside,
3451
+ onCloseAutoFocus,
3452
+ onOpenAutoFocus,
3453
+ onFocusOutside,
3454
+ interactOutsideBehavior = "close",
3455
+ loop,
3456
+ trapFocus = true,
3457
+ isValidEvent = () => false,
3458
+ customAnchor = null,
3459
+ isStatic = false,
3460
+ ref,
3461
+ shouldRender,
3462
+ $$slots,
3463
+ $$events,
3464
+ ...restProps
3465
+ } = $$props;
3466
+ if (shouldRender) {
3467
+ $$renderer.push("<!--[0-->");
3468
+ Popper_layer_inner($$renderer, spread_props([
3469
+ {
3470
+ popper,
3471
+ onEscapeKeydown,
3472
+ escapeKeydownBehavior,
3473
+ preventOverflowTextSelection,
3474
+ id,
3475
+ onPointerDown,
3476
+ onPointerUp,
3477
+ side,
3478
+ sideOffset,
3479
+ align,
3480
+ alignOffset,
3481
+ arrowPadding,
3482
+ avoidCollisions,
3483
+ collisionBoundary,
3484
+ collisionPadding,
3485
+ sticky,
3486
+ hideWhenDetached,
3487
+ updatePositionStrategy,
3488
+ strategy,
3489
+ dir,
3490
+ preventScroll,
3491
+ wrapperId,
3492
+ style,
3493
+ onPlaced,
3494
+ customAnchor,
3495
+ isStatic,
3496
+ enabled: open,
3497
+ onInteractOutside,
3498
+ onCloseAutoFocus,
3499
+ onOpenAutoFocus,
3500
+ interactOutsideBehavior,
3501
+ loop,
3502
+ trapFocus,
3503
+ isValidEvent,
3504
+ onFocusOutside,
3505
+ forceMount: false,
3506
+ ref
3507
+ },
3508
+ restProps
3509
+ ]));
3510
+ } else {
3511
+ $$renderer.push("<!--[-1-->");
3512
+ }
3513
+ $$renderer.push(`<!--]-->`);
3514
+ }
3515
+ function Popper_layer_force_mount($$renderer, $$props) {
3516
+ let {
3517
+ popper,
3518
+ onEscapeKeydown,
3519
+ escapeKeydownBehavior,
3520
+ preventOverflowTextSelection,
3521
+ id,
3522
+ onPointerDown,
3523
+ onPointerUp,
3524
+ side,
3525
+ sideOffset,
3526
+ align,
3527
+ alignOffset,
3528
+ arrowPadding,
3529
+ avoidCollisions,
3530
+ collisionBoundary,
3531
+ collisionPadding,
3532
+ sticky,
3533
+ hideWhenDetached,
3534
+ updatePositionStrategy,
3535
+ strategy,
3536
+ dir,
3537
+ preventScroll,
3538
+ wrapperId,
3539
+ style,
3540
+ onPlaced,
3541
+ onInteractOutside,
3542
+ onCloseAutoFocus,
3543
+ onOpenAutoFocus,
3544
+ onFocusOutside,
3545
+ interactOutsideBehavior = "close",
3546
+ loop,
3547
+ trapFocus = true,
3548
+ isValidEvent = () => false,
3549
+ customAnchor = null,
3550
+ isStatic = false,
3551
+ enabled,
3552
+ $$slots,
3553
+ $$events,
3554
+ ...restProps
3555
+ } = $$props;
3556
+ Popper_layer_inner($$renderer, spread_props([
3557
+ {
3558
+ popper,
3559
+ onEscapeKeydown,
3560
+ escapeKeydownBehavior,
3561
+ preventOverflowTextSelection,
3562
+ id,
3563
+ onPointerDown,
3564
+ onPointerUp,
3565
+ side,
3566
+ sideOffset,
3567
+ align,
3568
+ alignOffset,
3569
+ arrowPadding,
3570
+ avoidCollisions,
3571
+ collisionBoundary,
3572
+ collisionPadding,
3573
+ sticky,
3574
+ hideWhenDetached,
3575
+ updatePositionStrategy,
3576
+ strategy,
3577
+ dir,
3578
+ preventScroll,
3579
+ wrapperId,
3580
+ style,
3581
+ onPlaced,
3582
+ customAnchor,
3583
+ isStatic,
3584
+ enabled,
3585
+ onInteractOutside,
3586
+ onCloseAutoFocus,
3587
+ onOpenAutoFocus,
3588
+ interactOutsideBehavior,
3589
+ loop,
3590
+ trapFocus,
3591
+ isValidEvent,
3592
+ onFocusOutside
3593
+ },
3594
+ restProps,
3595
+ { forceMount: true }
3596
+ ]));
3597
+ }
3598
+ function Select_content$1($$renderer, $$props) {
3599
+ $$renderer.component(($$renderer2) => {
3600
+ const uid = props_id($$renderer2);
3601
+ let {
3602
+ id = createId(uid),
3603
+ ref = null,
3604
+ forceMount = false,
3605
+ side = "bottom",
3606
+ onInteractOutside = noop,
3607
+ onEscapeKeydown = noop,
3608
+ children,
3609
+ child,
3610
+ preventScroll = false,
3611
+ style,
3612
+ $$slots,
3613
+ $$events,
3614
+ ...restProps
3615
+ } = $$props;
3616
+ const contentState = SelectContentState.create({
3617
+ id: boxWith(() => id),
3618
+ ref: boxWith(() => ref, (v) => ref = v),
3619
+ onInteractOutside: boxWith(() => onInteractOutside),
3620
+ onEscapeKeydown: boxWith(() => onEscapeKeydown)
3621
+ });
3622
+ const mergedProps = derived(() => mergeProps(restProps, contentState.props));
3623
+ if (forceMount) {
3624
+ $$renderer2.push("<!--[0-->");
3625
+ {
3626
+ let popper = function($$renderer3, { props, wrapperProps }) {
3627
+ const finalProps = mergeProps(props, { style: contentState.props.style }, { style });
3628
+ if (child) {
3629
+ $$renderer3.push("<!--[0-->");
3630
+ child($$renderer3, {
3631
+ props: finalProps,
3632
+ wrapperProps,
3633
+ ...contentState.snippetProps
3634
+ });
3635
+ $$renderer3.push(`<!---->`);
3636
+ } else {
3637
+ $$renderer3.push("<!--[-1-->");
3638
+ $$renderer3.push(`<div${attributes({ ...wrapperProps })}><div${attributes({ ...finalProps })}>`);
3639
+ children?.($$renderer3);
3640
+ $$renderer3.push(`<!----></div></div>`);
3641
+ }
3642
+ $$renderer3.push(`<!--]-->`);
3643
+ };
3644
+ Popper_layer_force_mount($$renderer2, spread_props([
3645
+ mergedProps(),
3646
+ contentState.popperProps,
3647
+ {
3648
+ ref: contentState.opts.ref,
3649
+ side,
3650
+ enabled: contentState.root.opts.open.current,
3651
+ id,
3652
+ preventScroll,
3653
+ forceMount: true,
3654
+ shouldRender: contentState.shouldRender,
3655
+ popper,
3656
+ $$slots: { popper: true }
3657
+ }
3658
+ ]));
3659
+ }
3660
+ } else if (!forceMount) {
3661
+ $$renderer2.push("<!--[1-->");
3662
+ {
3663
+ let popper = function($$renderer3, { props, wrapperProps }) {
3664
+ const finalProps = mergeProps(props, { style: contentState.props.style }, { style });
3665
+ if (child) {
3666
+ $$renderer3.push("<!--[0-->");
3667
+ child($$renderer3, {
3668
+ props: finalProps,
3669
+ wrapperProps,
3670
+ ...contentState.snippetProps
3671
+ });
3672
+ $$renderer3.push(`<!---->`);
3673
+ } else {
3674
+ $$renderer3.push("<!--[-1-->");
3675
+ $$renderer3.push(`<div${attributes({ ...wrapperProps })}><div${attributes({ ...finalProps })}>`);
3676
+ children?.($$renderer3);
3677
+ $$renderer3.push(`<!----></div></div>`);
3678
+ }
3679
+ $$renderer3.push(`<!--]-->`);
3680
+ };
3681
+ Popper_layer($$renderer2, spread_props([
3682
+ mergedProps(),
3683
+ contentState.popperProps,
3684
+ {
3685
+ ref: contentState.opts.ref,
3686
+ side,
3687
+ open: contentState.root.opts.open.current,
3688
+ id,
3689
+ preventScroll,
3690
+ forceMount: false,
3691
+ shouldRender: contentState.shouldRender,
3692
+ popper,
3693
+ $$slots: { popper: true }
3694
+ }
3695
+ ]));
3696
+ }
3697
+ } else {
3698
+ $$renderer2.push("<!--[-1-->");
3699
+ }
3700
+ $$renderer2.push(`<!--]-->`);
3701
+ bind_props($$props, { ref });
3702
+ });
3703
+ }
3704
+ function Mounted($$renderer, $$props) {
3705
+ $$renderer.component(($$renderer2) => {
3706
+ let { mounted = false, onMountedChange = noop } = $$props;
3707
+ bind_props($$props, { mounted });
3708
+ });
3709
+ }
3710
+ function Select_item$1($$renderer, $$props) {
3711
+ $$renderer.component(($$renderer2) => {
3712
+ const uid = props_id($$renderer2);
3713
+ let {
3714
+ id = createId(uid),
3715
+ ref = null,
3716
+ value,
3717
+ label = value,
3718
+ disabled = false,
3719
+ children,
3720
+ child,
3721
+ onHighlight = noop,
3722
+ onUnhighlight = noop,
3723
+ $$slots,
3724
+ $$events,
3725
+ ...restProps
3726
+ } = $$props;
3727
+ const itemState = SelectItemState.create({
3728
+ id: boxWith(() => id),
3729
+ ref: boxWith(() => ref, (v) => ref = v),
3730
+ value: boxWith(() => value),
3731
+ disabled: boxWith(() => disabled),
3732
+ label: boxWith(() => label),
3733
+ onHighlight: boxWith(() => onHighlight),
3734
+ onUnhighlight: boxWith(() => onUnhighlight)
3735
+ });
3736
+ const mergedProps = derived(() => mergeProps(restProps, itemState.props));
3737
+ let $$settled = true;
3738
+ let $$inner_renderer;
3739
+ function $$render_inner($$renderer3) {
3740
+ if (child) {
3741
+ $$renderer3.push("<!--[0-->");
3742
+ child($$renderer3, { props: mergedProps(), ...itemState.snippetProps });
3743
+ $$renderer3.push(`<!---->`);
3744
+ } else {
3745
+ $$renderer3.push("<!--[-1-->");
3746
+ $$renderer3.push(`<div${attributes({ ...mergedProps() })}>`);
3747
+ children?.($$renderer3, itemState.snippetProps);
3748
+ $$renderer3.push(`<!----></div>`);
3749
+ }
3750
+ $$renderer3.push(`<!--]--> `);
3751
+ Mounted($$renderer3, {
3752
+ get mounted() {
3753
+ return itemState.mounted;
3754
+ },
3755
+ set mounted($$value) {
3756
+ itemState.mounted = $$value;
3757
+ $$settled = false;
3758
+ }
3759
+ });
3760
+ $$renderer3.push(`<!---->`);
3761
+ }
3762
+ do {
3763
+ $$settled = true;
3764
+ $$inner_renderer = $$renderer2.copy();
3765
+ $$render_inner($$inner_renderer);
3766
+ } while (!$$settled);
3767
+ $$renderer2.subsume($$inner_renderer);
3768
+ bind_props($$props, { ref });
3769
+ });
3770
+ }
3771
+ function Select_viewport($$renderer, $$props) {
3772
+ $$renderer.component(($$renderer2) => {
3773
+ const uid = props_id($$renderer2);
3774
+ let {
3775
+ id = createId(uid),
3776
+ ref = null,
3777
+ children,
3778
+ child,
3779
+ $$slots,
3780
+ $$events,
3781
+ ...restProps
3782
+ } = $$props;
3783
+ const viewportState = SelectViewportState.create({
3784
+ id: boxWith(() => id),
3785
+ ref: boxWith(() => ref, (v) => ref = v)
3786
+ });
3787
+ const mergedProps = derived(() => mergeProps(restProps, viewportState.props));
3788
+ if (child) {
3789
+ $$renderer2.push("<!--[0-->");
3790
+ child($$renderer2, { props: mergedProps() });
3791
+ $$renderer2.push(`<!---->`);
3792
+ } else {
3793
+ $$renderer2.push("<!--[-1-->");
3794
+ $$renderer2.push(`<div${attributes({ ...mergedProps() })}>`);
3795
+ children?.($$renderer2);
3796
+ $$renderer2.push(`<!----></div>`);
3797
+ }
3798
+ $$renderer2.push(`<!--]-->`);
3799
+ bind_props($$props, { ref });
3800
+ });
3801
+ }
3802
+ function Select_scroll_down_button$1($$renderer, $$props) {
3803
+ $$renderer.component(($$renderer2) => {
3804
+ const uid = props_id($$renderer2);
3805
+ let {
3806
+ id = createId(uid),
3807
+ ref = null,
3808
+ delay = () => 50,
3809
+ child,
3810
+ children,
3811
+ $$slots,
3812
+ $$events,
3813
+ ...restProps
3814
+ } = $$props;
3815
+ const scrollButtonState = SelectScrollDownButtonState.create({
3816
+ id: boxWith(() => id),
3817
+ ref: boxWith(() => ref, (v) => ref = v),
3818
+ delay: boxWith(() => delay)
3819
+ });
3820
+ const mergedProps = derived(() => mergeProps(restProps, scrollButtonState.props));
3821
+ let $$settled = true;
3822
+ let $$inner_renderer;
3823
+ function $$render_inner($$renderer3) {
3824
+ if (scrollButtonState.canScrollDown) {
3825
+ $$renderer3.push("<!--[0-->");
3826
+ Mounted($$renderer3, {
3827
+ get mounted() {
3828
+ return scrollButtonState.scrollButtonState.mounted;
3829
+ },
3830
+ set mounted($$value) {
3831
+ scrollButtonState.scrollButtonState.mounted = $$value;
3832
+ $$settled = false;
3833
+ }
3834
+ });
3835
+ $$renderer3.push(`<!----> `);
3836
+ if (child) {
3837
+ $$renderer3.push("<!--[0-->");
3838
+ child($$renderer3, { props: restProps });
3839
+ $$renderer3.push(`<!---->`);
3840
+ } else {
3841
+ $$renderer3.push("<!--[-1-->");
3842
+ $$renderer3.push(`<div${attributes({ ...mergedProps() })}>`);
3843
+ children?.($$renderer3);
3844
+ $$renderer3.push(`<!----></div>`);
3845
+ }
3846
+ $$renderer3.push(`<!--]-->`);
3847
+ } else {
3848
+ $$renderer3.push("<!--[-1-->");
3849
+ }
3850
+ $$renderer3.push(`<!--]-->`);
3851
+ }
3852
+ do {
3853
+ $$settled = true;
3854
+ $$inner_renderer = $$renderer2.copy();
3855
+ $$render_inner($$inner_renderer);
3856
+ } while (!$$settled);
3857
+ $$renderer2.subsume($$inner_renderer);
3858
+ bind_props($$props, { ref });
3859
+ });
3860
+ }
3861
+ function Select_scroll_up_button$1($$renderer, $$props) {
3862
+ $$renderer.component(($$renderer2) => {
3863
+ const uid = props_id($$renderer2);
3864
+ let {
3865
+ id = createId(uid),
3866
+ ref = null,
3867
+ delay = () => 50,
3868
+ child,
3869
+ children,
3870
+ $$slots,
3871
+ $$events,
3872
+ ...restProps
3873
+ } = $$props;
3874
+ const scrollButtonState = SelectScrollUpButtonState.create({
3875
+ id: boxWith(() => id),
3876
+ ref: boxWith(() => ref, (v) => ref = v),
3877
+ delay: boxWith(() => delay)
3878
+ });
3879
+ const mergedProps = derived(() => mergeProps(restProps, scrollButtonState.props));
3880
+ let $$settled = true;
3881
+ let $$inner_renderer;
3882
+ function $$render_inner($$renderer3) {
3883
+ if (scrollButtonState.canScrollUp) {
3884
+ $$renderer3.push("<!--[0-->");
3885
+ Mounted($$renderer3, {
3886
+ get mounted() {
3887
+ return scrollButtonState.scrollButtonState.mounted;
3888
+ },
3889
+ set mounted($$value) {
3890
+ scrollButtonState.scrollButtonState.mounted = $$value;
3891
+ $$settled = false;
3892
+ }
3893
+ });
3894
+ $$renderer3.push(`<!----> `);
3895
+ if (child) {
3896
+ $$renderer3.push("<!--[0-->");
3897
+ child($$renderer3, { props: restProps });
3898
+ $$renderer3.push(`<!---->`);
3899
+ } else {
3900
+ $$renderer3.push("<!--[-1-->");
3901
+ $$renderer3.push(`<div${attributes({ ...mergedProps() })}>`);
3902
+ children?.($$renderer3);
3903
+ $$renderer3.push(`<!----></div>`);
3904
+ }
3905
+ $$renderer3.push(`<!--]-->`);
3906
+ } else {
3907
+ $$renderer3.push("<!--[-1-->");
3908
+ }
3909
+ $$renderer3.push(`<!--]-->`);
3910
+ }
3911
+ do {
3912
+ $$settled = true;
3913
+ $$inner_renderer = $$renderer2.copy();
3914
+ $$render_inner($$inner_renderer);
3915
+ } while (!$$settled);
3916
+ $$renderer2.subsume($$inner_renderer);
3917
+ bind_props($$props, { ref });
3918
+ });
3919
+ }
3920
+ function Select($$renderer, $$props) {
3921
+ $$renderer.component(($$renderer2) => {
3922
+ let {
3923
+ value = void 0,
3924
+ onValueChange = noop,
3925
+ name = "",
3926
+ disabled = false,
3927
+ type,
3928
+ open = false,
3929
+ onOpenChange = noop,
3930
+ onOpenChangeComplete = noop,
3931
+ loop = false,
3932
+ scrollAlignment = "nearest",
3933
+ required = false,
3934
+ items = [],
3935
+ allowDeselect = false,
3936
+ autocomplete,
3937
+ children
3938
+ } = $$props;
3939
+ function handleDefaultValue() {
3940
+ if (value !== void 0) return;
3941
+ value = type === "single" ? "" : [];
3942
+ }
3943
+ handleDefaultValue();
3944
+ watch.pre(() => value, () => {
3945
+ handleDefaultValue();
3946
+ });
3947
+ let inputValue = "";
3948
+ const rootState = SelectRootState.create({
3949
+ type,
3950
+ value: boxWith(() => value, (v) => {
3951
+ value = v;
3952
+ onValueChange(v);
3953
+ }),
3954
+ disabled: boxWith(() => disabled),
3955
+ required: boxWith(() => required),
3956
+ open: boxWith(() => open, (v) => {
3957
+ open = v;
3958
+ onOpenChange(v);
3959
+ }),
3960
+ loop: boxWith(() => loop),
3961
+ scrollAlignment: boxWith(() => scrollAlignment),
3962
+ name: boxWith(() => name),
3963
+ isCombobox: false,
3964
+ items: boxWith(() => items),
3965
+ allowDeselect: boxWith(() => allowDeselect),
3966
+ inputValue: boxWith(() => inputValue, (v) => inputValue = v),
3967
+ onOpenChangeComplete: boxWith(() => onOpenChangeComplete)
3968
+ });
3969
+ let $$settled = true;
3970
+ let $$inner_renderer;
3971
+ function $$render_inner($$renderer3) {
3972
+ Floating_layer($$renderer3, {
3973
+ children: ($$renderer4) => {
3974
+ children?.($$renderer4);
3975
+ $$renderer4.push(`<!---->`);
3976
+ }
3977
+ });
3978
+ $$renderer3.push(`<!----> `);
3979
+ if (Array.isArray(rootState.opts.value.current)) {
3980
+ $$renderer3.push("<!--[0-->");
3981
+ if (rootState.opts.value.current.length === 0) {
3982
+ $$renderer3.push("<!--[0-->");
3983
+ Select_hidden_input($$renderer3, { autocomplete });
3984
+ } else {
3985
+ $$renderer3.push("<!--[-1-->");
3986
+ $$renderer3.push(`<!--[-->`);
3987
+ const each_array = ensure_array_like(rootState.opts.value.current);
3988
+ for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
3989
+ let item = each_array[$$index];
3990
+ Select_hidden_input($$renderer3, { value: item, autocomplete });
3991
+ }
3992
+ $$renderer3.push(`<!--]-->`);
3993
+ }
3994
+ $$renderer3.push(`<!--]-->`);
3995
+ } else {
3996
+ $$renderer3.push("<!--[-1-->");
3997
+ Select_hidden_input($$renderer3, {
3998
+ autocomplete,
3999
+ get value() {
4000
+ return rootState.opts.value.current;
4001
+ },
4002
+ set value($$value) {
4003
+ rootState.opts.value.current = $$value;
4004
+ $$settled = false;
4005
+ }
4006
+ });
4007
+ }
4008
+ $$renderer3.push(`<!--]-->`);
4009
+ }
4010
+ do {
4011
+ $$settled = true;
4012
+ $$inner_renderer = $$renderer2.copy();
4013
+ $$render_inner($$inner_renderer);
4014
+ } while (!$$settled);
4015
+ $$renderer2.subsume($$inner_renderer);
4016
+ bind_props($$props, { value, open });
4017
+ });
4018
+ }
4019
+ function Select_trigger$1($$renderer, $$props) {
4020
+ $$renderer.component(($$renderer2) => {
4021
+ const uid = props_id($$renderer2);
4022
+ let {
4023
+ id = createId(uid),
4024
+ ref = null,
4025
+ child,
4026
+ children,
4027
+ type = "button",
4028
+ $$slots,
4029
+ $$events,
4030
+ ...restProps
4031
+ } = $$props;
4032
+ const triggerState = SelectTriggerState.create({
4033
+ id: boxWith(() => id),
4034
+ ref: boxWith(() => ref, (v) => ref = v)
4035
+ });
4036
+ const mergedProps = derived(() => mergeProps(restProps, triggerState.props, { type }));
4037
+ if (Floating_layer_anchor) {
4038
+ $$renderer2.push("<!--[-->");
4039
+ Floating_layer_anchor($$renderer2, {
4040
+ id,
4041
+ ref: triggerState.opts.ref,
4042
+ children: ($$renderer3) => {
4043
+ if (child) {
4044
+ $$renderer3.push("<!--[0-->");
4045
+ child($$renderer3, { props: mergedProps() });
4046
+ $$renderer3.push(`<!---->`);
4047
+ } else {
4048
+ $$renderer3.push("<!--[-1-->");
4049
+ $$renderer3.push(`<button${attributes({ ...mergedProps() })}>`);
4050
+ children?.($$renderer3);
4051
+ $$renderer3.push(`<!----></button>`);
4052
+ }
4053
+ $$renderer3.push(`<!--]-->`);
4054
+ }
4055
+ });
4056
+ $$renderer2.push("<!--]-->");
4057
+ } else {
4058
+ $$renderer2.push("<!--[!-->");
4059
+ $$renderer2.push("<!--]-->");
4060
+ }
4061
+ bind_props($$props, { ref });
4062
+ });
4063
+ }
4064
+ function Select_item($$renderer, $$props) {
4065
+ $$renderer.component(($$renderer2) => {
4066
+ let {
4067
+ ref = null,
4068
+ class: className,
4069
+ value,
4070
+ label,
4071
+ children: childrenProp,
4072
+ $$slots,
4073
+ $$events,
4074
+ ...restProps
4075
+ } = $$props;
4076
+ let $$settled = true;
4077
+ let $$inner_renderer;
4078
+ function $$render_inner($$renderer3) {
4079
+ {
4080
+ let children = function($$renderer4, { selected, highlighted }) {
4081
+ $$renderer4.push(`<span class="right-2 size-3.5 absolute flex items-center justify-center">`);
4082
+ if (selected) {
4083
+ $$renderer4.push("<!--[0-->");
4084
+ Check($$renderer4, { class: "size-4" });
4085
+ } else {
4086
+ $$renderer4.push("<!--[-1-->");
4087
+ }
4088
+ $$renderer4.push(`<!--]--></span> `);
4089
+ if (childrenProp) {
4090
+ $$renderer4.push("<!--[0-->");
4091
+ childrenProp($$renderer4, { selected, highlighted });
4092
+ $$renderer4.push(`<!---->`);
4093
+ } else {
4094
+ $$renderer4.push("<!--[-1-->");
4095
+ $$renderer4.push(`${escape_html(label || value)}`);
4096
+ }
4097
+ $$renderer4.push(`<!--]-->`);
4098
+ };
4099
+ if (Select_item$1) {
4100
+ $$renderer3.push("<!--[-->");
4101
+ Select_item$1($$renderer3, spread_props([
4102
+ {
4103
+ value,
4104
+ "data-slot": "select-item",
4105
+ class: cn("gap-2 py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:gap-2 relative flex w-full cursor-default items-center rounded-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center", className)
4106
+ },
4107
+ restProps,
4108
+ {
4109
+ get ref() {
4110
+ return ref;
4111
+ },
4112
+ set ref($$value) {
4113
+ ref = $$value;
4114
+ $$settled = false;
4115
+ },
4116
+ children,
4117
+ $$slots: { default: true }
4118
+ }
4119
+ ]));
4120
+ $$renderer3.push("<!--]-->");
4121
+ } else {
4122
+ $$renderer3.push("<!--[!-->");
4123
+ $$renderer3.push("<!--]-->");
4124
+ }
4125
+ }
4126
+ }
4127
+ do {
4128
+ $$settled = true;
4129
+ $$inner_renderer = $$renderer2.copy();
4130
+ $$render_inner($$inner_renderer);
4131
+ } while (!$$settled);
4132
+ $$renderer2.subsume($$inner_renderer);
4133
+ bind_props($$props, { ref });
4134
+ });
4135
+ }
4136
+ function Select_scroll_up_button($$renderer, $$props) {
4137
+ $$renderer.component(($$renderer2) => {
4138
+ let {
4139
+ ref = null,
4140
+ class: className,
4141
+ $$slots,
4142
+ $$events,
4143
+ ...restProps
4144
+ } = $$props;
4145
+ let $$settled = true;
4146
+ let $$inner_renderer;
4147
+ function $$render_inner($$renderer3) {
4148
+ if (Select_scroll_up_button$1) {
4149
+ $$renderer3.push("<!--[-->");
4150
+ Select_scroll_up_button$1($$renderer3, spread_props([
4151
+ {
4152
+ "data-slot": "select-scroll-up-button",
4153
+ class: cn("py-1 flex cursor-default items-center justify-center", className)
4154
+ },
4155
+ restProps,
4156
+ {
4157
+ get ref() {
4158
+ return ref;
4159
+ },
4160
+ set ref($$value) {
4161
+ ref = $$value;
4162
+ $$settled = false;
4163
+ },
4164
+ children: ($$renderer4) => {
4165
+ Chevron_up($$renderer4, { class: "size-4" });
4166
+ },
4167
+ $$slots: { default: true }
4168
+ }
4169
+ ]));
4170
+ $$renderer3.push("<!--]-->");
4171
+ } else {
4172
+ $$renderer3.push("<!--[!-->");
4173
+ $$renderer3.push("<!--]-->");
4174
+ }
4175
+ }
4176
+ do {
4177
+ $$settled = true;
4178
+ $$inner_renderer = $$renderer2.copy();
4179
+ $$render_inner($$inner_renderer);
4180
+ } while (!$$settled);
4181
+ $$renderer2.subsume($$inner_renderer);
4182
+ bind_props($$props, { ref });
4183
+ });
4184
+ }
4185
+ function Select_scroll_down_button($$renderer, $$props) {
4186
+ $$renderer.component(($$renderer2) => {
4187
+ let {
4188
+ ref = null,
4189
+ class: className,
4190
+ $$slots,
4191
+ $$events,
4192
+ ...restProps
4193
+ } = $$props;
4194
+ let $$settled = true;
4195
+ let $$inner_renderer;
4196
+ function $$render_inner($$renderer3) {
4197
+ if (Select_scroll_down_button$1) {
4198
+ $$renderer3.push("<!--[-->");
4199
+ Select_scroll_down_button$1($$renderer3, spread_props([
4200
+ {
4201
+ "data-slot": "select-scroll-down-button",
4202
+ class: cn("py-1 flex cursor-default items-center justify-center", className)
4203
+ },
4204
+ restProps,
4205
+ {
4206
+ get ref() {
4207
+ return ref;
4208
+ },
4209
+ set ref($$value) {
4210
+ ref = $$value;
4211
+ $$settled = false;
4212
+ },
4213
+ children: ($$renderer4) => {
4214
+ Chevron_down($$renderer4, { class: "size-4" });
4215
+ },
4216
+ $$slots: { default: true }
4217
+ }
4218
+ ]));
4219
+ $$renderer3.push("<!--]-->");
4220
+ } else {
4221
+ $$renderer3.push("<!--[!-->");
4222
+ $$renderer3.push("<!--]-->");
4223
+ }
4224
+ }
4225
+ do {
4226
+ $$settled = true;
4227
+ $$inner_renderer = $$renderer2.copy();
4228
+ $$render_inner($$inner_renderer);
4229
+ } while (!$$settled);
4230
+ $$renderer2.subsume($$inner_renderer);
4231
+ bind_props($$props, { ref });
4232
+ });
4233
+ }
4234
+ function Select_content($$renderer, $$props) {
4235
+ $$renderer.component(($$renderer2) => {
4236
+ let {
4237
+ ref = null,
4238
+ class: className,
4239
+ sideOffset = 4,
4240
+ portalProps,
4241
+ children,
4242
+ $$slots,
4243
+ $$events,
4244
+ ...restProps
4245
+ } = $$props;
4246
+ let $$settled = true;
4247
+ let $$inner_renderer;
4248
+ function $$render_inner($$renderer3) {
4249
+ if (Portal) {
4250
+ $$renderer3.push("<!--[-->");
4251
+ Portal($$renderer3, spread_props([
4252
+ portalProps,
4253
+ {
4254
+ children: ($$renderer4) => {
4255
+ if (Select_content$1) {
4256
+ $$renderer4.push("<!--[-->");
4257
+ Select_content$1($$renderer4, spread_props([
4258
+ {
4259
+ sideOffset,
4260
+ "data-slot": "select-content",
4261
+ class: cn("shadow-md data-[side=bottom]:translate-y-1 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:-translate-x-1 data-[side=left]:slide-in-from-right-2 data-[side=right]:translate-x-1 data-[side=right]:slide-in-from-left-2 data-[side=top]:-translate-y-1 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 relative z-50 max-h-(--bits-select-content-available-height) min-w-[8rem] origin-(--bits-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground", className)
4262
+ },
4263
+ restProps,
4264
+ {
4265
+ get ref() {
4266
+ return ref;
4267
+ },
4268
+ set ref($$value) {
4269
+ ref = $$value;
4270
+ $$settled = false;
4271
+ },
4272
+ children: ($$renderer5) => {
4273
+ Select_scroll_up_button($$renderer5, {});
4274
+ $$renderer5.push(`<!----> `);
4275
+ if (Select_viewport) {
4276
+ $$renderer5.push("<!--[-->");
4277
+ Select_viewport($$renderer5, {
4278
+ class: cn("scroll-my-1 p-1 h-(--bits-select-anchor-height) w-full min-w-(--bits-select-anchor-width)"),
4279
+ children: ($$renderer6) => {
4280
+ children?.($$renderer6);
4281
+ $$renderer6.push(`<!---->`);
4282
+ },
4283
+ $$slots: { default: true }
4284
+ });
4285
+ $$renderer5.push("<!--]-->");
4286
+ } else {
4287
+ $$renderer5.push("<!--[!-->");
4288
+ $$renderer5.push("<!--]-->");
4289
+ }
4290
+ $$renderer5.push(` `);
4291
+ Select_scroll_down_button($$renderer5, {});
4292
+ $$renderer5.push(`<!---->`);
4293
+ },
4294
+ $$slots: { default: true }
4295
+ }
4296
+ ]));
4297
+ $$renderer4.push("<!--]-->");
4298
+ } else {
4299
+ $$renderer4.push("<!--[!-->");
4300
+ $$renderer4.push("<!--]-->");
4301
+ }
4302
+ },
4303
+ $$slots: { default: true }
4304
+ }
4305
+ ]));
4306
+ $$renderer3.push("<!--]-->");
4307
+ } else {
4308
+ $$renderer3.push("<!--[!-->");
4309
+ $$renderer3.push("<!--]-->");
4310
+ }
4311
+ }
4312
+ do {
4313
+ $$settled = true;
4314
+ $$inner_renderer = $$renderer2.copy();
4315
+ $$render_inner($$inner_renderer);
4316
+ } while (!$$settled);
4317
+ $$renderer2.subsume($$inner_renderer);
4318
+ bind_props($$props, { ref });
4319
+ });
4320
+ }
4321
+ function Select_trigger($$renderer, $$props) {
4322
+ $$renderer.component(($$renderer2) => {
4323
+ let {
4324
+ ref = null,
4325
+ class: className,
4326
+ children,
4327
+ size: size2 = "default",
4328
+ $$slots,
4329
+ $$events,
4330
+ ...restProps
4331
+ } = $$props;
4332
+ let $$settled = true;
4333
+ let $$inner_renderer;
4334
+ function $$render_inner($$renderer3) {
4335
+ if (Select_trigger$1) {
4336
+ $$renderer3.push("<!--[-->");
4337
+ Select_trigger$1($$renderer3, spread_props([
4338
+ {
4339
+ "data-slot": "select-trigger",
4340
+ "data-size": size2,
4341
+ class: cn("gap-2 px-3 py-2 text-sm shadow-xs data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:gap-2 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between rounded-md border border-input bg-transparent whitespace-nowrap transition-[color,box-shadow] outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='text-'])]:text-muted-foreground", className)
4342
+ },
4343
+ restProps,
4344
+ {
4345
+ get ref() {
4346
+ return ref;
4347
+ },
4348
+ set ref($$value) {
4349
+ ref = $$value;
4350
+ $$settled = false;
4351
+ },
4352
+ children: ($$renderer4) => {
4353
+ children?.($$renderer4);
4354
+ $$renderer4.push(`<!----> `);
4355
+ Chevron_down($$renderer4, { class: "size-4 opacity-50" });
4356
+ $$renderer4.push(`<!---->`);
4357
+ },
4358
+ $$slots: { default: true }
4359
+ }
4360
+ ]));
4361
+ $$renderer3.push("<!--]-->");
4362
+ } else {
4363
+ $$renderer3.push("<!--[!-->");
4364
+ $$renderer3.push("<!--]-->");
4365
+ }
4366
+ }
4367
+ do {
4368
+ $$settled = true;
4369
+ $$inner_renderer = $$renderer2.copy();
4370
+ $$render_inner($$inner_renderer);
4371
+ } while (!$$settled);
4372
+ $$renderer2.subsume($$inner_renderer);
4373
+ bind_props($$props, { ref });
4374
+ });
4375
+ }
4376
+ const Root = Select;
4377
+
4378
+ export { Hidden_input as H, Root as R, Select_trigger as S, Select_content as a, Select_item as b, isValidIndex as c, isFunction as i };
4379
+ //# sourceMappingURL=index2-olcdaqbX.js.map