bkui-vue 0.0.2-table-refactor.9 → 0.0.3-beta.2

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 (398) hide show
  1. package/dist/index.cjs.js +135 -161
  2. package/dist/index.esm.js +17178 -19445
  3. package/dist/index.umd.js +135 -161
  4. package/dist/locale/en.esm.js +1 -1
  5. package/dist/locale/en.esm.js.map +1 -1
  6. package/dist/locale/en.umd.js +1 -1
  7. package/dist/locale/en.umd.js.map +1 -1
  8. package/dist/locale/zh-cn.esm.js +1 -1
  9. package/dist/locale/zh-cn.esm.js.map +1 -1
  10. package/dist/locale/zh-cn.umd.js +1 -1
  11. package/dist/locale/zh-cn.umd.js.map +1 -1
  12. package/dist/style.css +1 -1
  13. package/dist/style.variable.css +1 -1
  14. package/lib/affix/affix.variable.css +6 -2
  15. package/lib/affix/index.js +321 -1
  16. package/lib/alert/alert.variable.css +6 -2
  17. package/lib/alert/index.js +214 -1
  18. package/lib/animate-number/index.js +155 -1
  19. package/lib/backtop/backtop.variable.css +6 -2
  20. package/lib/backtop/index.js +188 -1
  21. package/lib/badge/badge.css +8 -2
  22. package/lib/badge/badge.less +8 -4
  23. package/lib/badge/badge.variable.css +14 -4
  24. package/lib/badge/index.js +235 -1
  25. package/lib/breadcrumb/breadcrumb.variable.css +6 -2
  26. package/lib/breadcrumb/index.js +309 -1
  27. package/lib/button/button-group.d.ts +2 -2
  28. package/lib/button/button.css +10 -7
  29. package/lib/button/button.d.ts +1 -1
  30. package/lib/button/button.less +98 -93
  31. package/lib/button/button.variable.css +24 -17
  32. package/lib/button/index.d.ts +5 -5
  33. package/lib/button/index.js +321 -1
  34. package/lib/card/card.css +7 -7
  35. package/lib/card/card.less +7 -7
  36. package/lib/card/card.variable.css +13 -9
  37. package/lib/card/index.js +285 -1
  38. package/lib/cascader/cascader-panel.d.ts +1 -0
  39. package/lib/cascader/cascader.css +3 -3
  40. package/lib/cascader/cascader.d.ts +1 -0
  41. package/lib/cascader/cascader.less +4 -6
  42. package/lib/cascader/cascader.variable.css +9 -5
  43. package/lib/cascader/index.d.ts +4 -0
  44. package/lib/cascader/index.js +2053 -2
  45. package/lib/checkbox/checkbox.css +13 -1
  46. package/lib/checkbox/checkbox.d.ts +13 -10
  47. package/lib/checkbox/checkbox.less +15 -1
  48. package/lib/checkbox/checkbox.variable.css +19 -3
  49. package/lib/checkbox/common.d.ts +1 -0
  50. package/lib/checkbox/index.d.ts +28 -19
  51. package/lib/checkbox/index.js +569 -1
  52. package/lib/code-diff/code-diff.variable.css +6 -2
  53. package/lib/code-diff/index.js +5501 -1
  54. package/lib/collapse/collapse.variable.css +6 -2
  55. package/lib/collapse/index.js +570 -1
  56. package/lib/collapse-transition/collapse-transition.variable.css +6 -2
  57. package/lib/collapse-transition/index.js +177 -1
  58. package/lib/color-picker/color-picker.variable.css +6 -2
  59. package/lib/color-picker/index.js +2665 -1
  60. package/lib/components.js +530 -1
  61. package/lib/config-provider/config-provider.d.ts +21 -0
  62. package/lib/config-provider/config-provider.variable.css +6 -2
  63. package/lib/config-provider/index.d.ts +28 -0
  64. package/lib/config-provider/index.js +365 -1
  65. package/lib/config-provider/token.d.ts +7 -0
  66. package/lib/container/container.variable.css +6 -2
  67. package/lib/container/index.js +391 -1
  68. package/lib/date-picker/common.d.ts +2 -0
  69. package/lib/date-picker/date-picker.d.ts +3 -1
  70. package/lib/date-picker/date-picker.variable.css +6 -2
  71. package/lib/date-picker/index.d.ts +9 -3
  72. package/lib/date-picker/index.js +5629 -1
  73. package/lib/date-picker/panel/date.d.ts +2 -2
  74. package/lib/date-picker/panel/time-range.d.ts +17 -0
  75. package/lib/date-picker/panel/time.d.ts +17 -1
  76. package/lib/date-picker/time-picker.d.ts +3 -1
  77. package/lib/dialog/dialog.css +7 -6
  78. package/lib/dialog/dialog.less +7 -6
  79. package/lib/dialog/dialog.variable.css +13 -8
  80. package/lib/dialog/index.js +971 -2
  81. package/lib/directives/index.js +1387 -2
  82. package/lib/dist.index.js +87 -1
  83. package/lib/divider/divider.variable.css +6 -2
  84. package/lib/divider/index.js +169 -1
  85. package/lib/dropdown/dropdown.css +1 -1
  86. package/lib/dropdown/dropdown.variable.css +7 -3
  87. package/lib/dropdown/index.js +369 -1
  88. package/lib/exception/exception.variable.css +6 -2
  89. package/lib/exception/index.js +385 -1
  90. package/lib/fixed-navbar/fixed-navbar.variable.css +6 -2
  91. package/lib/fixed-navbar/index.js +154 -1
  92. package/lib/form/form.css +2 -1
  93. package/lib/form/form.less +3 -2
  94. package/lib/form/form.variable.css +8 -3
  95. package/lib/form/index.js +952 -1
  96. package/lib/hooks.js +73 -1
  97. package/lib/icon/angle-double-down-line.js +191 -1
  98. package/lib/icon/angle-double-left-line.js +191 -1
  99. package/lib/icon/angle-double-left.js +191 -1
  100. package/lib/icon/angle-double-right-line.js +191 -1
  101. package/lib/icon/angle-double-right.js +191 -1
  102. package/lib/icon/angle-double-up-line.js +191 -1
  103. package/lib/icon/angle-down-fill.js +191 -1
  104. package/lib/icon/angle-down-line.js +191 -1
  105. package/lib/icon/angle-down.js +191 -1
  106. package/lib/icon/angle-left.js +191 -1
  107. package/lib/icon/angle-right.js +191 -1
  108. package/lib/icon/angle-up-fill.js +191 -1
  109. package/lib/icon/angle-up.js +191 -1
  110. package/lib/icon/archive-fill.js +191 -1
  111. package/lib/icon/arrows-left.js +191 -1
  112. package/lib/icon/arrows-right.js +191 -1
  113. package/lib/icon/assistant.js +191 -1
  114. package/lib/icon/audio-fill.js +191 -1
  115. package/lib/icon/bk.js +191 -1
  116. package/lib/icon/circle.js +191 -1
  117. package/lib/icon/close-line.js +191 -1
  118. package/lib/icon/close.js +191 -1
  119. package/lib/icon/code.js +191 -1
  120. package/lib/icon/cog-shape.js +191 -1
  121. package/lib/icon/collapse-left.js +191 -1
  122. package/lib/icon/copy-shape.js +191 -1
  123. package/lib/icon/copy.js +191 -1
  124. package/lib/icon/data-shape.js +191 -1
  125. package/lib/icon/del.js +191 -1
  126. package/lib/icon/doc-fill.js +191 -1
  127. package/lib/icon/done.js +191 -1
  128. package/lib/icon/down-shape.js +191 -1
  129. package/lib/icon/down-small.js +191 -1
  130. package/lib/icon/edit-line.js +191 -1
  131. package/lib/icon/ellipsis.js +191 -1
  132. package/lib/icon/enlarge-line.js +191 -1
  133. package/lib/icon/error.js +191 -1
  134. package/lib/icon/excel-fill.js +191 -1
  135. package/lib/icon/exclamation-circle-shape.js +191 -1
  136. package/lib/icon/eye.js +191 -1
  137. package/lib/icon/filliscreen-line.js +191 -1
  138. package/lib/icon/fix-line.js +191 -1
  139. package/lib/icon/fix-shape.js +191 -1
  140. package/lib/icon/folder-open.js +191 -1
  141. package/lib/icon/folder-shape-open.js +191 -1
  142. package/lib/icon/folder-shape.js +191 -1
  143. package/lib/icon/folder.js +191 -1
  144. package/lib/icon/funnel.js +191 -1
  145. package/lib/icon/grag-fill.d.ts +4 -0
  146. package/lib/icon/grag-fill.js +191 -0
  147. package/lib/icon/help-document-fill.js +191 -1
  148. package/lib/icon/help-fill.js +191 -1
  149. package/lib/icon/help.js +191 -1
  150. package/lib/icon/image-fill.js +276 -1
  151. package/lib/icon/img-error.js +276 -1
  152. package/lib/icon/img-placehoulder.js +276 -1
  153. package/lib/icon/index.d.ts +2 -0
  154. package/lib/icon/index.js +2452 -1
  155. package/lib/icon/info-line.js +276 -1
  156. package/lib/icon/info.js +276 -1
  157. package/lib/icon/left-shape.js +276 -1
  158. package/lib/icon/left-turn-line.js +276 -1
  159. package/lib/icon/loading.d.ts +4 -0
  160. package/lib/icon/loading.js +276 -0
  161. package/lib/icon/narrow-line.js +276 -1
  162. package/lib/icon/original.js +276 -1
  163. package/lib/icon/pdf-fill.js +276 -1
  164. package/lib/icon/play-shape.js +276 -1
  165. package/lib/icon/plus.js +276 -1
  166. package/lib/icon/ppt-fill.js +276 -1
  167. package/lib/icon/qq.js +276 -1
  168. package/lib/icon/right-shape.js +276 -1
  169. package/lib/icon/right-turn-line.js +276 -1
  170. package/lib/icon/search.js +276 -1
  171. package/lib/icon/share.js +276 -1
  172. package/lib/icon/spinner.js +276 -1
  173. package/lib/icon/success.js +276 -1
  174. package/lib/icon/switcher-loading.js +276 -1
  175. package/lib/icon/text-file.js +276 -1
  176. package/lib/icon/text-fill.js +276 -1
  177. package/lib/icon/transfer.js +276 -1
  178. package/lib/icon/tree-application-shape.js +276 -1
  179. package/lib/icon/unfull-screen.js +276 -1
  180. package/lib/icon/unvisible.js +276 -1
  181. package/lib/icon/up-shape.js +276 -1
  182. package/lib/icon/upload.js +276 -1
  183. package/lib/icon/video-fill.js +276 -1
  184. package/lib/icon/warn.js +276 -1
  185. package/lib/icon/weixin-pro.js +276 -1
  186. package/lib/icon/weixin.js +276 -1
  187. package/lib/image/image-viewer.variable.css +6 -2
  188. package/lib/image/image.variable.css +6 -2
  189. package/lib/image/index.js +641 -1
  190. package/lib/index.js +97 -1
  191. package/lib/info-box/index.js +1161 -2
  192. package/lib/info-box/info-box.d.ts +4 -0
  193. package/lib/info-box/info-box.variable.css +6 -2
  194. package/lib/input/index.d.ts +4 -4
  195. package/lib/input/index.js +1233 -2
  196. package/lib/input/input.css +21 -5
  197. package/lib/input/input.d.ts +3 -3
  198. package/lib/input/input.less +19 -0
  199. package/lib/input/input.variable.css +27 -7
  200. package/lib/link/index.js +160 -1
  201. package/lib/link/link.variable.css +6 -2
  202. package/lib/loading/index.d.ts +3 -3
  203. package/lib/loading/index.js +381 -1
  204. package/lib/loading/loading.css +9 -9
  205. package/lib/loading/loading.d.ts +1 -1
  206. package/lib/loading/loading.less +14 -9
  207. package/lib/loading/loading.variable.css +15 -11
  208. package/lib/locale/index.js +479 -1
  209. package/lib/locale/lang/en.d.ts +7 -0
  210. package/lib/menu/index.js +724 -1
  211. package/lib/menu/menu.variable.css +6 -2
  212. package/lib/menu/submenu.variable.css +6 -2
  213. package/lib/message/index.js +1795 -2
  214. package/lib/message/message.variable.css +6 -2
  215. package/lib/modal/index.js +396 -1
  216. package/lib/modal/modal.variable.css +6 -2
  217. package/lib/navigation/index.js +367 -1
  218. package/lib/navigation/navigation.variable.css +6 -2
  219. package/lib/notify/index.js +397 -1
  220. package/lib/notify/notify.css +6 -6
  221. package/lib/notify/notify.less +6 -6
  222. package/lib/notify/notify.variable.css +12 -8
  223. package/lib/overflow-title/components/overflow-title.d.ts +0 -1
  224. package/lib/overflow-title/index.js +285 -1
  225. package/lib/pagination/index.d.ts +4 -4
  226. package/lib/pagination/index.js +880 -1
  227. package/lib/pagination/pagination.css +1 -0
  228. package/lib/pagination/pagination.d.ts +3 -3
  229. package/lib/pagination/pagination.less +1 -0
  230. package/lib/pagination/pagination.variable.css +7 -2
  231. package/lib/plugin-popover/index.js +3833 -1
  232. package/lib/plugins/index.js +63 -1
  233. package/lib/pop-confirm/index.d.ts +42 -3
  234. package/lib/pop-confirm/index.js +281 -1
  235. package/lib/pop-confirm/pop-confirm.css +4 -4
  236. package/lib/pop-confirm/pop-confirm.d.ts +14 -1
  237. package/lib/pop-confirm/pop-confirm.less +4 -4
  238. package/lib/pop-confirm/pop-confirm.variable.css +10 -6
  239. package/lib/popover/index.js +3841 -1
  240. package/lib/popover/popover.css +1 -1
  241. package/lib/popover/popover.less +1 -1
  242. package/lib/popover/popover.variable.css +7 -3
  243. package/lib/popover2/index.js +107 -1
  244. package/lib/preset.d.ts +14 -0
  245. package/lib/preset.js +93 -1
  246. package/lib/process/index.js +759 -2
  247. package/lib/process/process.variable.css +6 -2
  248. package/lib/progress/index.d.ts +4 -4
  249. package/lib/progress/index.js +431 -1
  250. package/lib/progress/progress.css +7 -3
  251. package/lib/progress/progress.d.ts +3 -3
  252. package/lib/progress/progress.less +8 -3
  253. package/lib/progress/progress.variable.css +13 -5
  254. package/lib/radio/common.d.ts +1 -0
  255. package/lib/radio/index.d.ts +8 -2
  256. package/lib/radio/index.js +635 -1
  257. package/lib/radio/radio-button.d.ts +4 -3
  258. package/lib/radio/radio-group.d.ts +3 -0
  259. package/lib/radio/radio.css +26 -12
  260. package/lib/radio/radio.d.ts +1 -0
  261. package/lib/radio/radio.less +42 -8
  262. package/lib/radio/radio.variable.css +26 -8
  263. package/lib/rate/index.d.ts +4 -4
  264. package/lib/rate/index.js +354 -1
  265. package/lib/rate/rate.d.ts +2 -2
  266. package/lib/rate/rate.variable.css +6 -2
  267. package/lib/rate/star.css +3 -0
  268. package/lib/rate/star.less +3 -0
  269. package/lib/rate/star.variable.css +9 -2
  270. package/lib/resize-layout/index.js +429 -1
  271. package/lib/resize-layout/resize-layout.css +2 -2
  272. package/lib/resize-layout/resize-layout.less +2 -2
  273. package/lib/resize-layout/resize-layout.variable.css +8 -4
  274. package/lib/search-select/index.js +2729 -2
  275. package/lib/search-select/search-select.css +2 -4
  276. package/lib/search-select/search-select.less +10 -12
  277. package/lib/search-select/search-select.variable.css +8 -6
  278. package/lib/select/common.d.ts +3 -1
  279. package/lib/select/index.d.ts +96 -30
  280. package/lib/select/index.js +2384 -2
  281. package/lib/select/option.d.ts +1 -0
  282. package/lib/select/select.css +3 -0
  283. package/lib/select/select.d.ts +40 -14
  284. package/lib/select/select.less +3 -0
  285. package/lib/select/select.variable.css +9 -2
  286. package/lib/select/selectTagInput.d.ts +2 -0
  287. package/lib/select/type.d.ts +3 -0
  288. package/lib/shared/index.js +2690 -1
  289. package/lib/shared/vue-types.d.ts +1 -1
  290. package/lib/sideslider/index.js +704 -2
  291. package/lib/sideslider/sideslider.variable.css +6 -2
  292. package/lib/slider/index.js +1297 -2
  293. package/lib/slider/slider.css +2 -0
  294. package/lib/slider/slider.less +2 -0
  295. package/lib/slider/slider.variable.css +8 -2
  296. package/lib/steps/index.d.ts +4 -4
  297. package/lib/steps/index.js +825 -2
  298. package/lib/steps/steps.css +18 -6
  299. package/lib/steps/steps.d.ts +3 -3
  300. package/lib/steps/steps.less +26 -5
  301. package/lib/steps/steps.variable.css +24 -8
  302. package/lib/styles/index.d.ts +1 -0
  303. package/lib/styles/mixins/animate.variable.css +6 -2
  304. package/lib/styles/mixins/popper.variable.css +6 -2
  305. package/lib/styles/mixins/scroll.variable.css +6 -2
  306. package/lib/styles/reset.variable.css +6 -2
  307. package/lib/styles/themes/themes.less +7 -3
  308. package/lib/swiper/index.js +336 -1
  309. package/lib/swiper/swiper.variable.css +6 -2
  310. package/lib/switcher/index.d.ts +4 -4
  311. package/lib/switcher/index.js +277 -1
  312. package/lib/switcher/switcher.d.ts +3 -3
  313. package/lib/switcher/switcher.variable.css +6 -2
  314. package/lib/tab/index.js +914 -1
  315. package/lib/tab/tab.variable.css +6 -2
  316. package/lib/table/components/table-column.d.ts +6 -5
  317. package/lib/table/events.d.ts +10 -1
  318. package/lib/table/index.d.ts +96 -7
  319. package/lib/table/index.js +6655 -1
  320. package/lib/table/plugins/body-empty.d.ts +1 -1
  321. package/lib/table/plugins/head-filter.css +1 -28
  322. package/lib/table/plugins/head-filter.less +2 -34
  323. package/lib/table/plugins/head-filter.variable.css +7 -30
  324. package/lib/table/plugins/head-sort.variable.css +6 -2
  325. package/lib/table/plugins/settings.d.ts +0 -7
  326. package/lib/table/plugins/settings.variable.css +6 -2
  327. package/lib/table/plugins/use-column-resize.d.ts +1 -1
  328. package/lib/table/plugins/use-draggable.d.ts +17 -0
  329. package/lib/table/plugins/use-head-cell.d.ts +7 -0
  330. package/lib/table/plugins/use-pagination.d.ts +2 -1
  331. package/lib/table/props.d.ts +15 -1
  332. package/lib/table/table.css +75 -59
  333. package/lib/table/table.d.ts +16 -1
  334. package/lib/table/table.less +52 -22
  335. package/lib/table/table.variable.css +81 -61
  336. package/lib/table/use-attributes.d.ts +6 -1
  337. package/lib/table/use-column.d.ts +87 -0
  338. package/lib/table/use-common.d.ts +0 -1
  339. package/lib/table/use-render.d.ts +1 -1
  340. package/lib/table/utils.d.ts +6 -4
  341. package/lib/table-column/index.d.ts +160 -10
  342. package/lib/table-column/index.js +779 -1
  343. package/lib/tag/index.d.ts +4 -21
  344. package/lib/tag/index.js +229 -1
  345. package/lib/tag/tag.css +14 -10
  346. package/lib/tag/tag.d.ts +2 -12
  347. package/lib/tag/tag.less +31 -27
  348. package/lib/tag/tag.variable.css +20 -12
  349. package/lib/tag-input/index.d.ts +3 -0
  350. package/lib/tag-input/index.js +1674 -1
  351. package/lib/tag-input/list-tag-render.d.ts +11 -0
  352. package/lib/tag-input/tag-input.d.ts +1 -0
  353. package/lib/tag-input/tag-input.variable.css +6 -2
  354. package/lib/time-picker/index.d.ts +9 -3
  355. package/lib/time-picker/index.js +71 -1
  356. package/lib/time-picker/time-picker.css +4 -3
  357. package/lib/time-picker/time-picker.less +5 -9
  358. package/lib/time-picker/time-picker.variable.css +10 -5
  359. package/lib/timeline/index.js +241 -1
  360. package/lib/timeline/timeline.variable.css +6 -2
  361. package/lib/transfer/index.js +673 -1
  362. package/lib/transfer/transfer.css +2 -2
  363. package/lib/transfer/transfer.less +2 -2
  364. package/lib/transfer/transfer.variable.css +8 -4
  365. package/lib/tree/index.d.ts +21 -33
  366. package/lib/tree/index.js +2584 -1
  367. package/lib/tree/props.d.ts +4 -8
  368. package/lib/tree/tree.css +13 -1
  369. package/lib/tree/tree.d.ts +15 -19
  370. package/lib/tree/tree.variable.css +19 -3
  371. package/lib/tree/use-empty.d.ts +1 -3
  372. package/lib/tree/util.d.ts +1 -0
  373. package/lib/upload/index.js +2874 -2
  374. package/lib/upload/upload.type.d.ts +1 -1
  375. package/lib/upload/upload.variable.css +6 -2
  376. package/lib/upload/use-file-handler.d.ts +2 -2
  377. package/lib/virtual-render/index.js +901 -1
  378. package/lib/virtual-render/use-fix-top.d.ts +18 -0
  379. package/lib/virtual-render/v-virtual-render.d.ts +6 -1
  380. package/lib/virtual-render/virtual-render.variable.css +6 -2
  381. package/package.json +17 -4
  382. package/lib/cascader/index.js.LICENSE.txt +0 -1
  383. package/lib/dialog/index.js.LICENSE.txt +0 -1
  384. package/lib/directives/index.js.LICENSE.txt +0 -14
  385. package/lib/info-box/index.js.LICENSE.txt +0 -1
  386. package/lib/input/index.js.LICENSE.txt +0 -1
  387. package/lib/message/index.js.LICENSE.txt +0 -6
  388. package/lib/process/index.js.LICENSE.txt +0 -1
  389. package/lib/search-select/index.js.LICENSE.txt +0 -1
  390. package/lib/select/index.js.LICENSE.txt +0 -1
  391. package/lib/sideslider/index.js.LICENSE.txt +0 -1
  392. package/lib/slider/index.js.LICENSE.txt +0 -1
  393. package/lib/steps/index.js.LICENSE.txt +0 -1
  394. package/lib/table/render.d.ts +0 -130
  395. package/lib/upload/index.js.LICENSE.txt +0 -1
  396. /package/lib/overflow-title/{overflow.css → overflow-title.css} +0 -0
  397. /package/lib/overflow-title/{overflow.less → overflow-title.less} +0 -0
  398. /package/lib/overflow-title/{overflow.variable.css → overflow-title.variable.css} +0 -0
