@pubinfo/module-rbac 2.0.0-rc.1 → 2.0.0-rc.3

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 (354) hide show
  1. package/dist/ComponentSelect-B1ZyenXP.js +3686 -0
  2. package/dist/ComponentSelect-DlVJI5an.js +2 -0
  3. package/dist/ComponentSelect.css +1 -0
  4. package/dist/DynamicRoutesForm-Cu3WhRpA.js +4 -0
  5. package/dist/{DynamicRoutesForm-DmQMP8-p.js → DynamicRoutesForm-qjbrykW4.js} +95 -95
  6. package/dist/HCheckList-Cze_TkQp.js +2 -0
  7. package/dist/HoverCard-B79q5sly.js +43 -0
  8. package/dist/HoverCard-U5WTpvFy.js +2 -0
  9. package/dist/{ImportExport-Yt6dABIv.js → ImportExport-Clbc8xaw.js} +65 -65
  10. package/dist/ImportExport-CtEZTU87.js +4 -0
  11. package/dist/MetaForm-BWy4Lpr8.js +5 -0
  12. package/dist/MetaForm-DpH9an5A.js +300 -0
  13. package/dist/MetaForm.css +1 -0
  14. package/dist/OrgAndPosition-3lCm4Fyb.js +2 -0
  15. package/dist/ResourceEdit-0_cYB0iu.js +338 -0
  16. package/dist/ResourceEdit-CYPzEbqn.js +10 -0
  17. package/dist/{ResourceRelation-DJDFQYFT.js → ResourceRelation-CZ8hGgOm.js} +7 -7
  18. package/dist/ResourceRelation-DMWa09ae.js +3 -0
  19. package/dist/{ResourceRelation-cfGS-erP.js → ResourceRelation-DkKdZ3TD.js} +3 -3
  20. package/dist/ResourceRelation.css +1 -0
  21. package/dist/ResourceRelation2.css +1 -0
  22. package/dist/{ResourceSelector-B4AXXCxI.js → ResourceSelector-ConJ30Jd.js} +48 -48
  23. package/dist/ResourceSelector.css +1 -0
  24. package/dist/{RoleRelation-BlWDNAM1.js → RoleRelation-B1D1NM_L.js} +1 -1
  25. package/dist/RoleRelation-DySyilcs.js +2 -0
  26. package/dist/RoleSelector-DOt30OLy.js +279 -0
  27. package/dist/TenantEdit-D8-Pt7sf.js +6 -0
  28. package/dist/{TenantEdit-6rMUS9EP.js → TenantEdit-DNJzo8SS.js} +19 -19
  29. package/dist/{UserAuthorization-Cx9oYms2.js → UserAuthorization-DPHUk69M.js} +7 -7
  30. package/dist/UserAuthorization-DuioGghR.js +4 -0
  31. package/dist/UserAuthorization.css +1 -0
  32. package/dist/UserEdit-6HYbgtOh.js +4 -0
  33. package/dist/{UserEdit-CqH6hxTZ.js → UserEdit-C6eNXSCu.js} +24 -24
  34. package/dist/add-child-BqjLtFNF.js +2 -0
  35. package/dist/animation_item-C3pkH-cB.js +2 -0
  36. package/dist/authority-BCFCPQkb.js +2 -0
  37. package/dist/authorize-BykMzt1r.js +2 -0
  38. package/dist/{blackWhiteList-B-EAyXzG.js → blackWhiteList-DQALdBZf.js} +11 -11
  39. package/dist/blackWhiteList.css +1 -0
  40. package/dist/blacklist-disable-COoLZMSA.js +2 -0
  41. package/dist/blacklist-enable-LZep1trj.js +2 -0
  42. package/dist/breadcrumb_setting-D3UjJYhA.js +111 -0
  43. package/dist/breadcrumb_setting.css +1 -0
  44. package/dist/browser-chrome-D0rex7Ir.js +2 -0
  45. package/dist/browser-edge-KCb_AIL5.js +2 -0
  46. package/dist/browser-ie-C1znjJM-.js +2 -0
  47. package/dist/browser-other-C4er8PkV.js +2 -0
  48. package/dist/browser-safari-BPRC1TV-.js +2 -0
  49. package/dist/browserType-BGl2j5RW.js +2 -0
  50. package/dist/components/OrgUserSelector/OrgSelector.vue.d.ts +1 -1
  51. package/dist/components/OrgUserSelector/UserSelector.vue.d.ts +1 -1
  52. package/dist/components/ResourceSelector/index.vue.d.ts +1 -1
  53. package/dist/composables/useWebSocketManager.d.ts +8 -0
  54. package/dist/createAndEditDataPermission-CAaxueTy.js +8 -0
  55. package/dist/{createAndEditDataPermission-BFmD3zpY.js → createAndEditDataPermission-DnAcKvaE.js} +56 -56
  56. package/dist/createAndEditDataPermission.css +1 -0
  57. package/dist/{data-permission-Dz4eCdAg.js → data-permission-CLnnLoPt.js} +9 -9
  58. package/dist/data-permission.css +1 -0
  59. package/dist/{dictionary-C8UVX_8l.js → dictionary-BFM0Mx0P.js} +3 -3
  60. package/dist/{drawerBlackWhiteList-opDsd2_O.js → drawerBlackWhiteList-BYACpO3D.js} +9 -9
  61. package/dist/drawerBlackWhiteList-C3xS7Kxx.js +3 -0
  62. package/dist/{drawerDictionary-CzT9KJGw.js → drawerDictionary-BUBLrbTi.js} +13 -13
  63. package/dist/drawerDictionary-Bk0BgL7i.js +4 -0
  64. package/dist/{drawerDictionaryItem-LBeuvrE8.js → drawerDictionaryItem-CfOPleN6.js} +14 -14
  65. package/dist/drawerDictionaryItem-Dy2T56AH.js +4 -0
  66. package/dist/{drawerGroup-B_pYqrpy.js → drawerGroup-Bly3CWfM.js} +10 -10
  67. package/dist/drawerGroup-ZyzAWXOl.js +3 -0
  68. package/dist/{drawerOrganization-BeDsW0ah.js → drawerOrganization-BhO5-PP5.js} +27 -27
  69. package/dist/drawerOrganization-HSVB8JzO.js +3 -0
  70. package/dist/{drawerPosition-DRacJCCQ.js → drawerPosition-CM0NBfoR.js} +15 -15
  71. package/dist/drawerPosition-vsuG4JYe.js +3 -0
  72. package/dist/drawerRegion-BXZ751ge.js +3 -0
  73. package/dist/{drawerRegion-BM__zqtq.js → drawerRegion-CGySAL6D.js} +17 -17
  74. package/dist/{drawerRole-DhU_4L0Z.js → drawerRole-BE0utb7R.js} +9 -9
  75. package/dist/drawerRole-BVeaz3Yb.js +5 -0
  76. package/dist/drawerRole-BdoMYLYW.js +215 -0
  77. package/dist/drawerRole-BeUNs7cF.js +6 -0
  78. package/dist/drawerRole-DNsK5a6O.js +3 -0
  79. package/dist/{drawerRole-BOf6UXMc.js → drawerRole-DS7fbx1h.js} +10 -10
  80. package/dist/edit-C9HH0bNg.js +2 -0
  81. package/dist/{group-C0rajn0e.js → group-B1gGoTD5.js} +11 -11
  82. package/dist/group.css +1 -0
  83. package/dist/icard-FW0Ro50-.js +2 -0
  84. package/dist/icon_animation-DuNUKCIP.js +2 -0
  85. package/dist/icon_breadcrumb-DrPNYW5B.js +2 -0
  86. package/dist/icon_copyright-Di3Yr0PZ.js +2 -0
  87. package/dist/icon_jt-C4rQLl9Y.js +2 -0
  88. package/dist/icon_layout-5L9E7uN2.js +2 -0
  89. package/dist/icon_mainpage-DMKqRgmE.js +2 -0
  90. package/dist/icon_menu-Cp7-Zght.js +2 -0
  91. package/dist/icon_page_size-Dc0zqT2W.js +2 -0
  92. package/dist/icon_position_type-DH2qxQQE.js +2 -0
  93. package/dist/icon_safe_manage-DXYWl1y-.js +2 -0
  94. package/dist/icon_screen_scale-DwC6qqx2.js +2 -0
  95. package/dist/icon_system_manage-BYTldLly.js +2 -0
  96. package/dist/icon_tabbar-CxffARwI.js +2 -0
  97. package/dist/icon_toolbar-CsxnTrNJ.js +2 -0
  98. package/dist/icon_topbar-DS-oEZFA.js +2 -0
  99. package/dist/icon_watermark-DDXsHlfQ.js +2 -0
  100. package/dist/index.css +1 -0
  101. package/dist/index.d.ts +3 -0
  102. package/dist/index.js +2264 -2041
  103. package/dist/{itemlist-CZBPz_rC.js → itemlist-uCHnA_We.js} +3 -3
  104. package/dist/{layout_setting-oQd8BfKx.js → layout_setting-DMvxwL31.js} +20 -20
  105. package/dist/layout_setting.css +1 -0
  106. package/dist/log-center-BFjZ4IE1.js +2 -0
  107. package/dist/{loginHistoryDetail-Abn9eS5-.js → loginHistoryDetail-BAYuSqvw.js} +3 -3
  108. package/dist/loginHistoryDetail-DiuNa6Sv.js +4 -0
  109. package/dist/loginHistoryDetail.css +1 -0
  110. package/dist/{login_history-Btv9KB0x.js → login_history-BexfCN-1.js} +8 -8
  111. package/dist/login_history.css +1 -0
  112. package/dist/menu_setting-BXR3EAXD.js +158 -0
  113. package/dist/menu_setting.css +1 -0
  114. package/dist/not-data-Bw8FlpyB.js +2 -0
  115. package/dist/not-data-OpiacaSk.js +2 -0
  116. package/dist/{operateHistoryDetail-Br_M3mhI.js → operateHistoryDetail-DiuqMTkN.js} +3 -3
  117. package/dist/operateHistoryDetail-r30ZBNqw.js +4 -0
  118. package/dist/operateHistoryDetail.css +1 -0
  119. package/dist/{operate_history-D7jq2IH-.js → operate_history-hXxS3atI.js} +8 -8
  120. package/dist/operate_history.css +1 -0
  121. package/dist/org-main-D5Isevbc.js +2 -0
  122. package/dist/org-unmain-BHBqSuCz.js +2 -0
  123. package/dist/{organization-CeOyltjo.js → organization-cvYm9P9w.js} +2648 -2648
  124. package/dist/organization.css +1 -0
  125. package/dist/other_setting-DjVQevBW.js +220 -0
  126. package/dist/other_setting.css +1 -0
  127. package/dist/page_animation_setting-DgHHmFEc.js +117 -0
  128. package/dist/page_animation_setting.css +1 -0
  129. package/dist/{page_w_setting-Dr2tu_oS.js → page_w_setting-B_im6vBo.js} +20 -20
  130. package/dist/page_w_setting.css +1 -0
  131. package/dist/{position-Bodjtnh9.js → position-BkpbHXYP.js} +2 -2
  132. package/dist/{region-B9xObK4Z.js → region-DVkbjI9t.js} +6 -6
  133. package/dist/remove-DKMMsJNq.js +2 -0
  134. package/dist/{resource-DhkRTloI.js → resource-CrhX7VRK.js} +13 -11
  135. package/dist/resource-app-DZwdNG6F.js +2 -0
  136. package/dist/resource-btn-DPX0oM2L.js +2 -0
  137. package/dist/resource-dynamic-Cb_vjMjt.js +2 -0
  138. package/dist/resource-index-ah4NpEob.js +2 -0
  139. package/dist/resource-menu-CzWI03EU.js +2 -0
  140. package/dist/resource-micro-Ca0NS7j_.js +2 -0
  141. package/dist/resource-nonmenu-Deitjo_5.js +2 -0
  142. package/dist/{role-DoBrQ1zG.js → role-PjmrOdFd.js} +6 -6
  143. package/dist/{role_group-BMNZ1M1A.js → role_group-Dlx-6BZF.js} +2 -2
  144. package/dist/routeSystem-Dg0b6mAl.js +2 -0
  145. package/dist/{safe_setting-J6GWqrZx.js → safe_setting-DpWUCv2p.js} +2 -2
  146. package/dist/safe_setting.css +1 -0
  147. package/dist/setItem-9ZBl0BlF.js +5 -0
  148. package/dist/setItem-BenNySNl.js +77 -0
  149. package/dist/setItem.css +1 -0
  150. package/dist/setting-manage-B3vaM0w1.js +2 -0
  151. package/dist/stores/view.d.ts +56 -0
  152. package/dist/tabbar_setting-9UKDc1Ev.js +142 -0
  153. package/dist/tabbar_setting.css +1 -0
  154. package/dist/{tenant-pPYq3xtM.js → tenant-BGtOP_wo.js} +5 -5
  155. package/dist/theme-check-mark-BK7E8lqd.js +2 -0
  156. package/dist/theme-title-aqbHq846.js +2 -0
  157. package/dist/{theme_setting-DMyPJp3M.js → theme_setting-BBLaZ4NS.js} +9 -9
  158. package/dist/theme_setting.css +1 -0
  159. package/dist/{toolbar_setting-ChcZxAJJ.js → toolbar_setting-OemNp6pO.js} +37 -37
  160. package/dist/toolbar_setting.css +1 -0
  161. package/dist/{useAppAndResource-DWQG9bqY.js → useAppAndResource-CeMCjg2v.js} +1 -1
  162. package/dist/{user-BJL1Sw0q.js → user-JCiGXodF.js} +12 -12
  163. package/dist/user.css +1 -0
  164. package/dist/utils/routeSystem.d.ts +55 -0
  165. package/dist/view-C6Eo1zRL.js +2 -0
  166. package/dist/views/blackWhiteList/index.vue.d.ts +2 -2
  167. package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +5 -5
  168. package/dist/views/data-permission/index.vue.d.ts +7 -7
  169. package/dist/views/dictionary/index.vue.d.ts +2 -2
  170. package/dist/views/dictionary/itemlist.vue.d.ts +2 -2
  171. package/dist/views/group/index.vue.d.ts +2 -2
  172. package/dist/views/log_center/login_history.vue.d.ts +2 -2
  173. package/dist/views/log_center/operate_history.vue.d.ts +2 -2
  174. package/dist/views/position/index.vue.d.ts +2 -2
  175. package/dist/views/region/index.vue.d.ts +2 -2
  176. package/dist/views/resource/components/ComponentSelect.vue.d.ts +3 -1
  177. package/dist/views/resource/components/HoverCard.vue.d.ts +21 -0
  178. package/dist/views/resource/index.vue.d.ts +2 -2
  179. package/dist/views/resource/model.d.ts +3 -1
  180. package/dist/views/role/components/ResourceRelation.vue.d.ts +2 -2
  181. package/dist/views/role/components/drawerRole.vue.d.ts +2 -2
  182. package/dist/views/role/index.vue.d.ts +6 -6
  183. package/dist/views/role_group/index.vue.d.ts +2 -2
  184. package/dist/views/tenant/components/TenantEdit.vue.d.ts +2 -2
  185. package/dist/views/tenant/index.vue.d.ts +4 -4
  186. package/dist/views/user/index.vue.d.ts +2 -2
  187. package/dist/watermark_setting-C1VFRfbW.js +199 -0
  188. package/dist/watermark_setting.css +1 -0
  189. package/dist/zddata-fjEtQ3lZ.js +2 -0
  190. package/dist/zy_checked-DTsDCC94.js +2 -0
  191. package/dist/zy_default-BaIuMKw-.js +2 -0
  192. package/package.json +11 -9
  193. package/src/assets/icons/add-child.svg +1 -1
  194. package/src/assets/icons/authority.svg +1 -1
  195. package/src/assets/icons/authorize.svg +1 -1
  196. package/src/assets/icons/blacklist-disable.svg +1 -1
  197. package/src/assets/icons/blacklist-enable.svg +1 -1
  198. package/src/assets/icons/browser-chrome.svg +1 -1
  199. package/src/assets/icons/browser-edge.svg +1 -1
  200. package/src/assets/icons/browser-ie.svg +1 -1
  201. package/src/assets/icons/browser-other.svg +1 -1
  202. package/src/assets/icons/browser-safari.svg +1 -1
  203. package/src/assets/icons/edit.svg +1 -1
  204. package/src/assets/icons/icard.svg +1 -1
  205. package/src/assets/icons/icon_animation.svg +1 -1
  206. package/src/assets/icons/icon_breadcrumb.svg +1 -1
  207. package/src/assets/icons/icon_copyright.svg +1 -1
  208. package/src/assets/icons/icon_jt.svg +1 -1
  209. package/src/assets/icons/icon_layout.svg +1 -1
  210. package/src/assets/icons/icon_mainpage.svg +1 -1
  211. package/src/assets/icons/icon_menu.svg +1 -1
  212. package/src/assets/icons/icon_page_size.svg +1 -1
  213. package/src/assets/icons/icon_position_type.svg +1 -1
  214. package/src/assets/icons/icon_safe_manage.svg +1 -1
  215. package/src/assets/icons/icon_screen_scale.svg +2 -2
  216. package/src/assets/icons/icon_system_manage.svg +1 -1
  217. package/src/assets/icons/icon_tabbar.svg +1 -1
  218. package/src/assets/icons/icon_toolbar.svg +1 -1
  219. package/src/assets/icons/icon_topbar.svg +1 -1
  220. package/src/assets/icons/icon_watermark.svg +1 -1
  221. package/src/assets/icons/log-center.svg +1 -1
  222. package/src/assets/icons/not-data.svg +1 -1
  223. package/src/assets/icons/org-main.svg +1 -1
  224. package/src/assets/icons/org-unmain.svg +1 -1
  225. package/src/assets/icons/remove.svg +1 -1
  226. package/src/assets/icons/resource-app.svg +1 -1
  227. package/src/assets/icons/resource-btn.svg +1 -1
  228. package/src/assets/icons/resource-dynamic.svg +2 -2
  229. package/src/assets/icons/resource-index.svg +1 -1
  230. package/src/assets/icons/resource-menu.svg +1 -1
  231. package/src/assets/icons/resource-micro.svg +2 -2
  232. package/src/assets/icons/resource-nonmenu.svg +1 -1
  233. package/src/assets/icons/setting-manage.svg +1 -1
  234. package/src/assets/icons/theme-check-mark.svg +1 -1
  235. package/src/assets/icons/theme-title.svg +1 -1
  236. package/src/assets/icons/view.svg +1 -1
  237. package/src/assets/icons/zddata.svg +1 -1
  238. package/src/assets/icons/zy_checked.svg +1 -1
  239. package/src/assets/icons/zy_default.svg +1 -1
  240. package/src/composables/useWebSocketManager.ts +104 -0
  241. package/src/index.ts +22 -0
  242. package/src/stores/view.ts +292 -0
  243. package/src/utils/routeSystem.ts +53 -0
  244. package/src/views/region/index.vue +1 -1
  245. package/src/views/resource/components/ComponentSelect.vue +99 -181
  246. package/src/views/resource/components/HoverCard.vue +62 -0
  247. package/src/views/resource/components/MetaForm.vue +129 -67
  248. package/src/views/resource/components/ResourceEdit.vue +33 -4
  249. package/src/views/resource/hooks/useMetaForm.ts +23 -0
  250. package/src/views/resource/model.ts +5 -1
  251. package/src/views/watermark_setting/index.vue +2 -2
  252. package/dist/ComponentSelect-AWuDE4De.js +0 -2
  253. package/dist/ComponentSelect-CFoCrAFh.js +0 -483
  254. package/dist/DynamicRoutesForm-xXTdh5EX.js +0 -4
  255. package/dist/HCheckList-u43x0KiD.js +0 -2
  256. package/dist/ImportExport-BbZkZEW_.js +0 -4
  257. package/dist/MetaForm-BB80P4w6.js +0 -284
  258. package/dist/MetaForm-D_na1CP8.js +0 -4
  259. package/dist/OrgAndPosition-CDCim7yM.js +0 -2
  260. package/dist/ResourceEdit-CVwNJMVm.js +0 -309
  261. package/dist/ResourceEdit-D1e8tLAA.js +0 -8
  262. package/dist/ResourceRelation-DWhWzKQJ.js +0 -3
  263. package/dist/RoleRelation-CAMzPMFz.js +0 -2
  264. package/dist/RoleSelector-Bqv2p_7X.js +0 -279
  265. package/dist/TenantEdit-BhpSW4w7.js +0 -6
  266. package/dist/UserAuthorization-D5rSSagE.js +0 -4
  267. package/dist/UserEdit-CqrRx717.js +0 -4
  268. package/dist/add-child-CJM7MvB2.js +0 -2
  269. package/dist/animation_item-Wmcl4yBo.js +0 -2
  270. package/dist/authority-BofK2fFE.js +0 -2
  271. package/dist/authorize-Ck1i_5K5.js +0 -2
  272. package/dist/blacklist-disable-BgMERGDX.js +0 -2
  273. package/dist/blacklist-enable-D8ds6NgH.js +0 -2
  274. package/dist/breadcrumb_setting-Bv12pA15.js +0 -111
  275. package/dist/browser-chrome-BVvmyPYW.js +0 -2
  276. package/dist/browser-edge-Bc36eH7f.js +0 -2
  277. package/dist/browser-ie-BiDFft9C.js +0 -2
  278. package/dist/browser-other-BzyOvDmB.js +0 -2
  279. package/dist/browser-safari-CBxgFrI_.js +0 -2
  280. package/dist/browserType-pMY0VZ_3.js +0 -2
  281. package/dist/createAndEditDataPermission-Ll6GWW-p.js +0 -8
  282. package/dist/drawerBlackWhiteList-taaV8A5D.js +0 -3
  283. package/dist/drawerDictionary-D0Bi75vl.js +0 -4
  284. package/dist/drawerDictionaryItem-BqQojUNh.js +0 -4
  285. package/dist/drawerGroup-BI0pYuIO.js +0 -3
  286. package/dist/drawerOrganization-RbLK6k_c.js +0 -3
  287. package/dist/drawerPosition-CKZCt-Yc.js +0 -3
  288. package/dist/drawerRegion-CaXvxWEn.js +0 -3
  289. package/dist/drawerRole-27ggtdnJ.js +0 -6
  290. package/dist/drawerRole-CQURGn5D.js +0 -215
  291. package/dist/drawerRole-D9Dt3l7O.js +0 -5
  292. package/dist/drawerRole-DPC9SVDe.js +0 -3
  293. package/dist/edit-DF7Qsxtl.js +0 -2
  294. package/dist/icard-CtletXtq.js +0 -2
  295. package/dist/icon_animation-Do8Rw-K9.js +0 -2
  296. package/dist/icon_breadcrumb-CmZgmswj.js +0 -2
  297. package/dist/icon_copyright--7CIXSE1.js +0 -2
  298. package/dist/icon_jt--G-Amuu4.js +0 -2
  299. package/dist/icon_layout-BkQems5J.js +0 -2
  300. package/dist/icon_mainpage-98dHnXRL.js +0 -2
  301. package/dist/icon_menu-8foYPA9U.js +0 -2
  302. package/dist/icon_page_size-CPjiZpP2.js +0 -2
  303. package/dist/icon_position_type-Do71e9Ov.js +0 -2
  304. package/dist/icon_safe_manage-DiBn-uSS.js +0 -2
  305. package/dist/icon_screen_scale-Ct8iHVKy.js +0 -2
  306. package/dist/icon_system_manage-CzBNNisy.js +0 -2
  307. package/dist/icon_tabbar-BajHaWfA.js +0 -2
  308. package/dist/icon_toolbar-DHKFZD2w.js +0 -2
  309. package/dist/icon_topbar-C4mu7up7.js +0 -2
  310. package/dist/icon_watermark-2Wtjrft3.js +0 -2
  311. package/dist/log-center-qtOWNEaD.js +0 -2
  312. package/dist/loginHistoryDetail-DDEuFbYB.js +0 -4
  313. package/dist/menu_setting-Cju5OkSE.js +0 -158
  314. package/dist/not-data-BA50qHBT.js +0 -2
  315. package/dist/not-data-BzaRFolb.js +0 -2
  316. package/dist/operateHistoryDetail-CLsHDBp7.js +0 -4
  317. package/dist/org-main-D0M4-Mu2.js +0 -2
  318. package/dist/org-unmain-Bh9hzLgK.js +0 -2
  319. package/dist/other_setting-rbUoVood.js +0 -220
  320. package/dist/page_animation_setting-Diclx4mg.js +0 -117
  321. package/dist/remove-B3pgrGrf.js +0 -2
  322. package/dist/resource-app-BKgfDs09.js +0 -2
  323. package/dist/resource-btn-BXLyUStb.js +0 -2
  324. package/dist/resource-dynamic-Dx3RhbQk.js +0 -2
  325. package/dist/resource-index-C2COvmY-.js +0 -2
  326. package/dist/resource-menu-C_Q6AEFw.js +0 -2
  327. package/dist/resource-micro-D_OBvoET.js +0 -2
  328. package/dist/resource-nonmenu-CCpeV9Km.js +0 -2
  329. package/dist/setItem-CcNK_f8V.js +0 -77
  330. package/dist/setItem-CqHPfTBZ.js +0 -5
  331. package/dist/setting-manage-Di7-Ks18.js +0 -2
  332. package/dist/style.css +0 -2
  333. package/dist/tabbar_setting-Di3OcDig.js +0 -142
  334. package/dist/theme-check-mark-DhhsmM5v.js +0 -2
  335. package/dist/theme-title-DEVFVYNh.js +0 -2
  336. package/dist/view-FR2dRATN.js +0 -2
  337. package/dist/watermark_setting-tqYUcPzF.js +0 -199
  338. package/dist/zddata-D9x-CcqP.js +0 -2
  339. package/dist/zy_checked-B0r0BaR-.js +0 -2
  340. package/dist/zy_default-BHbIn4if.js +0 -2
  341. /package/dist/{HCheckList-DDP7S_nc.js → HCheckList-CmS0Zgjk.js} +0 -0
  342. /package/dist/{OrgAndPosition-BK5MTlOO.js → OrgAndPosition-DYxNkasL.js} +0 -0
  343. /package/dist/{_plugin-vue_export-helper-Cmy-mbsL.js → _plugin-vue_export-helper-DziIhCOI.js} +0 -0
  344. /package/dist/{animation_item-Bf_Y_nyf.js → animation_item-Cg-CB3zX.js} +0 -0
  345. /package/dist/{browserType-BJeH2o0t.js → browserType-E4RCiZfN.js} +0 -0
  346. /package/dist/{configData-BoeH9I4s.js → configData-DQOHeFW2.js} +0 -0
  347. /package/dist/{dayjs.min-KffHrkDe.js → dayjs.min-DcxwBe2I.js} +0 -0
  348. /package/dist/{enum-e5LlvaOv.js → enum-B1DCzyaW.js} +0 -0
  349. /package/dist/{enum-BZtNAeJC.js → enum-BWzxzuim.js} +0 -0
  350. /package/dist/{enum-CtIne-Ul.js → enum-CYW8g64p.js} +0 -0
  351. /package/dist/{enum-BMY6bmPA.js → enum-D0U38jb6.js} +0 -0
  352. /package/dist/{enum-DfCD4cL8.js → enum-VH4_jOj5.js} +0 -0
  353. /package/dist/{log-CQfCPTsC.js → log-hgUXTuhy.js} +0 -0
  354. /package/dist/{stores-DXQ1Ibt6.js → stores-D6JJmBEU.js} +0 -0
