bkui-vue 0.0.1-beta.393 → 0.0.1-beta.395

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 (175) hide show
  1. package/dist/index.cjs.js +36 -36
  2. package/dist/index.esm.js +93 -49
  3. package/dist/index.umd.js +36 -36
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/affix/index.js +1 -353
  7. package/lib/alert/index.js +1 -251
  8. package/lib/animate-number/index.js +1 -226
  9. package/lib/backtop/index.js +1 -260
  10. package/lib/badge/badge.css +0 -2
  11. package/lib/badge/badge.less +2 -2
  12. package/lib/badge/badge.variable.css +0 -2
  13. package/lib/badge/index.js +1 -274
  14. package/lib/breadcrumb/index.js +1 -329
  15. package/lib/button/index.js +1 -371
  16. package/lib/card/index.js +1 -326
  17. package/lib/cascader/index.js +1 -2168
  18. package/lib/checkbox/index.js +1 -571
  19. package/lib/code-diff/index.js +1 -5520
  20. package/lib/collapse/collapse-panel.d.ts +11 -0
  21. package/lib/collapse/index.d.ts +20 -5
  22. package/lib/collapse/index.js +1 -698
  23. package/lib/collapse/props.d.ts +5 -0
  24. package/lib/color-picker/index.js +1 -2816
  25. package/lib/components.d.ts +2 -0
  26. package/lib/components.js +1 -759
  27. package/lib/container/index.js +1 -369
  28. package/lib/date-picker/index.js +1 -5601
  29. package/lib/dialog/index.js +1 -545
  30. package/lib/directives/index.js +2 -1427
  31. package/lib/directives/index.js.LICENSE.txt +14 -0
  32. package/lib/dist.index.js +1 -166
  33. package/lib/divider/index.js +1 -512
  34. package/lib/dropdown/index.js +1 -414
  35. package/lib/exception/exception.d.ts +13 -0
  36. package/lib/exception/index.d.ts +2 -0
  37. package/lib/exception/index.js +1 -405
  38. package/lib/fixed-navbar/index.js +1 -214
  39. package/lib/form/index.js +1 -986
  40. package/lib/icon/angle-double-down-line.js +1 -426
  41. package/lib/icon/angle-double-left-line.js +1 -426
  42. package/lib/icon/angle-double-left.js +1 -426
  43. package/lib/icon/angle-double-right-line.js +1 -426
  44. package/lib/icon/angle-double-right.js +1 -426
  45. package/lib/icon/angle-double-up-line.js +1 -426
  46. package/lib/icon/angle-down-fill.js +1 -426
  47. package/lib/icon/angle-down-line.js +1 -426
  48. package/lib/icon/angle-down.js +1 -426
  49. package/lib/icon/angle-left.js +1 -426
  50. package/lib/icon/angle-right.js +1 -426
  51. package/lib/icon/angle-up-fill.js +1 -426
  52. package/lib/icon/angle-up.js +1 -426
  53. package/lib/icon/archive-fill.js +1 -426
  54. package/lib/icon/arrows-left.js +1 -426
  55. package/lib/icon/arrows-right.js +1 -426
  56. package/lib/icon/audio-fill.js +1 -426
  57. package/lib/icon/bk.js +1 -426
  58. package/lib/icon/circle.js +1 -426
  59. package/lib/icon/close-line.js +1 -426
  60. package/lib/icon/close.js +1 -426
  61. package/lib/icon/code.js +1 -426
  62. package/lib/icon/cog-shape.js +1 -426
  63. package/lib/icon/collapse-left.js +1 -426
  64. package/lib/icon/copy.js +1 -426
  65. package/lib/icon/data-shape.js +1 -426
  66. package/lib/icon/del.js +1 -426
  67. package/lib/icon/doc-fill.js +1 -426
  68. package/lib/icon/done.js +1 -426
  69. package/lib/icon/down-shape.js +1 -426
  70. package/lib/icon/down-small.js +1 -426
  71. package/lib/icon/edit-line.js +1 -426
  72. package/lib/icon/ellipsis.js +1 -426
  73. package/lib/icon/enlarge-line.js +1 -426
  74. package/lib/icon/error.js +1 -426
  75. package/lib/icon/excel-fill.js +1 -426
  76. package/lib/icon/exclamation-circle-shape.js +1 -426
  77. package/lib/icon/eye.js +1 -426
  78. package/lib/icon/filliscreen-line.js +1 -426
  79. package/lib/icon/folder-open.js +1 -426
  80. package/lib/icon/folder-shape-open.js +1 -426
  81. package/lib/icon/folder-shape.js +1 -426
  82. package/lib/icon/folder.js +1 -426
  83. package/lib/icon/funnel.js +1 -426
  84. package/lib/icon/help-document-fill.js +1 -426
  85. package/lib/icon/help-fill.js +1 -426
  86. package/lib/icon/help.js +1 -426
  87. package/lib/icon/image-fill.js +1 -426
  88. package/lib/icon/img-placehoulder.js +1 -448
  89. package/lib/icon/index.js +1 -2275
  90. package/lib/icon/info-line.js +1 -448
  91. package/lib/icon/info.js +1 -448
  92. package/lib/icon/left-shape.js +1 -448
  93. package/lib/icon/left-turn-line.js +1 -448
  94. package/lib/icon/narrow-line.js +1 -448
  95. package/lib/icon/original.js +1 -448
  96. package/lib/icon/pdf-fill.js +1 -448
  97. package/lib/icon/play-shape.js +1 -448
  98. package/lib/icon/plus.js +1 -448
  99. package/lib/icon/ppt-fill.js +1 -448
  100. package/lib/icon/qq.js +1 -448
  101. package/lib/icon/right-shape.js +1 -448
  102. package/lib/icon/right-turn-line.js +1 -448
  103. package/lib/icon/search.js +1 -448
  104. package/lib/icon/share.js +1 -448
  105. package/lib/icon/spinner.js +1 -448
  106. package/lib/icon/success.js +1 -448
  107. package/lib/icon/switcher-loading.js +1 -448
  108. package/lib/icon/text-file.js +1 -448
  109. package/lib/icon/text-fill.js +1 -448
  110. package/lib/icon/transfer.js +1 -448
  111. package/lib/icon/tree-application-shape.js +1 -448
  112. package/lib/icon/unfull-screen.js +1 -448
  113. package/lib/icon/unvisible.js +1 -448
  114. package/lib/icon/up-shape.js +1 -448
  115. package/lib/icon/upload.js +1 -448
  116. package/lib/icon/video-fill.js +1 -448
  117. package/lib/icon/warn.js +1 -448
  118. package/lib/icon/weixin.js +1 -448
  119. package/lib/image/index.js +1 -873
  120. package/lib/index.js +1 -169
  121. package/lib/info-box/index.js +1 -1784
  122. package/lib/input/index.d.ts +4 -4
  123. package/lib/input/index.js +1 -846
  124. package/lib/input/input.d.ts +1 -1
  125. package/lib/link/index.js +1 -226
  126. package/lib/loading/index.js +1 -309
  127. package/lib/menu/index.js +1 -796
  128. package/lib/message/index.js +1 -401
  129. package/lib/modal/index.js +1 -395
  130. package/lib/navigation/index.js +1 -431
  131. package/lib/notify/index.js +1 -430
  132. package/lib/overflow-title/index.js +1 -512
  133. package/lib/pagination/index.js +1 -1026
  134. package/lib/plugin-popover/index.js +1 -2581
  135. package/lib/plugins/index.js +1 -130
  136. package/lib/popover/index.js +1 -2587
  137. package/lib/popover2/index.js +1 -172
  138. package/lib/preset.js +1 -129
  139. package/lib/process/index.js +1 -1417
  140. package/lib/progress/index.js +1 -479
  141. package/lib/radio/index.js +1 -649
  142. package/lib/rate/index.js +1 -358
  143. package/lib/resize-layout/index.js +1 -495
  144. package/lib/search-select/index.js +1 -3388
  145. package/lib/search-select/search-select.css +1 -1
  146. package/lib/search-select/search-select.less +1 -1
  147. package/lib/search-select/search-select.variable.css +1 -1
  148. package/lib/select/index.d.ts +9 -9
  149. package/lib/select/index.js +1 -2819
  150. package/lib/select/select.css +0 -1
  151. package/lib/select/select.d.ts +3 -3
  152. package/lib/select/select.less +0 -1
  153. package/lib/select/select.variable.css +0 -1
  154. package/lib/select/selectTagInput.d.ts +1 -1
  155. package/lib/shared/index.js +1 -2813
  156. package/lib/shared/vue-types.d.ts +1 -1
  157. package/lib/sideslider/index.js +1 -1362
  158. package/lib/slider/index.js +1 -2060
  159. package/lib/steps/index.js +1 -1504
  160. package/lib/swiper/index.js +1 -374
  161. package/lib/switcher/index.js +1 -308
  162. package/lib/tab/index.d.ts +10 -6
  163. package/lib/tab/index.js +1 -919
  164. package/lib/tab/props.d.ts +6 -0
  165. package/lib/table/index.js +1 -6635
  166. package/lib/table-column/index.js +1 -737
  167. package/lib/tag/index.js +1 -278
  168. package/lib/tag-input/index.js +1 -1897
  169. package/lib/time-picker/index.js +1 -142
  170. package/lib/timeline/index.js +1 -315
  171. package/lib/transfer/index.js +1 -658
  172. package/lib/tree/index.js +1 -2917
  173. package/lib/upload/index.js +1 -3735
  174. package/lib/virtual-render/index.js +1 -825
  175. package/package.json +2 -1