@@ -1 +1,3833 @@
1
- import*as e from"vue";import*as t from"../shared";import*as n from"../config-provider";import*as o from"vue-types";import*as r from"lodash";var i={8022:(e,t,n)=>{var o=n(4481),r=n(6426),i=r;i.v1=o,i.v4=r,e.exports=i},8725:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var o=n||0,r=t;return[r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]]].join("")}},9157:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},4481:(e,t,n)=>{var o,r,i=n(9157),l=n(8725),a=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,s=t||[],f=(e=e||{}).node||o,d=void 0!==e.clockseq?e.clockseq:r;if(null==f||null==d){var p=i();null==f&&(f=o=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=r=16383&(p[6]<<8|p[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:u+1,y=v-a+(m-u)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||v>a)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=v,u=m,r=d;var h=(1e4*(268435455&(v+=122192928e5))+m)%4294967296;s[c++]=h>>>24&255,s[c++]=h>>>16&255,s[c++]=h>>>8&255,s[c++]=255&h;var g=v/4294967296*1e4&268435455;s[c++]=g>>>8&255,s[c++]=255&g,s[c++]=g>>>24&15|16,s[c++]=g>>>16&255,s[c++]=d>>>8|128,s[c++]=255&d;for(var b=0;b<6;++b)s[c+b]=f[b];return t||l(s)}},6426:(e,t,n)=>{var o=n(9157),r=n(8725);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var l=(e=e||{}).random||(e.rng||o)();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t)for(var a=0;a<16;++a)t[i+a]=l[a];return t||r(l)}}},l={};function a(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}};return i[e](n,n.exports,a),n.exports}a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var u={};(()=>{function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==i(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}a.d(u,{Z:()=>Ye});const c=(s={Fragment:()=>e.Fragment,Teleport:()=>e.Teleport,Text:()=>e.Text,computed:()=>e.computed,createApp:()=>e.createApp,createVNode:()=>e.createVNode,defineComponent:()=>e.defineComponent,isVNode:()=>e.isVNode,mergeProps:()=>e.mergeProps,nextTick:()=>e.nextTick,onBeforeUnmount:()=>e.onBeforeUnmount,onMounted:()=>e.onMounted,reactive:()=>e.reactive,ref:()=>e.ref,resolveDirective:()=>e.resolveDirective,toRefs:()=>e.toRefs,watch:()=>e.watch,withDirectives:()=>e.withDirectives},f={},a.d(f,s),f);var s,f;const d=(e=>{var t={};return a.d(t,e),t})({PlacementEnum:()=>t.PlacementEnum,PropTypes:()=>t.PropTypes,RenderType:()=>t.RenderType,bkZIndexManager:()=>t.bkZIndexManager,placementType:()=>t.placementType,renderType:()=>t.renderType,triggerType:()=>t.triggerType});function p(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw i}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var m,y=new Map;function h(e,t){var n,o=[];return Array.isArray(t.arg)?o=t.arg:(n=t.arg,"undefined"!=typeof Element&&n instanceof Element&&o.push(t.arg)),function(n,r){var i=t.instance.popperRef,l=n.target,a=null==r?void 0:r.target,u=!t||!t.instance,c=!l||!a,s=e.contains(l)||e.contains(a),f=e===l,d=o.length&&o.some((function(e){return null==e?void 0:e.contains(l)}))||o.length&&o.includes(a),p=i&&(i.contains(l)||i.contains(a));u||c||s||f||d||p||t.value(n,r)}}document.addEventListener("mousedown",(function(e){return m=e})),document.addEventListener("mouseup",(function(e){var t,n=p(y.values());try{for(n.s();!(t=n.n()).done;){var o,r=p(t.value);try{for(r.s();!(o=r.n()).done;)(0,o.value.documentHandler)(e,m)}catch(e){r.e(e)}finally{r.f()}}}catch(e){n.e(e)}finally{n.f()}}));var g={beforeMount:function(e,t){y.has(e)||y.set(e,[]),y.get(e).push({documentHandler:h(e,t),bindingFn:t.value})},updated:function(e,t){y.has(e)||y.set(e,[]);var n=y.get(e),o=n.findIndex((function(e){return e.bindingFn===t.oldValue})),r={documentHandler:h(e,t),bindingFn:t.value};o>=0?n.splice(o,1,r):n.push(r)},unmounted:function(e){y.delete(e)},install:function(e){e.directive("bkTooltips",g)}};const b=g,w=(e=>{var t={};return a.d(t,e),t})({usePrefix:()=>n.usePrefix}),T=(0,c.defineComponent)({name:"PopArrow",render:function(){var e=(0,(0,w.usePrefix)().resolveClassName)("pop2-arrow");return(0,c.createVNode)("div",{class:e},null)}});var x,P;!function(e){e.CLICK_OUTSIDE="clickoutside",e.CONTENT_MOUSEENTER="contentMouseenter",e.CONTENT_MOUSELEAVE="contentMouseleave",e.CONTENT_AfterHidden="afterHidden",e.CONTENT_AfterShow="afterShow"}(P||(P={}));var E=function(e){return!0},C=function(e){return e},R=(l(x={},P.CLICK_OUTSIDE,(function(e){return!0})),l(x,P.CONTENT_MOUSEENTER,C),l(x,P.CONTENT_MOUSELEAVE,C),l(x,P.CONTENT_AfterHidden,E),l(x,P.CONTENT_AfterShow,E),x);const O=(0,c.defineComponent)({name:"PopContent",props:{width:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.number]).def("auto"),height:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.number]).def("auto"),maxHeight:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.number]).def("auto"),maxWidth:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.number]).def("auto"),extCls:d.PropTypes.string.def(""),visible:d.PropTypes.bool.def(!1),eventDelay:d.PropTypes.number.def(0)},setup:function(e){var t=function(e){return/^\d+\.?\d*$/.test("".concat(e))?"".concat(e,"px"):e},n=(0,c.computed)((function(){return{width:t(e.width),height:t(e.height),maxHeight:t(e.maxHeight),maxWidth:t(e.maxWidth)}})),o=(0,c.ref)(null),r=(0,c.ref)(null),i=function(t){var n;0!==e.eventDelay&&(null===(n=o.value)||void 0===n||n.style.setProperty("pointer-events",t))},l=(0,w.usePrefix)().resolveClassName;return{style:n,refContent:o,resolveClassName:l,resetPointerEvent:function(){var t;0!==e.eventDelay&&(r.value&&clearTimeout(r.value),r.value=setTimeout((function(){i("unset")}),null!==(t=e.eventDelay)&&void 0!==t?t:300))},setContentPointerEvent:i}},render:function(){var e,t,n,o,r,i,l,a,u=this,s=[this.resolveClassName("popover"),this.resolveClassName("pop2-content"),this.extCls],f=function(e){var t;return c.Fragment===(null===(t=null==e?void 0:e[0])||void 0===t?void 0:t.type)&&(0,c.nextTick)((function(){u.setContentPointerEvent("none"),u.resetPointerEvent()})),u.style}(null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e));return(0,c.createVNode)("div",{class:s,style:f,ref:"refContent"},[null!==(r=null===(o=(n=this.$slots).arrow)||void 0===o?void 0:o.call(n))&&void 0!==r?r:"",null!==(a=null===(l=(i=this.$slots).default)||void 0===l?void 0:l.call(i))&&void 0!==a?a:""])}}),A=(e=>{var t={};return a.d(t,e),t})({toType:()=>o.toType});var S={isShow:d.PropTypes.bool.def(!1),always:d.PropTypes.bool.def(!1),disabled:d.PropTypes.bool.def(!1),width:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.number]).def("auto"),height:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.number]).def("auto"),maxWidth:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.number]).def("auto"),maxHeight:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.number]).def("auto"),content:(0,A.toType)("IContent",{}).def(""),target:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.instanceOf(HTMLElement),d.PropTypes.instanceOf(PointerEvent)]),allowHtml:d.PropTypes.bool.def(!1),placement:(0,d.placementType)().def(d.PlacementEnum.TOP_START),theme:d.PropTypes.string.def("dark"),trigger:(0,d.triggerType)(),renderType:(0,d.renderType)(),arrow:d.PropTypes.bool.def(!0),padding:d.PropTypes.number.def(5),offset:d.PropTypes.oneOfType([d.PropTypes.number,d.PropTypes.shape({mainAxis:d.PropTypes.number,crossAxis:d.PropTypes.number,alignmentAxis:d.PropTypes.number})]).def(6),boundary:d.PropTypes.oneOfType([d.PropTypes.string.def("parent"),d.PropTypes.instanceOf(HTMLElement)]),zIndex:d.PropTypes.number.def(void 0),disableTeleport:d.PropTypes.bool.def(!1),autoPlacement:d.PropTypes.bool.def(!1),autoVisibility:d.PropTypes.bool.def(!0),disableOutsideClick:d.PropTypes.bool.def(!1),disableTransform:d.PropTypes.bool.def(!1),reference:d.PropTypes.any,modifiers:d.PropTypes.array.def([]),popoverDelay:d.PropTypes.oneOfType([d.PropTypes.number,d.PropTypes.arrayOf(d.PropTypes.number)]).def(100),extCls:d.PropTypes.string.def(""),componentEventDelay:d.PropTypes.number.def(0),forceClickoutside:d.PropTypes.bool.def(!1)};const N=(0,c.defineComponent)({name:"PopReference",render:function(){var e,t,n;return null!==(n=null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e))&&void 0!==n?n:""}}),L=(0,c.defineComponent)({props:{class:d.PropTypes.string.def(""),mode:d.PropTypes.string.def("")},render:function(){var e,t;return(0,c.createVNode)(c.Fragment,null,[null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e)])}});function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function I(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,l,a=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const H=(e=>{var t={};return a.d(t,e),t})({isElement:()=>r.isElement}),k=["top","right","bottom","left"],M=["start","end"],F=k.reduce(((e,t)=>e.concat(t,t+"-"+M[0],t+"-"+M[1])),[]),V=Math.min,j=Math.max,$=Math.round,B=Math.floor,_=e=>({x:e,y:e}),U={left:"right",right:"left",bottom:"top",top:"bottom"},W={start:"end",end:"start"};function q(e,t,n){return j(e,V(t,n))}function z(e,t){return"function"==typeof e?e(t):e}function Z(e){return e.split("-")[0]}function K(e){return e.split("-")[1]}function X(e){return"x"===e?"y":"x"}function Y(e){return"y"===e?"height":"width"}function G(e){return["top","bottom"].includes(Z(e))?"y":"x"}function J(e){return X(G(e))}function Q(e,t,n){void 0===n&&(n=!1);const o=K(e),r=J(e),i=Y(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=te(l)),[l,te(l)]}function ee(e){return e.replace(/start|end/g,(e=>W[e]))}function te(e){return e.replace(/left|right|bottom|top/g,(e=>U[e]))}function ne(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function oe(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function re(e,t,n){let{reference:o,floating:r}=e;const i=G(t),l=J(t),a=Y(l),u=Z(t),c="y"===i,s=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,d=o[a]/2-r[a]/2;let p;switch(u){case"top":p={x:s,y:o.y-r.height};break;case"bottom":p={x:s,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-r.width,y:f};break;default:p={x:o.x,y:o.y}}switch(K(t)){case"start":p[l]-=d*(n&&c?-1:1);break;case"end":p[l]+=d*(n&&c?-1:1)}return p}async function ie(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:s="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=z(t,e),v=ne(p),m=a[d?"floating"===f?"reference":"floating":f],y=oe(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:s,strategy:u})),h="floating"===f?{...l.floating,x:o,y:r}:l.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},w=oe(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:h,offsetParent:g,strategy:u}):h);return{top:(y.top-w.top+v.top)/b.y,bottom:(w.bottom-y.bottom+v.bottom)/b.y,left:(y.left-w.left+v.left)/b.x,right:(w.right-y.right+v.right)/b.x}}function le(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ae(e){return k.some((t=>e[t]>=0))}function ue(e){const t=V(...e.map((e=>e.left))),n=V(...e.map((e=>e.top)));return{x:t,y:n,width:j(...e.map((e=>e.right)))-t,height:j(...e.map((e=>e.bottom)))-n}}const ce=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=Z(n),a=K(n),u="y"===G(n),c=["left","top"].includes(l)?-1:1,s=i&&u?-1:1,f=z(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:v}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof v&&(p="end"===a?-1*v:v),u?{x:p*s,y:d*c}:{x:d*c,y:p*s}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},se=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=z(e,t),c={x:n,y:o},s=await ie(t,u),f=G(Z(r)),d=X(f);let p=c[d],v=c[f];if(i){const e="y"===d?"bottom":"right";p=q(p+s["y"===d?"top":"left"],p,p-s[e])}if(l){const e="y"===f?"bottom":"right";v=q(v+s["y"===f?"top":"left"],v,v-s[e])}const m=a.fn({...t,[d]:p,[f]:v});return{...m,data:{x:m.x-n,y:m.y-o}}}}};function fe(e){return ve(e)?(e.nodeName||"").toLowerCase():"#document"}function de(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function pe(e){var t;return null==(t=(ve(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ve(e){return e instanceof Node||e instanceof de(e).Node}function me(e){return e instanceof Element||e instanceof de(e).Element}function ye(e){return e instanceof HTMLElement||e instanceof de(e).HTMLElement}function he(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof de(e).ShadowRoot)}function ge(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function be(e){return["table","td","th"].includes(fe(e))}function we(e){const t=Te(),n=Pe(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Te(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function xe(e){return["html","body","#document"].includes(fe(e))}function Pe(e){return de(e).getComputedStyle(e)}function Ee(e){return me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ce(e){if("html"===fe(e))return e;const t=e.assignedSlot||e.parentNode||he(e)&&e.host||pe(e);return he(t)?t.host:t}function Re(e){const t=Ce(e);return xe(t)?e.ownerDocument?e.ownerDocument.body:e.body:ye(t)&&ge(t)?t:Re(t)}function Oe(e,t){var n;void 0===t&&(t=[]);const o=Re(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=de(o);return r?t.concat(i,i.visualViewport||[],ge(o)?o:[]):t.concat(o,Oe(o))}function Ae(e){const t=Pe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ye(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=$(n)!==i||$(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function Se(e){return me(e)?e:e.contextElement}function Ne(e){const t=Se(e);if(!ye(t))return _(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Ae(t);let l=(i?$(n.width):n.width)/o,a=(i?$(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const Le=_(0);function De(e){const t=de(e);return Te()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Le}function Ie(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Se(e);let l=_(1);t&&(o?me(o)&&(l=Ne(o)):l=Ne(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==de(e))&&t}(i,n,o)?De(i):_(0);let u=(r.left+a.x)/l.x,c=(r.top+a.y)/l.y,s=r.width/l.x,f=r.height/l.y;if(i){const e=de(i),t=o&&me(o)?de(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=Ne(n),t=n.getBoundingClientRect(),o=Pe(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;u*=e.x,c*=e.y,s*=e.x,f*=e.y,u+=r,c+=i,n=de(n).frameElement}}return oe({width:s,height:f,x:u,y:c})}function He(e){return Ie(pe(e)).left+Ee(e).scrollLeft}function ke(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=de(e),o=pe(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,u=0;if(r){i=r.width,l=r.height;const e=Te();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,u=r.offsetTop)}return{width:i,height:l,x:a,y:u}}(e,n);else if("document"===t)o=function(e){const t=pe(e),n=Ee(e),o=e.ownerDocument.body,r=j(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=j(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+He(e);const a=-n.scrollTop;return"rtl"===Pe(o).direction&&(l+=j(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(pe(e));else if(me(t))o=function(e,t){const n=Ie(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=ye(e)?Ne(e):_(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=De(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return oe(o)}function Me(e,t){const n=Ce(e);return!(n===t||!me(n)||xe(n))&&("fixed"===Pe(n).position||Me(n,t))}function Fe(e,t,n){const o=ye(t),r=pe(t),i="fixed"===n,l=Ie(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=_(0);if(o||!o&&!i)if(("body"!==fe(t)||ge(r))&&(a=Ee(t)),o){const e=Ie(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else r&&(u.x=He(r));return{x:l.left+a.scrollLeft-u.x,y:l.top+a.scrollTop-u.y,width:l.width,height:l.height}}function Ve(e,t){return ye(e)&&"fixed"!==Pe(e).position?t?t(e):e.offsetParent:null}function je(e,t){const n=de(e);if(!ye(e))return n;let o=Ve(e,t);for(;o&&be(o)&&"static"===Pe(o).position;)o=Ve(o,t);return o&&("html"===fe(o)||"body"===fe(o)&&"static"===Pe(o).position&&!we(o))?n:o||function(e){let t=Ce(e);for(;ye(t)&&!xe(t);){if(we(t))return t;t=Ce(t)}return null}(e)||n}const $e={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=ye(n),i=pe(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=_(1);const u=_(0);if((r||!r&&"fixed"!==o)&&(("body"!==fe(n)||ge(i))&&(l=Ee(n)),ye(n))){const e=Ie(n);a=Ne(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+u.x,y:t.y*a.y-l.scrollTop*a.y+u.y}},getDocumentElement:pe,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=Oe(e).filter((e=>me(e)&&"body"!==fe(e))),r=null;const i="fixed"===Pe(e).position;let l=i?Ce(e):e;for(;me(l)&&!xe(l);){const t=Pe(l),n=we(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||ge(l)&&!n&&Me(e,l))?o=o.filter((e=>e!==l)):r=t,l=Ce(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=i[0],a=i.reduce(((e,n)=>{const o=ke(t,n,r);return e.top=j(o.top,e.top),e.right=V(o.right,e.right),e.bottom=V(o.bottom,e.bottom),e.left=j(o.left,e.left),e}),ke(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:je,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||je,i=this.getDimensions;return{reference:Fe(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return Ae(e)},getScale:Ne,isElement:me,isRTL:function(e){return"rtl"===Pe(e).direction}};var Be=a(8022),_e={},Ue=function(e){return document.querySelector(e)instanceof HTMLElement},We=function(e){return e instanceof Element||e instanceof HTMLDocument},qe=function(e){if(We(e))return{isElement:!0,content:e,vNode:void 0};if(/^(#|\.)/.test(e)){var t=document.querySelector(e),n=We(t);return{isElement:n,content:n?t:e,vNode:n?void 0:e}}return{isElement:!1,content:e,vNode:e}};const ze=function(e,t,n){var o=n.refReference,r=n.refContent,i=n.refArrow,a=n.refRoot,u=(0,c.ref)(!1),s=(0,c.ref)(),f=function(){var e,t,n=g();return(null===(e=document.fullscreenElement)||void 0===e?void 0:e.shadowRoot)?document.fullscreenElement.shadowRoot.contains(n):null===(t=document.fullscreenElement)||void 0===t?void 0:t.contains(n)},p=["dark","light"],v=(0,c.computed)((function(){var t,n,o=null!==(n=null===(t=e.theme)||void 0===t?void 0:t.split(/\s+/))&&void 0!==n?n:[];return o.sort((function(e,t){return Number(p.includes(t))-Number(p.includes(e))})),{systemThemes:o,customThemes:o.filter((function(e){return!p.includes(e)}))}})),m=function(){return e.autoVisibility},y=function(){return e.autoPlacement},h=function(){var t,n,o,l=g(),u=T(null===(t=r.value)||void 0===t?void 0:t.$el),c=e.arrow?T(null===(n=i.value)||void 0===n?void 0:n.$el):null,s=T(null===(o=a.value)||void 0===o?void 0:o.$el),f=qe(e.content),d=f.isElement,p=f.content;return u&&d&&!(null==u?void 0:u.contains(p))&&u.append(p),{elReference:l,elContent:u,elArrow:c,root:s}},g=function(){var t;return T(e.target)||T(null===(t=o.value)||void 0===t?void 0:t.$el)},b=function(){var t={};return Array.isArray(e.modifiers)&&e.modifiers.forEach((function(e){var n,o,r,i,l;if("offset"===e.name){if("number"==typeof(null===(n=e.options)||void 0===n?void 0:n.offset)&&(l=null===(o=e.options)||void 0===o?void 0:o.offset),Array.isArray(null===(r=e.options)||void 0===r?void 0:r.offset)){var a=I(null===(i=e.options)||void 0===i?void 0:i.offset,2);l={mainAxis:a[0],crossAxis:a[1]}}Object.assign(t,{offset:l})}})),t},w=function(e,t){var n,o,r=b(),i=[ce(r.offset||t.offset),se({padding:t.padding})],l={placement:t.placement,middleware:i};if(t.arrow&&i.push((e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:l,elements:a}=t,{element:u,padding:c=0}=z(e,t)||{};if(null==u)return{};const s=ne(c),f={x:n,y:o},d=J(r),p=Y(d),v=await l.getDimensions(u),m="y"===d,y=m?"top":"left",h=m?"bottom":"right",g=m?"clientHeight":"clientWidth",b=i.reference[p]+i.reference[d]-f[d]-i.floating[p],w=f[d]-i.reference[d],T=await(null==l.getOffsetParent?void 0:l.getOffsetParent(u));let x=T?T[g]:0;x&&await(null==l.isElement?void 0:l.isElement(T))||(x=a.floating[g]||i.floating[p]);const P=b/2-w/2,E=x/2-v[p]/2-1,C=V(s[y],E),R=V(s[h],E),O=C,A=x-v[p]-R,S=x/2-v[p]/2+P,N=q(O,S,A),L=null!=K(r)&&S!=N&&i.reference[p]/2-(S<O?C:R)-v[p]/2<0?S<O?O-S:A-S:0;return{[d]:f[d]-L,data:{[d]:N,centerOffset:S-N+L}}}}))({element:e})),y()?i.push(function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,r;const{rects:i,middlewareData:l,placement:a,platform:u,elements:c}=t,{crossAxis:s=!1,alignment:f,allowedPlacements:d=F,autoAlignment:p=!0,...v}=z(e,t),m=void 0!==f||d===F?function(e,t,n){return(e?[...n.filter((t=>K(t)===e)),...n.filter((t=>K(t)!==e))]:n.filter((e=>Z(e)===e))).filter((n=>!e||K(n)===e||!!t&&ee(n)!==n))}(f||null,p,d):d,y=await ie(t,v),h=(null==(n=l.autoPlacement)?void 0:n.index)||0,g=m[h];if(null==g)return{};const b=Q(g,i,await(null==u.isRTL?void 0:u.isRTL(c.floating)));if(a!==g)return{reset:{placement:m[0]}};const w=[y[Z(g)],y[b[0]],y[b[1]]],T=[...(null==(o=l.autoPlacement)?void 0:o.overflows)||[],{placement:g,overflows:w}],x=m[h+1];if(x)return{data:{index:h+1,overflows:T},reset:{placement:x}};const P=T.map((e=>{const t=K(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce(((e,t)=>e+t),0):e.overflows[0],e.overflows]})).sort(((e,t)=>e[1]-t[1])),E=(null==(r=P.filter((e=>e[2].slice(0,K(e[0])?2:3).every((e=>e<=0))))[0])?void 0:r[0])||P[0][0];return E!==a?{data:{index:h+1,overflows:T},reset:{placement:E}}:{}}}}()):(i.unshift(function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:o,rects:r,platform:i,strategy:l}=t,{padding:a=2,x:u,y:c}=z(e,t),s=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(o.reference))||[]),f=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),n=[];let o=null;for(let e=0;e<t.length;e++){const r=t[e];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map((e=>oe(ue(e))))}(s),d=oe(ue(s)),p=ne(a),v=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===f.length&&f[0].left>f[1].right&&null!=u&&null!=c)return f.find((e=>u>e.left-p.left&&u<e.right+p.right&&c>e.top-p.top&&c<e.bottom+p.bottom))||d;if(f.length>=2){if("y"===G(n)){const e=f[0],t=f[f.length-1],o="top"===Z(n),r=e.top,i=t.bottom,l=o?e.left:t.left,a=o?e.right:t.right;return{top:r,bottom:i,left:l,right:a,width:a-l,height:i-r,x:l,y:r}}const e="left"===Z(n),t=j(...f.map((e=>e.right))),o=V(...f.map((e=>e.left))),r=f.filter((n=>e?n.left===o:n.right===t)),i=r[0].top,l=r[r.length-1].bottom;return{top:i,bottom:l,left:o,right:t,width:t-o,height:l-i,x:o,y:i}}return d}},floating:o.floating,strategy:l});return r.reference.x!==v.reference.x||r.reference.y!==v.reference.y||r.reference.width!==v.reference.width||r.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}}()),i.push(function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:o,middlewareData:r,rects:i,initialPlacement:l,platform:a,elements:u}=t,{mainAxis:c=!0,crossAxis:s=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...m}=z(e,t),y=Z(o),h=Z(l)===l,g=await(null==a.isRTL?void 0:a.isRTL(u.floating)),b=f||(h||!v?[te(l)]:function(e){const t=te(e);return[ee(e),t,ee(t)]}(l));f||"none"===p||b.push(...function(e,t,n,o){const r=K(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:l;default:return[]}}(Z(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(ee)))),i}(l,v,p,g));const w=[l,...b],T=await ie(t,m),x=[];let P=(null==(n=r.flip)?void 0:n.overflows)||[];if(c&&x.push(T[y]),s){const e=Q(o,i,g);x.push(T[e[0]],T[e[1]])}if(P=[...P,{placement:o,overflows:x}],!x.every((e=>e<=0))){var E,C;const e=((null==(E=r.flip)?void 0:E.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(C=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:C.placement;if(!n)switch(d){case"bestFit":{var R;const e=null==(R=P.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:R[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}}())),m()&&l.middleware.push(function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=z(e,t);switch(o){case"referenceHidden":{const e=le(await ie(t,{...r,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ae(e)}}}case"escaped":{const e=le(await ie(t,{...r,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ae(e)}}}default:return{}}}}}()),f()||t.isVirtualEl){var a=(o=s.value,{getElementRects:function(e){var t=e.reference,n=e.floating,o=t.getBoundingClientRect(),r=n.getBoundingClientRect();return{reference:{width:o.width,height:o.height,x:o.x,y:o.y},floating:{width:r.width,height:r.height,x:r.x,y:r.y}}},getDimensions:function(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height}},getClippingRect:function(e){var t;!function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e);var n=null!==(t=null==o?void 0:o.getBoundingClientRect())&&void 0!==t?t:{},r=n.width,i=void 0===r?0:r,l=n.height;return{width:i,height:void 0===l?0:l,x:0,y:0}}}),u=a.getElementRects,c=a.getDimensions,d=a.getClippingRect;Object.assign(l,{platform:Object.assign(Object.assign({},null!==(n=null==t?void 0:t.platform)&&void 0!==n?n:{}),{getElementRects:u,getDimensions:c,getClippingRect:d})})}return l},T=function e(t){if(t instanceof HTMLElement)return t;if(t instanceof Text)return e(t.nextElementSibling);if("function"==typeof(null==t?void 0:t.getBoundingClientRect))return t;if("string"==typeof t){var n=document.querySelector(t);return(0,H.isElement)(n)?n:null}return t instanceof PointerEvent?e(t.target):null},x=v.value.customThemes.join(" "),E=v.value.customThemes.reduce((function(e,t){return Object.assign(l({},"data-".concat(t,"-theme"),!0),e)}),{}),C="".concat(x),R=null,O=function(e){var t=window.devicePixelRatio||1;return Math.round(e*t)/t||0},A=function(t,n,o,r){var i;e.disableTransform?Object.assign(t.style,{left:"".concat(O(n),"px"),top:"".concat(O(o),"px")}):Object.assign(t.style,{left:"0",top:"0",transform:"translate3d(".concat(O(n),"px,").concat(O(o),"px,0)")});var l=!!m()&&(null===(i=r.hide)||void 0===i?void 0:i.referenceHidden);Object.assign(t.style,{visibility:l?"hidden":"visible"})},S=function(t,n,o){var r;if(e.arrow){var i=null!==(r=o.arrow)&&void 0!==r?r:{},a=i.x,u=i.y;t.setAttribute("data-arrow",n),Object.assign(t.style,{left:"",top:"",bottom:"",right:""});var c={top:"bottom",right:"left",bottom:"top",left:"right"}[n];Object.assign(t.style,l({left:null!==a?"".concat(a,"px"):"",top:null!==u?"".concat(u,"px"):""},c,"-4px"))}},N=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,o=h(),r=o.elReference,i=o.elContent,l=o.elArrow,a=e||r;if(a&&i){var u=w(l,t);((e,t,n)=>{const o=new Map,r={platform:$e,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),u=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:s,y:f}=re(c,o,u),d=o,p={},v=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:y,y:h,data:g,reset:b}=await m({x:s,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:p,rects:c,platform:l,elements:{reference:e,floating:t}});s=null!=y?y:s,f=null!=h?h:f,p={...p,[i]:{...p[i],...g}},b&&v<=50&&(v++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:r}):b.rects),({x:s,y:f}=re(c,d,u))),n=-1)}return{x:s,y:f,placement:d,strategy:r,middlewareData:p}})(e,t,{...r,platform:i})})(a,i,u).then((function(e){var t=e.x,o=e.y,r=e.placement,a=e.middlewareData,u=i.className;i.className="".concat(u.replace(C,"")," ").concat(C).replace(/\s+/gm," ").replace(/^\s+|\s+$/g,""),Object.keys(E).forEach((function(e){i.setAttribute(e,E[e])}));var c=r.split("-")[0],s=c;["left","right","top","bottom"].includes(c)||(s="top"),A(i,t,o,a),S(l,s,a),"function"==typeof n&&n()}))}},L=void 0,D=void 0,k=!1,M=function(){return Array.isArray(e.popoverDelay)?[e.popoverDelay[0],e.popoverDelay.slice(-1)[0]]:[e.popoverDelay,e.popoverDelay]},$=function(){var t=M()[0];D=setTimeout((function(){L&&clearTimeout(L),e.disabled||(u.value=!0)}),t)},_=function(){var e=M()[1];L=setTimeout((function(){D&&clearTimeout(D),u.value=!1}),e)},U=function(){u.value?_():$()},W=function(){U()},X=function(t){"hover"===e.trigger&&(L&&(k=!0,clearTimeout(L),L=void 0),de(t))},fe=function(e){k&&(_(),k=!1,ve(e))},de=function(e){t.emit(P.CONTENT_MOUSEENTER,e)},ve=function(e){t.emit(P.CONTENT_MOUSELEAVE,e)};return(0,c.watch)((function(){return e.isShow}),(function(e){u.value=e})),(0,c.watch)(u,(function(n){var o,i;n?((i=T(null===(o=r.value)||void 0===o?void 0:o.$el)).style.setProperty("display","block"),i.style.setProperty("z-index","".concat(e.zIndex?e.zIndex:d.bkZIndexManager.getPopperIndex())),N(),t.emit(P.CONTENT_AfterShow,{isShow:!0})):function(){var e;T(null===(e=r.value)||void 0===e?void 0:e.$el).style.setProperty("display","none"),t.emit(P.CONTENT_AfterHidden,{isShow:!1})}()})),{showPopover:$,hidePopover:_,resolveTriggerEvents:function(){var t;return null!==(t={hover:{content:[["mouseenter",X],["mouseleave",fe]],reference:[["mouseenter",$],["mouseleave",_],["focus",$],["blur",_]]},click:[["click",W]],manual:{content:[["mouseenter",de],["mouseleave",ve]],reference:[[]]}}[e.trigger])&&void 0!==t?t:[]},updatePopover:N,triggerPopover:U,resolvePopElements:h,isElementFullScreen:f,resolveTargetElement:T,createPopInstance:function(){var t=h(),n=t.elReference,o=t.elContent;R=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:u=!1}=o,c=Se(e),s=r||i?[...c?Oe(c):[],...Oe(t)]:[];s.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const f=c&&a?function(e,t){let n,o=null;const r=pe(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function l(a,u){void 0===a&&(a=!1),void 0===u&&(u=1),i();const{left:c,top:s,width:f,height:d}=e.getBoundingClientRect();if(a||t(),!f||!d)return;const p={rootMargin:-B(s)+"px "+-B(r.clientWidth-(c+f))+"px "+-B(r.clientHeight-(s+d))+"px "+-B(c)+"px",threshold:j(0,V(1,u))||1};let v=!0;function m(e){const t=e[0].intersectionRatio;if(t!==u){if(!v)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),100)}v=!1}try{o=new IntersectionObserver(m,{...p,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(m,p)}o.observe(e)}(!0),i}(c,n):null;let d,p=-1,v=null;l&&(v=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&v&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{v&&v.observe(t)}))),n()})),c&&!u&&v.observe(c),v.observe(t));let m=u?Ie(e):null;return u&&function t(){const o=Ie(e);!m||o.x===m.x&&o.y===m.y&&o.width===m.width&&o.height===m.height||n(),m=o,d=requestAnimationFrame(t)}(),n(),()=>{s.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),f&&f(),v&&v.disconnect(),v=null,u&&cancelAnimationFrame(d)}}(n,o,(function(){u.value&&N(null,e)}))},updateFullscreenTarget:function(e){s.value=e},getFullscreenRoot:function(e){return f()?document.fullscreenElement.shadowRoot?document.fullscreenElement.shadowRoot.querySelector(e):document.fullscreenElement.querySelector(e):document.body},stopHide:function(){L&&(k=!0,clearTimeout(L),L=void 0)},localIsShow:u,cleanup:R}};var Ze=null,Ke=null;const Xe=(0,c.defineComponent)({name:"Popover",components:{Content:O,Arrow:T,Root:L},directives:{clickoutside:b},props:S,emits:R,setup:function(e,t){var n=(0,c.toRefs)(e).reference,o=(0,c.ref)(),r=(0,c.ref)(),i=(0,c.ref)(),l=(0,c.ref)(),a=(0,c.computed)((function(){return n.value||o.value})),u=function(e,t,n){var o=n.refReference,r=n.refContent,i=n.refArrow,l=n.refRoot,a=null,u=(0,c.ref)(!1),s=(_e.fullscreenReferId||(_e.fullscreenReferId="id_".concat((0,Be.v4)())),_e.fullscreenReferId),f=(0,c.ref)(),d=ze(e,t,{refReference:o,refContent:r,refArrow:i,refRoot:l}),p=d.localIsShow,v=d.showPopover,m=d.hidePopover,y=d.updatePopover,h=d.cleanup,g=d.resolveTriggerEvents,b=d.resolvePopElements,w=d.isElementFullScreen,T=d.updateFullscreenTarget,x=d.createPopInstance,E=d.getFullscreenRoot,C=d.stopHide,R=function(){m()},O=function(){x(),e.always?v():A()},A=function(){var e=b(),t=e.elReference,n=e.elContent;if(a=g(),Array.isArray(a))S(t,a);else{var o=a,r=o.content,i=o.reference;S(t,i),S(n,r)}},S=function(e,t){t.forEach((function(t){var n=I(t,2),o=n[0],r=n[1];o&&"function"==typeof r&&e.addEventListener(o,r)}))},N=function(){var e=b(),t=e.elReference,n=e.root;u.value?H.value=null==f?void 0:f.value:H.value=D(n||t)},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#",n=function(n){var o=null,r=function(e){null===o&&e()};return r((function(){if(/^parent$/i.test(e.boundary)){o="".concat(t).concat(Ze);var r=(n||{}).parentNode;(null==r?void 0:r.parentNode)&&(r.parentNode.setAttribute("data-pnode-id",Ke),o="[data-pnode-id=".concat(Ke,"]"))}})),r((function(){if(!/^body$/i.test(e.boundary)){if("string"==typeof e.boundary)return Ue(e.boundary)?void(o=e.boundary):void(o="body");if(We(e.boundary))return void(o=e.boundary)}})),r((function(){o="string"==typeof e.boundary?e.boundary:"".concat(t).concat(Ze)})),o};if(null===Ze||!Ue("#".concat(Ze))){Ze="id_".concat((0,Be.v4)());var o=document.createElement("div");o.setAttribute("id",Ze),o.setAttribute("data-popper-id",Ze),document.body.append(o)}return null===Ke&&(Ke="id_".concat((0,Be.v4)())),{popContainerId:Ze,prefixId:n(),getPrefixId:n}}(e,"#"),D=L.getPrefixId,H=(0,c.ref)(),k=function(){!function(){if(null==a?void 0:a.length){var e=b().elReference;e&&a.forEach((function(t){var n=I(t,2),o=n[0],r=n[1];o&&"function"==typeof r&&e.removeEventListener(o,r)})),a=null}}()},M=function(e){var t;f.value=e,T(e),u.value=w(),null===(t=null==f?void 0:f.value)||void 0===t||t.setAttribute("data-fllsrn-id",s)},F=function(t){var n,o,r;document.fullscreenElement||(r="[data-fllsrn-id=".concat(s,"]"),(null!==(o=null===(n=null==f?void 0:f.value)||void 0===n?void 0:n.querySelectorAll(r))&&void 0!==o?o:[]).forEach((function(e){null==e||e.removeAttribute("data-fllsrn-id")}))),M(t.target),N(),y(null,e)};return{onMountedFn:function(){if(!e.disabled){if(O(),w()){var t="[data-fllsrn-id=".concat(s,"]"),n=E(t);M(n)}N(),document.body.addEventListener("fullscreenchange",F)}},onUnmountedFn:function(){k(),document.body.removeEventListener("fullscreenchange",F)},handleClickOutside:function(n){t.emit(P.CLICK_OUTSIDE,{isShow:p.value,event:n});var o=e.disableOutsideClick||e.always||e.disabled||"manual"===e.trigger;!e.forceClickoutside&&o||p.value&&R()},beforeInstanceUnmount:k,updateBoundary:N,initPopInstance:O,updatePopover:y,resetPopover:function(){null==h||h(),x()},showPopover:v,hidePopover:m,showFn:function(){v()},hideFn:R,stopHide:C,isFullscreen:u,boundary:H,localIsShow:p}}(e,t,{refReference:a,refContent:r,refArrow:i,refRoot:l}),s=u.onMountedFn,f=u.onUnmountedFn,p=u.handleClickOutside,v=u.beforeInstanceUnmount,m=u.updateBoundary,y=u.initPopInstance,h=u.showFn,g=u.hideFn,b=u.showPopover,w=u.hidePopover,T=u.updatePopover,x=u.resetPopover,E=u.stopHide,C=u.localIsShow,R=u.boundary;e.always||e.disabled||(0,c.watch)((function(){return e.isShow}),(function(){e.isShow?b():w()}),{immediate:!0}),(0,c.watch)((function(){return[e.disabled]}),(function(e){e[0]?v():y()})),m(),(0,c.onMounted)(s),(0,c.onBeforeUnmount)(f);var O=(0,c.computed)((function(){return!e.disableTeleport})),A=(0,c.computed)((function(){return e.renderType===d.RenderType.AUTO||C.value}));return{boundary:R,arrow:e.arrow,refDefaultReference:o,refContent:r,refArrow:i,content:e.content,theme:e.theme,transBoundary:O,handleClickOutside:p,updatePopover:T,resetPopover:x,hide:function(){g()},show:function(){h()},stopHide:E,contentIsShow:A,renderContent:function(){return e.allowHtml?qe(e.content).vNode:e.content},localIsShow:C}},render:function(){var e,t,n,o,r,i,l,a=this,u=function(e){var t;return c.Text===(null===(t=null==e?void 0:e[0])||void 0===t?void 0:t.type)?(0,c.createVNode)("span",null,[e]):e};return(0,c.createVNode)(L,{ref:"refRoot"},{default:function(){return[(0,c.createVNode)(N,{ref:"refDefaultReference"},(s=e=u(null!==(o=null===(n=(t=a.$slots).default)||void 0===n?void 0:n.call(t))&&void 0!==o?o:(0,c.createVNode)("span",null,null)),"function"==typeof s||"[object Object]"===Object.prototype.toString.call(s)&&!(0,c.isVNode)(s)?e:{default:function(){return[e]}})),(0,c.createVNode)(c.Teleport,{to:a.boundary,disabled:!a.transBoundary},{default:function(){return[(0,c.withDirectives)((0,c.createVNode)(O,{ref:"refContent",visible:a.localIsShow,"data-theme":a.theme,extCls:a.extCls,width:a.width,height:a.height,maxWidth:a.maxWidth,maxHeight:a.maxHeight,eventDelay:a.componentEventDelay},{default:function(){return[a.contentIsShow?null!==(l=null===(i=(r=a.$slots).content)||void 0===i?void 0:i.call(r))&&void 0!==l?l:a.renderContent():""]},arrow:function(){var e,t;return a.arrow?(0,c.createVNode)(T,{ref:"refArrow"},{default:function(){return[null===(t=(e=a.$slots).arrow)||void 0===t?void 0:t.call(e)]}}):""}}),[[(0,c.resolveDirective)("clickoutside"),a.handleClickOutside]])]}})];var s}})}}),Ye=function(e){var t,n=null,o=null,r=null,i=Object.assign(Object.assign({boundary:"body",placement:"top",autoVisibility:!0,isShow:!1,trigger:"manual"},e),{allowHtml:!0}),a={name:"$popover",setup:function(e,t){var n=t.expose,o=(0,c.reactive)(Object.keys(S).reduce((function(e,t){return Object.prototype.hasOwnProperty.call(i,t)&&Object.assign(e,l({},t,i[t])),e}),{target:i.target})),r=(0,c.ref)(),a=function(){var e;null===(e=i.onContentMouseenter)||void 0===e||e.call(i)},u=function(){var e;null===(e=i.onContentMouseleave)||void 0===e||e.call(i)};return n({show:function(){var e,t;null===(t=null===(e=r.value)||void 0===e?void 0:e.show)||void 0===t||t.call(e)},hide:function(){var e,t;null===(t=null===(e=r.value)||void 0===e?void 0:e.hide)||void 0===t||t.call(e)},updateTarget:function(e){var t,n;o.target=e,null===(n=null===(t=r.value)||void 0===t?void 0:t.resetPopover)||void 0===n||n.call(t)},stopHide:function(){var e,t;null===(t=null===(e=r.value)||void 0===e?void 0:e.stopHide)||void 0===t||t.call(e)}}),function(){return(0,c.createVNode)(Xe,(0,c.mergeProps)(o,{ref:r,onContentMouseenter:a,onContentMouseleave:u}),null)}}};return null===n&&(r=document.createElement("div"),(t=i.boundary,/^body$/i.test(t)?document.body:/^parent$/i.test(t)?We(i.target)?i.target.parentNode:i.target.target.parentNode:"string"==typeof t&&Ue(t)?document.querySelector(t):document.body).append(r),n=(0,c.createApp)(a),o=n.mount(r)),{close:function(){n&&(n.unmount(),o=null,n=null,r.remove())},show:function(){null==o||o.show()},hide:function(){null==o||o.hide()},update:function(e){null==o||o.updateTarget(e)},get vm(){return o},get $el(){return o.$el}}}})();var c=u.Z;export{c as default};
1
+ import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
2
+ import * as __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__ from "../shared";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__ from "../config-provider";
4
+ import * as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__ from "vue-types";
5
+ import * as __WEBPACK_EXTERNAL_MODULE_lodash_isElement_e6b2a6ce__ from "lodash/isElement";
6
+ /******/ // The require scope
7
+ /******/ var __webpack_require__ = {};
8
+ /******/
9
+ /************************************************************************/
10
+ /******/ /* webpack/runtime/define property getters */
11
+ /******/ (() => {
12
+ /******/ // define getter functions for harmony exports
13
+ /******/ __webpack_require__.d = (exports, definition) => {
14
+ /******/ for(var key in definition) {
15
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
16
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
17
+ /******/ }
18
+ /******/ }
19
+ /******/ };
20
+ /******/ })();
21
+ /******/
22
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
23
+ /******/ (() => {
24
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
25
+ /******/ })();
26
+ /******/
27
+ /************************************************************************/
28
+ var __webpack_exports__ = {};
29
+
30
+ // EXPORTS
31
+ __webpack_require__.d(__webpack_exports__, {
32
+ Z: () => (/* binding */ src)
33
+ });
34
+
35
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
36
+ function _typeof(obj) {
37
+ "@babel/helpers - typeof";
38
+
39
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
40
+ return typeof obj;
41
+ } : function (obj) {
42
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
43
+ }, _typeof(obj);
44
+ }
45
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
46
+
47
+ function _toPrimitive(input, hint) {
48
+ if (_typeof(input) !== "object" || input === null) return input;
49
+ var prim = input[Symbol.toPrimitive];
50
+ if (prim !== undefined) {
51
+ var res = prim.call(input, hint || "default");
52
+ if (_typeof(res) !== "object") return res;
53
+ throw new TypeError("@@toPrimitive must return a primitive value.");
54
+ }
55
+ return (hint === "string" ? String : Number)(input);
56
+ }
57
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
58
+
59
+
60
+ function _toPropertyKey(arg) {
61
+ var key = _toPrimitive(arg, "string");
62
+ return _typeof(key) === "symbol" ? key : String(key);
63
+ }
64
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
65
+
66
+ function _defineProperty(obj, key, value) {
67
+ key = _toPropertyKey(key);
68
+ if (key in obj) {
69
+ Object.defineProperty(obj, key, {
70
+ value: value,
71
+ enumerable: true,
72
+ configurable: true,
73
+ writable: true
74
+ });
75
+ } else {
76
+ obj[key] = value;
77
+ }
78
+ return obj;
79
+ }
80
+ ;// CONCATENATED MODULE: external "vue"
81
+ var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
82
+ var y = x => () => x
83
+ const external_vue_namespaceObject = x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["Teleport"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Teleport, ["Text"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Text, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createApp"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createApp, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
84
+ ;// CONCATENATED MODULE: external "../shared"
85
+ var external_shared_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
86
+ var external_shared_y = x => () => x
87
+ const external_shared_namespaceObject = external_shared_x({ ["PlacementEnum"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PlacementEnum, ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["RenderType"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.RenderType, ["bkZIndexManager"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.bkZIndexManager, ["placementType"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.placementType, ["renderType"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.renderType, ["triggerType"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.triggerType });
88
+ ;// CONCATENATED MODULE: ../../packages/directives/src/clickoutside.ts
89
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
90
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
91
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
92
+ /*
93
+ * Tencent is pleased to support the open source community by making
94
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
95
+ *
96
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
97
+ *
98
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
99
+ *
100
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
101
+ *
102
+ * ---------------------------------------------------
103
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
104
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
105
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
106
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
107
+ *
108
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
109
+ * the Software.
110
+ *
111
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
112
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
113
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
114
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
115
+ * IN THE SOFTWARE.
116
+ */
117
+ var isElement = function isElement(e) {
118
+ if (typeof Element === 'undefined') return false;
119
+ return e instanceof Element;
120
+ };
121
+ var nodeList = new Map();
122
+ var startClick;
123
+ document.addEventListener('mousedown', function (e) {
124
+ return startClick = e;
125
+ });
126
+ document.addEventListener('mouseup', function (e) {
127
+ var _iterator = _createForOfIteratorHelper(nodeList.values()),
128
+ _step;
129
+ try {
130
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
131
+ var handlers = _step.value;
132
+ var _iterator2 = _createForOfIteratorHelper(handlers),
133
+ _step2;
134
+ try {
135
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
136
+ var documentHandler = _step2.value.documentHandler;
137
+ documentHandler(e, startClick);
138
+ }
139
+ } catch (err) {
140
+ _iterator2.e(err);
141
+ } finally {
142
+ _iterator2.f();
143
+ }
144
+ }
145
+ } catch (err) {
146
+ _iterator.e(err);
147
+ } finally {
148
+ _iterator.f();
149
+ }
150
+ });
151
+ function createDocumentHandler(el, binding) {
152
+ var excludes = [];
153
+ if (Array.isArray(binding.arg)) {
154
+ excludes = binding.arg;
155
+ } else if (isElement(binding.arg)) {
156
+ excludes.push(binding.arg);
157
+ }
158
+ return function (mouseup, mousedown) {
159
+ var popperRef = binding.instance.popperRef;
160
+ var mouseUpTarget = mouseup.target;
161
+ var mouseDownTarget = mousedown === null || mousedown === void 0 ? void 0 : mousedown.target;
162
+ var isBound = !binding || !binding.instance;
163
+ var isTargetExists = !mouseUpTarget || !mouseDownTarget;
164
+ var isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget);
165
+ var isSelf = el === mouseUpTarget;
166
+ var isTargetExcluded = excludes.length && excludes.some(function (item) {
167
+ return item === null || item === void 0 ? void 0 : item.contains(mouseUpTarget);
168
+ }) || excludes.length && excludes.includes(mouseDownTarget);
169
+ var isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget));
170
+ if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) {
171
+ return;
172
+ }
173
+ binding.value(mouseup, mousedown);
174
+ };
175
+ }
176
+ var ClickOutside = {
177
+ beforeMount: function beforeMount(el, binding) {
178
+ if (!nodeList.has(el)) {
179
+ nodeList.set(el, []);
180
+ }
181
+ nodeList.get(el).push({
182
+ documentHandler: createDocumentHandler(el, binding),
183
+ bindingFn: binding.value
184
+ });
185
+ },
186
+ updated: function updated(el, binding) {
187
+ if (!nodeList.has(el)) {
188
+ nodeList.set(el, []);
189
+ }
190
+ var handlers = nodeList.get(el);
191
+ var oldHandlerIndex = handlers.findIndex(function (item) {
192
+ return item.bindingFn === binding.oldValue;
193
+ });
194
+ var newHandler = {
195
+ documentHandler: createDocumentHandler(el, binding),
196
+ bindingFn: binding.value
197
+ };
198
+ if (oldHandlerIndex >= 0) {
199
+ // replace the old handler to the new handler
200
+ handlers.splice(oldHandlerIndex, 1, newHandler);
201
+ } else {
202
+ handlers.push(newHandler);
203
+ }
204
+ },
205
+ unmounted: function unmounted(el) {
206
+ // remove all listeners when a component unmounted
207
+ nodeList["delete"](el);
208
+ }
209
+ };
210
+ ClickOutside.install = function (app) {
211
+ app.directive('bkTooltips', ClickOutside);
212
+ };
213
+ /* harmony default export */ const clickoutside = (ClickOutside);
214
+ ;// CONCATENATED MODULE: external "../config-provider"
215
+ var external_config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
216
+ var external_config_provider_y = x => () => x
217
+ const external_config_provider_namespaceObject = external_config_provider_x({ ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__.usePrefix });
218
+ ;// CONCATENATED MODULE: ../../packages/popover/src/arrow.tsx
219
+
220
+ /*
221
+ * Tencent is pleased to support the open source community by making
222
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
223
+ *
224
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
225
+ *
226
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
227
+ *
228
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
229
+ *
230
+ * ---------------------------------------------------
231
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
232
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
233
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
234
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
235
+ *
236
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
237
+ * the Software.
238
+ *
239
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
240
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
241
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
242
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
243
+ * IN THE SOFTWARE.
244
+ */
245
+
246
+
247
+ /* harmony default export */ const src_arrow = ((0,external_vue_namespaceObject.defineComponent)({
248
+ name: 'PopArrow',
249
+ render: function render() {
250
+ var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
251
+ resolveClassName = _usePrefix.resolveClassName;
252
+ var arrowClassName = resolveClassName('pop2-arrow');
253
+ return (0,external_vue_namespaceObject.createVNode)("div", {
254
+ "class": arrowClassName
255
+ }, null);
256
+ }
257
+ }));
258
+ ;// CONCATENATED MODULE: ../../packages/popover/src/const.tsx
259
+
260
+ var _EMIT_EVENT_TYPES;
261
+ /* eslint-disable @typescript-eslint/naming-convention */
262
+ /*
263
+ * Tencent is pleased to support the open source community by making
264
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
265
+ *
266
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
267
+ *
268
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
269
+ *
270
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
271
+ *
272
+ * ---------------------------------------------------
273
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
274
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
275
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
276
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
277
+ *
278
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
279
+ * the Software.
280
+ *
281
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
282
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
283
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
284
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
285
+ * IN THE SOFTWARE.
286
+ */
287
+ // eslint-disable-next-line @typescript-eslint/naming-convention
288
+ var EMIT_EVENTS;
289
+ (function (EMIT_EVENTS) {
290
+ EMIT_EVENTS["CLICK_OUTSIDE"] = "clickoutside";
291
+ EMIT_EVENTS["CONTENT_MOUSEENTER"] = "contentMouseenter";
292
+ EMIT_EVENTS["CONTENT_MOUSELEAVE"] = "contentMouseleave";
293
+ EMIT_EVENTS["CONTENT_AfterHidden"] = "afterHidden";
294
+ EMIT_EVENTS["CONTENT_AfterShow"] = "afterShow";
295
+ })(EMIT_EVENTS || (EMIT_EVENTS = {}));
296
+ var EVENT_SHOW_HIDE_FN = function EVENT_SHOW_HIDE_FN(_args) {
297
+ return true;
298
+ };
299
+ var EVENT_COMMON_FN = function EVENT_COMMON_FN(e) {
300
+ return e;
301
+ };
302
+ var EVENT_CLICK_OUTSIDE_FN = function EVENT_CLICK_OUTSIDE_FN(_args) {
303
+ return true;
304
+ };
305
+ var EMIT_EVENT_TYPES = (_EMIT_EVENT_TYPES = {}, _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CLICK_OUTSIDE, EVENT_CLICK_OUTSIDE_FN), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CONTENT_MOUSEENTER, EVENT_COMMON_FN), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CONTENT_MOUSELEAVE, EVENT_COMMON_FN), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CONTENT_AfterHidden, EVENT_SHOW_HIDE_FN), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CONTENT_AfterShow, EVENT_SHOW_HIDE_FN), _EMIT_EVENT_TYPES);
306
+ ;// CONCATENATED MODULE: ../../packages/popover/src/content.tsx
307
+
308
+ /*
309
+ * Tencent is pleased to support the open source community by making
310
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
311
+ *
312
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
313
+ *
314
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
315
+ *
316
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
317
+ *
318
+ * ---------------------------------------------------
319
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
320
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
321
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
322
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
323
+ *
324
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
325
+ * the Software.
326
+ *
327
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
328
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
329
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
330
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
331
+ * IN THE SOFTWARE.
332
+ */
333
+
334
+
335
+
336
+ /* harmony default export */ const content = ((0,external_vue_namespaceObject.defineComponent)({
337
+ name: 'PopContent',
338
+ props: {
339
+ width: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.string, external_shared_namespaceObject.PropTypes.number]).def('auto'),
340
+ height: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.string, external_shared_namespaceObject.PropTypes.number]).def('auto'),
341
+ maxHeight: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.string, external_shared_namespaceObject.PropTypes.number]).def('auto'),
342
+ maxWidth: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.string, external_shared_namespaceObject.PropTypes.number]).def('auto'),
343
+ extCls: external_shared_namespaceObject.PropTypes.string.def(''),
344
+ visible: external_shared_namespaceObject.PropTypes.bool.def(false),
345
+ eventDelay: external_shared_namespaceObject.PropTypes.number.def(0)
346
+ },
347
+ setup: function setup(props) {
348
+ var resolveValToPix = function resolveValToPix(val) {
349
+ if (/^\d+\.?\d*$/.test("".concat(val))) {
350
+ return "".concat(val, "px");
351
+ }
352
+ return val;
353
+ };
354
+ var style = (0,external_vue_namespaceObject.computed)(function () {
355
+ return {
356
+ width: resolveValToPix(props.width),
357
+ height: resolveValToPix(props.height),
358
+ maxHeight: resolveValToPix(props.maxHeight),
359
+ maxWidth: resolveValToPix(props.maxWidth)
360
+ };
361
+ });
362
+ var refContent = (0,external_vue_namespaceObject.ref)(null);
363
+ var refTimer = (0,external_vue_namespaceObject.ref)(null);
364
+ var resetPointerEvent = function resetPointerEvent() {
365
+ var _props$eventDelay;
366
+ if (props.eventDelay === 0) {
367
+ return;
368
+ }
369
+ refTimer.value && clearTimeout(refTimer.value);
370
+ refTimer.value = setTimeout(function () {
371
+ setContentPointerEvent('unset');
372
+ }, (_props$eventDelay = props.eventDelay) !== null && _props$eventDelay !== void 0 ? _props$eventDelay : 300);
373
+ };
374
+ var setContentPointerEvent = function setContentPointerEvent(val) {
375
+ var _refContent$value;
376
+ if (props.eventDelay === 0) {
377
+ return;
378
+ }
379
+ (_refContent$value = refContent.value) === null || _refContent$value === void 0 ? void 0 : _refContent$value.style.setProperty('pointer-events', val);
380
+ };
381
+ var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
382
+ resolveClassName = _usePrefix.resolveClassName;
383
+ return {
384
+ style: style,
385
+ refContent: refContent,
386
+ resolveClassName: resolveClassName,
387
+ resetPointerEvent: resetPointerEvent,
388
+ setContentPointerEvent: setContentPointerEvent
389
+ };
390
+ },
391
+ render: function render() {
392
+ var _this = this,
393
+ _this$$slots$default,
394
+ _this$$slots,
395
+ _this$$slots$arrow,
396
+ _this$$slots$arrow2,
397
+ _this$$slots2,
398
+ _this$$slots$default2,
399
+ _this$$slots$default3,
400
+ _this$$slots3;
401
+ var className = [this.resolveClassName('popover'), this.resolveClassName('pop2-content'), this.extCls];
402
+ var resolveContentStyle = function resolveContentStyle(slot) {
403
+ var _slot$;
404
+ if (external_vue_namespaceObject.Fragment === (slot === null || slot === void 0 || (_slot$ = slot[0]) === null || _slot$ === void 0 ? void 0 : _slot$.type)) {
405
+ (0,external_vue_namespaceObject.nextTick)(function () {
406
+ _this.setContentPointerEvent('none');
407
+ _this.resetPointerEvent();
408
+ });
409
+ }
410
+ return _this.style;
411
+ };
412
+ var style = resolveContentStyle((_this$$slots$default = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots));
413
+ return (0,external_vue_namespaceObject.createVNode)("div", {
414
+ "class": className,
415
+ "style": style,
416
+ "ref": "refContent"
417
+ }, [(_this$$slots$arrow = (_this$$slots$arrow2 = (_this$$slots2 = this.$slots).arrow) === null || _this$$slots$arrow2 === void 0 ? void 0 : _this$$slots$arrow2.call(_this$$slots2)) !== null && _this$$slots$arrow !== void 0 ? _this$$slots$arrow : '', (_this$$slots$default2 = (_this$$slots$default3 = (_this$$slots3 = this.$slots)["default"]) === null || _this$$slots$default3 === void 0 ? void 0 : _this$$slots$default3.call(_this$$slots3)) !== null && _this$$slots$default2 !== void 0 ? _this$$slots$default2 : '']);
418
+ }
419
+ }));
420
+ ;// CONCATENATED MODULE: external "vue-types"
421
+ var external_vue_types_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
422
+ var external_vue_types_y = x => () => x
423
+ const external_vue_types_namespaceObject = external_vue_types_x({ ["toType"]: () => __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.toType });
424
+ ;// CONCATENATED MODULE: ../../packages/popover/src/props.ts
425
+
426
+
427
+ var EventProps = {
428
+ onAfterHidden: function onAfterHidden() {},
429
+ onAfterShow: function onAfterShow() {}
430
+ };
431
+ var PopoverProps = {
432
+ isShow: external_shared_namespaceObject.PropTypes.bool.def(false),
433
+ always: external_shared_namespaceObject.PropTypes.bool.def(false),
434
+ disabled: external_shared_namespaceObject.PropTypes.bool.def(false),
435
+ width: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.string, external_shared_namespaceObject.PropTypes.number]).def('auto'),
436
+ height: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.string, external_shared_namespaceObject.PropTypes.number]).def('auto'),
437
+ maxWidth: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.string, external_shared_namespaceObject.PropTypes.number]).def('auto'),
438
+ maxHeight: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.string, external_shared_namespaceObject.PropTypes.number]).def('auto'),
439
+ content: (0,external_vue_types_namespaceObject.toType)('IContent', {}).def(''),
440
+ target: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.string, external_shared_namespaceObject.PropTypes.instanceOf(HTMLElement), external_shared_namespaceObject.PropTypes.instanceOf(PointerEvent)]),
441
+ allowHtml: external_shared_namespaceObject.PropTypes.bool.def(false),
442
+ /**
443
+ * 组件显示位置
444
+ */
445
+ // placement: placementType().def(PlacementEnum.TOP),
446
+ placement: (0,external_shared_namespaceObject.placementType)().def(external_shared_namespaceObject.PlacementEnum.TOP_START),
447
+ // 'dark', 'light'
448
+ theme: external_shared_namespaceObject.PropTypes.string.def('dark'),
449
+ /**
450
+ * 触发方式
451
+ * 支持 click hover manual
452
+ * manual: 通过isShow控制显示、隐藏
453
+ */
454
+ // trigger: triggerType(),
455
+ trigger: (0,external_shared_namespaceObject.triggerType)(),
456
+ /**
457
+ * content 渲染方式
458
+ */
459
+ renderType: (0,external_shared_namespaceObject.renderType)(),
460
+ // 是否显示箭头
461
+ arrow: external_shared_namespaceObject.PropTypes.bool.def(true),
462
+ padding: external_shared_namespaceObject.PropTypes.number.def(5),
463
+ offset: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.number, external_shared_namespaceObject.PropTypes.shape({
464
+ mainAxis: external_shared_namespaceObject.PropTypes.number,
465
+ crossAxis: external_shared_namespaceObject.PropTypes.number,
466
+ alignmentAxis: external_shared_namespaceObject.PropTypes.number
467
+ })]).def(6),
468
+ /**
469
+ * 弹出内容绑定元素
470
+ */
471
+ boundary: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.string.def('parent'), external_shared_namespaceObject.PropTypes.instanceOf(HTMLElement)]),
472
+ zIndex: external_shared_namespaceObject.PropTypes.number.def(undefined),
473
+ disableTeleport: external_shared_namespaceObject.PropTypes.bool.def(false),
474
+ /**
475
+ * chooses the placement that has the most space available automatically
476
+ */
477
+ autoPlacement: external_shared_namespaceObject.PropTypes.bool.def(false),
478
+ /**
479
+ * 当有滚动条,滚动出可是范围时自动隐藏pop
480
+ */
481
+ autoVisibility: external_shared_namespaceObject.PropTypes.bool.def(true),
482
+ /**
483
+ * 是否禁用clickoutside
484
+ */
485
+ disableOutsideClick: external_shared_namespaceObject.PropTypes.bool.def(false),
486
+ /**
487
+ * 是否禁用样式的transform更新位移
488
+ */
489
+ disableTransform: external_shared_namespaceObject.PropTypes.bool.def(false),
490
+ /**
491
+ * 自定义 reference
492
+ */
493
+ reference: external_shared_namespaceObject.PropTypes.any,
494
+ /**
495
+ * 兼容v1版本遗留配置
496
+ * 不建议使用
497
+ */
498
+ modifiers: external_shared_namespaceObject.PropTypes.array.def([]),
499
+ /**
500
+ * popover显示和隐藏的延时时间
501
+ */
502
+ popoverDelay: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.number, external_shared_namespaceObject.PropTypes.arrayOf(external_shared_namespaceObject.PropTypes.number)]).def(100),
503
+ /**
504
+ * 配置自定义样式类名,传入的类会被加在组件最外层的 DOM
505
+ */
506
+ extCls: external_shared_namespaceObject.PropTypes.string.def(''),
507
+ /**
508
+ * 自定义Content组件渲染,point-event延迟渲染时间
509
+ * 避免子组件point-event渲染时触发popover鼠标事件
510
+ * 如果设置为0,则不启用此设置
511
+ */
512
+ componentEventDelay: external_shared_namespaceObject.PropTypes.number.def(0),
513
+ /**
514
+ * 或略其他判定条件,强制监听clickoutside & 执行hide
515
+ */
516
+ forceClickoutside: external_shared_namespaceObject.PropTypes.bool.def(false)
517
+ };
518
+ ;// CONCATENATED MODULE: ../../packages/popover/src/reference.tsx
519
+ /*
520
+ * Tencent is pleased to support the open source community by making
521
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
522
+ *
523
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
524
+ *
525
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
526
+ *
527
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
528
+ *
529
+ * ---------------------------------------------------
530
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
531
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
532
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
533
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
534
+ *
535
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
536
+ * the Software.
537
+ *
538
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
539
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
540
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
541
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
542
+ * IN THE SOFTWARE.
543
+ */
544
+
545
+ /* harmony default export */ const reference = ((0,external_vue_namespaceObject.defineComponent)({
546
+ name: 'PopReference',
547
+ render: function render() {
548
+ var _this$$slots$default, _this$$slots$default2, _this$$slots;
549
+ return (_this$$slots$default = (_this$$slots$default2 = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default2 === void 0 ? void 0 : _this$$slots$default2.call(_this$$slots)) !== null && _this$$slots$default !== void 0 ? _this$$slots$default : '';
550
+ }
551
+ }));
552
+ ;// CONCATENATED MODULE: ../../packages/popover/src/root.tsx
553
+
554
+ /*
555
+ * Tencent is pleased to support the open source community by making
556
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
557
+ *
558
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
559
+ *
560
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
561
+ *
562
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
563
+ *
564
+ * ---------------------------------------------------
565
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
566
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
567
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
568
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
569
+ *
570
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
571
+ * the Software.
572
+ *
573
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
574
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
575
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
576
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
577
+ * IN THE SOFTWARE.
578
+ */
579
+
580
+
581
+ /* harmony default export */ const root = ((0,external_vue_namespaceObject.defineComponent)({
582
+ props: {
583
+ "class": external_shared_namespaceObject.PropTypes.string.def(''),
584
+ mode: external_shared_namespaceObject.PropTypes.string.def('')
585
+ },
586
+ render: function render() {
587
+ var _this$$slots$default, _this$$slots;
588
+ return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(_this$$slots$default = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots)]);
589
+ }
590
+ }));
591
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
592
+ function _arrayWithHoles(arr) {
593
+ if (Array.isArray(arr)) return arr;
594
+ }
595
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
596
+ function _iterableToArrayLimit(arr, i) {
597
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
598
+ if (null != _i) {
599
+ var _s,
600
+ _e,
601
+ _x,
602
+ _r,
603
+ _arr = [],
604
+ _n = !0,
605
+ _d = !1;
606
+ try {
607
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
608
+ if (Object(_i) !== _i) return;
609
+ _n = !1;
610
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
611
+ } catch (err) {
612
+ _d = !0, _e = err;
613
+ } finally {
614
+ try {
615
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
616
+ } finally {
617
+ if (_d) throw _e;
618
+ }
619
+ }
620
+ return _arr;
621
+ }
622
+ }
623
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
624
+ function arrayLikeToArray_arrayLikeToArray(arr, len) {
625
+ if (len == null || len > arr.length) len = arr.length;
626
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
627
+ return arr2;
628
+ }
629
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
630
+
631
+ function unsupportedIterableToArray_unsupportedIterableToArray(o, minLen) {
632
+ if (!o) return;
633
+ if (typeof o === "string") return arrayLikeToArray_arrayLikeToArray(o, minLen);
634
+ var n = Object.prototype.toString.call(o).slice(8, -1);
635
+ if (n === "Object" && o.constructor) n = o.constructor.name;
636
+ if (n === "Map" || n === "Set") return Array.from(o);
637
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray_arrayLikeToArray(o, minLen);
638
+ }
639
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
640
+ function _nonIterableRest() {
641
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
642
+ }
643
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js
644
+
645
+
646
+
647
+
648
+ function _slicedToArray(arr, i) {
649
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || unsupportedIterableToArray_unsupportedIterableToArray(arr, i) || _nonIterableRest();
650
+ }
651
+ ;// CONCATENATED MODULE: external "lodash/isElement"
652
+ var isElement_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
653
+ var isElement_y = x => () => x
654
+ const isElement_namespaceObject = isElement_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_lodash_isElement_e6b2a6ce__["default"] });
655
+ ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
656
+ const sides = ['top', 'right', 'bottom', 'left'];
657
+ const alignments = ['start', 'end'];
658
+ const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
659
+ const floating_ui_utils_min = Math.min;
660
+ const floating_ui_utils_max = Math.max;
661
+ const round = Math.round;
662
+ const floor = Math.floor;
663
+ const createCoords = v => ({
664
+ x: v,
665
+ y: v
666
+ });
667
+ const oppositeSideMap = {
668
+ left: 'right',
669
+ right: 'left',
670
+ bottom: 'top',
671
+ top: 'bottom'
672
+ };
673
+ const oppositeAlignmentMap = {
674
+ start: 'end',
675
+ end: 'start'
676
+ };
677
+ function clamp(start, value, end) {
678
+ return floating_ui_utils_max(start, floating_ui_utils_min(value, end));
679
+ }
680
+ function floating_ui_utils_evaluate(value, param) {
681
+ return typeof value === 'function' ? value(param) : value;
682
+ }
683
+ function floating_ui_utils_getSide(placement) {
684
+ return placement.split('-')[0];
685
+ }
686
+ function floating_ui_utils_getAlignment(placement) {
687
+ return placement.split('-')[1];
688
+ }
689
+ function floating_ui_utils_getOppositeAxis(axis) {
690
+ return axis === 'x' ? 'y' : 'x';
691
+ }
692
+ function getAxisLength(axis) {
693
+ return axis === 'y' ? 'height' : 'width';
694
+ }
695
+ function floating_ui_utils_getSideAxis(placement) {
696
+ return ['top', 'bottom'].includes(floating_ui_utils_getSide(placement)) ? 'y' : 'x';
697
+ }
698
+ function getAlignmentAxis(placement) {
699
+ return floating_ui_utils_getOppositeAxis(floating_ui_utils_getSideAxis(placement));
700
+ }
701
+ function getAlignmentSides(placement, rects, rtl) {
702
+ if (rtl === void 0) {
703
+ rtl = false;
704
+ }
705
+ const alignment = floating_ui_utils_getAlignment(placement);
706
+ const alignmentAxis = getAlignmentAxis(placement);
707
+ const length = getAxisLength(alignmentAxis);
708
+ let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
709
+ if (rects.reference[length] > rects.floating[length]) {
710
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
711
+ }
712
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
713
+ }
714
+ function getExpandedPlacements(placement) {
715
+ const oppositePlacement = getOppositePlacement(placement);
716
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
717
+ }
718
+ function getOppositeAlignmentPlacement(placement) {
719
+ return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
720
+ }
721
+ function getSideList(side, isStart, rtl) {
722
+ const lr = ['left', 'right'];
723
+ const rl = ['right', 'left'];
724
+ const tb = ['top', 'bottom'];
725
+ const bt = ['bottom', 'top'];
726
+ switch (side) {
727
+ case 'top':
728
+ case 'bottom':
729
+ if (rtl) return isStart ? rl : lr;
730
+ return isStart ? lr : rl;
731
+ case 'left':
732
+ case 'right':
733
+ return isStart ? tb : bt;
734
+ default:
735
+ return [];
736
+ }
737
+ }
738
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
739
+ const alignment = floating_ui_utils_getAlignment(placement);
740
+ let list = getSideList(floating_ui_utils_getSide(placement), direction === 'start', rtl);
741
+ if (alignment) {
742
+ list = list.map(side => side + "-" + alignment);
743
+ if (flipAlignment) {
744
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
745
+ }
746
+ }
747
+ return list;
748
+ }
749
+ function getOppositePlacement(placement) {
750
+ return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
751
+ }
752
+ function expandPaddingObject(padding) {
753
+ return {
754
+ top: 0,
755
+ right: 0,
756
+ bottom: 0,
757
+ left: 0,
758
+ ...padding
759
+ };
760
+ }
761
+ function getPaddingObject(padding) {
762
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
763
+ top: padding,
764
+ right: padding,
765
+ bottom: padding,
766
+ left: padding
767
+ };
768
+ }
769
+ function rectToClientRect(rect) {
770
+ return {
771
+ ...rect,
772
+ top: rect.y,
773
+ left: rect.x,
774
+ right: rect.x + rect.width,
775
+ bottom: rect.y + rect.height
776
+ };
777
+ }
778
+
779
+
780
+
781
+ ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs
782
+
783
+
784
+
785
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
786
+ let {
787
+ reference,
788
+ floating
789
+ } = _ref;
790
+ const sideAxis = floating_ui_utils_getSideAxis(placement);
791
+ const alignmentAxis = getAlignmentAxis(placement);
792
+ const alignLength = getAxisLength(alignmentAxis);
793
+ const side = floating_ui_utils_getSide(placement);
794
+ const isVertical = sideAxis === 'y';
795
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
796
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
797
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
798
+ let coords;
799
+ switch (side) {
800
+ case 'top':
801
+ coords = {
802
+ x: commonX,
803
+ y: reference.y - floating.height
804
+ };
805
+ break;
806
+ case 'bottom':
807
+ coords = {
808
+ x: commonX,
809
+ y: reference.y + reference.height
810
+ };
811
+ break;
812
+ case 'right':
813
+ coords = {
814
+ x: reference.x + reference.width,
815
+ y: commonY
816
+ };
817
+ break;
818
+ case 'left':
819
+ coords = {
820
+ x: reference.x - floating.width,
821
+ y: commonY
822
+ };
823
+ break;
824
+ default:
825
+ coords = {
826
+ x: reference.x,
827
+ y: reference.y
828
+ };
829
+ }
830
+ switch (floating_ui_utils_getAlignment(placement)) {
831
+ case 'start':
832
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
833
+ break;
834
+ case 'end':
835
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
836
+ break;
837
+ }
838
+ return coords;
839
+ }
840
+
841
+ /**
842
+ * Computes the `x` and `y` coordinates that will place the floating element
843
+ * next to a reference element when it is given a certain positioning strategy.
844
+ *
845
+ * This export does not have any `platform` interface logic. You will need to
846
+ * write one for the platform you are using Floating UI with.
847
+ */
848
+ const computePosition = async (reference, floating, config) => {
849
+ const {
850
+ placement = 'bottom',
851
+ strategy = 'absolute',
852
+ middleware = [],
853
+ platform
854
+ } = config;
855
+ const validMiddleware = middleware.filter(Boolean);
856
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
857
+ let rects = await platform.getElementRects({
858
+ reference,
859
+ floating,
860
+ strategy
861
+ });
862
+ let {
863
+ x,
864
+ y
865
+ } = computeCoordsFromPlacement(rects, placement, rtl);
866
+ let statefulPlacement = placement;
867
+ let middlewareData = {};
868
+ let resetCount = 0;
869
+ for (let i = 0; i < validMiddleware.length; i++) {
870
+ const {
871
+ name,
872
+ fn
873
+ } = validMiddleware[i];
874
+ const {
875
+ x: nextX,
876
+ y: nextY,
877
+ data,
878
+ reset
879
+ } = await fn({
880
+ x,
881
+ y,
882
+ initialPlacement: placement,
883
+ placement: statefulPlacement,
884
+ strategy,
885
+ middlewareData,
886
+ rects,
887
+ platform,
888
+ elements: {
889
+ reference,
890
+ floating
891
+ }
892
+ });
893
+ x = nextX != null ? nextX : x;
894
+ y = nextY != null ? nextY : y;
895
+ middlewareData = {
896
+ ...middlewareData,
897
+ [name]: {
898
+ ...middlewareData[name],
899
+ ...data
900
+ }
901
+ };
902
+ if (reset && resetCount <= 50) {
903
+ resetCount++;
904
+ if (typeof reset === 'object') {
905
+ if (reset.placement) {
906
+ statefulPlacement = reset.placement;
907
+ }
908
+ if (reset.rects) {
909
+ rects = reset.rects === true ? await platform.getElementRects({
910
+ reference,
911
+ floating,
912
+ strategy
913
+ }) : reset.rects;
914
+ }
915
+ ({
916
+ x,
917
+ y
918
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
919
+ }
920
+ i = -1;
921
+ continue;
922
+ }
923
+ }
924
+ return {
925
+ x,
926
+ y,
927
+ placement: statefulPlacement,
928
+ strategy,
929
+ middlewareData
930
+ };
931
+ };
932
+
933
+ /**
934
+ * Resolves with an object of overflow side offsets that determine how much the
935
+ * element is overflowing a given clipping boundary on each side.
936
+ * - positive = overflowing the boundary by that number of pixels
937
+ * - negative = how many pixels left before it will overflow
938
+ * - 0 = lies flush with the boundary
939
+ * @see https://floating-ui.com/docs/detectOverflow
940
+ */
941
+ async function detectOverflow(state, options) {
942
+ var _await$platform$isEle;
943
+ if (options === void 0) {
944
+ options = {};
945
+ }
946
+ const {
947
+ x,
948
+ y,
949
+ platform,
950
+ rects,
951
+ elements,
952
+ strategy
953
+ } = state;
954
+ const {
955
+ boundary = 'clippingAncestors',
956
+ rootBoundary = 'viewport',
957
+ elementContext = 'floating',
958
+ altBoundary = false,
959
+ padding = 0
960
+ } = floating_ui_utils_evaluate(options, state);
961
+ const paddingObject = getPaddingObject(padding);
962
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
963
+ const element = elements[altBoundary ? altContext : elementContext];
964
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
965
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
966
+ boundary,
967
+ rootBoundary,
968
+ strategy
969
+ }));
970
+ const rect = elementContext === 'floating' ? {
971
+ ...rects.floating,
972
+ x,
973
+ y
974
+ } : rects.reference;
975
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
976
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
977
+ x: 1,
978
+ y: 1
979
+ } : {
980
+ x: 1,
981
+ y: 1
982
+ };
983
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
984
+ rect,
985
+ offsetParent,
986
+ strategy
987
+ }) : rect);
988
+ return {
989
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
990
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
991
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
992
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
993
+ };
994
+ }
995
+
996
+ /**
997
+ * Provides data to position an inner element of the floating element so that it
998
+ * appears centered to the reference element.
999
+ * @see https://floating-ui.com/docs/arrow
1000
+ */
1001
+ const arrow = options => ({
1002
+ name: 'arrow',
1003
+ options,
1004
+ async fn(state) {
1005
+ const {
1006
+ x,
1007
+ y,
1008
+ placement,
1009
+ rects,
1010
+ platform,
1011
+ elements
1012
+ } = state;
1013
+ // Since `element` is required, we don't Partial<> the type.
1014
+ const {
1015
+ element,
1016
+ padding = 0
1017
+ } = floating_ui_utils_evaluate(options, state) || {};
1018
+ if (element == null) {
1019
+ return {};
1020
+ }
1021
+ const paddingObject = getPaddingObject(padding);
1022
+ const coords = {
1023
+ x,
1024
+ y
1025
+ };
1026
+ const axis = getAlignmentAxis(placement);
1027
+ const length = getAxisLength(axis);
1028
+ const arrowDimensions = await platform.getDimensions(element);
1029
+ const isYAxis = axis === 'y';
1030
+ const minProp = isYAxis ? 'top' : 'left';
1031
+ const maxProp = isYAxis ? 'bottom' : 'right';
1032
+ const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
1033
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
1034
+ const startDiff = coords[axis] - rects.reference[axis];
1035
+ const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
1036
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
1037
+
1038
+ // DOM platform can return `window` as the `offsetParent`.
1039
+ if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
1040
+ clientSize = elements.floating[clientProp] || rects.floating[length];
1041
+ }
1042
+ const centerToReference = endDiff / 2 - startDiff / 2;
1043
+
1044
+ // If the padding is large enough that it causes the arrow to no longer be
1045
+ // centered, modify the padding so that it is centered.
1046
+ const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
1047
+ const minPadding = floating_ui_utils_min(paddingObject[minProp], largestPossiblePadding);
1048
+ const maxPadding = floating_ui_utils_min(paddingObject[maxProp], largestPossiblePadding);
1049
+
1050
+ // Make sure the arrow doesn't overflow the floating element if the center
1051
+ // point is outside the floating element's bounds.
1052
+ const min$1 = minPadding;
1053
+ const max = clientSize - arrowDimensions[length] - maxPadding;
1054
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
1055
+ const offset = clamp(min$1, center, max);
1056
+
1057
+ // If the reference is small enough that the arrow's padding causes it to
1058
+ // to point to nothing for an aligned placement, adjust the offset of the
1059
+ // floating element itself. This stops `shift()` from taking action, but can
1060
+ // be worked around by calling it again after the `arrow()` if desired.
1061
+ const shouldAddOffset = floating_ui_utils_getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
1062
+ const alignmentOffset = shouldAddOffset ? center < min$1 ? min$1 - center : max - center : 0;
1063
+ return {
1064
+ [axis]: coords[axis] - alignmentOffset,
1065
+ data: {
1066
+ [axis]: offset,
1067
+ centerOffset: center - offset + alignmentOffset
1068
+ }
1069
+ };
1070
+ }
1071
+ });
1072
+
1073
+ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
1074
+ const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => floating_ui_utils_getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => floating_ui_utils_getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => floating_ui_utils_getSide(placement) === placement);
1075
+ return allowedPlacementsSortedByAlignment.filter(placement => {
1076
+ if (alignment) {
1077
+ return floating_ui_utils_getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
1078
+ }
1079
+ return true;
1080
+ });
1081
+ }
1082
+ /**
1083
+ * Optimizes the visibility of the floating element by choosing the placement
1084
+ * that has the most space available automatically, without needing to specify a
1085
+ * preferred placement. Alternative to `flip`.
1086
+ * @see https://floating-ui.com/docs/autoPlacement
1087
+ */
1088
+ const autoPlacement = function (options) {
1089
+ if (options === void 0) {
1090
+ options = {};
1091
+ }
1092
+ return {
1093
+ name: 'autoPlacement',
1094
+ options,
1095
+ async fn(state) {
1096
+ var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
1097
+ const {
1098
+ rects,
1099
+ middlewareData,
1100
+ placement,
1101
+ platform,
1102
+ elements
1103
+ } = state;
1104
+ const {
1105
+ crossAxis = false,
1106
+ alignment,
1107
+ allowedPlacements = placements,
1108
+ autoAlignment = true,
1109
+ ...detectOverflowOptions
1110
+ } = floating_ui_utils_evaluate(options, state);
1111
+ const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
1112
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1113
+ const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
1114
+ const currentPlacement = placements$1[currentIndex];
1115
+ if (currentPlacement == null) {
1116
+ return {};
1117
+ }
1118
+ const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
1119
+
1120
+ // Make `computeCoords` start from the right place.
1121
+ if (placement !== currentPlacement) {
1122
+ return {
1123
+ reset: {
1124
+ placement: placements$1[0]
1125
+ }
1126
+ };
1127
+ }
1128
+ const currentOverflows = [overflow[floating_ui_utils_getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
1129
+ const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
1130
+ placement: currentPlacement,
1131
+ overflows: currentOverflows
1132
+ }];
1133
+ const nextPlacement = placements$1[currentIndex + 1];
1134
+
1135
+ // There are more placements to check.
1136
+ if (nextPlacement) {
1137
+ return {
1138
+ data: {
1139
+ index: currentIndex + 1,
1140
+ overflows: allOverflows
1141
+ },
1142
+ reset: {
1143
+ placement: nextPlacement
1144
+ }
1145
+ };
1146
+ }
1147
+ const placementsSortedByMostSpace = allOverflows.map(d => {
1148
+ const alignment = floating_ui_utils_getAlignment(d.placement);
1149
+ return [d.placement, alignment && crossAxis ?
1150
+ // Check along the mainAxis and main crossAxis side.
1151
+ d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
1152
+ // Check only the mainAxis.
1153
+ d.overflows[0], d.overflows];
1154
+ }).sort((a, b) => a[1] - b[1]);
1155
+ const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
1156
+ // Aligned placements should not check their opposite crossAxis
1157
+ // side.
1158
+ floating_ui_utils_getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
1159
+ const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
1160
+ if (resetPlacement !== placement) {
1161
+ return {
1162
+ data: {
1163
+ index: currentIndex + 1,
1164
+ overflows: allOverflows
1165
+ },
1166
+ reset: {
1167
+ placement: resetPlacement
1168
+ }
1169
+ };
1170
+ }
1171
+ return {};
1172
+ }
1173
+ };
1174
+ };
1175
+
1176
+ /**
1177
+ * Optimizes the visibility of the floating element by flipping the `placement`
1178
+ * in order to keep it in view when the preferred placement(s) will overflow the
1179
+ * clipping boundary. Alternative to `autoPlacement`.
1180
+ * @see https://floating-ui.com/docs/flip
1181
+ */
1182
+ const flip = function (options) {
1183
+ if (options === void 0) {
1184
+ options = {};
1185
+ }
1186
+ return {
1187
+ name: 'flip',
1188
+ options,
1189
+ async fn(state) {
1190
+ var _middlewareData$flip;
1191
+ const {
1192
+ placement,
1193
+ middlewareData,
1194
+ rects,
1195
+ initialPlacement,
1196
+ platform,
1197
+ elements
1198
+ } = state;
1199
+ const {
1200
+ mainAxis: checkMainAxis = true,
1201
+ crossAxis: checkCrossAxis = true,
1202
+ fallbackPlacements: specifiedFallbackPlacements,
1203
+ fallbackStrategy = 'bestFit',
1204
+ fallbackAxisSideDirection = 'none',
1205
+ flipAlignment = true,
1206
+ ...detectOverflowOptions
1207
+ } = floating_ui_utils_evaluate(options, state);
1208
+ const side = floating_ui_utils_getSide(placement);
1209
+ const isBasePlacement = floating_ui_utils_getSide(initialPlacement) === initialPlacement;
1210
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1211
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
1212
+ if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {
1213
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
1214
+ }
1215
+ const placements = [initialPlacement, ...fallbackPlacements];
1216
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1217
+ const overflows = [];
1218
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
1219
+ if (checkMainAxis) {
1220
+ overflows.push(overflow[side]);
1221
+ }
1222
+ if (checkCrossAxis) {
1223
+ const sides = getAlignmentSides(placement, rects, rtl);
1224
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
1225
+ }
1226
+ overflowsData = [...overflowsData, {
1227
+ placement,
1228
+ overflows
1229
+ }];
1230
+
1231
+ // One or more sides is overflowing.
1232
+ if (!overflows.every(side => side <= 0)) {
1233
+ var _middlewareData$flip2, _overflowsData$filter;
1234
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
1235
+ const nextPlacement = placements[nextIndex];
1236
+ if (nextPlacement) {
1237
+ // Try next placement and re-run the lifecycle.
1238
+ return {
1239
+ data: {
1240
+ index: nextIndex,
1241
+ overflows: overflowsData
1242
+ },
1243
+ reset: {
1244
+ placement: nextPlacement
1245
+ }
1246
+ };
1247
+ }
1248
+
1249
+ // First, find the candidates that fit on the mainAxis side of overflow,
1250
+ // then find the placement that fits the best on the main crossAxis side.
1251
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
1252
+
1253
+ // Otherwise fallback.
1254
+ if (!resetPlacement) {
1255
+ switch (fallbackStrategy) {
1256
+ case 'bestFit':
1257
+ {
1258
+ var _overflowsData$map$so;
1259
+ const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
1260
+ if (placement) {
1261
+ resetPlacement = placement;
1262
+ }
1263
+ break;
1264
+ }
1265
+ case 'initialPlacement':
1266
+ resetPlacement = initialPlacement;
1267
+ break;
1268
+ }
1269
+ }
1270
+ if (placement !== resetPlacement) {
1271
+ return {
1272
+ reset: {
1273
+ placement: resetPlacement
1274
+ }
1275
+ };
1276
+ }
1277
+ }
1278
+ return {};
1279
+ }
1280
+ };
1281
+ };
1282
+
1283
+ function getSideOffsets(overflow, rect) {
1284
+ return {
1285
+ top: overflow.top - rect.height,
1286
+ right: overflow.right - rect.width,
1287
+ bottom: overflow.bottom - rect.height,
1288
+ left: overflow.left - rect.width
1289
+ };
1290
+ }
1291
+ function isAnySideFullyClipped(overflow) {
1292
+ return sides.some(side => overflow[side] >= 0);
1293
+ }
1294
+ /**
1295
+ * Provides data to hide the floating element in applicable situations, such as
1296
+ * when it is not in the same clipping context as the reference element.
1297
+ * @see https://floating-ui.com/docs/hide
1298
+ */
1299
+ const hide = function (options) {
1300
+ if (options === void 0) {
1301
+ options = {};
1302
+ }
1303
+ return {
1304
+ name: 'hide',
1305
+ options,
1306
+ async fn(state) {
1307
+ const {
1308
+ rects
1309
+ } = state;
1310
+ const {
1311
+ strategy = 'referenceHidden',
1312
+ ...detectOverflowOptions
1313
+ } = floating_ui_utils_evaluate(options, state);
1314
+ switch (strategy) {
1315
+ case 'referenceHidden':
1316
+ {
1317
+ const overflow = await detectOverflow(state, {
1318
+ ...detectOverflowOptions,
1319
+ elementContext: 'reference'
1320
+ });
1321
+ const offsets = getSideOffsets(overflow, rects.reference);
1322
+ return {
1323
+ data: {
1324
+ referenceHiddenOffsets: offsets,
1325
+ referenceHidden: isAnySideFullyClipped(offsets)
1326
+ }
1327
+ };
1328
+ }
1329
+ case 'escaped':
1330
+ {
1331
+ const overflow = await detectOverflow(state, {
1332
+ ...detectOverflowOptions,
1333
+ altBoundary: true
1334
+ });
1335
+ const offsets = getSideOffsets(overflow, rects.floating);
1336
+ return {
1337
+ data: {
1338
+ escapedOffsets: offsets,
1339
+ escaped: isAnySideFullyClipped(offsets)
1340
+ }
1341
+ };
1342
+ }
1343
+ default:
1344
+ {
1345
+ return {};
1346
+ }
1347
+ }
1348
+ }
1349
+ };
1350
+ };
1351
+
1352
+ function getBoundingRect(rects) {
1353
+ const minX = floating_ui_utils_min(...rects.map(rect => rect.left));
1354
+ const minY = floating_ui_utils_min(...rects.map(rect => rect.top));
1355
+ const maxX = floating_ui_utils_max(...rects.map(rect => rect.right));
1356
+ const maxY = floating_ui_utils_max(...rects.map(rect => rect.bottom));
1357
+ return {
1358
+ x: minX,
1359
+ y: minY,
1360
+ width: maxX - minX,
1361
+ height: maxY - minY
1362
+ };
1363
+ }
1364
+ function getRectsByLine(rects) {
1365
+ const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
1366
+ const groups = [];
1367
+ let prevRect = null;
1368
+ for (let i = 0; i < sortedRects.length; i++) {
1369
+ const rect = sortedRects[i];
1370
+ if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {
1371
+ groups.push([rect]);
1372
+ } else {
1373
+ groups[groups.length - 1].push(rect);
1374
+ }
1375
+ prevRect = rect;
1376
+ }
1377
+ return groups.map(rect => rectToClientRect(getBoundingRect(rect)));
1378
+ }
1379
+ /**
1380
+ * Provides improved positioning for inline reference elements that can span
1381
+ * over multiple lines, such as hyperlinks or range selections.
1382
+ * @see https://floating-ui.com/docs/inline
1383
+ */
1384
+ const inline = function (options) {
1385
+ if (options === void 0) {
1386
+ options = {};
1387
+ }
1388
+ return {
1389
+ name: 'inline',
1390
+ options,
1391
+ async fn(state) {
1392
+ const {
1393
+ placement,
1394
+ elements,
1395
+ rects,
1396
+ platform,
1397
+ strategy
1398
+ } = state;
1399
+ // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a
1400
+ // ClientRect's bounds, despite the event listener being triggered. A
1401
+ // padding of 2 seems to handle this issue.
1402
+ const {
1403
+ padding = 2,
1404
+ x,
1405
+ y
1406
+ } = floating_ui_utils_evaluate(options, state);
1407
+ const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);
1408
+ const clientRects = getRectsByLine(nativeClientRects);
1409
+ const fallback = rectToClientRect(getBoundingRect(nativeClientRects));
1410
+ const paddingObject = getPaddingObject(padding);
1411
+ function getBoundingClientRect() {
1412
+ // There are two rects and they are disjoined.
1413
+ if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
1414
+ // Find the first rect in which the point is fully inside.
1415
+ return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;
1416
+ }
1417
+
1418
+ // There are 2 or more connected rects.
1419
+ if (clientRects.length >= 2) {
1420
+ if (floating_ui_utils_getSideAxis(placement) === 'y') {
1421
+ const firstRect = clientRects[0];
1422
+ const lastRect = clientRects[clientRects.length - 1];
1423
+ const isTop = floating_ui_utils_getSide(placement) === 'top';
1424
+ const top = firstRect.top;
1425
+ const bottom = lastRect.bottom;
1426
+ const left = isTop ? firstRect.left : lastRect.left;
1427
+ const right = isTop ? firstRect.right : lastRect.right;
1428
+ const width = right - left;
1429
+ const height = bottom - top;
1430
+ return {
1431
+ top,
1432
+ bottom,
1433
+ left,
1434
+ right,
1435
+ width,
1436
+ height,
1437
+ x: left,
1438
+ y: top
1439
+ };
1440
+ }
1441
+ const isLeftSide = floating_ui_utils_getSide(placement) === 'left';
1442
+ const maxRight = floating_ui_utils_max(...clientRects.map(rect => rect.right));
1443
+ const minLeft = floating_ui_utils_min(...clientRects.map(rect => rect.left));
1444
+ const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
1445
+ const top = measureRects[0].top;
1446
+ const bottom = measureRects[measureRects.length - 1].bottom;
1447
+ const left = minLeft;
1448
+ const right = maxRight;
1449
+ const width = right - left;
1450
+ const height = bottom - top;
1451
+ return {
1452
+ top,
1453
+ bottom,
1454
+ left,
1455
+ right,
1456
+ width,
1457
+ height,
1458
+ x: left,
1459
+ y: top
1460
+ };
1461
+ }
1462
+ return fallback;
1463
+ }
1464
+ const resetRects = await platform.getElementRects({
1465
+ reference: {
1466
+ getBoundingClientRect
1467
+ },
1468
+ floating: elements.floating,
1469
+ strategy
1470
+ });
1471
+ if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {
1472
+ return {
1473
+ reset: {
1474
+ rects: resetRects
1475
+ }
1476
+ };
1477
+ }
1478
+ return {};
1479
+ }
1480
+ };
1481
+ };
1482
+
1483
+ // For type backwards-compatibility, the `OffsetOptions` type was also
1484
+ // Derivable.
1485
+ async function convertValueToCoords(state, options) {
1486
+ const {
1487
+ placement,
1488
+ platform,
1489
+ elements
1490
+ } = state;
1491
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1492
+ const side = floating_ui_utils_getSide(placement);
1493
+ const alignment = floating_ui_utils_getAlignment(placement);
1494
+ const isVertical = floating_ui_utils_getSideAxis(placement) === 'y';
1495
+ const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
1496
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
1497
+ const rawValue = floating_ui_utils_evaluate(options, state);
1498
+
1499
+ // eslint-disable-next-line prefer-const
1500
+ let {
1501
+ mainAxis,
1502
+ crossAxis,
1503
+ alignmentAxis
1504
+ } = typeof rawValue === 'number' ? {
1505
+ mainAxis: rawValue,
1506
+ crossAxis: 0,
1507
+ alignmentAxis: null
1508
+ } : {
1509
+ mainAxis: 0,
1510
+ crossAxis: 0,
1511
+ alignmentAxis: null,
1512
+ ...rawValue
1513
+ };
1514
+ if (alignment && typeof alignmentAxis === 'number') {
1515
+ crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
1516
+ }
1517
+ return isVertical ? {
1518
+ x: crossAxis * crossAxisMulti,
1519
+ y: mainAxis * mainAxisMulti
1520
+ } : {
1521
+ x: mainAxis * mainAxisMulti,
1522
+ y: crossAxis * crossAxisMulti
1523
+ };
1524
+ }
1525
+
1526
+ /**
1527
+ * Modifies the placement by translating the floating element along the
1528
+ * specified axes.
1529
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
1530
+ * object may be passed.
1531
+ * @see https://floating-ui.com/docs/offset
1532
+ */
1533
+ const offset = function (options) {
1534
+ if (options === void 0) {
1535
+ options = 0;
1536
+ }
1537
+ return {
1538
+ name: 'offset',
1539
+ options,
1540
+ async fn(state) {
1541
+ const {
1542
+ x,
1543
+ y
1544
+ } = state;
1545
+ const diffCoords = await convertValueToCoords(state, options);
1546
+ return {
1547
+ x: x + diffCoords.x,
1548
+ y: y + diffCoords.y,
1549
+ data: diffCoords
1550
+ };
1551
+ }
1552
+ };
1553
+ };
1554
+
1555
+ /**
1556
+ * Optimizes the visibility of the floating element by shifting it in order to
1557
+ * keep it in view when it will overflow the clipping boundary.
1558
+ * @see https://floating-ui.com/docs/shift
1559
+ */
1560
+ const shift = function (options) {
1561
+ if (options === void 0) {
1562
+ options = {};
1563
+ }
1564
+ return {
1565
+ name: 'shift',
1566
+ options,
1567
+ async fn(state) {
1568
+ const {
1569
+ x,
1570
+ y,
1571
+ placement
1572
+ } = state;
1573
+ const {
1574
+ mainAxis: checkMainAxis = true,
1575
+ crossAxis: checkCrossAxis = false,
1576
+ limiter = {
1577
+ fn: _ref => {
1578
+ let {
1579
+ x,
1580
+ y
1581
+ } = _ref;
1582
+ return {
1583
+ x,
1584
+ y
1585
+ };
1586
+ }
1587
+ },
1588
+ ...detectOverflowOptions
1589
+ } = floating_ui_utils_evaluate(options, state);
1590
+ const coords = {
1591
+ x,
1592
+ y
1593
+ };
1594
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1595
+ const crossAxis = floating_ui_utils_getSideAxis(floating_ui_utils_getSide(placement));
1596
+ const mainAxis = floating_ui_utils_getOppositeAxis(crossAxis);
1597
+ let mainAxisCoord = coords[mainAxis];
1598
+ let crossAxisCoord = coords[crossAxis];
1599
+ if (checkMainAxis) {
1600
+ const minSide = mainAxis === 'y' ? 'top' : 'left';
1601
+ const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
1602
+ const min = mainAxisCoord + overflow[minSide];
1603
+ const max = mainAxisCoord - overflow[maxSide];
1604
+ mainAxisCoord = clamp(min, mainAxisCoord, max);
1605
+ }
1606
+ if (checkCrossAxis) {
1607
+ const minSide = crossAxis === 'y' ? 'top' : 'left';
1608
+ const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
1609
+ const min = crossAxisCoord + overflow[minSide];
1610
+ const max = crossAxisCoord - overflow[maxSide];
1611
+ crossAxisCoord = clamp(min, crossAxisCoord, max);
1612
+ }
1613
+ const limitedCoords = limiter.fn({
1614
+ ...state,
1615
+ [mainAxis]: mainAxisCoord,
1616
+ [crossAxis]: crossAxisCoord
1617
+ });
1618
+ return {
1619
+ ...limitedCoords,
1620
+ data: {
1621
+ x: limitedCoords.x - x,
1622
+ y: limitedCoords.y - y
1623
+ }
1624
+ };
1625
+ }
1626
+ };
1627
+ };
1628
+ /**
1629
+ * Built-in `limiter` that will stop `shift()` at a certain point.
1630
+ */
1631
+ const limitShift = function (options) {
1632
+ if (options === void 0) {
1633
+ options = {};
1634
+ }
1635
+ return {
1636
+ options,
1637
+ fn(state) {
1638
+ const {
1639
+ x,
1640
+ y,
1641
+ placement,
1642
+ rects,
1643
+ middlewareData
1644
+ } = state;
1645
+ const {
1646
+ offset = 0,
1647
+ mainAxis: checkMainAxis = true,
1648
+ crossAxis: checkCrossAxis = true
1649
+ } = evaluate(options, state);
1650
+ const coords = {
1651
+ x,
1652
+ y
1653
+ };
1654
+ const crossAxis = getSideAxis(placement);
1655
+ const mainAxis = getOppositeAxis(crossAxis);
1656
+ let mainAxisCoord = coords[mainAxis];
1657
+ let crossAxisCoord = coords[crossAxis];
1658
+ const rawOffset = evaluate(offset, state);
1659
+ const computedOffset = typeof rawOffset === 'number' ? {
1660
+ mainAxis: rawOffset,
1661
+ crossAxis: 0
1662
+ } : {
1663
+ mainAxis: 0,
1664
+ crossAxis: 0,
1665
+ ...rawOffset
1666
+ };
1667
+ if (checkMainAxis) {
1668
+ const len = mainAxis === 'y' ? 'height' : 'width';
1669
+ const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
1670
+ const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
1671
+ if (mainAxisCoord < limitMin) {
1672
+ mainAxisCoord = limitMin;
1673
+ } else if (mainAxisCoord > limitMax) {
1674
+ mainAxisCoord = limitMax;
1675
+ }
1676
+ }
1677
+ if (checkCrossAxis) {
1678
+ var _middlewareData$offse, _middlewareData$offse2;
1679
+ const len = mainAxis === 'y' ? 'width' : 'height';
1680
+ const isOriginSide = ['top', 'left'].includes(getSide(placement));
1681
+ const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
1682
+ const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
1683
+ if (crossAxisCoord < limitMin) {
1684
+ crossAxisCoord = limitMin;
1685
+ } else if (crossAxisCoord > limitMax) {
1686
+ crossAxisCoord = limitMax;
1687
+ }
1688
+ }
1689
+ return {
1690
+ [mainAxis]: mainAxisCoord,
1691
+ [crossAxis]: crossAxisCoord
1692
+ };
1693
+ }
1694
+ };
1695
+ };
1696
+
1697
+ /**
1698
+ * Provides data that allows you to change the size of the floating element —
1699
+ * for instance, prevent it from overflowing the clipping boundary or match the
1700
+ * width of the reference element.
1701
+ * @see https://floating-ui.com/docs/size
1702
+ */
1703
+ const size = function (options) {
1704
+ if (options === void 0) {
1705
+ options = {};
1706
+ }
1707
+ return {
1708
+ name: 'size',
1709
+ options,
1710
+ async fn(state) {
1711
+ const {
1712
+ placement,
1713
+ rects,
1714
+ platform,
1715
+ elements
1716
+ } = state;
1717
+ const {
1718
+ apply = () => {},
1719
+ ...detectOverflowOptions
1720
+ } = evaluate(options, state);
1721
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1722
+ const side = getSide(placement);
1723
+ const alignment = getAlignment(placement);
1724
+ const isYAxis = getSideAxis(placement) === 'y';
1725
+ const {
1726
+ width,
1727
+ height
1728
+ } = rects.floating;
1729
+ let heightSide;
1730
+ let widthSide;
1731
+ if (side === 'top' || side === 'bottom') {
1732
+ heightSide = side;
1733
+ widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
1734
+ } else {
1735
+ widthSide = side;
1736
+ heightSide = alignment === 'end' ? 'top' : 'bottom';
1737
+ }
1738
+ const overflowAvailableHeight = height - overflow[heightSide];
1739
+ const overflowAvailableWidth = width - overflow[widthSide];
1740
+ const noShift = !state.middlewareData.shift;
1741
+ let availableHeight = overflowAvailableHeight;
1742
+ let availableWidth = overflowAvailableWidth;
1743
+ if (isYAxis) {
1744
+ const maximumClippingWidth = width - overflow.left - overflow.right;
1745
+ availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
1746
+ } else {
1747
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
1748
+ availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
1749
+ }
1750
+ if (noShift && !alignment) {
1751
+ const xMin = max(overflow.left, 0);
1752
+ const xMax = max(overflow.right, 0);
1753
+ const yMin = max(overflow.top, 0);
1754
+ const yMax = max(overflow.bottom, 0);
1755
+ if (isYAxis) {
1756
+ availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
1757
+ } else {
1758
+ availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
1759
+ }
1760
+ }
1761
+ await apply({
1762
+ ...state,
1763
+ availableWidth,
1764
+ availableHeight
1765
+ });
1766
+ const nextDimensions = await platform.getDimensions(elements.floating);
1767
+ if (width !== nextDimensions.width || height !== nextDimensions.height) {
1768
+ return {
1769
+ reset: {
1770
+ rects: true
1771
+ }
1772
+ };
1773
+ }
1774
+ return {};
1775
+ }
1776
+ };
1777
+ };
1778
+
1779
+
1780
+
1781
+ ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/utils/dom/dist/floating-ui.utils.dom.mjs
1782
+ function getNodeName(node) {
1783
+ if (isNode(node)) {
1784
+ return (node.nodeName || '').toLowerCase();
1785
+ }
1786
+ // Mocked nodes in testing environments may not be instances of Node. By
1787
+ // returning `#document` an infinite loop won't occur.
1788
+ // https://github.com/floating-ui/floating-ui/issues/2317
1789
+ return '#document';
1790
+ }
1791
+ function getWindow(node) {
1792
+ var _node$ownerDocument;
1793
+ return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1794
+ }
1795
+ function getDocumentElement(node) {
1796
+ var _ref;
1797
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1798
+ }
1799
+ function isNode(value) {
1800
+ return value instanceof Node || value instanceof getWindow(value).Node;
1801
+ }
1802
+ function floating_ui_utils_dom_isElement(value) {
1803
+ return value instanceof Element || value instanceof getWindow(value).Element;
1804
+ }
1805
+ function isHTMLElement(value) {
1806
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1807
+ }
1808
+ function isShadowRoot(value) {
1809
+ // Browsers without `ShadowRoot` support.
1810
+ if (typeof ShadowRoot === 'undefined') {
1811
+ return false;
1812
+ }
1813
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1814
+ }
1815
+ function isOverflowElement(element) {
1816
+ const {
1817
+ overflow,
1818
+ overflowX,
1819
+ overflowY,
1820
+ display
1821
+ } = getComputedStyle(element);
1822
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
1823
+ }
1824
+ function isTableElement(element) {
1825
+ return ['table', 'td', 'th'].includes(getNodeName(element));
1826
+ }
1827
+ function isContainingBlock(element) {
1828
+ const webkit = isWebKit();
1829
+ const css = getComputedStyle(element);
1830
+
1831
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1832
+ return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
1833
+ }
1834
+ function isWebKit() {
1835
+ if (typeof CSS === 'undefined' || !CSS.supports) return false;
1836
+ return CSS.supports('-webkit-backdrop-filter', 'none');
1837
+ }
1838
+ function isLastTraversableNode(node) {
1839
+ return ['html', 'body', '#document'].includes(getNodeName(node));
1840
+ }
1841
+ function getComputedStyle(element) {
1842
+ return getWindow(element).getComputedStyle(element);
1843
+ }
1844
+ function getNodeScroll(element) {
1845
+ if (floating_ui_utils_dom_isElement(element)) {
1846
+ return {
1847
+ scrollLeft: element.scrollLeft,
1848
+ scrollTop: element.scrollTop
1849
+ };
1850
+ }
1851
+ return {
1852
+ scrollLeft: element.pageXOffset,
1853
+ scrollTop: element.pageYOffset
1854
+ };
1855
+ }
1856
+ function getParentNode(node) {
1857
+ if (getNodeName(node) === 'html') {
1858
+ return node;
1859
+ }
1860
+ const result =
1861
+ // Step into the shadow DOM of the parent of a slotted node.
1862
+ node.assignedSlot ||
1863
+ // DOM Element detected.
1864
+ node.parentNode ||
1865
+ // ShadowRoot detected.
1866
+ isShadowRoot(node) && node.host ||
1867
+ // Fallback.
1868
+ getDocumentElement(node);
1869
+ return isShadowRoot(result) ? result.host : result;
1870
+ }
1871
+ function getNearestOverflowAncestor(node) {
1872
+ const parentNode = getParentNode(node);
1873
+ if (isLastTraversableNode(parentNode)) {
1874
+ return node.ownerDocument ? node.ownerDocument.body : node.body;
1875
+ }
1876
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1877
+ return parentNode;
1878
+ }
1879
+ return getNearestOverflowAncestor(parentNode);
1880
+ }
1881
+ function getOverflowAncestors(node, list) {
1882
+ var _node$ownerDocument2;
1883
+ if (list === void 0) {
1884
+ list = [];
1885
+ }
1886
+ const scrollableAncestor = getNearestOverflowAncestor(node);
1887
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1888
+ const win = getWindow(scrollableAncestor);
1889
+ if (isBody) {
1890
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
1891
+ }
1892
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
1893
+ }
1894
+
1895
+
1896
+
1897
+ ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
1898
+
1899
+
1900
+
1901
+
1902
+
1903
+
1904
+ function getCssDimensions(element) {
1905
+ const css = getComputedStyle(element);
1906
+ // In testing environments, the `width` and `height` properties are empty
1907
+ // strings for SVG elements, returning NaN. Fallback to `0` in this case.
1908
+ let width = parseFloat(css.width) || 0;
1909
+ let height = parseFloat(css.height) || 0;
1910
+ const hasOffset = isHTMLElement(element);
1911
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
1912
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
1913
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
1914
+ if (shouldFallback) {
1915
+ width = offsetWidth;
1916
+ height = offsetHeight;
1917
+ }
1918
+ return {
1919
+ width,
1920
+ height,
1921
+ $: shouldFallback
1922
+ };
1923
+ }
1924
+
1925
+ function unwrapElement(element) {
1926
+ return !floating_ui_utils_dom_isElement(element) ? element.contextElement : element;
1927
+ }
1928
+
1929
+ function getScale(element) {
1930
+ const domElement = unwrapElement(element);
1931
+ if (!isHTMLElement(domElement)) {
1932
+ return createCoords(1);
1933
+ }
1934
+ const rect = domElement.getBoundingClientRect();
1935
+ const {
1936
+ width,
1937
+ height,
1938
+ $
1939
+ } = getCssDimensions(domElement);
1940
+ let x = ($ ? round(rect.width) : rect.width) / width;
1941
+ let y = ($ ? round(rect.height) : rect.height) / height;
1942
+
1943
+ // 0, NaN, or Infinity should always fallback to 1.
1944
+
1945
+ if (!x || !Number.isFinite(x)) {
1946
+ x = 1;
1947
+ }
1948
+ if (!y || !Number.isFinite(y)) {
1949
+ y = 1;
1950
+ }
1951
+ return {
1952
+ x,
1953
+ y
1954
+ };
1955
+ }
1956
+
1957
+ const noOffsets = /*#__PURE__*/createCoords(0);
1958
+ function getVisualOffsets(element) {
1959
+ const win = getWindow(element);
1960
+ if (!isWebKit() || !win.visualViewport) {
1961
+ return noOffsets;
1962
+ }
1963
+ return {
1964
+ x: win.visualViewport.offsetLeft,
1965
+ y: win.visualViewport.offsetTop
1966
+ };
1967
+ }
1968
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
1969
+ if (isFixed === void 0) {
1970
+ isFixed = false;
1971
+ }
1972
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
1973
+ return false;
1974
+ }
1975
+ return isFixed;
1976
+ }
1977
+
1978
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
1979
+ if (includeScale === void 0) {
1980
+ includeScale = false;
1981
+ }
1982
+ if (isFixedStrategy === void 0) {
1983
+ isFixedStrategy = false;
1984
+ }
1985
+ const clientRect = element.getBoundingClientRect();
1986
+ const domElement = unwrapElement(element);
1987
+ let scale = createCoords(1);
1988
+ if (includeScale) {
1989
+ if (offsetParent) {
1990
+ if (floating_ui_utils_dom_isElement(offsetParent)) {
1991
+ scale = getScale(offsetParent);
1992
+ }
1993
+ } else {
1994
+ scale = getScale(element);
1995
+ }
1996
+ }
1997
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
1998
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
1999
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
2000
+ let width = clientRect.width / scale.x;
2001
+ let height = clientRect.height / scale.y;
2002
+ if (domElement) {
2003
+ const win = getWindow(domElement);
2004
+ const offsetWin = offsetParent && floating_ui_utils_dom_isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
2005
+ let currentIFrame = win.frameElement;
2006
+ while (currentIFrame && offsetParent && offsetWin !== win) {
2007
+ const iframeScale = getScale(currentIFrame);
2008
+ const iframeRect = currentIFrame.getBoundingClientRect();
2009
+ const css = getComputedStyle(currentIFrame);
2010
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
2011
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
2012
+ x *= iframeScale.x;
2013
+ y *= iframeScale.y;
2014
+ width *= iframeScale.x;
2015
+ height *= iframeScale.y;
2016
+ x += left;
2017
+ y += top;
2018
+ currentIFrame = getWindow(currentIFrame).frameElement;
2019
+ }
2020
+ }
2021
+ return rectToClientRect({
2022
+ width,
2023
+ height,
2024
+ x,
2025
+ y
2026
+ });
2027
+ }
2028
+
2029
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
2030
+ let {
2031
+ rect,
2032
+ offsetParent,
2033
+ strategy
2034
+ } = _ref;
2035
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
2036
+ const documentElement = getDocumentElement(offsetParent);
2037
+ if (offsetParent === documentElement) {
2038
+ return rect;
2039
+ }
2040
+ let scroll = {
2041
+ scrollLeft: 0,
2042
+ scrollTop: 0
2043
+ };
2044
+ let scale = createCoords(1);
2045
+ const offsets = createCoords(0);
2046
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
2047
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
2048
+ scroll = getNodeScroll(offsetParent);
2049
+ }
2050
+ if (isHTMLElement(offsetParent)) {
2051
+ const offsetRect = getBoundingClientRect(offsetParent);
2052
+ scale = getScale(offsetParent);
2053
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
2054
+ offsets.y = offsetRect.y + offsetParent.clientTop;
2055
+ }
2056
+ }
2057
+ return {
2058
+ width: rect.width * scale.x,
2059
+ height: rect.height * scale.y,
2060
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
2061
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
2062
+ };
2063
+ }
2064
+
2065
+ function getClientRects(element) {
2066
+ return Array.from(element.getClientRects());
2067
+ }
2068
+
2069
+ function getWindowScrollBarX(element) {
2070
+ // If <html> has a CSS width greater than the viewport, then this will be
2071
+ // incorrect for RTL.
2072
+ return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
2073
+ }
2074
+
2075
+ // Gets the entire size of the scrollable document area, even extending outside
2076
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
2077
+ function getDocumentRect(element) {
2078
+ const html = getDocumentElement(element);
2079
+ const scroll = getNodeScroll(element);
2080
+ const body = element.ownerDocument.body;
2081
+ const width = floating_ui_utils_max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
2082
+ const height = floating_ui_utils_max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
2083
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
2084
+ const y = -scroll.scrollTop;
2085
+ if (getComputedStyle(body).direction === 'rtl') {
2086
+ x += floating_ui_utils_max(html.clientWidth, body.clientWidth) - width;
2087
+ }
2088
+ return {
2089
+ width,
2090
+ height,
2091
+ x,
2092
+ y
2093
+ };
2094
+ }
2095
+
2096
+ function getViewportRect(element, strategy) {
2097
+ const win = getWindow(element);
2098
+ const html = getDocumentElement(element);
2099
+ const visualViewport = win.visualViewport;
2100
+ let width = html.clientWidth;
2101
+ let height = html.clientHeight;
2102
+ let x = 0;
2103
+ let y = 0;
2104
+ if (visualViewport) {
2105
+ width = visualViewport.width;
2106
+ height = visualViewport.height;
2107
+ const visualViewportBased = isWebKit();
2108
+ if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
2109
+ x = visualViewport.offsetLeft;
2110
+ y = visualViewport.offsetTop;
2111
+ }
2112
+ }
2113
+ return {
2114
+ width,
2115
+ height,
2116
+ x,
2117
+ y
2118
+ };
2119
+ }
2120
+
2121
+ // Returns the inner client rect, subtracting scrollbars if present.
2122
+ function getInnerBoundingClientRect(element, strategy) {
2123
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
2124
+ const top = clientRect.top + element.clientTop;
2125
+ const left = clientRect.left + element.clientLeft;
2126
+ const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
2127
+ const width = element.clientWidth * scale.x;
2128
+ const height = element.clientHeight * scale.y;
2129
+ const x = left * scale.x;
2130
+ const y = top * scale.y;
2131
+ return {
2132
+ width,
2133
+ height,
2134
+ x,
2135
+ y
2136
+ };
2137
+ }
2138
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
2139
+ let rect;
2140
+ if (clippingAncestor === 'viewport') {
2141
+ rect = getViewportRect(element, strategy);
2142
+ } else if (clippingAncestor === 'document') {
2143
+ rect = getDocumentRect(getDocumentElement(element));
2144
+ } else if (floating_ui_utils_dom_isElement(clippingAncestor)) {
2145
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
2146
+ } else {
2147
+ const visualOffsets = getVisualOffsets(element);
2148
+ rect = {
2149
+ ...clippingAncestor,
2150
+ x: clippingAncestor.x - visualOffsets.x,
2151
+ y: clippingAncestor.y - visualOffsets.y
2152
+ };
2153
+ }
2154
+ return rectToClientRect(rect);
2155
+ }
2156
+ function hasFixedPositionAncestor(element, stopNode) {
2157
+ const parentNode = getParentNode(element);
2158
+ if (parentNode === stopNode || !floating_ui_utils_dom_isElement(parentNode) || isLastTraversableNode(parentNode)) {
2159
+ return false;
2160
+ }
2161
+ return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
2162
+ }
2163
+
2164
+ // A "clipping ancestor" is an `overflow` element with the characteristic of
2165
+ // clipping (or hiding) child elements. This returns all clipping ancestors
2166
+ // of the given element up the tree.
2167
+ function getClippingElementAncestors(element, cache) {
2168
+ const cachedResult = cache.get(element);
2169
+ if (cachedResult) {
2170
+ return cachedResult;
2171
+ }
2172
+ let result = getOverflowAncestors(element).filter(el => floating_ui_utils_dom_isElement(el) && getNodeName(el) !== 'body');
2173
+ let currentContainingBlockComputedStyle = null;
2174
+ const elementIsFixed = getComputedStyle(element).position === 'fixed';
2175
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
2176
+
2177
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
2178
+ while (floating_ui_utils_dom_isElement(currentNode) && !isLastTraversableNode(currentNode)) {
2179
+ const computedStyle = getComputedStyle(currentNode);
2180
+ const currentNodeIsContaining = isContainingBlock(currentNode);
2181
+ if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
2182
+ currentContainingBlockComputedStyle = null;
2183
+ }
2184
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
2185
+ if (shouldDropCurrentNode) {
2186
+ // Drop non-containing blocks.
2187
+ result = result.filter(ancestor => ancestor !== currentNode);
2188
+ } else {
2189
+ // Record last containing block for next iteration.
2190
+ currentContainingBlockComputedStyle = computedStyle;
2191
+ }
2192
+ currentNode = getParentNode(currentNode);
2193
+ }
2194
+ cache.set(element, result);
2195
+ return result;
2196
+ }
2197
+
2198
+ // Gets the maximum area that the element is visible in due to any number of
2199
+ // clipping ancestors.
2200
+ function getClippingRect(_ref) {
2201
+ let {
2202
+ element,
2203
+ boundary,
2204
+ rootBoundary,
2205
+ strategy
2206
+ } = _ref;
2207
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
2208
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
2209
+ const firstClippingAncestor = clippingAncestors[0];
2210
+ const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
2211
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
2212
+ accRect.top = floating_ui_utils_max(rect.top, accRect.top);
2213
+ accRect.right = floating_ui_utils_min(rect.right, accRect.right);
2214
+ accRect.bottom = floating_ui_utils_min(rect.bottom, accRect.bottom);
2215
+ accRect.left = floating_ui_utils_max(rect.left, accRect.left);
2216
+ return accRect;
2217
+ }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
2218
+ return {
2219
+ width: clippingRect.right - clippingRect.left,
2220
+ height: clippingRect.bottom - clippingRect.top,
2221
+ x: clippingRect.left,
2222
+ y: clippingRect.top
2223
+ };
2224
+ }
2225
+
2226
+ function getDimensions(element) {
2227
+ return getCssDimensions(element);
2228
+ }
2229
+
2230
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
2231
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
2232
+ const documentElement = getDocumentElement(offsetParent);
2233
+ const isFixed = strategy === 'fixed';
2234
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
2235
+ let scroll = {
2236
+ scrollLeft: 0,
2237
+ scrollTop: 0
2238
+ };
2239
+ const offsets = createCoords(0);
2240
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
2241
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
2242
+ scroll = getNodeScroll(offsetParent);
2243
+ }
2244
+ if (isOffsetParentAnElement) {
2245
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
2246
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
2247
+ offsets.y = offsetRect.y + offsetParent.clientTop;
2248
+ } else if (documentElement) {
2249
+ offsets.x = getWindowScrollBarX(documentElement);
2250
+ }
2251
+ }
2252
+ return {
2253
+ x: rect.left + scroll.scrollLeft - offsets.x,
2254
+ y: rect.top + scroll.scrollTop - offsets.y,
2255
+ width: rect.width,
2256
+ height: rect.height
2257
+ };
2258
+ }
2259
+
2260
+ function getTrueOffsetParent(element, polyfill) {
2261
+ if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
2262
+ return null;
2263
+ }
2264
+ if (polyfill) {
2265
+ return polyfill(element);
2266
+ }
2267
+ return element.offsetParent;
2268
+ }
2269
+ function getContainingBlock(element) {
2270
+ let currentNode = getParentNode(element);
2271
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
2272
+ if (isContainingBlock(currentNode)) {
2273
+ return currentNode;
2274
+ } else {
2275
+ currentNode = getParentNode(currentNode);
2276
+ }
2277
+ }
2278
+ return null;
2279
+ }
2280
+
2281
+ // Gets the closest ancestor positioned element. Handles some edge cases,
2282
+ // such as table ancestors and cross browser bugs.
2283
+ function getOffsetParent(element, polyfill) {
2284
+ const window = getWindow(element);
2285
+ if (!isHTMLElement(element)) {
2286
+ return window;
2287
+ }
2288
+ let offsetParent = getTrueOffsetParent(element, polyfill);
2289
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
2290
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
2291
+ }
2292
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
2293
+ return window;
2294
+ }
2295
+ return offsetParent || getContainingBlock(element) || window;
2296
+ }
2297
+
2298
+ const getElementRects = async function (_ref) {
2299
+ let {
2300
+ reference,
2301
+ floating,
2302
+ strategy
2303
+ } = _ref;
2304
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
2305
+ const getDimensionsFn = this.getDimensions;
2306
+ return {
2307
+ reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
2308
+ floating: {
2309
+ x: 0,
2310
+ y: 0,
2311
+ ...(await getDimensionsFn(floating))
2312
+ }
2313
+ };
2314
+ };
2315
+
2316
+ function isRTL(element) {
2317
+ return getComputedStyle(element).direction === 'rtl';
2318
+ }
2319
+
2320
+ const platform = {
2321
+ convertOffsetParentRelativeRectToViewportRelativeRect,
2322
+ getDocumentElement: getDocumentElement,
2323
+ getClippingRect,
2324
+ getOffsetParent,
2325
+ getElementRects,
2326
+ getClientRects,
2327
+ getDimensions,
2328
+ getScale,
2329
+ isElement: floating_ui_utils_dom_isElement,
2330
+ isRTL
2331
+ };
2332
+
2333
+ // https://samthor.au/2021/observing-dom/
2334
+ function observeMove(element, onMove) {
2335
+ let io = null;
2336
+ let timeoutId;
2337
+ const root = getDocumentElement(element);
2338
+ function cleanup() {
2339
+ clearTimeout(timeoutId);
2340
+ io && io.disconnect();
2341
+ io = null;
2342
+ }
2343
+ function refresh(skip, threshold) {
2344
+ if (skip === void 0) {
2345
+ skip = false;
2346
+ }
2347
+ if (threshold === void 0) {
2348
+ threshold = 1;
2349
+ }
2350
+ cleanup();
2351
+ const {
2352
+ left,
2353
+ top,
2354
+ width,
2355
+ height
2356
+ } = element.getBoundingClientRect();
2357
+ if (!skip) {
2358
+ onMove();
2359
+ }
2360
+ if (!width || !height) {
2361
+ return;
2362
+ }
2363
+ const insetTop = floor(top);
2364
+ const insetRight = floor(root.clientWidth - (left + width));
2365
+ const insetBottom = floor(root.clientHeight - (top + height));
2366
+ const insetLeft = floor(left);
2367
+ const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
2368
+ const options = {
2369
+ rootMargin,
2370
+ threshold: floating_ui_utils_max(0, floating_ui_utils_min(1, threshold)) || 1
2371
+ };
2372
+ let isFirstUpdate = true;
2373
+ function handleObserve(entries) {
2374
+ const ratio = entries[0].intersectionRatio;
2375
+ if (ratio !== threshold) {
2376
+ if (!isFirstUpdate) {
2377
+ return refresh();
2378
+ }
2379
+ if (!ratio) {
2380
+ timeoutId = setTimeout(() => {
2381
+ refresh(false, 1e-7);
2382
+ }, 100);
2383
+ } else {
2384
+ refresh(false, ratio);
2385
+ }
2386
+ }
2387
+ isFirstUpdate = false;
2388
+ }
2389
+
2390
+ // Older browsers don't support a `document` as the root and will throw an
2391
+ // error.
2392
+ try {
2393
+ io = new IntersectionObserver(handleObserve, {
2394
+ ...options,
2395
+ // Handle <iframe>s
2396
+ root: root.ownerDocument
2397
+ });
2398
+ } catch (e) {
2399
+ io = new IntersectionObserver(handleObserve, options);
2400
+ }
2401
+ io.observe(element);
2402
+ }
2403
+ refresh(true);
2404
+ return cleanup;
2405
+ }
2406
+
2407
+ /**
2408
+ * Automatically updates the position of the floating element when necessary.
2409
+ * Should only be called when the floating element is mounted on the DOM or
2410
+ * visible on the screen.
2411
+ * @returns cleanup function that should be invoked when the floating element is
2412
+ * removed from the DOM or hidden from the screen.
2413
+ * @see https://floating-ui.com/docs/autoUpdate
2414
+ */
2415
+ function autoUpdate(reference, floating, update, options) {
2416
+ if (options === void 0) {
2417
+ options = {};
2418
+ }
2419
+ const {
2420
+ ancestorScroll = true,
2421
+ ancestorResize = true,
2422
+ elementResize = typeof ResizeObserver === 'function',
2423
+ layoutShift = typeof IntersectionObserver === 'function',
2424
+ animationFrame = false
2425
+ } = options;
2426
+ const referenceEl = unwrapElement(reference);
2427
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
2428
+ ancestors.forEach(ancestor => {
2429
+ ancestorScroll && ancestor.addEventListener('scroll', update, {
2430
+ passive: true
2431
+ });
2432
+ ancestorResize && ancestor.addEventListener('resize', update);
2433
+ });
2434
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
2435
+ let reobserveFrame = -1;
2436
+ let resizeObserver = null;
2437
+ if (elementResize) {
2438
+ resizeObserver = new ResizeObserver(_ref => {
2439
+ let [firstEntry] = _ref;
2440
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
2441
+ // Prevent update loops when using the `size` middleware.
2442
+ // https://github.com/floating-ui/floating-ui/issues/1740
2443
+ resizeObserver.unobserve(floating);
2444
+ cancelAnimationFrame(reobserveFrame);
2445
+ reobserveFrame = requestAnimationFrame(() => {
2446
+ resizeObserver && resizeObserver.observe(floating);
2447
+ });
2448
+ }
2449
+ update();
2450
+ });
2451
+ if (referenceEl && !animationFrame) {
2452
+ resizeObserver.observe(referenceEl);
2453
+ }
2454
+ resizeObserver.observe(floating);
2455
+ }
2456
+ let frameId;
2457
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
2458
+ if (animationFrame) {
2459
+ frameLoop();
2460
+ }
2461
+ function frameLoop() {
2462
+ const nextRefRect = getBoundingClientRect(reference);
2463
+ if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
2464
+ update();
2465
+ }
2466
+ prevRefRect = nextRefRect;
2467
+ frameId = requestAnimationFrame(frameLoop);
2468
+ }
2469
+ update();
2470
+ return () => {
2471
+ ancestors.forEach(ancestor => {
2472
+ ancestorScroll && ancestor.removeEventListener('scroll', update);
2473
+ ancestorResize && ancestor.removeEventListener('resize', update);
2474
+ });
2475
+ cleanupIo && cleanupIo();
2476
+ resizeObserver && resizeObserver.disconnect();
2477
+ resizeObserver = null;
2478
+ if (animationFrame) {
2479
+ cancelAnimationFrame(frameId);
2480
+ }
2481
+ };
2482
+ }
2483
+
2484
+ /**
2485
+ * Computes the `x` and `y` coordinates that will place the floating element
2486
+ * next to a reference element when it is given a certain CSS positioning
2487
+ * strategy.
2488
+ */
2489
+ const floating_ui_dom_computePosition = (reference, floating, options) => {
2490
+ // This caches the expensive `getClippingElementAncestors` function so that
2491
+ // multiple lifecycle resets re-use the same result. It only lives for a
2492
+ // single call. If other functions become expensive, we can add them as well.
2493
+ const cache = new Map();
2494
+ const mergedOptions = {
2495
+ platform,
2496
+ ...options
2497
+ };
2498
+ const platformWithCache = {
2499
+ ...mergedOptions.platform,
2500
+ _c: cache
2501
+ };
2502
+ return computePosition(reference, floating, {
2503
+ ...mergedOptions,
2504
+ platform: platformWithCache
2505
+ });
2506
+ };
2507
+
2508
+
2509
+
2510
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/native.js
2511
+ const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
2512
+ /* harmony default export */ const esm_browser_native = ({
2513
+ randomUUID
2514
+ });
2515
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/rng.js
2516
+ // Unique ID creation requires a high quality random # generator. In the browser we therefore
2517
+ // require the crypto API and do not support built-in fallback to lower quality random number
2518
+ // generators (like Math.random()).
2519
+ let getRandomValues;
2520
+ const rnds8 = new Uint8Array(16);
2521
+ function rng() {
2522
+ // lazy load so that environments that need to polyfill have a chance to do so
2523
+ if (!getRandomValues) {
2524
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
2525
+ getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
2526
+
2527
+ if (!getRandomValues) {
2528
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
2529
+ }
2530
+ }
2531
+
2532
+ return getRandomValues(rnds8);
2533
+ }
2534
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/stringify.js
2535
+
2536
+ /**
2537
+ * Convert array of 16 byte values to UUID string format of the form:
2538
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
2539
+ */
2540
+
2541
+ const byteToHex = [];
2542
+
2543
+ for (let i = 0; i < 256; ++i) {
2544
+ byteToHex.push((i + 0x100).toString(16).slice(1));
2545
+ }
2546
+
2547
+ function unsafeStringify(arr, offset = 0) {
2548
+ // Note: Be careful editing this code! It's been tuned for performance
2549
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
2550
+ return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
2551
+ }
2552
+
2553
+ function stringify(arr, offset = 0) {
2554
+ const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
2555
+ // of the following:
2556
+ // - One or more input array values don't map to a hex octet (leading to
2557
+ // "undefined" in the uuid)
2558
+ // - Invalid input values for the RFC `version` or `variant` fields
2559
+
2560
+ if (!validate(uuid)) {
2561
+ throw TypeError('Stringified UUID is invalid');
2562
+ }
2563
+
2564
+ return uuid;
2565
+ }
2566
+
2567
+ /* harmony default export */ const esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify)));
2568
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/v4.js
2569
+
2570
+
2571
+
2572
+
2573
+ function v4(options, buf, offset) {
2574
+ if (esm_browser_native.randomUUID && !buf && !options) {
2575
+ return esm_browser_native.randomUUID();
2576
+ }
2577
+
2578
+ options = options || {};
2579
+ const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
2580
+
2581
+ rnds[6] = rnds[6] & 0x0f | 0x40;
2582
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
2583
+
2584
+ if (buf) {
2585
+ offset = offset || 0;
2586
+
2587
+ for (let i = 0; i < 16; ++i) {
2588
+ buf[offset + i] = rnds[i];
2589
+ }
2590
+
2591
+ return buf;
2592
+ }
2593
+
2594
+ return unsafeStringify(rnds);
2595
+ }
2596
+
2597
+ /* harmony default export */ const esm_browser_v4 = (v4);
2598
+ ;// CONCATENATED MODULE: ../../packages/popover/src/utils.ts
2599
+ /*
2600
+ * Tencent is pleased to support the open source community by making
2601
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2602
+ *
2603
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2604
+ *
2605
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2606
+ *
2607
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2608
+ *
2609
+ * ---------------------------------------------------
2610
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2611
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2612
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2613
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2614
+ *
2615
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2616
+ * the Software.
2617
+ *
2618
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2619
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2620
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2621
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2622
+ * IN THE SOFTWARE.
2623
+ */
2624
+
2625
+ var CachedConst = {};
2626
+ var isAvailableId = function isAvailableId(query) {
2627
+ var container = document.querySelector(query);
2628
+ return container instanceof HTMLElement;
2629
+ };
2630
+ var getFullscreenUid = function getFullscreenUid() {
2631
+ if (!CachedConst.fullscreenReferId) {
2632
+ CachedConst.fullscreenReferId = "id_".concat(esm_browser_v4());
2633
+ }
2634
+ return CachedConst.fullscreenReferId;
2635
+ };
2636
+ var utils_isElement = function isElement(element) {
2637
+ return element instanceof Element || element instanceof HTMLDocument;
2638
+ };
2639
+ var contentAsHTMLElement = function contentAsHTMLElement(content) {
2640
+ if (utils_isElement(content)) {
2641
+ return {
2642
+ isElement: true,
2643
+ content: content,
2644
+ vNode: undefined
2645
+ };
2646
+ }
2647
+ if (/^(#|\.)/.test(content)) {
2648
+ var target = document.querySelector(content);
2649
+ var isEle = utils_isElement(target);
2650
+ return {
2651
+ isElement: isEle,
2652
+ content: isEle ? target : content,
2653
+ vNode: isEle ? undefined : content
2654
+ };
2655
+ }
2656
+ return {
2657
+ isElement: false,
2658
+ content: content,
2659
+ vNode: content
2660
+ };
2661
+ };
2662
+ ;// CONCATENATED MODULE: ../../packages/popover/src/use-floating.tsx
2663
+
2664
+
2665
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2666
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2667
+ /*
2668
+ * Tencent is pleased to support the open source community by making
2669
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2670
+ *
2671
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2672
+ *
2673
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2674
+ *
2675
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2676
+ *
2677
+ * ---------------------------------------------------
2678
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2679
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2680
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2681
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2682
+ *
2683
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2684
+ * the Software.
2685
+ *
2686
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2687
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2688
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2689
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2690
+ * IN THE SOFTWARE.
2691
+ */
2692
+
2693
+
2694
+
2695
+
2696
+
2697
+ // import usePlatform from './use-platform';
2698
+
2699
+ /**
2700
+ * 解析popover相关配置
2701
+ */
2702
+ /* harmony default export */ const use_floating = (function (props, ctx, _ref) {
2703
+ var refReference = _ref.refReference,
2704
+ refContent = _ref.refContent,
2705
+ refArrow = _ref.refArrow,
2706
+ refRoot = _ref.refRoot;
2707
+ var localIsShow = (0,external_vue_namespaceObject.ref)(false);
2708
+ var fullScreenTarget = (0,external_vue_namespaceObject.ref)();
2709
+ var isElementFullScreen = function isElementFullScreen() {
2710
+ var _document$fullscreenE, _document$fullscreenE2;
2711
+ var elReference = resolveReferElement();
2712
+ if ((_document$fullscreenE = document.fullscreenElement) !== null && _document$fullscreenE !== void 0 && _document$fullscreenE.shadowRoot) {
2713
+ return document.fullscreenElement.shadowRoot.contains(elReference);
2714
+ }
2715
+ return (_document$fullscreenE2 = document.fullscreenElement) === null || _document$fullscreenE2 === void 0 ? void 0 : _document$fullscreenE2.contains(elReference);
2716
+ };
2717
+ /**
2718
+ * 当全屏模式开启,获取指定选择器下面的全屏元素
2719
+ * 如果是启用了webcomponent组件,则返回shadowRoot内指定的目标元素
2720
+ * @param selector
2721
+ * @returns
2722
+ */
2723
+ var getFullscreenRoot = function getFullscreenRoot(selector) {
2724
+ if (isElementFullScreen()) {
2725
+ if (document.fullscreenElement.shadowRoot) {
2726
+ return document.fullscreenElement.shadowRoot.querySelector(selector);
2727
+ }
2728
+ return document.fullscreenElement.querySelector(selector);
2729
+ }
2730
+ return document.body;
2731
+ };
2732
+ var themeList = ['dark', 'light'];
2733
+ /**
2734
+ * 根据props.theme计算theme
2735
+ * 返回systemTheme & customTheme
2736
+ * systemTheme是指包含在 ['dark', 'light'] 内置主题
2737
+ * customTheme是指自定义的theme,string类型
2738
+ */
2739
+ var compTheme = (0,external_vue_namespaceObject.computed)(function () {
2740
+ var _props$theme$split, _props$theme;
2741
+ var themes = (_props$theme$split = (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.split(/\s+/)) !== null && _props$theme$split !== void 0 ? _props$theme$split : [];
2742
+ themes.sort(function (a, b) {
2743
+ return Number(themeList.includes(b)) - Number(themeList.includes(a));
2744
+ });
2745
+ var systemThemes = themes;
2746
+ var customThemes = themes.filter(function (item) {
2747
+ return !themeList.includes(item);
2748
+ });
2749
+ return {
2750
+ systemThemes: systemThemes,
2751
+ customThemes: customThemes
2752
+ };
2753
+ });
2754
+ var isHideMiddlewareAvailable = function isHideMiddlewareAvailable() {
2755
+ return props.autoVisibility;
2756
+ };
2757
+ var isAutoPlacementAvailable = function isAutoPlacementAvailable() {
2758
+ return props.autoPlacement;
2759
+ };
2760
+ /**
2761
+ * 解析弹出reference元素,content元素, arrow元素
2762
+ * @returns
2763
+ */
2764
+ var resolvePopElements = function resolvePopElements() {
2765
+ var _refContent$value, _refArrow$value, _refRoot$value;
2766
+ var elReference = resolveReferElement();
2767
+ var elContent = resolveTargetElement((_refContent$value = refContent.value) === null || _refContent$value === void 0 ? void 0 : _refContent$value.$el);
2768
+ var elArrow = props.arrow ? resolveTargetElement((_refArrow$value = refArrow.value) === null || _refArrow$value === void 0 ? void 0 : _refArrow$value.$el) : null;
2769
+ var root = resolveTargetElement((_refRoot$value = refRoot.value) === null || _refRoot$value === void 0 ? void 0 : _refRoot$value.$el);
2770
+ var _contentAsHTMLElement = contentAsHTMLElement(props.content),
2771
+ isElement = _contentAsHTMLElement.isElement,
2772
+ content = _contentAsHTMLElement.content;
2773
+ if (elContent && isElement && !(elContent !== null && elContent !== void 0 && elContent.contains(content))) {
2774
+ elContent.append(content);
2775
+ }
2776
+ return {
2777
+ elReference: elReference,
2778
+ elContent: elContent,
2779
+ elArrow: elArrow,
2780
+ root: root
2781
+ };
2782
+ };
2783
+ var resolveReferElement = function resolveReferElement() {
2784
+ var _refReference$value;
2785
+ return resolveTargetElement(props.target) || resolveTargetElement((_refReference$value = refReference.value) === null || _refReference$value === void 0 ? void 0 : _refReference$value.$el);
2786
+ };
2787
+ var resolveModifiers = function resolveModifiers() {
2788
+ var resolveResult = {};
2789
+ if (Array.isArray(props.modifiers)) {
2790
+ props.modifiers.forEach(function (m) {
2791
+ var result;
2792
+ if (m.name === 'offset') {
2793
+ var _m$options, _m$options3;
2794
+ if (typeof ((_m$options = m.options) === null || _m$options === void 0 ? void 0 : _m$options.offset) === 'number') {
2795
+ var _m$options2;
2796
+ result = (_m$options2 = m.options) === null || _m$options2 === void 0 ? void 0 : _m$options2.offset;
2797
+ }
2798
+ if (Array.isArray((_m$options3 = m.options) === null || _m$options3 === void 0 ? void 0 : _m$options3.offset)) {
2799
+ var _m$options4;
2800
+ var _m$options$offset = (_m$options4 = m.options) === null || _m$options4 === void 0 ? void 0 : _m$options4.offset,
2801
+ _m$options$offset2 = _slicedToArray(_m$options$offset, 2),
2802
+ mainAxis = _m$options$offset2[0],
2803
+ crossAxis = _m$options$offset2[1];
2804
+ result = {
2805
+ mainAxis: mainAxis,
2806
+ crossAxis: crossAxis
2807
+ };
2808
+ }
2809
+ Object.assign(resolveResult, {
2810
+ offset: result
2811
+ });
2812
+ }
2813
+ });
2814
+ }
2815
+ return resolveResult;
2816
+ };
2817
+ var resolvePopOptions = function resolvePopOptions(elArrow, props) {
2818
+ var modifiers = resolveModifiers();
2819
+ var middleware = [offset(modifiers.offset || props.offset), shift({
2820
+ padding: props.padding
2821
+ })];
2822
+ var options = {
2823
+ placement: props.placement,
2824
+ middleware: middleware
2825
+ };
2826
+ if (props.arrow) {
2827
+ middleware.push(arrow({
2828
+ element: elArrow
2829
+ }));
2830
+ }
2831
+ if (isAutoPlacementAvailable()) {
2832
+ middleware.push(autoPlacement());
2833
+ }
2834
+ middleware.unshift(inline());
2835
+ middleware.push(flip());
2836
+ if (isHideMiddlewareAvailable()) {
2837
+ options.middleware.push(hide());
2838
+ }
2839
+ /**
2840
+ * 如果是全屏元素或者指定的虚拟元素
2841
+ * 则启用自定义的platform
2842
+ * 在弹出的全屏元素中,元素相对位置有别于document下面元素
2843
+ * 全屏模式下面,需要自定义当前元素的一个platform
2844
+ */
2845
+ // if (isElementFullScreen() || props.isVirtualEl) {
2846
+ // const { getElementRects, getDimensions, getClippingRect } = usePlatform(fullScreenTarget.value);
2847
+ // Object.assign(options, {
2848
+ // platform: {
2849
+ // ...(props?.platform ?? {}),
2850
+ // getElementRects,
2851
+ // getDimensions,
2852
+ // getClippingRect,
2853
+ // },
2854
+ // });
2855
+ // }
2856
+ return options;
2857
+ };
2858
+ var resolveTargetElement = function resolveTargetElement(target) {
2859
+ if (target instanceof HTMLElement) {
2860
+ return target;
2861
+ }
2862
+ if (target instanceof Text) {
2863
+ return resolveTargetElement(target.nextElementSibling);
2864
+ }
2865
+ if (typeof (target === null || target === void 0 ? void 0 : target.getBoundingClientRect) === 'function') {
2866
+ return target;
2867
+ }
2868
+ if (typeof target === 'string') {
2869
+ var targetEl = document.querySelector(target);
2870
+ if ((0,isElement_namespaceObject["default"])(targetEl)) {
2871
+ return targetEl;
2872
+ }
2873
+ return null;
2874
+ }
2875
+ if (target instanceof PointerEvent) {
2876
+ return resolveTargetElement(target.target);
2877
+ }
2878
+ return null;
2879
+ };
2880
+ // 兼容多种样式处理规则
2881
+ // class custom-theme
2882
+ var customThemeCls = compTheme.value.customThemes.join(' ');
2883
+ var customTheme = compTheme.value.customThemes.reduce(function (out, cur) {
2884
+ return _objectSpread(_defineProperty({}, "data-".concat(cur, "-theme"), true), out);
2885
+ }, {});
2886
+ var contentClass = "".concat(customThemeCls);
2887
+ var cleanup = null;
2888
+ var getRoundPixelVal = function getRoundPixelVal(val) {
2889
+ var dpr = window.devicePixelRatio || 1;
2890
+ return Math.round(val * dpr) / dpr || 0;
2891
+ };
2892
+ var updatePopContentStyle = function updatePopContentStyle(elContent, x, y, middlewareData) {
2893
+ var _middlewareData$hide;
2894
+ if (props.disableTransform) {
2895
+ Object.assign(elContent.style, {
2896
+ left: "".concat(getRoundPixelVal(x), "px"),
2897
+ top: "".concat(getRoundPixelVal(y), "px")
2898
+ });
2899
+ } else {
2900
+ Object.assign(elContent.style, {
2901
+ left: '0',
2902
+ top: '0',
2903
+ transform: "translate3d(".concat(getRoundPixelVal(x), "px,").concat(getRoundPixelVal(y), "px,0)")
2904
+ });
2905
+ }
2906
+ var referenceHidden = isHideMiddlewareAvailable() ? (_middlewareData$hide = middlewareData.hide) === null || _middlewareData$hide === void 0 ? void 0 : _middlewareData$hide.referenceHidden : false;
2907
+ Object.assign(elContent.style, {
2908
+ visibility: referenceHidden ? 'hidden' : 'visible'
2909
+ });
2910
+ };
2911
+ var updateArrowStyle = function updateArrowStyle(elArrow, resolvedPlacement, middlewareData) {
2912
+ if (props.arrow) {
2913
+ var _middlewareData$arrow;
2914
+ var _ref2 = (_middlewareData$arrow = middlewareData.arrow) !== null && _middlewareData$arrow !== void 0 ? _middlewareData$arrow : {},
2915
+ arrowX = _ref2.x,
2916
+ arrowY = _ref2.y;
2917
+ elArrow.setAttribute('data-arrow', resolvedPlacement);
2918
+ var arrowConfig = {
2919
+ left: '',
2920
+ top: '',
2921
+ bottom: '',
2922
+ right: ''
2923
+ };
2924
+ Object.assign(elArrow.style, arrowConfig);
2925
+ var arrowSide = {
2926
+ top: 'bottom',
2927
+ right: 'left',
2928
+ bottom: 'top',
2929
+ left: 'right'
2930
+ }[resolvedPlacement];
2931
+ Object.assign(elArrow.style, _defineProperty({
2932
+ left: arrowX !== null ? "".concat(arrowX, "px") : '',
2933
+ top: arrowY !== null ? "".concat(arrowY, "px") : ''
2934
+ }, arrowSide, '-4px'));
2935
+ }
2936
+ };
2937
+ var createPopInstance = function createPopInstance() {
2938
+ var _resolvePopElements = resolvePopElements(),
2939
+ elReference = _resolvePopElements.elReference,
2940
+ elContent = _resolvePopElements.elContent;
2941
+ cleanup = autoUpdate(elReference, elContent, function () {
2942
+ if (localIsShow.value) {
2943
+ updatePopover(null, props);
2944
+ }
2945
+ });
2946
+ };
2947
+ var updatePopover = function updatePopover() {
2948
+ var virtualEl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
2949
+ var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2950
+ var callFn = arguments.length > 2 ? arguments[2] : undefined;
2951
+ var _resolvePopElements2 = resolvePopElements(),
2952
+ elReference = _resolvePopElements2.elReference,
2953
+ elContent = _resolvePopElements2.elContent,
2954
+ elArrow = _resolvePopElements2.elArrow;
2955
+ var targetEl = virtualEl || elReference;
2956
+ if (!targetEl || !elContent) return;
2957
+ var options = resolvePopOptions(elArrow, props);
2958
+ floating_ui_dom_computePosition(targetEl, elContent, options).then(function (_ref3) {
2959
+ var x = _ref3.x,
2960
+ y = _ref3.y,
2961
+ placement = _ref3.placement,
2962
+ middlewareData = _ref3.middlewareData;
2963
+ var oldClass = elContent.className;
2964
+ elContent.className = "".concat(oldClass.replace(contentClass, ''), " ").concat(contentClass).replace(/\s+/gm, ' ').replace(/^\s+|\s+$/g, '');
2965
+ Object.keys(customTheme).forEach(function (key) {
2966
+ elContent.setAttribute(key, customTheme[key]);
2967
+ });
2968
+ var placementStr = placement.split('-')[0];
2969
+ var resolvedPlacement = placementStr;
2970
+ if (!['left', 'right', 'top', 'bottom'].includes(placementStr)) {
2971
+ resolvedPlacement = 'top';
2972
+ }
2973
+ updatePopContentStyle(elContent, x, y, middlewareData);
2974
+ updateArrowStyle(elArrow, resolvedPlacement, middlewareData);
2975
+ if (typeof callFn === 'function') {
2976
+ callFn();
2977
+ }
2978
+ });
2979
+ };
2980
+ var popHideTimerId = undefined;
2981
+ var popShowTimerId = undefined;
2982
+ var isMouseenter = false;
2983
+ var resolvePopoverDelay = function resolvePopoverDelay() {
2984
+ if (Array.isArray(props.popoverDelay)) {
2985
+ return [props.popoverDelay[0], props.popoverDelay.slice(-1)[0]];
2986
+ }
2987
+ return [props.popoverDelay, props.popoverDelay];
2988
+ };
2989
+ var showPopover = function showPopover() {
2990
+ var delay = resolvePopoverDelay()[0];
2991
+ // 设置settimeout避免hidePopover导致显示问题
2992
+ popShowTimerId = setTimeout(function () {
2993
+ if (popHideTimerId) {
2994
+ clearTimeout(popHideTimerId);
2995
+ }
2996
+ if (!props.disabled) {
2997
+ localIsShow.value = true;
2998
+ }
2999
+ }, delay);
3000
+ };
3001
+ var hidePopover = function hidePopover() {
3002
+ var delay = resolvePopoverDelay()[1];
3003
+ popHideTimerId = setTimeout(function () {
3004
+ popShowTimerId && clearTimeout(popShowTimerId);
3005
+ localIsShow.value = false;
3006
+ }, delay);
3007
+ };
3008
+ var handlePopoverShow = function handlePopoverShow() {
3009
+ var _refContent$value2;
3010
+ var elContent = resolveTargetElement((_refContent$value2 = refContent.value) === null || _refContent$value2 === void 0 ? void 0 : _refContent$value2.$el);
3011
+ elContent.style.setProperty('display', 'block');
3012
+ elContent.style.setProperty('z-index', "".concat(props.zIndex ? props.zIndex : external_shared_namespaceObject.bkZIndexManager.getPopperIndex()));
3013
+ updatePopover();
3014
+ ctx.emit(EMIT_EVENTS.CONTENT_AfterShow, {
3015
+ isShow: true
3016
+ });
3017
+ };
3018
+ var handlePopoverHide = function handlePopoverHide() {
3019
+ var _refContent$value3;
3020
+ var elContent = resolveTargetElement((_refContent$value3 = refContent.value) === null || _refContent$value3 === void 0 ? void 0 : _refContent$value3.$el);
3021
+ elContent.style.setProperty('display', 'none');
3022
+ ctx.emit(EMIT_EVENTS.CONTENT_AfterHidden, {
3023
+ isShow: false
3024
+ });
3025
+ };
3026
+ var triggerPopover = function triggerPopover() {
3027
+ if (!localIsShow.value) {
3028
+ showPopover();
3029
+ } else {
3030
+ hidePopover();
3031
+ }
3032
+ };
3033
+ var handleClickRef = function handleClickRef() {
3034
+ triggerPopover();
3035
+ };
3036
+ var handlePopContentMouseEnter = function handlePopContentMouseEnter(e) {
3037
+ if (props.trigger !== 'hover') {
3038
+ return;
3039
+ }
3040
+ if (popHideTimerId) {
3041
+ isMouseenter = true;
3042
+ clearTimeout(popHideTimerId);
3043
+ popHideTimerId = undefined;
3044
+ }
3045
+ emitPopContentMouseEnter(e);
3046
+ };
3047
+ var handlePopContentMouseLeave = function handlePopContentMouseLeave(e) {
3048
+ if (isMouseenter) {
3049
+ hidePopover();
3050
+ isMouseenter = false;
3051
+ emitPopContentMouseLeave(e);
3052
+ }
3053
+ };
3054
+ /**
3055
+ * 弹出内容鼠标移入事件
3056
+ * 抛出相关事件,方便后续操作
3057
+ * 例如:鼠标移入内容区域,则取消弹出内容隐藏操作
3058
+ */
3059
+ var emitPopContentMouseEnter = function emitPopContentMouseEnter(e) {
3060
+ ctx.emit(EMIT_EVENTS.CONTENT_MOUSEENTER, e);
3061
+ };
3062
+ /**
3063
+ * 弹出内容鼠标移出事件
3064
+ */
3065
+ var emitPopContentMouseLeave = function emitPopContentMouseLeave(e) {
3066
+ ctx.emit(EMIT_EVENTS.CONTENT_MOUSELEAVE, e);
3067
+ };
3068
+ var resolveTriggerEvents = function resolveTriggerEvents() {
3069
+ var _triggerEvents$props$;
3070
+ var triggerEvents = {
3071
+ hover: {
3072
+ content: [['mouseenter', handlePopContentMouseEnter], ['mouseleave', handlePopContentMouseLeave]],
3073
+ reference: [['mouseenter', showPopover], ['mouseleave', hidePopover], ['focus', showPopover], ['blur', hidePopover]]
3074
+ },
3075
+ click: [['click', handleClickRef]],
3076
+ manual: {
3077
+ content: [['mouseenter', emitPopContentMouseEnter], ['mouseleave', emitPopContentMouseLeave]],
3078
+ reference: [[]]
3079
+ }
3080
+ };
3081
+ return (_triggerEvents$props$ = triggerEvents[props.trigger]) !== null && _triggerEvents$props$ !== void 0 ? _triggerEvents$props$ : [];
3082
+ };
3083
+ var updateFullscreenTarget = function updateFullscreenTarget(val) {
3084
+ fullScreenTarget.value = val;
3085
+ };
3086
+ (0,external_vue_namespaceObject.watch)(function () {
3087
+ return props.isShow;
3088
+ }, function (val) {
3089
+ localIsShow.value = val;
3090
+ });
3091
+ (0,external_vue_namespaceObject.watch)(localIsShow, function (val) {
3092
+ if (val) {
3093
+ handlePopoverShow();
3094
+ } else {
3095
+ handlePopoverHide();
3096
+ }
3097
+ });
3098
+ var stopHide = function stopHide() {
3099
+ if (popHideTimerId) {
3100
+ isMouseenter = true;
3101
+ clearTimeout(popHideTimerId);
3102
+ popHideTimerId = undefined;
3103
+ }
3104
+ };
3105
+ return {
3106
+ showPopover: showPopover,
3107
+ hidePopover: hidePopover,
3108
+ resolveTriggerEvents: resolveTriggerEvents,
3109
+ updatePopover: updatePopover,
3110
+ triggerPopover: triggerPopover,
3111
+ resolvePopElements: resolvePopElements,
3112
+ isElementFullScreen: isElementFullScreen,
3113
+ resolveTargetElement: resolveTargetElement,
3114
+ createPopInstance: createPopInstance,
3115
+ updateFullscreenTarget: updateFullscreenTarget,
3116
+ getFullscreenRoot: getFullscreenRoot,
3117
+ stopHide: stopHide,
3118
+ localIsShow: localIsShow,
3119
+ cleanup: cleanup
3120
+ };
3121
+ });
3122
+ ;// CONCATENATED MODULE: ../../packages/popover/src/use-popper-id.ts
3123
+ /*
3124
+ * Tencent is pleased to support the open source community by making
3125
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3126
+ *
3127
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3128
+ *
3129
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3130
+ *
3131
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3132
+ *
3133
+ * ---------------------------------------------------
3134
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3135
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3136
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3137
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3138
+ *
3139
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3140
+ * the Software.
3141
+ *
3142
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3143
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3144
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3145
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3146
+ * IN THE SOFTWARE.
3147
+ */
3148
+
3149
+
3150
+ var popContainerId = null;
3151
+ var parentNodeReferId = null;
3152
+ /* harmony default export */ const use_popper_id = (function (props) {
3153
+ var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '#';
3154
+ var getPrefixId = function getPrefixId(root) {
3155
+ var resolvedBoundary = null;
3156
+ var resolveBoundary = function resolveBoundary(fn) {
3157
+ if (resolvedBoundary === null) {
3158
+ fn();
3159
+ }
3160
+ };
3161
+ var resolveParentBoundary = function resolveParentBoundary() {
3162
+ if (/^parent$/i.test(props.boundary)) {
3163
+ resolvedBoundary = "".concat(prefix).concat(popContainerId);
3164
+ var _ref = root || {},
3165
+ parentNode = _ref.parentNode;
3166
+ if (parentNode !== null && parentNode !== void 0 && parentNode.parentNode) {
3167
+ parentNode.parentNode.setAttribute('data-pnode-id', parentNodeReferId);
3168
+ resolvedBoundary = "[data-pnode-id=".concat(parentNodeReferId, "]");
3169
+ }
3170
+ }
3171
+ };
3172
+ var resolveCommonBoundary = function resolveCommonBoundary() {
3173
+ if (!/^body$/i.test(props.boundary)) {
3174
+ if (typeof props.boundary === 'string') {
3175
+ if (!isAvailableId(props.boundary)) {
3176
+ // console.error('props.boundary is not available selector');
3177
+ resolvedBoundary = 'body';
3178
+ return;
3179
+ }
3180
+ resolvedBoundary = props.boundary;
3181
+ return;
3182
+ }
3183
+ if (utils_isElement(props.boundary)) {
3184
+ resolvedBoundary = props.boundary;
3185
+ return;
3186
+ }
3187
+ }
3188
+ };
3189
+ resolveBoundary(resolveParentBoundary);
3190
+ resolveBoundary(resolveCommonBoundary);
3191
+ resolveBoundary(function () {
3192
+ resolvedBoundary = typeof props.boundary === 'string' ? props.boundary : "".concat(prefix).concat(popContainerId);
3193
+ });
3194
+ return resolvedBoundary;
3195
+ };
3196
+ if (popContainerId === null || !isAvailableId("#".concat(popContainerId))) {
3197
+ popContainerId = "id_".concat(esm_browser_v4());
3198
+ var popContainer = document.createElement('div');
3199
+ popContainer.setAttribute('id', popContainerId);
3200
+ popContainer.setAttribute('data-popper-id', popContainerId);
3201
+ document.body.append(popContainer);
3202
+ }
3203
+ if (parentNodeReferId === null) {
3204
+ parentNodeReferId = "id_".concat(esm_browser_v4());
3205
+ }
3206
+ return {
3207
+ popContainerId: popContainerId,
3208
+ prefixId: getPrefixId(),
3209
+ getPrefixId: getPrefixId
3210
+ };
3211
+ });
3212
+ ;// CONCATENATED MODULE: ../../packages/popover/src/use-popover-init.ts
3213
+
3214
+ /*
3215
+ * Tencent is pleased to support the open source community by making
3216
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3217
+ *
3218
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3219
+ *
3220
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3221
+ *
3222
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3223
+ *
3224
+ * ---------------------------------------------------
3225
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3226
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3227
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3228
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3229
+ *
3230
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3231
+ * the Software.
3232
+ *
3233
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3234
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3235
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3236
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3237
+ * IN THE SOFTWARE.
3238
+ */
3239
+
3240
+
3241
+
3242
+
3243
+
3244
+ /* harmony default export */ const use_popover_init = (function (props, ctx, _ref) {
3245
+ var refReference = _ref.refReference,
3246
+ refContent = _ref.refContent,
3247
+ refArrow = _ref.refArrow,
3248
+ refRoot = _ref.refRoot;
3249
+ var storeEvents = null;
3250
+ var isFullscreen = (0,external_vue_namespaceObject.ref)(false);
3251
+ var fullscreenReferId = getFullscreenUid();
3252
+ var fullScreenTarget = (0,external_vue_namespaceObject.ref)();
3253
+ var _useFloating = use_floating(props, ctx, {
3254
+ refReference: refReference,
3255
+ refContent: refContent,
3256
+ refArrow: refArrow,
3257
+ refRoot: refRoot
3258
+ }),
3259
+ localIsShow = _useFloating.localIsShow,
3260
+ showPopover = _useFloating.showPopover,
3261
+ hidePopover = _useFloating.hidePopover,
3262
+ updatePopover = _useFloating.updatePopover,
3263
+ cleanup = _useFloating.cleanup,
3264
+ resolveTriggerEvents = _useFloating.resolveTriggerEvents,
3265
+ resolvePopElements = _useFloating.resolvePopElements,
3266
+ isElementFullScreen = _useFloating.isElementFullScreen,
3267
+ updateFullscreenTarget = _useFloating.updateFullscreenTarget,
3268
+ createPopInstance = _useFloating.createPopInstance,
3269
+ getFullscreenRoot = _useFloating.getFullscreenRoot,
3270
+ stopHide = _useFloating.stopHide;
3271
+ var resetPopover = function resetPopover() {
3272
+ cleanup === null || cleanup === void 0 ? void 0 : cleanup();
3273
+ createPopInstance();
3274
+ };
3275
+ var showFn = function showFn() {
3276
+ showPopover();
3277
+ };
3278
+ var hideFn = function hideFn() {
3279
+ hidePopover();
3280
+ };
3281
+ var initPopInstance = function initPopInstance() {
3282
+ createPopInstance();
3283
+ if (props.always) {
3284
+ showPopover();
3285
+ } else {
3286
+ addEventToPopTargetEl();
3287
+ }
3288
+ };
3289
+ var addEventToPopTargetEl = function addEventToPopTargetEl() {
3290
+ var _resolvePopElements = resolvePopElements(),
3291
+ elReference = _resolvePopElements.elReference,
3292
+ elContent = _resolvePopElements.elContent;
3293
+ storeEvents = resolveTriggerEvents();
3294
+ if (Array.isArray(storeEvents)) {
3295
+ addEventToTargetEl(elReference, storeEvents);
3296
+ } else {
3297
+ var _storeEvents = storeEvents,
3298
+ content = _storeEvents.content,
3299
+ reference = _storeEvents.reference;
3300
+ addEventToTargetEl(elReference, reference);
3301
+ addEventToTargetEl(elContent, content);
3302
+ }
3303
+ };
3304
+ var addEventToTargetEl = function addEventToTargetEl(target, evets) {
3305
+ evets.forEach(function (_ref2) {
3306
+ var _ref3 = _slicedToArray(_ref2, 2),
3307
+ event = _ref3[0],
3308
+ listener = _ref3[1];
3309
+ if (event && typeof listener === 'function') {
3310
+ target.addEventListener(event, listener);
3311
+ }
3312
+ });
3313
+ };
3314
+ var removeEventListener = function removeEventListener() {
3315
+ var _storeEvents2;
3316
+ if ((_storeEvents2 = storeEvents) !== null && _storeEvents2 !== void 0 && _storeEvents2.length) {
3317
+ var _resolvePopElements2 = resolvePopElements(),
3318
+ elReference = _resolvePopElements2.elReference;
3319
+ if (elReference) {
3320
+ storeEvents.forEach(function (_ref4) {
3321
+ var _ref5 = _slicedToArray(_ref4, 2),
3322
+ event = _ref5[0],
3323
+ listener = _ref5[1];
3324
+ if (event && typeof listener === 'function') {
3325
+ elReference.removeEventListener(event, listener);
3326
+ }
3327
+ });
3328
+ }
3329
+ storeEvents = null;
3330
+ }
3331
+ };
3332
+ var updateBoundary = function updateBoundary() {
3333
+ var _resolvePopElements3 = resolvePopElements(),
3334
+ elReference = _resolvePopElements3.elReference,
3335
+ root = _resolvePopElements3.root;
3336
+ if (isFullscreen.value) {
3337
+ var _ref6 = elReference || root || {},
3338
+ parentNode = _ref6.parentNode;
3339
+ boundary.value = (fullScreenTarget === null || fullScreenTarget === void 0 ? void 0 : fullScreenTarget.value) || parentNode;
3340
+ return;
3341
+ }
3342
+ boundary.value = getPrefixId(root || elReference);
3343
+ };
3344
+ var _usePopperId = use_popper_id(props, '#'),
3345
+ getPrefixId = _usePopperId.getPrefixId;
3346
+ var setFullscreenTag = function setFullscreenTag() {
3347
+ var _fullScreenTarget$val;
3348
+ fullScreenTarget === null || fullScreenTarget === void 0 || (_fullScreenTarget$val = fullScreenTarget.value) === null || _fullScreenTarget$val === void 0 ? void 0 : _fullScreenTarget$val.setAttribute('data-fllsrn-id', fullscreenReferId);
3349
+ };
3350
+ var clearFullscreenTag = function clearFullscreenTag() {
3351
+ var _fullScreenTarget$val2, _fullScreenTarget$val3;
3352
+ var query = "[data-fllsrn-id=".concat(fullscreenReferId, "]");
3353
+ ((_fullScreenTarget$val2 = fullScreenTarget === null || fullScreenTarget === void 0 || (_fullScreenTarget$val3 = fullScreenTarget.value) === null || _fullScreenTarget$val3 === void 0 ? void 0 : _fullScreenTarget$val3.querySelectorAll(query)) !== null && _fullScreenTarget$val2 !== void 0 ? _fullScreenTarget$val2 : []).forEach(function (element) {
3354
+ element === null || element === void 0 ? void 0 : element.removeAttribute('data-fllsrn-id');
3355
+ });
3356
+ };
3357
+ var boundary = (0,external_vue_namespaceObject.ref)();
3358
+ var beforeInstanceUnmount = function beforeInstanceUnmount() {
3359
+ removeEventListener();
3360
+ };
3361
+ var updateFullscreen = function updateFullscreen(target) {
3362
+ fullScreenTarget.value = target;
3363
+ updateFullscreenTarget(target);
3364
+ isFullscreen.value = isElementFullScreen();
3365
+ setFullscreenTag();
3366
+ };
3367
+ var handleFullscreenChange = function handleFullscreenChange(e) {
3368
+ if (!document.fullscreenElement) {
3369
+ clearFullscreenTag();
3370
+ }
3371
+ updateFullscreen(e.target);
3372
+ updateBoundary();
3373
+ updatePopover(null, props);
3374
+ };
3375
+ var onMountedFn = function onMountedFn() {
3376
+ if (props.disabled) {
3377
+ return;
3378
+ }
3379
+ initPopInstance();
3380
+ if (isElementFullScreen()) {
3381
+ var query = "[data-fllsrn-id=".concat(fullscreenReferId, "]");
3382
+ var target = getFullscreenRoot(query);
3383
+ updateFullscreen(target);
3384
+ }
3385
+ updateBoundary();
3386
+ document.body.addEventListener('fullscreenchange', handleFullscreenChange);
3387
+ };
3388
+ var onUnmountedFn = function onUnmountedFn() {
3389
+ beforeInstanceUnmount();
3390
+ document.body.removeEventListener('fullscreenchange', handleFullscreenChange);
3391
+ };
3392
+ var handleClickOutside = function handleClickOutside(_e) {
3393
+ ctx.emit(EMIT_EVENTS.CLICK_OUTSIDE, {
3394
+ isShow: localIsShow.value,
3395
+ event: _e
3396
+ });
3397
+ var needExec = props.disableOutsideClick || props.always || props.disabled || props.trigger === 'manual';
3398
+ if (!props.forceClickoutside && needExec) {
3399
+ return;
3400
+ }
3401
+ if (localIsShow.value) {
3402
+ hideFn();
3403
+ }
3404
+ };
3405
+ return {
3406
+ onMountedFn: onMountedFn,
3407
+ onUnmountedFn: onUnmountedFn,
3408
+ handleClickOutside: handleClickOutside,
3409
+ beforeInstanceUnmount: beforeInstanceUnmount,
3410
+ updateBoundary: updateBoundary,
3411
+ initPopInstance: initPopInstance,
3412
+ updatePopover: updatePopover,
3413
+ resetPopover: resetPopover,
3414
+ showPopover: showPopover,
3415
+ hidePopover: hidePopover,
3416
+ showFn: showFn,
3417
+ hideFn: hideFn,
3418
+ stopHide: stopHide,
3419
+ isFullscreen: isFullscreen,
3420
+ boundary: boundary,
3421
+ localIsShow: localIsShow
3422
+ };
3423
+ });
3424
+ ;// CONCATENATED MODULE: ../../packages/popover/src/popover.tsx
3425
+
3426
+ /*
3427
+ * Tencent is pleased to support the open source community by making
3428
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3429
+ *
3430
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3431
+ *
3432
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3433
+ *
3434
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3435
+ *
3436
+ * ---------------------------------------------------
3437
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3438
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3439
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3440
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3441
+ *
3442
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3443
+ * the Software.
3444
+ *
3445
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3446
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3447
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3448
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3449
+ * IN THE SOFTWARE.
3450
+ */
3451
+
3452
+
3453
+
3454
+
3455
+
3456
+
3457
+
3458
+
3459
+
3460
+
3461
+
3462
+ function _isSlot(s) {
3463
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_namespaceObject.isVNode)(s);
3464
+ }
3465
+ /* harmony default export */ const popover = ((0,external_vue_namespaceObject.defineComponent)({
3466
+ name: 'Popover',
3467
+ components: {
3468
+ // eslint-disable-next-line vue/no-reserved-component-names
3469
+ Content: content,
3470
+ Arrow: src_arrow,
3471
+ Root: root
3472
+ },
3473
+ directives: {
3474
+ clickoutside: clickoutside
3475
+ },
3476
+ props: PopoverProps,
3477
+ emits: EMIT_EVENT_TYPES,
3478
+ setup: function setup(props, ctx) {
3479
+ var _toRefs = (0,external_vue_namespaceObject.toRefs)(props),
3480
+ reference = _toRefs.reference;
3481
+ var refDefaultReference = (0,external_vue_namespaceObject.ref)();
3482
+ var refContent = (0,external_vue_namespaceObject.ref)();
3483
+ var refArrow = (0,external_vue_namespaceObject.ref)();
3484
+ var refRoot = (0,external_vue_namespaceObject.ref)();
3485
+ var refReference = (0,external_vue_namespaceObject.computed)(function () {
3486
+ return reference.value || refDefaultReference.value;
3487
+ });
3488
+ var _usePopoverInit = use_popover_init(props, ctx, {
3489
+ refReference: refReference,
3490
+ refContent: refContent,
3491
+ refArrow: refArrow,
3492
+ refRoot: refRoot
3493
+ }),
3494
+ onMountedFn = _usePopoverInit.onMountedFn,
3495
+ onUnmountedFn = _usePopoverInit.onUnmountedFn,
3496
+ handleClickOutside = _usePopoverInit.handleClickOutside,
3497
+ beforeInstanceUnmount = _usePopoverInit.beforeInstanceUnmount,
3498
+ updateBoundary = _usePopoverInit.updateBoundary,
3499
+ initPopInstance = _usePopoverInit.initPopInstance,
3500
+ showFn = _usePopoverInit.showFn,
3501
+ hideFn = _usePopoverInit.hideFn,
3502
+ showPopover = _usePopoverInit.showPopover,
3503
+ hidePopover = _usePopoverInit.hidePopover,
3504
+ updatePopover = _usePopoverInit.updatePopover,
3505
+ resetPopover = _usePopoverInit.resetPopover,
3506
+ stopHide = _usePopoverInit.stopHide,
3507
+ localIsShow = _usePopoverInit.localIsShow,
3508
+ boundary = _usePopoverInit.boundary;
3509
+ if (!props.always && !props.disabled) {
3510
+ (0,external_vue_namespaceObject.watch)(function () {
3511
+ return props.isShow;
3512
+ }, function () {
3513
+ props.isShow ? showPopover() : hidePopover();
3514
+ }, {
3515
+ immediate: true
3516
+ });
3517
+ }
3518
+ (0,external_vue_namespaceObject.watch)(function () {
3519
+ return [props.disabled];
3520
+ }, function (val) {
3521
+ if (val[0]) {
3522
+ beforeInstanceUnmount();
3523
+ } else {
3524
+ initPopInstance();
3525
+ }
3526
+ });
3527
+ updateBoundary();
3528
+ (0,external_vue_namespaceObject.onMounted)(onMountedFn);
3529
+ (0,external_vue_namespaceObject.onBeforeUnmount)(onUnmountedFn);
3530
+ var transBoundary = (0,external_vue_namespaceObject.computed)(function () {
3531
+ return !props.disableTeleport;
3532
+ });
3533
+ var show = function show() {
3534
+ showFn();
3535
+ };
3536
+ var hide = function hide() {
3537
+ hideFn();
3538
+ };
3539
+ var contentIsShow = (0,external_vue_namespaceObject.computed)(function () {
3540
+ if (props.renderType === external_shared_namespaceObject.RenderType.AUTO) {
3541
+ return true;
3542
+ }
3543
+ return localIsShow.value;
3544
+ });
3545
+ var renderContent = function renderContent() {
3546
+ if (props.allowHtml) {
3547
+ var _contentAsHTMLElement = contentAsHTMLElement(props.content),
3548
+ vNode = _contentAsHTMLElement.vNode;
3549
+ return vNode;
3550
+ }
3551
+ return props.content;
3552
+ };
3553
+ return {
3554
+ boundary: boundary,
3555
+ arrow: props.arrow,
3556
+ refDefaultReference: refDefaultReference,
3557
+ refContent: refContent,
3558
+ refArrow: refArrow,
3559
+ content: props.content,
3560
+ theme: props.theme,
3561
+ transBoundary: transBoundary,
3562
+ handleClickOutside: handleClickOutside,
3563
+ updatePopover: updatePopover,
3564
+ resetPopover: resetPopover,
3565
+ hide: hide,
3566
+ show: show,
3567
+ stopHide: stopHide,
3568
+ contentIsShow: contentIsShow,
3569
+ renderContent: renderContent,
3570
+ localIsShow: localIsShow
3571
+ };
3572
+ },
3573
+ render: function render() {
3574
+ var _slot;
3575
+ var _this$$slots$default,
3576
+ _this$$slots$default2,
3577
+ _this$$slots,
3578
+ _this = this,
3579
+ _this$$slots$content,
3580
+ _this$$slots$content2,
3581
+ _this$$slots3;
3582
+ var renderReferSlot = function renderReferSlot(slot) {
3583
+ var _slot$;
3584
+ if (external_vue_namespaceObject.Text === (slot === null || slot === void 0 || (_slot$ = slot[0]) === null || _slot$ === void 0 ? void 0 : _slot$.type)) {
3585
+ return (0,external_vue_namespaceObject.createVNode)("span", null, [slot]);
3586
+ }
3587
+ return slot;
3588
+ };
3589
+ return (0,external_vue_namespaceObject.createVNode)(root, {
3590
+ "ref": "refRoot"
3591
+ }, {
3592
+ "default": function _default() {
3593
+ return [(0,external_vue_namespaceObject.createVNode)(reference, {
3594
+ "ref": "refDefaultReference"
3595
+ }, _isSlot(_slot = renderReferSlot((_this$$slots$default = (_this$$slots$default2 = (_this$$slots = _this.$slots)["default"]) === null || _this$$slots$default2 === void 0 ? void 0 : _this$$slots$default2.call(_this$$slots)) !== null && _this$$slots$default !== void 0 ? _this$$slots$default : (0,external_vue_namespaceObject.createVNode)("span", null, null))) ? _slot : {
3596
+ "default": function _default() {
3597
+ return [_slot];
3598
+ }
3599
+ }), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Teleport, {
3600
+ "to": _this.boundary,
3601
+ "disabled": !_this.transBoundary
3602
+ }, {
3603
+ "default": function _default() {
3604
+ return [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)(content, {
3605
+ "ref": "refContent",
3606
+ "visible": _this.localIsShow,
3607
+ "data-theme": _this.theme,
3608
+ "extCls": _this.extCls,
3609
+ "width": _this.width,
3610
+ "height": _this.height,
3611
+ "maxWidth": _this.maxWidth,
3612
+ "maxHeight": _this.maxHeight,
3613
+ "eventDelay": _this.componentEventDelay
3614
+ }, {
3615
+ "default": function _default() {
3616
+ return [_this.contentIsShow ? (_this$$slots$content = (_this$$slots$content2 = (_this$$slots3 = _this.$slots).content) === null || _this$$slots$content2 === void 0 ? void 0 : _this$$slots$content2.call(_this$$slots3)) !== null && _this$$slots$content !== void 0 ? _this$$slots$content : _this.renderContent() : ''];
3617
+ },
3618
+ arrow: function arrow() {
3619
+ var _this$$slots$arrow, _this$$slots2;
3620
+ return _this.arrow ? (0,external_vue_namespaceObject.createVNode)(src_arrow, {
3621
+ "ref": "refArrow"
3622
+ }, {
3623
+ "default": function _default() {
3624
+ return [(_this$$slots$arrow = (_this$$slots2 = _this.$slots).arrow) === null || _this$$slots$arrow === void 0 ? void 0 : _this$$slots$arrow.call(_this$$slots2)];
3625
+ }
3626
+ }) : '';
3627
+ }
3628
+ }), [[(0,external_vue_namespaceObject.resolveDirective)("clickoutside"), _this.handleClickOutside]])];
3629
+ }
3630
+ })];
3631
+ }
3632
+ });
3633
+ }
3634
+ }));
3635
+ ;// CONCATENATED MODULE: ../../packages/popover/src/plugin-popover.tsx
3636
+
3637
+
3638
+ function plugin_popover_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3639
+ function plugin_popover_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? plugin_popover_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : plugin_popover_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3640
+ /*
3641
+ * Tencent is pleased to support the open source community by making
3642
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3643
+ *
3644
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3645
+ *
3646
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3647
+ *
3648
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3649
+ *
3650
+ * ---------------------------------------------------
3651
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3652
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3653
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3654
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3655
+ *
3656
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3657
+ * the Software.
3658
+ *
3659
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3660
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3661
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3662
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3663
+ * IN THE SOFTWARE.
3664
+ */
3665
+
3666
+
3667
+
3668
+
3669
+ function createPopoverComponent(options) {
3670
+ var $PopoverInstance = null;
3671
+ var $PopoverInstanceVm = null;
3672
+ var $PopoverInstanceEl = null;
3673
+ var resolvedOptions = plugin_popover_objectSpread(plugin_popover_objectSpread({
3674
+ boundary: 'body',
3675
+ placement: 'top',
3676
+ autoVisibility: true,
3677
+ isShow: false,
3678
+ trigger: 'manual',
3679
+ onHide: function onHide() {},
3680
+ onShow: function onShow() {}
3681
+ }, options), {}, {
3682
+ allowHtml: true
3683
+ });
3684
+ var popoverComponent = {
3685
+ name: '$popover',
3686
+ setup: function setup(_, _ref) {
3687
+ var expose = _ref.expose;
3688
+ var formatOptions = function formatOptions() {
3689
+ return Object.keys(PopoverProps).reduce(function (result, key) {
3690
+ if (Object.prototype.hasOwnProperty.call(resolvedOptions, key)) {
3691
+ Object.assign(result, _defineProperty({}, key, resolvedOptions[key]));
3692
+ }
3693
+ return result;
3694
+ }, {
3695
+ target: resolvedOptions.target
3696
+ });
3697
+ };
3698
+ var refProps = (0,external_vue_namespaceObject.reactive)(formatOptions());
3699
+ var refReference = (0,external_vue_namespaceObject.ref)();
3700
+ var show = function show() {
3701
+ var _refReference$value, _refReference$value$s;
3702
+ (_refReference$value = refReference.value) === null || _refReference$value === void 0 || (_refReference$value$s = _refReference$value.show) === null || _refReference$value$s === void 0 ? void 0 : _refReference$value$s.call(_refReference$value);
3703
+ };
3704
+ var hide = function hide() {
3705
+ var _refReference$value2, _refReference$value2$;
3706
+ (_refReference$value2 = refReference.value) === null || _refReference$value2 === void 0 || (_refReference$value2$ = _refReference$value2.hide) === null || _refReference$value2$ === void 0 ? void 0 : _refReference$value2$.call(_refReference$value2);
3707
+ };
3708
+ var stopHide = function stopHide() {
3709
+ var _refReference$value3, _refReference$value3$;
3710
+ (_refReference$value3 = refReference.value) === null || _refReference$value3 === void 0 || (_refReference$value3$ = _refReference$value3.stopHide) === null || _refReference$value3$ === void 0 ? void 0 : _refReference$value3$.call(_refReference$value3);
3711
+ };
3712
+ var updateTarget = function updateTarget(target) {
3713
+ var _refReference$value4, _refReference$value4$;
3714
+ refProps.target = target;
3715
+ (_refReference$value4 = refReference.value) === null || _refReference$value4 === void 0 || (_refReference$value4$ = _refReference$value4.resetPopover) === null || _refReference$value4$ === void 0 ? void 0 : _refReference$value4$.call(_refReference$value4);
3716
+ };
3717
+ var handleContentMouseenter = function handleContentMouseenter() {
3718
+ var _resolvedOptions$onCo;
3719
+ (_resolvedOptions$onCo = resolvedOptions.onContentMouseenter) === null || _resolvedOptions$onCo === void 0 ? void 0 : _resolvedOptions$onCo.call(resolvedOptions);
3720
+ };
3721
+ var handleContentMouseleave = function handleContentMouseleave() {
3722
+ var _resolvedOptions$onCo2;
3723
+ (_resolvedOptions$onCo2 = resolvedOptions.onContentMouseleave) === null || _resolvedOptions$onCo2 === void 0 ? void 0 : _resolvedOptions$onCo2.call(resolvedOptions);
3724
+ };
3725
+ var handlePopoverHidden = function handlePopoverHidden() {
3726
+ var _resolvedOptions$onHi;
3727
+ (_resolvedOptions$onHi = resolvedOptions.onHide) === null || _resolvedOptions$onHi === void 0 ? void 0 : _resolvedOptions$onHi.call(resolvedOptions);
3728
+ };
3729
+ var handlePopoverShow = function handlePopoverShow() {
3730
+ var _resolvedOptions$onSh;
3731
+ (_resolvedOptions$onSh = resolvedOptions.onShow) === null || _resolvedOptions$onSh === void 0 ? void 0 : _resolvedOptions$onSh.call(resolvedOptions);
3732
+ };
3733
+ expose({
3734
+ show: show,
3735
+ hide: hide,
3736
+ updateTarget: updateTarget,
3737
+ stopHide: stopHide
3738
+ });
3739
+ return function () {
3740
+ return (0,external_vue_namespaceObject.createVNode)(popover, (0,external_vue_namespaceObject.mergeProps)(refProps, {
3741
+ "ref": refReference,
3742
+ "onContentMouseenter": handleContentMouseenter,
3743
+ "onContentMouseleave": handleContentMouseleave,
3744
+ "onAfterHidden": handlePopoverHidden,
3745
+ "onAfterShow": handlePopoverShow
3746
+ }), null);
3747
+ };
3748
+ }
3749
+ };
3750
+ function getBoundaryDom(boundary) {
3751
+ if (/^body$/i.test(boundary)) {
3752
+ return document.body;
3753
+ }
3754
+ if (/^parent$/i.test(boundary)) {
3755
+ if (utils_isElement(resolvedOptions.target)) {
3756
+ return resolvedOptions.target.parentNode;
3757
+ }
3758
+ return resolvedOptions.target.target.parentNode;
3759
+ }
3760
+ if (typeof boundary === 'string' && isAvailableId(boundary)) {
3761
+ return document.querySelector(boundary);
3762
+ }
3763
+ return document.body;
3764
+ }
3765
+ if ($PopoverInstance === null) {
3766
+ $PopoverInstanceEl = document.createElement('div');
3767
+ getBoundaryDom(resolvedOptions.boundary).append($PopoverInstanceEl);
3768
+ $PopoverInstance = (0,external_vue_namespaceObject.createApp)(popoverComponent);
3769
+ $PopoverInstanceVm = $PopoverInstance.mount($PopoverInstanceEl);
3770
+ }
3771
+ function close() {
3772
+ if ($PopoverInstance) {
3773
+ $PopoverInstance.unmount();
3774
+ $PopoverInstanceVm = null;
3775
+ $PopoverInstance = null;
3776
+ $PopoverInstanceEl.remove();
3777
+ }
3778
+ }
3779
+ function show() {
3780
+ var _$PopoverInstanceVm;
3781
+ (_$PopoverInstanceVm = $PopoverInstanceVm) === null || _$PopoverInstanceVm === void 0 ? void 0 : _$PopoverInstanceVm.show();
3782
+ }
3783
+ function update(e) {
3784
+ var _$PopoverInstanceVm2;
3785
+ (_$PopoverInstanceVm2 = $PopoverInstanceVm) === null || _$PopoverInstanceVm2 === void 0 ? void 0 : _$PopoverInstanceVm2.updateTarget(e);
3786
+ }
3787
+ function hide() {
3788
+ var _$PopoverInstanceVm3;
3789
+ (_$PopoverInstanceVm3 = $PopoverInstanceVm) === null || _$PopoverInstanceVm3 === void 0 ? void 0 : _$PopoverInstanceVm3.hide();
3790
+ }
3791
+ return {
3792
+ close: close,
3793
+ show: show,
3794
+ hide: hide,
3795
+ update: update,
3796
+ get vm() {
3797
+ return $PopoverInstanceVm;
3798
+ },
3799
+ get $el() {
3800
+ return $PopoverInstanceVm.$el;
3801
+ }
3802
+ };
3803
+ }
3804
+ ;// CONCATENATED MODULE: ../../packages/plugin-popover/src/index.ts
3805
+ /**
3806
+ * Tencent is pleased to support the open source community by making
3807
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3808
+ *
3809
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3810
+ *
3811
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3812
+ *
3813
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3814
+ *
3815
+ * ---------------------------------------------------
3816
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3817
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3818
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3819
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3820
+ *
3821
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3822
+ * the Software.
3823
+ *
3824
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3825
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3826
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3827
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3828
+ * IN THE SOFTWARE.
3829
+ */
3830
+
3831
+ /* harmony default export */ const src = (createPopoverComponent);
3832
+ var __webpack_exports__default = __webpack_exports__.Z;
3833
+ export { __webpack_exports__default as default };