bkui-vue 0.0.1-beta.466 → 0.0.1-beta.468

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