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