@@ -1,2581 +1 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("vue"), require("../shared"), require("vue-types"));
4
- else if(typeof define === 'function' && define.amd)
5
- define(["vue", "../shared", "vue-types"], factory);
6
- else {
7
- var a = typeof exports === 'object' ? factory(require("vue"), require("../shared"), require("vue-types")) : factory(root["vue"], root["../shared"], 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__4212__, __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
- /***/ 4212:
256
- /***/ ((module) => {
257
-
258
- "use strict";
259
- module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
260
-
261
- /***/ }),
262
-
263
- /***/ 748:
264
- /***/ ((module) => {
265
-
266
- "use strict";
267
- module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
268
-
269
- /***/ }),
270
-
271
- /***/ 210:
272
- /***/ ((module) => {
273
-
274
- "use strict";
275
- module.exports = __WEBPACK_EXTERNAL_MODULE__210__;
276
-
277
- /***/ })
278
-
279
- /******/ });
280
- /************************************************************************/
281
- /******/ // The module cache
282
- /******/ var __webpack_module_cache__ = {};
283
- /******/
284
- /******/ // The require function
285
- /******/ function __webpack_require__(moduleId) {
286
- /******/ // Check if module is in cache
287
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
288
- /******/ if (cachedModule !== undefined) {
289
- /******/ return cachedModule.exports;
290
- /******/ }
291
- /******/ // Create a new module (and put it into the cache)
292
- /******/ var module = __webpack_module_cache__[moduleId] = {
293
- /******/ // no module.id needed
294
- /******/ // no module.loaded needed
295
- /******/ exports: {}
296
- /******/ };
297
- /******/
298
- /******/ // Execute the module function
299
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
300
- /******/
301
- /******/ // Return the exports of the module
302
- /******/ return module.exports;
303
- /******/ }
304
- /******/
305
- /************************************************************************/
306
- /******/ /* webpack/runtime/define property getters */
307
- /******/ (() => {
308
- /******/ // define getter functions for harmony exports
309
- /******/ __webpack_require__.d = (exports, definition) => {
310
- /******/ for(var key in definition) {
311
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
312
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
313
- /******/ }
314
- /******/ }
315
- /******/ };
316
- /******/ })();
317
- /******/
318
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
319
- /******/ (() => {
320
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
321
- /******/ })();
322
- /******/
323
- /******/ /* webpack/runtime/make namespace object */
324
- /******/ (() => {
325
- /******/ // define __esModule on exports
326
- /******/ __webpack_require__.r = (exports) => {
327
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
328
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
329
- /******/ }
330
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
331
- /******/ };
332
- /******/ })();
333
- /******/
334
- /************************************************************************/
335
- var __webpack_exports__ = {};
336
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
337
- (() => {
338
- "use strict";
339
- // ESM COMPAT FLAG
340
- __webpack_require__.r(__webpack_exports__);
341
-
342
- // EXPORTS
343
- __webpack_require__.d(__webpack_exports__, {
344
- "default": () => (/* binding */ src)
345
- });
346
-
347
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
348
- function _defineProperty(obj, key, value) {
349
- if (key in obj) {
350
- Object.defineProperty(obj, key, {
351
- value: value,
352
- enumerable: true,
353
- configurable: true,
354
- writable: true
355
- });
356
- } else {
357
- obj[key] = value;
358
- }
359
-
360
- return obj;
361
- }
362
- // EXTERNAL MODULE: external "vue"
363
- var external_vue_ = __webpack_require__(748);
364
- // EXTERNAL MODULE: external "../shared"
365
- var external_shared_ = __webpack_require__(4212);
366
- ;// CONCATENATED MODULE: ../../packages/directives/src/clickoutside.ts
367
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
368
-
369
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
370
-
371
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
372
-
373
- /*
374
- * Tencent is pleased to support the open source community by making
375
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
376
- *
377
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
378
- *
379
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
380
- *
381
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
382
- *
383
- * ---------------------------------------------------
384
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
385
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
386
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
387
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
388
- *
389
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
390
- * the Software.
391
- *
392
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
393
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
394
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
395
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
396
- * IN THE SOFTWARE.
397
- */
398
- var isElement = function isElement(e) {
399
- if (typeof Element === 'undefined') return false;
400
- return e instanceof Element;
401
- };
402
-
403
- var nodeList = new Map();
404
- var startClick;
405
- document.addEventListener('mousedown', function (e) {
406
- return startClick = e;
407
- });
408
- document.addEventListener('mouseup', function (e) {
409
- var _iterator = _createForOfIteratorHelper(nodeList.values()),
410
- _step;
411
-
412
- try {
413
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
414
- var handlers = _step.value;
415
-
416
- var _iterator2 = _createForOfIteratorHelper(handlers),
417
- _step2;
418
-
419
- try {
420
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
421
- var documentHandler = _step2.value.documentHandler;
422
- documentHandler(e, startClick);
423
- }
424
- } catch (err) {
425
- _iterator2.e(err);
426
- } finally {
427
- _iterator2.f();
428
- }
429
- }
430
- } catch (err) {
431
- _iterator.e(err);
432
- } finally {
433
- _iterator.f();
434
- }
435
- });
436
-
437
- function createDocumentHandler(el, binding) {
438
- var excludes = [];
439
-
440
- if (Array.isArray(binding.arg)) {
441
- excludes = binding.arg;
442
- } else if (isElement(binding.arg)) {
443
- excludes.push(binding.arg);
444
- }
445
-
446
- return function (mouseup, mousedown) {
447
- var popperRef = binding.instance.popperRef;
448
- var mouseUpTarget = mouseup.target;
449
- var mouseDownTarget = mousedown === null || mousedown === void 0 ? void 0 : mousedown.target;
450
- var isBound = !binding || !binding.instance;
451
- var isTargetExists = !mouseUpTarget || !mouseDownTarget;
452
- var isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget);
453
- var isSelf = el === mouseUpTarget;
454
- var isTargetExcluded = excludes.length && excludes.some(function (item) {
455
- return item === null || item === void 0 ? void 0 : item.contains(mouseUpTarget);
456
- }) || excludes.length && excludes.includes(mouseDownTarget);
457
- var isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget));
458
-
459
- if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) {
460
- return;
461
- }
462
-
463
- binding.value(mouseup, mousedown);
464
- };
465
- }
466
-
467
- var ClickOutside = {
468
- beforeMount: function beforeMount(el, binding) {
469
- if (!nodeList.has(el)) {
470
- nodeList.set(el, []);
471
- }
472
-
473
- nodeList.get(el).push({
474
- documentHandler: createDocumentHandler(el, binding),
475
- bindingFn: binding.value
476
- });
477
- },
478
- updated: function updated(el, binding) {
479
- if (!nodeList.has(el)) {
480
- nodeList.set(el, []);
481
- }
482
-
483
- var handlers = nodeList.get(el);
484
- var oldHandlerIndex = handlers.findIndex(function (item) {
485
- return item.bindingFn === binding.oldValue;
486
- });
487
- var newHandler = {
488
- documentHandler: createDocumentHandler(el, binding),
489
- bindingFn: binding.value
490
- };
491
-
492
- if (oldHandlerIndex >= 0) {
493
- // replace the old handler to the new handler
494
- handlers.splice(oldHandlerIndex, 1, newHandler);
495
- } else {
496
- handlers.push(newHandler);
497
- }
498
- },
499
- unmounted: function unmounted(el) {
500
- // remove all listeners when a component unmounted
501
- nodeList["delete"](el);
502
- }
503
- };
504
-
505
- ClickOutside.install = function (app) {
506
- app.directive('bkTooltips', ClickOutside);
507
- };
508
-
509
- /* harmony default export */ const clickoutside = (ClickOutside);
510
- ;// CONCATENATED MODULE: ../../packages/popover/src/arrow.tsx
511
-
512
-
513
- /*
514
- * Tencent is pleased to support the open source community by making
515
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
516
- *
517
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
518
- *
519
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
520
- *
521
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
522
- *
523
- * ---------------------------------------------------
524
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
525
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
526
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
527
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
528
- *
529
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
530
- * the Software.
531
- *
532
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
533
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
534
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
535
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
536
- * IN THE SOFTWARE.
537
- */
538
-
539
-
540
- /* harmony default export */ const src_arrow = ((0,external_vue_.defineComponent)({
541
- name: 'PopArrow',
542
- render: function render() {
543
- var arrowClassName = (0,external_shared_.resolveClassName)('pop2-arrow');
544
- return (0,external_vue_.createVNode)("div", {
545
- "class": arrowClassName
546
- }, null);
547
- }
548
- }));
549
- ;// CONCATENATED MODULE: ../../packages/popover/src/const.tsx
550
-
551
-
552
- var _EMIT_EVENT_TYPES;
553
-
554
- /*
555
- * Tencent is pleased to support the open source community by making
556
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
557
- *
558
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
559
- *
560
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
561
- *
562
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
563
- *
564
- * ---------------------------------------------------
565
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
566
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
567
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
568
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
569
- *
570
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
571
- * the Software.
572
- *
573
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
574
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
575
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
576
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
577
- * IN THE SOFTWARE.
578
- */
579
- var EMPTY = function EMPTY() {
580
- return true;
581
- }; // eslint-disable-next-line @typescript-eslint/naming-convention
582
-
583
-
584
- var EMIT_EVENTS;
585
-
586
- (function (EMIT_EVENTS) {
587
- EMIT_EVENTS["SHOW"] = "show";
588
- EMIT_EVENTS["HIDE"] = "hide";
589
- EMIT_EVENTS["CLICK_OUTSIDE"] = "clickoutside";
590
- EMIT_EVENTS["CONTENT_MOUSEENTER"] = "contentMouseenter";
591
- EMIT_EVENTS["CONTENT_MOUSELEAVE"] = "contentMouseleave";
592
- EMIT_EVENTS["STOP_HIDE"] = "stopHide";
593
- })(EMIT_EVENTS || (EMIT_EVENTS = {}));
594
-
595
- var EMIT_EVENT_TYPES = (_EMIT_EVENT_TYPES = {}, _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.SHOW, EMPTY), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.HIDE, EMPTY), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CLICK_OUTSIDE, EMPTY), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CONTENT_MOUSEENTER, EMPTY), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CONTENT_MOUSELEAVE, EMPTY), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.STOP_HIDE, EMPTY), _EMIT_EVENT_TYPES);
596
- ;// CONCATENATED MODULE: ../../packages/popover/src/content.tsx
597
-
598
-
599
- /*
600
- * Tencent is pleased to support the open source community by making
601
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
602
- *
603
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
604
- *
605
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
606
- *
607
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
608
- *
609
- * ---------------------------------------------------
610
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
611
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
612
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
613
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
614
- *
615
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
616
- * the Software.
617
- *
618
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
619
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
620
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
621
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
622
- * IN THE SOFTWARE.
623
- */
624
-
625
-
626
- /* harmony default export */ const content = ((0,external_vue_.defineComponent)({
627
- name: 'PopContent',
628
- props: {
629
- width: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
630
- height: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
631
- maxHeight: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto')
632
- },
633
- setup: function setup(props) {
634
- var resolveValToPix = function resolveValToPix(val) {
635
- if (/^\d+\.?\d*$/.test("".concat(val))) {
636
- return "".concat(val, "px");
637
- }
638
-
639
- return val;
640
- };
641
-
642
- var style = (0,external_vue_.computed)(function () {
643
- return {
644
- width: resolveValToPix(props.width),
645
- height: resolveValToPix(props.height),
646
- maxHeight: resolveValToPix(props.maxHeight)
647
- };
648
- });
649
- return {
650
- style: style
651
- };
652
- },
653
- render: function render() {
654
- var _a, _b, _c, _d, _e, _f;
655
-
656
- var className = [(0,external_shared_.resolveClassName)('popover'), (0,external_shared_.resolveClassName)('pop2-content')];
657
- return (0,external_vue_.createVNode)("div", {
658
- "class": className,
659
- "tabindex": "-1",
660
- "style": this.style
661
- }, [(_c = (_b = (_a = this.$slots).arrow) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : '', (_f = (_e = (_d = this.$slots)["default"]) === null || _e === void 0 ? void 0 : _e.call(_d)) !== null && _f !== void 0 ? _f : '']);
662
- }
663
- }));
664
- // EXTERNAL MODULE: external "vue-types"
665
- var external_vue_types_ = __webpack_require__(210);
666
- ;// CONCATENATED MODULE: ../../packages/shared/src/vue-types.ts
667
-
668
-
669
-
670
-
671
-
672
-
673
- 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); }; }
674
-
675
- 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; } }
676
-
677
-
678
- var propTypesNS = (0,external_vue_types_.createTypes)({}); // 用于创建字符串列表映射至 `K: V` 的函数
679
-
680
- function stringEnum(o) {
681
- return o.reduce(function (res, key) {
682
- res[key] = key;
683
- return res;
684
- }, Object.create(null));
685
- }
686
- var SizeEnum;
687
-
688
- (function (SizeEnum) {
689
- SizeEnum["SMALL"] = "small";
690
- SizeEnum["LARGE"] = "large";
691
- SizeEnum["DEFAULT"] = "default";
692
- })(SizeEnum || (SizeEnum = {}));
693
-
694
- var Placements;
695
-
696
- (function (Placements) {
697
- Placements["Top"] = "top";
698
- Placements["Left"] = "left";
699
- Placements["Right"] = "right";
700
- Placements["Bottom"] = "bottom";
701
- })(Placements || (Placements = {}));
702
-
703
- var RenderDirectiveEnum;
704
-
705
- (function (RenderDirectiveEnum) {
706
- RenderDirectiveEnum["IF"] = "if";
707
- RenderDirectiveEnum["SHOW"] = "show";
708
- })(RenderDirectiveEnum || (RenderDirectiveEnum = {}));
709
-
710
- function renderDirectiveType() {
711
- return toType('renderDirective', {
712
- "default": RenderDirectiveEnum.SHOW
713
- });
714
- }
715
- ;
716
- var AlignEnum;
717
-
718
- (function (AlignEnum) {
719
- AlignEnum["LEFT"] = "left";
720
- AlignEnum["CENTER"] = "center";
721
- AlignEnum["RIGHT"] = "right";
722
- })(AlignEnum || (AlignEnum = {}));
723
-
724
- function alignType() {
725
- return toType('align', {
726
- "default": AlignEnum.LEFT
727
- }).def(AlignEnum.LEFT);
728
- }
729
- ;
730
- var ThemeEnum;
731
-
732
- (function (ThemeEnum) {
733
- ThemeEnum["PRIMARY"] = "primary";
734
- ThemeEnum["WARNING"] = "warning";
735
- ThemeEnum["SUCCESS"] = "success";
736
- ThemeEnum["DANGER"] = "danger";
737
- })(ThemeEnum || (ThemeEnum = {}));
738
- /** 弹层出现位置选项 */
739
-
740
-
741
- var PlacementEnum;
742
-
743
- (function (PlacementEnum) {
744
- PlacementEnum["AUTO"] = "auto";
745
- PlacementEnum["AUTO_START"] = "auto-start";
746
- PlacementEnum["AUTO_END"] = "auto-end";
747
- PlacementEnum["TOP"] = "top";
748
- PlacementEnum["RIGHT"] = "right";
749
- PlacementEnum["BOTTOM"] = "bottom";
750
- PlacementEnum["LEFT"] = "left";
751
- PlacementEnum["TOP_START"] = "top-start";
752
- PlacementEnum["TOP_END"] = "top-end";
753
- PlacementEnum["BOTTOM_START"] = "bottom-start";
754
- PlacementEnum["BOTTOM_END"] = "bottom-end";
755
- PlacementEnum["RIGHT_START"] = "right-start";
756
- PlacementEnum["RIGHT_END"] = "right-end";
757
- PlacementEnum["LEFT_START"] = "left-start";
758
- PlacementEnum["LEFT_END"] = "left-end";
759
- })(PlacementEnum || (PlacementEnum = {}));
760
-
761
- function placementType() {
762
- return toType('placement', {}).def(PlacementEnum.BOTTOM);
763
- }
764
- ;
765
- /** 弹层触发选项 */
766
-
767
- var TriggerEnum;
768
-
769
- (function (TriggerEnum) {
770
- TriggerEnum["HOVER"] = "hover";
771
- TriggerEnum["CLICK"] = "click";
772
- TriggerEnum["MANUAL"] = "manual";
773
- })(TriggerEnum || (TriggerEnum = {}));
774
-
775
- function triggerType() {
776
- return (0,external_vue_types_.toType)('trigger', {}).def(TriggerEnum.HOVER);
777
- }
778
- ;
779
- /** 内容渲染类型:目前是在popover内容渲染时使用 */
780
-
781
- var RenderType;
782
-
783
- (function (RenderType) {
784
- RenderType["AUTO"] = "auto";
785
- RenderType["SHOWN"] = "shown"; // 默认不渲染,只有在popover弹出之后才会渲染
786
- })(RenderType || (RenderType = {}));
787
-
788
- function renderType() {
789
- return (0,external_vue_types_.toType)('trigger', {}).def(RenderType.AUTO);
790
- }
791
- ;
792
- var DialogTypeEnum;
793
-
794
- (function (DialogTypeEnum) {
795
- DialogTypeEnum["SHOW"] = "show";
796
- DialogTypeEnum["OPERATION"] = "operation";
797
- DialogTypeEnum["CONFIRM"] = "confirm";
798
- DialogTypeEnum["PROCESS"] = "process";
799
- })(DialogTypeEnum || (DialogTypeEnum = {}));
800
-
801
- function dialogTypeUnion() {
802
- return toType('dialogType', {
803
- "default": DialogTypeEnum.OPERATION
804
- });
805
- }
806
- var DirectionEnum;
807
-
808
- (function (DirectionEnum) {
809
- DirectionEnum["HORIZONTAL"] = "horizontal";
810
- DirectionEnum["VERTICAL"] = "vertical";
811
- })(DirectionEnum || (DirectionEnum = {}));
812
-
813
- function directionType() {
814
- return toType('direction', {}).def(DirectionEnum.HORIZONTAL);
815
- }
816
- var LineStyleEnum;
817
-
818
- (function (LineStyleEnum) {
819
- LineStyleEnum["DASHED"] = "dashed";
820
- LineStyleEnum["SOLID"] = "solid";
821
- })(LineStyleEnum || (LineStyleEnum = {}));
822
-
823
- function lineStyleType() {
824
- return toType('lineType', {}).def(LineStyleEnum.DASHED);
825
- }
826
- ;
827
- var TagThemeEnum;
828
-
829
- (function (TagThemeEnum) {
830
- TagThemeEnum["SUCCESS"] = "success";
831
- TagThemeEnum["INFO"] = "info";
832
- TagThemeEnum["WARNING"] = "warning";
833
- TagThemeEnum["DANGER"] = "danger";
834
- })(TagThemeEnum || (TagThemeEnum = {}));
835
-
836
- function TagThemeType() {
837
- return toType('tagTheme', {}).def();
838
- }
839
- var InputBehaviorEnum;
840
-
841
- (function (InputBehaviorEnum) {
842
- InputBehaviorEnum["SIMPLICITY"] = "simplicity";
843
- InputBehaviorEnum["NORMAL"] = "normal";
844
- })(InputBehaviorEnum || (InputBehaviorEnum = {}));
845
-
846
- function InputBehaviorType() {
847
- return toType('behavior', {}).def(InputBehaviorEnum.NORMAL);
848
- }
849
- ;
850
- var PropTypes = /*#__PURE__*/(/* unused pure expression or super */ null && (function (_propTypesNS) {
851
- _inherits(PropTypes, _propTypesNS);
852
-
853
- var _super = _createSuper(PropTypes);
854
-
855
- function PropTypes() {
856
- _classCallCheck(this, PropTypes);
857
-
858
- return _super.apply(this, arguments);
859
- }
860
-
861
- _createClass(PropTypes, null, [{
862
- key: "size",
863
- value: function size() {
864
- var defaultList = ['small', 'default', 'large'];
865
- return toType('Size', {
866
- validator: function validator(val) {
867
- if (!val || defaultList.includes(val)) {
868
- return true;
869
- }
870
-
871
- console.error("invalid theme, ".concat(val, ", the theme must be one of \u3010").concat(defaultList.join(' | '), "\u3011"));
872
- return false;
873
- },
874
- "default": 'default'
875
- });
876
- }
877
- }, {
878
- key: "theme",
879
- value: function theme() {
880
- var themes = ['primary', 'warning', 'success', 'danger'];
881
- return toType('Theme', {
882
- validator: function validator(val) {
883
- if (!val || themes.includes(val)) {
884
- return true;
885
- }
886
-
887
- console.error("invalid theme, ".concat(val, ", the theme must be one of \u3010").concat(themes.join(' | '), "\u3011"));
888
- return false;
889
- }
890
- });
891
- }
892
- }, {
893
- key: "placement",
894
- value: function placement() {
895
- var placements = ['top', 'left', 'right', 'bottom'];
896
- return toType('Placements', {
897
- validator: function validator(val) {
898
- if (!val || placements.includes(val)) {
899
- return true;
900
- }
901
-
902
- console.error("invalid placements, ".concat(val, ", the placement must be one of \u3010").concat(placements.join(' | '), "\u3011"));
903
- return false;
904
- },
905
- "default": 'top'
906
- });
907
- }
908
- }, {
909
- key: "style",
910
- value: function style() {
911
- return toType('Style', {
912
- type: [String, Object]
913
- });
914
- }
915
- }, {
916
- key: "position",
917
- value: function position() {
918
- var positions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['top-left', 'top-right', 'bottom-left', 'bottom-right'];
919
- return toType('positions', {
920
- type: String,
921
- validator: function validator(val) {
922
- if (!val || positions.includes(val)) {
923
- return true;
924
- }
925
-
926
- console.error("invalid positions, ".concat(val, ", the position must be one of \u3010").concat(positions.join(' | '), "\u3011"));
927
- return false;
928
- },
929
- "default": 'top-center'
930
- });
931
- }
932
- }]);
933
-
934
- return PropTypes;
935
- }(propTypesNS)));
936
- ;// CONCATENATED MODULE: ../../packages/popover/src/props.ts
937
-
938
-
939
- var EventProps = {
940
- onAfterHidden: Function,
941
- onAfterShow: Function
942
- };
943
- var PopoverProps = Object.assign({
944
- isShow: external_shared_.PropTypes.bool.def(false),
945
- always: external_shared_.PropTypes.bool.def(false),
946
- disabled: external_shared_.PropTypes.bool.def(false),
947
- width: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
948
- height: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
949
- maxHeight: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
950
- content: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def(''),
951
-
952
- /**
953
- * 组件显示位置
954
- */
955
- placement: (0,external_shared_.placementType)().def(PlacementEnum.TOP),
956
- // 'dark', 'light'
957
- theme: external_shared_.PropTypes.string.def('dark'),
958
-
959
- /**
960
- * 触发方式
961
- * 支持 click hover manual
962
- * manual: 通过isShow控制显示、隐藏
963
- */
964
- trigger: triggerType(),
965
-
966
- /**
967
- * content 渲染方式
968
- */
969
- renderType: renderType(),
970
- // 是否显示箭头
971
- arrow: external_shared_.PropTypes.bool.def(true),
972
- padding: external_shared_.PropTypes.number.def(5),
973
- offset: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.number, external_shared_.PropTypes.shape({})]).def(6),
974
-
975
- /**
976
- * 弹出内容绑定元素
977
- */
978
- boundary: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string.def('parent'), external_shared_.PropTypes.instanceOf(HTMLElement)]),
979
- zIndex: external_shared_.PropTypes.number.def(undefined),
980
- disableTeleport: external_shared_.PropTypes.bool.def(false),
981
-
982
- /**
983
- * chooses the placement that has the most space available automatically
984
- */
985
- autoPlacement: external_shared_.PropTypes.bool.def(false),
986
-
987
- /**
988
- * 当有滚动条,滚动出可是范围时自动隐藏pop
989
- */
990
- autoVisibility: external_shared_.PropTypes.bool.def(true),
991
-
992
- /**
993
- * 是否禁用clickoutside
994
- */
995
- disableOutsideClick: external_shared_.PropTypes.bool.def(false),
996
-
997
- /**
998
- * 是否禁用样式的transform更新位移
999
- */
1000
- disableTransform: external_shared_.PropTypes.bool.def(false),
1001
-
1002
- /**
1003
- * 自定义 reference
1004
- */
1005
- reference: external_shared_.PropTypes.any.def(null),
1006
-
1007
- /**
1008
- * 兼容v1版本遗留配置
1009
- * 不建议使用
1010
- */
1011
- modifiers: external_shared_.PropTypes.array.def([]),
1012
-
1013
- /**
1014
- * popover显示和隐藏的延时时间
1015
- */
1016
- popoverDelay: external_shared_.PropTypes.number.def(100)
1017
- }, EventProps);
1018
- ;// CONCATENATED MODULE: ../../packages/popover/src/reference.tsx
1019
- /*
1020
- * Tencent is pleased to support the open source community by making
1021
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1022
- *
1023
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1024
- *
1025
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1026
- *
1027
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1028
- *
1029
- * ---------------------------------------------------
1030
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1031
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1032
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1033
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1034
- *
1035
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1036
- * the Software.
1037
- *
1038
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1039
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1040
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1041
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1042
- * IN THE SOFTWARE.
1043
- */
1044
-
1045
- /* harmony default export */ const reference = ((0,external_vue_.defineComponent)({
1046
- name: 'PopReference',
1047
- render: function render() {
1048
- var _a, _b, _c;
1049
-
1050
- return (_c = (_b = (_a = this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : '';
1051
- }
1052
- }));
1053
- ;// CONCATENATED MODULE: ../../packages/popover/src/root.tsx
1054
-
1055
-
1056
- /*
1057
- * Tencent is pleased to support the open source community by making
1058
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1059
- *
1060
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1061
- *
1062
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1063
- *
1064
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1065
- *
1066
- * ---------------------------------------------------
1067
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1068
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1069
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1070
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1071
- *
1072
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1073
- * the Software.
1074
- *
1075
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1076
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1077
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1078
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1079
- * IN THE SOFTWARE.
1080
- */
1081
-
1082
-
1083
- /* harmony default export */ const root = ((0,external_vue_.defineComponent)({
1084
- props: {
1085
- "class": external_shared_.PropTypes.string.def('')
1086
- },
1087
- render: function render() {
1088
- var _a, _b;
1089
-
1090
- return (0,external_vue_.createVNode)(external_vue_.Fragment, null, [(_b = (_a = this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a)]);
1091
- }
1092
- }));
1093
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
1094
- function _arrayWithHoles(arr) {
1095
- if (Array.isArray(arr)) return arr;
1096
- }
1097
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
1098
- function _iterableToArrayLimit(arr, i) {
1099
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1100
-
1101
- if (_i == null) return;
1102
- var _arr = [];
1103
- var _n = true;
1104
- var _d = false;
1105
-
1106
- var _s, _e;
1107
-
1108
- try {
1109
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
1110
- _arr.push(_s.value);
1111
-
1112
- if (i && _arr.length === i) break;
1113
- }
1114
- } catch (err) {
1115
- _d = true;
1116
- _e = err;
1117
- } finally {
1118
- try {
1119
- if (!_n && _i["return"] != null) _i["return"]();
1120
- } finally {
1121
- if (_d) throw _e;
1122
- }
1123
- }
1124
-
1125
- return _arr;
1126
- }
1127
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
1128
- function arrayLikeToArray_arrayLikeToArray(arr, len) {
1129
- if (len == null || len > arr.length) len = arr.length;
1130
-
1131
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
1132
- arr2[i] = arr[i];
1133
- }
1134
-
1135
- return arr2;
1136
- }
1137
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
1138
-
1139
- function unsupportedIterableToArray_unsupportedIterableToArray(o, minLen) {
1140
- if (!o) return;
1141
- if (typeof o === "string") return arrayLikeToArray_arrayLikeToArray(o, minLen);
1142
- var n = Object.prototype.toString.call(o).slice(8, -1);
1143
- if (n === "Object" && o.constructor) n = o.constructor.name;
1144
- if (n === "Map" || n === "Set") return Array.from(o);
1145
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray_arrayLikeToArray(o, minLen);
1146
- }
1147
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
1148
- function _nonIterableRest() {
1149
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1150
- }
1151
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js
1152
-
1153
-
1154
-
1155
-
1156
- function _slicedToArray(arr, i) {
1157
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || unsupportedIterableToArray_unsupportedIterableToArray(arr, i) || _nonIterableRest();
1158
- }
1159
- ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs
1160
- function t(t){return t.split("-")[0]}function e(t){return t.split("-")[1]}function n(e){return["top","bottom"].includes(t(e))?"x":"y"}function r(t){return"y"===t?"height":"width"}function i(i,o,a){let{reference:l,floating:s}=i;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=n(o),m=r(u),g=l[m]/2-s[m]/2,d="x"===u;let p;switch(t(o)){case"top":p={x:c,y:l.y-s.height};break;case"bottom":p={x:c,y:l.y+l.height};break;case"right":p={x:l.x+l.width,y:f};break;case"left":p={x:l.x-s.width,y:f};break;default:p={x:l.x,y:l.y}}switch(e(o)){case"start":p[u]-=g*(a&&d?-1:1);break;case"end":p[u]+=g*(a&&d?-1:1)}return p}const floating_ui_core_browser_min_o=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:l}=n,s=await(null==l.isRTL?void 0:l.isRTL(e));let c=await l.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:u}=i(c,r,s),m=r,g={};for(let n=0;n<a.length;n++){const{name:d,fn:p}=a[n],{x:h,y:y,data:x,reset:w}=await p({x:f,y:u,initialPlacement:r,placement:m,strategy:o,middlewareData:g,rects:c,platform:l,elements:{reference:t,floating:e}});f=null!=h?h:f,u=null!=y?y:u,g={...g,[d]:{...g[d],...x}},w&&("object"==typeof w&&(w.placement&&(m=w.placement),w.rects&&(c=!0===w.rects?await l.getElementRects({reference:t,floating:e,strategy:o}):w.rects),({x:f,y:u}=i(c,m,s))),n=-1)}return{x:f,y:u,placement:m,strategy:o,middlewareData:g}};function a(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function l(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function s(t,e){var n;void 0===e&&(e={});const{x:r,y:i,platform:o,rects:s,elements:c,strategy:f}=t,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:d=!1,padding:p=0}=e,h=a(p),y=c[d?"floating"===g?"reference":"floating":g],x=l(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(y)))||n?y:y.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(c.floating)),boundary:u,rootBoundary:m,strategy:f})),w=l(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===g?{...s.floating,x:r,y:i}:s.reference,offsetParent:await(null==o.getOffsetParent?void 0:o.getOffsetParent(c.floating)),strategy:f}):s[g]);return{top:x.top-w.top+h.top,bottom:w.bottom-x.bottom+h.bottom,left:x.left-w.left+h.left,right:w.right-x.right+h.right}}const c=Math.min,f=Math.max;function u(t,e,n){return f(t,c(e,n))}const m=t=>({name:"arrow",options:t,async fn(i){const{element:o,padding:l=0}=null!=t?t:{},{x:s,y:c,placement:f,rects:m,platform:g}=i;if(null==o)return{};const d=a(l),p={x:s,y:c},h=n(f),y=e(f),x=r(h),w=await g.getDimensions(o),v="y"===h?"top":"left",b="y"===h?"bottom":"right",R=m.reference[x]+m.reference[h]-p[h]-m.floating[x],A=p[h]-m.reference[h],P=await(null==g.getOffsetParent?void 0:g.getOffsetParent(o));let T=P?"y"===h?P.clientHeight||0:P.clientWidth||0:0;0===T&&(T=m.floating[x]);const O=R/2-A/2,D=d[v],L=T-w[x]-d[b],k=T/2-w[x]/2+O,E=u(D,k,L),C=("start"===y?d[v]:d[b])>0&&k!==E&&m.reference[x]<=m.floating[x];return{[h]:p[h]-(C?k<D?D-k:L-k:0),data:{[h]:E,centerOffset:k-E}}}}),g={left:"right",right:"left",bottom:"top",top:"bottom"};function d(t){return t.replace(/left|right|bottom|top/g,(t=>g[t]))}function p(t,i,o){void 0===o&&(o=!1);const a=e(t),l=n(t),s=r(l);let c="x"===l?a===(o?"end":"start")?"right":"left":"start"===a?"bottom":"top";return i.reference[s]>i.floating[s]&&(c=d(c)),{main:c,cross:d(c)}}const h={start:"end",end:"start"};function y(t){return t.replace(/start|end/g,(t=>h[t]))}const x=["top","right","bottom","left"],w=x.reduce(((t,e)=>t.concat(e,e+"-start",e+"-end")),[]);const v=function(n){return void 0===n&&(n={}),{name:"autoPlacement",options:n,async fn(r){var i,o,a,l,c;const{x:f,y:u,rects:m,middlewareData:g,placement:d,platform:h,elements:x}=r,{alignment:v=null,allowedPlacements:b=w,autoAlignment:R=!0,...A}=n,P=function(n,r,i){return(n?[...i.filter((t=>e(t)===n)),...i.filter((t=>e(t)!==n))]:i.filter((e=>t(e)===e))).filter((t=>!n||e(t)===n||!!r&&y(t)!==t))}(v,R,b),T=await s(r,A),O=null!=(i=null==(o=g.autoPlacement)?void 0:o.index)?i:0,D=P[O];if(null==D)return{};const{main:L,cross:k}=p(D,m,await(null==h.isRTL?void 0:h.isRTL(x.floating)));if(d!==D)return{x:f,y:u,reset:{placement:P[0]}};const E=[T[t(D)],T[L],T[k]],C=[...null!=(a=null==(l=g.autoPlacement)?void 0:l.overflows)?a:[],{placement:D,overflows:E}],H=P[O+1];if(H)return{data:{index:O+1,overflows:C},reset:{placement:H}};const B=C.slice().sort(((t,e)=>t.overflows[0]-e.overflows[0])),V=null==(c=B.find((t=>{let{overflows:e}=t;return e.every((t=>t<=0))})))?void 0:c.placement,F=null!=V?V:B[0].placement;return F!==d?{data:{index:O+1,overflows:C},reset:{placement:F}}:{}}}};const b=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(n){var r;const{placement:i,middlewareData:o,rects:a,initialPlacement:l,platform:c,elements:f}=n,{mainAxis:u=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",flipAlignment:x=!0,...w}=e,v=t(i),b=g||(v===l||!x?[d(l)]:function(t){const e=d(t);return[y(t),e,y(e)]}(l)),R=[l,...b],A=await s(n,w),P=[];let T=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&P.push(A[v]),m){const{main:t,cross:e}=p(i,a,await(null==c.isRTL?void 0:c.isRTL(f.floating)));P.push(A[t],A[e])}if(T=[...T,{placement:i,overflows:P}],!P.every((t=>t<=0))){var O,D;const t=(null!=(O=null==(D=o.flip)?void 0:D.index)?O:0)+1,e=R[t];if(e)return{data:{index:t,overflows:T},reset:{placement:e}};let n="bottom";switch(h){case"bestFit":{var L;const t=null==(L=T.map((t=>[t,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:L[0].placement;t&&(n=t);break}case"initialPlacement":n=l}if(i!==n)return{reset:{placement:n}}}return{}}}};function R(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function A(t){return x.some((e=>t[e]>=0))}const P=function(t){let{strategy:e="referenceHidden",...n}=void 0===t?{}:t;return{name:"hide",async fn(t){const{rects:r}=t;switch(e){case"referenceHidden":{const e=R(await s(t,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:A(e)}}}case"escaped":{const e=R(await s(t,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:A(e)}}}default:return{}}}}};const T=function(r){return void 0===r&&(r=0),{name:"offset",options:r,async fn(i){const{x:o,y:a}=i,l=await async function(r,i){const{placement:o,platform:a,elements:l}=r,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=t(o),f=e(o),u="x"===n(o),m=["left","top"].includes(c)?-1:1,g=s&&u?-1:1,d="function"==typeof i?i(r):i;let{mainAxis:p,crossAxis:h,alignmentAxis:y}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return f&&"number"==typeof y&&(h="end"===f?-1*y:y),u?{x:h*g,y:p*m}:{x:p*m,y:h*g}}(i,r);return{x:o+l.x,y:a+l.y,data:l}}}};function O(t){return"x"===t?"y":"x"}const D=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(r){const{x:i,y:o,placement:a}=r,{mainAxis:l=!0,crossAxis:c=!1,limiter:f={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...m}=e,g={x:i,y:o},d=await s(r,m),p=n(t(a)),h=O(p);let y=g[p],x=g[h];if(l){const t="y"===p?"bottom":"right";y=u(y+d["y"===p?"top":"left"],y,y-d[t])}if(c){const t="y"===h?"bottom":"right";x=u(x+d["y"===h?"top":"left"],x,x-d[t])}const w=f.fn({...r,[p]:y,[h]:x});return{...w,data:{x:w.x-i,y:w.y-o}}}}},L=function(e){return void 0===e&&(e={}),{options:e,fn(r){const{x:i,y:o,placement:a,rects:l,middlewareData:s}=r,{offset:c=0,mainAxis:f=!0,crossAxis:u=!0}=e,m={x:i,y:o},g=n(a),d=O(g);let p=m[g],h=m[d];const y="function"==typeof c?c({...l,placement:a}):c,x="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(f){const t="y"===g?"height":"width",e=l.reference[g]-l.floating[t]+x.mainAxis,n=l.reference[g]+l.reference[t]-x.mainAxis;p<e?p=e:p>n&&(p=n)}if(u){var w,v,b,R;const e="y"===g?"width":"height",n=["top","left"].includes(t(a)),r=l.reference[d]-l.floating[e]+(n&&null!=(w=null==(v=s.offset)?void 0:v[d])?w:0)+(n?0:x.crossAxis),i=l.reference[d]+l.reference[e]+(n?0:null!=(b=null==(R=s.offset)?void 0:R[d])?b:0)-(n?x.crossAxis:0);h<r?h=r:h>i&&(h=i)}return{[g]:p,[d]:h}}}},k=function(n){return void 0===n&&(n={}),{name:"size",options:n,async fn(r){const{placement:i,rects:o,platform:a,elements:l}=r,{apply:c,...u}=n,m=await s(r,u),g=t(i),d=e(i);let p,h;"top"===g||"bottom"===g?(p=g,h=d===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(h=g,p="end"===d?"top":"bottom");const y=f(m.left,0),x=f(m.right,0),w=f(m.top,0),v=f(m.bottom,0),b={availableHeight:o.floating.height-(["left","right"].includes(i)?2*(0!==w||0!==v?w+v:f(m.top,m.bottom)):m[p]),availableWidth:o.floating.width-(["top","bottom"].includes(i)?2*(0!==y||0!==x?y+x:f(m.left,m.right)):m[h])},R=await a.getDimensions(l.floating);null==c||c({...r,...b});const A=await a.getDimensions(l.floating);return R.width!==A.width||R.height!==A.height?{reset:{rects:!0}}:{}}}},E=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(r){var i;const{placement:o,elements:s,rects:u,platform:m,strategy:g}=r,{padding:d=2,x:p,y:h}=e,y=l(m.convertOffsetParentRelativeRectToViewportRelativeRect?await m.convertOffsetParentRelativeRectToViewportRelativeRect({rect:u.reference,offsetParent:await(null==m.getOffsetParent?void 0:m.getOffsetParent(s.floating)),strategy:g}):u.reference),x=null!=(i=await(null==m.getClientRects?void 0:m.getClientRects(s.reference)))?i:[],w=a(d);const v=await m.getElementRects({reference:{getBoundingClientRect:function(){var e;if(2===x.length&&x[0].left>x[1].right&&null!=p&&null!=h)return null!=(e=x.find((t=>p>t.left-w.left&&p<t.right+w.right&&h>t.top-w.top&&h<t.bottom+w.bottom)))?e:y;if(x.length>=2){if("x"===n(o)){const e=x[0],n=x[x.length-1],r="top"===t(o),i=e.top,a=n.bottom,l=r?e.left:n.left,s=r?e.right:n.right;return{top:i,bottom:a,left:l,right:s,width:s-l,height:a-i,x:l,y:i}}const e="left"===t(o),r=f(...x.map((t=>t.right))),i=c(...x.map((t=>t.left))),a=x.filter((t=>e?t.left===i:t.right===r)),l=a[0].top,s=a[a.length-1].bottom;return{top:l,bottom:s,left:i,right:r,width:r-i,height:s-l,x:i,y:l}}return y}},floating:s.floating,strategy:g});return u.reference.x!==v.reference.x||u.reference.y!==v.reference.y||u.reference.width!==v.reference.width||u.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}};
1161
-
1162
- ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.min.mjs
1163
- function floating_ui_dom_browser_min_n(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function o(t){if(null==t)return window;if(!floating_ui_dom_browser_min_n(t)){const e=t.ownerDocument;return e&&e.defaultView||window}return t}function floating_ui_dom_browser_min_i(t){return o(t).getComputedStyle(t)}function floating_ui_dom_browser_min_r(t){return floating_ui_dom_browser_min_n(t)?"":t?(t.nodeName||"").toLowerCase():""}function floating_ui_dom_browser_min_l(){const t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((t=>t.brand+"/"+t.version)).join(" "):navigator.userAgent}function floating_ui_dom_browser_min_c(t){return t instanceof o(t).HTMLElement}function floating_ui_dom_browser_min_f(t){return t instanceof o(t).Element}function floating_ui_dom_browser_min_s(t){if("undefined"==typeof ShadowRoot)return!1;return t instanceof o(t).ShadowRoot||t instanceof ShadowRoot}function floating_ui_dom_browser_min_u(t){const{overflow:e,overflowX:n,overflowY:o}=floating_ui_dom_browser_min_i(t);return/auto|scroll|overlay|hidden/.test(e+o+n)}function floating_ui_dom_browser_min_d(t){return["table","td","th"].includes(floating_ui_dom_browser_min_r(t))}function floating_ui_dom_browser_min_h(t){const e=/firefox/i.test(floating_ui_dom_browser_min_l()),n=floating_ui_dom_browser_min_i(t);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter}function floating_ui_dom_browser_min_a(){return!/^((?!chrome|android).)*safari/i.test(floating_ui_dom_browser_min_l())}const floating_ui_dom_browser_min_g=Math.min,floating_ui_dom_browser_min_p=Math.max,floating_ui_dom_browser_min_m=Math.round;function floating_ui_dom_browser_min_w(t,e,n){var i,r,l,s;void 0===e&&(e=!1),void 0===n&&(n=!1);const u=t.getBoundingClientRect();let d=1,h=1;e&&floating_ui_dom_browser_min_c(t)&&(d=t.offsetWidth>0&&floating_ui_dom_browser_min_m(u.width)/t.offsetWidth||1,h=t.offsetHeight>0&&floating_ui_dom_browser_min_m(u.height)/t.offsetHeight||1);const g=floating_ui_dom_browser_min_f(t)?o(t):window,p=!floating_ui_dom_browser_min_a()&&n,w=(u.left+(p&&null!=(i=null==(r=g.visualViewport)?void 0:r.offsetLeft)?i:0))/d,v=(u.top+(p&&null!=(l=null==(s=g.visualViewport)?void 0:s.offsetTop)?l:0))/h,y=u.width/d,x=u.height/h;return{width:y,height:x,top:v,right:w+y,bottom:v+x,left:w,x:w,y:v}}function floating_ui_dom_browser_min_v(t){return(e=t,(e instanceof o(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function floating_ui_dom_browser_min_y(t){return floating_ui_dom_browser_min_f(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function floating_ui_dom_browser_min_x(t){return floating_ui_dom_browser_min_w(floating_ui_dom_browser_min_v(t)).left+floating_ui_dom_browser_min_y(t).scrollLeft}function floating_ui_dom_browser_min_b(t,e,n){const o=floating_ui_dom_browser_min_c(e),i=floating_ui_dom_browser_min_v(e),l=floating_ui_dom_browser_min_w(t,o&&function(t){const e=floating_ui_dom_browser_min_w(t);return floating_ui_dom_browser_min_m(e.width)!==t.offsetWidth||floating_ui_dom_browser_min_m(e.height)!==t.offsetHeight}(e),"fixed"===n);let f={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==floating_ui_dom_browser_min_r(e)||floating_ui_dom_browser_min_u(i))&&(f=floating_ui_dom_browser_min_y(e)),floating_ui_dom_browser_min_c(e)){const t=floating_ui_dom_browser_min_w(e,!0);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else i&&(s.x=floating_ui_dom_browser_min_x(i));return{x:l.left+f.scrollLeft-s.x,y:l.top+f.scrollTop-s.y,width:l.width,height:l.height}}function floating_ui_dom_browser_min_L(t){return"html"===floating_ui_dom_browser_min_r(t)?t:t.assignedSlot||t.parentNode||(floating_ui_dom_browser_min_s(t)?t.host:null)||floating_ui_dom_browser_min_v(t)}function floating_ui_dom_browser_min_R(t){return floating_ui_dom_browser_min_c(t)&&"fixed"!==getComputedStyle(t).position?t.offsetParent:null}function floating_ui_dom_browser_min_T(t){const e=o(t);let n=floating_ui_dom_browser_min_R(t);for(;n&&floating_ui_dom_browser_min_d(n)&&"static"===getComputedStyle(n).position;)n=floating_ui_dom_browser_min_R(n);return n&&("html"===floating_ui_dom_browser_min_r(n)||"body"===floating_ui_dom_browser_min_r(n)&&"static"===getComputedStyle(n).position&&!floating_ui_dom_browser_min_h(n))?e:n||function(t){let e=floating_ui_dom_browser_min_L(t);for(floating_ui_dom_browser_min_s(e)&&(e=e.host);floating_ui_dom_browser_min_c(e)&&!["html","body"].includes(floating_ui_dom_browser_min_r(e));){if(floating_ui_dom_browser_min_h(e))return e;e=e.parentNode}return null}(t)||e}function W(t){if(floating_ui_dom_browser_min_c(t))return{width:t.offsetWidth,height:t.offsetHeight};const e=floating_ui_dom_browser_min_w(t);return{width:e.width,height:e.height}}function floating_ui_dom_browser_min_E(t){const e=floating_ui_dom_browser_min_L(t);return["html","body","#document"].includes(floating_ui_dom_browser_min_r(e))?t.ownerDocument.body:floating_ui_dom_browser_min_c(e)&&floating_ui_dom_browser_min_u(e)?e:floating_ui_dom_browser_min_E(e)}function H(t,e){var n;void 0===e&&(e=[]);const i=floating_ui_dom_browser_min_E(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),l=o(i),c=r?[l].concat(l.visualViewport||[],floating_ui_dom_browser_min_u(i)?i:[]):i,f=e.concat(c);return r?f:f.concat(H(c))}function C(e,n,r){return"viewport"===n?l(function(t,e){const n=o(t),i=floating_ui_dom_browser_min_v(t),r=n.visualViewport;let l=i.clientWidth,c=i.clientHeight,f=0,s=0;if(r){l=r.width,c=r.height;const t=floating_ui_dom_browser_min_a();(t||!t&&"fixed"===e)&&(f=r.offsetLeft,s=r.offsetTop)}return{width:l,height:c,x:f,y:s}}(e,r)):floating_ui_dom_browser_min_f(n)?function(t,e){const n=floating_ui_dom_browser_min_w(t,!1,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft;return{top:o,left:i,x:i,y:o,right:i+t.clientWidth,bottom:o+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(n,r):l(function(t){var e;const n=floating_ui_dom_browser_min_v(t),o=floating_ui_dom_browser_min_y(t),r=null==(e=t.ownerDocument)?void 0:e.body,l=floating_ui_dom_browser_min_p(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=floating_ui_dom_browser_min_p(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let f=-o.scrollLeft+floating_ui_dom_browser_min_x(t);const s=-o.scrollTop;return"rtl"===floating_ui_dom_browser_min_i(r||n).direction&&(f+=floating_ui_dom_browser_min_p(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:c,x:f,y:s}}(floating_ui_dom_browser_min_v(e)))}function S(t){const e=H(t),n=["absolute","fixed"].includes(floating_ui_dom_browser_min_i(t).position)&&floating_ui_dom_browser_min_c(t)?floating_ui_dom_browser_min_T(t):t;return floating_ui_dom_browser_min_f(n)?e.filter((t=>floating_ui_dom_browser_min_f(t)&&function(t,e){const n=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&floating_ui_dom_browser_min_s(n)){let n=e;do{if(n&&t===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(t,n)&&"body"!==floating_ui_dom_browser_min_r(t))):[]}const floating_ui_dom_browser_min_D={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?S(e):[].concat(n),o],l=r[0],c=r.reduce(((t,n)=>{const o=C(e,n,i);return t.top=floating_ui_dom_browser_min_p(o.top,t.top),t.right=floating_ui_dom_browser_min_g(o.right,t.right),t.bottom=floating_ui_dom_browser_min_g(o.bottom,t.bottom),t.left=floating_ui_dom_browser_min_p(o.left,t.left),t}),C(e,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=floating_ui_dom_browser_min_c(n),l=floating_ui_dom_browser_min_v(n);if(n===l)return e;let f={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&"fixed"!==o)&&(("body"!==floating_ui_dom_browser_min_r(n)||floating_ui_dom_browser_min_u(l))&&(f=floating_ui_dom_browser_min_y(n)),floating_ui_dom_browser_min_c(n))){const t=floating_ui_dom_browser_min_w(n,!0);s.x=t.x+n.clientLeft,s.y=t.y+n.clientTop}return{...e,x:e.x-f.scrollLeft+s.x,y:e.y-f.scrollTop+s.y}},isElement:floating_ui_dom_browser_min_f,getDimensions:W,getOffsetParent:floating_ui_dom_browser_min_T,getDocumentElement:floating_ui_dom_browser_min_v,getElementRects:t=>{let{reference:e,floating:n,strategy:o}=t;return{reference:floating_ui_dom_browser_min_b(e,floating_ui_dom_browser_min_T(n),o),floating:{...W(n),x:0,y:0}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===floating_ui_dom_browser_min_i(t).direction};function N(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=!0,animationFrame:c=!1}=o,s=i&&!c,u=r&&!c,d=s||u?[...floating_ui_dom_browser_min_f(t)?H(t):[],...H(e)]:[];d.forEach((t=>{s&&t.addEventListener("scroll",n,{passive:!0}),u&&t.addEventListener("resize",n)}));let h,a=null;l&&(a=new ResizeObserver(n),floating_ui_dom_browser_min_f(t)&&!c&&a.observe(t),a.observe(e));let g=c?floating_ui_dom_browser_min_w(t):null;return c&&function e(){const o=floating_ui_dom_browser_min_w(t);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n();g=o,h=requestAnimationFrame(e)}(),l||n(),()=>{var t;d.forEach((t=>{s&&t.removeEventListener("scroll",n),u&&t.removeEventListener("resize",n)})),null==(t=a)||t.disconnect(),a=null,c&&cancelAnimationFrame(h)}}const z=(t,n,o)=>floating_ui_core_browser_min_o(t,n,{platform:floating_ui_dom_browser_min_D,...o});
1164
-
1165
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js
1166
- function _objectDestructuringEmpty(obj) {
1167
- if (obj == null) throw new TypeError("Cannot destructure undefined");
1168
- }
1169
- ;// CONCATENATED MODULE: ../../packages/popover/src/use-platform.tsx
1170
-
1171
-
1172
- /*
1173
- * Tencent is pleased to support the open source community by making
1174
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1175
- *
1176
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1177
- *
1178
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1179
- *
1180
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1181
- *
1182
- * ---------------------------------------------------
1183
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1184
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1185
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1186
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1187
- *
1188
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1189
- * the Software.
1190
- *
1191
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1192
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1193
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1194
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1195
- * IN THE SOFTWARE.
1196
- */
1197
- /* harmony default export */ const use_platform = (function (fullscreenTarget) {
1198
- var getElementRects = function getElementRects(_ref) {
1199
- var reference = _ref.reference,
1200
- floating = _ref.floating;
1201
- var refRect = reference.getBoundingClientRect();
1202
- var floatRect = floating.getBoundingClientRect();
1203
- return {
1204
- reference: {
1205
- width: refRect.width,
1206
- height: refRect.height,
1207
- x: refRect.x,
1208
- y: refRect.y
1209
- },
1210
- floating: {
1211
- width: floatRect.width,
1212
- height: floatRect.height,
1213
- x: floatRect.x,
1214
- y: floatRect.y
1215
- }
1216
- };
1217
- };
1218
-
1219
- var getDimensions = function getDimensions(element) {
1220
- var _element$getBoundingC = element.getBoundingClientRect(),
1221
- width = _element$getBoundingC.width,
1222
- height = _element$getBoundingC.height;
1223
-
1224
- return {
1225
- width: width,
1226
- height: height
1227
- };
1228
- };
1229
-
1230
- var getClippingRect = function getClippingRect(_ref2) {
1231
- _objectDestructuringEmpty(_ref2);
1232
-
1233
- var _a;
1234
-
1235
- var _ref3 = (_a = fullscreenTarget === null || fullscreenTarget === void 0 ? void 0 : fullscreenTarget.getBoundingClientRect()) !== null && _a !== void 0 ? _a : {},
1236
- _ref3$width = _ref3.width,
1237
- width = _ref3$width === void 0 ? 0 : _ref3$width,
1238
- _ref3$height = _ref3.height,
1239
- height = _ref3$height === void 0 ? 0 : _ref3$height;
1240
-
1241
- return {
1242
- width: width,
1243
- height: height,
1244
- x: 0,
1245
- y: 0
1246
- };
1247
- };
1248
-
1249
- return {
1250
- getElementRects: getElementRects,
1251
- getDimensions: getDimensions,
1252
- getClippingRect: getClippingRect
1253
- };
1254
- });
1255
- ;// CONCATENATED MODULE: ../../packages/popover/src/use-floating.tsx
1256
-
1257
-
1258
-
1259
- /*
1260
- * Tencent is pleased to support the open source community by making
1261
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1262
- *
1263
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1264
- *
1265
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1266
- *
1267
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1268
- *
1269
- * ---------------------------------------------------
1270
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1271
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1272
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1273
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1274
- *
1275
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1276
- * the Software.
1277
- *
1278
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1279
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1280
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1281
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1282
- * IN THE SOFTWARE.
1283
- */
1284
-
1285
-
1286
-
1287
-
1288
-
1289
- /**
1290
- * 解析popover相关配置
1291
- */
1292
-
1293
- /* harmony default export */ const use_floating = (function (props, ctx, _ref) {
1294
- var refReference = _ref.refReference,
1295
- refContent = _ref.refContent,
1296
- refArrow = _ref.refArrow,
1297
- refRoot = _ref.refRoot;
1298
- var localIsShow = (0,external_vue_.ref)(false);
1299
- var fullScreenTarget = (0,external_vue_.ref)();
1300
-
1301
- var isElementFullScreen = function isElementFullScreen() {
1302
- var _a, _b, _c;
1303
-
1304
- var elReference = resolveTargetElement((_a = refReference.value) === null || _a === void 0 ? void 0 : _a.$el);
1305
-
1306
- if ((_b = document.fullscreenElement) === null || _b === void 0 ? void 0 : _b.shadowRoot) {
1307
- return document.fullscreenElement.shadowRoot.contains(elReference);
1308
- }
1309
-
1310
- return (_c = document.fullscreenElement) === null || _c === void 0 ? void 0 : _c.contains(elReference);
1311
- };
1312
- /**
1313
- * 当全屏模式开启,获取指定选择器下面的全屏元素
1314
- * 如果是启用了webcomponent组件,则返回shadowRoot内指定的目标元素
1315
- * @param selector
1316
- * @returns
1317
- */
1318
-
1319
-
1320
- var getFullscreenRoot = function getFullscreenRoot(selector) {
1321
- if (isElementFullScreen()) {
1322
- if (document.fullscreenElement.shadowRoot) {
1323
- return document.fullscreenElement.shadowRoot.querySelector(selector);
1324
- }
1325
-
1326
- return document.fullscreenElement.querySelector(selector);
1327
- }
1328
-
1329
- return document.body;
1330
- };
1331
-
1332
- var themeList = ['dark', 'light'];
1333
- /**
1334
- * 根据props.theme计算theme
1335
- * 返回systemTheme & customTheme
1336
- * systemTheme是指包含在 ['dark', 'light'] 内置主题
1337
- * customTheme是指自定义的theme,string类型
1338
- */
1339
-
1340
- var compTheme = (0,external_vue_.computed)(function () {
1341
- var _a, _b;
1342
-
1343
- var themes = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.split(/\s+/)) !== null && _b !== void 0 ? _b : [];
1344
- themes.sort(function (a, b) {
1345
- return Number(themeList.includes(b)) - Number(themeList.includes(a));
1346
- });
1347
- var systemThemes = themes;
1348
- var customThemes = themes.filter(function (item) {
1349
- return !themeList.includes(item);
1350
- });
1351
- return {
1352
- systemThemes: systemThemes,
1353
- customThemes: customThemes
1354
- };
1355
- });
1356
-
1357
- var isHideMiddlewareAvailable = function isHideMiddlewareAvailable() {
1358
- return props.autoVisibility;
1359
- };
1360
-
1361
- var isAutoPlacementAvailable = function isAutoPlacementAvailable() {
1362
- return props.autoPlacement;
1363
- };
1364
- /**
1365
- * 解析弹出reference元素,content元素, arrow元素
1366
- * @returns
1367
- */
1368
-
1369
-
1370
- var resolvePopElements = function resolvePopElements() {
1371
- var _a, _b, _c, _d;
1372
-
1373
- var elReference = resolveTargetElement((_a = refReference.value) === null || _a === void 0 ? void 0 : _a.$el);
1374
- var elContent = resolveTargetElement((_b = refContent.value) === null || _b === void 0 ? void 0 : _b.$el);
1375
- var elArrow = props.arrow ? resolveTargetElement((_c = refArrow.value) === null || _c === void 0 ? void 0 : _c.$el) : null;
1376
- var root = resolveTargetElement((_d = refRoot.value) === null || _d === void 0 ? void 0 : _d.$el);
1377
- return {
1378
- elReference: elReference,
1379
- elContent: elContent,
1380
- elArrow: elArrow,
1381
- root: root
1382
- };
1383
- };
1384
-
1385
- var resolveModifiers = function resolveModifiers() {
1386
- var resolveResult = {};
1387
-
1388
- if (Array.isArray(props.modifiers)) {
1389
- props.modifiers.forEach(function (m) {
1390
- var _a, _b, _c, _d;
1391
-
1392
- var result;
1393
-
1394
- if (m.name === 'offset') {
1395
- if (typeof ((_a = m.options) === null || _a === void 0 ? void 0 : _a.offset) === 'number') {
1396
- result = (_b = m.options) === null || _b === void 0 ? void 0 : _b.offset;
1397
- }
1398
-
1399
- if (Array.isArray((_c = m.options) === null || _c === void 0 ? void 0 : _c.offset)) {
1400
- var _ref2 = (_d = m.options) === null || _d === void 0 ? void 0 : _d.offset,
1401
- _ref3 = _slicedToArray(_ref2, 2),
1402
- mainAxis = _ref3[0],
1403
- crossAxis = _ref3[1];
1404
-
1405
- result = {
1406
- mainAxis: mainAxis,
1407
- crossAxis: crossAxis
1408
- };
1409
- }
1410
-
1411
- Object.assign(resolveResult, {
1412
- offset: result
1413
- });
1414
- }
1415
- });
1416
- }
1417
-
1418
- return resolveResult;
1419
- };
1420
-
1421
- var resolvePopOptions = function resolvePopOptions(elArrow, props) {
1422
- var _a;
1423
-
1424
- var modifiers = resolveModifiers();
1425
- var middleware = [T(modifiers.offset || props.offset), D({
1426
- padding: props.padding
1427
- })];
1428
- var options = {
1429
- placement: props.placement,
1430
- middleware: middleware
1431
- };
1432
-
1433
- if (props.arrow) {
1434
- middleware.push(m({
1435
- element: elArrow
1436
- }));
1437
- }
1438
-
1439
- if (isAutoPlacementAvailable()) {
1440
- middleware.push(v());
1441
- } else {
1442
- middleware.unshift(E());
1443
- middleware.push(b());
1444
- }
1445
-
1446
- if (isHideMiddlewareAvailable()) {
1447
- options.middleware.push(P());
1448
- }
1449
- /**
1450
- * 如果是全屏元素或者指定的虚拟元素
1451
- * 则启用自定义的platform
1452
- * 在弹出的全屏元素中,元素相对位置有别于document下面元素
1453
- * 全屏模式下面,需要自定义当前元素的一个platform
1454
- */
1455
-
1456
-
1457
- if (isElementFullScreen() || props.isVirtualEl) {
1458
- var _usePlatform = use_platform(fullScreenTarget.value),
1459
- getElementRects = _usePlatform.getElementRects,
1460
- getDimensions = _usePlatform.getDimensions,
1461
- getClippingRect = _usePlatform.getClippingRect;
1462
-
1463
- Object.assign(options, {
1464
- platform: Object.assign(Object.assign({}, (_a = props === null || props === void 0 ? void 0 : props.platform) !== null && _a !== void 0 ? _a : {}), {
1465
- getElementRects: getElementRects,
1466
- getDimensions: getDimensions,
1467
- getClippingRect: getClippingRect
1468
- })
1469
- });
1470
- }
1471
-
1472
- return options;
1473
- };
1474
-
1475
- var resolveTargetElement = function resolveTargetElement(target) {
1476
- if (target instanceof HTMLElement) {
1477
- return target;
1478
- }
1479
-
1480
- if (target instanceof Text) {
1481
- return resolveTargetElement(target.nextElementSibling);
1482
- }
1483
-
1484
- if (typeof (target === null || target === void 0 ? void 0 : target.getBoundingClientRect) === 'function') {
1485
- return target;
1486
- }
1487
-
1488
- return null;
1489
- }; // 兼容多种样式处理规则
1490
- // class custom-theme
1491
-
1492
-
1493
- var customThemeCls = compTheme.value.customThemes.join(' ');
1494
- var customTheme = compTheme.value.customThemes.reduce(function (out, cur) {
1495
- return Object.assign(_defineProperty({}, "data-".concat(cur, "-theme"), true), out);
1496
- }, {});
1497
- var contentClass = "".concat(customThemeCls);
1498
- var cleanup = null;
1499
-
1500
- var getRoundPixelVal = function getRoundPixelVal(val) {
1501
- var dpr = window.devicePixelRatio || 1;
1502
- return Math.round(val * dpr) / dpr || 0;
1503
- };
1504
-
1505
- var updatePopContentStyle = function updatePopContentStyle(elContent, x, y, middlewareData) {
1506
- var _a;
1507
-
1508
- if (props.disableTransform) {
1509
- Object.assign(elContent.style, {
1510
- left: "".concat(getRoundPixelVal(x), "px"),
1511
- top: "".concat(getRoundPixelVal(y), "px")
1512
- });
1513
- } else {
1514
- Object.assign(elContent.style, {
1515
- left: '0',
1516
- top: '0',
1517
- transform: "translate3d(".concat(getRoundPixelVal(x), "px,").concat(getRoundPixelVal(y), "px,0)")
1518
- });
1519
- }
1520
-
1521
- var referenceHidden = isHideMiddlewareAvailable() ? (_a = middlewareData.hide) === null || _a === void 0 ? void 0 : _a.referenceHidden : false;
1522
- Object.assign(elContent.style, {
1523
- visibility: referenceHidden ? 'hidden' : 'visible'
1524
- });
1525
- };
1526
-
1527
- var updateArrowStyle = function updateArrowStyle(elArrow, resolvedPlacement, middlewareData) {
1528
- var _a;
1529
-
1530
- if (props.arrow) {
1531
- var _ref4 = (_a = middlewareData.arrow) !== null && _a !== void 0 ? _a : {},
1532
- arrowX = _ref4.x,
1533
- arrowY = _ref4.y;
1534
-
1535
- elArrow.setAttribute('data-arrow', resolvedPlacement);
1536
- var arrowConfig = {
1537
- left: '',
1538
- top: '',
1539
- bottom: '',
1540
- right: ''
1541
- };
1542
- Object.assign(elArrow.style, arrowConfig);
1543
- var arrowSide = {
1544
- top: 'bottom',
1545
- right: 'left',
1546
- bottom: 'top',
1547
- left: 'right'
1548
- }[resolvedPlacement];
1549
- Object.assign(elArrow.style, _defineProperty({
1550
- left: arrowX !== null ? "".concat(arrowX, "px") : '',
1551
- top: arrowY !== null ? "".concat(arrowY, "px") : ''
1552
- }, arrowSide, '-4px'));
1553
- }
1554
- };
1555
-
1556
- var createPopInstance = function createPopInstance() {
1557
- var _resolvePopElements = resolvePopElements(),
1558
- elReference = _resolvePopElements.elReference,
1559
- elContent = _resolvePopElements.elContent;
1560
-
1561
- cleanup = N(elReference, elContent, function () {
1562
- updatePopover(null, props);
1563
- });
1564
- };
1565
-
1566
- var updatePopover = function updatePopover() {
1567
- var virtualEl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
1568
- var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1569
-
1570
- var _resolvePopElements2 = resolvePopElements(),
1571
- elReference = _resolvePopElements2.elReference,
1572
- elContent = _resolvePopElements2.elContent,
1573
- elArrow = _resolvePopElements2.elArrow;
1574
-
1575
- var targetEl = virtualEl || elReference;
1576
- if (!targetEl || !elContent) return;
1577
- var options = resolvePopOptions(elArrow, props);
1578
- z(targetEl, elContent, options).then(function (_ref5) {
1579
- var x = _ref5.x,
1580
- y = _ref5.y,
1581
- placement = _ref5.placement,
1582
- middlewareData = _ref5.middlewareData;
1583
- var oldClass = elContent.className;
1584
- elContent.className = "".concat(oldClass.replace(contentClass, ''), " ").concat(contentClass).replace(/\s+/mg, ' ').replace(/^\s+|\s+$/g, '');
1585
- Object.keys(customTheme).forEach(function (key) {
1586
- elContent.setAttribute(key, customTheme[key]);
1587
- });
1588
- var placementStr = placement.split('-')[0];
1589
- var resolvedPlacement = placementStr;
1590
-
1591
- if (!['left', 'right', 'top', 'bottom'].includes(placementStr)) {
1592
- resolvedPlacement = 'top';
1593
- }
1594
-
1595
- updatePopContentStyle(elContent, x, y, middlewareData);
1596
- updateArrowStyle(elArrow, resolvedPlacement, middlewareData);
1597
- });
1598
- };
1599
-
1600
- var popHideTimerId = undefined;
1601
- var isMouseenter = false;
1602
-
1603
- var showPopover = function showPopover() {
1604
- // 设置settimeout避免hidePopover导致显示问题
1605
- setTimeout(function () {
1606
- !props.disabled && (localIsShow.value = true);
1607
- }, props.popoverDelay);
1608
- };
1609
-
1610
- var hidePopover = function hidePopover() {
1611
- popHideTimerId = setTimeout(function () {
1612
- localIsShow.value = false;
1613
- }, props.popoverDelay);
1614
- };
1615
-
1616
- var hanldePopoverShow = function hanldePopoverShow() {
1617
- var _a;
1618
-
1619
- var elContent = resolveTargetElement((_a = refContent.value) === null || _a === void 0 ? void 0 : _a.$el);
1620
- elContent.style.setProperty('display', 'block');
1621
- elContent.style.setProperty('z-index', "".concat(props.zIndex ? props.zIndex : external_shared_.bkZIndexManager.getPopperIndex()));
1622
- updatePopover();
1623
- ctx.emit('afterShow', {
1624
- isShow: true
1625
- });
1626
- };
1627
-
1628
- var handlePopoverHide = function handlePopoverHide() {
1629
- var _a;
1630
-
1631
- var elContent = resolveTargetElement((_a = refContent.value) === null || _a === void 0 ? void 0 : _a.$el);
1632
- elContent.style.setProperty('display', 'none');
1633
- ctx.emit('afterHidden', {
1634
- isShow: false
1635
- });
1636
- };
1637
-
1638
- var triggerPopover = function triggerPopover() {
1639
- if (!localIsShow.value) {
1640
- showPopover();
1641
- } else {
1642
- hidePopover();
1643
- }
1644
- };
1645
-
1646
- var handleClickRef = function handleClickRef() {
1647
- triggerPopover();
1648
- };
1649
-
1650
- var handlePopContentMouseEnter = function handlePopContentMouseEnter() {
1651
- if (props.trigger !== 'hover') {
1652
- return;
1653
- }
1654
-
1655
- if (popHideTimerId) {
1656
- isMouseenter = true;
1657
- clearTimeout(popHideTimerId);
1658
- popHideTimerId = undefined;
1659
- }
1660
-
1661
- emitPopContentMouseEnter();
1662
- };
1663
-
1664
- var handlePopContentMouseLeave = function handlePopContentMouseLeave() {
1665
- if (isMouseenter) {
1666
- hidePopover();
1667
- isMouseenter = false;
1668
- emitPopContentMouseLeave();
1669
- }
1670
- };
1671
- /**
1672
- * 弹出内容鼠标移入事件
1673
- * 抛出相关事件,方便后续操作
1674
- * 例如:鼠标移入内容区域,则取消弹出内容隐藏操作
1675
- */
1676
-
1677
-
1678
- var emitPopContentMouseEnter = function emitPopContentMouseEnter() {
1679
- ctx.emit(EMIT_EVENTS.CONTENT_MOUSEENTER);
1680
- };
1681
- /**
1682
- * 弹出内容鼠标移出事件
1683
- */
1684
-
1685
-
1686
- var emitPopContentMouseLeave = function emitPopContentMouseLeave() {
1687
- ctx.emit(EMIT_EVENTS.CONTENT_MOUSELEAVE);
1688
- };
1689
-
1690
- var resolveTriggerEvents = function resolveTriggerEvents() {
1691
- var _a;
1692
-
1693
- var triggerEvents = {
1694
- hover: {
1695
- content: [['mouseenter', handlePopContentMouseEnter], ['mouseleave', handlePopContentMouseLeave]],
1696
- reference: [['mouseenter', showPopover], ['mouseleave', hidePopover], ['focus', showPopover], ['blur', hidePopover]]
1697
- },
1698
- click: [['click', handleClickRef]],
1699
- manual: {
1700
- content: [['mouseenter', emitPopContentMouseEnter], ['mouseleave', emitPopContentMouseLeave]],
1701
- reference: [[]]
1702
- }
1703
- };
1704
- return (_a = triggerEvents[props.trigger]) !== null && _a !== void 0 ? _a : [];
1705
- };
1706
-
1707
- var updateFullscreenTarget = function updateFullscreenTarget(val) {
1708
- fullScreenTarget.value = val;
1709
- };
1710
-
1711
- (0,external_vue_.watch)(localIsShow, function (val) {
1712
- if (val) {
1713
- hanldePopoverShow();
1714
- } else {
1715
- handlePopoverHide();
1716
- }
1717
- });
1718
-
1719
- var stopHide = function stopHide() {
1720
- if (popHideTimerId) {
1721
- isMouseenter = true;
1722
- clearTimeout(popHideTimerId);
1723
- popHideTimerId = undefined;
1724
- }
1725
- };
1726
-
1727
- return {
1728
- showPopover: showPopover,
1729
- hidePopover: hidePopover,
1730
- resolveTriggerEvents: resolveTriggerEvents,
1731
- updatePopover: updatePopover,
1732
- triggerPopover: triggerPopover,
1733
- resolvePopElements: resolvePopElements,
1734
- isElementFullScreen: isElementFullScreen,
1735
- resolveTargetElement: resolveTargetElement,
1736
- createPopInstance: createPopInstance,
1737
- updateFullscreenTarget: updateFullscreenTarget,
1738
- getFullscreenRoot: getFullscreenRoot,
1739
- stopHide: stopHide,
1740
- localIsShow: localIsShow,
1741
- cleanup: cleanup
1742
- };
1743
- });
1744
- // EXTERNAL MODULE: ../../node_modules/uuid/index.js
1745
- var uuid = __webpack_require__(8022);
1746
- ;// CONCATENATED MODULE: ../../packages/popover/src/utils.ts
1747
- /*
1748
- * Tencent is pleased to support the open source community by making
1749
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1750
- *
1751
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1752
- *
1753
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1754
- *
1755
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1756
- *
1757
- * ---------------------------------------------------
1758
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1759
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1760
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1761
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1762
- *
1763
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1764
- * the Software.
1765
- *
1766
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1767
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1768
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1769
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1770
- * IN THE SOFTWARE.
1771
- */
1772
-
1773
- var CachedConst = {};
1774
- var isAvailableId = function isAvailableId(query) {
1775
- var container = document.querySelector(query);
1776
- return container instanceof HTMLElement;
1777
- };
1778
- var getFullscreenUid = function getFullscreenUid() {
1779
- if (!CachedConst.fullscreenReferId) {
1780
- CachedConst.fullscreenReferId = "id_".concat((0,uuid.v4)());
1781
- }
1782
-
1783
- return CachedConst.fullscreenReferId;
1784
- };
1785
- ;// CONCATENATED MODULE: ../../packages/popover/src/use-popper-id.ts
1786
- /*
1787
- * Tencent is pleased to support the open source community by making
1788
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1789
- *
1790
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1791
- *
1792
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1793
- *
1794
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1795
- *
1796
- * ---------------------------------------------------
1797
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1798
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1799
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1800
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1801
- *
1802
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1803
- * the Software.
1804
- *
1805
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1806
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1807
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1808
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1809
- * IN THE SOFTWARE.
1810
- */
1811
-
1812
-
1813
- var popContainerId = null;
1814
- var parentNodeReferId = null;
1815
- /* harmony default export */ const use_popper_id = (function (props) {
1816
- var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '#';
1817
-
1818
- var getPrefixId = function getPrefixId(root) {
1819
- var resolvedBoundary = null;
1820
-
1821
- var resolveBoundary = function resolveBoundary(fn) {
1822
- if (resolvedBoundary === null) {
1823
- fn();
1824
- }
1825
- };
1826
-
1827
- var resolveParentBoundary = function resolveParentBoundary() {
1828
- if (/^parent$/i.test(props.boundary)) {
1829
- resolvedBoundary = "".concat(prefix).concat(popContainerId);
1830
-
1831
- var _ref = root || {},
1832
- parentNode = _ref.parentNode;
1833
-
1834
- if (parentNode === null || parentNode === void 0 ? void 0 : parentNode.parentNode) {
1835
- parentNode.parentNode.setAttribute('data-pnode-id', parentNodeReferId);
1836
- resolvedBoundary = "[data-pnode-id=".concat(parentNodeReferId, "]");
1837
- }
1838
- }
1839
- };
1840
-
1841
- var resolveCommonBoundary = function resolveCommonBoundary() {
1842
- if (!/^body$/i.test(props.boundary) && typeof props.boundary === 'string') {
1843
- if (!isAvailableId(props.boundary)) {
1844
- console.error('props.boundary is not available selector');
1845
- resolvedBoundary = 'body';
1846
- return;
1847
- }
1848
-
1849
- resolvedBoundary = props.boundary;
1850
- }
1851
- };
1852
-
1853
- resolveBoundary(resolveParentBoundary);
1854
- resolveBoundary(resolveCommonBoundary);
1855
- resolveBoundary(function () {
1856
- resolvedBoundary = typeof props.boundary === 'string' ? props.boundary : "".concat(prefix).concat(popContainerId);
1857
- });
1858
- return resolvedBoundary;
1859
- };
1860
-
1861
- if (popContainerId === null || !isAvailableId("#".concat(popContainerId))) {
1862
- popContainerId = "id_".concat((0,uuid.v4)());
1863
- var popContainer = document.createElement('div');
1864
- popContainer.setAttribute('id', popContainerId);
1865
- popContainer.setAttribute('data-popper-id', popContainerId);
1866
- document.body.append(popContainer);
1867
- }
1868
-
1869
- if (parentNodeReferId === null) {
1870
- parentNodeReferId = "id_".concat((0,uuid.v4)());
1871
- }
1872
-
1873
- return {
1874
- popContainerId: popContainerId,
1875
- prefixId: getPrefixId(),
1876
- getPrefixId: getPrefixId
1877
- };
1878
- });
1879
- ;// CONCATENATED MODULE: ../../packages/popover/src/use-popover-init.ts
1880
-
1881
-
1882
- /*
1883
- * Tencent is pleased to support the open source community by making
1884
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1885
- *
1886
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1887
- *
1888
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1889
- *
1890
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1891
- *
1892
- * ---------------------------------------------------
1893
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1894
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1895
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1896
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1897
- *
1898
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1899
- * the Software.
1900
- *
1901
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1902
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1903
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1904
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1905
- * IN THE SOFTWARE.
1906
- */
1907
-
1908
-
1909
-
1910
-
1911
-
1912
- /* harmony default export */ const use_popover_init = (function (props, ctx, _ref) {
1913
- var refReference = _ref.refReference,
1914
- refContent = _ref.refContent,
1915
- refArrow = _ref.refArrow,
1916
- refRoot = _ref.refRoot;
1917
- var storeEvents = null;
1918
- var isFullscreen = (0,external_vue_.ref)(false);
1919
- var fullscreenReferId = getFullscreenUid();
1920
- var fullScreenTarget = (0,external_vue_.ref)();
1921
-
1922
- var _useFloating = use_floating(props, ctx, {
1923
- refReference: refReference,
1924
- refContent: refContent,
1925
- refArrow: refArrow,
1926
- refRoot: refRoot
1927
- }),
1928
- localIsShow = _useFloating.localIsShow,
1929
- showPopover = _useFloating.showPopover,
1930
- hidePopover = _useFloating.hidePopover,
1931
- updatePopover = _useFloating.updatePopover,
1932
- resolveTriggerEvents = _useFloating.resolveTriggerEvents,
1933
- resolvePopElements = _useFloating.resolvePopElements,
1934
- isElementFullScreen = _useFloating.isElementFullScreen,
1935
- updateFullscreenTarget = _useFloating.updateFullscreenTarget,
1936
- createPopInstance = _useFloating.createPopInstance,
1937
- getFullscreenRoot = _useFloating.getFullscreenRoot,
1938
- stopHide = _useFloating.stopHide;
1939
-
1940
- var showFn = function showFn() {
1941
- showPopover();
1942
- };
1943
-
1944
- var hideFn = function hideFn() {
1945
- hidePopover();
1946
- };
1947
-
1948
- var initPopInstance = function initPopInstance() {
1949
- createPopInstance();
1950
-
1951
- if (props.always) {
1952
- showPopover();
1953
- } else {
1954
- addEventToPopTargetEl();
1955
- }
1956
- };
1957
-
1958
- var addEventToPopTargetEl = function addEventToPopTargetEl() {
1959
- var _resolvePopElements = resolvePopElements(),
1960
- elReference = _resolvePopElements.elReference,
1961
- elContent = _resolvePopElements.elContent;
1962
-
1963
- storeEvents = resolveTriggerEvents();
1964
-
1965
- if (Array.isArray(storeEvents)) {
1966
- addEventToTargetEl(elReference, storeEvents);
1967
- } else {
1968
- var _storeEvents = storeEvents,
1969
- content = _storeEvents.content,
1970
- reference = _storeEvents.reference;
1971
- addEventToTargetEl(elReference, reference);
1972
- addEventToTargetEl(elContent, content);
1973
- }
1974
- };
1975
-
1976
- var addEventToTargetEl = function addEventToTargetEl(target, evets) {
1977
- evets.forEach(function (_ref2) {
1978
- var _ref3 = _slicedToArray(_ref2, 2),
1979
- event = _ref3[0],
1980
- listener = _ref3[1];
1981
-
1982
- if (event && typeof listener === 'function') {
1983
- target.addEventListener(event, listener);
1984
- }
1985
- });
1986
- };
1987
-
1988
- var removeEventListener = function removeEventListener() {
1989
- if (storeEvents === null || storeEvents === void 0 ? void 0 : storeEvents.length) {
1990
- var _resolvePopElements2 = resolvePopElements(),
1991
- elReference = _resolvePopElements2.elReference;
1992
-
1993
- if (elReference) {
1994
- storeEvents.forEach(function (_ref4) {
1995
- var _ref5 = _slicedToArray(_ref4, 2),
1996
- event = _ref5[0],
1997
- listener = _ref5[1];
1998
-
1999
- if (event && typeof listener === 'function') {
2000
- elReference.removeEventListener(event, listener);
2001
- }
2002
- });
2003
- }
2004
-
2005
- storeEvents = null;
2006
- }
2007
- };
2008
-
2009
- var updateBoundary = function updateBoundary() {
2010
- var _resolvePopElements3 = resolvePopElements(),
2011
- elReference = _resolvePopElements3.elReference,
2012
- root = _resolvePopElements3.root;
2013
-
2014
- if (isFullscreen.value) {
2015
- boundary.value = fullScreenTarget === null || fullScreenTarget === void 0 ? void 0 : fullScreenTarget.value;
2016
- return;
2017
- }
2018
-
2019
- boundary.value = getPrefixId(root || elReference);
2020
- };
2021
-
2022
- var _usePopperId = use_popper_id(props, '#'),
2023
- getPrefixId = _usePopperId.getPrefixId;
2024
-
2025
- var setFullscreenTag = function setFullscreenTag() {
2026
- var _a;
2027
-
2028
- (_a = fullScreenTarget === null || fullScreenTarget === void 0 ? void 0 : fullScreenTarget.value) === null || _a === void 0 ? void 0 : _a.setAttribute('data-fllsrn-id', fullscreenReferId);
2029
- };
2030
-
2031
- var clearFullscreenTag = function clearFullscreenTag() {
2032
- var _a, _b;
2033
-
2034
- var query = "[data-fllsrn-id=".concat(fullscreenReferId, "]");
2035
- ((_b = (_a = fullScreenTarget === null || fullScreenTarget === void 0 ? void 0 : fullScreenTarget.value) === null || _a === void 0 ? void 0 : _a.querySelectorAll(query)) !== null && _b !== void 0 ? _b : []).forEach(function (element) {
2036
- element === null || element === void 0 ? void 0 : element.removeAttribute('data-fllsrn-id');
2037
- });
2038
- };
2039
-
2040
- var boundary = (0,external_vue_.ref)();
2041
-
2042
- var beforeInstanceUnmount = function beforeInstanceUnmount() {
2043
- removeEventListener();
2044
- };
2045
-
2046
- var updateFullscreen = function updateFullscreen(target) {
2047
- fullScreenTarget.value = target;
2048
- updateFullscreenTarget(target);
2049
- isFullscreen.value = isElementFullScreen();
2050
- setFullscreenTag();
2051
- };
2052
-
2053
- var handleFullscreenChange = function handleFullscreenChange(e) {
2054
- if (!document.fullscreenElement) {
2055
- clearFullscreenTag();
2056
- }
2057
-
2058
- updateFullscreen(e.target);
2059
- updateBoundary();
2060
- updatePopover(null, props);
2061
- };
2062
-
2063
- var onMountedFn = function onMountedFn() {
2064
- if (props.disabled) {
2065
- return;
2066
- }
2067
-
2068
- initPopInstance();
2069
-
2070
- if (isElementFullScreen()) {
2071
- var query = "[data-fllsrn-id=".concat(fullscreenReferId, "]");
2072
- var target = getFullscreenRoot(query);
2073
- updateFullscreen(target);
2074
- }
2075
-
2076
- updateBoundary();
2077
- document.body.addEventListener('fullscreenchange', handleFullscreenChange);
2078
- };
2079
-
2080
- var onUnmountedFn = function onUnmountedFn() {
2081
- beforeInstanceUnmount();
2082
- document.body.removeEventListener('fullscreenchange', handleFullscreenChange);
2083
- };
2084
-
2085
- var handleClickOutside = function handleClickOutside(_e) {
2086
- ctx.emit(EMIT_EVENTS.CLICK_OUTSIDE, {
2087
- isShow: localIsShow.value,
2088
- event: _e
2089
- });
2090
-
2091
- if (props.disableOutsideClick || props.always || props.disabled || props.trigger === 'manual') {
2092
- return;
2093
- }
2094
-
2095
- if (localIsShow.value) {
2096
- hideFn();
2097
- }
2098
- };
2099
-
2100
- return {
2101
- onMountedFn: onMountedFn,
2102
- onUnmountedFn: onUnmountedFn,
2103
- handleClickOutside: handleClickOutside,
2104
- beforeInstanceUnmount: beforeInstanceUnmount,
2105
- updateBoundary: updateBoundary,
2106
- initPopInstance: initPopInstance,
2107
- updatePopover: updatePopover,
2108
- showPopover: showPopover,
2109
- hidePopover: hidePopover,
2110
- showFn: showFn,
2111
- hideFn: hideFn,
2112
- stopHide: stopHide,
2113
- isFullscreen: isFullscreen,
2114
- boundary: boundary,
2115
- localIsShow: localIsShow
2116
- };
2117
- });
2118
- ;// CONCATENATED MODULE: ../../packages/popover/src/popover.tsx
2119
-
2120
-
2121
- /*
2122
- * Tencent is pleased to support the open source community by making
2123
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2124
- *
2125
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2126
- *
2127
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2128
- *
2129
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2130
- *
2131
- * ---------------------------------------------------
2132
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2133
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2134
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2135
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2136
- *
2137
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2138
- * the Software.
2139
- *
2140
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2141
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2142
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2143
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2144
- * IN THE SOFTWARE.
2145
- */
2146
-
2147
-
2148
-
2149
-
2150
-
2151
-
2152
-
2153
-
2154
-
2155
-
2156
- /* harmony default export */ const popover = ((0,external_vue_.defineComponent)({
2157
- name: 'Popover',
2158
- components: {
2159
- Content: content,
2160
- Arrow: src_arrow,
2161
- Root: root
2162
- },
2163
- directives: {
2164
- clickoutside: clickoutside
2165
- },
2166
- props: PopoverProps,
2167
- emits: EMIT_EVENT_TYPES,
2168
- setup: function setup(props, ctx) {
2169
- var content = props.content,
2170
- theme = props.theme,
2171
- disableTeleport = props.disableTeleport;
2172
-
2173
- var _toRefs = (0,external_vue_.toRefs)(props),
2174
- reference = _toRefs.reference;
2175
-
2176
- var refDefaultReference = (0,external_vue_.ref)();
2177
- var refContent = (0,external_vue_.ref)();
2178
- var refArrow = (0,external_vue_.ref)();
2179
- var refRoot = (0,external_vue_.ref)();
2180
- var refReference = (0,external_vue_.computed)(function () {
2181
- return reference.value || refDefaultReference.value;
2182
- });
2183
-
2184
- var _usePopoverInit = use_popover_init(props, ctx, {
2185
- refReference: refReference,
2186
- refContent: refContent,
2187
- refArrow: refArrow,
2188
- refRoot: refRoot
2189
- }),
2190
- onMountedFn = _usePopoverInit.onMountedFn,
2191
- onUnmountedFn = _usePopoverInit.onUnmountedFn,
2192
- handleClickOutside = _usePopoverInit.handleClickOutside,
2193
- beforeInstanceUnmount = _usePopoverInit.beforeInstanceUnmount,
2194
- updateBoundary = _usePopoverInit.updateBoundary,
2195
- initPopInstance = _usePopoverInit.initPopInstance,
2196
- showFn = _usePopoverInit.showFn,
2197
- hideFn = _usePopoverInit.hideFn,
2198
- showPopover = _usePopoverInit.showPopover,
2199
- hidePopover = _usePopoverInit.hidePopover,
2200
- updatePopover = _usePopoverInit.updatePopover,
2201
- stopHide = _usePopoverInit.stopHide,
2202
- localIsShow = _usePopoverInit.localIsShow,
2203
- boundary = _usePopoverInit.boundary;
2204
-
2205
- if (!props.always && !props.disabled) {
2206
- (0,external_vue_.watch)(function () {
2207
- return props.isShow;
2208
- }, function () {
2209
- props.isShow ? showPopover() : hidePopover();
2210
- }, {
2211
- immediate: true
2212
- });
2213
- }
2214
-
2215
- (0,external_vue_.watch)(function () {
2216
- return [props.disabled];
2217
- }, function (val) {
2218
- if (val[0]) {
2219
- beforeInstanceUnmount();
2220
- } else {
2221
- initPopInstance();
2222
- }
2223
- });
2224
- updateBoundary();
2225
- (0,external_vue_.onMounted)(onMountedFn);
2226
- (0,external_vue_.onBeforeUnmount)(onUnmountedFn);
2227
- var transBoundary = (0,external_vue_.computed)(function () {
2228
- return !disableTeleport;
2229
- });
2230
-
2231
- var show = function show() {
2232
- showFn();
2233
- };
2234
-
2235
- var hide = function hide() {
2236
- hideFn();
2237
- };
2238
-
2239
- var contentIsShow = (0,external_vue_.computed)(function () {
2240
- if (props.renderType === external_shared_.RenderType.AUTO) {
2241
- return true;
2242
- }
2243
-
2244
- return localIsShow.value;
2245
- });
2246
- return {
2247
- boundary: boundary,
2248
- arrow: props.arrow,
2249
- refDefaultReference: refDefaultReference,
2250
- refContent: refContent,
2251
- refArrow: refArrow,
2252
- content: content,
2253
- theme: theme,
2254
- transBoundary: transBoundary,
2255
- handleClickOutside: handleClickOutside,
2256
- updatePopover: updatePopover,
2257
- hide: hide,
2258
- show: show,
2259
- stopHide: stopHide,
2260
- contentIsShow: contentIsShow
2261
- };
2262
- },
2263
- render: function render() {
2264
- var _this = this;
2265
-
2266
- var _a, _b, _c, _d, _e, _f;
2267
-
2268
- return (0,external_vue_.createVNode)(root, {
2269
- "ref": "refRoot"
2270
- }, {
2271
- "default": function _default() {
2272
- return [(0,external_vue_.createVNode)(reference, {
2273
- "ref": "refDefaultReference"
2274
- }, {
2275
- "default": function _default() {
2276
- return [(_c = (_b = (_a = _this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : (0,external_vue_.createVNode)("span", null, null)];
2277
- }
2278
- }), (0,external_vue_.createVNode)(external_vue_.Teleport, {
2279
- "to": _this.boundary,
2280
- "disabled": !_this.transBoundary
2281
- }, {
2282
- "default": function _default() {
2283
- return [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)(content, {
2284
- "ref": "refContent",
2285
- "data-theme": _this.theme,
2286
- "width": _this.width,
2287
- "height": _this.height,
2288
- "maxHeight": _this.maxHeight
2289
- }, {
2290
- "default": function _default() {
2291
- return [_this.contentIsShow ? (_f = (_e = (_d = _this.$slots).content) === null || _e === void 0 ? void 0 : _e.call(_d)) !== null && _f !== void 0 ? _f : _this.content : ''];
2292
- },
2293
- arrow: function arrow() {
2294
- var _a, _b;
2295
-
2296
- return _this.arrow ? (0,external_vue_.createVNode)(src_arrow, {
2297
- "ref": "refArrow"
2298
- }, {
2299
- "default": function _default() {
2300
- return [(_b = (_a = _this.$slots).arrow) === null || _b === void 0 ? void 0 : _b.call(_a)];
2301
- }
2302
- }) : '';
2303
- }
2304
- }), [[(0,external_vue_.resolveDirective)("clickoutside"), _this.handleClickOutside]])];
2305
- }
2306
- })];
2307
- }
2308
- });
2309
- }
2310
- }));
2311
- ;// CONCATENATED MODULE: ../../packages/popover/src/plugin-popover.tsx
2312
-
2313
-
2314
-
2315
- /*
2316
- * Tencent is pleased to support the open source community by making
2317
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2318
- *
2319
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2320
- *
2321
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2322
- *
2323
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2324
- *
2325
- * ---------------------------------------------------
2326
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2327
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2328
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2329
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2330
- *
2331
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2332
- * the Software.
2333
- *
2334
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2335
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2336
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2337
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2338
- * IN THE SOFTWARE.
2339
- */
2340
-
2341
-
2342
-
2343
- function createPopoverComponent(options) {
2344
- var $PopoverInstance = null;
2345
- var $PopoverInstanceVm = null;
2346
- var $PopoverInstanceEl = null;
2347
- var resolvedOptions = Object.assign(Object.assign({
2348
- boundary: 'body',
2349
- placement: 'top',
2350
- autoVisibility: false
2351
- }, options), {
2352
- trigger: 'manual'
2353
- });
2354
-
2355
- var isElement = function isElement(element) {
2356
- return element instanceof Element || element instanceof HTMLDocument;
2357
- };
2358
-
2359
- var popoverComponent = {
2360
- name: '$popover',
2361
- setup: function setup(_, _ref) {
2362
- var expose = _ref.expose;
2363
- var refProps = (0,external_vue_.ref)(resolvedOptions);
2364
- var refReference = (0,external_vue_.ref)();
2365
- var referStyle = (0,external_vue_.ref)({
2366
- position: 'absolute',
2367
- pointerEvents: 'none',
2368
- left: 0,
2369
- top: 0,
2370
- width: 'auto',
2371
- height: 'auto',
2372
- transform: ''
2373
- });
2374
-
2375
- var updateStyle = function updateStyle(target) {
2376
- if (isElement(target)) {
2377
- var _target$getBoundingCl = target.getBoundingClientRect(),
2378
- x = _target$getBoundingCl.x,
2379
- y = _target$getBoundingCl.y,
2380
- width = _target$getBoundingCl.width,
2381
- height = _target$getBoundingCl.height;
2382
-
2383
- Object.assign(referStyle.value, {
2384
- width: "".concat(width, "px"),
2385
- height: "".concat(height, "px"),
2386
- transform: "translate3d(".concat(x, "px,").concat(y, "px,0)")
2387
- });
2388
- return;
2389
- }
2390
-
2391
- var clientX = target.clientX,
2392
- clientY = target.clientY;
2393
- Object.assign(referStyle.value, {
2394
- transform: "translate3d(".concat(clientX, "px,").concat(clientY, "px,0)"),
2395
- width: '10px',
2396
- height: '10px'
2397
- });
2398
- };
2399
-
2400
- updateStyle(refProps.value.target);
2401
-
2402
- var show = function show() {
2403
- setTimeout(function () {
2404
- var _a, _b;
2405
-
2406
- (_b = (_a = refReference.value) === null || _a === void 0 ? void 0 : _a.show) === null || _b === void 0 ? void 0 : _b.call(_a);
2407
- });
2408
- };
2409
-
2410
- var hide = function hide() {
2411
- var _a, _b;
2412
-
2413
- (_b = (_a = refReference.value) === null || _a === void 0 ? void 0 : _a.hide) === null || _b === void 0 ? void 0 : _b.call(_a);
2414
- };
2415
-
2416
- var stopHide = function stopHide() {
2417
- var _a, _b;
2418
-
2419
- (_b = (_a = refReference.value) === null || _a === void 0 ? void 0 : _a.stopHide) === null || _b === void 0 ? void 0 : _b.call(_a);
2420
- };
2421
-
2422
- var attrs = (0,external_vue_.computed)(function () {
2423
- var excludeKeys = ['target'];
2424
- return Object.keys(refProps.value).filter(function (key) {
2425
- return !excludeKeys.includes(key);
2426
- }).reduce(function (out, curKey) {
2427
- return Object.assign(Object.assign({}, out), _defineProperty({}, curKey, refProps.value[curKey]));
2428
- }, {});
2429
- });
2430
-
2431
- var updateTarget = function updateTarget(target) {
2432
- var _a, _b;
2433
-
2434
- refProps.value.target = target;
2435
- updateStyle(target);
2436
- (_b = (_a = refReference.value) === null || _a === void 0 ? void 0 : _a.updatePopover) === null || _b === void 0 ? void 0 : _b.call(_a);
2437
- (0,external_vue_.nextTick)(function () {
2438
- var _a, _b;
2439
-
2440
- (_b = (_a = refReference.value) === null || _a === void 0 ? void 0 : _a.updatePopover) === null || _b === void 0 ? void 0 : _b.call(_a);
2441
- });
2442
- };
2443
-
2444
- var handleContentMouseenter = function handleContentMouseenter() {
2445
- var _a;
2446
-
2447
- (_a = resolvedOptions.onContentMouseenter) === null || _a === void 0 ? void 0 : _a.call(resolvedOptions);
2448
- };
2449
-
2450
- var handleContentMouseleave = function handleContentMouseleave() {
2451
- var _a;
2452
-
2453
- (_a = resolvedOptions.onContentMouseleave) === null || _a === void 0 ? void 0 : _a.call(resolvedOptions);
2454
- };
2455
-
2456
- expose({
2457
- show: show,
2458
- hide: hide,
2459
- updateTarget: updateTarget,
2460
- stopHide: stopHide
2461
- });
2462
- return function () {
2463
- return (0,external_vue_.createVNode)(popover, (0,external_vue_.mergeProps)(attrs.value, {
2464
- "ref": refReference,
2465
- "onContentMouseenter": handleContentMouseenter,
2466
- "onContentMouseleave": handleContentMouseleave
2467
- }), {
2468
- "default": function _default() {
2469
- return [(0,external_vue_.createVNode)("span", {
2470
- "style": referStyle.value
2471
- }, null)];
2472
- }
2473
- });
2474
- };
2475
- }
2476
- };
2477
-
2478
- function getBoundaryDom(boundary) {
2479
- if (/^body$/i.test(boundary)) {
2480
- return document.body;
2481
- }
2482
-
2483
- if (/^parent$/i.test(boundary)) {
2484
- if (isElement(resolvedOptions.target)) {
2485
- return resolvedOptions.target.parentNode;
2486
- }
2487
-
2488
- return resolvedOptions.target.target.parentNode;
2489
- }
2490
-
2491
- if (typeof boundary === 'string' && isAvailableId(boundary)) {
2492
- return document.querySelector(boundary);
2493
- }
2494
-
2495
- return document.body;
2496
- }
2497
-
2498
- if ($PopoverInstance === null) {
2499
- $PopoverInstanceEl = document.createElement('div');
2500
- getBoundaryDom(resolvedOptions.boundary).append($PopoverInstanceEl);
2501
- setTimeout(function () {
2502
- $PopoverInstance = (0,external_vue_.createApp)(popoverComponent);
2503
- $PopoverInstanceVm = $PopoverInstance.mount($PopoverInstanceEl);
2504
- });
2505
- }
2506
-
2507
- function close() {
2508
- if ($PopoverInstance) {
2509
- $PopoverInstance.unmount();
2510
- $PopoverInstanceVm = null;
2511
- $PopoverInstance = null;
2512
- $PopoverInstanceEl.remove();
2513
- }
2514
- }
2515
-
2516
- ;
2517
-
2518
- function show() {
2519
- $PopoverInstanceVm === null || $PopoverInstanceVm === void 0 ? void 0 : $PopoverInstanceVm.show();
2520
- }
2521
-
2522
- function update(e) {
2523
- $PopoverInstanceVm === null || $PopoverInstanceVm === void 0 ? void 0 : $PopoverInstanceVm.updateTarget(e);
2524
- }
2525
-
2526
- ;
2527
-
2528
- function hide() {
2529
- $PopoverInstanceVm === null || $PopoverInstanceVm === void 0 ? void 0 : $PopoverInstanceVm.hide();
2530
- }
2531
-
2532
- return {
2533
- close: close,
2534
- show: show,
2535
- hide: hide,
2536
- update: update,
2537
-
2538
- get vm() {
2539
- return $PopoverInstanceVm;
2540
- },
2541
-
2542
- get $el() {
2543
- return $PopoverInstanceVm.$el;
2544
- }
2545
-
2546
- };
2547
- }
2548
- ;// CONCATENATED MODULE: ../../packages/plugin-popover/src/index.ts
2549
- /**
2550
- * Tencent is pleased to support the open source community by making
2551
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2552
- *
2553
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2554
- *
2555
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2556
- *
2557
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2558
- *
2559
- * ---------------------------------------------------
2560
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2561
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2562
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2563
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2564
- *
2565
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2566
- * the Software.
2567
- *
2568
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2569
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2570
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2571
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2572
- * IN THE SOFTWARE.
2573
- */
2574
-
2575
- /* harmony default export */ const src = (createPopoverComponent);
2576
- })();
2577
-
2578
- /******/ return __webpack_exports__;
2579
- /******/ })()
2580
- ;
2581
- });
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("vue"),require("../shared"),require("vue-types"));else if("function"==typeof define&&define.amd)define(["vue","../shared","vue-types"],t);else{var n="object"==typeof exports?t(require("vue"),require("../shared"),require("vue-types")):t(e.vue,e["../shared"],e["vue-types"]);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,((e,t,n)=>(()=>{var o={8022:(e,t,n)=>{var o=n(4481),r=n(6426),i=r;i.v1=o,i.v4=r,e.exports=i},8725:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var o=n||0,r=t;return[r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]]].join("")}},9157:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},4481:(e,t,n)=>{var o,r,i=n(9157),l=n(8725),a=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,s=t||[],f=(e=e||{}).node||o,d=void 0!==e.clockseq?e.clockseq:r;if(null==f||null==d){var p=i();null==f&&(f=o=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=r=16383&(p[6]<<8|p[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:u+1,h=v-a+(m-u)/1e4;if(h<0&&void 0===e.clockseq&&(d=d+1&16383),(h<0||v>a)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=v,u=m,r=d;var g=(1e4*(268435455&(v+=122192928e5))+m)%4294967296;s[c++]=g>>>24&255,s[c++]=g>>>16&255,s[c++]=g>>>8&255,s[c++]=255&g;var y=v/4294967296*1e4&268435455;s[c++]=y>>>8&255,s[c++]=255&y,s[c++]=y>>>24&15|16,s[c++]=y>>>16&255,s[c++]=d>>>8|128,s[c++]=255&d;for(var w=0;w<6;++w)s[c+w]=f[w];return t||l(s)}},6426:(e,t,n)=>{var o=n(9157),r=n(8725);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var l=(e=e||{}).random||(e.rng||o)();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t)for(var a=0;a<16;++a)t[i+a]=l[a];return t||r(l)}},4212:e=>{"use strict";e.exports=t},748:t=>{"use strict";t.exports=e},210:e=>{"use strict";e.exports=n}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={exports:{}};return o[e](n,n.exports,i),n.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}i.r(l),i.d(l,{default:()=>Be});var t=i(748),n=i(4212);function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(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)?r(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,l=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw l}}}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var a,u=new Map;function c(e,t){var n=[];return Array.isArray(t.arg)?n=t.arg:function(e){return"undefined"!=typeof Element&&e instanceof Element}(t.arg)&&n.push(t.arg),function(o,r){var i=t.instance.popperRef,l=o.target,a=null==r?void 0:r.target,u=!t||!t.instance,c=!l||!a,s=e.contains(l)||e.contains(a),f=e===l,d=n.length&&n.some((function(e){return null==e?void 0:e.contains(l)}))||n.length&&n.includes(a),p=i&&(i.contains(l)||i.contains(a));u||c||s||f||d||p||t.value(o,r)}}document.addEventListener("mousedown",(function(e){return a=e})),document.addEventListener("mouseup",(function(e){var t,n=o(u.values());try{for(n.s();!(t=n.n()).done;){var r,i=o(t.value);try{for(i.s();!(r=i.n()).done;)(0,r.value.documentHandler)(e,a)}catch(e){i.e(e)}finally{i.f()}}}catch(e){n.e(e)}finally{n.f()}}));var s={beforeMount:function(e,t){u.has(e)||u.set(e,[]),u.get(e).push({documentHandler:c(e,t),bindingFn:t.value})},updated:function(e,t){u.has(e)||u.set(e,[]);var n=u.get(e),o=n.findIndex((function(e){return e.bindingFn===t.oldValue})),r={documentHandler:c(e,t),bindingFn:t.value};o>=0?n.splice(o,1,r):n.push(r)},unmounted:function(e){u.delete(e)},install:function(e){e.directive("bkTooltips",s)}};const f=s,d=(0,t.defineComponent)({name:"PopArrow",render:function(){var e=(0,n.resolveClassName)("pop2-arrow");return(0,t.createVNode)("div",{class:e},null)}});var p,v,m=function(){return!0};!function(e){e.SHOW="show",e.HIDE="hide",e.CLICK_OUTSIDE="clickoutside",e.CONTENT_MOUSEENTER="contentMouseenter",e.CONTENT_MOUSELEAVE="contentMouseleave",e.STOP_HIDE="stopHide"}(v||(v={}));var h=(e(p={},v.SHOW,m),e(p,v.HIDE,m),e(p,v.CLICK_OUTSIDE,m),e(p,v.CONTENT_MOUSEENTER,m),e(p,v.CONTENT_MOUSELEAVE,m),e(p,v.STOP_HIDE,m),p);const g=(0,t.defineComponent)({name:"PopContent",props:{width:n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.number]).def("auto"),height:n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.number]).def("auto"),maxHeight:n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.number]).def("auto")},setup:function(e){var n=function(e){return/^\d+\.?\d*$/.test("".concat(e))?"".concat(e,"px"):e};return{style:(0,t.computed)((function(){return{width:n(e.width),height:n(e.height),maxHeight:n(e.maxHeight)}}))}},render:function(){var e,o,r,i,l,a,u=[(0,n.resolveClassName)("popover"),(0,n.resolveClassName)("pop2-content")];return(0,t.createVNode)("div",{class:u,tabindex:"-1",style:this.style},[null!==(r=null===(o=(e=this.$slots).arrow)||void 0===o?void 0:o.call(e))&&void 0!==r?r:"",null!==(a=null===(l=(i=this.$slots).default)||void 0===l?void 0:l.call(i))&&void 0!==a?a:""])}});var y,w,b,T,x,R,P,E,O,A,C,S,N,L=i(210);(0,L.createTypes)({}),function(e){e.SMALL="small",e.LARGE="large",e.DEFAULT="default"}(y||(y={})),function(e){e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom"}(w||(w={})),function(e){e.IF="if",e.SHOW="show"}(b||(b={})),function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(T||(T={})),function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.DANGER="danger"}(x||(x={})),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"}(R||(R={})),function(e){e.HOVER="hover",e.CLICK="click",e.MANUAL="manual"}(P||(P={})),function(e){e.AUTO="auto",e.SHOWN="shown"}(E||(E={})),function(e){e.SHOW="show",e.OPERATION="operation",e.CONFIRM="confirm",e.PROCESS="process"}(O||(O={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(A||(A={})),function(e){e.DASHED="dashed",e.SOLID="solid"}(C||(C={})),function(e){e.SUCCESS="success",e.INFO="info",e.WARNING="warning",e.DANGER="danger"}(S||(S={})),function(e){e.SIMPLICITY="simplicity",e.NORMAL="normal"}(N||(N={}));var I={onAfterHidden:Function,onAfterShow:Function},H=Object.assign({isShow:n.PropTypes.bool.def(!1),always:n.PropTypes.bool.def(!1),disabled:n.PropTypes.bool.def(!1),width:n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.number]).def("auto"),height:n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.number]).def("auto"),maxHeight:n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.number]).def("auto"),content:n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.number]).def(""),placement:(0,n.placementType)().def(R.TOP),theme:n.PropTypes.string.def("dark"),trigger:(0,L.toType)("trigger",{}).def(P.HOVER),renderType:(0,L.toType)("trigger",{}).def(E.AUTO),arrow:n.PropTypes.bool.def(!0),padding:n.PropTypes.number.def(5),offset:n.PropTypes.oneOfType([n.PropTypes.number,n.PropTypes.shape({})]).def(6),boundary:n.PropTypes.oneOfType([n.PropTypes.string.def("parent"),n.PropTypes.instanceOf(HTMLElement)]),zIndex:n.PropTypes.number.def(void 0),disableTeleport:n.PropTypes.bool.def(!1),autoPlacement:n.PropTypes.bool.def(!1),autoVisibility:n.PropTypes.bool.def(!0),disableOutsideClick:n.PropTypes.bool.def(!1),disableTransform:n.PropTypes.bool.def(!1),reference:n.PropTypes.any.def(null),modifiers:n.PropTypes.array.def([]),popoverDelay:n.PropTypes.number.def(100)},I);const D=(0,t.defineComponent)({name:"PopReference",render:function(){var e,t,n;return null!==(n=null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e))&&void 0!==n?n:""}}),M=(0,t.defineComponent)({props:{class:n.PropTypes.string.def("")},render:function(){var e,n;return(0,t.createVNode)(t.Fragment,null,[null===(n=(e=this.$slots).default)||void 0===n?void 0:n.call(e)])}});function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(o=n.next()).done)&&(i.push(o.value),!t||i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==n.return||n.return()}finally{if(a)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return j(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)?j(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e){return e.split("-")[0]}function k(e){return e.split("-")[1]}function U(e){return["top","bottom"].includes(F(e))?"x":"y"}function _(e){return"y"===e?"height":"width"}function $(e,t,n){let{reference:o,floating:r}=e;const i=o.x+o.width/2-r.width/2,l=o.y+o.height/2-r.height/2,a=U(t),u=_(a),c=o[u]/2-r[u]/2,s="x"===a;let f;switch(F(t)){case"top":f={x:i,y:o.y-r.height};break;case"bottom":f={x:i,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:l};break;case"left":f={x:o.x-r.width,y:l};break;default:f={x:o.x,y:o.y}}switch(k(t)){case"start":f[a]-=c*(n&&s?-1:1);break;case"end":f[a]+=c*(n&&s?-1:1)}return f}function B(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function W(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function q(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:s="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=t,v=B(p),m=a[d?"floating"===f?"reference":"floating":f],h=W(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:s,strategy:u})),g=W(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===f?{...l.floating,x:o,y:r}:l.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),strategy:u}):l[f]);return{top:h.top-g.top+v.top,bottom:g.bottom-h.bottom+v.bottom,left:h.left-g.left+v.left,right:g.right-h.right+v.right}}const z=Math.min,G=Math.max;function Y(e,t,n){return G(e,z(t,n))}const K={left:"right",right:"left",bottom:"top",top:"bottom"};function X(e){return e.replace(/left|right|bottom|top/g,(e=>K[e]))}function Z(e,t,n){void 0===n&&(n=!1);const o=k(e),r=U(e),i=_(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=X(l)),{main:l,cross:X(l)}}const J={start:"end",end:"start"};function Q(e){return e.replace(/start|end/g,(e=>J[e]))}const ee=["top","right","bottom","left"],te=ee.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);function ne(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oe(e){return ee.some((t=>e[t]>=0))}const re=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=F(n),a=k(n),u="x"===U(n),c=["left","top"].includes(l)?-1:1,s=i&&u?-1:1,f="function"==typeof t?t(e):t;let{mainAxis:d,crossAxis:p,alignmentAxis:v}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof v&&(p="end"===a?-1*v:v),u?{x:p*s,y:d*c}:{x:d*c,y:p*s}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}};const ie=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=e,c={x:n,y:o},s=await q(t,u),f=U(F(r)),d=function(e){return"x"===e?"y":"x"}(f);let p=c[f],v=c[d];if(i){const e="y"===f?"bottom":"right";p=Y(p+s["y"===f?"top":"left"],p,p-s[e])}if(l){const e="y"===d?"bottom":"right";v=Y(v+s["y"===d?"top":"left"],v,v-s[e])}const m=a.fn({...t,[f]:p,[d]:v});return{...m,data:{x:m.x-n,y:m.y-o}}}}};function le(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function ae(e){if(null==e)return window;if(!le(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function ue(e){return ae(e).getComputedStyle(e)}function ce(e){return le(e)?"":e?(e.nodeName||"").toLowerCase():""}function se(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function fe(e){return e instanceof ae(e).HTMLElement}function de(e){return e instanceof ae(e).Element}function pe(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ae(e).ShadowRoot||e instanceof ShadowRoot)}function ve(e){const{overflow:t,overflowX:n,overflowY:o}=ue(e);return/auto|scroll|overlay|hidden/.test(t+o+n)}function me(e){return["table","td","th"].includes(ce(e))}function he(e){const t=/firefox/i.test(se()),n=ue(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function ge(){return!/^((?!chrome|android).)*safari/i.test(se())}const ye=Math.min,we=Math.max,be=Math.round;function Te(e,t,n){var o,r,i,l;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect();let u=1,c=1;t&&fe(e)&&(u=e.offsetWidth>0&&be(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&be(a.height)/e.offsetHeight||1);const s=de(e)?ae(e):window,f=!ge()&&n,d=(a.left+(f&&null!=(o=null==(r=s.visualViewport)?void 0:r.offsetLeft)?o:0))/u,p=(a.top+(f&&null!=(i=null==(l=s.visualViewport)?void 0:l.offsetTop)?i:0))/c,v=a.width/u,m=a.height/c;return{width:v,height:m,top:p,right:d+v,bottom:p+m,left:d,x:d,y:p}}function xe(e){return(t=e,(t instanceof ae(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Re(e){return de(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Pe(e){return Te(xe(e)).left+Re(e).scrollLeft}function Ee(e,t,n){const o=fe(t),r=xe(t),i=Te(e,o&&function(e){const t=Te(e);return be(t.width)!==e.offsetWidth||be(t.height)!==e.offsetHeight}(t),"fixed"===n);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==ce(t)||ve(r))&&(l=Re(t)),fe(t)){const e=Te(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else r&&(a.x=Pe(r));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function Oe(e){return"html"===ce(e)?e:e.assignedSlot||e.parentNode||(pe(e)?e.host:null)||xe(e)}function Ae(e){return fe(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function Ce(e){const t=ae(e);let n=Ae(e);for(;n&&me(n)&&"static"===getComputedStyle(n).position;)n=Ae(n);return n&&("html"===ce(n)||"body"===ce(n)&&"static"===getComputedStyle(n).position&&!he(n))?t:n||function(e){let t=Oe(e);for(pe(t)&&(t=t.host);fe(t)&&!["html","body"].includes(ce(t));){if(he(t))return t;t=t.parentNode}return null}(e)||t}function Se(e){if(fe(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Te(e);return{width:t.width,height:t.height}}function Ne(e){const t=Oe(e);return["html","body","#document"].includes(ce(t))?e.ownerDocument.body:fe(t)&&ve(t)?t:Ne(t)}function Le(e,t){var n;void 0===t&&(t=[]);const o=Ne(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=ae(o),l=r?[i].concat(i.visualViewport||[],ve(o)?o:[]):o,a=t.concat(l);return r?a:a.concat(Le(l))}function Ie(e,t,n){return"viewport"===t?W(function(e,t){const n=ae(e),o=xe(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,u=0;if(r){i=r.width,l=r.height;const e=ge();(e||!e&&"fixed"===t)&&(a=r.offsetLeft,u=r.offsetTop)}return{width:i,height:l,x:a,y:u}}(e,n)):de(t)?function(e,t){const n=Te(e,!1,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft;return{top:o,left:r,x:r,y:o,right:r+e.clientWidth,bottom:o+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):W(function(e){var t;const n=xe(e),o=Re(e),r=null==(t=e.ownerDocument)?void 0:t.body,i=we(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),l=we(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let a=-o.scrollLeft+Pe(e);const u=-o.scrollTop;return"rtl"===ue(r||n).direction&&(a+=we(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:l,x:a,y:u}}(xe(e)))}function He(e){const t=Le(e),n=["absolute","fixed"].includes(ue(e).position)&&fe(e)?Ce(e):e;return de(n)?t.filter((e=>de(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&pe(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==ce(e))):[]}const De={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?He(t):[].concat(n),o],l=i[0],a=i.reduce(((e,n)=>{const o=Ie(t,n,r);return e.top=we(o.top,e.top),e.right=ye(o.right,e.right),e.bottom=ye(o.bottom,e.bottom),e.left=we(o.left,e.left),e}),Ie(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=fe(n),i=xe(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==ce(n)||ve(i))&&(l=Re(n)),fe(n))){const e=Te(n,!0);a.x=e.x+n.clientLeft,a.y=e.y+n.clientTop}return{...t,x:t.x-l.scrollLeft+a.x,y:t.y-l.scrollTop+a.y}},isElement:de,getDimensions:Se,getOffsetParent:Ce,getDocumentElement:xe,getElementRects:e=>{let{reference:t,floating:n,strategy:o}=e;return{reference:Ee(t,Ce(n),o),floating:{...Se(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===ue(e).direction},Me=(e,t,n)=>(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=await(null==l.isRTL?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:c,y:s}=$(u,o,a),f=o,d={};for(let n=0;n<i.length;n++){const{name:p,fn:v}=i[n],{x:m,y:h,data:g,reset:y}=await v({x:c,y:s,initialPlacement:o,placement:f,strategy:r,middlewareData:d,rects:u,platform:l,elements:{reference:e,floating:t}});c=null!=m?m:c,s=null!=h?h:s,d={...d,[p]:{...d[p],...g}},y&&("object"==typeof y&&(y.placement&&(f=y.placement),y.rects&&(u=!0===y.rects?await l.getElementRects({reference:e,floating:t,strategy:r}):y.rects),({x:c,y:s}=$(u,f,a))),n=-1)}return{x:c,y:s,placement:f,strategy:r,middlewareData:d}})(e,t,{platform:De,...n}),je=function(o,r,i){var l=i.refReference,a=i.refContent,u=i.refArrow,c=i.refRoot,s=(0,t.ref)(!1),f=(0,t.ref)(),d=function(){var e,t,n,o=T(null===(e=l.value)||void 0===e?void 0:e.$el);return(null===(t=document.fullscreenElement)||void 0===t?void 0:t.shadowRoot)?document.fullscreenElement.shadowRoot.contains(o):null===(n=document.fullscreenElement)||void 0===n?void 0:n.contains(o)},p=["dark","light"],m=(0,t.computed)((function(){var e,t,n=null!==(t=null===(e=o.theme)||void 0===e?void 0:e.split(/\s+/))&&void 0!==t?t:[];return n.sort((function(e,t){return Number(p.includes(t))-Number(p.includes(e))})),{systemThemes:n,customThemes:n.filter((function(e){return!p.includes(e)}))}})),h=function(){return o.autoVisibility},g=function(){return o.autoPlacement},y=function(){var e,t,n,r;return{elReference:T(null===(e=l.value)||void 0===e?void 0:e.$el),elContent:T(null===(t=a.value)||void 0===t?void 0:t.$el),elArrow:o.arrow?T(null===(n=u.value)||void 0===n?void 0:n.$el):null,root:T(null===(r=c.value)||void 0===r?void 0:r.$el)}},w=function(){var e={};return Array.isArray(o.modifiers)&&o.modifiers.forEach((function(t){var n,o,r,i,l;if("offset"===t.name){if("number"==typeof(null===(n=t.options)||void 0===n?void 0:n.offset)&&(l=null===(o=t.options)||void 0===o?void 0:o.offset),Array.isArray(null===(r=t.options)||void 0===r?void 0:r.offset)){var a=V(null===(i=t.options)||void 0===i?void 0:i.offset,2);l={mainAxis:a[0],crossAxis:a[1]}}Object.assign(e,{offset:l})}})),e},b=function(e,t){var n,o,r=w(),i=[re(r.offset||t.offset),ie({padding:t.padding})],l={placement:t.placement,middleware:i};if(t.arrow&&i.push((e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:o=0}=null!=e?e:{},{x:r,y:i,placement:l,rects:a,platform:u}=t;if(null==n)return{};const c=B(o),s={x:r,y:i},f=U(l),d=k(l),p=_(f),v=await u.getDimensions(n),m="y"===f?"top":"left",h="y"===f?"bottom":"right",g=a.reference[p]+a.reference[f]-s[f]-a.floating[p],y=s[f]-a.reference[f],w=await(null==u.getOffsetParent?void 0:u.getOffsetParent(n));let b=w?"y"===f?w.clientHeight||0:w.clientWidth||0:0;0===b&&(b=a.floating[p]);const T=g/2-y/2,x=c[m],R=b-v[p]-c[h],P=b/2-v[p]/2+T,E=Y(x,P,R),O=("start"===d?c[m]:c[h])>0&&P!==E&&a.reference[p]<=a.floating[p];return{[f]:s[f]-(O?P<x?x-P:R-P:0),data:{[f]:E,centerOffset:P-E}}}}))({element:e})),g()?i.push(function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,r,i,l;const{x:a,y:u,rects:c,middlewareData:s,placement:f,platform:d,elements:p}=t,{alignment:v=null,allowedPlacements:m=te,autoAlignment:h=!0,...g}=e,y=function(e,t,n){return(e?[...n.filter((t=>k(t)===e)),...n.filter((t=>k(t)!==e))]:n.filter((e=>F(e)===e))).filter((n=>!e||k(n)===e||!!t&&Q(n)!==n))}(v,h,m),w=await q(t,g),b=null!=(n=null==(o=s.autoPlacement)?void 0:o.index)?n:0,T=y[b];if(null==T)return{};const{main:x,cross:R}=Z(T,c,await(null==d.isRTL?void 0:d.isRTL(p.floating)));if(f!==T)return{x:a,y:u,reset:{placement:y[0]}};const P=[w[F(T)],w[x],w[R]],E=[...null!=(r=null==(i=s.autoPlacement)?void 0:i.overflows)?r:[],{placement:T,overflows:P}],O=y[b+1];if(O)return{data:{index:b+1,overflows:E},reset:{placement:O}};const A=E.slice().sort(((e,t)=>e.overflows[0]-t.overflows[0])),C=null==(l=A.find((e=>{let{overflows:t}=e;return t.every((e=>e<=0))})))?void 0:l.placement,S=null!=C?C:A[0].placement;return S!==f?{data:{index:b+1,overflows:E},reset:{placement:S}}:{}}}}()):(i.unshift(function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){var n;const{placement:o,elements:r,rects:i,platform:l,strategy:a}=t,{padding:u=2,x:c,y:s}=e,f=W(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({rect:i.reference,offsetParent:await(null==l.getOffsetParent?void 0:l.getOffsetParent(r.floating)),strategy:a}):i.reference),d=null!=(n=await(null==l.getClientRects?void 0:l.getClientRects(r.reference)))?n:[],p=B(u),v=await l.getElementRects({reference:{getBoundingClientRect:function(){var e;if(2===d.length&&d[0].left>d[1].right&&null!=c&&null!=s)return null!=(e=d.find((e=>c>e.left-p.left&&c<e.right+p.right&&s>e.top-p.top&&s<e.bottom+p.bottom)))?e:f;if(d.length>=2){if("x"===U(o)){const e=d[0],t=d[d.length-1],n="top"===F(o),r=e.top,i=t.bottom,l=n?e.left:t.left,a=n?e.right:t.right;return{top:r,bottom:i,left:l,right:a,width:a-l,height:i-r,x:l,y:r}}const e="left"===F(o),t=G(...d.map((e=>e.right))),n=z(...d.map((e=>e.left))),r=d.filter((o=>e?o.left===n:o.right===t)),i=r[0].top,l=r[r.length-1].bottom;return{top:i,bottom:l,left:n,right:t,width:t-n,height:l-i,x:n,y:i}}return f}},floating:r.floating,strategy:a});return i.reference.x!==v.reference.x||i.reference.y!==v.reference.y||i.reference.width!==v.reference.width||i.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}}()),i.push(function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:o,middlewareData:r,rects:i,initialPlacement:l,platform:a,elements:u}=t,{mainAxis:c=!0,crossAxis:s=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",flipAlignment:p=!0,...v}=e,m=F(o),h=f||(m!==l&&p?function(e){const t=X(e);return[Q(e),t,Q(t)]}(l):[X(l)]),g=[l,...h],y=await q(t,v),w=[];let b=(null==(n=r.flip)?void 0:n.overflows)||[];if(c&&w.push(y[m]),s){const{main:e,cross:t}=Z(o,i,await(null==a.isRTL?void 0:a.isRTL(u.floating)));w.push(y[e],y[t])}if(b=[...b,{placement:o,overflows:w}],!w.every((e=>e<=0))){var T,x;const e=(null!=(T=null==(x=r.flip)?void 0:x.index)?T:0)+1,t=g[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(d){case"bestFit":{var R;const e=null==(R=b.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:R[0].placement;e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}}())),h()&&l.middleware.push(function(e){let{strategy:t="referenceHidden",...n}={};return{name:"hide",async fn(e){const{rects:o}=e;switch(t){case"referenceHidden":{const t=ne(await q(e,{...n,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:oe(t)}}}case"escaped":{const t=ne(await q(e,{...n,altBoundary:!0}),o.floating);return{data:{escapedOffsets:t,escaped:oe(t)}}}default:return{}}}}}()),d()||t.isVirtualEl){var a=(o=f.value,{getElementRects:function(e){var t=e.reference,n=e.floating,o=t.getBoundingClientRect(),r=n.getBoundingClientRect();return{reference:{width:o.width,height:o.height,x:o.x,y:o.y},floating:{width:r.width,height:r.height,x:r.x,y:r.y}}},getDimensions:function(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height}},getClippingRect:function(e){var t;!function(e){if(null==e)throw new TypeError("Cannot destructure undefined")}(e);var n=null!==(t=null==o?void 0:o.getBoundingClientRect())&&void 0!==t?t:{},r=n.width,i=void 0===r?0:r,l=n.height;return{width:i,height:void 0===l?0:l,x:0,y:0}}}),u=a.getElementRects,c=a.getDimensions,s=a.getClippingRect;Object.assign(l,{platform:Object.assign(Object.assign({},null!==(n=null==t?void 0:t.platform)&&void 0!==n?n:{}),{getElementRects:u,getDimensions:c,getClippingRect:s})})}return l},T=function e(t){return t instanceof HTMLElement?t:t instanceof Text?e(t.nextElementSibling):"function"==typeof(null==t?void 0:t.getBoundingClientRect)?t:null},x=m.value.customThemes.join(" "),R=m.value.customThemes.reduce((function(t,n){return Object.assign(e({},"data-".concat(n,"-theme"),!0),t)}),{}),P="".concat(x),E=null,O=function(e){var t=window.devicePixelRatio||1;return Math.round(e*t)/t||0},A=function(e,t,n,r){var i;o.disableTransform?Object.assign(e.style,{left:"".concat(O(t),"px"),top:"".concat(O(n),"px")}):Object.assign(e.style,{left:"0",top:"0",transform:"translate3d(".concat(O(t),"px,").concat(O(n),"px,0)")});var l=!!h()&&(null===(i=r.hide)||void 0===i?void 0:i.referenceHidden);Object.assign(e.style,{visibility:l?"hidden":"visible"})},C=function(t,n,r){var i;if(o.arrow){var l=null!==(i=r.arrow)&&void 0!==i?i:{},a=l.x,u=l.y;t.setAttribute("data-arrow",n),Object.assign(t.style,{left:"",top:"",bottom:"",right:""});var c={top:"bottom",right:"left",bottom:"top",left:"right"}[n];Object.assign(t.style,e({left:null!==a?"".concat(a,"px"):"",top:null!==u?"".concat(u,"px"):""},c,"-4px"))}},S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=y(),o=n.elReference,r=n.elContent,i=n.elArrow,l=e||o;if(l&&r){var a=b(i,t);Me(l,r,a).then((function(e){var t=e.x,n=e.y,o=e.placement,l=e.middlewareData,a=r.className;r.className="".concat(a.replace(P,"")," ").concat(P).replace(/\s+/gm," ").replace(/^\s+|\s+$/g,""),Object.keys(R).forEach((function(e){r.setAttribute(e,R[e])}));var u=o.split("-")[0],c=u;["left","right","top","bottom"].includes(u)||(c="top"),A(r,t,n,l),C(i,c,l)}))}},N=void 0,L=!1,I=function(){setTimeout((function(){!o.disabled&&(s.value=!0)}),o.popoverDelay)},H=function(){N=setTimeout((function(){s.value=!1}),o.popoverDelay)},D=function(){s.value?H():I()},M=function(){D()},j=function(){"hover"===o.trigger&&(N&&(L=!0,clearTimeout(N),N=void 0),K())},$=function(){L&&(H(),L=!1,J())},K=function(){r.emit(v.CONTENT_MOUSEENTER)},J=function(){r.emit(v.CONTENT_MOUSELEAVE)};return(0,t.watch)(s,(function(e){var t,i;e?((i=T(null===(t=a.value)||void 0===t?void 0:t.$el)).style.setProperty("display","block"),i.style.setProperty("z-index","".concat(o.zIndex?o.zIndex:n.bkZIndexManager.getPopperIndex())),S(),r.emit("afterShow",{isShow:!0})):function(){var e;T(null===(e=a.value)||void 0===e?void 0:e.$el).style.setProperty("display","none"),r.emit("afterHidden",{isShow:!1})}()})),{showPopover:I,hidePopover:H,resolveTriggerEvents:function(){var e;return null!==(e={hover:{content:[["mouseenter",j],["mouseleave",$]],reference:[["mouseenter",I],["mouseleave",H],["focus",I],["blur",H]]},click:[["click",M]],manual:{content:[["mouseenter",K],["mouseleave",J]],reference:[[]]}}[o.trigger])&&void 0!==e?e:[]},updatePopover:S,triggerPopover:D,resolvePopElements:y,isElementFullScreen:d,resolveTargetElement:T,createPopInstance:function(){var e=y(),t=e.elReference,n=e.elContent;E=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l=!0,animationFrame:a=!1}=o,u=r&&!a,c=i&&!a,s=u||c?[...de(e)?Le(e):[],...Le(t)]:[];s.forEach((e=>{u&&e.addEventListener("scroll",n,{passive:!0}),c&&e.addEventListener("resize",n)}));let f,d=null;l&&(d=new ResizeObserver(n),de(e)&&!a&&d.observe(e),d.observe(t));let p=a?Te(e):null;return a&&function t(){const o=Te(e);!p||o.x===p.x&&o.y===p.y&&o.width===p.width&&o.height===p.height||n(),p=o,f=requestAnimationFrame(t)}(),l||n(),()=>{var e;s.forEach((e=>{u&&e.removeEventListener("scroll",n),c&&e.removeEventListener("resize",n)})),null==(e=d)||e.disconnect(),d=null,a&&cancelAnimationFrame(f)}}(t,n,(function(){S(null,o)}))},updateFullscreenTarget:function(e){f.value=e},getFullscreenRoot:function(e){return d()?document.fullscreenElement.shadowRoot?document.fullscreenElement.shadowRoot.querySelector(e):document.fullscreenElement.querySelector(e):document.body},stopHide:function(){N&&(L=!0,clearTimeout(N),N=void 0)},localIsShow:s,cleanup:E}};var Ve=i(8022),Fe={},ke=function(e){return document.querySelector(e)instanceof HTMLElement},Ue=null,_e=null;const $e=(0,t.defineComponent)({name:"Popover",components:{Content:g,Arrow:d,Root:M},directives:{clickoutside:f},props:H,emits:h,setup:function(e,o){var r=e.content,i=e.theme,l=e.disableTeleport,a=(0,t.toRefs)(e).reference,u=(0,t.ref)(),c=(0,t.ref)(),s=(0,t.ref)(),f=(0,t.ref)(),d=(0,t.computed)((function(){return a.value||u.value})),p=function(e,n,o){var r=o.refReference,i=o.refContent,l=o.refArrow,a=o.refRoot,u=null,c=(0,t.ref)(!1),s=(Fe.fullscreenReferId||(Fe.fullscreenReferId="id_".concat((0,Ve.v4)())),Fe.fullscreenReferId),f=(0,t.ref)(),d=je(e,n,{refReference:r,refContent:i,refArrow:l,refRoot:a}),p=d.localIsShow,m=d.showPopover,h=d.hidePopover,g=d.updatePopover,y=d.resolveTriggerEvents,w=d.resolvePopElements,b=d.isElementFullScreen,T=d.updateFullscreenTarget,x=d.createPopInstance,R=d.getFullscreenRoot,P=d.stopHide,E=function(){h()},O=function(){x(),e.always?m():A()},A=function(){var e=w(),t=e.elReference,n=e.elContent;if(u=y(),Array.isArray(u))C(t,u);else{var o=u,r=o.content,i=o.reference;C(t,i),C(n,r)}},C=function(e,t){t.forEach((function(t){var n=V(t,2),o=n[0],r=n[1];o&&"function"==typeof r&&e.addEventListener(o,r)}))},S=function(){var e=w(),t=e.elReference,n=e.root;c.value?I.value=null==f?void 0:f.value:I.value=L(n||t)},N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#",n=function(n){var o=null,r=function(e){null===o&&e()};return r((function(){if(/^parent$/i.test(e.boundary)){o="".concat(t).concat(Ue);var r=(n||{}).parentNode;(null==r?void 0:r.parentNode)&&(r.parentNode.setAttribute("data-pnode-id",_e),o="[data-pnode-id=".concat(_e,"]"))}})),r((function(){if(!/^body$/i.test(e.boundary)&&"string"==typeof e.boundary){if(!ke(e.boundary))return console.error("props.boundary is not available selector"),void(o="body");o=e.boundary}})),r((function(){o="string"==typeof e.boundary?e.boundary:"".concat(t).concat(Ue)})),o};if(null===Ue||!ke("#".concat(Ue))){Ue="id_".concat((0,Ve.v4)());var o=document.createElement("div");o.setAttribute("id",Ue),o.setAttribute("data-popper-id",Ue),document.body.append(o)}return null===_e&&(_e="id_".concat((0,Ve.v4)())),{popContainerId:Ue,prefixId:n(),getPrefixId:n}}(e,"#"),L=N.getPrefixId,I=(0,t.ref)(),H=function(){!function(){if(null==u?void 0:u.length){var e=w().elReference;e&&u.forEach((function(t){var n=V(t,2),o=n[0],r=n[1];o&&"function"==typeof r&&e.removeEventListener(o,r)})),u=null}}()},D=function(e){var t;f.value=e,T(e),c.value=b(),null===(t=null==f?void 0:f.value)||void 0===t||t.setAttribute("data-fllsrn-id",s)},M=function(t){var n,o,r;document.fullscreenElement||(r="[data-fllsrn-id=".concat(s,"]"),(null!==(o=null===(n=null==f?void 0:f.value)||void 0===n?void 0:n.querySelectorAll(r))&&void 0!==o?o:[]).forEach((function(e){null==e||e.removeAttribute("data-fllsrn-id")}))),D(t.target),S(),g(null,e)};return{onMountedFn:function(){if(!e.disabled){if(O(),b()){var t="[data-fllsrn-id=".concat(s,"]"),n=R(t);D(n)}S(),document.body.addEventListener("fullscreenchange",M)}},onUnmountedFn:function(){H(),document.body.removeEventListener("fullscreenchange",M)},handleClickOutside:function(t){n.emit(v.CLICK_OUTSIDE,{isShow:p.value,event:t}),e.disableOutsideClick||e.always||e.disabled||"manual"===e.trigger||p.value&&E()},beforeInstanceUnmount:H,updateBoundary:S,initPopInstance:O,updatePopover:g,showPopover:m,hidePopover:h,showFn:function(){m()},hideFn:E,stopHide:P,isFullscreen:c,boundary:I,localIsShow:p}}(e,o,{refReference:d,refContent:c,refArrow:s,refRoot:f}),m=p.onMountedFn,h=p.onUnmountedFn,g=p.handleClickOutside,y=p.beforeInstanceUnmount,w=p.updateBoundary,b=p.initPopInstance,T=p.showFn,x=p.hideFn,R=p.showPopover,P=p.hidePopover,E=p.updatePopover,O=p.stopHide,A=p.localIsShow,C=p.boundary;e.always||e.disabled||(0,t.watch)((function(){return e.isShow}),(function(){e.isShow?R():P()}),{immediate:!0}),(0,t.watch)((function(){return[e.disabled]}),(function(e){e[0]?y():b()})),w(),(0,t.onMounted)(m),(0,t.onBeforeUnmount)(h);var S=(0,t.computed)((function(){return!l})),N=(0,t.computed)((function(){return e.renderType===n.RenderType.AUTO||A.value}));return{boundary:C,arrow:e.arrow,refDefaultReference:u,refContent:c,refArrow:s,content:r,theme:i,transBoundary:S,handleClickOutside:g,updatePopover:E,hide:function(){x()},show:function(){T()},stopHide:O,contentIsShow:N}},render:function(){var e,n,o,r,i,l,a=this;return(0,t.createVNode)(M,{ref:"refRoot"},{default:function(){return[(0,t.createVNode)(D,{ref:"refDefaultReference"},{default:function(){return[null!==(o=null===(n=(e=a.$slots).default)||void 0===n?void 0:n.call(e))&&void 0!==o?o:(0,t.createVNode)("span",null,null)]}}),(0,t.createVNode)(t.Teleport,{to:a.boundary,disabled:!a.transBoundary},{default:function(){return[(0,t.withDirectives)((0,t.createVNode)(g,{ref:"refContent","data-theme":a.theme,width:a.width,height:a.height,maxHeight:a.maxHeight},{default:function(){return[a.contentIsShow?null!==(l=null===(i=(r=a.$slots).content)||void 0===i?void 0:i.call(r))&&void 0!==l?l:a.content:""]},arrow:function(){var e,n;return a.arrow?(0,t.createVNode)(d,{ref:"refArrow"},{default:function(){return[null===(n=(e=a.$slots).arrow)||void 0===n?void 0:n.call(e)]}}):""}}),[[(0,t.resolveDirective)("clickoutside"),a.handleClickOutside]])]}})]}})}}),Be=function(n){var o,r=null,i=null,l=null,a=Object.assign(Object.assign({boundary:"body",placement:"top",autoVisibility:!1},n),{trigger:"manual"}),u=function(e){return e instanceof Element||e instanceof HTMLDocument},c={name:"$popover",setup:function(n,o){var r=o.expose,i=(0,t.ref)(a),l=(0,t.ref)(),c=(0,t.ref)({position:"absolute",pointerEvents:"none",left:0,top:0,width:"auto",height:"auto",transform:""}),s=function(e){if(u(e)){var t=e.getBoundingClientRect(),n=t.x,o=t.y,r=t.width,i=t.height;Object.assign(c.value,{width:"".concat(r,"px"),height:"".concat(i,"px"),transform:"translate3d(".concat(n,"px,").concat(o,"px,0)")})}else{var l=e.clientX,a=e.clientY;Object.assign(c.value,{transform:"translate3d(".concat(l,"px,").concat(a,"px,0)"),width:"10px",height:"10px"})}};s(i.value.target);var f=(0,t.computed)((function(){var t=["target"];return Object.keys(i.value).filter((function(e){return!t.includes(e)})).reduce((function(t,n){return Object.assign(Object.assign({},t),e({},n,i.value[n]))}),{})})),d=function(){var e;null===(e=a.onContentMouseenter)||void 0===e||e.call(a)},p=function(){var e;null===(e=a.onContentMouseleave)||void 0===e||e.call(a)};return r({show:function(){setTimeout((function(){var e,t;null===(t=null===(e=l.value)||void 0===e?void 0:e.show)||void 0===t||t.call(e)}))},hide:function(){var e,t;null===(t=null===(e=l.value)||void 0===e?void 0:e.hide)||void 0===t||t.call(e)},updateTarget:function(e){var n,o;i.value.target=e,s(e),null===(o=null===(n=l.value)||void 0===n?void 0:n.updatePopover)||void 0===o||o.call(n),(0,t.nextTick)((function(){var e,t;null===(t=null===(e=l.value)||void 0===e?void 0:e.updatePopover)||void 0===t||t.call(e)}))},stopHide:function(){var e,t;null===(t=null===(e=l.value)||void 0===e?void 0:e.stopHide)||void 0===t||t.call(e)}}),function(){return(0,t.createVNode)($e,(0,t.mergeProps)(f.value,{ref:l,onContentMouseenter:d,onContentMouseleave:p}),{default:function(){return[(0,t.createVNode)("span",{style:c.value},null)]}})}}};return null===r&&(l=document.createElement("div"),(o=a.boundary,/^body$/i.test(o)?document.body:/^parent$/i.test(o)?u(a.target)?a.target.parentNode:a.target.target.parentNode:"string"==typeof o&&ke(o)?document.querySelector(o):document.body).append(l),setTimeout((function(){r=(0,t.createApp)(c),i=r.mount(l)}))),{close:function(){r&&(r.unmount(),i=null,r=null,l.remove())},show:function(){null==i||i.show()},hide:function(){null==i||i.hide()},update:function(e){null==i||i.updateTarget(e)},get vm(){return i},get $el(){return i.$el}}}})(),l})()));