bkui-vue 0.0.1-beta.467 → 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 (259) hide show
  1. package/dist/index.cjs.js +5 -5
  2. package/dist/index.esm.js +294 -294
  3. package/dist/index.umd.js +5 -5
  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/index.d.ts +6 -6
  239. package/lib/tree/index.js +2608 -1
  240. package/lib/tree/tree.d.ts +2 -2
  241. package/lib/upload/index.d.ts +4 -4
  242. package/lib/upload/index.js +3257 -2
  243. package/lib/upload/upload.d.ts +1 -1
  244. package/lib/virtual-render/index.d.ts +3 -3
  245. package/lib/virtual-render/index.js +790 -1
  246. package/lib/virtual-render/virtual-render.d.ts +1 -1
  247. package/package.json +1 -1
  248. package/lib/cascader/index.js.LICENSE.txt +0 -1
  249. package/lib/dialog/index.js.LICENSE.txt +0 -1
  250. package/lib/directives/index.js.LICENSE.txt +0 -14
  251. package/lib/info-box/index.js.LICENSE.txt +0 -1
  252. package/lib/message/index.js.LICENSE.txt +0 -6
  253. package/lib/process/index.js.LICENSE.txt +0 -1
  254. package/lib/search-select/index.js.LICENSE.txt +0 -1
  255. package/lib/select/index.js.LICENSE.txt +0 -1
  256. package/lib/sideslider/index.js.LICENSE.txt +0 -1
  257. package/lib/slider/index.js.LICENSE.txt +0 -1
  258. package/lib/steps/index.js.LICENSE.txt +0 -1
  259. package/lib/upload/index.js.LICENSE.txt +0 -1