@@ -0,0 +1,3686 @@
1
+ import { useViewStore as e } from "./index.js";
2
+ import { Fragment as t, Teleport as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeClass as f, normalizeProps as p, onBeforeUnmount as m, onMounted as h, onUnmounted as g, openBlock as _, ref as v, resolveComponent as y, shallowRef as b, unref as x, useId as ee, useModel as S, useTemplateRef as C, watch as w, watchEffect as T, withCtx as te } from "vue";
3
+ import { CaretDownOutlined as ne } from "@ant-design/icons-vue";
4
+ import { Empty as re } from "ant-design-vue";
5
+ import { DirectoryTree as ie, Empty as ae, FormItemRest as oe, Input as se } from "ant-design-vue/es";
6
+ import './ComponentSelect.css';const ce = [
7
+ "top",
8
+ "right",
9
+ "bottom",
10
+ "left"
11
+ ], E = Math.min, D = Math.max, O = Math.round, le = Math.floor, k = (e) => ({
12
+ x: e,
13
+ y: e
14
+ }), ue = {
15
+ left: "right",
16
+ right: "left",
17
+ bottom: "top",
18
+ top: "bottom"
19
+ }, de = {
20
+ start: "end",
21
+ end: "start"
22
+ };
23
+ function fe(e, t, n) {
24
+ return D(e, E(t, n));
25
+ }
26
+ function A(e, t) {
27
+ return typeof e == "function" ? e(t) : e;
28
+ }
29
+ function j(e) {
30
+ return e.split("-")[0];
31
+ }
32
+ function M(e) {
33
+ return e.split("-")[1];
34
+ }
35
+ function pe(e) {
36
+ return e === "x" ? "y" : "x";
37
+ }
38
+ function me(e) {
39
+ return e === "y" ? "height" : "width";
40
+ }
41
+ const he = /* @__PURE__ */ new Set(["top", "bottom"]);
42
+ function N(e) {
43
+ return he.has(j(e)) ? "y" : "x";
44
+ }
45
+ function ge(e) {
46
+ return pe(N(e));
47
+ }
48
+ function _e(e, t, n) {
49
+ n === void 0 && (n = !1);
50
+ let r = M(e), i = ge(e), a = me(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
51
+ return t.reference[a] > t.floating[a] && (o = Ee(o)), [o, Ee(o)];
52
+ }
53
+ function ve(e) {
54
+ let t = Ee(e);
55
+ return [
56
+ ye(e),
57
+ t,
58
+ ye(t)
59
+ ];
60
+ }
61
+ function ye(e) {
62
+ return e.replace(/start|end/g, (e) => de[e]);
63
+ }
64
+ const be = ["left", "right"], xe = ["right", "left"], Se = ["top", "bottom"], Ce = ["bottom", "top"];
65
+ function we(e, t, n) {
66
+ switch (e) {
67
+ case "top":
68
+ case "bottom": return n ? t ? xe : be : t ? be : xe;
69
+ case "left":
70
+ case "right": return t ? Se : Ce;
71
+ default: return [];
72
+ }
73
+ }
74
+ function Te(e, t, n, r) {
75
+ let i = M(e), a = we(j(e), n === "start", r);
76
+ return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(ye)))), a;
77
+ }
78
+ function Ee(e) {
79
+ return e.replace(/left|right|bottom|top/g, (e) => ue[e]);
80
+ }
81
+ function De(e) {
82
+ return {
83
+ top: 0,
84
+ right: 0,
85
+ bottom: 0,
86
+ left: 0,
87
+ ...e
88
+ };
89
+ }
90
+ function Oe(e) {
91
+ return typeof e == "number" ? {
92
+ top: e,
93
+ right: e,
94
+ bottom: e,
95
+ left: e
96
+ } : De(e);
97
+ }
98
+ function ke(e) {
99
+ let { x: t, y: n, width: r, height: i } = e;
100
+ return {
101
+ width: r,
102
+ height: i,
103
+ top: n,
104
+ left: t,
105
+ right: t + r,
106
+ bottom: n + i,
107
+ x: t,
108
+ y: n
109
+ };
110
+ }
111
+ function Ae(e, t, n) {
112
+ let { reference: r, floating: i } = e, a = N(t), o = ge(t), s = me(o), c = j(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
113
+ switch (c) {
114
+ case "top":
115
+ p = {
116
+ x: u,
117
+ y: r.y - i.height
118
+ };
119
+ break;
120
+ case "bottom":
121
+ p = {
122
+ x: u,
123
+ y: r.y + r.height
124
+ };
125
+ break;
126
+ case "right":
127
+ p = {
128
+ x: r.x + r.width,
129
+ y: d
130
+ };
131
+ break;
132
+ case "left":
133
+ p = {
134
+ x: r.x - i.width,
135
+ y: d
136
+ };
137
+ break;
138
+ default: p = {
139
+ x: r.x,
140
+ y: r.y
141
+ };
142
+ }
143
+ switch (M(t)) {
144
+ case "start":
145
+ p[o] -= f * (n && l ? -1 : 1);
146
+ break;
147
+ case "end":
148
+ p[o] += f * (n && l ? -1 : 1);
149
+ break;
150
+ }
151
+ return p;
152
+ }
153
+ const je = async (e, t, n) => {
154
+ let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = a.filter(Boolean), c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
155
+ reference: e,
156
+ floating: t,
157
+ strategy: i
158
+ }), { x: u, y: d } = Ae(l, r, c), f = r, p = {}, m = 0;
159
+ for (let n = 0; n < s.length; n++) {
160
+ let { name: a, fn: h } = s[n], { x: g, y: _, data: v, reset: y } = await h({
161
+ x: u,
162
+ y: d,
163
+ initialPlacement: r,
164
+ placement: f,
165
+ strategy: i,
166
+ middlewareData: p,
167
+ rects: l,
168
+ platform: o,
169
+ elements: {
170
+ reference: e,
171
+ floating: t
172
+ }
173
+ });
174
+ u = g ?? u, d = _ ?? d, p = {
175
+ ...p,
176
+ [a]: {
177
+ ...p[a],
178
+ ...v
179
+ }
180
+ }, y && m <= 50 && (m++, typeof y == "object" && (y.placement && (f = y.placement), y.rects && (l = y.rects === !0 ? await o.getElementRects({
181
+ reference: e,
182
+ floating: t,
183
+ strategy: i
184
+ }) : y.rects), {x: u, y: d} = Ae(l, f, c)), n = -1);
185
+ }
186
+ return {
187
+ x: u,
188
+ y: d,
189
+ placement: f,
190
+ strategy: i,
191
+ middlewareData: p
192
+ };
193
+ };
194
+ async function Me(e, t) {
195
+ var n;
196
+ t === void 0 && (t = {});
197
+ let { x: r, y: i, platform: a, rects: o, elements: s, strategy: c } = e, { boundary: l = "clippingAncestors", rootBoundary: u = "viewport", elementContext: d = "floating", altBoundary: f = !1, padding: p = 0 } = A(t, e), m = Oe(p), h = d === "floating" ? "reference" : "floating", g = s[f ? h : d], _ = ke(await a.getClippingRect({
198
+ element: (n = await (a.isElement == null ? void 0 : a.isElement(g))) ?? !0 ? g : g.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(s.floating)),
199
+ boundary: l,
200
+ rootBoundary: u,
201
+ strategy: c
202
+ })), v = d === "floating" ? {
203
+ x: r,
204
+ y: i,
205
+ width: o.floating.width,
206
+ height: o.floating.height
207
+ } : o.reference, y = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(s.floating)), b = await (a.isElement == null ? void 0 : a.isElement(y)) && await (a.getScale == null ? void 0 : a.getScale(y)) || {
208
+ x: 1,
209
+ y: 1
210
+ }, x = ke(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
211
+ elements: s,
212
+ rect: v,
213
+ offsetParent: y,
214
+ strategy: c
215
+ }) : v);
216
+ return {
217
+ top: (_.top - x.top + m.top) / b.y,
218
+ bottom: (x.bottom - _.bottom + m.bottom) / b.y,
219
+ left: (_.left - x.left + m.left) / b.x,
220
+ right: (x.right - _.right + m.right) / b.x
221
+ };
222
+ }
223
+ const Ne = (e) => ({
224
+ name: "arrow",
225
+ options: e,
226
+ async fn(t) {
227
+ let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = A(e, t) || {};
228
+ if (l == null) return {};
229
+ let d = Oe(u), f = {
230
+ x: n,
231
+ y: r
232
+ }, p = ge(i), m = me(p), h = await o.getDimensions(l), g = p === "y", _ = g ? "top" : "left", v = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = a.reference[m] + a.reference[p] - f[p] - a.floating[m], x = f[p] - a.reference[p], ee = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), S = ee ? ee[y] : 0;
233
+ (!S || !await (o.isElement == null ? void 0 : o.isElement(ee))) && (S = s.floating[y] || a.floating[m]);
234
+ let C = b / 2 - x / 2, w = S / 2 - h[m] / 2 - 1, T = E(d[_], w), te = E(d[v], w), ne = T, re = S - h[m] - te, ie = S / 2 - h[m] / 2 + C, ae = fe(ne, ie, re), oe = !c.arrow && M(i) != null && ie !== ae && a.reference[m] / 2 - (ie < ne ? T : te) - h[m] / 2 < 0, se = oe ? ie < ne ? ie - ne : ie - re : 0;
235
+ return {
236
+ [p]: f[p] + se,
237
+ data: {
238
+ [p]: ae,
239
+ centerOffset: ie - ae - se,
240
+ ...oe && { alignmentOffset: se }
241
+ },
242
+ reset: oe
243
+ };
244
+ }
245
+ }), Pe = function(e) {
246
+ return e === void 0 && (e = {}), {
247
+ name: "flip",
248
+ options: e,
249
+ async fn(t) {
250
+ var n, r;
251
+ let { placement: i, middlewareData: a, rects: o, initialPlacement: s, platform: c, elements: l } = t, { mainAxis: u = !0, crossAxis: d = !0, fallbackPlacements: f, fallbackStrategy: p = "bestFit", fallbackAxisSideDirection: m = "none", flipAlignment: h = !0,...g } = A(e, t);
252
+ if ((n = a.arrow) != null && n.alignmentOffset) return {};
253
+ let _ = j(i), v = N(s), y = j(s) === s, b = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), x = f || (y || !h ? [Ee(s)] : ve(s)), ee = m !== "none";
254
+ !f && ee && x.push(...Te(s, h, m, b));
255
+ let S = [s, ...x], C = await Me(t, g), w = [], T = (r = a.flip)?.overflows || [];
256
+ if (u && w.push(C[_]), d) {
257
+ let e = _e(i, o, b);
258
+ w.push(C[e[0]], C[e[1]]);
259
+ }
260
+ if (T = [...T, {
261
+ placement: i,
262
+ overflows: w
263
+ }], !w.every((e) => e <= 0)) {
264
+ var te, ne;
265
+ let e = ((te = a.flip)?.index || 0) + 1, t = S[e];
266
+ if (t) {
267
+ let n = d === "alignment" ? v !== N(t) : !1;
268
+ if (!n || T.every((e) => e.overflows[0] > 0 && N(e.placement) === v)) return {
269
+ data: {
270
+ index: e,
271
+ overflows: T
272
+ },
273
+ reset: { placement: t }
274
+ };
275
+ }
276
+ let n = (ne = T.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0])?.placement;
277
+ if (!n) switch (p) {
278
+ case "bestFit": {
279
+ var re;
280
+ let e = (re = T.filter((e) => {
281
+ if (ee) {
282
+ let t = N(e.placement);
283
+ return t === v || t === "y";
284
+ }
285
+ return !0;
286
+ }).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0])?.[0];
287
+ e && (n = e);
288
+ break;
289
+ }
290
+ case "initialPlacement":
291
+ n = s;
292
+ break;
293
+ }
294
+ if (i !== n) return { reset: { placement: n } };
295
+ }
296
+ return {};
297
+ }
298
+ };
299
+ };
300
+ function Fe(e, t) {
301
+ return {
302
+ top: e.top - t.height,
303
+ right: e.right - t.width,
304
+ bottom: e.bottom - t.height,
305
+ left: e.left - t.width
306
+ };
307
+ }
308
+ function Ie(e) {
309
+ return ce.some((t) => e[t] >= 0);
310
+ }
311
+ const Le = function(e) {
312
+ return e === void 0 && (e = {}), {
313
+ name: "hide",
314
+ options: e,
315
+ async fn(t) {
316
+ let { rects: n } = t, { strategy: r = "referenceHidden",...i } = A(e, t);
317
+ switch (r) {
318
+ case "referenceHidden": {
319
+ let e = await Me(t, {
320
+ ...i,
321
+ elementContext: "reference"
322
+ }), r = Fe(e, n.reference);
323
+ return { data: {
324
+ referenceHiddenOffsets: r,
325
+ referenceHidden: Ie(r)
326
+ } };
327
+ }
328
+ case "escaped": {
329
+ let e = await Me(t, {
330
+ ...i,
331
+ altBoundary: !0
332
+ }), r = Fe(e, n.floating);
333
+ return { data: {
334
+ escapedOffsets: r,
335
+ escaped: Ie(r)
336
+ } };
337
+ }
338
+ default: return {};
339
+ }
340
+ }
341
+ };
342
+ }, Re = /* @__PURE__ */ new Set(["left", "top"]);
343
+ async function ze(e, t) {
344
+ let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = j(n), s = M(n), c = N(n) === "y", l = Re.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = A(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
345
+ mainAxis: d,
346
+ crossAxis: 0,
347
+ alignmentAxis: null
348
+ } : {
349
+ mainAxis: d.mainAxis || 0,
350
+ crossAxis: d.crossAxis || 0,
351
+ alignmentAxis: d.alignmentAxis
352
+ };
353
+ return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
354
+ x: p * u,
355
+ y: f * l
356
+ } : {
357
+ x: f * l,
358
+ y: p * u
359
+ };
360
+ }
361
+ const Be = function(e) {
362
+ return e === void 0 && (e = 0), {
363
+ name: "offset",
364
+ options: e,
365
+ async fn(t) {
366
+ var n, r;
367
+ let { x: i, y: a, placement: o, middlewareData: s } = t, c = await ze(t, e);
368
+ return o === (n = s.offset)?.placement && (r = s.arrow) != null && r.alignmentOffset ? {} : {
369
+ x: i + c.x,
370
+ y: a + c.y,
371
+ data: {
372
+ ...c,
373
+ placement: o
374
+ }
375
+ };
376
+ }
377
+ };
378
+ }, Ve = function(e) {
379
+ return e === void 0 && (e = {}), {
380
+ name: "shift",
381
+ options: e,
382
+ async fn(t) {
383
+ let { x: n, y: r, placement: i } = t, { mainAxis: a = !0, crossAxis: o = !1, limiter: s = { fn: (e) => {
384
+ let { x: t, y: n } = e;
385
+ return {
386
+ x: t,
387
+ y: n
388
+ };
389
+ } },...c } = A(e, t), l = {
390
+ x: n,
391
+ y: r
392
+ }, u = await Me(t, c), d = N(j(i)), f = pe(d), p = l[f], m = l[d];
393
+ if (a) {
394
+ let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = p + u[e], r = p - u[t];
395
+ p = fe(n, p, r);
396
+ }
397
+ if (o) {
398
+ let e = d === "y" ? "top" : "left", t = d === "y" ? "bottom" : "right", n = m + u[e], r = m - u[t];
399
+ m = fe(n, m, r);
400
+ }
401
+ let h = s.fn({
402
+ ...t,
403
+ [f]: p,
404
+ [d]: m
405
+ });
406
+ return {
407
+ ...h,
408
+ data: {
409
+ x: h.x - n,
410
+ y: h.y - r,
411
+ enabled: {
412
+ [f]: a,
413
+ [d]: o
414
+ }
415
+ }
416
+ };
417
+ }
418
+ };
419
+ }, He = function(e) {
420
+ return e === void 0 && (e = {}), {
421
+ options: e,
422
+ fn(t) {
423
+ let { x: n, y: r, placement: i, rects: a, middlewareData: o } = t, { offset: s = 0, mainAxis: c = !0, crossAxis: l = !0 } = A(e, t), u = {
424
+ x: n,
425
+ y: r
426
+ }, d = N(i), f = pe(d), p = u[f], m = u[d], h = A(s, t), g = typeof h == "number" ? {
427
+ mainAxis: h,
428
+ crossAxis: 0
429
+ } : {
430
+ mainAxis: 0,
431
+ crossAxis: 0,
432
+ ...h
433
+ };
434
+ if (c) {
435
+ let e = f === "y" ? "height" : "width", t = a.reference[f] - a.floating[e] + g.mainAxis, n = a.reference[f] + a.reference[e] - g.mainAxis;
436
+ p < t ? p = t : p > n && (p = n);
437
+ }
438
+ if (l) {
439
+ var _, v;
440
+ let e = f === "y" ? "width" : "height", t = Re.has(j(i)), n = a.reference[d] - a.floating[e] + (t && (_ = o.offset)?.[d] || 0) + (t ? 0 : g.crossAxis), r = a.reference[d] + a.reference[e] + (t ? 0 : (v = o.offset)?.[d] || 0) - (t ? g.crossAxis : 0);
441
+ m < n ? m = n : m > r && (m = r);
442
+ }
443
+ return {
444
+ [f]: p,
445
+ [d]: m
446
+ };
447
+ }
448
+ };
449
+ }, Ue = function(e) {
450
+ return e === void 0 && (e = {}), {
451
+ name: "size",
452
+ options: e,
453
+ async fn(t) {
454
+ var n, r;
455
+ let { placement: i, rects: a, platform: o, elements: s } = t, { apply: c = () => {},...l } = A(e, t), u = await Me(t, l), d = j(i), f = M(i), p = N(i) === "y", { width: m, height: h } = a.floating, g, _;
456
+ d === "top" || d === "bottom" ? (g = d, _ = f === (await (o.isRTL == null ? void 0 : o.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (_ = d, g = f === "end" ? "top" : "bottom");
457
+ let v = h - u.top - u.bottom, y = m - u.left - u.right, b = E(h - u[g], v), x = E(m - u[_], y), ee = !t.middlewareData.shift, S = b, C = x;
458
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (C = y), (r = t.middlewareData.shift) != null && r.enabled.y && (S = v), ee && !f) {
459
+ let e = D(u.left, 0), t = D(u.right, 0), n = D(u.top, 0), r = D(u.bottom, 0);
460
+ p ? C = m - 2 * (e !== 0 || t !== 0 ? e + t : D(u.left, u.right)) : S = h - 2 * (n !== 0 || r !== 0 ? n + r : D(u.top, u.bottom));
461
+ }
462
+ await c({
463
+ ...t,
464
+ availableWidth: C,
465
+ availableHeight: S
466
+ });
467
+ let w = await o.getDimensions(s.floating);
468
+ return m !== w.width || h !== w.height ? { reset: { rects: !0 } } : {};
469
+ }
470
+ };
471
+ };
472
+ function We() {
473
+ return typeof window < "u";
474
+ }
475
+ function Ge(e) {
476
+ return Ke(e) ? (e.nodeName || "").toLowerCase() : "#document";
477
+ }
478
+ function P(e) {
479
+ var t;
480
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
481
+ }
482
+ function F(e) {
483
+ var t;
484
+ return (t = (Ke(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
485
+ }
486
+ function Ke(e) {
487
+ return We() ? e instanceof Node || e instanceof P(e).Node : !1;
488
+ }
489
+ function I(e) {
490
+ return We() ? e instanceof Element || e instanceof P(e).Element : !1;
491
+ }
492
+ function L(e) {
493
+ return We() ? e instanceof HTMLElement || e instanceof P(e).HTMLElement : !1;
494
+ }
495
+ function qe(e) {
496
+ return !We() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof P(e).ShadowRoot;
497
+ }
498
+ const Je = /* @__PURE__ */ new Set(["inline", "contents"]);
499
+ function Ye(e) {
500
+ let { overflow: t, overflowX: n, overflowY: r, display: i } = R(e);
501
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !Je.has(i);
502
+ }
503
+ const Xe = /* @__PURE__ */ new Set([
504
+ "table",
505
+ "td",
506
+ "th"
507
+ ]);
508
+ function Ze(e) {
509
+ return Xe.has(Ge(e));
510
+ }
511
+ const Qe = [":popover-open", ":modal"];
512
+ function $e(e) {
513
+ return Qe.some((t) => {
514
+ try {
515
+ return e.matches(t);
516
+ } catch {
517
+ return !1;
518
+ }
519
+ });
520
+ }
521
+ const et = [
522
+ "transform",
523
+ "translate",
524
+ "scale",
525
+ "rotate",
526
+ "perspective"
527
+ ], tt = [
528
+ "transform",
529
+ "translate",
530
+ "scale",
531
+ "rotate",
532
+ "perspective",
533
+ "filter"
534
+ ], nt = [
535
+ "paint",
536
+ "layout",
537
+ "strict",
538
+ "content"
539
+ ];
540
+ function rt(e) {
541
+ let t = at(), n = I(e) ? R(e) : e;
542
+ return et.some((e) => n[e] ? n[e] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || tt.some((e) => (n.willChange || "").includes(e)) || nt.some((e) => (n.contain || "").includes(e));
543
+ }
544
+ function it(e) {
545
+ let t = z(e);
546
+ for (; L(t) && !st(t);) {
547
+ if (rt(t)) return t;
548
+ if ($e(t)) return null;
549
+ t = z(t);
550
+ }
551
+ return null;
552
+ }
553
+ function at() {
554
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
555
+ }
556
+ const ot = /* @__PURE__ */ new Set([
557
+ "html",
558
+ "body",
559
+ "#document"
560
+ ]);
561
+ function st(e) {
562
+ return ot.has(Ge(e));
563
+ }
564
+ function R(e) {
565
+ return P(e).getComputedStyle(e);
566
+ }
567
+ function ct(e) {
568
+ return I(e) ? {
569
+ scrollLeft: e.scrollLeft,
570
+ scrollTop: e.scrollTop
571
+ } : {
572
+ scrollLeft: e.scrollX,
573
+ scrollTop: e.scrollY
574
+ };
575
+ }
576
+ function z(e) {
577
+ if (Ge(e) === "html") return e;
578
+ let t = e.assignedSlot || e.parentNode || qe(e) && e.host || F(e);
579
+ return qe(t) ? t.host : t;
580
+ }
581
+ function lt(e) {
582
+ let t = z(e);
583
+ return st(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : L(t) && Ye(t) ? t : lt(t);
584
+ }
585
+ function ut(e, t, n) {
586
+ var r;
587
+ t === void 0 && (t = []), n === void 0 && (n = !0);
588
+ let i = lt(e), a = i === (r = e.ownerDocument)?.body, o = P(i);
589
+ if (a) {
590
+ let e = dt(o);
591
+ return t.concat(o, o.visualViewport || [], Ye(i) ? i : [], e && n ? ut(e) : []);
592
+ }
593
+ return t.concat(i, ut(i, [], n));
594
+ }
595
+ function dt(e) {
596
+ return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
597
+ }
598
+ const ft = (e) => e.length === 0;
599
+ function pt(e) {
600
+ return e.replace(/([a-z\d])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
601
+ }
602
+ function mt(e, t = []) {
603
+ return {
604
+ parts: (...n) => {
605
+ if (ft(t)) return mt(e, n);
606
+ throw Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?");
607
+ },
608
+ extendWith: (...n) => mt(e, [...t, ...n]),
609
+ rename: (e) => mt(e, t),
610
+ keys: () => t,
611
+ build: () => [...new Set(t)].reduce((t, n) => Object.assign(t, { [n]: {
612
+ selector: [`&[data-scope="${pt(e)}"][data-part="${pt(n)}"]`, `& [data-scope="${pt(e)}"][data-part="${pt(n)}"]`].join(", "),
613
+ attrs: {
614
+ "data-scope": pt(e),
615
+ "data-part": pt(n)
616
+ }
617
+ } }), {})
618
+ };
619
+ }
620
+ const ht = (e) => typeof e == "object" && !!e, gt = (e) => e ? "" : void 0;
621
+ function B(e) {
622
+ return ht(e) && e.nodeType === 1 && typeof e.nodeName == "string";
623
+ }
624
+ const _t = (e) => ht(e) && e.nodeType === 9, vt = (e) => ht(e) && e === e.window;
625
+ function yt(e) {
626
+ return B(e) ? e.localName || "" : "#document";
627
+ }
628
+ function bt(e) {
629
+ return [
630
+ "html",
631
+ "body",
632
+ "#document"
633
+ ].includes(yt(e));
634
+ }
635
+ const xt = (e) => ht(e) && e.nodeType !== void 0;
636
+ function St(e) {
637
+ return xt(e) && e.nodeType === 11 && "host" in e;
638
+ }
639
+ const Ct = (e) => B(e) && e.localName === "input";
640
+ function wt(e) {
641
+ return B(e) ? e.offsetWidth > 0 || e.offsetHeight > 0 || e.getClientRects().length > 0 : !1;
642
+ }
643
+ const Tt = /(textarea|select)/;
644
+ function Et(e) {
645
+ if (e == null || !B(e)) return !1;
646
+ try {
647
+ return Ct(e) && e.selectionStart != null || Tt.test(e.localName) || e.isContentEditable || e.getAttribute("contenteditable") === "true" || e.getAttribute("contenteditable") === "";
648
+ } catch {
649
+ return !1;
650
+ }
651
+ }
652
+ function Dt(e, t) {
653
+ if (!e || !t || !B(e) || !B(t)) return !1;
654
+ let n = t.getRootNode?.();
655
+ if (e === t || e.contains(t)) return !0;
656
+ if (n && St(n)) {
657
+ let n = t;
658
+ for (; n;) {
659
+ if (e === n) return !0;
660
+ n = n.parentNode || n.host;
661
+ }
662
+ }
663
+ return !1;
664
+ }
665
+ function V(e) {
666
+ return _t(e) ? e : vt(e) ? e.document : e?.ownerDocument ?? document;
667
+ }
668
+ function Ot(e) {
669
+ return V(e).documentElement;
670
+ }
671
+ function kt(e) {
672
+ return St(e) ? kt(e.host) : _t(e) ? e.defaultView ?? window : B(e) ? e.ownerDocument?.defaultView ?? window : window;
673
+ }
674
+ function At(e) {
675
+ let t = e.activeElement;
676
+ for (; t?.shadowRoot;) {
677
+ let e = t.shadowRoot.activeElement;
678
+ if (e === t) break;
679
+ t = e;
680
+ }
681
+ return t;
682
+ }
683
+ function jt(e) {
684
+ if (yt(e) === "html") return e;
685
+ let t = e.assignedSlot || e.parentNode || St(e) && e.host || Ot(e);
686
+ return St(t) ? t.host : t;
687
+ }
688
+ const Mt = /* @__PURE__ */ new WeakMap();
689
+ function Nt(e) {
690
+ return Mt.has(e) || Mt.set(e, kt(e).getComputedStyle(e)), Mt.get(e);
691
+ }
692
+ const Pt = () => typeof document < "u";
693
+ function Ft() {
694
+ let e = navigator.userAgentData;
695
+ return e?.platform ?? navigator.platform;
696
+ }
697
+ const It = (e) => Pt() && e.test(Ft()), Lt = (e) => Pt() && e.test(navigator.vendor), Rt = () => It(/^Mac/), zt = () => It(/mac|iphone|ipad|ipod/i), Bt = () => zt() && Lt(/apple/i), Vt = () => It(/iP(hone|ad|od)|iOS/);
698
+ function Ht(e) {
699
+ return e.composedPath?.() ?? e.nativeEvent?.composedPath?.();
700
+ }
701
+ function H(e) {
702
+ let t = Ht(e);
703
+ return t?.[0] ?? e.target;
704
+ }
705
+ function Ut(e) {
706
+ return e.button === 2 || Rt() && e.ctrlKey && e.button === 0;
707
+ }
708
+ function U(e, t, n, r) {
709
+ let i = typeof e == "function" ? e() : e;
710
+ return i?.addEventListener(t, n, r), () => {
711
+ i?.removeEventListener(t, n, r);
712
+ };
713
+ }
714
+ function Wt(e, t) {
715
+ let { type: n = "HTMLInputElement", property: r = "value" } = t, i = kt(e)[n].prototype;
716
+ return Object.getOwnPropertyDescriptor(i, r) ?? {};
717
+ }
718
+ function Gt(e) {
719
+ if (e.localName === "input") return "HTMLInputElement";
720
+ if (e.localName === "textarea") return "HTMLTextAreaElement";
721
+ if (e.localName === "select") return "HTMLSelectElement";
722
+ }
723
+ function Kt(e, t, n = "value") {
724
+ let r = Gt(e);
725
+ if (r) {
726
+ let i = Wt(e, {
727
+ type: r,
728
+ property: n
729
+ });
730
+ i.set?.call(e, t);
731
+ }
732
+ e.setAttribute(n, t);
733
+ }
734
+ const qt = (e) => B(e) && e.tagName === "IFRAME", Jt = (e) => !Number.isNaN(Number.parseInt(e.getAttribute("tabindex") || "0", 10)), Yt = (e) => Number.parseInt(e.getAttribute("tabindex") || "0", 10) < 0, Xt = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type";
735
+ function Zt(e, t = !1) {
736
+ if (!e) return [];
737
+ let n = Array.from(e.querySelectorAll(Xt)), r = t === !0 || t === "if-empty" && n.length === 0;
738
+ r && B(e) && W(e) && n.unshift(e);
739
+ let i = n.filter(W);
740
+ return i.forEach((e, t) => {
741
+ if (qt(e) && e.contentDocument) {
742
+ let n = e.contentDocument.body;
743
+ i.splice(t, 1, ...Zt(n));
744
+ }
745
+ }), i;
746
+ }
747
+ function W(e) {
748
+ return !e || e.closest("[inert]") ? !1 : e.matches(Xt) && wt(e);
749
+ }
750
+ function Qt(e, t) {
751
+ if (!e) return [];
752
+ let n = Array.from(e.querySelectorAll(Xt)), r = n.filter($t);
753
+ return t && $t(e) && r.unshift(e), r.forEach((e, t) => {
754
+ if (qt(e) && e.contentDocument) {
755
+ let n = e.contentDocument.body, i = Qt(n);
756
+ r.splice(t, 1, ...i);
757
+ }
758
+ }), !r.length && t ? n : r;
759
+ }
760
+ function $t(e) {
761
+ return e != null && e.tabIndex > 0 ? !0 : W(e) && !Yt(e);
762
+ }
763
+ function en(e, t) {
764
+ let n = Qt(e, t), r = n[0] || null, i = n[n.length - 1] || null;
765
+ return [r, i];
766
+ }
767
+ function tn(e, t) {
768
+ let n = Qt(e), r = e?.ownerDocument || document, i = t ?? r.activeElement;
769
+ if (!i) return null;
770
+ let a = n.indexOf(i);
771
+ return n[a + 1] || null;
772
+ }
773
+ function nn(e) {
774
+ return e.tabIndex < 0 && (/^(audio|video|details)$/.test(e.localName) || Et(e)) && !Jt(e) ? 0 : e.tabIndex;
775
+ }
776
+ function rn(e) {
777
+ let { root: t, getInitialEl: n, filter: r, enabled: i = !0 } = e;
778
+ if (!i) return;
779
+ let a = null;
780
+ if (a ||= typeof n == "function" ? n() : n, a ||= t?.querySelector("[data-autofocus],[autofocus]"), !a) {
781
+ let e = Qt(t);
782
+ a = r ? e.filter(r)[0] : e[0];
783
+ }
784
+ return a || t || void 0;
785
+ }
786
+ function G(e) {
787
+ let t = globalThis.requestAnimationFrame(e);
788
+ return () => {
789
+ globalThis.cancelAnimationFrame(t);
790
+ };
791
+ }
792
+ function an(e) {
793
+ let t = jt(e);
794
+ return bt(t) ? V(t).body : B(t) && sn(t) ? t : an(t);
795
+ }
796
+ const on = /auto|scroll|overlay|hidden|clip/;
797
+ function sn(e) {
798
+ let t = kt(e), { overflow: n, overflowX: r, overflowY: i, display: a } = t.getComputedStyle(e);
799
+ return on.test(n + i + r) && !["inline", "contents"].includes(a);
800
+ }
801
+ function cn(e, t = {}) {
802
+ let { triggerElement: n, onFocus: r } = t, i = e?.ownerDocument || document, a = i.body;
803
+ function o(t) {
804
+ if (t.key !== "Tab") return;
805
+ let o = null, [s, c] = en(e, !0), l = !s && !c;
806
+ t.shiftKey && (i.activeElement === s || l) ? o = n : !t.shiftKey && i.activeElement === n ? o = s : !t.shiftKey && (i.activeElement === c || l) && (o = tn(a, n)), o && (t.preventDefault(), typeof r == "function" ? r(o) : o.focus());
807
+ }
808
+ return U(i, "keydown", o, !0);
809
+ }
810
+ function ln(e, t) {
811
+ let { defer: n, triggerElement: r,...i } = t, a = n ? G : (e) => e(), o = [];
812
+ return o.push(a(() => {
813
+ let t = typeof e == "function" ? e() : e, n = typeof r == "function" ? r() : r;
814
+ o.push(cn(t, {
815
+ triggerElement: n,
816
+ ...i
817
+ }));
818
+ })), () => {
819
+ o.forEach((e) => e?.());
820
+ };
821
+ }
822
+ function un(e) {
823
+ let t = {
824
+ getRootNode: (e) => e.getRootNode?.() ?? document,
825
+ getDoc: (e) => V(t.getRootNode(e)),
826
+ getWin: (e) => t.getDoc(e).defaultView ?? window,
827
+ getActiveElement: (e) => At(t.getRootNode(e)),
828
+ isActiveElement: (e, n) => n === t.getActiveElement(e),
829
+ getById: (e, n) => t.getRootNode(e).getElementById(n),
830
+ setValue: (e, t) => {
831
+ e == null || t == null || Kt(e, t.toString());
832
+ }
833
+ };
834
+ return {
835
+ ...t,
836
+ ...e
837
+ };
838
+ }
839
+ const dn = /* @__PURE__ */ new WeakMap();
840
+ function fn(e, t, n) {
841
+ dn.has(e) || dn.set(e, /* @__PURE__ */ new Map());
842
+ let r = dn.get(e), i = r.get(t);
843
+ if (!i) return r.set(t, n()), () => {
844
+ r.get(t)?.(), r.delete(t);
845
+ };
846
+ let a = n(), o = () => {
847
+ a(), i(), r.delete(t);
848
+ };
849
+ return r.set(t, o), () => {
850
+ let e = r.get(t) === o;
851
+ e && (a(), r.set(t, i));
852
+ };
853
+ }
854
+ function pn(e, t) {
855
+ if (!e) return () => {};
856
+ let n = () => {
857
+ let n = e.style.cssText;
858
+ return Object.assign(e.style, t), () => {
859
+ e.style.cssText = n;
860
+ };
861
+ };
862
+ return fn(e, "style", n);
863
+ }
864
+ function mn(e, t) {
865
+ let n = e();
866
+ if (B(n) && n.isConnected) return t(n), () => void 0;
867
+ {
868
+ let n = setInterval(() => {
869
+ let r = e();
870
+ B(r) && r.isConnected && (t(r), clearInterval(n));
871
+ }, 16.666666666666668);
872
+ return () => clearInterval(n);
873
+ }
874
+ }
875
+ function hn(e, t) {
876
+ let n = [];
877
+ return e?.forEach((e) => {
878
+ let r = mn(e, t);
879
+ n.push(r);
880
+ }), () => {
881
+ n.forEach((e) => e());
882
+ };
883
+ }
884
+ function gn(e) {
885
+ for (; e.length > 0;) e.pop();
886
+ return e;
887
+ }
888
+ function _n(e, ...t) {
889
+ let n = typeof e == "function" ? e(...t) : e;
890
+ return n ?? void 0;
891
+ }
892
+ const K = (e) => e;
893
+ function vn() {}
894
+ function yn(...e) {
895
+ return (...t) => {
896
+ e.forEach((e) => {
897
+ e?.(...t);
898
+ });
899
+ };
900
+ }
901
+ const bn = /* @__PURE__ */ (() => {
902
+ let e = 0;
903
+ return () => (e++, e.toString(36));
904
+ })(), xn = (e) => Array.isArray(e), Sn = (e) => typeof e == "object" && !!e, Cn = (e) => Sn(e) && !xn(e), wn = (e) => typeof e == "number" && !Number.isNaN(e), q = (e) => typeof e == "string", Tn = (e) => typeof e == "function", En = (e) => e == null;
905
+ function Dn(e, t) {
906
+ return Object.prototype.hasOwnProperty.call(e, t);
907
+ }
908
+ const On = (e) => Object.prototype.toString.call(e), kn = Function.prototype.toString, An = kn.call(Object);
909
+ function jn(e) {
910
+ if (!Sn(e) || On(e) !== "[object Object]") return !1;
911
+ let t = Object.getPrototypeOf(e);
912
+ if (t === null) return !0;
913
+ let n = Dn(t, "constructor") && t.constructor;
914
+ return typeof n == "function" && n instanceof n && kn.call(n) === An;
915
+ }
916
+ const { floor: Mn, abs: Nn, round: Pn, min: Fn, max: In, sign: Ln } = Math;
917
+ function Rn(e) {
918
+ if (!zn(e) || e === void 0) return e;
919
+ let t = Reflect.ownKeys(e).filter((e) => typeof e == "string"), n = {};
920
+ for (let r of t) {
921
+ let t = e[r];
922
+ t !== void 0 && (n[r] = Rn(t));
923
+ }
924
+ return n;
925
+ }
926
+ function zn(e) {
927
+ return e && typeof e == "object" && e.constructor === Object;
928
+ }
929
+ function Bn(e, t) {
930
+ let n = {}, r = {}, i = new Set(t);
931
+ for (let t in e) i.has(t) ? r[t] = e[t] : n[t] = e[t];
932
+ return [r, n];
933
+ }
934
+ function Vn(e) {
935
+ return function(t) {
936
+ return Bn(t, e);
937
+ };
938
+ }
939
+ function Hn(e) {
940
+ let t = R(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = L(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = O(n) !== a || O(r) !== o;
941
+ return s && (n = a, r = o), {
942
+ width: n,
943
+ height: r,
944
+ $: s
945
+ };
946
+ }
947
+ function Un(e) {
948
+ return I(e) ? e : e.contextElement;
949
+ }
950
+ function Wn(e) {
951
+ let t = Un(e);
952
+ if (!L(t)) return k(1);
953
+ let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Hn(t), o = (a ? O(n.width) : n.width) / r, s = (a ? O(n.height) : n.height) / i;
954
+ return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
955
+ x: o,
956
+ y: s
957
+ };
958
+ }
959
+ const Gn = /* @__PURE__ */ k(0);
960
+ function Kn(e) {
961
+ let t = P(e);
962
+ return !at() || !t.visualViewport ? Gn : {
963
+ x: t.visualViewport.offsetLeft,
964
+ y: t.visualViewport.offsetTop
965
+ };
966
+ }
967
+ function qn(e, t, n) {
968
+ return t === void 0 && (t = !1), !n || t && n !== P(e) ? !1 : t;
969
+ }
970
+ function Jn(e, t, n, r) {
971
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
972
+ let i = e.getBoundingClientRect(), a = Un(e), o = k(1);
973
+ t && (r ? I(r) && (o = Wn(r)) : o = Wn(e));
974
+ let s = qn(a, n, r) ? Kn(a) : k(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
975
+ if (a) {
976
+ let e = P(a), t = r && I(r) ? P(r) : r, n = e, i = dt(n);
977
+ for (; i && r && t !== n;) {
978
+ let e = Wn(i), t = i.getBoundingClientRect(), r = R(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
979
+ c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = P(i), i = dt(n);
980
+ }
981
+ }
982
+ return ke({
983
+ width: u,
984
+ height: d,
985
+ x: c,
986
+ y: l
987
+ });
988
+ }
989
+ function Yn(e, t) {
990
+ let n = ct(e).scrollLeft;
991
+ return t ? t.left + n : Jn(F(e)).left + n;
992
+ }
993
+ function Xn(e, t, n) {
994
+ n === void 0 && (n = !1);
995
+ let r = e.getBoundingClientRect(), i = r.left + t.scrollLeft - (n ? 0 : Yn(e, r)), a = r.top + t.scrollTop;
996
+ return {
997
+ x: i,
998
+ y: a
999
+ };
1000
+ }
1001
+ function Zn(e) {
1002
+ let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = F(r), s = t ? $e(t.floating) : !1;
1003
+ if (r === o || s && a) return n;
1004
+ let c = {
1005
+ scrollLeft: 0,
1006
+ scrollTop: 0
1007
+ }, l = k(1), u = k(0), d = L(r);
1008
+ if ((d || !d && !a) && ((Ge(r) !== "body" || Ye(o)) && (c = ct(r)), L(r))) {
1009
+ let e = Jn(r);
1010
+ l = Wn(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
1011
+ }
1012
+ let f = o && !d && !a ? Xn(o, c, !0) : k(0);
1013
+ return {
1014
+ width: n.width * l.x,
1015
+ height: n.height * l.y,
1016
+ x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
1017
+ y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
1018
+ };
1019
+ }
1020
+ function Qn(e) {
1021
+ return Array.from(e.getClientRects());
1022
+ }
1023
+ function $n(e) {
1024
+ let t = F(e), n = ct(e), r = e.ownerDocument.body, i = D(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = D(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + Yn(e), s = -n.scrollTop;
1025
+ return R(r).direction === "rtl" && (o += D(t.clientWidth, r.clientWidth) - i), {
1026
+ width: i,
1027
+ height: a,
1028
+ x: o,
1029
+ y: s
1030
+ };
1031
+ }
1032
+ function er(e, t) {
1033
+ let n = P(e), r = F(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
1034
+ if (i) {
1035
+ a = i.width, o = i.height;
1036
+ let e = at();
1037
+ (!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
1038
+ }
1039
+ return {
1040
+ width: a,
1041
+ height: o,
1042
+ x: s,
1043
+ y: c
1044
+ };
1045
+ }
1046
+ function tr(e, t) {
1047
+ let n = Jn(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = L(e) ? Wn(e) : k(1), o = e.clientWidth * a.x, s = e.clientHeight * a.y, c = i * a.x, l = r * a.y;
1048
+ return {
1049
+ width: o,
1050
+ height: s,
1051
+ x: c,
1052
+ y: l
1053
+ };
1054
+ }
1055
+ function nr(e, t, n) {
1056
+ let r;
1057
+ if (t === "viewport") r = er(e, n);
1058
+ else if (t === "document") r = $n(F(e));
1059
+ else if (I(t)) r = tr(t, n);
1060
+ else {
1061
+ let n = Kn(e);
1062
+ r = {
1063
+ x: t.x - n.x,
1064
+ y: t.y - n.y,
1065
+ width: t.width,
1066
+ height: t.height
1067
+ };
1068
+ }
1069
+ return ke(r);
1070
+ }
1071
+ function rr(e, t) {
1072
+ let n = z(e);
1073
+ return n === t || !I(n) || st(n) ? !1 : R(n).position === "fixed" || rr(n, t);
1074
+ }
1075
+ function ir(e, t) {
1076
+ let n = t.get(e);
1077
+ if (n) return n;
1078
+ let r = ut(e, [], !1).filter((e) => I(e) && Ge(e) !== "body"), i = null, a = R(e).position === "fixed", o = a ? z(e) : e;
1079
+ for (; I(o) && !st(o);) {
1080
+ let t = R(o), n = rt(o);
1081
+ !n && t.position === "fixed" && (i = null);
1082
+ let s = a ? !n && !i : !n && t.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || Ye(o) && !n && rr(e, o);
1083
+ s ? r = r.filter((e) => e !== o) : i = t, o = z(o);
1084
+ }
1085
+ return t.set(e, r), r;
1086
+ }
1087
+ function ar(e) {
1088
+ let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = n === "clippingAncestors" ? $e(t) ? [] : ir(t, this._c) : [].concat(n), o = [...a, r], s = o[0], c = o.reduce((e, n) => {
1089
+ let r = nr(t, n, i);
1090
+ return e.top = D(r.top, e.top), e.right = E(r.right, e.right), e.bottom = E(r.bottom, e.bottom), e.left = D(r.left, e.left), e;
1091
+ }, nr(t, s, i));
1092
+ return {
1093
+ width: c.right - c.left,
1094
+ height: c.bottom - c.top,
1095
+ x: c.left,
1096
+ y: c.top
1097
+ };
1098
+ }
1099
+ function or(e) {
1100
+ let { width: t, height: n } = Hn(e);
1101
+ return {
1102
+ width: t,
1103
+ height: n
1104
+ };
1105
+ }
1106
+ function sr(e, t, n) {
1107
+ let r = L(t), i = F(t), a = n === "fixed", o = Jn(e, !0, a, t), s = {
1108
+ scrollLeft: 0,
1109
+ scrollTop: 0
1110
+ }, c = k(0);
1111
+ function l() {
1112
+ c.x = Yn(i);
1113
+ }
1114
+ if (r || !r && !a) if ((Ge(t) !== "body" || Ye(i)) && (s = ct(t)), r) {
1115
+ let e = Jn(t, !0, a, t);
1116
+ c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
1117
+ } else i && l();
1118
+ a && !r && i && l();
1119
+ let u = i && !r && !a ? Xn(i, s) : k(0), d = o.left + s.scrollLeft - c.x - u.x, f = o.top + s.scrollTop - c.y - u.y;
1120
+ return {
1121
+ x: d,
1122
+ y: f,
1123
+ width: o.width,
1124
+ height: o.height
1125
+ };
1126
+ }
1127
+ function cr(e) {
1128
+ return R(e).position === "static";
1129
+ }
1130
+ function lr(e, t) {
1131
+ if (!L(e) || R(e).position === "fixed") return null;
1132
+ if (t) return t(e);
1133
+ let n = e.offsetParent;
1134
+ return F(e) === n && (n = n.ownerDocument.body), n;
1135
+ }
1136
+ function ur(e, t) {
1137
+ let n = P(e);
1138
+ if ($e(e)) return n;
1139
+ if (!L(e)) {
1140
+ let t = z(e);
1141
+ for (; t && !st(t);) {
1142
+ if (I(t) && !cr(t)) return t;
1143
+ t = z(t);
1144
+ }
1145
+ return n;
1146
+ }
1147
+ let r = lr(e, t);
1148
+ for (; r && Ze(r) && cr(r);) r = lr(r, t);
1149
+ return r && st(r) && cr(r) && !rt(r) ? n : r || it(e) || n;
1150
+ }
1151
+ const dr = async function(e) {
1152
+ let t = this.getOffsetParent || ur, n = this.getDimensions, r = await n(e.floating);
1153
+ return {
1154
+ reference: sr(e.reference, await t(e.floating), e.strategy),
1155
+ floating: {
1156
+ x: 0,
1157
+ y: 0,
1158
+ width: r.width,
1159
+ height: r.height
1160
+ }
1161
+ };
1162
+ };
1163
+ function fr(e) {
1164
+ return R(e).direction === "rtl";
1165
+ }
1166
+ const pr = {
1167
+ convertOffsetParentRelativeRectToViewportRelativeRect: Zn,
1168
+ getDocumentElement: F,
1169
+ getClippingRect: ar,
1170
+ getOffsetParent: ur,
1171
+ getElementRects: dr,
1172
+ getClientRects: Qn,
1173
+ getDimensions: or,
1174
+ getScale: Wn,
1175
+ isElement: I,
1176
+ isRTL: fr
1177
+ };
1178
+ function mr(e, t) {
1179
+ return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
1180
+ }
1181
+ function hr(e, t) {
1182
+ let n = null, r, i = F(e);
1183
+ function a() {
1184
+ var e;
1185
+ clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
1186
+ }
1187
+ function o(s, c) {
1188
+ s === void 0 && (s = !1), c === void 0 && (c = 1), a();
1189
+ let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
1190
+ if (s || t(), !f || !p) return;
1191
+ let m = le(d), h = le(i.clientWidth - (u + f)), g = le(i.clientHeight - (d + p)), _ = le(u), v = -m + "px " + -h + "px " + -g + "px " + -_ + "px", y = {
1192
+ rootMargin: v,
1193
+ threshold: D(0, E(1, c)) || 1
1194
+ }, b = !0;
1195
+ function x(t) {
1196
+ let n = t[0].intersectionRatio;
1197
+ if (n !== c) {
1198
+ if (!b) return o();
1199
+ n ? o(!1, n) : r = setTimeout(() => {
1200
+ o(!1, 1e-7);
1201
+ }, 1e3);
1202
+ }
1203
+ n === 1 && !mr(l, e.getBoundingClientRect()) && o(), b = !1;
1204
+ }
1205
+ try {
1206
+ n = new IntersectionObserver(x, {
1207
+ ...y,
1208
+ root: i.ownerDocument
1209
+ });
1210
+ } catch {
1211
+ n = new IntersectionObserver(x, y);
1212
+ }
1213
+ n.observe(e);
1214
+ }
1215
+ return o(!0), a;
1216
+ }
1217
+ function gr(e, t, n, r) {
1218
+ r === void 0 && (r = {});
1219
+ let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = Un(e), u = i || a ? [...l ? ut(l) : [], ...ut(t)] : [];
1220
+ u.forEach((e) => {
1221
+ i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
1222
+ });
1223
+ let d = l && s ? hr(l, n) : null, f = -1, p = null;
1224
+ o && (p = new ResizeObserver((e) => {
1225
+ let [r] = e;
1226
+ r && r.target === l && p && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
1227
+ var e;
1228
+ (e = p) == null || e.observe(t);
1229
+ })), n();
1230
+ }), l && !c && p.observe(l), p.observe(t));
1231
+ let m, h = c ? Jn(e) : null;
1232
+ c && g();
1233
+ function g() {
1234
+ let t = Jn(e);
1235
+ h && !mr(h, t) && n(), h = t, m = requestAnimationFrame(g);
1236
+ }
1237
+ return n(), () => {
1238
+ var e;
1239
+ u.forEach((e) => {
1240
+ i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
1241
+ }), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
1242
+ };
1243
+ }
1244
+ const _r = Be, vr = Ve, yr = Pe, br = Ue, xr = Le, Sr = Ne, Cr = He, wr = (e, t, n) => {
1245
+ let r = /* @__PURE__ */ new Map(), i = {
1246
+ platform: pr,
1247
+ ...n
1248
+ }, a = {
1249
+ ...i.platform,
1250
+ _c: r
1251
+ };
1252
+ return je(e, t, {
1253
+ ...i,
1254
+ platform: a
1255
+ });
1256
+ };
1257
+ function Tr(e = 0, t = 0, n = 0, r = 0) {
1258
+ if (typeof DOMRect == "function") return new DOMRect(e, t, n, r);
1259
+ let i = {
1260
+ x: e,
1261
+ y: t,
1262
+ width: n,
1263
+ height: r,
1264
+ top: t,
1265
+ right: e + n,
1266
+ bottom: t + r,
1267
+ left: e
1268
+ };
1269
+ return {
1270
+ ...i,
1271
+ toJSON: () => i
1272
+ };
1273
+ }
1274
+ function Er(e) {
1275
+ if (!e) return Tr();
1276
+ let { x: t, y: n, width: r, height: i } = e;
1277
+ return Tr(t, n, r, i);
1278
+ }
1279
+ function Dr(e, t) {
1280
+ return {
1281
+ contextElement: B(e) ? e : void 0,
1282
+ getBoundingClientRect: () => {
1283
+ let n = e, r = t?.(n);
1284
+ return r || !n ? Er(r) : n.getBoundingClientRect();
1285
+ }
1286
+ };
1287
+ }
1288
+ const Or = (e) => ({
1289
+ variable: e,
1290
+ reference: `var(${e})`
1291
+ }), J = {
1292
+ arrowSize: Or("--arrow-size"),
1293
+ arrowSizeHalf: Or("--arrow-size-half"),
1294
+ arrowBg: Or("--arrow-background"),
1295
+ transformOrigin: Or("--transform-origin"),
1296
+ arrowOffset: Or("--arrow-offset")
1297
+ };
1298
+ function kr(e) {
1299
+ return {
1300
+ top: "bottom center",
1301
+ "top-start": e ? `${e.x}px bottom` : "left bottom",
1302
+ "top-end": e ? `${e.x}px bottom` : "right bottom",
1303
+ bottom: "top center",
1304
+ "bottom-start": e ? `${e.x}px top` : "top left",
1305
+ "bottom-end": e ? `${e.x}px top` : "top right",
1306
+ left: "right center",
1307
+ "left-start": e ? `right ${e.y}px` : "right top",
1308
+ "left-end": e ? `right ${e.y}px` : "right bottom",
1309
+ right: "left center",
1310
+ "right-start": e ? `left ${e.y}px` : "left top",
1311
+ "right-end": e ? `left ${e.y}px` : "left bottom"
1312
+ };
1313
+ }
1314
+ const Ar = {
1315
+ name: "transformOrigin",
1316
+ fn({ placement: e, elements: t, middlewareData: n }) {
1317
+ let { arrow: r } = n, i = kr(r)[e], { floating: a } = t;
1318
+ return a.style.setProperty(J.transformOrigin.variable, i), { data: { transformOrigin: i } };
1319
+ }
1320
+ }, jr = {
1321
+ name: "rects",
1322
+ fn({ rects: e }) {
1323
+ return { data: e };
1324
+ }
1325
+ };
1326
+ function Mr(e) {
1327
+ if (e) return {
1328
+ name: "shiftArrow",
1329
+ fn({ placement: t, middlewareData: n }) {
1330
+ if (!n.arrow) return {};
1331
+ let { x: r, y: i } = n.arrow, a = t.split("-")[0];
1332
+ return Object.assign(e.style, {
1333
+ left: r == null ? "" : `${r}px`,
1334
+ top: i == null ? "" : `${i}px`,
1335
+ [a]: `calc(100% + ${J.arrowOffset.reference})`
1336
+ }), {};
1337
+ }
1338
+ };
1339
+ }
1340
+ function Nr(e) {
1341
+ let [t, n] = e.split("-");
1342
+ return {
1343
+ side: t,
1344
+ align: n,
1345
+ hasAlign: n != null
1346
+ };
1347
+ }
1348
+ const Pr = {
1349
+ strategy: "absolute",
1350
+ placement: "bottom",
1351
+ listeners: !0,
1352
+ gutter: 8,
1353
+ flip: !0,
1354
+ slide: !0,
1355
+ overlap: !1,
1356
+ sameWidth: !1,
1357
+ fitViewport: !1,
1358
+ overflowPadding: 8,
1359
+ arrowPadding: 4
1360
+ };
1361
+ function Fr(e, t) {
1362
+ let n = e.devicePixelRatio || 1;
1363
+ return Math.round(t * n) / n;
1364
+ }
1365
+ function Ir(e) {
1366
+ return _n(e.boundary);
1367
+ }
1368
+ function Lr(e, t) {
1369
+ if (e) return Sr({
1370
+ element: e,
1371
+ padding: t.arrowPadding
1372
+ });
1373
+ }
1374
+ function Rr(e, t) {
1375
+ if (!En(t.offset ?? t.gutter)) return _r(({ placement: n }) => {
1376
+ let r = (e?.clientHeight || 0) / 2, i = t.offset?.mainAxis ?? t.gutter, a = typeof i == "number" ? i + r : i ?? r, { hasAlign: o } = Nr(n), s = o ? void 0 : t.shift, c = t.offset?.crossAxis ?? s;
1377
+ return Rn({
1378
+ crossAxis: c,
1379
+ mainAxis: a,
1380
+ alignmentAxis: t.shift
1381
+ });
1382
+ });
1383
+ }
1384
+ function zr(e) {
1385
+ if (e.flip) return yr({
1386
+ boundary: Ir(e),
1387
+ padding: e.overflowPadding,
1388
+ fallbackPlacements: e.flip === !0 ? void 0 : e.flip
1389
+ });
1390
+ }
1391
+ function Br(e) {
1392
+ if (!(!e.slide && !e.overlap)) return vr({
1393
+ boundary: Ir(e),
1394
+ mainAxis: e.slide,
1395
+ crossAxis: e.overlap,
1396
+ padding: e.overflowPadding,
1397
+ limiter: Cr()
1398
+ });
1399
+ }
1400
+ function Vr(e) {
1401
+ return br({
1402
+ padding: e.overflowPadding,
1403
+ apply({ elements: e, rects: t, availableHeight: n, availableWidth: r }) {
1404
+ let i = e.floating, a = Math.round(t.reference.width);
1405
+ r = Math.floor(r), n = Math.floor(n), i.style.setProperty("--reference-width", `${a}px`), i.style.setProperty("--available-width", `${r}px`), i.style.setProperty("--available-height", `${n}px`);
1406
+ }
1407
+ });
1408
+ }
1409
+ function Hr(e) {
1410
+ if (e.hideWhenDetached) return xr({
1411
+ strategy: "referenceHidden",
1412
+ boundary: e.boundary?.() ?? "clippingAncestors"
1413
+ });
1414
+ }
1415
+ function Ur(e) {
1416
+ return e ? e === !0 ? {
1417
+ ancestorResize: !0,
1418
+ ancestorScroll: !0,
1419
+ elementResize: !0,
1420
+ layoutShift: !0
1421
+ } : e : {};
1422
+ }
1423
+ function Wr(e, t, n = {}) {
1424
+ let r = Dr(e, n.getAnchorRect);
1425
+ if (!t || !r) return;
1426
+ let i = Object.assign({}, Pr, n), a = t.querySelector("[data-part=arrow]"), o = [
1427
+ Rr(a, i),
1428
+ zr(i),
1429
+ Br(i),
1430
+ Lr(a, i),
1431
+ Mr(a),
1432
+ Ar,
1433
+ Vr(i),
1434
+ Hr(i),
1435
+ jr
1436
+ ], { placement: s, strategy: c, onComplete: l, onPositioned: u } = i, d = async () => {
1437
+ if (!r || !t) return;
1438
+ let e = await wr(r, t, {
1439
+ placement: s,
1440
+ middleware: o,
1441
+ strategy: c
1442
+ });
1443
+ l?.(e), u?.({ placed: !0 });
1444
+ let n = kt(t), a = Fr(n, e.x), d = Fr(n, e.y);
1445
+ if (t.style.setProperty("--x", `${a}px`), t.style.setProperty("--y", `${d}px`), i.hideWhenDetached) {
1446
+ let n = e.middlewareData.hide?.referenceHidden;
1447
+ n ? (t.style.setProperty("visibility", "hidden"), t.style.setProperty("pointer-events", "none")) : (t.style.removeProperty("visibility"), t.style.removeProperty("pointer-events"));
1448
+ }
1449
+ let f = t.firstElementChild;
1450
+ if (f) {
1451
+ let e = Nt(f);
1452
+ t.style.setProperty("--z-index", e.zIndex);
1453
+ }
1454
+ }, f = async () => {
1455
+ n.updatePosition ? (await n.updatePosition({ updatePosition: d }), u?.({ placed: !0 })) : await d();
1456
+ }, p = Ur(i.listeners), m = i.listeners ? gr(r, t, f, p) : vn;
1457
+ return f(), () => {
1458
+ m?.(), u?.({ placed: !1 });
1459
+ };
1460
+ }
1461
+ function Gr(e, t, n = {}) {
1462
+ let { defer: r,...i } = n, a = r ? G : (e) => e(), o = [];
1463
+ return o.push(a(() => {
1464
+ let n = typeof e == "function" ? e() : e, r = typeof t == "function" ? t() : t;
1465
+ o.push(Wr(n, r, i));
1466
+ })), () => {
1467
+ o.forEach((e) => e?.());
1468
+ };
1469
+ }
1470
+ const Kr = {
1471
+ bottom: "rotate(45deg)",
1472
+ left: "rotate(135deg)",
1473
+ top: "rotate(225deg)",
1474
+ right: "rotate(315deg)"
1475
+ };
1476
+ function qr(e = {}) {
1477
+ let { placement: t, sameWidth: n, fitViewport: r, strategy: i = "absolute" } = e;
1478
+ return {
1479
+ arrow: {
1480
+ position: "absolute",
1481
+ width: J.arrowSize.reference,
1482
+ height: J.arrowSize.reference,
1483
+ [J.arrowSizeHalf.variable]: `calc(${J.arrowSize.reference} / 2)`,
1484
+ [J.arrowOffset.variable]: `calc(${J.arrowSizeHalf.reference} * -1)`
1485
+ },
1486
+ arrowTip: {
1487
+ transform: t ? Kr[t.split("-")[0]] : void 0,
1488
+ background: J.arrowBg.reference,
1489
+ top: "0",
1490
+ left: "0",
1491
+ width: "100%",
1492
+ height: "100%",
1493
+ position: "absolute",
1494
+ zIndex: "inherit"
1495
+ },
1496
+ floating: {
1497
+ position: i,
1498
+ isolation: "isolate",
1499
+ minWidth: n ? void 0 : "max-content",
1500
+ width: n ? "var(--reference-width)" : void 0,
1501
+ maxWidth: r ? "var(--available-width)" : void 0,
1502
+ maxHeight: r ? "var(--available-height)" : void 0,
1503
+ top: "0px",
1504
+ left: "0px",
1505
+ transform: t ? "translate3d(var(--x), var(--y), 0)" : "translate3d(0, -100vh, 0)",
1506
+ zIndex: "var(--z-index)"
1507
+ }
1508
+ };
1509
+ }
1510
+ let Jr = /* @__PURE__ */ new WeakMap(), Yr = /* @__PURE__ */ new WeakMap(), Xr = {}, Zr = 0;
1511
+ function Qr(e) {
1512
+ return e && (e.host || Qr(e.parentNode));
1513
+ }
1514
+ function $r(e, t) {
1515
+ return t.map((t) => {
1516
+ if (e.contains(t)) return t;
1517
+ let n = Qr(t);
1518
+ return n && e.contains(n) ? n : (console.error("[@destyler/aria-hidden] target", t, "in not contained inside", e, ". Doing nothing"), null);
1519
+ }).filter((e) => !!e);
1520
+ }
1521
+ function ei(e) {
1522
+ return e.localName === "next-route-announcer" || e.localName === "script" || e.hasAttribute("aria-live") ? !0 : e.matches("[data-live-announcer]");
1523
+ }
1524
+ function ti(e, t) {
1525
+ let { parentNode: n, markerName: r, controlAttribute: i, explicitBooleanValue: a } = t, o = $r(n, Array.isArray(e) ? e : [e]);
1526
+ Xr[r] ||= /* @__PURE__ */ new WeakMap();
1527
+ let s = Xr[r], c = [], l = /* @__PURE__ */ new Set(), u = new Set(o), d = (e) => {
1528
+ !e || l.has(e) || (l.add(e), d(e.parentNode));
1529
+ };
1530
+ o.forEach(d);
1531
+ let f = (e) => {
1532
+ !e || u.has(e) || Array.prototype.forEach.call(e.children, (e) => {
1533
+ if (l.has(e)) f(e);
1534
+ else try {
1535
+ if (ei(e)) return;
1536
+ let t = e.getAttribute(i), n = a ? t === "true" : t !== null && t !== "false", o = (Jr.get(e) || 0) + 1, l = (s.get(e) || 0) + 1;
1537
+ Jr.set(e, o), s.set(e, l), c.push(e), o === 1 && n && Yr.set(e, !0), l === 1 && e.setAttribute(r, ""), n || e.setAttribute(i, a ? "true" : "");
1538
+ } catch (t) {
1539
+ console.error("[@destyler/aria-hidden] cannot operate on ", e, t);
1540
+ }
1541
+ });
1542
+ };
1543
+ return f(n), l.clear(), Zr++, () => {
1544
+ c.forEach((e) => {
1545
+ let t = Jr.get(e) - 1, n = s.get(e) - 1;
1546
+ Jr.set(e, t), s.set(e, n), t || (Yr.has(e) || e.removeAttribute(i), Yr.delete(e)), n || e.removeAttribute(r);
1547
+ }), Zr--, Zr || (Jr = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), Yr = /* @__PURE__ */ new WeakMap(), Xr = {});
1548
+ };
1549
+ }
1550
+ function ni(e) {
1551
+ let t = Array.isArray(e) ? e[0] : e;
1552
+ return t.ownerDocument.body;
1553
+ }
1554
+ function ri(e, t = ni(e), n = "data-aria-hidden") {
1555
+ if (t) return ti(e, {
1556
+ parentNode: t,
1557
+ markerName: n,
1558
+ controlAttribute: "aria-hidden",
1559
+ explicitBooleanValue: !0
1560
+ });
1561
+ }
1562
+ function ii(e) {
1563
+ let t = requestAnimationFrame(() => e());
1564
+ return () => cancelAnimationFrame(t);
1565
+ }
1566
+ function ai(e, t = {}) {
1567
+ let { defer: n = !0 } = t, r = n ? ii : (e) => e(), i = [];
1568
+ return i.push(r(() => {
1569
+ let t = typeof e == "function" ? e() : e, n = t.filter(Boolean);
1570
+ n.length !== 0 && i.push(ri(n));
1571
+ })), () => {
1572
+ i.forEach((e) => e?.());
1573
+ };
1574
+ }
1575
+ function oi(e) {
1576
+ let t = {
1577
+ each(t) {
1578
+ for (let n = 0; n < e.frames?.length; n += 1) {
1579
+ let r = e.frames[n];
1580
+ r && t(r);
1581
+ }
1582
+ },
1583
+ addEventListener(e, n, r) {
1584
+ return t.each((t) => {
1585
+ try {
1586
+ t.document.addEventListener(e, n, r);
1587
+ } catch {}
1588
+ }), () => {
1589
+ try {
1590
+ t.removeEventListener(e, n, r);
1591
+ } catch {}
1592
+ };
1593
+ },
1594
+ removeEventListener(e, n, r) {
1595
+ t.each((t) => {
1596
+ try {
1597
+ t.document.removeEventListener(e, n, r);
1598
+ } catch {}
1599
+ });
1600
+ }
1601
+ };
1602
+ return t;
1603
+ }
1604
+ function si(e) {
1605
+ let t = e.frameElement == null ? null : e.parent;
1606
+ return {
1607
+ addEventListener: (e, n, r) => {
1608
+ try {
1609
+ t?.addEventListener(e, n, r);
1610
+ } catch {}
1611
+ return () => {
1612
+ try {
1613
+ t?.removeEventListener(e, n, r);
1614
+ } catch {}
1615
+ };
1616
+ },
1617
+ removeEventListener: (e, n, r) => {
1618
+ try {
1619
+ t?.removeEventListener(e, n, r);
1620
+ } catch {}
1621
+ }
1622
+ };
1623
+ }
1624
+ const ci = "pointerdown.outside", li = "focus.outside";
1625
+ function ui(e) {
1626
+ for (let t of e) if (B(t) && W(t)) return !0;
1627
+ return !1;
1628
+ }
1629
+ const di = (e) => "clientY" in e;
1630
+ function fi(e, t) {
1631
+ if (!di(t) || !e) return !1;
1632
+ let n = e.getBoundingClientRect();
1633
+ return n.width === 0 || n.height === 0 ? !1 : n.top <= t.clientY && t.clientY <= n.top + n.height && n.left <= t.clientX && t.clientX <= n.left + n.width;
1634
+ }
1635
+ function pi(e, t) {
1636
+ return e.y <= t.y && t.y <= e.y + e.height && e.x <= t.x && t.x <= e.x + e.width;
1637
+ }
1638
+ function mi(e, t) {
1639
+ if (!t || !di(e)) return !1;
1640
+ let n = t.scrollHeight > t.clientHeight, r = n && e.clientX > t.offsetLeft + t.clientWidth, i = t.scrollWidth > t.clientWidth, a = i && e.clientY > t.offsetTop + t.clientHeight, o = {
1641
+ x: t.offsetLeft,
1642
+ y: t.offsetTop,
1643
+ width: t.clientWidth + (n ? 16 : 0),
1644
+ height: t.clientHeight + (i ? 16 : 0)
1645
+ }, s = {
1646
+ x: e.clientX,
1647
+ y: e.clientY
1648
+ };
1649
+ return pi(o, s) ? r || a : !1;
1650
+ }
1651
+ function hi(e, t) {
1652
+ let { exclude: n, onFocusOutside: r, onPointerDownOutside: i, onInteractOutside: a, defer: o } = t;
1653
+ if (!e) return;
1654
+ let s = V(e), c = kt(e), l = oi(c), u = si(c);
1655
+ function d(t) {
1656
+ let r = H(t);
1657
+ if (!B(r) || !r.isConnected || Dt(e, r) || fi(e, t)) return !1;
1658
+ let i = s.querySelector(`[aria-controls="${e.id}"]`);
1659
+ if (i) {
1660
+ let e = an(i);
1661
+ if (mi(t, e)) return !1;
1662
+ }
1663
+ let a = an(e);
1664
+ return mi(t, a) ? !1 : !n?.(r);
1665
+ }
1666
+ let f = /* @__PURE__ */ new Set();
1667
+ function p(t) {
1668
+ function n() {
1669
+ let n = o ? G : (e) => e(), r = t.composedPath?.() ?? [t.target];
1670
+ n(() => {
1671
+ if (!(!e || !d(t))) {
1672
+ if (i || a) {
1673
+ let t = yn(i, a);
1674
+ e.addEventListener(ci, t, { once: !0 });
1675
+ }
1676
+ _i(e, ci, {
1677
+ bubbles: !1,
1678
+ cancelable: !0,
1679
+ detail: {
1680
+ originalEvent: t,
1681
+ contextmenu: Ut(t),
1682
+ focusable: ui(r)
1683
+ }
1684
+ });
1685
+ }
1686
+ });
1687
+ }
1688
+ t.pointerType === "touch" ? (f.forEach((e) => e()), f.add(U(s, "click", n, { once: !0 })), f.add(u.addEventListener("click", n, { once: !0 })), f.add(l.addEventListener("click", n, { once: !0 }))) : n();
1689
+ }
1690
+ let m = /* @__PURE__ */ new Set(), h = setTimeout(() => {
1691
+ m.add(U(s, "pointerdown", p, !0)), m.add(u.addEventListener("pointerdown", p, !0)), m.add(l.addEventListener("pointerdown", p, !0));
1692
+ }, 0);
1693
+ function g(t) {
1694
+ let n = o ? G : (e) => e();
1695
+ n(() => {
1696
+ if (!(!e || !d(t))) {
1697
+ if (r || a) {
1698
+ let t = yn(r, a);
1699
+ e.addEventListener(li, t, { once: !0 });
1700
+ }
1701
+ _i(e, li, {
1702
+ bubbles: !1,
1703
+ cancelable: !0,
1704
+ detail: {
1705
+ originalEvent: t,
1706
+ contextmenu: !1,
1707
+ focusable: W(H(t))
1708
+ }
1709
+ });
1710
+ }
1711
+ });
1712
+ }
1713
+ return m.add(U(s, "focusin", g, !0)), m.add(u.addEventListener("focusin", g, !0)), m.add(l.addEventListener("focusin", g, !0)), () => {
1714
+ clearTimeout(h), f.forEach((e) => e()), m.forEach((e) => e());
1715
+ };
1716
+ }
1717
+ function gi(e, t) {
1718
+ let { defer: n } = t, r = n ? G : (e) => e(), i = [];
1719
+ return i.push(r(() => {
1720
+ let n = typeof e == "function" ? e() : e;
1721
+ i.push(hi(n, t));
1722
+ })), () => {
1723
+ i.forEach((e) => e?.());
1724
+ };
1725
+ }
1726
+ function _i(e, t, n) {
1727
+ let r = e.ownerDocument.defaultView || window, i = new r.CustomEvent(t, n);
1728
+ return e.dispatchEvent(i);
1729
+ }
1730
+ function vi(e, t) {
1731
+ let n = (e) => {
1732
+ e.key === "Escape" && (e.isComposing || t?.(e));
1733
+ };
1734
+ return U(V(e), "keydown", n, { capture: !0 });
1735
+ }
1736
+ const Y = {
1737
+ layers: [],
1738
+ branches: [],
1739
+ count() {
1740
+ return this.layers.length;
1741
+ },
1742
+ pointerBlockingLayers() {
1743
+ return this.layers.filter((e) => e.pointerBlocking);
1744
+ },
1745
+ topMostPointerBlockingLayer() {
1746
+ return [...this.pointerBlockingLayers()].slice(-1)[0];
1747
+ },
1748
+ hasPointerBlockingLayer() {
1749
+ return this.pointerBlockingLayers().length > 0;
1750
+ },
1751
+ isBelowPointerBlockingLayer(e) {
1752
+ let t = this.indexOf(e), n = this.topMostPointerBlockingLayer() ? this.indexOf(this.topMostPointerBlockingLayer()?.node) : -1;
1753
+ return t < n;
1754
+ },
1755
+ isTopMost(e) {
1756
+ let t = this.layers[this.count() - 1];
1757
+ return t?.node === e;
1758
+ },
1759
+ getNestedLayers(e) {
1760
+ return Array.from(this.layers).slice(this.indexOf(e) + 1);
1761
+ },
1762
+ isInNestedLayer(e, t) {
1763
+ return this.getNestedLayers(e).some((e) => Dt(e.node, t));
1764
+ },
1765
+ isInBranch(e) {
1766
+ return Array.from(this.branches).some((t) => Dt(t, e));
1767
+ },
1768
+ add(e) {
1769
+ let t = this.layers.push(e);
1770
+ e.node.style.setProperty("--layer-index", `${t}`);
1771
+ },
1772
+ addBranch(e) {
1773
+ this.branches.push(e);
1774
+ },
1775
+ remove(e) {
1776
+ let t = this.indexOf(e);
1777
+ if (!(t < 0)) {
1778
+ if (t < this.count() - 1) {
1779
+ let t = this.getNestedLayers(e);
1780
+ t.forEach((e) => e.dismiss());
1781
+ }
1782
+ this.layers.splice(t, 1), e.style.removeProperty("--layer-index");
1783
+ }
1784
+ },
1785
+ removeBranch(e) {
1786
+ let t = this.branches.indexOf(e);
1787
+ t >= 0 && this.branches.splice(t, 1);
1788
+ },
1789
+ indexOf(e) {
1790
+ return this.layers.findIndex((t) => t.node === e);
1791
+ },
1792
+ dismiss(e) {
1793
+ this.layers[this.indexOf(e)]?.dismiss();
1794
+ },
1795
+ clear() {
1796
+ this.remove(this.layers[0].node);
1797
+ }
1798
+ };
1799
+ let yi;
1800
+ function bi() {
1801
+ Y.layers.forEach(({ node: e }) => {
1802
+ e.style.pointerEvents = Y.isBelowPointerBlockingLayer(e) ? "none" : "auto";
1803
+ });
1804
+ }
1805
+ function xi(e) {
1806
+ e.style.pointerEvents = "";
1807
+ }
1808
+ function Si(e, t) {
1809
+ let n = V(e), r = [];
1810
+ if (Y.hasPointerBlockingLayer() && !n.body.hasAttribute("data-inert") && (yi = document.body.style.pointerEvents, queueMicrotask(() => {
1811
+ n.body.style.pointerEvents = "none", n.body.setAttribute("data-inert", "");
1812
+ })), t) {
1813
+ let e = hn(t, (e) => {
1814
+ r.push(pn(e, { pointerEvents: "auto" }));
1815
+ });
1816
+ r.push(e);
1817
+ }
1818
+ return () => {
1819
+ Y.hasPointerBlockingLayer() || (queueMicrotask(() => {
1820
+ n.body.style.pointerEvents = yi, n.body.removeAttribute("data-inert"), n.body.style.length === 0 && n.body.removeAttribute("style");
1821
+ }), r.forEach((e) => e()));
1822
+ };
1823
+ }
1824
+ function Ci(e, t) {
1825
+ if (!e) throw Error("[@destyler/dismissable] node is `null` or `undefined`");
1826
+ let { onDismiss: n, pointerBlocking: r, exclude: i, debug: a } = t, o = {
1827
+ dismiss: n,
1828
+ node: e,
1829
+ pointerBlocking: r
1830
+ };
1831
+ Y.add(o), bi();
1832
+ function s(r) {
1833
+ let i = H(r.detail.originalEvent);
1834
+ Y.isBelowPointerBlockingLayer(e) || Y.isInBranch(i) || (t.onPointerDownOutside?.(r), t.onInteractOutside?.(r), !r.defaultPrevented && (a && console.log("onPointerDownOutside:", r.detail.originalEvent), n?.()));
1835
+ }
1836
+ function c(e) {
1837
+ let r = H(e.detail.originalEvent);
1838
+ Y.isInBranch(r) || (t.onFocusOutside?.(e), t.onInteractOutside?.(e), !e.defaultPrevented && (a && console.log("onFocusOutside:", e.detail.originalEvent), n?.()));
1839
+ }
1840
+ function l(r) {
1841
+ Y.isTopMost(e) && (t.onEscapeKeyDown?.(r), !r.defaultPrevented && n && (r.preventDefault(), n()));
1842
+ }
1843
+ function u(n) {
1844
+ if (!e) return !1;
1845
+ let r = typeof i == "function" ? i() : i, a = Array.isArray(r) ? r : [r], o = t.persistentElements?.map((e) => e()).filter(B);
1846
+ return o && a.push(...o), a.some((e) => Dt(e, n)) || Y.isInNestedLayer(e, n);
1847
+ }
1848
+ let d = [
1849
+ r ? Si(e, t.persistentElements) : void 0,
1850
+ vi(e, l),
1851
+ gi(e, {
1852
+ exclude: u,
1853
+ onFocusOutside: c,
1854
+ onPointerDownOutside: s,
1855
+ defer: t.defer
1856
+ })
1857
+ ];
1858
+ return () => {
1859
+ Y.remove(e), bi(), xi(e), d.forEach((e) => e?.());
1860
+ };
1861
+ }
1862
+ function wi(e, t) {
1863
+ let { defer: n } = t, r = n ? G : (e) => e(), i = [];
1864
+ return i.push(r(() => {
1865
+ let n = Tn(e) ? e() : e;
1866
+ i.push(Ci(n, t));
1867
+ })), () => {
1868
+ i.forEach((e) => e?.());
1869
+ };
1870
+ }
1871
+ const Ti = (e) => e.key === "Tab", Ei = (e, ...t) => typeof e == "function" ? e(...t) : e, Di = (e) => !e.isComposing && e.key === "Escape", Oi = (e) => setTimeout(e, 0);
1872
+ function ki(e) {
1873
+ return e.localName === "input" && "select" in e && typeof e.select == "function";
1874
+ }
1875
+ const Ai = {
1876
+ activateTrap(e, t) {
1877
+ if (e.length > 0) {
1878
+ let n = e[e.length - 1];
1879
+ n !== t && n.pause();
1880
+ }
1881
+ let n = e.indexOf(t);
1882
+ n === -1 || e.splice(n, 1), e.push(t);
1883
+ },
1884
+ deactivateTrap(e, t) {
1885
+ let n = e.indexOf(t);
1886
+ n !== -1 && e.splice(n, 1), e.length > 0 && e[e.length - 1].unpause();
1887
+ }
1888
+ }, ji = [];
1889
+ var Mi = class {
1890
+ trapStack;
1891
+ config;
1892
+ doc;
1893
+ state = {
1894
+ containers: [],
1895
+ containerGroups: [],
1896
+ tabbableGroups: [],
1897
+ nodeFocusedBeforeActivation: null,
1898
+ mostRecentlyFocusedNode: null,
1899
+ active: !1,
1900
+ paused: !1,
1901
+ delayInitialFocusTimer: void 0,
1902
+ recentNavEvent: void 0
1903
+ };
1904
+ get active() {
1905
+ return this.state.active;
1906
+ }
1907
+ get paused() {
1908
+ return this.state.paused;
1909
+ }
1910
+ constructor(e, t) {
1911
+ this.trapStack = t.trapStack || ji;
1912
+ let n = {
1913
+ returnFocusOnDeactivate: !0,
1914
+ escapeDeactivates: !0,
1915
+ delayInitialFocus: !0,
1916
+ isKeyForward(e) {
1917
+ return Ti(e) && !e.shiftKey;
1918
+ },
1919
+ isKeyBackward(e) {
1920
+ return Ti(e) && e.shiftKey;
1921
+ },
1922
+ ...t
1923
+ };
1924
+ this.doc = n.document || V(Array.isArray(e) ? e[0] : e), this.config = n, this.updateContainerElements(e), this.setupMutationObserver();
1925
+ }
1926
+ findContainerIndex(e, t) {
1927
+ let n = typeof t?.composedPath == "function" ? t.composedPath() : void 0;
1928
+ return this.state.containerGroups.findIndex(({ container: t, tabbableNodes: r }) => t.contains(e) || n?.includes(t) || r.find((t) => t === e));
1929
+ }
1930
+ updateTabbableNodes() {
1931
+ if (this.state.containerGroups = this.state.containers.map((e) => {
1932
+ let t = Qt(e), n = Zt(e), r = t.length > 0 ? t[0] : void 0, i = t.length > 0 ? t[t.length - 1] : void 0, a = n.find((e) => $t(e)), o = n.slice().reverse().find((e) => $t(e)), s = !!t.find((e) => nn(e) > 0);
1933
+ function c(e, r = !0) {
1934
+ let i = t.indexOf(e);
1935
+ return i < 0 ? r ? n.slice(n.indexOf(e) + 1).find((e) => $t(e)) : n.slice(0, n.indexOf(e)).reverse().find((e) => $t(e)) : t[i + (r ? 1 : -1)];
1936
+ }
1937
+ return {
1938
+ container: e,
1939
+ tabbableNodes: t,
1940
+ focusableNodes: n,
1941
+ posTabIndexesFound: s,
1942
+ firstTabbableNode: r,
1943
+ lastTabbableNode: i,
1944
+ firstDomTabbableNode: a,
1945
+ lastDomTabbableNode: o,
1946
+ nextTabbableNode: c
1947
+ };
1948
+ }), this.state.tabbableGroups = this.state.containerGroups.filter((e) => e.tabbableNodes.length > 0), this.state.tabbableGroups.length <= 0 && !this.getNodeForOption("fallbackFocus")) throw Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
1949
+ if (this.state.containerGroups.find((e) => e.posTabIndexesFound) && this.state.containerGroups.length > 1) throw Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
1950
+ }
1951
+ listenerCleanups = [];
1952
+ addListeners() {
1953
+ if (this.state.active) return Ai.activateTrap(this.trapStack, this), this.state.delayInitialFocusTimer = this.config.delayInitialFocus ? Oi(() => {
1954
+ this.tryFocus(this.getInitialFocusNode());
1955
+ }) : this.tryFocus(this.getInitialFocusNode()), this.listenerCleanups.push(U(this.doc, "focusin", this.handleFocus, !0), U(this.doc, "mousedown", this.handlePointerDown, {
1956
+ capture: !0,
1957
+ passive: !1
1958
+ }), U(this.doc, "touchstart", this.handlePointerDown, {
1959
+ capture: !0,
1960
+ passive: !1
1961
+ }), U(this.doc, "click", this.handleClick, {
1962
+ capture: !0,
1963
+ passive: !1
1964
+ }), U(this.doc, "keydown", this.handleTabKey, {
1965
+ capture: !0,
1966
+ passive: !1
1967
+ }), U(this.doc, "keydown", this.handleEscapeKey)), this;
1968
+ }
1969
+ removeListeners() {
1970
+ if (this.state.active) return this.listenerCleanups.forEach((e) => e()), this.listenerCleanups = [], this;
1971
+ }
1972
+ handleFocus = (e) => {
1973
+ let t = H(e), n = this.findContainerIndex(t, e) >= 0;
1974
+ if (n || _t(t)) n && (this.state.mostRecentlyFocusedNode = t);
1975
+ else {
1976
+ e.stopImmediatePropagation();
1977
+ let t, n = !0;
1978
+ if (this.state.mostRecentlyFocusedNode) if (nn(this.state.mostRecentlyFocusedNode) > 0) {
1979
+ let e = this.findContainerIndex(this.state.mostRecentlyFocusedNode), { tabbableNodes: r } = this.state.containerGroups[e];
1980
+ if (r.length > 0) {
1981
+ let e = r.findIndex((e) => e === this.state.mostRecentlyFocusedNode);
1982
+ e >= 0 && (this.config.isKeyForward(this.state.recentNavEvent) ? e + 1 < r.length && (t = r[e + 1], n = !1) : e - 1 >= 0 && (t = r[e - 1], n = !1));
1983
+ }
1984
+ } else this.state.containerGroups.some((e) => e.tabbableNodes.some((e) => nn(e) > 0)) || (n = !1);
1985
+ else n = !1;
1986
+ n && (t = this.findNextNavNode({
1987
+ target: this.state.mostRecentlyFocusedNode,
1988
+ isBackward: this.config.isKeyBackward(this.state.recentNavEvent)
1989
+ })), t ? this.tryFocus(t) : this.tryFocus(this.state.mostRecentlyFocusedNode || this.getInitialFocusNode());
1990
+ }
1991
+ this.state.recentNavEvent = void 0;
1992
+ };
1993
+ handlePointerDown = (e) => {
1994
+ let t = H(e);
1995
+ if (!(this.findContainerIndex(t, e) >= 0)) {
1996
+ if (Ei(this.config.clickOutsideDeactivates, e)) {
1997
+ this.deactivate({ returnFocus: this.config.returnFocusOnDeactivate });
1998
+ return;
1999
+ }
2000
+ Ei(this.config.allowOutsideClick, e) || e.preventDefault();
2001
+ }
2002
+ };
2003
+ handleClick = (e) => {
2004
+ let t = H(e);
2005
+ this.findContainerIndex(t, e) >= 0 || Ei(this.config.clickOutsideDeactivates, e) || Ei(this.config.allowOutsideClick, e) || (e.preventDefault(), e.stopImmediatePropagation());
2006
+ };
2007
+ handleTabKey = (e) => {
2008
+ if (this.config.isKeyForward(e) || this.config.isKeyBackward(e)) {
2009
+ this.state.recentNavEvent = e;
2010
+ let t = this.config.isKeyBackward(e), n = this.findNextNavNode({
2011
+ event: e,
2012
+ isBackward: t
2013
+ });
2014
+ if (!n) return;
2015
+ Ti(e) && e.preventDefault(), this.tryFocus(n);
2016
+ }
2017
+ };
2018
+ handleEscapeKey = (e) => {
2019
+ Di(e) && Ei(this.config.escapeDeactivates, e) !== !1 && (e.preventDefault(), this.deactivate());
2020
+ };
2021
+ _mutationObserver;
2022
+ setupMutationObserver = () => {
2023
+ let e = this.doc.defaultView || window;
2024
+ this._mutationObserver = new e.MutationObserver((e) => {
2025
+ let t = e.some((e) => {
2026
+ let t = Array.from(e.removedNodes);
2027
+ return t.includes(this.state.mostRecentlyFocusedNode);
2028
+ });
2029
+ t && this.tryFocus(this.getInitialFocusNode());
2030
+ });
2031
+ };
2032
+ updateObservedNodes = () => {
2033
+ this._mutationObserver?.disconnect(), this.state.active && !this.state.paused && this.state.containers.forEach((e) => {
2034
+ this._mutationObserver?.observe(e, {
2035
+ subtree: !0,
2036
+ childList: !0
2037
+ });
2038
+ });
2039
+ };
2040
+ getInitialFocusNode = () => {
2041
+ let e = this.getNodeForOption("initialFocus", { hasFallback: !0 });
2042
+ if (e === !1) return !1;
2043
+ if (e === void 0 || e && !W(e)) if (this.findContainerIndex(this.doc.activeElement) >= 0) e = this.doc.activeElement;
2044
+ else {
2045
+ let t = this.state.tabbableGroups[0], n = t && t.firstTabbableNode;
2046
+ e = n || this.getNodeForOption("fallbackFocus");
2047
+ }
2048
+ else e === null && (e = this.getNodeForOption("fallbackFocus"));
2049
+ if (!e) throw Error("Your focus-trap needs to have at least one focusable element");
2050
+ return e.isConnected || (e = this.getNodeForOption("fallbackFocus")), e;
2051
+ };
2052
+ tryFocus = (e) => {
2053
+ if (e !== !1 && e !== At(this.doc)) {
2054
+ if (!e || !e.focus) {
2055
+ this.tryFocus(this.getInitialFocusNode());
2056
+ return;
2057
+ }
2058
+ e.focus({ preventScroll: !!this.config.preventScroll }), this.state.mostRecentlyFocusedNode = e, ki(e) && e.select();
2059
+ }
2060
+ };
2061
+ activate(e) {
2062
+ if (this.state.active) return this;
2063
+ let t = this.getOption(e, "onActivate"), n = this.getOption(e, "onPostActivate"), r = this.getOption(e, "checkCanFocusTrap");
2064
+ r || this.updateTabbableNodes(), this.state.active = !0, this.state.paused = !1, this.state.nodeFocusedBeforeActivation = this.doc.activeElement || null, t?.();
2065
+ let i = () => {
2066
+ r && this.updateTabbableNodes(), this.addListeners(), this.updateObservedNodes(), n?.();
2067
+ };
2068
+ return r ? (r(this.state.containers.concat()).then(i, i), this) : (i(), this);
2069
+ }
2070
+ deactivate = (e) => {
2071
+ if (!this.state.active) return this;
2072
+ let t = {
2073
+ onDeactivate: this.config.onDeactivate,
2074
+ onPostDeactivate: this.config.onPostDeactivate,
2075
+ checkCanReturnFocus: this.config.checkCanReturnFocus,
2076
+ ...e
2077
+ };
2078
+ clearTimeout(this.state.delayInitialFocusTimer), this.state.delayInitialFocusTimer = void 0, this.removeListeners(), this.state.active = !1, this.state.paused = !1, this.updateObservedNodes(), Ai.deactivateTrap(this.trapStack, this);
2079
+ let n = this.getOption(t, "onDeactivate"), r = this.getOption(t, "onPostDeactivate"), i = this.getOption(t, "checkCanReturnFocus"), a = this.getOption(t, "returnFocus", "returnFocusOnDeactivate");
2080
+ n?.();
2081
+ let o = () => {
2082
+ Oi(() => {
2083
+ if (a) {
2084
+ let e = this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);
2085
+ this.tryFocus(e);
2086
+ }
2087
+ r?.();
2088
+ });
2089
+ };
2090
+ if (a && i) {
2091
+ let e = this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);
2092
+ return i(e).then(o, o), this;
2093
+ }
2094
+ return o(), this;
2095
+ };
2096
+ pause = (e) => {
2097
+ if (this.state.paused || !this.state.active) return this;
2098
+ let t = this.getOption(e, "onPause"), n = this.getOption(e, "onPostPause");
2099
+ return this.state.paused = !0, t?.(), this.removeListeners(), this.updateObservedNodes(), n?.(), this;
2100
+ };
2101
+ unpause = (e) => {
2102
+ if (!this.state.paused || !this.state.active) return this;
2103
+ let t = this.getOption(e, "onUnpause"), n = this.getOption(e, "onPostUnpause");
2104
+ return this.state.paused = !1, t?.(), this.updateTabbableNodes(), this.addListeners(), this.updateObservedNodes(), n?.(), this;
2105
+ };
2106
+ updateContainerElements = (e) => (this.state.containers = Array.isArray(e) ? e.filter(Boolean) : [e].filter(Boolean), this.state.active && this.updateTabbableNodes(), this.updateObservedNodes(), this);
2107
+ getReturnFocusNode = (e) => {
2108
+ let t = this.getNodeForOption("setReturnFocus", { params: [e] });
2109
+ return t || (t === !1 ? !1 : e);
2110
+ };
2111
+ getOption = (e, t, n) => e && e[t] !== void 0 ? e[t] : this.config[n || t];
2112
+ getNodeForOption = (e, { hasFallback: t = !1, params: n = [] } = {}) => {
2113
+ let r = this.config[e];
2114
+ if (typeof r == "function" && (r = r(...n)), r === !0 && (r = void 0), !r) {
2115
+ if (r === void 0 || r === !1) return r;
2116
+ throw Error(`\`${e}\` was specified but was not a node, or did not return a node`);
2117
+ }
2118
+ let i = r;
2119
+ if (typeof r == "string") {
2120
+ try {
2121
+ i = this.doc.querySelector(r);
2122
+ } catch (t) {
2123
+ throw Error(`\`${e}\` appears to be an invalid selector; error="${t.message}"`);
2124
+ }
2125
+ if (!i && !t) throw Error(`\`${e}\` as selector refers to no known node`);
2126
+ }
2127
+ return i;
2128
+ };
2129
+ findNextNavNode = (e) => {
2130
+ let { event: t, isBackward: n = !1 } = e, r = e.target || H(t);
2131
+ this.updateTabbableNodes();
2132
+ let i = null;
2133
+ if (this.state.tabbableGroups.length > 0) {
2134
+ let e = this.findContainerIndex(r, t), a = e >= 0 ? this.state.containerGroups[e] : void 0;
2135
+ if (e < 0) i = n ? this.state.tabbableGroups[this.state.tabbableGroups.length - 1].lastTabbableNode : this.state.tabbableGroups[0].firstTabbableNode;
2136
+ else if (n) {
2137
+ let n = this.state.tabbableGroups.findIndex(({ firstTabbableNode: e }) => r === e);
2138
+ if (n < 0 && (a?.container === r || W(r) && !$t(r) && !a?.nextTabbableNode(r, !1)) && (n = e), n >= 0) {
2139
+ let e = n === 0 ? this.state.tabbableGroups.length - 1 : n - 1, t = this.state.tabbableGroups[e];
2140
+ i = nn(r) >= 0 ? t.lastTabbableNode : t.lastDomTabbableNode;
2141
+ } else Ti(t) || (i = a?.nextTabbableNode(r, !1));
2142
+ } else {
2143
+ let n = this.state.tabbableGroups.findIndex(({ lastTabbableNode: e }) => r === e);
2144
+ if (n < 0 && (a?.container === r || W(r) && !$t(r) && !a?.nextTabbableNode(r)) && (n = e), n >= 0) {
2145
+ let e = n === this.state.tabbableGroups.length - 1 ? 0 : n + 1, t = this.state.tabbableGroups[e];
2146
+ i = nn(r) >= 0 ? t.firstTabbableNode : t.firstDomTabbableNode;
2147
+ } else Ti(t) || (i = a?.nextTabbableNode(r));
2148
+ }
2149
+ } else i = this.getNodeForOption("fallbackFocus");
2150
+ return i;
2151
+ };
2152
+ };
2153
+ function Ni(e, t = {}) {
2154
+ let n, r = G(() => {
2155
+ let r = typeof e == "function" ? e() : e;
2156
+ if (r) {
2157
+ n = new Mi(r, {
2158
+ escapeDeactivates: !1,
2159
+ allowOutsideClick: !0,
2160
+ preventScroll: !0,
2161
+ returnFocusOnDeactivate: !0,
2162
+ delayInitialFocus: !1,
2163
+ fallbackFocus: r,
2164
+ ...t,
2165
+ document: V(r)
2166
+ });
2167
+ try {
2168
+ n.activate();
2169
+ } catch {}
2170
+ }
2171
+ });
2172
+ return function() {
2173
+ n?.deactivate(), r();
2174
+ };
2175
+ }
2176
+ const Pi = "data-scroll-lock";
2177
+ function Fi(e, t) {
2178
+ if (!e) return;
2179
+ let n = Object.keys(t).reduce((t, n) => (t[n] = e.style.getPropertyValue(n), t), {});
2180
+ return Object.assign(e.style, t), () => {
2181
+ Object.assign(e.style, n);
2182
+ };
2183
+ }
2184
+ function Ii(e, t, n) {
2185
+ if (!e) return;
2186
+ let r = e.style.getPropertyValue(t);
2187
+ return e.style.setProperty(t, n), () => {
2188
+ r ? e.style.setProperty(t, r) : e.style.removeProperty(t);
2189
+ };
2190
+ }
2191
+ function Li(e) {
2192
+ let t = e.getBoundingClientRect().left, n = Math.round(t) + e.scrollLeft;
2193
+ return n ? "paddingLeft" : "paddingRight";
2194
+ }
2195
+ function Ri(e) {
2196
+ let t = e ?? document, n = t.defaultView ?? window, { documentElement: r, body: i } = t, a = i.hasAttribute(Pi);
2197
+ if (a) return;
2198
+ i.setAttribute(Pi, "");
2199
+ let o = n.innerWidth - r.clientWidth, s = () => Ii(r, "--scrollbar-width", `${o}px`), c = Li(r), l = () => Fi(i, {
2200
+ overflow: "hidden",
2201
+ [c]: `${o}px`
2202
+ }), u = () => {
2203
+ let { scrollX: e, scrollY: t, visualViewport: r } = n, a = r?.offsetLeft ?? 0, s = r?.offsetTop ?? 0, l = Fi(i, {
2204
+ position: "fixed",
2205
+ overflow: "hidden",
2206
+ top: `${-(t - Math.floor(s))}px`,
2207
+ left: `${-(e - Math.floor(a))}px`,
2208
+ right: "0",
2209
+ [c]: `${o}px`
2210
+ });
2211
+ return () => {
2212
+ l?.(), n.scrollTo({
2213
+ left: e,
2214
+ top: t,
2215
+ behavior: "instant"
2216
+ });
2217
+ };
2218
+ }, d = [s(), Vt() ? u() : l()];
2219
+ return () => {
2220
+ d.forEach((e) => e?.()), i.removeAttribute(Pi);
2221
+ };
2222
+ }
2223
+ Symbol();
2224
+ const zi = Symbol(), Bi = Object.getPrototypeOf, Vi = /* @__PURE__ */ new WeakMap(), Hi = (e) => e && (Vi.has(e) ? Vi.get(e) : Bi(e) === Object.prototype || Bi(e) === Array.prototype), Ui = (e) => Hi(e) && e[zi] || null, Wi = (e, t = !0) => {
2225
+ Vi.set(e, t);
2226
+ };
2227
+ function Gi() {
2228
+ if (typeof globalThis < "u" || typeof globalThis < "u") return globalThis;
2229
+ if (typeof window < "u") return window;
2230
+ }
2231
+ function Ki(e, t) {
2232
+ let n = Gi();
2233
+ return n ? (n[e] ||= t(), n[e]) : t();
2234
+ }
2235
+ const qi = Ki("__destyler__refSet", () => /* @__PURE__ */ new WeakSet()), Ji = (e) => typeof e == "object" && !!e && "$$typeof" in e && "props" in e, Yi = (e) => typeof e == "object" && !!e && "__v_isVNode" in e;
2236
+ function Xi(e) {
2237
+ return typeof e == "object" && !!e && "nodeType" in e && typeof e.nodeName == "string";
2238
+ }
2239
+ const Zi = (e) => Ji(e) || Yi(e) || Xi(e), Qi = (e) => typeof e == "object" && !!e;
2240
+ function $i(e) {
2241
+ return Qi(e) && !qi.has(e) && (Array.isArray(e) || !(Symbol.iterator in e)) && !Zi(e) && !(e instanceof WeakMap) && !(e instanceof WeakSet) && !(e instanceof Error) && typeof e != "number" && !(e instanceof Date) && typeof e != "string" && !(e instanceof RegExp) && !(e instanceof ArrayBuffer) && !(e instanceof Promise);
2242
+ }
2243
+ function ea(e, t, n) {
2244
+ typeof n.value == "object" && !$i(n.value) && (n.value = ta(n.value)), !n.enumerable || n.get || n.set || !n.configurable || !n.writable || t === "__proto__" ? Object.defineProperty(e, t, n) : e[t] = n.value;
2245
+ }
2246
+ function ta(e) {
2247
+ if (typeof e != "object") return e;
2248
+ let t = 0, n, r, i, a = Object.prototype.toString.call(e);
2249
+ if (a === "[object Object]" ? i = Object.create(Object.getPrototypeOf(e) || null) : a === "[object Array]" ? i = Array.from({ length: e.length }) : a === "[object Set]" ? (i = /* @__PURE__ */ new Set(), e.forEach((e) => {
2250
+ i.add(ta(e));
2251
+ })) : a === "[object Map]" ? (i = /* @__PURE__ */ new Map(), e.forEach((e, t) => {
2252
+ i.set(ta(t), ta(e));
2253
+ })) : a === "[object Date]" ? i = /* @__PURE__ */ new Date(+e) : a === "[object RegExp]" ? i = new RegExp(e.source, e.flags) : a === "[object DataView]" ? i = new e.constructor(ta(e.buffer)) : a === "[object ArrayBuffer]" ? i = e.slice(0) : a === "[object Blob]" ? i = e.slice() : a.slice(-6) === "Array]" && (i = new e.constructor(e)), i) {
2254
+ for (r = Object.getOwnPropertySymbols(e); t < r.length; t++) ea(i, r[t], Object.getOwnPropertyDescriptor(e, r[t]));
2255
+ for (t = 0, r = Object.getOwnPropertyNames(e); t < r.length; t++) Object.hasOwnProperty.call(i, n = r[t]) && i[n] === e[n] || ea(i, n, Object.getOwnPropertyDescriptor(e, n));
2256
+ }
2257
+ return i || e;
2258
+ }
2259
+ const na = Ki("__destyler__proxyStateMap", () => /* @__PURE__ */ new WeakMap());
2260
+ function ra(e = Object.is, t = (e, t) => new Proxy(e, t), n = /* @__PURE__ */ new WeakMap(), r = (e, t) => {
2261
+ let r = n.get(e);
2262
+ if (r?.[0] === t) return r[1];
2263
+ let i = Array.isArray(e) ? [] : Object.create(Object.getPrototypeOf(e));
2264
+ return Wi(i, !0), n.set(e, [t, i]), Reflect.ownKeys(e).forEach((t) => {
2265
+ let n = Reflect.get(e, t);
2266
+ qi.has(n) ? (Wi(n, !1), i[t] = n) : na.has(n) ? i[t] = sa(n) : i[t] = n;
2267
+ }), Object.freeze(i);
2268
+ }, i = /* @__PURE__ */ new WeakMap(), a = [1, 1], o = (n) => {
2269
+ if (!Qi(n)) throw Error("object required");
2270
+ let o = i.get(n);
2271
+ if (o) return o;
2272
+ let s = a[0], c = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map(), u = (e, t = ++a[0]) => {
2273
+ s !== t && (s = t, c.forEach((n) => n(e, t)));
2274
+ }, d = a[1], f = (e = ++a[1]) => (d !== e && !c.size && (d = e, l.forEach(([t]) => {
2275
+ let n = t[1](e);
2276
+ n > s && (s = n);
2277
+ })), s), p = (e) => (t, n) => {
2278
+ let r = [...t];
2279
+ r[1] = [e, ...r[1]], u(r, n);
2280
+ }, m = (e, t) => {
2281
+ if (c.size) {
2282
+ let n = t[3](p(e));
2283
+ l.set(e, [t, n]);
2284
+ } else l.set(e, [t]);
2285
+ }, h = (e) => {
2286
+ let t = l.get(e);
2287
+ t && (l.delete(e), t[1]?.());
2288
+ }, g = (e) => {
2289
+ c.add(e), c.size === 1 && l.forEach(([e], t) => {
2290
+ let n = e[3](p(t));
2291
+ l.set(t, [e, n]);
2292
+ });
2293
+ let t = () => {
2294
+ c.delete(e), c.size === 0 && l.forEach(([e, t], n) => {
2295
+ t && (t(), l.set(n, [e]));
2296
+ });
2297
+ };
2298
+ return t;
2299
+ }, _ = Array.isArray(n) ? [] : Object.create(Object.getPrototypeOf(n)), v = {
2300
+ deleteProperty(e, t) {
2301
+ let n = Reflect.get(e, t);
2302
+ h(t);
2303
+ let r = Reflect.deleteProperty(e, t);
2304
+ return r && u([
2305
+ "delete",
2306
+ [t],
2307
+ n
2308
+ ]), r;
2309
+ },
2310
+ set(t, n, r, a) {
2311
+ let o = Reflect.has(t, n), s = Reflect.get(t, n, a);
2312
+ if (o && (e(s, r) || i.has(r) && e(s, i.get(r)))) return !0;
2313
+ h(n), Qi(r) && (r = Ui(r) || r);
2314
+ let c = r;
2315
+ if (!Object.getOwnPropertyDescriptor(t, n)?.set) {
2316
+ !na.has(r) && $i(r) && (c = aa(r));
2317
+ let e = !qi.has(c) && na.get(c);
2318
+ e && m(n, e);
2319
+ }
2320
+ return Reflect.set(t, n, c, a), u([
2321
+ "set",
2322
+ [n],
2323
+ r,
2324
+ s
2325
+ ]), !0;
2326
+ }
2327
+ }, y = t(_, v);
2328
+ i.set(n, y);
2329
+ let b = [
2330
+ _,
2331
+ f,
2332
+ r,
2333
+ g
2334
+ ];
2335
+ return na.set(y, b), Reflect.ownKeys(n).forEach((e) => {
2336
+ let t = Object.getOwnPropertyDescriptor(n, e);
2337
+ t.get || t.set ? Object.defineProperty(_, e, t) : y[e] = n[e];
2338
+ }), y;
2339
+ }) {
2340
+ return [
2341
+ o,
2342
+ na,
2343
+ qi,
2344
+ e,
2345
+ t,
2346
+ $i,
2347
+ n,
2348
+ r,
2349
+ i,
2350
+ a
2351
+ ];
2352
+ }
2353
+ const [ia] = ra();
2354
+ function aa(e = {}) {
2355
+ return ia(e);
2356
+ }
2357
+ function oa(e, t, n) {
2358
+ let r = na.get(e), i = [], a = r[3], o = !1, s = (e) => {
2359
+ if (i.push(e), n) {
2360
+ t(i.splice(0));
2361
+ return;
2362
+ }
2363
+ Promise.resolve().then(() => {
2364
+ o && t(i.splice(0));
2365
+ });
2366
+ }, c = a(s);
2367
+ return o = !0, () => {
2368
+ o = !1, c();
2369
+ };
2370
+ }
2371
+ function sa(e) {
2372
+ let t = na.get(e), [n, r, i] = t;
2373
+ return i(n, r());
2374
+ }
2375
+ function ca(e) {
2376
+ return qi.add(e), e;
2377
+ }
2378
+ function la(e, t) {
2379
+ let n = Object.keys(t);
2380
+ n.forEach((t) => {
2381
+ if (Object.getOwnPropertyDescriptor(e, t)) throw Error("object property already defined");
2382
+ });
2383
+ let r = aa(e);
2384
+ return n.forEach((e) => {
2385
+ let n = t[e], { get: i, set: a } = typeof n == "function" ? { get: n } : n, o = {};
2386
+ o.get = () => i(sa(r)), a && (o.set = (e) => a(r, e)), Object.defineProperty(r, e, o);
2387
+ }), r;
2388
+ }
2389
+ function ua(e, ...t) {
2390
+ if (!jn(e)) throw TypeError("Source argument must be a plain object");
2391
+ let n = e;
2392
+ for (let e of t) {
2393
+ if (!jn(e)) continue;
2394
+ let t = Rn(e);
2395
+ for (let r in t) {
2396
+ if (!Object.prototype.hasOwnProperty.call(t, r) || r === "__proto__" || r === "constructor" || r === "prototype") continue;
2397
+ let i = n[r], a = e[r];
2398
+ jn(a) ? n[r] = jn(i) ? ua(i, a) : { ...a } : n[r] = a;
2399
+ }
2400
+ }
2401
+ return n;
2402
+ }
2403
+ function X(e) {
2404
+ let t = q(e) ? { type: e } : e;
2405
+ return t;
2406
+ }
2407
+ function da(e) {
2408
+ return e ? xn(e) ? e.slice() : [e] : [];
2409
+ }
2410
+ function fa(e) {
2411
+ return Cn(e) && e.predicate != null;
2412
+ }
2413
+ const pa = () => !0;
2414
+ function ma(e, t) {
2415
+ return e ??= pa, (n, r, i) => {
2416
+ if (q(e)) {
2417
+ let a = t[e];
2418
+ return Tn(a) ? a(n, r, i) : a;
2419
+ }
2420
+ return fa(e) ? e.predicate(t)(n, r, i) : e?.(n, r, i);
2421
+ };
2422
+ }
2423
+ function ha(e, t) {
2424
+ return (n, r, i) => fa(e) ? e.predicate(t)(n, r, i) : e;
2425
+ }
2426
+ let ga = /* @__PURE__ */ function(e) {
2427
+ return e.NotStarted = "Not Started", e.Running = "Running", e.Stopped = "Stopped", e;
2428
+ }({}), Z = /* @__PURE__ */ function(e) {
2429
+ return e.Start = "machine.start", e.Stop = "machine.stop", e.Created = "machine.created", e.Init = "machine.init", e;
2430
+ }({}), _a = /* @__PURE__ */ function(e) {
2431
+ return e.Machine = "machine", e.Actor = "machine.actor", e;
2432
+ }({});
2433
+ function va(e) {
2434
+ let t = e.computed ?? K({}), n = e.context ?? K({}), r = e.initial ? e.states?.[e.initial]?.tags : [], i = aa({
2435
+ value: e.initial ?? "",
2436
+ previousValue: "",
2437
+ event: K({}),
2438
+ previousEvent: K({}),
2439
+ context: la(n, t),
2440
+ done: !1,
2441
+ tags: r ?? [],
2442
+ hasTag(e) {
2443
+ return this.tags.includes(e);
2444
+ },
2445
+ matches(...e) {
2446
+ return e.includes(this.value);
2447
+ },
2448
+ can(e) {
2449
+ return K(this).nextEvents.includes(e);
2450
+ },
2451
+ get nextEvents() {
2452
+ let t = e.states?.[this.value]?.on ?? {}, n = e?.on ?? {};
2453
+ return Object.keys({
2454
+ ...t,
2455
+ ...n
2456
+ });
2457
+ },
2458
+ get changed() {
2459
+ return this.event.value === Z.Init || !this.previousValue ? !1 : this.value !== this.previousValue;
2460
+ }
2461
+ });
2462
+ return K(i);
2463
+ }
2464
+ function ya(e, t) {
2465
+ return (n, r) => {
2466
+ if (wn(e)) return e;
2467
+ if (Tn(e)) return e(n, r);
2468
+ if (q(e)) {
2469
+ let i = Number.parseFloat(e);
2470
+ if (!Number.isNaN(i)) return i;
2471
+ if (t) {
2472
+ let i = t?.[e];
2473
+ if (i === null) throw Error(`[@destyler/xstate > determine-delay] Cannot determine delay for \`${e}\`. It is set to null in \`options.delays\``);
2474
+ return Tn(i) ? i(n, r) : i;
2475
+ }
2476
+ }
2477
+ };
2478
+ }
2479
+ function ba(e) {
2480
+ return q(e) ? { target: e } : e;
2481
+ }
2482
+ function xa(e, t) {
2483
+ return (n, r, i) => da(e).map(ba).find((e) => {
2484
+ let a = ma(e.guard, t), o = a(n, r, i);
2485
+ return o ?? e.target ?? e.actions;
2486
+ });
2487
+ }
2488
+ var Sa = class {
2489
+ status = ga.NotStarted;
2490
+ state;
2491
+ initialState;
2492
+ initialContext;
2493
+ id;
2494
+ type = _a.Machine;
2495
+ activityEvents = /* @__PURE__ */ new Map();
2496
+ delayedEvents = /* @__PURE__ */ new Map();
2497
+ stateListeners = /* @__PURE__ */ new Set();
2498
+ doneListeners = /* @__PURE__ */ new Set();
2499
+ contextWatchers = /* @__PURE__ */ new Set();
2500
+ removeStateListener = vn;
2501
+ parent;
2502
+ children = /* @__PURE__ */ new Map();
2503
+ guardMap;
2504
+ actionMap;
2505
+ delayMap;
2506
+ activityMap;
2507
+ sync;
2508
+ options;
2509
+ config;
2510
+ constructor(e, t) {
2511
+ this.config = ta(e), this.options = ta(t ?? {}), this.id = this.config.id ?? `machine-${bn()}`, this.guardMap = this.options?.guards ?? {}, this.actionMap = this.options?.actions ?? {}, this.delayMap = this.options?.delays ?? {}, this.activityMap = this.options?.activities ?? {}, this.sync = this.options?.sync ?? !1, this.state = va(this.config), this.initialContext = sa(this.state.context);
2512
+ }
2513
+ get stateSnapshot() {
2514
+ return K(sa(this.state));
2515
+ }
2516
+ getState() {
2517
+ return this.stateSnapshot;
2518
+ }
2519
+ get contextSnapshot() {
2520
+ return this.stateSnapshot.context;
2521
+ }
2522
+ _created = () => {
2523
+ if (!this.config.created) return;
2524
+ let e = X(Z.Created);
2525
+ this.executeActions(this.config.created, e);
2526
+ };
2527
+ start = (e) => {
2528
+ if (this.state.value = "", this.state.tags = [], this.status === ga.Running) return this;
2529
+ this.status = ga.Running, this.removeStateListener = oa(this.state, () => {
2530
+ this.stateListeners.forEach((e) => {
2531
+ e(this.stateSnapshot);
2532
+ });
2533
+ }, this.sync), this.setupContextWatchers(), this.executeActivities(X(Z.Start), da(this.config.activities), Z.Start), this.executeActions(this.config.entry, X(Z.Start));
2534
+ let t = X(Z.Init), n = Cn(e) ? e.value : e, r = Cn(e) ? e.context : void 0;
2535
+ r && this.setContext(r);
2536
+ let i = { target: n ?? this.config.initial }, a = this.getNextStateInfo(i, t);
2537
+ return this.initialState = a, this.performStateChangeEffects(this.state.value, a, t), this;
2538
+ };
2539
+ setupContextWatchers = () => {
2540
+ let { watch: e } = this.config;
2541
+ if (!e) return;
2542
+ let t = sa(this.state.context), n = oa(this.state.context, () => {
2543
+ let n = sa(this.state.context);
2544
+ for (let [r, i] of Object.entries(e)) {
2545
+ let e = this.options.compareFns?.[r] ?? Object.is;
2546
+ if (e(t[r], n[r])) continue;
2547
+ this.executeActions(i, this.state.event);
2548
+ }
2549
+ t = n;
2550
+ });
2551
+ this.contextWatchers.add(n);
2552
+ };
2553
+ stop = () => {
2554
+ if (this.status !== ga.Stopped) return this.performExitEffects(this.state.value, X(Z.Stop)), this.executeActions(this.config.exit, X(Z.Stop)), this.setState(""), this.setEvent(Z.Stop), this.stopStateListeners(), this.stopChildren(), this.stopActivities(), this.stopDelayedEvents(), this.stopContextWatchers(), this.status = ga.Stopped, this;
2555
+ };
2556
+ stopStateListeners = () => {
2557
+ this.removeStateListener(), this.stateListeners.clear();
2558
+ };
2559
+ stopContextWatchers = () => {
2560
+ this.contextWatchers.forEach((e) => e()), this.contextWatchers.clear();
2561
+ };
2562
+ stopDelayedEvents = () => {
2563
+ this.delayedEvents.forEach((e) => {
2564
+ e.forEach((e) => e());
2565
+ }), this.delayedEvents.clear();
2566
+ };
2567
+ stopActivities = (e) => {
2568
+ e ? (this.activityEvents.get(e)?.forEach((e) => e()), this.activityEvents.get(e)?.clear(), this.activityEvents.delete(e)) : (this.activityEvents.forEach((e) => {
2569
+ e.forEach((e) => e()), e.clear();
2570
+ }), this.activityEvents.clear());
2571
+ };
2572
+ sendChild = (e, t) => {
2573
+ let n = X(e), r = _n(t, this.contextSnapshot), i = this.children.get(r);
2574
+ if (!i) throw Error(`[@destyler/xstate] Cannot send '${n.type}' event to unknown child`);
2575
+ i.send(n);
2576
+ };
2577
+ stopChild = (e) => {
2578
+ if (!this.children.has(e)) throw Error(`[@destyler.xstate > stop-child] Cannot stop unknown child ${e}`);
2579
+ this.children.get(e).stop(), this.children.delete(e);
2580
+ };
2581
+ removeChild = (e) => {
2582
+ this.children.delete(e);
2583
+ };
2584
+ stopChildren = () => {
2585
+ this.children.forEach((e) => e.stop()), this.children.clear();
2586
+ };
2587
+ setParent = (e) => {
2588
+ this.parent = e;
2589
+ };
2590
+ spawn = (e, t) => {
2591
+ let n = _n(e);
2592
+ return t && (n.id = t), n.type = _a.Actor, n.setParent(this), this.children.set(n.id, K(n)), n.onDone(() => {
2593
+ this.removeChild(n.id);
2594
+ }).start(), K(ca(n));
2595
+ };
2596
+ stopActivity = (e) => {
2597
+ if (!this.state.value) return;
2598
+ let t = this.activityEvents.get(this.state.value);
2599
+ t?.get(e)?.(), t?.delete(e);
2600
+ };
2601
+ addActivityCleanup = (e, t, n) => {
2602
+ e && (this.activityEvents.has(e) ? this.activityEvents.get(e)?.set(t, n) : this.activityEvents.set(e, new Map([[t, n]])));
2603
+ };
2604
+ setState = (e) => {
2605
+ this.state.previousValue = this.state.value, this.state.value = e;
2606
+ let t = this.getStateNode(e);
2607
+ e == null ? gn(this.state.tags) : this.state.tags = da(t?.tags);
2608
+ };
2609
+ setContext = (e) => {
2610
+ e && ua(this.state.context, e);
2611
+ };
2612
+ setOptions = (e) => {
2613
+ let t = Rn(e);
2614
+ this.actionMap = {
2615
+ ...this.actionMap,
2616
+ ...t.actions
2617
+ }, this.delayMap = {
2618
+ ...this.delayMap,
2619
+ ...t.delays
2620
+ }, this.activityMap = {
2621
+ ...this.activityMap,
2622
+ ...t.activities
2623
+ }, this.guardMap = {
2624
+ ...this.guardMap,
2625
+ ...t.guards
2626
+ };
2627
+ };
2628
+ getStateNode = (e) => {
2629
+ if (e) return this.config.states?.[e];
2630
+ };
2631
+ getNextStateInfo = (e, t) => {
2632
+ let n = this.determineTransition(e, t), r = !n?.target, i = n?.target ?? this.state.value, a = this.state.value !== i, o = this.getStateNode(i), s = !r && !a && !n?.internal, c = {
2633
+ reenter: s,
2634
+ transition: n,
2635
+ stateNode: o,
2636
+ target: i,
2637
+ changed: a
2638
+ };
2639
+ return this.log("NextState:", `[${t.type}]`, this.state.value, "---->", c.target), c;
2640
+ };
2641
+ getAfterActions = (e, t) => {
2642
+ let n, r = this.state.value;
2643
+ return {
2644
+ entry: () => {
2645
+ n = globalThis.setTimeout(() => {
2646
+ let t = this.getNextStateInfo(e, this.state.event);
2647
+ this.performStateChangeEffects(r, t, this.state.event);
2648
+ }, t);
2649
+ },
2650
+ exit: () => {
2651
+ globalThis.clearTimeout(n);
2652
+ }
2653
+ };
2654
+ };
2655
+ getDelayedEventActions = (e) => {
2656
+ let t = this.getStateNode(e), n = this.state.event;
2657
+ if (!t || !t.after) return;
2658
+ let r = [], i = [];
2659
+ if (xn(t.after)) {
2660
+ let e = this.determineTransition(t.after, n);
2661
+ if (!e) return;
2662
+ if (!Dn(e, "delay")) throw Error(`[@destyler/xstate > after] Delay is required for after transition: ${JSON.stringify(e)}`);
2663
+ let a = ya(e.delay, this.delayMap), o = a(this.contextSnapshot, n), s = this.getAfterActions(e, o);
2664
+ return r.push(s.entry), i.push(s.exit), {
2665
+ entries: r,
2666
+ exits: i
2667
+ };
2668
+ }
2669
+ if (Cn(t.after)) for (let e in t.after) {
2670
+ let a = t.after[e], o = ya(e, this.delayMap), s = o(this.contextSnapshot, n), c = this.getAfterActions(a, s);
2671
+ r.push(c.entry), i.push(c.exit);
2672
+ }
2673
+ return {
2674
+ entries: r,
2675
+ exits: i
2676
+ };
2677
+ };
2678
+ get self() {
2679
+ let e = this;
2680
+ return {
2681
+ id: this.id,
2682
+ send: this.send.bind(this),
2683
+ sendParent: this.sendParent.bind(this),
2684
+ sendChild: this.sendChild.bind(this),
2685
+ stop: this.stop.bind(this),
2686
+ stopChild: this.stopChild.bind(this),
2687
+ spawn: this.spawn.bind(this),
2688
+ stopActivity: this.stopActivity.bind(this),
2689
+ get state() {
2690
+ return e.stateSnapshot;
2691
+ },
2692
+ get initialContext() {
2693
+ return e.initialContext;
2694
+ },
2695
+ get initialState() {
2696
+ return e.initialState?.target ?? "";
2697
+ }
2698
+ };
2699
+ }
2700
+ get meta() {
2701
+ return {
2702
+ state: this.stateSnapshot,
2703
+ guards: this.guardMap,
2704
+ send: this.send.bind(this),
2705
+ self: this.self,
2706
+ initialContext: this.initialContext,
2707
+ initialState: this.initialState?.target ?? "",
2708
+ getState: () => this.stateSnapshot,
2709
+ getAction: (e) => this.actionMap[e],
2710
+ getGuard: (e) => this.guardMap[e]
2711
+ };
2712
+ }
2713
+ get guardMeta() {
2714
+ return { state: this.stateSnapshot };
2715
+ }
2716
+ executeActions = (e, t) => {
2717
+ let n = ha(e, this.guardMap)(this.contextSnapshot, t, this.guardMeta);
2718
+ for (let e of da(n)) {
2719
+ let n = q(e) ? this.actionMap?.[e] : e;
2720
+ q(e) && !n && console.warn(`[@destyler/xstate > execute-actions] No implementation found for action: \`${e}\``), n?.(this.state.context, t, this.meta);
2721
+ }
2722
+ };
2723
+ executeActivities = (e, t, n) => {
2724
+ for (let r of t) {
2725
+ let t = q(r) ? this.activityMap?.[r] : r;
2726
+ if (!t) {
2727
+ console.warn(`[@destyler/xstate > execute-activity] No implementation found for activity: \`${r}\``);
2728
+ continue;
2729
+ }
2730
+ let i = t(this.state.context, e, this.meta);
2731
+ if (i) {
2732
+ let e = q(r) ? r : r.name || bn();
2733
+ this.addActivityCleanup(n ?? this.state.value, e, i);
2734
+ }
2735
+ }
2736
+ };
2737
+ createEveryActivities = (e, t) => {
2738
+ if (e) if (xn(e)) {
2739
+ let n = da(e).find((e) => {
2740
+ let t = e.delay, n = ya(t, this.delayMap), r = n(this.contextSnapshot, this.state.event), i = ma(e.guard, this.guardMap), a = i(this.contextSnapshot, this.state.event, this.guardMeta);
2741
+ return a ?? r != null;
2742
+ });
2743
+ if (!n) return;
2744
+ let r = ya(n.delay, this.delayMap), i = r(this.contextSnapshot, this.state.event), a = () => {
2745
+ let e = globalThis.setInterval(() => {
2746
+ this.executeActions(n.actions, this.state.event);
2747
+ }, i);
2748
+ return () => {
2749
+ globalThis.clearInterval(e);
2750
+ };
2751
+ };
2752
+ t(a);
2753
+ } else for (let n in e) {
2754
+ let r = e?.[n], i = ya(n, this.delayMap), a = i(this.contextSnapshot, this.state.event), o = () => {
2755
+ let e = globalThis.setInterval(() => {
2756
+ this.executeActions(r, this.state.event);
2757
+ }, a);
2758
+ return () => {
2759
+ globalThis.clearInterval(e);
2760
+ };
2761
+ };
2762
+ t(o);
2763
+ }
2764
+ };
2765
+ setEvent = (e) => {
2766
+ this.state.previousEvent = this.state.event, this.state.event = ca(X(e));
2767
+ };
2768
+ performExitEffects = (e, t) => {
2769
+ let n = this.state.value;
2770
+ if (n === "") return;
2771
+ let r = e ? this.getStateNode(e) : void 0;
2772
+ this.stopActivities(n);
2773
+ let i = ha(r?.exit, this.guardMap)(this.contextSnapshot, t, this.guardMeta), a = da(i), o = this.delayedEvents.get(n);
2774
+ o && a.push(...o), this.executeActions(a, t), this.delayedEvents.delete(n);
2775
+ };
2776
+ performEntryEffects = (e, t) => {
2777
+ let n = this.getStateNode(e), r = da(n?.activities);
2778
+ this.createEveryActivities(n?.every, (e) => {
2779
+ r.unshift(e);
2780
+ }), r.length > 0 && this.executeActivities(t, r);
2781
+ let i = ha(n?.entry, this.guardMap)(this.contextSnapshot, t, this.guardMeta), a = da(i), o = this.getDelayedEventActions(e);
2782
+ n?.after && o && (this.delayedEvents.set(e, o?.exits), a.push(...o.entries)), this.executeActions(a, t), n?.type === "final" && (this.state.done = !0, this.doneListeners.forEach((e) => {
2783
+ e(this.stateSnapshot);
2784
+ }), this.stop());
2785
+ };
2786
+ performTransitionEffects = (e, t) => {
2787
+ let n = this.determineTransition(e, t);
2788
+ this.executeActions(n?.actions, t);
2789
+ };
2790
+ performStateChangeEffects = (e, t, n) => {
2791
+ this.setEvent(n);
2792
+ let r = t.changed || t.reenter;
2793
+ r && this.performExitEffects(e, n), this.performTransitionEffects(t.transition, n), this.setState(t.target), r && this.performEntryEffects(t.target, n);
2794
+ };
2795
+ determineTransition = (e, t) => {
2796
+ let n = xa(e, this.guardMap);
2797
+ return n?.(this.contextSnapshot, t, this.guardMeta);
2798
+ };
2799
+ sendParent = (e) => {
2800
+ if (!this.parent) throw Error("[@destyler/xstate > send-parent] Cannot send event to parent machine, no parent is set. Use `machine.spawn()` to spawn a child machine.");
2801
+ let t = X(e);
2802
+ this.parent?.send(t);
2803
+ };
2804
+ log = (...e) => {
2805
+ this.options.debug && console.log(...e);
2806
+ };
2807
+ send = (e) => {
2808
+ let t = X(e);
2809
+ this.transition(this.state.value, t);
2810
+ };
2811
+ transition = (e, t) => {
2812
+ let n = q(e) ? this.getStateNode(e) : e?.stateNode, r = X(t);
2813
+ if (!n && !this.config.on) {
2814
+ let t = this.status === ga.Stopped ? "[@destyler/xstate > transition] Cannot transition a stopped machine" : `[destyler/xstate > transition] State does not have a definition for \`state\`: ${e}, \`event\`: ${r.type}`;
2815
+ console.warn(t);
2816
+ return;
2817
+ }
2818
+ let i = n?.on?.[r.type] ?? this.config.on?.[r.type], a = this.getNextStateInfo(i, r);
2819
+ return this.performStateChangeEffects(this.state.value, a, r), a.stateNode;
2820
+ };
2821
+ subscribe = (e) => (this.stateListeners.add(e), this.status === ga.Running && e(this.stateSnapshot), () => {
2822
+ this.stateListeners.delete(e);
2823
+ });
2824
+ onDone = (e) => (this.doneListeners.add(e), this);
2825
+ onTransition = (e) => (this.stateListeners.add(e), this.status === ga.Running && e(this.stateSnapshot), this);
2826
+ get [Symbol.toStringTag]() {
2827
+ return "Machine";
2828
+ }
2829
+ getHydrationState() {
2830
+ let e = this.getState();
2831
+ return {
2832
+ value: e.value,
2833
+ tags: e.tags
2834
+ };
2835
+ }
2836
+ };
2837
+ function Ca(e, t) {
2838
+ return new Sa(e, t);
2839
+ }
2840
+ function wa() {
2841
+ return (e) => Array.from(new Set(e));
2842
+ }
2843
+ function Ta(e) {
2844
+ return new Proxy({}, { get() {
2845
+ return e;
2846
+ } });
2847
+ }
2848
+ const Ea = mt("popover").parts("arrow", "arrowTip", "anchor", "trigger", "indicator", "positioner", "content", "title", "description", "closeTrigger"), Q = Ea.build(), $ = un({
2849
+ getAnchorId: (e) => e.ids?.anchor ?? `popover:${e.id}:anchor`,
2850
+ getTriggerId: (e) => e.ids?.trigger ?? `popover:${e.id}:trigger`,
2851
+ getContentId: (e) => e.ids?.content ?? `popover:${e.id}:content`,
2852
+ getPositionerId: (e) => e.ids?.positioner ?? `popover:${e.id}:popper`,
2853
+ getArrowId: (e) => e.ids?.arrow ?? `popover:${e.id}:arrow`,
2854
+ getTitleId: (e) => e.ids?.title ?? `popover:${e.id}:title`,
2855
+ getDescriptionId: (e) => e.ids?.description ?? `popover:${e.id}:desc`,
2856
+ getCloseTriggerId: (e) => e.ids?.closeTrigger ?? `popover:${e.id}:close`,
2857
+ getAnchorEl: (e) => $.getById(e, $.getAnchorId(e)),
2858
+ getTriggerEl: (e) => $.getById(e, $.getTriggerId(e)),
2859
+ getContentEl: (e) => $.getById(e, $.getContentId(e)),
2860
+ getPositionerEl: (e) => $.getById(e, $.getPositionerId(e)),
2861
+ getTitleEl: (e) => $.getById(e, $.getTitleId(e)),
2862
+ getDescriptionEl: (e) => $.getById(e, $.getDescriptionId(e)),
2863
+ getFocusableEls: (e) => Zt($.getContentEl(e)),
2864
+ getFirstFocusableEl: (e) => $.getFocusableEls(e)[0]
2865
+ });
2866
+ function Da(e, t, n) {
2867
+ let r = e.matches("open"), i = e.context.currentPlacement, a = e.context.currentPortalled, o = e.context.renderedElements, s = qr({
2868
+ ...e.context.positioning,
2869
+ placement: i
2870
+ });
2871
+ return {
2872
+ portalled: a,
2873
+ open: r,
2874
+ setOpen(e) {
2875
+ e !== r && t(e ? "OPEN" : "CLOSE");
2876
+ },
2877
+ reposition(e = {}) {
2878
+ t({
2879
+ type: "POSITIONING.SET",
2880
+ options: e
2881
+ });
2882
+ },
2883
+ getArrowProps() {
2884
+ return n.element({
2885
+ id: $.getArrowId(e.context),
2886
+ ...Q.arrow.attrs,
2887
+ dir: e.context.dir,
2888
+ style: s.arrow
2889
+ });
2890
+ },
2891
+ getArrowTipProps() {
2892
+ return n.element({
2893
+ ...Q.arrowTip.attrs,
2894
+ dir: e.context.dir,
2895
+ style: s.arrowTip
2896
+ });
2897
+ },
2898
+ getAnchorProps() {
2899
+ return n.element({
2900
+ ...Q.anchor.attrs,
2901
+ dir: e.context.dir,
2902
+ id: $.getAnchorId(e.context)
2903
+ });
2904
+ },
2905
+ getTriggerProps() {
2906
+ return n.button({
2907
+ ...Q.trigger.attrs,
2908
+ dir: e.context.dir,
2909
+ type: "button",
2910
+ "data-placement": i,
2911
+ id: $.getTriggerId(e.context),
2912
+ "aria-haspopup": "dialog",
2913
+ "aria-expanded": r,
2914
+ "data-state": r ? "open" : "closed",
2915
+ "aria-controls": $.getContentId(e.context),
2916
+ onPointerDown(e) {
2917
+ Bt() && e.currentTarget.focus();
2918
+ },
2919
+ onClick(e) {
2920
+ e.defaultPrevented || t("TOGGLE");
2921
+ },
2922
+ onBlur(e) {
2923
+ t({
2924
+ type: "TRIGGER_BLUR",
2925
+ target: e.relatedTarget
2926
+ });
2927
+ }
2928
+ });
2929
+ },
2930
+ getIndicatorProps() {
2931
+ return n.element({
2932
+ ...Q.indicator.attrs,
2933
+ dir: e.context.dir,
2934
+ "data-state": r ? "open" : "closed"
2935
+ });
2936
+ },
2937
+ getPositionerProps() {
2938
+ return n.element({
2939
+ id: $.getPositionerId(e.context),
2940
+ ...Q.positioner.attrs,
2941
+ dir: e.context.dir,
2942
+ style: s.floating
2943
+ });
2944
+ },
2945
+ getContentProps() {
2946
+ return n.element({
2947
+ ...Q.content.attrs,
2948
+ dir: e.context.dir,
2949
+ id: $.getContentId(e.context),
2950
+ tabIndex: -1,
2951
+ role: "dialog",
2952
+ hidden: !r,
2953
+ "data-state": r ? "open" : "closed",
2954
+ "data-expanded": gt(r),
2955
+ "aria-labelledby": o.title ? $.getTitleId(e.context) : void 0,
2956
+ "aria-describedby": o.description ? $.getDescriptionId(e.context) : void 0,
2957
+ "data-placement": i
2958
+ });
2959
+ },
2960
+ getTitleProps() {
2961
+ return n.element({
2962
+ ...Q.title.attrs,
2963
+ id: $.getTitleId(e.context),
2964
+ dir: e.context.dir
2965
+ });
2966
+ },
2967
+ getDescriptionProps() {
2968
+ return n.element({
2969
+ ...Q.description.attrs,
2970
+ id: $.getDescriptionId(e.context),
2971
+ dir: e.context.dir
2972
+ });
2973
+ },
2974
+ getCloseTriggerProps() {
2975
+ return n.button({
2976
+ ...Q.closeTrigger.attrs,
2977
+ dir: e.context.dir,
2978
+ id: $.getCloseTriggerId(e.context),
2979
+ type: "button",
2980
+ "aria-label": "close",
2981
+ onClick(e) {
2982
+ e.defaultPrevented || t("CLOSE");
2983
+ }
2984
+ });
2985
+ }
2986
+ };
2987
+ }
2988
+ function Oa(e) {
2989
+ let t = Rn(e);
2990
+ return Ca({
2991
+ id: "popover",
2992
+ initial: t.open ? "open" : "closed",
2993
+ context: {
2994
+ closeOnInteractOutside: !0,
2995
+ closeOnEscape: !0,
2996
+ autoFocus: !0,
2997
+ modal: !1,
2998
+ portalled: !0,
2999
+ positioning: {
3000
+ placement: "bottom",
3001
+ ...t.positioning
3002
+ },
3003
+ currentPlacement: void 0,
3004
+ ...t,
3005
+ renderedElements: {
3006
+ title: !0,
3007
+ description: !0
3008
+ }
3009
+ },
3010
+ computed: { currentPortalled: (e) => !!e.modal || !!e.portalled },
3011
+ watch: { open: ["toggleVisibility"] },
3012
+ entry: ["checkRenderedElements"],
3013
+ states: {
3014
+ closed: { on: {
3015
+ "CONTROLLED.OPEN": {
3016
+ target: "open",
3017
+ actions: ["setInitialFocus"]
3018
+ },
3019
+ TOGGLE: [{
3020
+ guard: "isOpenControlled",
3021
+ actions: ["invokeOnOpen"]
3022
+ }, {
3023
+ target: "open",
3024
+ actions: ["invokeOnOpen", "setInitialFocus"]
3025
+ }],
3026
+ OPEN: [{
3027
+ guard: "isOpenControlled",
3028
+ actions: ["invokeOnOpen"]
3029
+ }, {
3030
+ target: "open",
3031
+ actions: ["invokeOnOpen", "setInitialFocus"]
3032
+ }]
3033
+ } },
3034
+ open: {
3035
+ activities: [
3036
+ "trapFocus",
3037
+ "preventScroll",
3038
+ "hideContentBelow",
3039
+ "trackPositioning",
3040
+ "trackDismissableElement",
3041
+ "proxyTabFocus"
3042
+ ],
3043
+ on: {
3044
+ "CONTROLLED.CLOSE": {
3045
+ target: "closed",
3046
+ actions: ["setFinalFocus"]
3047
+ },
3048
+ CLOSE: [{
3049
+ guard: "isOpenControlled",
3050
+ actions: ["invokeOnClose"]
3051
+ }, {
3052
+ target: "closed",
3053
+ actions: ["invokeOnClose", "setFinalFocus"]
3054
+ }],
3055
+ TOGGLE: [{
3056
+ guard: "isOpenControlled",
3057
+ actions: ["invokeOnClose"]
3058
+ }, {
3059
+ target: "closed",
3060
+ actions: ["invokeOnClose"]
3061
+ }],
3062
+ "POSITIONING.SET": { actions: "reposition" }
3063
+ }
3064
+ }
3065
+ }
3066
+ }, {
3067
+ guards: { isOpenControlled: (e) => !!e["open.controlled"] },
3068
+ activities: {
3069
+ trackPositioning(e) {
3070
+ e.currentPlacement = e.positioning.placement;
3071
+ let t = $.getAnchorEl(e) ?? $.getTriggerEl(e), n = () => $.getPositionerEl(e);
3072
+ return Gr(t, n, {
3073
+ ...e.positioning,
3074
+ defer: !0,
3075
+ onComplete(t) {
3076
+ e.currentPlacement = t.placement;
3077
+ }
3078
+ });
3079
+ },
3080
+ trackDismissableElement(e, t, { send: n }) {
3081
+ let r = () => $.getContentEl(e), i = !0;
3082
+ return wi(r, {
3083
+ pointerBlocking: e.modal,
3084
+ exclude: $.getTriggerEl(e),
3085
+ defer: !0,
3086
+ onEscapeKeyDown(t) {
3087
+ e.onEscapeKeyDown?.(t), !e.closeOnEscape && t.preventDefault();
3088
+ },
3089
+ onInteractOutside(t) {
3090
+ e.onInteractOutside?.(t), !t.defaultPrevented && (i = !(t.detail.focusable || t.detail.contextmenu), e.closeOnInteractOutside || t.preventDefault());
3091
+ },
3092
+ onPointerDownOutside: e.onPointerDownOutside,
3093
+ onFocusOutside: e.onFocusOutside,
3094
+ persistentElements: e.persistentElements,
3095
+ onDismiss() {
3096
+ n({
3097
+ type: "CLOSE",
3098
+ src: "interact-outside",
3099
+ restoreFocus: i
3100
+ });
3101
+ }
3102
+ });
3103
+ },
3104
+ proxyTabFocus(e) {
3105
+ if (e.modal || !e.portalled) return;
3106
+ let t = () => $.getContentEl(e);
3107
+ return ln(t, {
3108
+ triggerElement: $.getTriggerEl(e),
3109
+ defer: !0,
3110
+ onFocus(e) {
3111
+ e.focus({ preventScroll: !0 });
3112
+ }
3113
+ });
3114
+ },
3115
+ hideContentBelow(e) {
3116
+ if (!e.modal) return;
3117
+ let t = () => [$.getContentEl(e), $.getTriggerEl(e)];
3118
+ return ai(t, { defer: !0 });
3119
+ },
3120
+ preventScroll(e) {
3121
+ if (e.modal) return Ri($.getDoc(e));
3122
+ },
3123
+ trapFocus(e) {
3124
+ if (!e.modal) return;
3125
+ let t = () => $.getContentEl(e);
3126
+ return Ni(t, { initialFocus: () => rn({
3127
+ root: $.getContentEl(e),
3128
+ getInitialEl: e.initialFocusEl,
3129
+ enabled: e.autoFocus
3130
+ }) });
3131
+ }
3132
+ },
3133
+ actions: {
3134
+ reposition(e, t) {
3135
+ let n = $.getAnchorEl(e) ?? $.getTriggerEl(e), r = () => $.getPositionerEl(e);
3136
+ Gr(n, r, {
3137
+ ...e.positioning,
3138
+ ...t.options,
3139
+ defer: !0,
3140
+ listeners: !1,
3141
+ onComplete(t) {
3142
+ e.currentPlacement = t.placement;
3143
+ }
3144
+ });
3145
+ },
3146
+ checkRenderedElements(e) {
3147
+ G(() => {
3148
+ Object.assign(e.renderedElements, {
3149
+ title: !!$.getTitleEl(e),
3150
+ description: !!$.getDescriptionEl(e)
3151
+ });
3152
+ });
3153
+ },
3154
+ setInitialFocus(e) {
3155
+ e.modal || G(() => {
3156
+ let t = rn({
3157
+ root: $.getContentEl(e),
3158
+ getInitialEl: e.initialFocusEl,
3159
+ enabled: e.autoFocus
3160
+ });
3161
+ t?.focus({ preventScroll: !0 });
3162
+ });
3163
+ },
3164
+ setFinalFocus(e, t) {
3165
+ let n = t.restoreFocus ?? t.previousEvent?.restoreFocus;
3166
+ n != null && !n || G(() => {
3167
+ let t = $.getTriggerEl(e);
3168
+ t?.focus({ preventScroll: !0 });
3169
+ });
3170
+ },
3171
+ invokeOnOpen(e) {
3172
+ e.onOpenChange?.({ open: !0 });
3173
+ },
3174
+ invokeOnClose(e) {
3175
+ e.onOpenChange?.({ open: !1 });
3176
+ },
3177
+ toggleVisibility(e, t, { send: n }) {
3178
+ n({
3179
+ type: e.open ? "CONTROLLED.OPEN" : "CONTROLLED.CLOSE",
3180
+ previousEvent: t
3181
+ });
3182
+ }
3183
+ }
3184
+ });
3185
+ }
3186
+ const ka = wa()([
3187
+ "autoFocus",
3188
+ "closeOnEscape",
3189
+ "closeOnInteractOutside",
3190
+ "dir",
3191
+ "getRootNode",
3192
+ "id",
3193
+ "ids",
3194
+ "initialFocusEl",
3195
+ "modal",
3196
+ "onEscapeKeyDown",
3197
+ "onFocusOutside",
3198
+ "onInteractOutside",
3199
+ "onOpenChange",
3200
+ "onPointerDownOutside",
3201
+ "open.controlled",
3202
+ "open",
3203
+ "persistentElements",
3204
+ "portalled",
3205
+ "positioning"
3206
+ ]);
3207
+ Vn(ka);
3208
+ function Aa(e, t) {
3209
+ let { actions: n, context: r } = t ?? {}, i = b(e.state), a = oa(e.state, () => {
3210
+ i.value = sa(e.state);
3211
+ });
3212
+ return g(() => {
3213
+ a?.();
3214
+ }), T(() => {
3215
+ e.setOptions({ actions: n });
3216
+ }), r && w(r, (t) => {
3217
+ e.setContext(x(t));
3218
+ }, { deep: !0 }), i;
3219
+ }
3220
+ function ja(e, t) {
3221
+ let { state: n, context: r } = t ?? {}, i = typeof e == "function" ? e() : e;
3222
+ return r && i.setContext(x(r)), i._created(), h(() => {
3223
+ i.start(n), m(() => {
3224
+ i.stop();
3225
+ });
3226
+ }), i;
3227
+ }
3228
+ function Ma(e, t) {
3229
+ let n = ja(e, t), r = Aa(n, t);
3230
+ return [
3231
+ r,
3232
+ n.send,
3233
+ n
3234
+ ];
3235
+ }
3236
+ function Na(e) {
3237
+ return e.charAt(0).toUpperCase() + e.substr(1).toLowerCase();
3238
+ }
3239
+ const Pa = {
3240
+ htmlFor: "for",
3241
+ className: "class",
3242
+ onDoubleClick: "onDblclick",
3243
+ onChange: "onInput",
3244
+ onFocus: "onFocusin",
3245
+ onBlur: "onFocusout",
3246
+ defaultValue: "value",
3247
+ defaultChecked: "checked"
3248
+ };
3249
+ function Fa(e) {
3250
+ return e in Pa ? Pa[e] : e.startsWith("on") ? `on${Na(e.substr(2))}` : e.toLowerCase();
3251
+ }
3252
+ const Ia = Ta((e) => {
3253
+ let t = {};
3254
+ for (let n in e) {
3255
+ let r = e[n];
3256
+ n === "children" ? typeof r == "string" && (t.innerHTML = r) : t[Fa(n)] = e[n];
3257
+ }
3258
+ return t;
3259
+ }), La = {
3260
+ key: 0,
3261
+ xmlns: "http://www.w3.org/2000/svg",
3262
+ width: "1em",
3263
+ height: "1em",
3264
+ viewBox: "0 0 16 16"
3265
+ }, Ra = {
3266
+ key: 1,
3267
+ xmlns: "http://www.w3.org/2000/svg",
3268
+ width: "1em",
3269
+ height: "1em",
3270
+ viewBox: "0 0 16 16"
3271
+ };
3272
+ var za = /* @__PURE__ */ l({
3273
+ name: "ComponentIcones",
3274
+ __name: "ComponentsIcones",
3275
+ props: { expanded: {
3276
+ type: Boolean,
3277
+ default: !1
3278
+ } },
3279
+ setup(e) {
3280
+ let t = e;
3281
+ return (e, n) => t.expanded ? (_(), o("svg", La, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[0] ||= s("g", {
3282
+ fill: "none",
3283
+ "stroke-linecap": "round",
3284
+ "stroke-linejoin": "round"
3285
+ }, [s("path", {
3286
+ stroke: "#000",
3287
+ d: "m1.87 8l.7-2.74a1 1 0 0 1 .96-.76h10.94a1 1 0 0 1 .97 1.24l-.219.875M6 13.5H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3288
+ }), s("path", {
3289
+ stroke: "#67B686",
3290
+ d: "m9.485 9.516l3.968 3.968m-3.968 0l3.968-3.968m-1.634-1.874l3.507 3.507a.496.496 0 0 1 0 .702l-3.507 3.507a.496.496 0 0 1-.701 0L7.61 11.85a.496.496 0 0 1 0-.702l3.507-3.507a.496.496 0 0 1 .701 0z"
3291
+ })], -1)])) : (_(), o("svg", Ra, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[1] ||= s("g", {
3292
+ fill: "none",
3293
+ "stroke-linecap": "round",
3294
+ "stroke-linejoin": "round"
3295
+ }, [s("path", {
3296
+ stroke: "#000",
3297
+ d: "M4.5 4.5H12c.83 0 1.5.67 1.5 1.5v.5m-7.5 7H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3298
+ }), s("path", {
3299
+ stroke: "#67B686",
3300
+ d: "m9.485 9.516l3.968 3.968m-3.968 0l3.968-3.968m-1.634-1.874l3.507 3.507a.496.496 0 0 1 0 .702l-3.507 3.507a.496.496 0 0 1-.701 0L7.61 11.85a.496.496 0 0 1 0-.702l3.507-3.507a.496.496 0 0 1 .701 0z"
3301
+ })], -1)]));
3302
+ }
3303
+ }), Ba = za;
3304
+ const Va = {
3305
+ key: 0,
3306
+ xmlns: "http://www.w3.org/2000/svg",
3307
+ width: "1em",
3308
+ height: "1em",
3309
+ viewBox: "0 0 16 16"
3310
+ }, Ha = {
3311
+ key: 1,
3312
+ xmlns: "http://www.w3.org/2000/svg",
3313
+ width: "1em",
3314
+ height: "1em",
3315
+ viewBox: "0 0 16 16"
3316
+ };
3317
+ var Ua = /* @__PURE__ */ l({
3318
+ name: "FolderIcones",
3319
+ __name: "FolderIcones",
3320
+ props: { expanded: {
3321
+ type: Boolean,
3322
+ default: !1
3323
+ } },
3324
+ setup(e) {
3325
+ let t = e;
3326
+ return (e, n) => t.expanded ? (_(), o("svg", Va, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[0] ||= s("path", {
3327
+ fill: "none",
3328
+ stroke: "#000",
3329
+ "stroke-linecap": "round",
3330
+ "stroke-linejoin": "round",
3331
+ d: "m1.87 8l.7-2.74a1 1 0 0 1 .96-.76h10.94a1 1 0 0 1 .97 1.24l-1.75 7a1 1 0 0 1-.97.76H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3332
+ }, null, -1)])) : (_(), o("svg", Ha, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[1] ||= s("path", {
3333
+ fill: "none",
3334
+ stroke: "#000",
3335
+ "stroke-linecap": "round",
3336
+ "stroke-linejoin": "round",
3337
+ d: "M4.5 4.5H12c.83 0 1.5.67 1.5 1.5v6c0 .83-.67 1.5-1.5 1.5H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3338
+ }, null, -1)]));
3339
+ }
3340
+ }), Wa = Ua;
3341
+ const Ga = {
3342
+ key: 0,
3343
+ xmlns: "http://www.w3.org/2000/svg",
3344
+ width: "1em",
3345
+ height: "1em",
3346
+ viewBox: "0 0 16 16"
3347
+ }, Ka = {
3348
+ key: 1,
3349
+ xmlns: "http://www.w3.org/2000/svg",
3350
+ width: "1em",
3351
+ height: "1em",
3352
+ viewBox: "0 0 16 16"
3353
+ };
3354
+ var qa = /* @__PURE__ */ l({
3355
+ name: "ModleIcones",
3356
+ __name: "ModuleIcones",
3357
+ props: { expanded: {
3358
+ type: Boolean,
3359
+ default: !1
3360
+ } },
3361
+ setup(e) {
3362
+ let t = e;
3363
+ return (e, n) => t.expanded ? (_(), o("svg", Ga, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[0] ||= s("g", {
3364
+ fill: "none",
3365
+ "stroke-linecap": "round",
3366
+ "stroke-linejoin": "round"
3367
+ }, [s("path", {
3368
+ stroke: "#000",
3369
+ d: "m1.875 8l.686-2.743a1 1 0 0 1 .97-.757h10.938a1 1 0 0 1 .97 1.243l-.315 1.26M6 13.5H2.004A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3370
+ }), s("path", {
3371
+ stroke: "#65bb87",
3372
+ d: "M15.5 13.5v1.2a.8.8 0 0 1-.8.8h-4.4a.8.8 0 0 1-.8-.8v-1.2H9a1 1 0 0 1 0-2h.5v-1.2a.8.8 0 0 1 .8-.8h1.2V9a1 1 0 0 1 2 0v.5h1.2a.8.8 0 0 1 .8.8v1.2H15a1 1 0 0 0 0 2z"
3373
+ })], -1)])) : (_(), o("svg", Ka, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[1] ||= s("g", {
3374
+ fill: "none",
3375
+ "stroke-linecap": "round",
3376
+ "stroke-linejoin": "round"
3377
+ }, [s("path", {
3378
+ stroke: "#000",
3379
+ d: "M4.5 4.5H12A1.5 1.5 0 0 1 13.5 6v.5m-7.5 7H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3380
+ }), s("path", {
3381
+ stroke: "#65bb87",
3382
+ d: "M15.5 13.5v1.2a.8.8 0 0 1-.8.8h-4.4a.8.8 0 0 1-.8-.8v-1.2H9a1 1 0 0 1 0-2h.5v-1.2a.8.8 0 0 1 .8-.8h1.2V9a1 1 0 0 1 2 0v.5h1.2a.8.8 0 0 1 .8.8v1.2H15a1 1 0 0 0 0 2z"
3383
+ })], -1)]));
3384
+ }
3385
+ }), Ja = qa;
3386
+ const Ya = {
3387
+ key: 0,
3388
+ xmlns: "http://www.w3.org/2000/svg",
3389
+ width: "1em",
3390
+ height: "1em",
3391
+ viewBox: "0 0 16 16"
3392
+ }, Xa = {
3393
+ key: 1,
3394
+ xmlns: "http://www.w3.org/2000/svg",
3395
+ width: "1em",
3396
+ height: "1em",
3397
+ viewBox: "0 0 16 16"
3398
+ };
3399
+ var Za = /* @__PURE__ */ l({
3400
+ name: "PackagesIcones",
3401
+ __name: "PackagesIcones",
3402
+ props: { expanded: {
3403
+ type: Boolean,
3404
+ default: !1
3405
+ } },
3406
+ setup(e) {
3407
+ let t = e;
3408
+ return (e, n) => t.expanded ? (_(), o("svg", Ya, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[0] ||= s("g", {
3409
+ fill: "none",
3410
+ "stroke-linecap": "round",
3411
+ "stroke-linejoin": "round"
3412
+ }, [s("path", {
3413
+ stroke: "#000",
3414
+ d: "m1.875 8l.686-2.743a1 1 0 0 1 .97-.757h10.938a1 1 0 0 1 .97 1.243l-.315 1.26M6 13.5H2.004A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3415
+ }), s("path", {
3416
+ stroke: "#E23730",
3417
+ d: "M12 15.337v-3.919L8.5 9.214m3.5 2.204l3.5-2.204M12 7.5l3.5 1.714v4.408L12 15.5l-3.5-1.878V9.214Z"
3418
+ })], -1)])) : (_(), o("svg", Xa, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[1] ||= s("g", {
3419
+ fill: "none",
3420
+ "stroke-linecap": "round",
3421
+ "stroke-linejoin": "round"
3422
+ }, [s("path", {
3423
+ stroke: "#000",
3424
+ d: "M4.5 4.5H12A1.5 1.5 0 0 1 13.5 6v.5m-7.5 7H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3425
+ }), s("path", {
3426
+ stroke: "#E23730",
3427
+ d: "M12 15.337v-3.919L8.5 9.214m3.5 2.204l3.5-2.204M12 7.5l3.5 1.714v4.408L12 15.5l-3.5-1.878V9.214Z"
3428
+ })], -1)]));
3429
+ }
3430
+ }), Qa = Za;
3431
+ const $a = {
3432
+ key: 0,
3433
+ xmlns: "http://www.w3.org/2000/svg",
3434
+ width: "1em",
3435
+ height: "1em",
3436
+ viewBox: "0 0 16 16"
3437
+ }, eo = {
3438
+ key: 1,
3439
+ xmlns: "http://www.w3.org/2000/svg",
3440
+ width: "1em",
3441
+ height: "1em",
3442
+ viewBox: "0 0 16 16"
3443
+ };
3444
+ var to = /* @__PURE__ */ l({
3445
+ name: "SrcIcones",
3446
+ __name: "SrcIcones",
3447
+ props: { expanded: {
3448
+ type: Boolean,
3449
+ default: !1
3450
+ } },
3451
+ setup(e) {
3452
+ let t = e;
3453
+ return (e, n) => t.expanded ? (_(), o("svg", $a, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[0] ||= s("g", {
3454
+ fill: "none",
3455
+ "stroke-linecap": "round",
3456
+ "stroke-linejoin": "round"
3457
+ }, [s("path", {
3458
+ stroke: "#000",
3459
+ d: "m1.875 8l.686-2.743a1 1 0 0 1 .97-.757h10.938a1 1 0 0 1 .97 1.243l-.315 1.26M6 13.5H2.004A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3460
+ }), s("path", {
3461
+ stroke: "#65bb87",
3462
+ d: "m10.5 8.5l-3 3.5l3 3.5m2-7l3 3.5l-3 3.5"
3463
+ })], -1)])) : (_(), o("svg", eo, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[1] ||= s("g", {
3464
+ fill: "none",
3465
+ "stroke-linecap": "round",
3466
+ "stroke-linejoin": "round"
3467
+ }, [s("path", {
3468
+ stroke: "#000",
3469
+ d: "M4.5 4.5H12A1.5 1.5 0 0 1 13.5 6v.5m-7.5 7H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3470
+ }), s("path", {
3471
+ stroke: "#65bb87",
3472
+ d: "m10.5 8.5l-3 3.5l3 3.5m2-7l3 3.5l-3 3.5"
3473
+ })], -1)]));
3474
+ }
3475
+ }), no = to;
3476
+ const ro = {
3477
+ key: 0,
3478
+ xmlns: "http://www.w3.org/2000/svg",
3479
+ width: "1em",
3480
+ height: "1em",
3481
+ viewBox: "0 0 16 16"
3482
+ }, io = {
3483
+ key: 1,
3484
+ xmlns: "http://www.w3.org/2000/svg",
3485
+ width: "1em",
3486
+ height: "1em",
3487
+ viewBox: "0 0 16 16"
3488
+ };
3489
+ var ao = /* @__PURE__ */ l({
3490
+ name: "ViewIcones",
3491
+ __name: "ViewIcones",
3492
+ props: { expanded: {
3493
+ type: Boolean,
3494
+ default: !1
3495
+ } },
3496
+ setup(e) {
3497
+ let t = e;
3498
+ return (e, n) => t.expanded ? (_(), o("svg", ro, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[0] ||= s("g", {
3499
+ fill: "none",
3500
+ "stroke-linecap": "round",
3501
+ "stroke-linejoin": "round"
3502
+ }, [s("path", {
3503
+ stroke: "#000",
3504
+ d: "m1.875 8l.686-2.743a1 1 0 0 1 .97-.757h10.938a1 1 0 0 1 .97 1.243l-.315 1.26M6 13.5H2.004A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3505
+ }), s("path", {
3506
+ stroke: "#E23730",
3507
+ d: "M14.692 8.5H9.308a.31.31 0 0 0-.307.336l.47 5.241c.01.128.1.235.223.27l2.303 1.153l2.308-1.153a.31.31 0 0 0 .225-.27L15 8.836a.31.31 0 0 0-.307-.336"
3508
+ })], -1)])) : (_(), o("svg", io, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[1] ||= s("g", {
3509
+ fill: "none",
3510
+ "stroke-linecap": "round",
3511
+ "stroke-linejoin": "round"
3512
+ }, [s("path", {
3513
+ stroke: "#000",
3514
+ d: "M4.5 4.5H12A1.5 1.5 0 0 1 13.5 6v.5m-7.5 7H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
3515
+ }), s("path", {
3516
+ stroke: "#E23730",
3517
+ d: "M14.692 8.5H9.308a.31.31 0 0 0-.307.336l.47 5.241c.01.128.1.235.223.27l2.303 1.153l2.308-1.153a.31.31 0 0 0 .225-.27L15 8.836a.31.31 0 0 0-.307-.336"
3518
+ })], -1)]));
3519
+ }
3520
+ }), oo = ao;
3521
+ const so = {
3522
+ xmlns: "http://www.w3.org/2000/svg",
3523
+ width: "1em",
3524
+ height: "1em",
3525
+ viewBox: "0 0 16 16"
3526
+ };
3527
+ var co = /* @__PURE__ */ l({
3528
+ name: "VueIcones",
3529
+ __name: "VueIcones",
3530
+ setup(e) {
3531
+ return (e, t) => (_(), o("svg", so, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), t[0] ||= s("g", {
3532
+ fill: "none",
3533
+ stroke: "#65bb87",
3534
+ "stroke-linecap": "round",
3535
+ "stroke-linejoin": "round"
3536
+ }, [s("path", { d: "M1 1.5h5.44L8 4.56L9.56 1.5H15l-6.99 13z" }), s("path", { d: "M12.05 1.73L8 9.28L3.95 1.73" })], -1)]));
3537
+ }
3538
+ }), lo = co;
3539
+ const uo = { class: "mt-0" }, fo = { class: "w-152 mb-2" }, po = { class: "inline-flex items-center text-inherit not-italic leading-[0] text-center normal-case [vertical-align:-0.125em] [text-rendering:optimizeLegibility] svg:size-4" }, mo = {
3540
+ key: 1,
3541
+ class: "flex items-center justify-center h-[220px]"
3542
+ };
3543
+ var ho = /* @__PURE__ */ l({
3544
+ name: "ComponentSelect",
3545
+ __name: "ComponentSelect",
3546
+ props: {
3547
+ modelValue: { default: "" },
3548
+ modelModifiers: {},
3549
+ scope: { default: "" },
3550
+ scopeModifiers: {}
3551
+ },
3552
+ emits: ["update:modelValue", "update:scope"],
3553
+ setup(l) {
3554
+ let m = re.PRESENTED_IMAGE_SIMPLE, h = e(), g = S(l, "modelValue"), y = S(l, "scope"), b = C("searchInputRef"), [T, ce] = Ma(Oa({
3555
+ id: ee(),
3556
+ initialFocusEl: () => b.value
3557
+ })), E = r(() => Da(T.value, ce, Ia)), D = v(!1), O = v(""), le = r(() => {
3558
+ if (!g.value) return [];
3559
+ let e = y.value ? `module:${y.value}` : "local";
3560
+ return [`${e}/${g.value}`];
3561
+ }), k = v([]);
3562
+ function ue(e) {
3563
+ return !e.includes("/");
3564
+ }
3565
+ function de(e) {
3566
+ let t = e.indexOf("/");
3567
+ return t === -1 ? e : e.slice(0, t);
3568
+ }
3569
+ function fe(e) {
3570
+ let t = e.split("/"), n = [], r = "";
3571
+ for (let e = 0; e < Math.max(0, t.length - 1); e++) {
3572
+ let i = t[e];
3573
+ r = e === 0 ? i : `${r}/${i}`, n.push(r);
3574
+ }
3575
+ return n;
3576
+ }
3577
+ function A(e, t) {
3578
+ let n = e || [], r = t?.node?.key, i = !!t?.expanded, a;
3579
+ a = r && ue(r) ? i ? r : void 0 : r ? de(r) : n.find(ue);
3580
+ let o = n.filter((e) => !ue(String(e)) || String(e) === a);
3581
+ k.value = o;
3582
+ }
3583
+ function j() {
3584
+ let e = le.value[0];
3585
+ if (!e) return;
3586
+ let t = fe(e);
3587
+ k.value = t;
3588
+ }
3589
+ w(le, () => {
3590
+ j();
3591
+ }, { immediate: !0 }), w(D, (e) => {
3592
+ e && j();
3593
+ }), w(D, (e) => {
3594
+ e && j();
3595
+ });
3596
+ let M = r(() => {
3597
+ let e = O.value.trim();
3598
+ return e ? h.filterRouteTree(e) : h.getRouteTreeData();
3599
+ });
3600
+ function pe(e) {
3601
+ let t = [], n = (e) => {
3602
+ for (let r of e || []) {
3603
+ let e = Array.isArray(r?.children) && r.children.length > 0;
3604
+ e && (t.push(String(r.key)), n(r.children));
3605
+ }
3606
+ };
3607
+ return n(e), t;
3608
+ }
3609
+ w(O, (e) => {
3610
+ let t = String(e || "").trim().length > 0;
3611
+ if (t) {
3612
+ let e = M.value;
3613
+ k.value = pe(e);
3614
+ } else j();
3615
+ });
3616
+ function me(e, t) {
3617
+ let n = t?.node, r = n?.dataRef ?? n;
3618
+ r?.isLeaf && (g.value = r.value || "", y.value = r.scope || "", O.value = "", D.value = !1);
3619
+ }
3620
+ return (e, r) => {
3621
+ let l = se, h = oe, v = ie, b = ae;
3622
+ return _(), o("div", uo, [
3623
+ s("div", p(u(E.value.getTriggerProps())), [c(l, {
3624
+ value: g.value,
3625
+ "onUpdate:value": r[0] ||= (e) => g.value = e,
3626
+ "addon-before": y.value || "本地",
3627
+ placeholder: "请输入或选择组件路径(views下的路径)"
3628
+ }, null, 8, ["value", "addon-before"])], 16),
3629
+ a(" 始终挂载 Teleport,内部用 Transition 控制出现/消失动画 "),
3630
+ (_(), i(n, { to: "body" }, [E.value.open ? (_(), o("div", d({ key: 0 }, E.value.getPositionerProps(), { class: "z-1050" }), [s("div", d(E.value.getContentProps(), { class: "z-1050 w-162 rounded-md border border-solid p-4 border-[--g-border-color] shadow-md outline-none bg-#ffffff dark:bg-#141414 text-dark dark:text-light data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95" }), [s("div", fo, [c(h, null, {
3631
+ default: te(() => [c(l, {
3632
+ ref: "searchInputRef",
3633
+ value: O.value,
3634
+ "onUpdate:value": r[1] ||= (e) => O.value = e,
3635
+ "allow-clear": "",
3636
+ size: "small",
3637
+ placeholder: "搜索组件或路径"
3638
+ }, null, 8, ["value"])]),
3639
+ _: 1
3640
+ })]), M.value && M.value.length ? (_(), i(v, {
3641
+ key: 0,
3642
+ "expanded-keys": k.value,
3643
+ "onUpdate:expandedKeys": r[2] ||= (e) => k.value = e,
3644
+ class: "w-152 h-100 overflow-y-auto directory-tree-root",
3645
+ "selected-keys": le.value,
3646
+ "tree-data": M.value,
3647
+ "show-icon": !0,
3648
+ "show-line": !0,
3649
+ virtual: !0,
3650
+ "expand-action": "click",
3651
+ onExpand: A,
3652
+ onSelect: me
3653
+ }, {
3654
+ switcherIcon: te(({ switcherCls: e }) => [c(x(ne), { class: f(e) }, null, 8, ["class"])]),
3655
+ icon: te(({ expanded: e, dataRef: n }) => [s("span", po, [a(" 根:无 '/' 的 key 表示 "), n?.root && !n?.module ? (_(), i(Qa, {
3656
+ key: 0,
3657
+ expanded: e
3658
+ }, null, 8, ["expanded"])) : n?.root && n?.module ? (_(), i(Ja, {
3659
+ key: 1,
3660
+ expanded: e
3661
+ }, null, 8, ["expanded"])) : n?.isLeaf ? (_(), o(t, { key: 2 }, [a(" 叶子:Vue 文件图标 "), c(lo)], 2112)) : ["components", "component"].includes(String(n?.title).toLowerCase()) ? (_(), o(t, { key: 3 }, [a(" 特殊目录 "), c(Ba, { expanded: e }, null, 8, ["expanded"])], 2112)) : [
3662
+ "views",
3663
+ "view",
3664
+ "pages",
3665
+ "page"
3666
+ ].includes(String(n?.title).toLowerCase()) ? (_(), i(oo, {
3667
+ key: 4,
3668
+ expanded: e
3669
+ }, null, 8, ["expanded"])) : ["src"].includes(String(n?.title).toLowerCase()) ? (_(), i(no, {
3670
+ key: 5,
3671
+ expanded: e
3672
+ }, null, 8, ["expanded"])) : (_(), o(t, { key: 6 }, [a(" 其他目录 "), c(Wa, { expanded: e }, null, 8, ["expanded"])], 2112))])]),
3673
+ _: 1
3674
+ }, 8, [
3675
+ "expanded-keys",
3676
+ "selected-keys",
3677
+ "tree-data"
3678
+ ])) : (_(), o("div", mo, [c(b, {
3679
+ image: x(m),
3680
+ description: "没有找到匹配的组件"
3681
+ }, null, 8, ["image"])]))], 16)], 16)) : a("v-if", !0)]))
3682
+ ]);
3683
+ };
3684
+ }
3685
+ }), go = ho;
3686
+ export { go as b };