@@ -1 +1,2713 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("vue"),require("lodash"),require("@popperjs/core"),require("vue-types"));else if("function"==typeof define&&define.amd)define(["vue","lodash","@popperjs/core","vue-types"],t);else{var n="object"==typeof exports?t(require("vue"),require("lodash"),require("@popperjs/core"),require("vue-types")):t(e.vue,e.lodash,e["@popperjs/core"],e["vue-types"]);for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(self,((e,t,n,i)=>(()=>{var r={8022:(e,t,n)=>{var i=n(4481),r=n(6426),o=r;o.v1=i,o.v4=r,e.exports=o},8725:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var i=n||0,r=t;return[r[e[i++]],r[e[i++]],r[e[i++]],r[e[i++]],"-",r[e[i++]],r[e[i++]],"-",r[e[i++]],r[e[i++]],"-",r[e[i++]],r[e[i++]],"-",r[e[i++]],r[e[i++]],r[e[i++]],r[e[i++]],r[e[i++]],r[e[i++]]].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 i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},4481:(e,t,n)=>{var i,r,o=n(9157),s=n(8725),a=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,l=t||[],p=(e=e||{}).node||i,f=void 0!==e.clockseq?e.clockseq:r;if(null==p||null==f){var d=o();null==p&&(p=i=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==f&&(f=r=16383&(d[6]<<8|d[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,y=h-a+(v-u)/1e4;if(y<0&&void 0===e.clockseq&&(f=f+1&16383),(y<0||h>a)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=h,u=v,r=f;var g=(1e4*(268435455&(h+=122192928e5))+v)%4294967296;l[c++]=g>>>24&255,l[c++]=g>>>16&255,l[c++]=g>>>8&255,l[c++]=255&g;var m=h/4294967296*1e4&268435455;l[c++]=m>>>8&255,l[c++]=255&m,l[c++]=m>>>24&15|16,l[c++]=m>>>16&255,l[c++]=f>>>8|128,l[c++]=255&f;for(var k=0;k<6;++k)l[c+k]=p[k];return t||s(l)}},6426:(e,t,n)=>{var i=n(9157),r=n(8725);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||i)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||r(s)}},5798:e=>{"use strict";e.exports=n},467:e=>{"use strict";e.exports=t},748:t=>{"use strict";t.exports=e},210:e=>{"use strict";e.exports=i}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,s),n.exports}s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{"use strict";s.r(a),s.d(a,{AlignEnum:()=>ce,BKLAYERD_INDEX_EFAULT_VALUE:()=>H,BKLAYERTYPE:()=>N,BKPopIndexManager:()=>K,BKPopover:()=>$,BkMaskManager:()=>q,DialogTypeEnum:()=>he,DirectionEnum:()=>ve,EMPTY_OBJ:()=>Pe,InputBehaviorEnum:()=>me,InputBehaviorType:()=>je,LineStyleEnum:()=>ye,PlacementEnum:()=>pe,Placements:()=>ae,PropTypes:()=>Le,RenderDirectiveEnum:()=>ue,RenderType:()=>de,SelectedType:()=>Ne,SelectedTypeEnum:()=>Re,SizeEnum:()=>se,TagThemeEnum:()=>ge,TagThemeType:()=>Ae,ThemeEnum:()=>le,TriggerEnum:()=>fe,alignType:()=>Oe,arrayEqual:()=>ze,bKMaskManager:()=>z,bkPopIndexManager:()=>W,bkZIndexManager:()=>B,capitalize:()=>U,checkOverflow:()=>_,classes:()=>Ce,clone:()=>h,debounce:()=>Ve,dialogTypeUnion:()=>Se,directionType:()=>we,elementsEqual:()=>d,filterProperty:()=>qe,finiteOrDefault:()=>p,formItemKey:()=>E,formKey:()=>M,getPopContainerId:()=>ee,hasOverflowEllipsis:()=>I,isArray:()=>u,isElement:()=>b,isEmpty:()=>o,isEmptyObj:()=>_e,isFinite:()=>l,isNullOrUndef:()=>r,isObject:()=>c,lineStyleType:()=>xe,maybeShowTooltip:()=>O,merge:()=>g,mergeIf:()=>m,mergerFn:()=>y,mergerIfFn:()=>k,noop:()=>De,observerResize:()=>D,off:()=>t,on:()=>e,placementType:()=>Te,random:()=>P,renderDirectiveType:()=>Ie,renderEmptyVNode:()=>Ue,renderType:()=>Ee,resolveClassName:()=>Be,scrollTop:()=>n,scrollbarWidth:()=>te,stringEnum:()=>be,triggerType:()=>Me,useForm:()=>S,useFormItem:()=>w,valueOrDefault:()=>f,withInstall:()=>Fe,withInstallProps:()=>He});var e=document.addEventListener?function(e,t,n){e&&t&&n&&e.addEventListener(t,n,!0)}:function(e,t,n){e&&t&&n&&e.attachEvent("on".concat(t),n)},t=document.removeEventListener?function(e,t,n){e&&t&&e.removeEventListener(t,n,!0)}:function(e,t,n){e&&t&&e.detachEvent("on".concat(t),n)};function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500,r=arguments.length>4?arguments[4]:void 0,o=Math.abs(t-n);!function t(n,i,o){if(n!==i){var s=n+o>i?i:n+o;n>i&&(s=n-o<i?i:n-o),e===window?window.scrollTo(s,s):e.scrollTop=s,window.requestAnimationFrame((function(){return t(s,i,o)}))}else null==r||r()}(t,n,Math.ceil(o/i*50))}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function r(e){return null==e}function o(e){return""===e||!(arguments.length>1&&void 0!==arguments[1]&&!arguments[1])&&r(e)}function u(e){if(Array.isArray(e))return!0;var t=Object.prototype.toString.call(e);return"[object"===t.substr(0,7)&&"Array]"===t.substr(-6)}function c(e){return null!==e&&/^\[object (Object|Module)\]/.test(Object.prototype.toString.call(e))}var l=function(e){return("number"==typeof e||e instanceof Number)&&isFinite(+e)};function p(e,t){return l(e)?e:t}function f(e,t){return void 0===e?t:e}function d(e,t){var n,i,r,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(r=e[n],o=t[n],r.datasetIndex!==o.datasetIndex||r.index!==o.index)return!1;return!0}function h(e){if(u(e))return e.map(h);if(c(e)){for(var t=Object.create(null),n=Object.keys(e),i=n.length,r=0;r<i;++r)t[n[r]]=h(e[n[r]]);return t}return e}function v(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}function y(e,t,n,i){if(v(e)){var r=t[e],o=n[e];c(r)&&c(o)?g(r,o,i):t[e]=h(o)}}function g(e,t,n){var i=u(t)?t:[t],r=i.length;if(!c(e))return e;for(var o=(n=n||{}).merger||y,s=0;s<r;++s)if(c(t=i[s]))for(var a=Object.keys(t),l=0,p=a.length;l<p;++l)o(a[l],e,t,n);return e}function m(e,t){return g(e,t,{merger:k})}function k(e,t,n){if(v(e)){var i=t[e],r=n[e];c(i)&&c(r)?m(i,r):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=h(r))}}function b(e){try{return e instanceof HTMLElement}catch(t){return"object"===i(e)&&1===e.nodeType&&"object"===i(e.style)&&"object"===i(e.ownerDocument)}}function I(e){return e.offsetWidth<e.scrollWidth||e.offsetHeight<e.scrollHeight}function O(e,t){I(e)?e.setAttribute("title",t):e.removeAttribute("title")}var T=s(748),M=Symbol("form"),E=Symbol("formItem"),S=function(){return(0,T.inject)(M)},w=function(){return(0,T.inject)(E,void 0)};function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}function j(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,A(i.key),i)}}function R(e,t,n){return t&&j(e.prototype,t),n&&j(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var L,N,C=s(467),P=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"abcdefghijklmnopqrstuvwxyz0123456789",n="",i=0;i<e;i++)n+=t[parseInt((Math.random()*t.length).toString(),10)];return n},D=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=(0,C.throttle)((function(){"function"==typeof t&&t()}),n),o=new ResizeObserver((function(){r()}));return i&&"function"==typeof t&&t(),{start:function(){o.observe(e)},stop:function(){o.disconnect(),o.unobserve(e)}}},U=function(e){return e[0].toUpperCase()+e.slice(1)};function _(e){if(!e)return!1;var t=!1;try{var n=window.getComputedStyle(e,null);if("none"!==n.webkitLineClamp){var i=parseFloat(n.height),r=function(e,t){var n=document.createElement("div"),i=parseFloat(t.width)?"".concat(Math.ceil(parseFloat(t.width)),"px"):t.width;return n.style.cssText="\n width: ".concat(i,";\n line-height: ").concat(t["line-height"],";\n font-size: ").concat(t["font-size"],";\n word-break: ").concat(t["word-break"],";\n padding: ").concat(t.padding,";\n "),n.textContent=e.textContent,n}(e,n);document.body.appendChild(r);var o=window.getComputedStyle(r,null).height;document.body.removeChild(r),t=i<parseFloat(o)}else t=e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight}catch(e){console.warn("There is an error when check element overflow state: ",e)}return t}function F(e,t,n){return(t=A(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.BOTTOM="bottom",e.CONTENT="content",e.NAVI="navi",e.FULLSCREEN="fullScreen",e.PLUGINS="plugins",e.MODAL="modal",e.MESSAGE="message",e.POPPER="popper"}(N||(N={}));var H=(F(L={},N.BOTTOM,0),F(L,N.CONTENT,1),F(L,N.NAVI,100),F(L,N.FULLSCREEN,1e3),F(L,N.MODAL,3e3),F(L,N.PLUGINS,8e3),F(L,N.MESSAGE,1e4),F(L,N.POPPER,99999),L),B=new(function(){function e(){x(this,e),this.storageLayerIndexValue={},this.copyDefaultValue()}return R(e,[{key:"getNextIndex",value:function(e){return Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue,e)?(this.storageLayerIndexValue[e]=this.storageLayerIndexValue[e]+1,this.storageLayerIndexValue[e]):(this.storageLayerIndexValue[N.MODAL]=this.storageLayerIndexValue[N.MODAL]+1,this.storageLayerIndexValue[N.MODAL])}},{key:"getModalNextIndex",value:function(){return this.getNextIndex(N.MODAL)}},{key:"getMessageNextIndex",value:function(){return this.getNextIndex(N.MESSAGE)}},{key:"getFullScreenNextIndex",value:function(){return this.getNextIndex(N.FULLSCREEN)}},{key:"getNaviNextIndex",value:function(){return this.getNextIndex(N.NAVI)}},{key:"getPopperIndex",value:function(){return H.popper}},{key:"setDefaultZIndex",value:function(e){var t=this;Object.keys(e||{}).forEach((function(n){Object.prototype.hasOwnProperty.call(t.storageLayerIndexValue.__proto__,n)&&Object.assign(t.storageLayerIndexValue.__proto__,F({},n,e[n]))})),this.copyDefaultValue()}},{key:"resetZIndex",value:function(e){var t=this;Object.keys(e||{}).forEach((function(n){Object.prototype.hasOwnProperty.call(t.storageLayerIndexValue,n)&&Object.assign(t.storageLayerIndexValue,F({},n,e[n]))}))}},{key:"copyDefaultValue",value:function(){var e=Object.keys(H).reduce((function(e,t){return Object.assign(e,F({},t,{value:H[t],writable:!0,configurable:!0}))}),{});this.storageLayerIndexValue=Object.create(H,e)}}]),e}());"__bk_mask_".concat(P(16));var V=new(function(){function e(){x(this,e),this.timer=null,this.store=[],this.maskMap=new WeakMap}return R(e,[{key:"appendMaker",value:function(e){this.store.push(e),this.executeMaker()}},{key:"pushMaskStyle",value:function(e,t){var n=this.getMaskMap(e);(null==n?void 0:n.styles)?n.styles.push(t):this.setMaskMap(e,Object.assign({styles:[t]},n||{}))}},{key:"getMaskStyles",value:function(e){var t;return(null===(t=this.getMaskMap(e))||void 0===t?void 0:t.styles)||[]}},{key:"setMaskId",value:function(e,t){var n=this.getMaskMap(e);n?(Object.assign(n,{id:t}),this.setMaskMap(e,n)):this.setMaskMap(e,Object.assign({id:t},n||{}))}},{key:"getMaskId",value:function(e){var t;return null===(t=this.getMaskMap(e))||void 0===t?void 0:t.id}},{key:"setMaskMap",value:function(e,t){this.maskMap.set(e,t)}},{key:"getMaskMap",value:function(e){return this.maskMap.get(e)}},{key:"executeMaker",value:function(){var e=this;this.timer&&cancelAnimationFrame(this.timer),this.timer=requestAnimationFrame((function(){var t=e.store.pop();"function"==typeof t&&(Reflect.apply(t,e,[]),e.executeMaker())}))}}]),e}()),q=function(){function e(t){var n=this;x(this,e),this.multiInstance=!1,this.uniqueMaskAttrTag="",this.parentNode=document.body,this.activeInstance=void 0,this.zIndexStore=new Map,this.lastUUID=null,this.maskStyle={position:"fixed",left:0,top:0,bottom:0,right:0,display:"none","background-color":"rgba(0,0,0,.6)"},this.isInit=!1,this.maskAttrTag="auto";var i=t||{},r=i.multiInstance,o=void 0!==r&&r,s=i.maskAttrTag,a=void 0===s?"auto":s,u=i.parentNode,c=void 0===u?document.body:u,l=i.maskStyle,p=void 0===l?{}:l,f=i.onClick,d=void 0===f?null:f,h=i.popInstance,v=void 0===h?null:h;this.parentNode=c||document,this.maskAttrTag=a,this.onClick=d,this.activeInstance=void 0,this.multiInstance=o,this.popInstance=v,this.uniqueMaskAttrTag=this.getMaskAttrTag(a),V.appendMaker((function(){n.initInstance(p)}))}return R(e,[{key:"setOption",value:function(e){var t=e||{},n=t.parentNode,i=void 0===n?document.body:n,r=t.maskStyle,o=void 0===r?{}:r,s=t.onClick,a=void 0===s?null:s,u=t.maskAttrTag,c=void 0===u?this.maskAttrTag:u;this.onClick=a,this.parentNode=i||document,this.setMaskStyle(Object.assign({},this.maskStyle,o)),this.uniqueMaskAttrTag=this.getMaskAttrTag(c)}},{key:"show",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=null!=r?r:P(16),a=/-?\d+/.test("".concat(t))?t:B.getModalNextIndex(),u=Object.assign({},this.maskStyle,i||{});if(!n&&this.lastUUID){var c=this.zIndexStore.get(this.lastUUID);c&&(u=null==c?void 0:c.style)}this.storeMaskInsCfg({zIndex:a,style:Object.assign({},u),uuid:s,preUID:this.lastUUID}),Object.assign(u,{display:"block","z-index":"".concat(a),"pointer-events":"all"}),this.initInstance(u),this.catchClickEvent(),this.setMaskStyle(u),V.pushMaskStyle(this.parentNode,Object.assign({},u)),this.backupMask.style.setProperty("z-index","".concat(a-1)),n||(this.mask.style.setProperty("pointer-events","none"),null==e||e.style.setProperty("pointer-events","all")),e&&(o&&e.style.setProperty("z-index","".concat(a+1)),this.activeInstance=e,this.appendContentToMask(e))}},{key:"hide",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=null!=i?i:this.lastUUID;t||(null==n||n.remove(),null===(e=this.activeInstance)||void 0===e||e.remove()),this.removeClickEvent(),this.activeInstance=void 0,this.popIndexStore(r);var o=V.getMaskStyles(this.parentNode);if(null==o||o.pop(),null==o?void 0:o.length){var s=o.slice(-1)[0];this.setMaskStyle(s)}else this.mask.style.setProperty("display","none")}},{key:"storeMaskInsCfg",value:function(e){return this.zIndexStore.set(e.uuid,e),this.lastUUID=e.uuid,this.zIndexStore.get(e.uuid)}},{key:"popIndexStore",value:function(e){if(this.zIndexStore.has(e)){var t=this.zIndexStore.get(e);return this.lastUUID=t.preUID,this.zIndexStore.delete(e)}return this.lastUUID=null,!1}},{key:"backupActiveInstance",value:function(){this.activeInstance&&this.backupMask.append(this.activeInstance)}},{key:"backupContentElement",value:function(e){e&&this.backupMask.append(e)}},{key:"getActiveContentInstance",value:function(){return this.activeInstance}},{key:"initInstance",value:function(e){if(!this.isInit){this.isInit=!0;var t=this.getMask(),n=t.instance,i=t.isExist;this.mask=n,this.backupMask=this.getBackupMask(),!i&&this.setMaskStyle(Object.assign({},this.maskStyle,e))}}},{key:"getMask",value:function(){if(this.multiInstance)return{instance:this.createMask(),isExist:!1};var e=!0,t=this.parentNode.querySelector("[data-bk-mask-uid='".concat(this.uniqueMaskAttrTag,"']"));return t||(e=!1,t=this.createMask()),{instance:t,isExist:e}}},{key:"catchClickEvent",value:function(){var e=this;this.mask&&this.mask.addEventListener("click",(function(t){return e.handleMaskClick(t)}),!0)}},{key:"removeClickEvent",value:function(){this.mask&&this.mask.removeEventListener("click",this.handleMaskClick)}},{key:"handleMaskClick",value:function(e){e.target===this.mask&&"function"==typeof this.onClick&&Reflect.apply(this.onClick,this.popInstance||this,[e])}},{key:"getBackupMask",value:function(){var e="data-bk-backup-uid",t=this.parentNode.querySelector("[".concat(e,"]"));return t||(t=this.createMask(e)),t}},{key:"createMask",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-bk-mask-uid",t=document.createElement("div");return t.setAttribute(e,this.uniqueMaskAttrTag),this.parentNode.append(t),t}},{key:"setMaskStyle",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.mask&&Object.entries(t).forEach((function(t){return e.mask.style.setProperty(t[0],t[1])}))}},{key:"getMaskAttrTag",value:function(e){return/^(auto|\s+)$/i.test(e)||null==e||""===e?(V.getMaskId(this.parentNode)||V.setMaskId(this.parentNode,"__bk_mask_".concat(P(16))),V.getMaskId(this.parentNode)):e}},{key:"appendContentToMask",value:function(e){this.mask.append(e)}}]),e}(),z=new q({}),K=function(){function e(t){x(this,e),this.popInstanceList=[],this.clickFn=void 0,this.uuidAttrName="data-bk-pop-uuid",this.bKMaskManagerInstance=new q({parentNode:this.getParentNode(null==t?void 0:t.transfer),popInstance:this,onClick:this.onMaskClickFn})}return R(e,[{key:"getParentNode",value:function(e){if("string"==typeof e){var t=document.querySelector(e);if(t)return t}return b(e)?e:document.body}},{key:"onMaskClick",value:function(e,t){this.clickFn={fn:e,target:t}}},{key:"show",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;if(e){var o="number"==typeof r?r:B.getModalNextIndex(),s=P(16);e.setAttribute(this.uuidAttrName,s),this.popInstanceList.push({uuid:s,zIndex:o,content:e,showMask:t,appendStyle:n}),t&&this.bKMaskManagerInstance.backupActiveInstance(),this.bKMaskManagerInstance.show(e,o,t,n,s,i)}else console.warn("pop show error: content is null or undefined")}},{key:"destroy",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.clickFn=void 0,this.hide(e,t)}},{key:"popHide",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.popInstanceList.length){if(e){var t=this.popInstanceList.pop();this.bKMaskManagerInstance.popIndexStore(t.uuid),t.remove()}if(this.popInstanceList.length){var n=this.popInstanceList.slice(-1)[0],i=n.zIndex,r=n.content,o=n.showMask,s=n.appendStyle,a=n.uuid;this.bKMaskManagerInstance.show(r,i,o,s,a)}else this.bKMaskManagerInstance.hide()}}},{key:"hide",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null==e?void 0:e.getAttribute(this.uuidAttrName);if(n){var i=this.popInstanceList.findIndex((function(e){return e.uuid===n}));i>=0&&(t||this.popInstanceList[i].content.remove(),this.popInstanceList.splice(i,1),this.bKMaskManagerInstance.popIndexStore(n),this.popInstanceList.length?this.popHide(!1):this.bKMaskManagerInstance.hide(t))}else null==e||e.remove()}},{key:"onMaskClickFn",value:function(e){var t=this.clickFn.fn;t&&Reflect.apply(t,this,[e])}}]),e}(),W=new K;function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Y(e){return function(e){if(Array.isArray(e))return G(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return G(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)?G(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Z,J=s(8022),X=s(5798),$=function(){function e(t,n,i){var r,o;x(this,e),this.isShow=!1,this.trigger=void 0,this.instance=void 0,this.always=!1,this.reference=void 0,this.referenceTarget=void 0,this.popperRefer=void 0,this.delay=50,this.isInnerPopper=!1,this.disabled=!1,this.afterShow=null,this.afterHidden=null,this.appendTo="parent",this.container=null,this.fixOnBoundary=!1,this.instanceOptions=this.initDefaultOptions(i),this.reference=this.resolveInputSelectorToHtmlElement(t),this.popperRefer=this.resolveInputSelectorToHtmlElement(n),this.referenceTarget=this.getTargetReferenceElement(),this.container=null===(r=this.popperRefer)||void 0===r?void 0:r.parentElement,this.isShow=!!(null===(o=this.instanceOptions)||void 0===o?void 0:o.isShow),this.always=this.instanceOptions.always,this.trigger=this.instanceOptions.trigger,this.disabled=this.instanceOptions.disabled,this.appendTo=this.instanceOptions.appendTo,this.afterHidden="function"==typeof i.afterHidden?i.afterHidden:function(){},this.afterShow="function"==typeof i.afterShow?i.afterShow:function(){},this.fixOnBoundary=this.instanceOptions.fixOnBoundary,this.initInstance(),this.registerEvents(),(this.isShow||this.always)&&this.show(null)}return R(e,[{key:"forceUpdate",value:function(){var e;null===(e=this.instance)||void 0===e||e.forceUpdate()}},{key:"update",value:function(){var e;null===(e=this.instance)||void 0===e||e.update()}},{key:"updateOptions",value:function(e){var t;this.instanceOptions=this.initDefaultOptions(e),this.isShow=!!(null===(t=this.instanceOptions)||void 0===t?void 0:t.isShow),this.trigger=this.instanceOptions.trigger,this.disabled=this.instanceOptions.disabled,this.setOptions(this.instanceOptions)}},{key:"setOptions",value:function(e){var t;null===(t=this.instance)||void 0===t||t.setOptions(e)}},{key:"destroy",value:function(){var e;null===(e=this.instance)||void 0===e||e.destroy()}},{key:"updateDisabled",value:function(e){this.disabled=null!=e?e:!this.disabled,this.disabled&&this.hide()}},{key:"show",value:function(e){var t;this.disabled||(null===(t=this.popperRefer)||void 0===t||t.setAttribute("data-show",""),this.setOptions({modifiers:[].concat(Y(this.instanceOptions.modifiers||[]),[{name:"eventListeners",enabled:!0}])}),this.update(),this.isShow=!0,this.afterShow(),this.fixOnBoundary||this.appendToTarget())}},{key:"hide",value:function(){var e;this.always||(null===(e=this.popperRefer)||void 0===e||e.removeAttribute("data-show"),this.setOptions({modifiers:[].concat(Y(this.instanceOptions.modifiers||[]),[{name:"eventListeners",enabled:!1}])}),this.isShow=!1,this.isInnerPopper=!1,this.afterHidden(),this.fixOnBoundary||this.restorePopContent())}},{key:"restorePopContent",value:function(){var e=this.getAppendToTarget();b(e)&&e.contains(this.popperRefer)&&this.container&&!this.container.contains(this.popperRefer)&&this.container.append(this.popperRefer)}},{key:"appendToTarget",value:function(){var e=this.getAppendToTarget();b(e)&&e.contains(this.popperRefer)&&e.append(this.popperRefer)}},{key:"getAppendToTarget",value:function(){var e=this.appendTo,t=e;return"parent"!==e&&"string"==typeof e&&(t=document.querySelector(e)),t}},{key:"initDefaultOptions",value:function(e){var t=this,n=g({placement:"top",modifiers:[{name:"offset",options:{offset:[0,8]}}],strategy:"absolute",onFirstUpdate:void 0,isShow:!1,theme:"dark",trigger:"hover",disabled:!1},e||{}),i=n.onFirstUpdate;return n.onFirstUpdate=function(e){"function"==typeof i&&(i.call(t,e),t.handleFirstUpdate())},n}},{key:"handleFirstUpdate",value:function(){this.fixOnBoundary&&this.appendToTarget()}},{key:"getTargetReferenceElement",value:function(){return this.isElement(this.reference)&&1===this.reference.childElementCount?this.reference.firstElementChild:this.reference}},{key:"initInstance",value:function(){var e,t;this.referenceTarget&&(this.referenceTarget&&this.popperRefer?(this.instance=(0,X.createPopper)(this.referenceTarget,this.popperRefer,this.instanceOptions),null===(e=this.popperRefer)||void 0===e||e.setAttribute("data-theme",null!==(t=this.instanceOptions.theme)&&void 0!==t?t:"dark")):console.error("reference or popperRefer is null, please check html element."))}},{key:"resolveInputSelectorToHtmlElement",value:function(e){if(this.isElement(e))return e;if("string"==typeof e)return document.querySelector(e);if("object"===i(e)){if(Object.prototype.hasOwnProperty.call(e,"getBoundingClientRect"))return e}else console.error("'getBoundingClientRect' is needed when use virtual elements");return null}},{key:"isElement",value:function(e){return b(e)}},{key:"registerEvents",value:function(){var e=this;this.isElement(this.referenceTarget)&&"hover"===this.trigger&&(["mouseenter","focus"].forEach((function(t){e.referenceTarget.addEventListener(t,(function(n){"mouseenter"===t&&(e.isInnerPopper=!0),e.show(n)}))})),["mouseleave","blur"].forEach((function(t){e.referenceTarget.addEventListener(t,(function(){e.isInnerPopper=!1,setTimeout((function(){!e.isInnerPopper&&e.hide()}),e.delay)}))})),this.isElement(this.popperRefer)&&["mouseenter","mouseleave"].forEach((function(t){e.popperRefer.addEventListener(t,(function(){"mouseenter"===t&&(e.isInnerPopper=!0),"mouseleave"===t&&e.hide()}))}))),"click"===this.trigger&&["click"].forEach((function(t){document.body.addEventListener(t,(function(t){e.isSameElement(t.target,e.reference)||e.reference.contains(t.target)?e.show(t):!e.isShow||e.isSameElement(t.target,e.popperRefer)||e.popperRefer.contains(t.target)||e.hide()}))}))}},{key:"isSameElement",value:function(e,t){return e&&(e===t||e===t.firstElementChild)}}]),e}(),Q=null,ee=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#";if(null===Q){Q="id_".concat((0,J.v4)());var t=document.createElement("div");t.setAttribute("id",Q),t.setAttribute("data-popper-id",Q),document.body.append(t)}return"".concat(e).concat(Q)};function te(){if(void 0!==Z)return Z;var e=document.createElement("div");e.className="bk-scrollbar-wrap",e.style.visibility="hidden",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var n=document.createElement("div");n.style.width="100%",e.appendChild(n);var i=n.offsetWidth;return e.parentNode.removeChild(e),Z=t-i}function ne(e,t){return ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ne(e,t)}function ie(e){return ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ie(e)}var re=s(210);function oe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ie(e);if(t){var o=ie(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}var se,ae,ue,ce,le,pe,fe,de,he,ve,ye,ge,me,ke=(0,re.createTypes)({});function be(e){return e.reduce((function(e,t){return e[t]=t,e}),Object.create(null))}function Ie(){return(0,re.string)().def(ue.SHOW)}function Oe(){return(0,re.string)().def(ce.LEFT)}function Te(){return(0,re.string)().def(pe.BOTTOM)}function Me(){return(0,re.string)().def(fe.HOVER)}function Ee(){return(0,re.toType)("popRenderType",{}).def(de.SHOWN)}function Se(){return(0,re.toType)("dialogType",{default:he.OPERATION})}function we(){return(0,re.toType)("direction",{}).def(ve.HORIZONTAL)}function xe(){return(0,re.toType)("lineType",{}).def(ye.DASHED)}function Ae(){return(0,re.toType)("tagTheme",{}).def()}function je(){return(0,re.toType)("behavior",{}).def(me.NORMAL)}!function(e){e.SMALL="small",e.LARGE="large",e.DEFAULT="default"}(se||(se={})),function(e){e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom"}(ae||(ae={})),function(e){e.IF="if",e.SHOW="show"}(ue||(ue={})),function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(ce||(ce={})),function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.DANGER="danger"}(le||(le={})),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"}(pe||(pe={})),function(e){e.HOVER="hover",e.CLICK="click",e.MANUAL="manual"}(fe||(fe={})),function(e){e.AUTO="auto",e.SHOWN="shown"}(de||(de={})),function(e){e.SHOW="show",e.OPERATION="operation",e.CONFIRM="confirm",e.PROCESS="process"}(he||(he={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(ve||(ve={})),function(e){e.DASHED="dashed",e.SOLID="solid"}(ye||(ye={})),function(e){e.SUCCESS="success",e.INFO="info",e.WARNING="warning",e.DANGER="danger"}(ge||(ge={})),function(e){e.SIMPLICITY="simplicity",e.NORMAL="normal"}(me||(me={}));var Re,Le=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ne(e,t)}(n,e);var t=oe(n);function n(){return x(this,n),t.apply(this,arguments)}return R(n,null,[{key:"size",value:function(){var e=["small","default","large"];return(0,re.toType)("Size",{validator:function(t){return!(t&&!e.includes(t)&&(console.error("invalid theme, ".concat(t,", the theme must be one of 【").concat(e.join(" | "),"】")),1))},default:"default"})}},{key:"theme",value:function(){var e=["primary","warning","success","danger"];return(0,re.toType)("Theme",{validator:function(t){return!(t&&!e.includes(t)&&(console.error("invalid theme, ".concat(t,", the theme must be one of 【").concat(e.join(" | "),"】")),1))}})}},{key:"placement",value:function(){var e=["top","left","right","bottom"];return(0,re.toType)("Placements",{validator:function(t){return!(t&&!e.includes(t))},default:"top"})}},{key:"style",value:function(){return(0,re.toType)("Style",{type:[String,Object]})}},{key:"position",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["top-left","top-right","bottom-left","bottom-right"];return(0,re.toType)("positions",{type:String,validator:function(t){return!(t&&!e.includes(t)&&(console.error("invalid positions, ".concat(t,", the position must be one of 【").concat(e.join(" | "),"】")),1))},default:"top-center"})}}]),n}(ke);function Ne(){return(0,re.toType)("selectedStyle",{}).def(Re.CHECK)}function Ce(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.entries(e).filter((function(e){return e[1]})).map((function(e){return e[0]})).join(" ").concat(t?" ".concat(t):"")}!function(e){e.CHECKBOX="checkbox",e.CHECK="check"}(Re||(Re={}));var Pe=Object.create({}),De=function(){},Ue=function(){return null},_e=function(e){return Object.keys(e).length<1},Fe=function(e){return e.install=function(t){var n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).prefix,i=t.config.globalProperties.bkUIPrefix||n||"Bk";t.component(i+e.name,e)},e},He=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;return e.install=function(r){var o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).prefix,s=r.config.globalProperties.bkUIPrefix||o||"Bk";i&&r.directive(s+i.name,i.directive),r.component(s+e.name,e),!n&&Object.values(t).forEach((function(e){r.component(s+e.name,e)}))},Object.keys(t).forEach((function(n){e[n]=t[n]})),e};function Be(e){return"".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"bk","-").concat(e)}function Ve(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300,i=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=function(){var o=this,s=arguments;if(e&&clearTimeout(e),r){var a=!e;e=setTimeout((function(){e=null}),n),a&&(t=i.apply(o,s))}else e=setTimeout((function(){i.apply(o,s)}),n);return t};return o.cancel=function(){clearTimeout(e),e=null},o}function qe(e,t){return JSON.parse(JSON.stringify(e,(function(e,n){if(!t.includes(e))return n})))}function ze(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){if(Array.isArray(e[n]))return ze(e[n],t[n]);if(e[n]!==t[n])return!1}return!0}})(),a})()));
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("vue"), require("lodash"), require("@popperjs/core"), require("vue-types"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["vue", "lodash", "@popperjs/core", "vue-types"], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("vue"), require("lodash"), require("@popperjs/core"), require("vue-types")) : factory(root["vue"], root["lodash"], root["@popperjs/core"], root["vue-types"]);
8
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
+ }
10
+ })(self, (__WEBPACK_EXTERNAL_MODULE__748__, __WEBPACK_EXTERNAL_MODULE__467__, __WEBPACK_EXTERNAL_MODULE__5798__, __WEBPACK_EXTERNAL_MODULE__210__) => {
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
+ /***/ 5798:
256
+ /***/ ((module) => {
257
+
258
+ "use strict";
259
+ module.exports = __WEBPACK_EXTERNAL_MODULE__5798__;
260
+
261
+ /***/ }),
262
+
263
+ /***/ 467:
264
+ /***/ ((module) => {
265
+
266
+ "use strict";
267
+ module.exports = __WEBPACK_EXTERNAL_MODULE__467__;
268
+
269
+ /***/ }),
270
+
271
+ /***/ 748:
272
+ /***/ ((module) => {
273
+
274
+ "use strict";
275
+ module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
276
+
277
+ /***/ }),
278
+
279
+ /***/ 210:
280
+ /***/ ((module) => {
281
+
282
+ "use strict";
283
+ module.exports = __WEBPACK_EXTERNAL_MODULE__210__;
284
+
285
+ /***/ })
286
+
287
+ /******/ });
288
+ /************************************************************************/
289
+ /******/ // The module cache
290
+ /******/ var __webpack_module_cache__ = {};
291
+ /******/
292
+ /******/ // The require function
293
+ /******/ function __webpack_require__(moduleId) {
294
+ /******/ // Check if module is in cache
295
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
296
+ /******/ if (cachedModule !== undefined) {
297
+ /******/ return cachedModule.exports;
298
+ /******/ }
299
+ /******/ // Create a new module (and put it into the cache)
300
+ /******/ var module = __webpack_module_cache__[moduleId] = {
301
+ /******/ // no module.id needed
302
+ /******/ // no module.loaded needed
303
+ /******/ exports: {}
304
+ /******/ };
305
+ /******/
306
+ /******/ // Execute the module function
307
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
308
+ /******/
309
+ /******/ // Return the exports of the module
310
+ /******/ return module.exports;
311
+ /******/ }
312
+ /******/
313
+ /************************************************************************/
314
+ /******/ /* webpack/runtime/define property getters */
315
+ /******/ (() => {
316
+ /******/ // define getter functions for harmony exports
317
+ /******/ __webpack_require__.d = (exports, definition) => {
318
+ /******/ for(var key in definition) {
319
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
320
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
321
+ /******/ }
322
+ /******/ }
323
+ /******/ };
324
+ /******/ })();
325
+ /******/
326
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
327
+ /******/ (() => {
328
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
329
+ /******/ })();
330
+ /******/
331
+ /******/ /* webpack/runtime/make namespace object */
332
+ /******/ (() => {
333
+ /******/ // define __esModule on exports
334
+ /******/ __webpack_require__.r = (exports) => {
335
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
336
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
337
+ /******/ }
338
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
339
+ /******/ };
340
+ /******/ })();
341
+ /******/
342
+ /************************************************************************/
343
+ var __webpack_exports__ = {};
344
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
345
+ (() => {
346
+ "use strict";
347
+ // ESM COMPAT FLAG
348
+ __webpack_require__.r(__webpack_exports__);
349
+
350
+ // EXPORTS
351
+ __webpack_require__.d(__webpack_exports__, {
352
+ AlignEnum: () => (/* reexport */ AlignEnum),
353
+ BKLAYERD_INDEX_EFAULT_VALUE: () => (/* reexport */ BKLAYERD_INDEX_EFAULT_VALUE),
354
+ BKLAYERTYPE: () => (/* reexport */ BKLAYERTYPE),
355
+ BKPopIndexManager: () => (/* reexport */ BKPopIndexManager),
356
+ BKPopover: () => (/* reexport */ BKPopover),
357
+ BkMaskManager: () => (/* reexport */ BkMaskManager),
358
+ DialogTypeEnum: () => (/* reexport */ DialogTypeEnum),
359
+ DirectionEnum: () => (/* reexport */ DirectionEnum),
360
+ EMPTY_OBJ: () => (/* binding */ EMPTY_OBJ),
361
+ InputBehaviorEnum: () => (/* reexport */ InputBehaviorEnum),
362
+ InputBehaviorType: () => (/* reexport */ InputBehaviorType),
363
+ LineStyleEnum: () => (/* reexport */ LineStyleEnum),
364
+ PlacementEnum: () => (/* reexport */ PlacementEnum),
365
+ Placements: () => (/* reexport */ Placements),
366
+ PropTypes: () => (/* reexport */ PropTypes),
367
+ RenderDirectiveEnum: () => (/* reexport */ RenderDirectiveEnum),
368
+ RenderType: () => (/* reexport */ RenderType),
369
+ SelectedType: () => (/* reexport */ SelectedType),
370
+ SelectedTypeEnum: () => (/* reexport */ SelectedTypeEnum),
371
+ SizeEnum: () => (/* reexport */ SizeEnum),
372
+ TagThemeEnum: () => (/* reexport */ TagThemeEnum),
373
+ TagThemeType: () => (/* reexport */ TagThemeType),
374
+ ThemeEnum: () => (/* reexport */ ThemeEnum),
375
+ TriggerEnum: () => (/* reexport */ TriggerEnum),
376
+ alignType: () => (/* reexport */ alignType),
377
+ arrayEqual: () => (/* binding */ arrayEqual),
378
+ bKMaskManager: () => (/* reexport */ bKMaskManager),
379
+ bkPopIndexManager: () => (/* reexport */ bkPopIndexManager),
380
+ bkZIndexManager: () => (/* reexport */ bkZIndexManager),
381
+ capitalize: () => (/* reexport */ capitalize),
382
+ checkOverflow: () => (/* reexport */ checkOverflow),
383
+ classes: () => (/* binding */ classes),
384
+ clone: () => (/* reexport */ clone),
385
+ debounce: () => (/* binding */ debounce),
386
+ dialogTypeUnion: () => (/* reexport */ dialogTypeUnion),
387
+ directionType: () => (/* reexport */ directionType),
388
+ elementsEqual: () => (/* reexport */ elementsEqual),
389
+ filterProperty: () => (/* binding */ filterProperty),
390
+ finiteOrDefault: () => (/* reexport */ finiteOrDefault),
391
+ formItemKey: () => (/* reexport */ formItemKey),
392
+ formKey: () => (/* reexport */ formKey),
393
+ getPopContainerId: () => (/* reexport */ getPopContainerId),
394
+ hasOverflowEllipsis: () => (/* reexport */ hasOverflowEllipsis),
395
+ isArray: () => (/* reexport */ isArray),
396
+ isElement: () => (/* reexport */ helper_isElement),
397
+ isEmpty: () => (/* reexport */ isEmpty),
398
+ isEmptyObj: () => (/* binding */ isEmptyObj),
399
+ isFinite: () => (/* reexport */ isNumberFinite),
400
+ isNullOrUndef: () => (/* reexport */ isNullOrUndef),
401
+ isObject: () => (/* reexport */ isObject),
402
+ lineStyleType: () => (/* reexport */ lineStyleType),
403
+ maybeShowTooltip: () => (/* reexport */ maybeShowTooltip),
404
+ merge: () => (/* reexport */ merge),
405
+ mergeIf: () => (/* reexport */ mergeIf),
406
+ mergerFn: () => (/* reexport */ mergerFn),
407
+ mergerIfFn: () => (/* reexport */ mergerIfFn),
408
+ noop: () => (/* binding */ noop),
409
+ observerResize: () => (/* reexport */ observerResize),
410
+ off: () => (/* reexport */ off),
411
+ on: () => (/* reexport */ on),
412
+ placementType: () => (/* reexport */ placementType),
413
+ random: () => (/* reexport */ random),
414
+ renderDirectiveType: () => (/* reexport */ renderDirectiveType),
415
+ renderEmptyVNode: () => (/* binding */ renderEmptyVNode),
416
+ renderType: () => (/* reexport */ renderType),
417
+ resolveClassName: () => (/* binding */ resolveClassName),
418
+ scrollTop: () => (/* reexport */ scrollTop),
419
+ scrollbarWidth: () => (/* reexport */ scrollbarWidth),
420
+ stringEnum: () => (/* reexport */ stringEnum),
421
+ triggerType: () => (/* reexport */ triggerType),
422
+ useForm: () => (/* reexport */ useForm),
423
+ useFormItem: () => (/* reexport */ useFormItem),
424
+ valueOrDefault: () => (/* reexport */ valueOrDefault),
425
+ withInstall: () => (/* binding */ withInstall),
426
+ withInstallProps: () => (/* binding */ withInstallProps)
427
+ });
428
+
429
+ ;// CONCATENATED MODULE: ../../packages/shared/src/dom.ts
430
+ /*
431
+ * Tencent is pleased to support the open source community by making
432
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
433
+ *
434
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
435
+ *
436
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
437
+ *
438
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
439
+ *
440
+ * ---------------------------------------------------
441
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
442
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
443
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
444
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
445
+ *
446
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
447
+ * the Software.
448
+ *
449
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
450
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
451
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
452
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
453
+ * IN THE SOFTWARE.
454
+ */
455
+ var on = function () {
456
+ if (document.addEventListener) {
457
+ return function (element, event, handler) {
458
+ if (element && event && handler) {
459
+ element.addEventListener(event, handler, true);
460
+ }
461
+ };
462
+ }
463
+ return function (element, event, handler) {
464
+ if (element && event && handler) {
465
+ element.attachEvent("on".concat(event), handler);
466
+ }
467
+ };
468
+ }();
469
+ // 兼容浏览器,移除事件监听器
470
+ var off = function () {
471
+ if (document.removeEventListener) {
472
+ return function (element, event, handler) {
473
+ if (element && event) {
474
+ element.removeEventListener(event, handler, true);
475
+ }
476
+ };
477
+ }
478
+ return function (element, event, handler) {
479
+ if (element && event) {
480
+ element.detachEvent("on".concat(event), handler);
481
+ }
482
+ };
483
+ }();
484
+ // scrollTop animation
485
+ function scrollTop(el) {
486
+ var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
487
+ var to = arguments.length > 2 ? arguments[2] : undefined;
488
+ var duration = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 500;
489
+ var endCallback = arguments.length > 4 ? arguments[4] : undefined;
490
+ var difference = Math.abs(from - to);
491
+ var step = Math.ceil(difference / duration * 50);
492
+ function scroll(start, end, step) {
493
+ if (start === end) {
494
+ endCallback === null || endCallback === void 0 ? void 0 : endCallback();
495
+ return;
496
+ }
497
+ var d = start + step > end ? end : start + step;
498
+ if (start > end) {
499
+ d = start - step < end ? end : start - step;
500
+ }
501
+ if (el === window) {
502
+ window.scrollTo(d, d);
503
+ } else {
504
+ el.scrollTop = d;
505
+ }
506
+ window.requestAnimationFrame(function () {
507
+ return scroll(d, end, step);
508
+ });
509
+ }
510
+ scroll(from, to, step);
511
+ }
512
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
513
+ function _typeof(obj) {
514
+ "@babel/helpers - typeof";
515
+
516
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
517
+ return typeof obj;
518
+ } : function (obj) {
519
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
520
+ }, _typeof(obj);
521
+ }
522
+ ;// CONCATENATED MODULE: ../../packages/shared/src/helper.ts
523
+
524
+ /*
525
+ * Tencent is pleased to support the open source community by making
526
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
527
+ *
528
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
529
+ *
530
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
531
+ *
532
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
533
+ *
534
+ * ---------------------------------------------------
535
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
536
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
537
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
538
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
539
+ *
540
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
541
+ * the Software.
542
+ *
543
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
544
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
545
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
546
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
547
+ * IN THE SOFTWARE.
548
+ */
549
+ /* eslint-disable no-underscore-dangle */
550
+ /**
551
+ * Returns true if `value` is neither null nor undefined, else returns false.
552
+ * @param {*} value - The value to test.
553
+ * @returns {boolean}
554
+ * @since 2.7.0
555
+ */
556
+ function isNullOrUndef(value) {
557
+ return value === null || typeof value === 'undefined';
558
+ }
559
+ function isEmpty(value) {
560
+ var IncludeNullUndefined = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
561
+ return value === '' || (IncludeNullUndefined ? isNullOrUndef(value) : false);
562
+ }
563
+ /**
564
+ * Returns true if `value` is an array (including typed arrays), else returns false.
565
+ * @param {*} value - The value to test.
566
+ * @returns {boolean}
567
+ * @function
568
+ */
569
+ function isArray(value) {
570
+ if (Array.isArray(value)) {
571
+ return true;
572
+ }
573
+ var type = Object.prototype.toString.call(value);
574
+ if (type.substr(0, 7) === '[object' && type.substr(-6) === 'Array]') {
575
+ return true;
576
+ }
577
+ return false;
578
+ }
579
+ /**
580
+ * Returns true if `value` is an object (excluding null), else returns false.
581
+ * @param {*} value - The value to test.
582
+ * @returns {boolean}
583
+ * @since 2.7.0
584
+ */
585
+ function isObject(value) {
586
+ return value !== null && /^\[object (Object|Module)\]/.test(Object.prototype.toString.call(value));
587
+ }
588
+ /**
589
+ * Returns true if `value` is a finite number, else returns false
590
+ * @param {*} value - The value to test.
591
+ * @returns {boolean}
592
+ */
593
+ var isNumberFinite = function isNumberFinite(value) {
594
+ return (typeof value === 'number' || value instanceof Number) && isFinite(+value);
595
+ };
596
+
597
+ /**
598
+ * Returns `value` if finite, else returns `defaultValue`.
599
+ * @param {*} value - The value to return if defined.
600
+ * @param {*} defaultValue - The value to return if `value` is not finite.
601
+ * @returns {*}
602
+ */
603
+ function finiteOrDefault(value, defaultValue) {
604
+ return isNumberFinite(value) ? value : defaultValue;
605
+ }
606
+ /**
607
+ * Returns `value` if defined, else returns `defaultValue`.
608
+ * @param {*} value - The value to return if defined.
609
+ * @param {*} defaultValue - The value to return if `value` is undefined.
610
+ * @returns {*}
611
+ */
612
+ function valueOrDefault(value, defaultValue) {
613
+ return typeof value === 'undefined' ? defaultValue : value;
614
+ }
615
+ /**
616
+ * Returns true if the `a0` and `a1` arrays have the same content, else returns false.
617
+ * @param {Array} a0 - The array to compare
618
+ * @param {Array} a1 - The array to compare
619
+ * @returns {boolean}
620
+ * @private
621
+ */
622
+ function elementsEqual(a0, a1) {
623
+ var i;
624
+ var ilen;
625
+ var v0;
626
+ var v1;
627
+ if (!a0 || !a1 || a0.length !== a1.length) {
628
+ return false;
629
+ }
630
+ for (i = 0, ilen = a0.length; i < ilen; ++i) {
631
+ v0 = a0[i];
632
+ v1 = a1[i];
633
+ if (v0.datasetIndex !== v1.datasetIndex || v0.index !== v1.index) {
634
+ return false;
635
+ }
636
+ }
637
+ return true;
638
+ }
639
+ /**
640
+ * Returns a deep copy of `source` without keeping references on objects and arrays.
641
+ * @param {*} source - The value to clone.
642
+ * @returns {*}
643
+ */
644
+ function clone(source) {
645
+ if (isArray(source)) {
646
+ return source.map(clone);
647
+ }
648
+ if (isObject(source)) {
649
+ var target = Object.create(null);
650
+ var keys = Object.keys(source);
651
+ var klen = keys.length;
652
+ var k = 0;
653
+ for (; k < klen; ++k) {
654
+ target[keys[k]] = clone(source[keys[k]]);
655
+ }
656
+ return target;
657
+ }
658
+ return source;
659
+ }
660
+ function isValidKey(key) {
661
+ return ['__proto__', 'prototype', 'constructor'].indexOf(key) === -1;
662
+ }
663
+ /**
664
+ * The default merger when Chart.helpers.merge is called without merger option.
665
+ * Note(SB): also used by mergeConfig and mergeScaleConfig as fallback.
666
+ * @private
667
+ */
668
+ function mergerFn(key, target, source, options) {
669
+ if (!isValidKey(key)) {
670
+ return;
671
+ }
672
+ var tval = target[key];
673
+ var sval = source[key];
674
+ if (isObject(tval) && isObject(sval)) {
675
+ // eslint-disable-next-line no-use-before-define
676
+ merge(tval, sval, options);
677
+ } else {
678
+ // eslint-disable-next-line no-param-reassign
679
+ target[key] = clone(sval);
680
+ }
681
+ }
682
+ /**
683
+ * Recursively deep copies `source` properties into `target` with the given `options`.
684
+ * IMPORTANT: `target` is not cloned and will be updated with `source` properties.
685
+ * @param {object} target - The target object in which all sources are merged into.
686
+ * @param {object|object[]} source - Object(s) to merge into `target`.
687
+ * @param {object} [options] - Merging options:
688
+ * @param {function} [options.merger] - The merge method (key, target, source, options)
689
+ * @returns {object} The `target` object.
690
+ */
691
+ function merge(target, source, options) {
692
+ var sources = isArray(source) ? source : [source];
693
+ var ilen = sources.length;
694
+ if (!isObject(target)) {
695
+ return target;
696
+ }
697
+ // eslint-disable-next-line no-param-reassign
698
+ options = options || {};
699
+ var merger = options.merger || mergerFn;
700
+ for (var i = 0; i < ilen; ++i) {
701
+ // eslint-disable-next-line no-param-reassign
702
+ source = sources[i];
703
+ if (!isObject(source)) {
704
+ continue;
705
+ }
706
+ var keys = Object.keys(source);
707
+ for (var k = 0, klen = keys.length; k < klen; ++k) {
708
+ merger(keys[k], target, source, options);
709
+ }
710
+ }
711
+ return target;
712
+ }
713
+ /**
714
+ * Recursively deep copies `source` properties into `target` *only* if not defined in target.
715
+ * IMPORTANT: `target` is not cloned and will be updated with `source` properties.
716
+ * @param {object} target - The target object in which all sources are merged into.
717
+ * @param {object|object[]} source - Object(s) to merge into `target`.
718
+ * @returns {object} The `target` object.
719
+ */
720
+ function mergeIf(target, source) {
721
+ // eslint-disable-next-line no-use-before-define
722
+ return merge(target, source, {
723
+ merger: mergerIfFn
724
+ });
725
+ }
726
+ /**
727
+ * Merges source[key] in target[key] only if target[key] is undefined.
728
+ * @private
729
+ */
730
+ function mergerIfFn(key, target, source) {
731
+ if (!isValidKey(key)) {
732
+ return;
733
+ }
734
+ var tval = target[key];
735
+ var sval = source[key];
736
+ if (isObject(tval) && isObject(sval)) {
737
+ mergeIf(tval, sval);
738
+ } else if (!Object.prototype.hasOwnProperty.call(target, key)) {
739
+ // eslint-disable-next-line no-param-reassign
740
+ target[key] = clone(sval);
741
+ }
742
+ }
743
+ /**
744
+ * 检查当前元素是否为Html元素
745
+ * @param obj
746
+ * @returns
747
+ */
748
+ function helper_isElement(obj) {
749
+ try {
750
+ return obj instanceof HTMLElement;
751
+ } catch (e) {
752
+ return _typeof(obj) === 'object' && obj.nodeType === 1 && _typeof(obj.style) === 'object' && _typeof(obj.ownerDocument) === 'object';
753
+ }
754
+ }
755
+ /**
756
+ * Whether the text content is clipped due to CSS overflow, as in showing `...`.
757
+ */
758
+ function hasOverflowEllipsis(element) {
759
+ return element.offsetWidth < element.scrollWidth || element.offsetHeight < element.scrollHeight;
760
+ }
761
+ /**
762
+ * Sets the `title` attribute in the event's element target, when the text
763
+ * content is clipped due to CSS overflow, as in showing `...`.
764
+ */
765
+ function maybeShowTooltip(target, title) {
766
+ if (hasOverflowEllipsis(target)) {
767
+ target.setAttribute('title', title);
768
+ } else {
769
+ target.removeAttribute('title');
770
+ }
771
+ }
772
+ // EXTERNAL MODULE: external "vue"
773
+ var external_vue_ = __webpack_require__(748);
774
+ ;// CONCATENATED MODULE: ../../packages/shared/src/token.ts
775
+ /*
776
+ * Tencent is pleased to support the open source community by making
777
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
778
+ *
779
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
780
+ *
781
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
782
+ *
783
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
784
+ *
785
+ * ---------------------------------------------------
786
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
787
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
788
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
789
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
790
+ *
791
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
792
+ * the Software.
793
+ *
794
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
795
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
796
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
797
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
798
+ * IN THE SOFTWARE.
799
+ */
800
+ var formKey = Symbol('form');
801
+ var formItemKey = Symbol('formItem');
802
+ ;// CONCATENATED MODULE: ../../packages/shared/src/hooks/use-form.ts
803
+ /*
804
+ * Tencent is pleased to support the open source community by making
805
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
806
+ *
807
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
808
+ *
809
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
810
+ *
811
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
812
+ *
813
+ * ---------------------------------------------------
814
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
815
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
816
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
817
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
818
+ *
819
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
820
+ * the Software.
821
+ *
822
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
823
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
824
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
825
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
826
+ * IN THE SOFTWARE.
827
+ */
828
+
829
+
830
+ var useForm = function useForm() {
831
+ return (0,external_vue_.inject)(formKey);
832
+ };
833
+ ;// CONCATENATED MODULE: ../../packages/shared/src/hooks/use-form-item.ts
834
+ /*
835
+ * Tencent is pleased to support the open source community by making
836
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
837
+ *
838
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
839
+ *
840
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
841
+ *
842
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
843
+ *
844
+ * ---------------------------------------------------
845
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
846
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
847
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
848
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
849
+ *
850
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
851
+ * the Software.
852
+ *
853
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
854
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
855
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
856
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
857
+ * IN THE SOFTWARE.
858
+ */
859
+
860
+
861
+ var useFormItem = function useFormItem() {
862
+ return (0,external_vue_.inject)(formItemKey, undefined);
863
+ };
864
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/classCallCheck.js
865
+ function _classCallCheck(instance, Constructor) {
866
+ if (!(instance instanceof Constructor)) {
867
+ throw new TypeError("Cannot call a class as a function");
868
+ }
869
+ }
870
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
871
+
872
+ function _toPrimitive(input, hint) {
873
+ if (_typeof(input) !== "object" || input === null) return input;
874
+ var prim = input[Symbol.toPrimitive];
875
+ if (prim !== undefined) {
876
+ var res = prim.call(input, hint || "default");
877
+ if (_typeof(res) !== "object") return res;
878
+ throw new TypeError("@@toPrimitive must return a primitive value.");
879
+ }
880
+ return (hint === "string" ? String : Number)(input);
881
+ }
882
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
883
+
884
+
885
+ function _toPropertyKey(arg) {
886
+ var key = _toPrimitive(arg, "string");
887
+ return _typeof(key) === "symbol" ? key : String(key);
888
+ }
889
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/createClass.js
890
+
891
+ function _defineProperties(target, props) {
892
+ for (var i = 0; i < props.length; i++) {
893
+ var descriptor = props[i];
894
+ descriptor.enumerable = descriptor.enumerable || false;
895
+ descriptor.configurable = true;
896
+ if ("value" in descriptor) descriptor.writable = true;
897
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
898
+ }
899
+ }
900
+ function _createClass(Constructor, protoProps, staticProps) {
901
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
902
+ if (staticProps) _defineProperties(Constructor, staticProps);
903
+ Object.defineProperty(Constructor, "prototype", {
904
+ writable: false
905
+ });
906
+ return Constructor;
907
+ }
908
+ // EXTERNAL MODULE: external "lodash"
909
+ var external_lodash_ = __webpack_require__(467);
910
+ ;// CONCATENATED MODULE: ../../packages/shared/src/utils.ts
911
+ /*
912
+ * Tencent is pleased to support the open source community by making
913
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
914
+ *
915
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
916
+ *
917
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
918
+ *
919
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
920
+ *
921
+ * ---------------------------------------------------
922
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
923
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
924
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
925
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
926
+ *
927
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
928
+ * the Software.
929
+ *
930
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
931
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
932
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
933
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
934
+ * IN THE SOFTWARE.
935
+ */
936
+
937
+ var lowerStr = 'abcdefghijklmnopqrstuvwxyz0123456789';
938
+ /**
939
+ * 生成n位长度的字符串
940
+ * @param {Number} n
941
+ * @param str,默认26位字母及数字
942
+ */
943
+ var random = function random(n) {
944
+ var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : lowerStr;
945
+ var result = '';
946
+ for (var i = 0; i < n; i++) {
947
+ result += str[parseInt((Math.random() * str.length).toString(), 10)];
948
+ }
949
+ return result;
950
+ };
951
+ /**
952
+ * 监听目标元素的Resize事件
953
+ * @param root 目标元素
954
+ * @param callbackFn 执行函数
955
+ * @param delay 延迟执行时间,默认 60
956
+ * @param immediate 是否立即执行回调函数
957
+ * @returns "{ start: () => void, stop: () => void }"
958
+ */
959
+ var observerResize = function observerResize(root, callbackFn) {
960
+ var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 60;
961
+ var immediate = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
962
+ var callFn = (0,external_lodash_.throttle)(function () {
963
+ if (typeof callbackFn === 'function') {
964
+ callbackFn();
965
+ }
966
+ }, delay);
967
+ var resizeObserver = new ResizeObserver(function () {
968
+ callFn();
969
+ });
970
+ if (immediate) {
971
+ if (typeof callbackFn === 'function') {
972
+ callbackFn();
973
+ }
974
+ }
975
+ return {
976
+ start: function start() {
977
+ resizeObserver.observe(root);
978
+ },
979
+ stop: function stop() {
980
+ resizeObserver.disconnect();
981
+ resizeObserver.unobserve(root);
982
+ }
983
+ };
984
+ };
985
+ var capitalize = function capitalize(str) {
986
+ return str[0].toUpperCase() + str.slice(1);
987
+ };
988
+ /**
989
+ * 判断元素是否溢出容器
990
+ * @param {*} el
991
+ * @returns
992
+ */
993
+ function checkOverflow(el) {
994
+ if (!el) return false;
995
+ var createDom = function createDom(el, css) {
996
+ var dom = document.createElement('div');
997
+ var width = parseFloat(css.width) ? "".concat(Math.ceil(parseFloat(css.width)), "px") : css.width;
998
+ dom.style.cssText = "\n width: ".concat(width, ";\n line-height: ").concat(css['line-height'], ";\n font-size: ").concat(css['font-size'], ";\n word-break: ").concat(css['word-break'], ";\n padding: ").concat(css.padding, ";\n ");
999
+ dom.textContent = el.textContent;
1000
+ return dom;
1001
+ };
1002
+ var isOverflow = false;
1003
+ try {
1004
+ var css = window.getComputedStyle(el, null);
1005
+ var lineClamp = css.webkitLineClamp;
1006
+ if (lineClamp !== 'none') {
1007
+ var targetHeight = parseFloat(css.height);
1008
+ var dom = createDom(el, css);
1009
+ document.body.appendChild(dom);
1010
+ var domHeight = window.getComputedStyle(dom, null).height;
1011
+ document.body.removeChild(dom);
1012
+ isOverflow = targetHeight < parseFloat(domHeight);
1013
+ } else {
1014
+ isOverflow = el.clientWidth < el.scrollWidth || el.clientHeight < el.scrollHeight;
1015
+ }
1016
+ } catch (e) {
1017
+ console.warn('There is an error when check element overflow state: ', e);
1018
+ }
1019
+ return isOverflow;
1020
+ }
1021
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
1022
+
1023
+ function _defineProperty(obj, key, value) {
1024
+ key = _toPropertyKey(key);
1025
+ if (key in obj) {
1026
+ Object.defineProperty(obj, key, {
1027
+ value: value,
1028
+ enumerable: true,
1029
+ configurable: true,
1030
+ writable: true
1031
+ });
1032
+ } else {
1033
+ obj[key] = value;
1034
+ }
1035
+ return obj;
1036
+ }
1037
+ ;// CONCATENATED MODULE: ../../packages/shared/src/z-index-manager.ts
1038
+
1039
+
1040
+
1041
+ var _BKLAYERD_INDEX_EFAUL;
1042
+ /**
1043
+ * Tencent is pleased to support the open source community by making
1044
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1045
+ *
1046
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1047
+ *
1048
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1049
+ *
1050
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1051
+ *
1052
+ * ---------------------------------------------------
1053
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1054
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1055
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1056
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1057
+ *
1058
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1059
+ * the Software.
1060
+ *
1061
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1062
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1063
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1064
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1065
+ * IN THE SOFTWARE.
1066
+ */
1067
+ /**
1068
+ * 页面框架层级
1069
+ */
1070
+ var BKLAYERTYPE;
1071
+ (function (BKLAYERTYPE) {
1072
+ /** 网站内容的背景、拓扑的画布等 */
1073
+ BKLAYERTYPE["BOTTOM"] = "bottom";
1074
+ /** 页面呈现的各类内容 */
1075
+ BKLAYERTYPE["CONTENT"] = "content";
1076
+ /** 顶部导航、侧边导航以及用户信息等 */
1077
+ BKLAYERTYPE["NAVI"] = "navi";
1078
+ /** 页面需全屏操作的部分功能或编辑器的全屏模式 */
1079
+ BKLAYERTYPE["FULLSCREEN"] = "fullScreen";
1080
+ /** 各类功能插件 */
1081
+ BKLAYERTYPE["PLUGINS"] = "plugins";
1082
+ /** 各类弹窗或抽屉(非模态弹窗不考虑) */
1083
+ BKLAYERTYPE["MODAL"] = "modal";
1084
+ /** 各类消息提示 */
1085
+ BKLAYERTYPE["MESSAGE"] = "message";
1086
+ /** 各类popper提示 */
1087
+ BKLAYERTYPE["POPPER"] = "popper";
1088
+ })(BKLAYERTYPE || (BKLAYERTYPE = {}));
1089
+ /** 定义不同分层默认值 */
1090
+ var BKLAYERD_INDEX_EFAULT_VALUE = (_BKLAYERD_INDEX_EFAUL = {}, _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.BOTTOM, 0), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.CONTENT, 1), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.NAVI, 100), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.FULLSCREEN, 1000), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.MODAL, 3000), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.PLUGINS, 8000), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.MESSAGE, 10000), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.POPPER, 99999), _BKLAYERD_INDEX_EFAUL);
1091
+ var BKZIndexManager = /*#__PURE__*/function () {
1092
+ function BKZIndexManager() {
1093
+ _classCallCheck(this, BKZIndexManager);
1094
+ this.storageLayerIndexValue = {};
1095
+ this.copyDefaultValue();
1096
+ }
1097
+ /**
1098
+ *
1099
+ * @param type
1100
+ * @returns
1101
+ */
1102
+ _createClass(BKZIndexManager, [{
1103
+ key: "getNextIndex",
1104
+ value: function getNextIndex(type) {
1105
+ if (Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue, type)) {
1106
+ this.storageLayerIndexValue[type] = this.storageLayerIndexValue[type] + 1;
1107
+ return this.storageLayerIndexValue[type];
1108
+ }
1109
+ this.storageLayerIndexValue[BKLAYERTYPE.MODAL] = this.storageLayerIndexValue[BKLAYERTYPE.MODAL] + 1;
1110
+ return this.storageLayerIndexValue[BKLAYERTYPE.MODAL];
1111
+ }
1112
+ /** 获取弹窗类型最新zIndex的值 */
1113
+ }, {
1114
+ key: "getModalNextIndex",
1115
+ value: function getModalNextIndex() {
1116
+ return this.getNextIndex(BKLAYERTYPE.MODAL);
1117
+ }
1118
+ /** 获取Message类型最新zIndex的值 */
1119
+ }, {
1120
+ key: "getMessageNextIndex",
1121
+ value: function getMessageNextIndex() {
1122
+ return this.getNextIndex(BKLAYERTYPE.MESSAGE);
1123
+ }
1124
+ /** 获取全屏类型最新zIndex的值 */
1125
+ }, {
1126
+ key: "getFullScreenNextIndex",
1127
+ value: function getFullScreenNextIndex() {
1128
+ return this.getNextIndex(BKLAYERTYPE.FULLSCREEN);
1129
+ }
1130
+ /** 获取导航类型最新zIndex的值 */
1131
+ }, {
1132
+ key: "getNaviNextIndex",
1133
+ value: function getNaviNextIndex() {
1134
+ return this.getNextIndex(BKLAYERTYPE.NAVI);
1135
+ }
1136
+ /** 获取导航类型最新zIndex的值 */
1137
+ }, {
1138
+ key: "getPopperIndex",
1139
+ value: function getPopperIndex() {
1140
+ return BKLAYERD_INDEX_EFAULT_VALUE.popper;
1141
+ }
1142
+ /**
1143
+ * 更新自定义默认zIndex配置
1144
+ * @param config 配置项
1145
+ */
1146
+ }, {
1147
+ key: "setDefaultZIndex",
1148
+ value: function setDefaultZIndex(config) {
1149
+ var _this = this;
1150
+ Object.keys(config || {}).forEach(function (key) {
1151
+ if (Object.prototype.hasOwnProperty.call(_this.storageLayerIndexValue.__proto__, key)) {
1152
+ Object.assign(_this.storageLayerIndexValue.__proto__, _defineProperty({}, key, config[key]));
1153
+ }
1154
+ });
1155
+ this.copyDefaultValue();
1156
+ }
1157
+ /**
1158
+ * 重置zIndex
1159
+ * @param config 配置项
1160
+ */
1161
+ }, {
1162
+ key: "resetZIndex",
1163
+ value: function resetZIndex(config) {
1164
+ var _this2 = this;
1165
+ Object.keys(config || {}).forEach(function (key) {
1166
+ if (Object.prototype.hasOwnProperty.call(_this2.storageLayerIndexValue, key)) {
1167
+ Object.assign(_this2.storageLayerIndexValue, _defineProperty({}, key, config[key]));
1168
+ }
1169
+ });
1170
+ }
1171
+ /**
1172
+ * 根据默认设置创建副本
1173
+ */
1174
+ }, {
1175
+ key: "copyDefaultValue",
1176
+ value: function copyDefaultValue() {
1177
+ var properties = Object.keys(BKLAYERD_INDEX_EFAULT_VALUE).reduce(function (props, key) {
1178
+ return Object.assign(props, _defineProperty({}, key, {
1179
+ value: BKLAYERD_INDEX_EFAULT_VALUE[key],
1180
+ writable: true,
1181
+ configurable: true
1182
+ }));
1183
+ }, {});
1184
+ this.storageLayerIndexValue = Object.create(BKLAYERD_INDEX_EFAULT_VALUE, properties);
1185
+ }
1186
+ }]);
1187
+ return BKZIndexManager;
1188
+ }();
1189
+ var bkZIndexManager = new BKZIndexManager();
1190
+ ;// CONCATENATED MODULE: ../../packages/shared/src/mask-manager.ts
1191
+
1192
+
1193
+ /*
1194
+ * Tencent is pleased to support the open source community by making
1195
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1196
+ *
1197
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1198
+ *
1199
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1200
+ *
1201
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1202
+ *
1203
+ * ---------------------------------------------------
1204
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1205
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1206
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1207
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1208
+ *
1209
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1210
+ * the Software.
1211
+ *
1212
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1213
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1214
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1215
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1216
+ * IN THE SOFTWARE.
1217
+ */
1218
+
1219
+
1220
+ // eslint-disable-next-line @typescript-eslint/naming-convention
1221
+ var DEFAULT_MASK_UUID = function DEFAULT_MASK_UUID() {};
1222
+ DEFAULT_MASK_UUID.prototype.def_val = "__bk_mask_".concat(random(16));
1223
+ var MaskQueueMaker = /*#__PURE__*/function () {
1224
+ function MaskQueueMaker() {
1225
+ _classCallCheck(this, MaskQueueMaker);
1226
+ this.timer = null;
1227
+ this.store = [];
1228
+ this.maskMap = new WeakMap();
1229
+ }
1230
+ _createClass(MaskQueueMaker, [{
1231
+ key: "appendMaker",
1232
+ value: function appendMaker(fn) {
1233
+ this.store.push(fn);
1234
+ this.executeMaker();
1235
+ }
1236
+ }, {
1237
+ key: "pushMaskStyle",
1238
+ value: function pushMaskStyle(parentNode, style) {
1239
+ var value = this.getMaskMap(parentNode);
1240
+ if (!(value === null || value === void 0 ? void 0 : value.styles)) {
1241
+ this.setMaskMap(parentNode, Object.assign({
1242
+ styles: [style]
1243
+ }, value || {}));
1244
+ } else {
1245
+ value.styles.push(style);
1246
+ }
1247
+ }
1248
+ }, {
1249
+ key: "getMaskStyles",
1250
+ value: function getMaskStyles(parentNode) {
1251
+ var _a;
1252
+ return ((_a = this.getMaskMap(parentNode)) === null || _a === void 0 ? void 0 : _a.styles) || [];
1253
+ }
1254
+ }, {
1255
+ key: "setMaskId",
1256
+ value: function setMaskId(parentNode, id) {
1257
+ var value = this.getMaskMap(parentNode);
1258
+ if (!value) {
1259
+ this.setMaskMap(parentNode, Object.assign({
1260
+ id: id
1261
+ }, value || {}));
1262
+ } else {
1263
+ Object.assign(value, {
1264
+ id: id
1265
+ });
1266
+ this.setMaskMap(parentNode, value);
1267
+ }
1268
+ }
1269
+ }, {
1270
+ key: "getMaskId",
1271
+ value: function getMaskId(parentNode) {
1272
+ var _a;
1273
+ return (_a = this.getMaskMap(parentNode)) === null || _a === void 0 ? void 0 : _a.id;
1274
+ }
1275
+ }, {
1276
+ key: "setMaskMap",
1277
+ value: function setMaskMap(key, value) {
1278
+ this.maskMap.set(key, value);
1279
+ }
1280
+ }, {
1281
+ key: "getMaskMap",
1282
+ value: function getMaskMap(key) {
1283
+ return this.maskMap.get(key);
1284
+ }
1285
+ }, {
1286
+ key: "executeMaker",
1287
+ value: function executeMaker() {
1288
+ var _this = this;
1289
+ this.timer && cancelAnimationFrame(this.timer);
1290
+ this.timer = requestAnimationFrame(function () {
1291
+ var fn = _this.store.pop();
1292
+ if (typeof fn === 'function') {
1293
+ Reflect.apply(fn, _this, []);
1294
+ _this.executeMaker();
1295
+ }
1296
+ });
1297
+ }
1298
+ }]);
1299
+ return MaskQueueMaker;
1300
+ }();
1301
+ var bkMaskMaker = new MaskQueueMaker();
1302
+ var BkMaskManager = /*#__PURE__*/function () {
1303
+ /**
1304
+ * 遮罩管理器
1305
+ *
1306
+ * @param multiInstance 是否允许多实例
1307
+ * @param maskAttrTag 遮罩DOM唯一标志,支持自定义和 auto
1308
+ */
1309
+ function BkMaskManager(config) {
1310
+ var _this2 = this;
1311
+ _classCallCheck(this, BkMaskManager);
1312
+ /** 是否允许多个遮罩实例 */
1313
+ this.multiInstance = false;
1314
+ /** 遮罩控制器唯一标识 */
1315
+ this.uniqueMaskAttrTag = '';
1316
+ /** 设置弹出层父级组件,默认是body */
1317
+ this.parentNode = document.body;
1318
+ /** 遮罩当前显示组件实例 **/
1319
+ this.activeInstance = undefined;
1320
+ /** 记录已在使用的z-index */
1321
+ this.zIndexStore = new Map();
1322
+ /** 记录最后一个UUID */
1323
+ this.lastUUID = null;
1324
+ /** 遮罩样式 **/
1325
+ this.maskStyle = {
1326
+ position: 'fixed',
1327
+ left: 0,
1328
+ top: 0,
1329
+ bottom: 0,
1330
+ right: 0,
1331
+ display: 'none',
1332
+ 'background-color': 'rgba(0,0,0,.6)'
1333
+ };
1334
+ // 用于判定是否已经初始化过当前实例
1335
+ this.isInit = false;
1336
+ this.maskAttrTag = 'auto';
1337
+ var _ref = config || {},
1338
+ _ref$multiInstance = _ref.multiInstance,
1339
+ multiInstance = _ref$multiInstance === void 0 ? false : _ref$multiInstance,
1340
+ _ref$maskAttrTag = _ref.maskAttrTag,
1341
+ maskAttrTag = _ref$maskAttrTag === void 0 ? 'auto' : _ref$maskAttrTag,
1342
+ _ref$parentNode = _ref.parentNode,
1343
+ parentNode = _ref$parentNode === void 0 ? document.body : _ref$parentNode,
1344
+ _ref$maskStyle = _ref.maskStyle,
1345
+ maskStyle = _ref$maskStyle === void 0 ? {} : _ref$maskStyle,
1346
+ _ref$onClick = _ref.onClick,
1347
+ onClick = _ref$onClick === void 0 ? null : _ref$onClick,
1348
+ _ref$popInstance = _ref.popInstance,
1349
+ popInstance = _ref$popInstance === void 0 ? null : _ref$popInstance;
1350
+ this.parentNode = parentNode || document;
1351
+ this.maskAttrTag = maskAttrTag;
1352
+ this.onClick = onClick;
1353
+ this.activeInstance = undefined;
1354
+ this.multiInstance = multiInstance;
1355
+ this.popInstance = popInstance;
1356
+ this.uniqueMaskAttrTag = this.getMaskAttrTag(maskAttrTag);
1357
+ // 避免多个实例多处初始化,此处会做队列处理
1358
+ // 合并重复的处理请求
1359
+ // 如果当前实例初始化时,仍未执行完队列,则需要进行请求合并
1360
+ bkMaskMaker.appendMaker(function () {
1361
+ _this2.initInstance(maskStyle);
1362
+ });
1363
+ }
1364
+ _createClass(BkMaskManager, [{
1365
+ key: "setOption",
1366
+ value: function setOption(option) {
1367
+ var _ref2 = option || {},
1368
+ _ref2$parentNode = _ref2.parentNode,
1369
+ parentNode = _ref2$parentNode === void 0 ? document.body : _ref2$parentNode,
1370
+ _ref2$maskStyle = _ref2.maskStyle,
1371
+ maskStyle = _ref2$maskStyle === void 0 ? {} : _ref2$maskStyle,
1372
+ _ref2$onClick = _ref2.onClick,
1373
+ onClick = _ref2$onClick === void 0 ? null : _ref2$onClick,
1374
+ _ref2$maskAttrTag = _ref2.maskAttrTag,
1375
+ maskAttrTag = _ref2$maskAttrTag === void 0 ? this.maskAttrTag : _ref2$maskAttrTag;
1376
+ this.onClick = onClick;
1377
+ this.parentNode = parentNode || document;
1378
+ this.setMaskStyle(Object.assign({}, this.maskStyle, maskStyle));
1379
+ this.uniqueMaskAttrTag = this.getMaskAttrTag(maskAttrTag);
1380
+ }
1381
+ /**
1382
+ * 显示遮罩
1383
+ * @param content 遮罩内容
1384
+ * @param zIndex z-index
1385
+ * @param showMask 是否显示遮罩
1386
+ * @param appendStyle 追加样式
1387
+ * @param transfer 是否显示将内容加入遮罩下
1388
+ */
1389
+ }, {
1390
+ key: "show",
1391
+ value: function show(content, zIndex) {
1392
+ var showMask = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
1393
+ var appendStyle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
1394
+ var uuid = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
1395
+ var transfer = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
1396
+ var uid = uuid !== null && uuid !== void 0 ? uuid : random(16);
1397
+ // @ts-ignore
1398
+ var localZIndex = /-?\d+/.test("".concat(zIndex)) ? zIndex : bkZIndexManager.getModalNextIndex();
1399
+ var style = Object.assign({}, this.maskStyle, appendStyle || {});
1400
+ /**
1401
+ * 如果不显示遮罩,此处遮罩继承父级
1402
+ * 同时,如果父级弹出层有遮罩,此处不能覆盖
1403
+ */
1404
+ if (!showMask) {
1405
+ if (this.lastUUID) {
1406
+ var preStore = this.zIndexStore.get(this.lastUUID);
1407
+ if (preStore) {
1408
+ style = preStore === null || preStore === void 0 ? void 0 : preStore.style;
1409
+ }
1410
+ }
1411
+ }
1412
+ /** 缓存当前z-index */
1413
+ this.storeMaskInsCfg({
1414
+ zIndex: localZIndex,
1415
+ style: Object.assign({}, style),
1416
+ uuid: uid,
1417
+ preUID: this.lastUUID
1418
+ });
1419
+ Object.assign(style, {
1420
+ display: 'block',
1421
+ 'z-index': "".concat(localZIndex),
1422
+ 'pointer-events': 'all'
1423
+ });
1424
+ this.initInstance(style);
1425
+ this.catchClickEvent();
1426
+ this.setMaskStyle(style);
1427
+ bkMaskMaker.pushMaskStyle(this.parentNode, Object.assign({}, style));
1428
+ this.backupMask.style.setProperty('z-index', "".concat(localZIndex - 1));
1429
+ if (!showMask) {
1430
+ this.mask.style.setProperty('pointer-events', 'none');
1431
+ content === null || content === void 0 ? void 0 : content.style.setProperty('pointer-events', 'all');
1432
+ }
1433
+ if (content) {
1434
+ if (transfer) content.style.setProperty('z-index', "".concat(localZIndex + 1)); // 表明内容不在遮罩下,内容区z-index + 1
1435
+ this.activeInstance = content;
1436
+ this.appendContentToMask(content); // 表明内容在body下,即在遮罩下
1437
+ }
1438
+ }
1439
+ }, {
1440
+ key: "hide",
1441
+ value: function hide() {
1442
+ var transfer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
1443
+ var content = arguments.length > 1 ? arguments[1] : undefined;
1444
+ var uuid = arguments.length > 2 ? arguments[2] : undefined;
1445
+ var _a;
1446
+ var uid = uuid !== null && uuid !== void 0 ? uuid : this.lastUUID;
1447
+ if (!transfer) {
1448
+ content === null || content === void 0 ? void 0 : content.remove();
1449
+ (_a = this.activeInstance) === null || _a === void 0 ? void 0 : _a.remove();
1450
+ }
1451
+ this.removeClickEvent();
1452
+ this.activeInstance = undefined;
1453
+ this.popIndexStore(uid);
1454
+ var maskList = bkMaskMaker.getMaskStyles(this.parentNode);
1455
+ maskList === null || maskList === void 0 ? void 0 : maskList.pop();
1456
+ if (!(maskList === null || maskList === void 0 ? void 0 : maskList.length)) {
1457
+ this.mask.style.setProperty('display', 'none');
1458
+ } else {
1459
+ var style = maskList.slice(-1)[0];
1460
+ this.setMaskStyle(style);
1461
+ }
1462
+ }
1463
+ }, {
1464
+ key: "storeMaskInsCfg",
1465
+ value: function storeMaskInsCfg(config) {
1466
+ this.zIndexStore.set(config.uuid, config);
1467
+ this.lastUUID = config.uuid;
1468
+ return this.zIndexStore.get(config.uuid);
1469
+ }
1470
+ /**
1471
+ * 移除最后一次缓存数据
1472
+ */
1473
+ }, {
1474
+ key: "popIndexStore",
1475
+ value: function popIndexStore(uuid) {
1476
+ if (this.zIndexStore.has(uuid)) {
1477
+ var rmIns = this.zIndexStore.get(uuid);
1478
+ this.lastUUID = rmIns.preUID;
1479
+ return this.zIndexStore["delete"](uuid);
1480
+ ;
1481
+ }
1482
+ this.lastUUID = null;
1483
+ return false;
1484
+ }
1485
+ }, {
1486
+ key: "backupActiveInstance",
1487
+ value: function backupActiveInstance() {
1488
+ if (this.activeInstance) {
1489
+ this.backupMask.append(this.activeInstance);
1490
+ }
1491
+ }
1492
+ }, {
1493
+ key: "backupContentElement",
1494
+ value: function backupContentElement(content) {
1495
+ content && this.backupMask.append(content);
1496
+ }
1497
+ }, {
1498
+ key: "getActiveContentInstance",
1499
+ value: function getActiveContentInstance() {
1500
+ return this.activeInstance;
1501
+ }
1502
+ }, {
1503
+ key: "initInstance",
1504
+ value: function initInstance(maskStyle) {
1505
+ if (!this.isInit) {
1506
+ this.isInit = true;
1507
+ var _this$getMask = this.getMask(),
1508
+ instance = _this$getMask.instance,
1509
+ isExist = _this$getMask.isExist;
1510
+ this.mask = instance;
1511
+ this.backupMask = this.getBackupMask();
1512
+ !isExist && this.setMaskStyle(Object.assign({}, this.maskStyle, maskStyle));
1513
+ }
1514
+ }
1515
+ /**
1516
+ * 初始化当前遮罩管理器
1517
+ * @returns 当前遮罩容器
1518
+ */
1519
+ }, {
1520
+ key: "getMask",
1521
+ value: function getMask() {
1522
+ if (this.multiInstance) {
1523
+ return {
1524
+ instance: this.createMask(),
1525
+ isExist: false
1526
+ };
1527
+ }
1528
+ var isExist = true;
1529
+ var div = this.parentNode.querySelector("[data-bk-mask-uid='".concat(this.uniqueMaskAttrTag, "']"));
1530
+ if (!div) {
1531
+ isExist = false;
1532
+ div = this.createMask();
1533
+ }
1534
+ return {
1535
+ instance: div,
1536
+ isExist: isExist
1537
+ };
1538
+ }
1539
+ }, {
1540
+ key: "catchClickEvent",
1541
+ value: function catchClickEvent() {
1542
+ var _this3 = this;
1543
+ if (this.mask) {
1544
+ this.mask.addEventListener('click', function (e) {
1545
+ return _this3.handleMaskClick(e);
1546
+ }, true);
1547
+ }
1548
+ }
1549
+ }, {
1550
+ key: "removeClickEvent",
1551
+ value: function removeClickEvent() {
1552
+ if (this.mask) {
1553
+ this.mask.removeEventListener('click', this.handleMaskClick);
1554
+ }
1555
+ }
1556
+ }, {
1557
+ key: "handleMaskClick",
1558
+ value: function handleMaskClick(e) {
1559
+ if (e.target === this.mask) {
1560
+ if (typeof this.onClick === 'function') {
1561
+ Reflect.apply(this.onClick, this.popInstance || this, [e]);
1562
+ }
1563
+ }
1564
+ }
1565
+ }, {
1566
+ key: "getBackupMask",
1567
+ value: function getBackupMask() {
1568
+ var attrName = 'data-bk-backup-uid';
1569
+ var div = this.parentNode.querySelector("[".concat(attrName, "]"));
1570
+ if (!div) {
1571
+ div = this.createMask(attrName);
1572
+ }
1573
+ return div;
1574
+ }
1575
+ /**
1576
+ * 创建遮罩层DOM
1577
+ * @returns 返回DOM
1578
+ */
1579
+ }, {
1580
+ key: "createMask",
1581
+ value: function createMask() {
1582
+ var attrName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'data-bk-mask-uid';
1583
+ var div = document.createElement('div');
1584
+ div.setAttribute(attrName, this.uniqueMaskAttrTag);
1585
+ this.parentNode.append(div);
1586
+ return div;
1587
+ }
1588
+ }, {
1589
+ key: "setMaskStyle",
1590
+ value: function setMaskStyle() {
1591
+ var _this4 = this;
1592
+ var maskStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1593
+ if (this.mask) {
1594
+ Object.entries(maskStyle).forEach(function (cfg) {
1595
+ return _this4.mask.style.setProperty(cfg[0], cfg[1]);
1596
+ });
1597
+ }
1598
+ }
1599
+ /**
1600
+ * 根据输入生成唯一遮罩标识
1601
+ * @param tag 输入标识
1602
+ * @returns string 返回唯一标识
1603
+ */
1604
+ }, {
1605
+ key: "getMaskAttrTag",
1606
+ value: function getMaskAttrTag(tag) {
1607
+ if (/^(auto|\s+)$/i.test(tag) || tag === null || tag === undefined || tag === '') {
1608
+ if (!bkMaskMaker.getMaskId(this.parentNode)) {
1609
+ bkMaskMaker.setMaskId(this.parentNode, "__bk_mask_".concat(random(16)));
1610
+ }
1611
+ return bkMaskMaker.getMaskId(this.parentNode);
1612
+ }
1613
+ return tag;
1614
+ }
1615
+ }, {
1616
+ key: "appendContentToMask",
1617
+ value: function appendContentToMask(content) {
1618
+ this.mask.append(content);
1619
+ }
1620
+ }]);
1621
+ return BkMaskManager;
1622
+ }();
1623
+ var bKMaskManager = new BkMaskManager({});
1624
+ ;// CONCATENATED MODULE: ../../packages/shared/src/pop-manager.ts
1625
+
1626
+
1627
+ /*
1628
+ * Tencent is pleased to support the open source community by making
1629
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1630
+ *
1631
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1632
+ *
1633
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1634
+ *
1635
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1636
+ *
1637
+ * ---------------------------------------------------
1638
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1639
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1640
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1641
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1642
+ *
1643
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1644
+ * the Software.
1645
+ *
1646
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1647
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1648
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1649
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1650
+ * IN THE SOFTWARE.
1651
+ */
1652
+
1653
+
1654
+
1655
+
1656
+ var BKPopIndexManager = /*#__PURE__*/function () {
1657
+ // private instanceUUID;
1658
+ function BKPopIndexManager(options) {
1659
+ _classCallCheck(this, BKPopIndexManager);
1660
+ this.popInstanceList = [];
1661
+ this.clickFn = undefined;
1662
+ // this.instanceUUID = random(8);
1663
+ this.uuidAttrName = 'data-bk-pop-uuid';
1664
+ this.bKMaskManagerInstance = new BkMaskManager({
1665
+ parentNode: this.getParentNode(options === null || options === void 0 ? void 0 : options.transfer),
1666
+ popInstance: this,
1667
+ onClick: this.onMaskClickFn
1668
+ });
1669
+ }
1670
+ _createClass(BKPopIndexManager, [{
1671
+ key: "getParentNode",
1672
+ value: function getParentNode(transfer) {
1673
+ if (typeof transfer === 'string') {
1674
+ var target = document.querySelector(transfer);
1675
+ if (target) {
1676
+ return target;
1677
+ }
1678
+ }
1679
+ if (helper_isElement(transfer)) {
1680
+ return transfer;
1681
+ }
1682
+ return document.body;
1683
+ }
1684
+ }, {
1685
+ key: "onMaskClick",
1686
+ value: function onMaskClick(callFn, target) {
1687
+ this.clickFn = {
1688
+ fn: callFn,
1689
+ target: target
1690
+ };
1691
+ }
1692
+ /**
1693
+ * 展示弹窗
1694
+ * @param content 弹窗内容
1695
+ * @param showMask 是否显示遮罩
1696
+ * @param appendStyle 追加样式
1697
+ * @param transfer 是否显示在body内(即是否显示在div#app内,默认为false)
1698
+ * @returns
1699
+ */
1700
+ }, {
1701
+ key: "show",
1702
+ value: function show(content) {
1703
+ var showMask = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
1704
+ var appendStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1705
+ var transfer = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1706
+ var zindex = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : undefined;
1707
+ if (!content) {
1708
+ console.warn('pop show error: content is null or undefined');
1709
+ return;
1710
+ }
1711
+ var zIndex = typeof zindex === 'number' ? zindex : bkZIndexManager.getModalNextIndex();
1712
+ var uuid = random(16);
1713
+ content.setAttribute(this.uuidAttrName, uuid);
1714
+ this.popInstanceList.push({
1715
+ uuid: uuid,
1716
+ zIndex: zIndex,
1717
+ content: content,
1718
+ showMask: showMask,
1719
+ appendStyle: appendStyle
1720
+ });
1721
+ showMask && this.bKMaskManagerInstance.backupActiveInstance();
1722
+ this.bKMaskManagerInstance.show(content, zIndex, showMask, appendStyle, uuid, transfer);
1723
+ }
1724
+ /**
1725
+ * 销毁指定实例
1726
+ * @param content 指定实例内容
1727
+ * @param transfer
1728
+ */
1729
+ }, {
1730
+ key: "destroy",
1731
+ value: function destroy(content) {
1732
+ var transfer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1733
+ this.clickFn = undefined;
1734
+ this.hide(content, transfer);
1735
+ }
1736
+ /**
1737
+ * 关闭最后一个弹窗 如果当前还有父级弹窗,则激活父级弹窗
1738
+ * @param removeLastContent 默认:true 是否自动关闭最后一个弹窗实例 某些场景下,已经主动关闭最后一个弹窗,此处只需要处理其他逻辑
1739
+ */
1740
+ }, {
1741
+ key: "popHide",
1742
+ value: function popHide() {
1743
+ var removeLastContent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
1744
+ if (this.popInstanceList.length) {
1745
+ if (removeLastContent) {
1746
+ var lastItem = this.popInstanceList.pop();
1747
+ this.bKMaskManagerInstance.popIndexStore(lastItem.uuid);
1748
+ lastItem.remove();
1749
+ }
1750
+ if (this.popInstanceList.length) {
1751
+ var activeItem = this.popInstanceList.slice(-1)[0];
1752
+ var zIndex = activeItem.zIndex,
1753
+ content = activeItem.content,
1754
+ showMask = activeItem.showMask,
1755
+ appendStyle = activeItem.appendStyle,
1756
+ uuid = activeItem.uuid;
1757
+ this.bKMaskManagerInstance.show(content, zIndex, showMask, appendStyle, uuid);
1758
+ } else {
1759
+ this.bKMaskManagerInstance.hide();
1760
+ // this.clickFn.length = 0;
1761
+ }
1762
+ }
1763
+ }
1764
+ /**
1765
+ * 关闭指定弹窗
1766
+ * @param content { HTMLElement } 关闭弹窗内容
1767
+ * **/
1768
+ }, {
1769
+ key: "hide",
1770
+ value: function hide(content) {
1771
+ var transfer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1772
+ /** 检查当前实例是否存在于已缓存列表 */
1773
+ var uuid = content === null || content === void 0 ? void 0 : content.getAttribute(this.uuidAttrName);
1774
+ if (uuid) {
1775
+ var itemIndex = this.popInstanceList.findIndex(function (item) {
1776
+ return item.uuid === uuid;
1777
+ });
1778
+ if (itemIndex >= 0) {
1779
+ if (!transfer) this.popInstanceList[itemIndex].content.remove();
1780
+ this.popInstanceList.splice(itemIndex, 1);
1781
+ this.bKMaskManagerInstance.popIndexStore(uuid);
1782
+ if (!this.popInstanceList.length) {
1783
+ this.bKMaskManagerInstance.hide(transfer);
1784
+ } else {
1785
+ this.popHide(false);
1786
+ }
1787
+ }
1788
+ } else {
1789
+ content === null || content === void 0 ? void 0 : content.remove();
1790
+ }
1791
+ }
1792
+ }, {
1793
+ key: "onMaskClickFn",
1794
+ value: function onMaskClickFn(e) {
1795
+ var fn = this.clickFn.fn;
1796
+ if (fn) {
1797
+ Reflect.apply(fn, this, [e]);
1798
+ }
1799
+ }
1800
+ }]);
1801
+ return BKPopIndexManager;
1802
+ }();
1803
+ var bkPopIndexManager = new BKPopIndexManager();
1804
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
1805
+ function _arrayLikeToArray(arr, len) {
1806
+ if (len == null || len > arr.length) len = arr.length;
1807
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1808
+ return arr2;
1809
+ }
1810
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
1811
+
1812
+ function _arrayWithoutHoles(arr) {
1813
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
1814
+ }
1815
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
1816
+ function _iterableToArray(iter) {
1817
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1818
+ }
1819
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
1820
+
1821
+ function _unsupportedIterableToArray(o, minLen) {
1822
+ if (!o) return;
1823
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1824
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1825
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1826
+ if (n === "Map" || n === "Set") return Array.from(o);
1827
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1828
+ }
1829
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
1830
+ function _nonIterableSpread() {
1831
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1832
+ }
1833
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
1834
+
1835
+
1836
+
1837
+
1838
+ function _toConsumableArray(arr) {
1839
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
1840
+ }
1841
+ // EXTERNAL MODULE: ../../node_modules/uuid/index.js
1842
+ var uuid = __webpack_require__(8022);
1843
+ // EXTERNAL MODULE: external "@popperjs/core"
1844
+ var core_ = __webpack_require__(5798);
1845
+ ;// CONCATENATED MODULE: ../../packages/shared/src/popover.ts
1846
+
1847
+
1848
+
1849
+
1850
+ /*
1851
+ * Tencent is pleased to support the open source community by making
1852
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1853
+ *
1854
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1855
+ *
1856
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1857
+ *
1858
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1859
+ *
1860
+ * ---------------------------------------------------
1861
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1862
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1863
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1864
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1865
+ *
1866
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1867
+ * the Software.
1868
+ *
1869
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1870
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1871
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1872
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1873
+ * IN THE SOFTWARE.
1874
+ */
1875
+
1876
+
1877
+
1878
+ var BKPopover = /*#__PURE__*/function () {
1879
+ function BKPopover(reference, popperRefer, options) {
1880
+ _classCallCheck(this, BKPopover);
1881
+ var _a, _b;
1882
+ /** 当前提内容是否弹出 */
1883
+ this.isShow = false;
1884
+ /** 触发条件 */
1885
+ this.trigger = undefined;
1886
+ /** 当前popperjs实例 */
1887
+ this.instance = undefined;
1888
+ /** 是否总是可见 */
1889
+ this.always = false;
1890
+ /** Popover 外层容器,触发Pop的元素 */
1891
+ this.reference = undefined;
1892
+ /** Popover 弹出内容外层占位容器 */
1893
+ this.referenceTarget = undefined;
1894
+ /** Popover Content 外层容器,目标元素:实际弹出内容 */
1895
+ this.popperRefer = undefined;
1896
+ /** hide延时 */
1897
+ this.delay = 50;
1898
+ /** 是否进入popperRefer */
1899
+ this.isInnerPopper = false;
1900
+ /** 是否为禁用状态 */
1901
+ this.disabled = false;
1902
+ /** 执行显示函数 */
1903
+ this.afterShow = null;
1904
+ /** 执行隐藏函数 */
1905
+ this.afterHidden = null;
1906
+ /** 弹出内容AppendTo */
1907
+ this.appendTo = 'parent';
1908
+ /** 父级容器 */
1909
+ this.container = null;
1910
+ /**
1911
+ * 如果设置了appendTo为指定DOM,此配置项生效
1912
+ * 是否将弹出内容固定到目标元素位置
1913
+ * 例如:appendTo = document.body, fixOnBoundary = true,则弹出内容会一直固定到body
1914
+ */
1915
+ this.fixOnBoundary = false;
1916
+ this.instanceOptions = this.initDefaultOptions(options);
1917
+ this.reference = this.resolveInputSelectorToHtmlElement(reference);
1918
+ this.popperRefer = this.resolveInputSelectorToHtmlElement(popperRefer);
1919
+ this.referenceTarget = this.getTargetReferenceElement();
1920
+ this.container = (_a = this.popperRefer) === null || _a === void 0 ? void 0 : _a.parentElement;
1921
+ this.isShow = !!((_b = this.instanceOptions) === null || _b === void 0 ? void 0 : _b.isShow);
1922
+ this.always = this.instanceOptions.always;
1923
+ this.trigger = this.instanceOptions.trigger;
1924
+ this.disabled = this.instanceOptions.disabled;
1925
+ this.appendTo = this.instanceOptions.appendTo;
1926
+ this.afterHidden = typeof options.afterHidden === 'function' ? options.afterHidden : function () {};
1927
+ this.afterShow = typeof options.afterShow === 'function' ? options.afterShow : function () {};
1928
+ this.fixOnBoundary = this.instanceOptions.fixOnBoundary;
1929
+ this.initInstance();
1930
+ this.registerEvents();
1931
+ /** 默认弹出 */
1932
+ if (this.isShow || this.always) {
1933
+ this.show(null);
1934
+ }
1935
+ }
1936
+ // Synchronously updates the popper instance. Use this for low-frequency
1937
+ // updates.
1938
+ _createClass(BKPopover, [{
1939
+ key: "forceUpdate",
1940
+ value: function forceUpdate() {
1941
+ var _a;
1942
+ (_a = this.instance) === null || _a === void 0 ? void 0 : _a.forceUpdate();
1943
+ }
1944
+ // Asynchronously updates the popper instance, and returns a promise. Use this
1945
+ // for high-frequency updates.
1946
+ }, {
1947
+ key: "update",
1948
+ value: function update() {
1949
+ var _a;
1950
+ (_a = this.instance) === null || _a === void 0 ? void 0 : _a.update();
1951
+ }
1952
+ }, {
1953
+ key: "updateOptions",
1954
+ value: function updateOptions(options) {
1955
+ var _a;
1956
+ this.instanceOptions = this.initDefaultOptions(options);
1957
+ this.isShow = !!((_a = this.instanceOptions) === null || _a === void 0 ? void 0 : _a.isShow);
1958
+ this.trigger = this.instanceOptions.trigger;
1959
+ this.disabled = this.instanceOptions.disabled;
1960
+ this.setOptions(this.instanceOptions);
1961
+ }
1962
+ // Updates the options of the instance.
1963
+ }, {
1964
+ key: "setOptions",
1965
+ value: function setOptions(options) {
1966
+ var _a;
1967
+ (_a = this.instance) === null || _a === void 0 ? void 0 : _a.setOptions(options);
1968
+ }
1969
+ // Cleans up the instance.
1970
+ }, {
1971
+ key: "destroy",
1972
+ value: function destroy() {
1973
+ var _a;
1974
+ (_a = this.instance) === null || _a === void 0 ? void 0 : _a.destroy();
1975
+ }
1976
+ // 更新禁用状态
1977
+ }, {
1978
+ key: "updateDisabled",
1979
+ value: function updateDisabled(disabled) {
1980
+ this.disabled = disabled !== null && disabled !== void 0 ? disabled : !this.disabled;
1981
+ this.disabled && this.hide();
1982
+ }
1983
+ /**
1984
+ * 展示Pop
1985
+ * @param _event 触发事件
1986
+ */
1987
+ }, {
1988
+ key: "show",
1989
+ value: function show(_event) {
1990
+ var _a;
1991
+ if (!this.disabled) {
1992
+ // Make the tooltip visible
1993
+ (_a = this.popperRefer) === null || _a === void 0 ? void 0 : _a.setAttribute('data-show', '');
1994
+ // Enable the event listeners
1995
+ this.setOptions({
1996
+ modifiers: [].concat(_toConsumableArray(this.instanceOptions.modifiers || []), [{
1997
+ name: 'eventListeners',
1998
+ enabled: true
1999
+ }])
2000
+ });
2001
+ // Update its position
2002
+ this.update();
2003
+ this.isShow = true;
2004
+ this.afterShow();
2005
+ if (!this.fixOnBoundary) {
2006
+ this.appendToTarget();
2007
+ }
2008
+ }
2009
+ }
2010
+ /**
2011
+ * 隐藏
2012
+ * @param event 触发事件
2013
+ */
2014
+ }, {
2015
+ key: "hide",
2016
+ value: function hide() {
2017
+ var _a;
2018
+ if (this.always) return;
2019
+ // Hide the tooltip
2020
+ (_a = this.popperRefer) === null || _a === void 0 ? void 0 : _a.removeAttribute('data-show');
2021
+ // Disable the event listeners
2022
+ this.setOptions({
2023
+ modifiers: [].concat(_toConsumableArray(this.instanceOptions.modifiers || []), [{
2024
+ name: 'eventListeners',
2025
+ enabled: false
2026
+ }])
2027
+ });
2028
+ this.isShow = false;
2029
+ this.isInnerPopper = false;
2030
+ this.afterHidden();
2031
+ if (!this.fixOnBoundary) {
2032
+ this.restorePopContent();
2033
+ }
2034
+ }
2035
+ /**
2036
+ * 还原PopContent到初试位置
2037
+ */
2038
+ }, {
2039
+ key: "restorePopContent",
2040
+ value: function restorePopContent() {
2041
+ var target = this.getAppendToTarget();
2042
+ if (helper_isElement(target) && target.contains(this.popperRefer) && this.container && !this.container.contains(this.popperRefer)) {
2043
+ this.container.append(this.popperRefer);
2044
+ }
2045
+ }
2046
+ /**
2047
+ * 挂载PopContent到目标位置
2048
+ */
2049
+ }, {
2050
+ key: "appendToTarget",
2051
+ value: function appendToTarget() {
2052
+ var target = this.getAppendToTarget();
2053
+ if (helper_isElement(target) && target.contains(this.popperRefer)) {
2054
+ target.append(this.popperRefer);
2055
+ }
2056
+ }
2057
+ /**
2058
+ * 获取目标位置元素
2059
+ * @returns
2060
+ */
2061
+ }, {
2062
+ key: "getAppendToTarget",
2063
+ value: function getAppendToTarget() {
2064
+ var appendTo = this.appendTo;
2065
+ var target = appendTo;
2066
+ if (appendTo !== 'parent') {
2067
+ if (typeof appendTo === 'string') {
2068
+ target = document.querySelector(appendTo);
2069
+ }
2070
+ }
2071
+ return target;
2072
+ }
2073
+ /**
2074
+ * 初始化默认配置
2075
+ * @param opts
2076
+ * @returns
2077
+ */
2078
+ }, {
2079
+ key: "initDefaultOptions",
2080
+ value: function initDefaultOptions(opts) {
2081
+ var _this = this;
2082
+ var defaultCfg = {
2083
+ placement: 'top',
2084
+ modifiers: [{
2085
+ name: 'offset',
2086
+ options: {
2087
+ offset: [0, 8]
2088
+ }
2089
+ }],
2090
+ strategy: 'absolute',
2091
+ onFirstUpdate: undefined,
2092
+ isShow: false,
2093
+ theme: 'dark',
2094
+ trigger: 'hover',
2095
+ disabled: false
2096
+ };
2097
+ var targetOptions = merge(defaultCfg, opts || {});
2098
+ var sourceOnFirstUpdate = targetOptions.onFirstUpdate;
2099
+ targetOptions.onFirstUpdate = function (state) {
2100
+ if (typeof sourceOnFirstUpdate === 'function') {
2101
+ sourceOnFirstUpdate.call(_this, state);
2102
+ _this.handleFirstUpdate();
2103
+ }
2104
+ };
2105
+ return targetOptions;
2106
+ }
2107
+ /**
2108
+ * 判定是否需要将PopContent挂载到目标元素
2109
+ */
2110
+ }, {
2111
+ key: "handleFirstUpdate",
2112
+ value: function handleFirstUpdate() {
2113
+ if (this.fixOnBoundary) {
2114
+ this.appendToTarget();
2115
+ }
2116
+ }
2117
+ /**
2118
+ * 剔除 Pop 外层容器,获取目标元素
2119
+ * @returns
2120
+ */
2121
+ }, {
2122
+ key: "getTargetReferenceElement",
2123
+ value: function getTargetReferenceElement() {
2124
+ if (this.isElement(this.reference)) {
2125
+ return this.reference.childElementCount === 1 ? this.reference.firstElementChild : this.reference;
2126
+ }
2127
+ return this.reference;
2128
+ }
2129
+ /**
2130
+ * 初始化Pop Instance
2131
+ */
2132
+ }, {
2133
+ key: "initInstance",
2134
+ value: function initInstance() {
2135
+ var _a, _b;
2136
+ if (this.referenceTarget) {
2137
+ if (this.referenceTarget && this.popperRefer) {
2138
+ this.instance = (0,core_.createPopper)(this.referenceTarget, this.popperRefer, this.instanceOptions);
2139
+ (_a = this.popperRefer) === null || _a === void 0 ? void 0 : _a.setAttribute('data-theme', (_b = this.instanceOptions.theme) !== null && _b !== void 0 ? _b : 'dark');
2140
+ } else {
2141
+ console.error('reference or popperRefer is null, please check html element.');
2142
+ }
2143
+ }
2144
+ }
2145
+ /**
2146
+ * 解析当前参数为对应的Html Element
2147
+ * @param refer Html Element Selector Or Html Element
2148
+ * @param checkVirtualDom 是否检查虚拟DOM
2149
+ * @returns Html Element Or Null
2150
+ */
2151
+ }, {
2152
+ key: "resolveInputSelectorToHtmlElement",
2153
+ value: function resolveInputSelectorToHtmlElement(refer) {
2154
+ if (this.isElement(refer)) {
2155
+ return refer;
2156
+ }
2157
+ if (typeof refer === 'string') {
2158
+ return document.querySelector(refer);
2159
+ }
2160
+ if (_typeof(refer) === 'object') {
2161
+ if (Object.prototype.hasOwnProperty.call(refer, 'getBoundingClientRect')) {
2162
+ return refer;
2163
+ }
2164
+ } else {
2165
+ console.error('\'getBoundingClientRect\' is needed when use virtual elements');
2166
+ }
2167
+ return null;
2168
+ }
2169
+ /**
2170
+ * 检查当前元素是否为Html元素
2171
+ * @param obj
2172
+ * @returns
2173
+ */
2174
+ }, {
2175
+ key: "isElement",
2176
+ value: function isElement(obj) {
2177
+ return helper_isElement(obj);
2178
+ }
2179
+ }, {
2180
+ key: "registerEvents",
2181
+ value: function registerEvents() {
2182
+ var _this2 = this;
2183
+ if (this.isElement(this.referenceTarget)) {
2184
+ if (this.trigger === 'hover') {
2185
+ var showEvents = ['mouseenter', 'focus'];
2186
+ var hideEvents = ['mouseleave', 'blur'];
2187
+ var contentEvents = ['mouseenter', 'mouseleave'];
2188
+ showEvents.forEach(function (event) {
2189
+ _this2.referenceTarget.addEventListener(event, function (evt) {
2190
+ if (event === 'mouseenter') _this2.isInnerPopper = true;
2191
+ _this2.show(evt);
2192
+ });
2193
+ });
2194
+ hideEvents.forEach(function (event) {
2195
+ _this2.referenceTarget.addEventListener(event, function () {
2196
+ _this2.isInnerPopper = false;
2197
+ setTimeout(function () {
2198
+ !_this2.isInnerPopper && _this2.hide();
2199
+ }, _this2.delay);
2200
+ });
2201
+ });
2202
+ if (this.isElement(this.popperRefer)) {
2203
+ contentEvents.forEach(function (event) {
2204
+ _this2.popperRefer.addEventListener(event, function () {
2205
+ if (event === 'mouseenter') _this2.isInnerPopper = true;
2206
+ if (event === 'mouseleave') _this2.hide();
2207
+ });
2208
+ });
2209
+ }
2210
+ }
2211
+ }
2212
+ if (this.trigger === 'click') {
2213
+ var _showEvents = ['click'];
2214
+ _showEvents.forEach(function (event) {
2215
+ document.body.addEventListener(event, function (event) {
2216
+ if (_this2.isSameElement(event.target, _this2.reference) || _this2.reference.contains(event.target)) {
2217
+ _this2.show(event);
2218
+ } else {
2219
+ if (_this2.isShow && !_this2.isSameElement(event.target, _this2.popperRefer) && !_this2.popperRefer.contains(event.target)) {
2220
+ _this2.hide();
2221
+ }
2222
+ }
2223
+ });
2224
+ });
2225
+ }
2226
+ }
2227
+ }, {
2228
+ key: "isSameElement",
2229
+ value: function isSameElement(source, target) {
2230
+ return source && (source === target || source === target.firstElementChild);
2231
+ }
2232
+ }]);
2233
+ return BKPopover;
2234
+ }();
2235
+ var popContainerId = null;
2236
+ var getPopContainerId = function getPopContainerId() {
2237
+ var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '#';
2238
+ if (popContainerId === null) {
2239
+ popContainerId = "id_".concat((0,uuid.v4)());
2240
+ var popContainer = document.createElement('div');
2241
+ popContainer.setAttribute('id', popContainerId);
2242
+ popContainer.setAttribute('data-popper-id', popContainerId);
2243
+ document.body.append(popContainer);
2244
+ }
2245
+ return "".concat(prefix).concat(popContainerId);
2246
+ };
2247
+ ;// CONCATENATED MODULE: ../../packages/shared/src/scrollbar-width.ts
2248
+ /*
2249
+ * Tencent is pleased to support the open source community by making
2250
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2251
+ *
2252
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2253
+ *
2254
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2255
+ *
2256
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2257
+ *
2258
+ * ---------------------------------------------------
2259
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2260
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2261
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2262
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2263
+ *
2264
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2265
+ * the Software.
2266
+ *
2267
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2268
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2269
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2270
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2271
+ * IN THE SOFTWARE.
2272
+ */
2273
+ var scrollBarWidth;
2274
+ function scrollbarWidth() {
2275
+ if (scrollBarWidth !== undefined) return scrollBarWidth;
2276
+ var outer = document.createElement('div');
2277
+ outer.className = 'bk-scrollbar-wrap';
2278
+ outer.style.visibility = 'hidden';
2279
+ outer.style.width = '100px';
2280
+ outer.style.position = 'absolute';
2281
+ outer.style.top = '-9999px';
2282
+ document.body.appendChild(outer);
2283
+ var widthNoScroll = outer.offsetWidth;
2284
+ outer.style.overflow = 'scroll';
2285
+ var inner = document.createElement('div');
2286
+ inner.style.width = '100%';
2287
+ outer.appendChild(inner);
2288
+ var widthWithScroll = inner.offsetWidth;
2289
+ outer.parentNode.removeChild(outer);
2290
+ scrollBarWidth = widthNoScroll - widthWithScroll;
2291
+ return scrollBarWidth;
2292
+ }
2293
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
2294
+ function _setPrototypeOf(o, p) {
2295
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
2296
+ o.__proto__ = p;
2297
+ return o;
2298
+ };
2299
+ return _setPrototypeOf(o, p);
2300
+ }
2301
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/inherits.js
2302
+
2303
+ function _inherits(subClass, superClass) {
2304
+ if (typeof superClass !== "function" && superClass !== null) {
2305
+ throw new TypeError("Super expression must either be null or a function");
2306
+ }
2307
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
2308
+ constructor: {
2309
+ value: subClass,
2310
+ writable: true,
2311
+ configurable: true
2312
+ }
2313
+ });
2314
+ Object.defineProperty(subClass, "prototype", {
2315
+ writable: false
2316
+ });
2317
+ if (superClass) _setPrototypeOf(subClass, superClass);
2318
+ }
2319
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
2320
+ function _assertThisInitialized(self) {
2321
+ if (self === void 0) {
2322
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2323
+ }
2324
+ return self;
2325
+ }
2326
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
2327
+
2328
+
2329
+ function _possibleConstructorReturn(self, call) {
2330
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
2331
+ return call;
2332
+ } else if (call !== void 0) {
2333
+ throw new TypeError("Derived constructors may only return object or undefined");
2334
+ }
2335
+ return _assertThisInitialized(self);
2336
+ }
2337
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
2338
+ function _getPrototypeOf(o) {
2339
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
2340
+ return o.__proto__ || Object.getPrototypeOf(o);
2341
+ };
2342
+ return _getPrototypeOf(o);
2343
+ }
2344
+ // EXTERNAL MODULE: external "vue-types"
2345
+ var external_vue_types_ = __webpack_require__(210);
2346
+ ;// CONCATENATED MODULE: ../../packages/shared/src/vue-types.ts
2347
+
2348
+
2349
+
2350
+
2351
+
2352
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
2353
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
2354
+
2355
+ var propTypesNS = (0,external_vue_types_.createTypes)({});
2356
+ // 用于创建字符串列表映射至 `K: V` 的函数
2357
+ function stringEnum(o) {
2358
+ return o.reduce(function (res, key) {
2359
+ res[key] = key;
2360
+ return res;
2361
+ }, Object.create(null));
2362
+ }
2363
+ var SizeEnum;
2364
+ (function (SizeEnum) {
2365
+ SizeEnum["SMALL"] = "small";
2366
+ SizeEnum["LARGE"] = "large";
2367
+ SizeEnum["DEFAULT"] = "default";
2368
+ })(SizeEnum || (SizeEnum = {}));
2369
+ var Placements;
2370
+ (function (Placements) {
2371
+ Placements["Top"] = "top";
2372
+ Placements["Left"] = "left";
2373
+ Placements["Right"] = "right";
2374
+ Placements["Bottom"] = "bottom";
2375
+ })(Placements || (Placements = {}));
2376
+ var RenderDirectiveEnum;
2377
+ (function (RenderDirectiveEnum) {
2378
+ RenderDirectiveEnum["IF"] = "if";
2379
+ RenderDirectiveEnum["SHOW"] = "show";
2380
+ })(RenderDirectiveEnum || (RenderDirectiveEnum = {}));
2381
+ function renderDirectiveType() {
2382
+ return (0,external_vue_types_.string)().def(RenderDirectiveEnum.SHOW);
2383
+ }
2384
+ var AlignEnum;
2385
+ (function (AlignEnum) {
2386
+ AlignEnum["LEFT"] = "left";
2387
+ AlignEnum["CENTER"] = "center";
2388
+ AlignEnum["RIGHT"] = "right";
2389
+ })(AlignEnum || (AlignEnum = {}));
2390
+ function alignType() {
2391
+ return (0,external_vue_types_.string)().def(AlignEnum.LEFT);
2392
+ }
2393
+ var ThemeEnum;
2394
+ (function (ThemeEnum) {
2395
+ ThemeEnum["PRIMARY"] = "primary";
2396
+ ThemeEnum["WARNING"] = "warning";
2397
+ ThemeEnum["SUCCESS"] = "success";
2398
+ ThemeEnum["DANGER"] = "danger";
2399
+ })(ThemeEnum || (ThemeEnum = {}));
2400
+ /** 弹层出现位置选项 */
2401
+ var PlacementEnum;
2402
+ (function (PlacementEnum) {
2403
+ PlacementEnum["AUTO"] = "auto";
2404
+ PlacementEnum["AUTO_START"] = "auto-start";
2405
+ PlacementEnum["AUTO_END"] = "auto-end";
2406
+ PlacementEnum["TOP"] = "top";
2407
+ PlacementEnum["RIGHT"] = "right";
2408
+ PlacementEnum["BOTTOM"] = "bottom";
2409
+ PlacementEnum["LEFT"] = "left";
2410
+ PlacementEnum["TOP_START"] = "top-start";
2411
+ PlacementEnum["TOP_END"] = "top-end";
2412
+ PlacementEnum["BOTTOM_START"] = "bottom-start";
2413
+ PlacementEnum["BOTTOM_END"] = "bottom-end";
2414
+ PlacementEnum["RIGHT_START"] = "right-start";
2415
+ PlacementEnum["RIGHT_END"] = "right-end";
2416
+ PlacementEnum["LEFT_START"] = "left-start";
2417
+ PlacementEnum["LEFT_END"] = "left-end";
2418
+ })(PlacementEnum || (PlacementEnum = {}));
2419
+ function placementType() {
2420
+ return (0,external_vue_types_.string)().def(PlacementEnum.BOTTOM);
2421
+ }
2422
+ /** 弹层触发选项 */
2423
+ var TriggerEnum;
2424
+ (function (TriggerEnum) {
2425
+ TriggerEnum["HOVER"] = "hover";
2426
+ TriggerEnum["CLICK"] = "click";
2427
+ TriggerEnum["MANUAL"] = "manual";
2428
+ })(TriggerEnum || (TriggerEnum = {}));
2429
+ function triggerType() {
2430
+ return (0,external_vue_types_.string)().def(TriggerEnum.HOVER);
2431
+ }
2432
+ /** 内容渲染类型:目前是在popover内容渲染时使用 */
2433
+ var RenderType;
2434
+ (function (RenderType) {
2435
+ RenderType["AUTO"] = "auto";
2436
+ RenderType["SHOWN"] = "shown"; // 默认不渲染,只有在popover弹出之后才会渲染
2437
+ })(RenderType || (RenderType = {}));
2438
+ function renderType() {
2439
+ return (0,external_vue_types_.toType)('popRenderType', {}).def(RenderType.SHOWN);
2440
+ }
2441
+ var DialogTypeEnum;
2442
+ (function (DialogTypeEnum) {
2443
+ DialogTypeEnum["SHOW"] = "show";
2444
+ DialogTypeEnum["OPERATION"] = "operation";
2445
+ DialogTypeEnum["CONFIRM"] = "confirm";
2446
+ DialogTypeEnum["PROCESS"] = "process";
2447
+ })(DialogTypeEnum || (DialogTypeEnum = {}));
2448
+ function dialogTypeUnion() {
2449
+ return (0,external_vue_types_.toType)('dialogType', {
2450
+ "default": DialogTypeEnum.OPERATION
2451
+ });
2452
+ }
2453
+ var DirectionEnum;
2454
+ (function (DirectionEnum) {
2455
+ DirectionEnum["HORIZONTAL"] = "horizontal";
2456
+ DirectionEnum["VERTICAL"] = "vertical";
2457
+ })(DirectionEnum || (DirectionEnum = {}));
2458
+ function directionType() {
2459
+ return (0,external_vue_types_.toType)('direction', {}).def(DirectionEnum.HORIZONTAL);
2460
+ }
2461
+ var LineStyleEnum;
2462
+ (function (LineStyleEnum) {
2463
+ LineStyleEnum["DASHED"] = "dashed";
2464
+ LineStyleEnum["SOLID"] = "solid";
2465
+ })(LineStyleEnum || (LineStyleEnum = {}));
2466
+ function lineStyleType() {
2467
+ return (0,external_vue_types_.toType)('lineType', {}).def(LineStyleEnum.DASHED);
2468
+ }
2469
+ var TagThemeEnum;
2470
+ (function (TagThemeEnum) {
2471
+ TagThemeEnum["SUCCESS"] = "success";
2472
+ TagThemeEnum["INFO"] = "info";
2473
+ TagThemeEnum["WARNING"] = "warning";
2474
+ TagThemeEnum["DANGER"] = "danger";
2475
+ })(TagThemeEnum || (TagThemeEnum = {}));
2476
+ function TagThemeType() {
2477
+ return (0,external_vue_types_.toType)('tagTheme', {}).def();
2478
+ }
2479
+ var InputBehaviorEnum;
2480
+ (function (InputBehaviorEnum) {
2481
+ InputBehaviorEnum["SIMPLICITY"] = "simplicity";
2482
+ InputBehaviorEnum["NORMAL"] = "normal";
2483
+ })(InputBehaviorEnum || (InputBehaviorEnum = {}));
2484
+ function InputBehaviorType() {
2485
+ return (0,external_vue_types_.toType)('behavior', {}).def(InputBehaviorEnum.NORMAL);
2486
+ }
2487
+ var PropTypes = /*#__PURE__*/function (_propTypesNS) {
2488
+ _inherits(PropTypes, _propTypesNS);
2489
+ var _super = _createSuper(PropTypes);
2490
+ function PropTypes() {
2491
+ _classCallCheck(this, PropTypes);
2492
+ return _super.apply(this, arguments);
2493
+ }
2494
+ _createClass(PropTypes, null, [{
2495
+ key: "size",
2496
+ value: function size() {
2497
+ var defaultList = ['small', 'default', 'large'];
2498
+ return (0,external_vue_types_.toType)('Size', {
2499
+ validator: function validator(val) {
2500
+ if (!val || defaultList.includes(val)) {
2501
+ return true;
2502
+ }
2503
+ console.error("invalid theme, ".concat(val, ", the theme must be one of \u3010").concat(defaultList.join(' | '), "\u3011"));
2504
+ return false;
2505
+ },
2506
+ "default": 'default'
2507
+ });
2508
+ }
2509
+ }, {
2510
+ key: "theme",
2511
+ value: function theme() {
2512
+ var themes = ['primary', 'warning', 'success', 'danger'];
2513
+ return (0,external_vue_types_.toType)('Theme', {
2514
+ validator: function validator(val) {
2515
+ if (!val || themes.includes(val)) {
2516
+ return true;
2517
+ }
2518
+ console.error("invalid theme, ".concat(val, ", the theme must be one of \u3010").concat(themes.join(' | '), "\u3011"));
2519
+ return false;
2520
+ }
2521
+ });
2522
+ }
2523
+ }, {
2524
+ key: "placement",
2525
+ value: function placement() {
2526
+ var placements = ['top', 'left', 'right', 'bottom'];
2527
+ return (0,external_vue_types_.toType)('Placements', {
2528
+ validator: function validator(val) {
2529
+ if (!val || placements.includes(val)) {
2530
+ return true;
2531
+ }
2532
+ return false;
2533
+ },
2534
+ "default": 'top'
2535
+ });
2536
+ }
2537
+ }, {
2538
+ key: "style",
2539
+ value: function style() {
2540
+ return (0,external_vue_types_.toType)('Style', {
2541
+ type: [String, Object]
2542
+ });
2543
+ }
2544
+ }, {
2545
+ key: "position",
2546
+ value: function position() {
2547
+ var positions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['top-left', 'top-right', 'bottom-left', 'bottom-right'];
2548
+ return (0,external_vue_types_.toType)('positions', {
2549
+ type: String,
2550
+ validator: function validator(val) {
2551
+ if (!val || positions.includes(val)) {
2552
+ return true;
2553
+ }
2554
+ console.error("invalid positions, ".concat(val, ", the position must be one of \u3010").concat(positions.join(' | '), "\u3011"));
2555
+ return false;
2556
+ },
2557
+ "default": 'top-center'
2558
+ });
2559
+ }
2560
+ }]);
2561
+ return PropTypes;
2562
+ }(propTypesNS);
2563
+ var SelectedTypeEnum;
2564
+ (function (SelectedTypeEnum) {
2565
+ SelectedTypeEnum["CHECKBOX"] = "checkbox";
2566
+ SelectedTypeEnum["CHECK"] = "check";
2567
+ })(SelectedTypeEnum || (SelectedTypeEnum = {}));
2568
+ function SelectedType() {
2569
+ return (0,external_vue_types_.toType)('selectedStyle', {}).def(SelectedTypeEnum.CHECK);
2570
+ }
2571
+ ;// CONCATENATED MODULE: ../../packages/shared/src/index.ts
2572
+
2573
+
2574
+
2575
+
2576
+
2577
+
2578
+
2579
+
2580
+
2581
+
2582
+
2583
+
2584
+ function classes(dynamicCls) {
2585
+ var constCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
2586
+ return Object.entries(dynamicCls).filter(function (entry) {
2587
+ return entry[1];
2588
+ }).map(function (entry) {
2589
+ return entry[0];
2590
+ }).join(' ').concat(constCls ? " ".concat(constCls) : '');
2591
+ }
2592
+ var EMPTY_OBJ = Object.create({});
2593
+ var noop = function noop() {};
2594
+ var renderEmptyVNode = function renderEmptyVNode() {
2595
+ return null;
2596
+ };
2597
+ var isEmptyObj = function isEmptyObj(target) {
2598
+ return Object.keys(target).length < 1;
2599
+ };
2600
+ var withInstall = function withInstall(component) {
2601
+ component.install = function (app) {
2602
+ var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
2603
+ prefix = _ref.prefix;
2604
+ var pre = app.config.globalProperties.bkUIPrefix || prefix || 'Bk';
2605
+ app.component(pre + component.name, component);
2606
+ };
2607
+ return component;
2608
+ };
2609
+ var withInstallProps = function withInstallProps(component, childComponents) {
2610
+ var isProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
2611
+ var directive = arguments.length > 3 ? arguments[3] : undefined;
2612
+ component.install = function (app) {
2613
+ var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
2614
+ prefix = _ref2.prefix;
2615
+ var pre = app.config.globalProperties.bkUIPrefix || prefix || 'Bk';
2616
+ if (directive) {
2617
+ app.directive(pre + directive.name, directive.directive);
2618
+ }
2619
+ app.component(pre + component.name, component);
2620
+ !isProps && Object.values(childComponents).forEach(function (child) {
2621
+ app.component(pre + child.name, child);
2622
+ });
2623
+ };
2624
+ Object.keys(childComponents).forEach(function (key) {
2625
+ component[key] = childComponents[key];
2626
+ });
2627
+ return component;
2628
+ };
2629
+ /**
2630
+ * 解析当前组件ClassName,自动添加前缀
2631
+ * @param clsName 当前ClassName
2632
+ * @param prefix 前缀,默认为bk
2633
+ * @returns prefix-clsName
2634
+ */
2635
+ function resolveClassName(clsName) {
2636
+ var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'bk';
2637
+ return "".concat(prefix, "-").concat(clsName);
2638
+ }
2639
+ /**
2640
+ * 函数防抖
2641
+ * @param {*} fn 执行的函数
2642
+ * @param {*} delay 延时时间
2643
+ * @param {*} immediate 是否立即执行
2644
+ */
2645
+ function debounce() {
2646
+ var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 300;
2647
+ var fn = arguments.length > 1 ? arguments[1] : undefined;
2648
+ var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
2649
+ var timeout;
2650
+ var result;
2651
+ var debounced = function debounced() {
2652
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
2653
+ var ctx = this; // 当前上下文
2654
+ // eslint-disable-next-line prefer-rest-params
2655
+ var args = arguments; // fn的参数
2656
+ // 取消之前的延时调用
2657
+ if (timeout) clearTimeout(timeout);
2658
+ if (immediate) {
2659
+ var applyImmediate = !timeout; // 是否执行过
2660
+ timeout = setTimeout(function () {
2661
+ timeout = null; // 标志是否执行过,与clearTimeout有区别,clearTimeout之后timeout不为null而是一个系统分配的队列ID
2662
+ }, delay);
2663
+ if (applyImmediate) result = fn.apply(ctx, args); // 立即调用
2664
+ } else {
2665
+ timeout = setTimeout(function () {
2666
+ fn.apply(ctx, args);
2667
+ }, delay);
2668
+ }
2669
+ return result;
2670
+ };
2671
+ debounced.cancel = function () {
2672
+ clearTimeout(timeout);
2673
+ timeout = null;
2674
+ };
2675
+ return debounced;
2676
+ }
2677
+ /**
2678
+ * 过滤(去除)对象中的某个属性
2679
+ * @param data 需要处理的对象
2680
+ * @param filter 过滤关键字
2681
+ * @returns object 去除属性之后的对象
2682
+ */
2683
+ function filterProperty(data, filter) {
2684
+ return JSON.parse(JSON.stringify(data, function (key, value) {
2685
+ if (filter.includes(key)) {
2686
+ return undefined;
2687
+ }
2688
+ return value;
2689
+ }));
2690
+ }
2691
+ ;
2692
+ function arrayEqual() {
2693
+ var arr1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
2694
+ var arr2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
2695
+ if (arr1.length !== arr2.length) {
2696
+ return false;
2697
+ }
2698
+ for (var i = 0; i < arr1.length; i++) {
2699
+ if (Array.isArray(arr1[i])) {
2700
+ return arrayEqual(arr1[i], arr2[i]);
2701
+ }
2702
+ if (arr1[i] !== arr2[i]) {
2703
+ return false;
2704
+ }
2705
+ }
2706
+ return true;
2707
+ }
2708
+ })();
2709
+
2710
+ /******/ return __webpack_exports__;
2711
+ /******/ })()
2712
+ ;
2713
+ });