bkui-vue 0.0.2-beta.75 → 0.0.2-beta.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/lib/affix/index.js +1 -319
  2. package/lib/alert/index.js +1 -215
  3. package/lib/animate-number/index.js +1 -155
  4. package/lib/backtop/index.js +1 -188
  5. package/lib/badge/index.js +1 -236
  6. package/lib/breadcrumb/index.js +1 -309
  7. package/lib/button/index.js +1 -321
  8. package/lib/card/index.js +1 -274
  9. package/lib/cascader/index.js +2 -2019
  10. package/lib/cascader/index.js.LICENSE.txt +1 -0
  11. package/lib/checkbox/index.js +1 -542
  12. package/lib/code-diff/index.js +1 -5501
  13. package/lib/collapse/index.js +1 -518
  14. package/lib/collapse-transition/index.js +1 -178
  15. package/lib/color-picker/index.js +1 -2662
  16. package/lib/components.js +1 -530
  17. package/lib/config-provider/index.js +1 -317
  18. package/lib/container/index.js +1 -343
  19. package/lib/date-picker/index.js +1 -5481
  20. package/lib/dialog/index.js +2 -1266
  21. package/lib/dialog/index.js.LICENSE.txt +1 -0
  22. package/lib/directives/index.js +2 -1335
  23. package/lib/directives/index.js.LICENSE.txt +14 -0
  24. package/lib/dist.index.js +1 -87
  25. package/lib/divider/index.js +1 -169
  26. package/lib/dropdown/index.js +1 -369
  27. package/lib/exception/index.js +1 -385
  28. package/lib/fixed-navbar/index.js +1 -154
  29. package/lib/form/index.js +1 -918
  30. package/lib/hooks.js +1 -73
  31. package/lib/icon/angle-double-down-line.js +1 -481
  32. package/lib/icon/angle-double-left-line.js +1 -481
  33. package/lib/icon/angle-double-left.js +1 -481
  34. package/lib/icon/angle-double-right-line.js +1 -481
  35. package/lib/icon/angle-double-right.js +1 -481
  36. package/lib/icon/angle-double-up-line.js +1 -481
  37. package/lib/icon/angle-down-fill.js +1 -481
  38. package/lib/icon/angle-down-line.js +1 -481
  39. package/lib/icon/angle-down.js +1 -481
  40. package/lib/icon/angle-left.js +1 -481
  41. package/lib/icon/angle-right.js +1 -481
  42. package/lib/icon/angle-up-fill.js +1 -481
  43. package/lib/icon/angle-up.js +1 -481
  44. package/lib/icon/archive-fill.js +1 -481
  45. package/lib/icon/arrows-left.js +1 -481
  46. package/lib/icon/arrows-right.js +1 -481
  47. package/lib/icon/assistant.js +1 -481
  48. package/lib/icon/audio-fill.js +1 -481
  49. package/lib/icon/bk.js +1 -481
  50. package/lib/icon/circle.js +1 -481
  51. package/lib/icon/close-line.js +1 -481
  52. package/lib/icon/close.js +1 -481
  53. package/lib/icon/code.js +1 -481
  54. package/lib/icon/cog-shape.js +1 -481
  55. package/lib/icon/collapse-left.js +1 -481
  56. package/lib/icon/copy-shape.js +1 -481
  57. package/lib/icon/copy.js +1 -481
  58. package/lib/icon/data-shape.js +1 -481
  59. package/lib/icon/del.js +1 -481
  60. package/lib/icon/doc-fill.js +1 -481
  61. package/lib/icon/done.js +1 -481
  62. package/lib/icon/down-shape.js +1 -481
  63. package/lib/icon/down-small.js +1 -481
  64. package/lib/icon/edit-line.js +1 -481
  65. package/lib/icon/ellipsis.js +1 -481
  66. package/lib/icon/enlarge-line.js +1 -481
  67. package/lib/icon/error.js +1 -481
  68. package/lib/icon/excel-fill.js +1 -481
  69. package/lib/icon/exclamation-circle-shape.js +1 -481
  70. package/lib/icon/eye.js +1 -481
  71. package/lib/icon/filliscreen-line.js +1 -481
  72. package/lib/icon/fix-line.js +1 -481
  73. package/lib/icon/fix-shape.js +1 -481
  74. package/lib/icon/folder-open.js +1 -481
  75. package/lib/icon/folder-shape-open.js +1 -481
  76. package/lib/icon/folder-shape.js +1 -481
  77. package/lib/icon/folder.js +1 -481
  78. package/lib/icon/funnel.js +1 -481
  79. package/lib/icon/help-document-fill.js +1 -481
  80. package/lib/icon/help-fill.js +1 -481
  81. package/lib/icon/help.js +1 -481
  82. package/lib/icon/image-fill.js +1 -527
  83. package/lib/icon/img-error.js +1 -527
  84. package/lib/icon/img-placehoulder.js +1 -527
  85. package/lib/icon/index.js +1 -2367
  86. package/lib/icon/info-line.js +1 -527
  87. package/lib/icon/info.js +1 -527
  88. package/lib/icon/left-shape.js +1 -527
  89. package/lib/icon/left-turn-line.js +1 -527
  90. package/lib/icon/narrow-line.js +1 -527
  91. package/lib/icon/original.js +1 -527
  92. package/lib/icon/pdf-fill.js +1 -527
  93. package/lib/icon/play-shape.js +1 -527
  94. package/lib/icon/plus.js +1 -527
  95. package/lib/icon/ppt-fill.js +1 -527
  96. package/lib/icon/qq.js +1 -527
  97. package/lib/icon/right-shape.js +1 -527
  98. package/lib/icon/right-turn-line.js +1 -527
  99. package/lib/icon/search.js +1 -527
  100. package/lib/icon/share.js +1 -527
  101. package/lib/icon/spinner.js +1 -527
  102. package/lib/icon/success.js +1 -527
  103. package/lib/icon/switcher-loading.js +1 -527
  104. package/lib/icon/text-file.js +1 -527
  105. package/lib/icon/text-fill.js +1 -527
  106. package/lib/icon/transfer.js +1 -527
  107. package/lib/icon/tree-application-shape.js +1 -527
  108. package/lib/icon/unfull-screen.js +1 -527
  109. package/lib/icon/unvisible.js +1 -527
  110. package/lib/icon/up-shape.js +1 -527
  111. package/lib/icon/upload.js +1 -527
  112. package/lib/icon/video-fill.js +1 -527
  113. package/lib/icon/warn.js +1 -527
  114. package/lib/icon/weixin-pro.js +1 -527
  115. package/lib/icon/weixin.js +1 -527
  116. package/lib/image/index.js +1 -593
  117. package/lib/index.js +1 -97
  118. package/lib/info-box/index.js +2 -1456
  119. package/lib/info-box/index.js.LICENSE.txt +1 -0
  120. package/lib/input/index.js +2 -1528
  121. package/lib/input/index.js.LICENSE.txt +1 -0
  122. package/lib/link/index.js +1 -160
  123. package/lib/loading/index.js +1 -379
  124. package/lib/locale/index.js +1 -465
  125. package/lib/menu/index.js +1 -725
  126. package/lib/message/index.js +2 -1790
  127. package/lib/message/index.js.LICENSE.txt +6 -0
  128. package/lib/modal/index.js +1 -337
  129. package/lib/navigation/index.js +1 -367
  130. package/lib/notify/index.js +1 -394
  131. package/lib/overflow-title/index.js +1 -485
  132. package/lib/pagination/index.js +1 -880
  133. package/lib/plugin-popover/index.js +1 -4067
  134. package/lib/plugins/index.js +1 -63
  135. package/lib/pop-confirm/index.js +1 -273
  136. package/lib/popover/index.js +1 -4075
  137. package/lib/popover2/index.js +1 -107
  138. package/lib/preset.js +1 -93
  139. package/lib/process/index.js +2 -1099
  140. package/lib/process/index.js.LICENSE.txt +1 -0
  141. package/lib/progress/index.js +1 -428
  142. package/lib/radio/index.js +1 -627
  143. package/lib/rate/index.js +1 -338
  144. package/lib/resize-layout/index.js +1 -430
  145. package/lib/search-select/index.js +2 -3036
  146. package/lib/search-select/index.js.LICENSE.txt +1 -0
  147. package/lib/select/index.js +2 -2571
  148. package/lib/select/index.js.LICENSE.txt +1 -0
  149. package/lib/shared/index.js +1 -2865
  150. package/lib/sideslider/index.js +2 -1005
  151. package/lib/sideslider/index.js.LICENSE.txt +1 -0
  152. package/lib/slider/index.js +2 -1629
  153. package/lib/slider/index.js.LICENSE.txt +1 -0
  154. package/lib/steps/index.js +2 -1163
  155. package/lib/steps/index.js.LICENSE.txt +1 -0
  156. package/lib/swiper/index.js +1 -336
  157. package/lib/switcher/index.js +1 -277
  158. package/lib/tab/index.js +1 -859
  159. package/lib/table/index.js +1 -6568
  160. package/lib/table-column/index.js +1 -730
  161. package/lib/tag/index.js +1 -233
  162. package/lib/tag-input/index.js +1 -1652
  163. package/lib/time-picker/index.js +1 -71
  164. package/lib/timeline/index.js +1 -242
  165. package/lib/transfer/index.js +1 -673
  166. package/lib/tree/index.js +1 -2625
  167. package/lib/upload/index.js +2 -3193
  168. package/lib/upload/index.js.LICENSE.txt +1 -0
  169. package/lib/virtual-render/index.js +1 -748
  170. package/package.json +1 -1
@@ -1,1629 +1,2 @@
1
- import * as __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__ from "../shared";
2
- import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
3
- import * as __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__ from "../config-provider";
4
- import * as __WEBPACK_EXTERNAL_MODULE__input_752b0149__ from "../input";
5
- import * as __WEBPACK_EXTERNAL_MODULE__popover_cf5f8dce__ from "../popover";
6
- /******/ var __webpack_modules__ = ({
7
-
8
- /***/ 7609:
9
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10
-
11
- var _typeof = (__webpack_require__(7425)["default"]);
12
- function _regeneratorRuntime() {
13
- "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
14
- module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
15
- return exports;
16
- }, module.exports.__esModule = true, module.exports["default"] = module.exports;
17
- var exports = {},
18
- Op = Object.prototype,
19
- hasOwn = Op.hasOwnProperty,
20
- defineProperty = Object.defineProperty || function (obj, key, desc) {
21
- obj[key] = desc.value;
22
- },
23
- $Symbol = "function" == typeof Symbol ? Symbol : {},
24
- iteratorSymbol = $Symbol.iterator || "@@iterator",
25
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
26
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
27
- function define(obj, key, value) {
28
- return Object.defineProperty(obj, key, {
29
- value: value,
30
- enumerable: !0,
31
- configurable: !0,
32
- writable: !0
33
- }), obj[key];
34
- }
35
- try {
36
- define({}, "");
37
- } catch (err) {
38
- define = function define(obj, key, value) {
39
- return obj[key] = value;
40
- };
41
- }
42
- function wrap(innerFn, outerFn, self, tryLocsList) {
43
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
44
- generator = Object.create(protoGenerator.prototype),
45
- context = new Context(tryLocsList || []);
46
- return defineProperty(generator, "_invoke", {
47
- value: makeInvokeMethod(innerFn, self, context)
48
- }), generator;
49
- }
50
- function tryCatch(fn, obj, arg) {
51
- try {
52
- return {
53
- type: "normal",
54
- arg: fn.call(obj, arg)
55
- };
56
- } catch (err) {
57
- return {
58
- type: "throw",
59
- arg: err
60
- };
61
- }
62
- }
63
- exports.wrap = wrap;
64
- var ContinueSentinel = {};
65
- function Generator() {}
66
- function GeneratorFunction() {}
67
- function GeneratorFunctionPrototype() {}
68
- var IteratorPrototype = {};
69
- define(IteratorPrototype, iteratorSymbol, function () {
70
- return this;
71
- });
72
- var getProto = Object.getPrototypeOf,
73
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
74
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
75
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
76
- function defineIteratorMethods(prototype) {
77
- ["next", "throw", "return"].forEach(function (method) {
78
- define(prototype, method, function (arg) {
79
- return this._invoke(method, arg);
80
- });
81
- });
82
- }
83
- function AsyncIterator(generator, PromiseImpl) {
84
- function invoke(method, arg, resolve, reject) {
85
- var record = tryCatch(generator[method], generator, arg);
86
- if ("throw" !== record.type) {
87
- var result = record.arg,
88
- value = result.value;
89
- return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
90
- invoke("next", value, resolve, reject);
91
- }, function (err) {
92
- invoke("throw", err, resolve, reject);
93
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
94
- result.value = unwrapped, resolve(result);
95
- }, function (error) {
96
- return invoke("throw", error, resolve, reject);
97
- });
98
- }
99
- reject(record.arg);
100
- }
101
- var previousPromise;
102
- defineProperty(this, "_invoke", {
103
- value: function value(method, arg) {
104
- function callInvokeWithMethodAndArg() {
105
- return new PromiseImpl(function (resolve, reject) {
106
- invoke(method, arg, resolve, reject);
107
- });
108
- }
109
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
110
- }
111
- });
112
- }
113
- function makeInvokeMethod(innerFn, self, context) {
114
- var state = "suspendedStart";
115
- return function (method, arg) {
116
- if ("executing" === state) throw new Error("Generator is already running");
117
- if ("completed" === state) {
118
- if ("throw" === method) throw arg;
119
- return doneResult();
120
- }
121
- for (context.method = method, context.arg = arg;;) {
122
- var delegate = context.delegate;
123
- if (delegate) {
124
- var delegateResult = maybeInvokeDelegate(delegate, context);
125
- if (delegateResult) {
126
- if (delegateResult === ContinueSentinel) continue;
127
- return delegateResult;
128
- }
129
- }
130
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
131
- if ("suspendedStart" === state) throw state = "completed", context.arg;
132
- context.dispatchException(context.arg);
133
- } else "return" === context.method && context.abrupt("return", context.arg);
134
- state = "executing";
135
- var record = tryCatch(innerFn, self, context);
136
- if ("normal" === record.type) {
137
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
138
- return {
139
- value: record.arg,
140
- done: context.done
141
- };
142
- }
143
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
144
- }
145
- };
146
- }
147
- function maybeInvokeDelegate(delegate, context) {
148
- var methodName = context.method,
149
- method = delegate.iterator[methodName];
150
- if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
151
- var record = tryCatch(method, delegate.iterator, context.arg);
152
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
153
- var info = record.arg;
154
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
155
- }
156
- function pushTryEntry(locs) {
157
- var entry = {
158
- tryLoc: locs[0]
159
- };
160
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
161
- }
162
- function resetTryEntry(entry) {
163
- var record = entry.completion || {};
164
- record.type = "normal", delete record.arg, entry.completion = record;
165
- }
166
- function Context(tryLocsList) {
167
- this.tryEntries = [{
168
- tryLoc: "root"
169
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
170
- }
171
- function values(iterable) {
172
- if (iterable) {
173
- var iteratorMethod = iterable[iteratorSymbol];
174
- if (iteratorMethod) return iteratorMethod.call(iterable);
175
- if ("function" == typeof iterable.next) return iterable;
176
- if (!isNaN(iterable.length)) {
177
- var i = -1,
178
- next = function next() {
179
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
180
- return next.value = undefined, next.done = !0, next;
181
- };
182
- return next.next = next;
183
- }
184
- }
185
- return {
186
- next: doneResult
187
- };
188
- }
189
- function doneResult() {
190
- return {
191
- value: undefined,
192
- done: !0
193
- };
194
- }
195
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
196
- value: GeneratorFunctionPrototype,
197
- configurable: !0
198
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
199
- value: GeneratorFunction,
200
- configurable: !0
201
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
202
- var ctor = "function" == typeof genFun && genFun.constructor;
203
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
204
- }, exports.mark = function (genFun) {
205
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
206
- }, exports.awrap = function (arg) {
207
- return {
208
- __await: arg
209
- };
210
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
211
- return this;
212
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
213
- void 0 === PromiseImpl && (PromiseImpl = Promise);
214
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
215
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
216
- return result.done ? result.value : iter.next();
217
- });
218
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
219
- return this;
220
- }), define(Gp, "toString", function () {
221
- return "[object Generator]";
222
- }), exports.keys = function (val) {
223
- var object = Object(val),
224
- keys = [];
225
- for (var key in object) keys.push(key);
226
- return keys.reverse(), function next() {
227
- for (; keys.length;) {
228
- var key = keys.pop();
229
- if (key in object) return next.value = key, next.done = !1, next;
230
- }
231
- return next.done = !0, next;
232
- };
233
- }, exports.values = values, Context.prototype = {
234
- constructor: Context,
235
- reset: function reset(skipTempReset) {
236
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
237
- },
238
- stop: function stop() {
239
- this.done = !0;
240
- var rootRecord = this.tryEntries[0].completion;
241
- if ("throw" === rootRecord.type) throw rootRecord.arg;
242
- return this.rval;
243
- },
244
- dispatchException: function dispatchException(exception) {
245
- if (this.done) throw exception;
246
- var context = this;
247
- function handle(loc, caught) {
248
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
249
- }
250
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
251
- var entry = this.tryEntries[i],
252
- record = entry.completion;
253
- if ("root" === entry.tryLoc) return handle("end");
254
- if (entry.tryLoc <= this.prev) {
255
- var hasCatch = hasOwn.call(entry, "catchLoc"),
256
- hasFinally = hasOwn.call(entry, "finallyLoc");
257
- if (hasCatch && hasFinally) {
258
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
259
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
260
- } else if (hasCatch) {
261
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
262
- } else {
263
- if (!hasFinally) throw new Error("try statement without catch or finally");
264
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
265
- }
266
- }
267
- }
268
- },
269
- abrupt: function abrupt(type, arg) {
270
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
271
- var entry = this.tryEntries[i];
272
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
273
- var finallyEntry = entry;
274
- break;
275
- }
276
- }
277
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
278
- var record = finallyEntry ? finallyEntry.completion : {};
279
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
280
- },
281
- complete: function complete(record, afterLoc) {
282
- if ("throw" === record.type) throw record.arg;
283
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
284
- },
285
- finish: function finish(finallyLoc) {
286
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
287
- var entry = this.tryEntries[i];
288
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
289
- }
290
- },
291
- "catch": function _catch(tryLoc) {
292
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
293
- var entry = this.tryEntries[i];
294
- if (entry.tryLoc === tryLoc) {
295
- var record = entry.completion;
296
- if ("throw" === record.type) {
297
- var thrown = record.arg;
298
- resetTryEntry(entry);
299
- }
300
- return thrown;
301
- }
302
- }
303
- throw new Error("illegal catch attempt");
304
- },
305
- delegateYield: function delegateYield(iterable, resultName, nextLoc) {
306
- return this.delegate = {
307
- iterator: values(iterable),
308
- resultName: resultName,
309
- nextLoc: nextLoc
310
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
311
- }
312
- }, exports;
313
- }
314
- module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
315
-
316
- /***/ }),
317
-
318
- /***/ 7425:
319
- /***/ ((module) => {
320
-
321
- function _typeof(obj) {
322
- "@babel/helpers - typeof";
323
-
324
- return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
325
- return typeof obj;
326
- } : function (obj) {
327
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
328
- }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
329
- }
330
- module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
331
-
332
- /***/ }),
333
-
334
- /***/ 2841:
335
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
336
-
337
- // TODO(Babel 8): Remove this file.
338
-
339
- var runtime = __webpack_require__(7609)();
340
- module.exports = runtime;
341
-
342
- // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
343
- try {
344
- regeneratorRuntime = runtime;
345
- } catch (accidentalStrictMode) {
346
- if (typeof globalThis === "object") {
347
- globalThis.regeneratorRuntime = runtime;
348
- } else {
349
- Function("r", "regeneratorRuntime = r")(runtime);
350
- }
351
- }
352
-
353
-
354
- /***/ })
355
-
356
- /******/ });
357
- /************************************************************************/
358
- /******/ // The module cache
359
- /******/ var __webpack_module_cache__ = {};
360
- /******/
361
- /******/ // The require function
362
- /******/ function __webpack_require__(moduleId) {
363
- /******/ // Check if module is in cache
364
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
365
- /******/ if (cachedModule !== undefined) {
366
- /******/ return cachedModule.exports;
367
- /******/ }
368
- /******/ // Create a new module (and put it into the cache)
369
- /******/ var module = __webpack_module_cache__[moduleId] = {
370
- /******/ // no module.id needed
371
- /******/ // no module.loaded needed
372
- /******/ exports: {}
373
- /******/ };
374
- /******/
375
- /******/ // Execute the module function
376
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
377
- /******/
378
- /******/ // Return the exports of the module
379
- /******/ return module.exports;
380
- /******/ }
381
- /******/
382
- /************************************************************************/
383
- /******/ /* webpack/runtime/compat get default export */
384
- /******/ (() => {
385
- /******/ // getDefaultExport function for compatibility with non-harmony modules
386
- /******/ __webpack_require__.n = (module) => {
387
- /******/ var getter = module && module.__esModule ?
388
- /******/ () => (module['default']) :
389
- /******/ () => (module);
390
- /******/ __webpack_require__.d(getter, { a: getter });
391
- /******/ return getter;
392
- /******/ };
393
- /******/ })();
394
- /******/
395
- /******/ /* webpack/runtime/define property getters */
396
- /******/ (() => {
397
- /******/ // define getter functions for harmony exports
398
- /******/ __webpack_require__.d = (exports, definition) => {
399
- /******/ for(var key in definition) {
400
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
401
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
402
- /******/ }
403
- /******/ }
404
- /******/ };
405
- /******/ })();
406
- /******/
407
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
408
- /******/ (() => {
409
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
410
- /******/ })();
411
- /******/
412
- /************************************************************************/
413
- var __webpack_exports__ = {};
414
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
415
- (() => {
416
-
417
- // EXPORTS
418
- __webpack_require__.d(__webpack_exports__, {
419
- Z: () => (/* binding */ src)
420
- });
421
-
422
- ;// CONCATENATED MODULE: external "../shared"
423
- var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
424
- var y = x => () => x
425
- const external_shared_namespaceObject = x({ ["PlacementEnum"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PlacementEnum, ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstall });
426
- ;// CONCATENATED MODULE: external "vue"
427
- var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
428
- var external_vue_y = x => () => x
429
- const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
430
- // EXTERNAL MODULE: ../../node_modules/@babel/runtime/regenerator/index.js
431
- var regenerator = __webpack_require__(2841);
432
- var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
433
- ;// CONCATENATED MODULE: ../../node_modules/tslib/tslib.es6.mjs
434
- /******************************************************************************
435
- Copyright (c) Microsoft Corporation.
436
-
437
- Permission to use, copy, modify, and/or distribute this software for any
438
- purpose with or without fee is hereby granted.
439
-
440
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
441
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
442
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
443
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
444
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
445
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
446
- PERFORMANCE OF THIS SOFTWARE.
447
- ***************************************************************************** */
448
- /* global Reflect, Promise, SuppressedError, Symbol */
449
-
450
- var extendStatics = function(d, b) {
451
- extendStatics = Object.setPrototypeOf ||
452
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
453
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
454
- return extendStatics(d, b);
455
- };
456
-
457
- function __extends(d, b) {
458
- if (typeof b !== "function" && b !== null)
459
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
460
- extendStatics(d, b);
461
- function __() { this.constructor = d; }
462
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
463
- }
464
-
465
- var __assign = function() {
466
- __assign = Object.assign || function __assign(t) {
467
- for (var s, i = 1, n = arguments.length; i < n; i++) {
468
- s = arguments[i];
469
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
470
- }
471
- return t;
472
- }
473
- return __assign.apply(this, arguments);
474
- }
475
-
476
- function __rest(s, e) {
477
- var t = {};
478
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
479
- t[p] = s[p];
480
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
481
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
482
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
483
- t[p[i]] = s[p[i]];
484
- }
485
- return t;
486
- }
487
-
488
- function __decorate(decorators, target, key, desc) {
489
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
490
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
491
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
492
- return c > 3 && r && Object.defineProperty(target, key, r), r;
493
- }
494
-
495
- function __param(paramIndex, decorator) {
496
- return function (target, key) { decorator(target, key, paramIndex); }
497
- }
498
-
499
- function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
500
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
501
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
502
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
503
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
504
- var _, done = false;
505
- for (var i = decorators.length - 1; i >= 0; i--) {
506
- var context = {};
507
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
508
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
509
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
510
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
511
- if (kind === "accessor") {
512
- if (result === void 0) continue;
513
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
514
- if (_ = accept(result.get)) descriptor.get = _;
515
- if (_ = accept(result.set)) descriptor.set = _;
516
- if (_ = accept(result.init)) initializers.unshift(_);
517
- }
518
- else if (_ = accept(result)) {
519
- if (kind === "field") initializers.unshift(_);
520
- else descriptor[key] = _;
521
- }
522
- }
523
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
524
- done = true;
525
- };
526
-
527
- function __runInitializers(thisArg, initializers, value) {
528
- var useValue = arguments.length > 2;
529
- for (var i = 0; i < initializers.length; i++) {
530
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
531
- }
532
- return useValue ? value : void 0;
533
- };
534
-
535
- function __propKey(x) {
536
- return typeof x === "symbol" ? x : "".concat(x);
537
- };
538
-
539
- function __setFunctionName(f, name, prefix) {
540
- if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
541
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
542
- };
543
-
544
- function __metadata(metadataKey, metadataValue) {
545
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
546
- }
547
-
548
- function __awaiter(thisArg, _arguments, P, generator) {
549
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
550
- return new (P || (P = Promise))(function (resolve, reject) {
551
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
552
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
553
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
554
- step((generator = generator.apply(thisArg, _arguments || [])).next());
555
- });
556
- }
557
-
558
- function __generator(thisArg, body) {
559
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
560
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
561
- function verb(n) { return function (v) { return step([n, v]); }; }
562
- function step(op) {
563
- if (f) throw new TypeError("Generator is already executing.");
564
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
565
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
566
- if (y = 0, t) op = [op[0] & 2, t.value];
567
- switch (op[0]) {
568
- case 0: case 1: t = op; break;
569
- case 4: _.label++; return { value: op[1], done: false };
570
- case 5: _.label++; y = op[1]; op = [0]; continue;
571
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
572
- default:
573
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
574
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
575
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
576
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
577
- if (t[2]) _.ops.pop();
578
- _.trys.pop(); continue;
579
- }
580
- op = body.call(thisArg, _);
581
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
582
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
583
- }
584
- }
585
-
586
- var __createBinding = Object.create ? (function(o, m, k, k2) {
587
- if (k2 === undefined) k2 = k;
588
- var desc = Object.getOwnPropertyDescriptor(m, k);
589
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
590
- desc = { enumerable: true, get: function() { return m[k]; } };
591
- }
592
- Object.defineProperty(o, k2, desc);
593
- }) : (function(o, m, k, k2) {
594
- if (k2 === undefined) k2 = k;
595
- o[k2] = m[k];
596
- });
597
-
598
- function __exportStar(m, o) {
599
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
600
- }
601
-
602
- function __values(o) {
603
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
604
- if (m) return m.call(o);
605
- if (o && typeof o.length === "number") return {
606
- next: function () {
607
- if (o && i >= o.length) o = void 0;
608
- return { value: o && o[i++], done: !o };
609
- }
610
- };
611
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
612
- }
613
-
614
- function __read(o, n) {
615
- var m = typeof Symbol === "function" && o[Symbol.iterator];
616
- if (!m) return o;
617
- var i = m.call(o), r, ar = [], e;
618
- try {
619
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
620
- }
621
- catch (error) { e = { error: error }; }
622
- finally {
623
- try {
624
- if (r && !r.done && (m = i["return"])) m.call(i);
625
- }
626
- finally { if (e) throw e.error; }
627
- }
628
- return ar;
629
- }
630
-
631
- /** @deprecated */
632
- function __spread() {
633
- for (var ar = [], i = 0; i < arguments.length; i++)
634
- ar = ar.concat(__read(arguments[i]));
635
- return ar;
636
- }
637
-
638
- /** @deprecated */
639
- function __spreadArrays() {
640
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
641
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
642
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
643
- r[k] = a[j];
644
- return r;
645
- }
646
-
647
- function __spreadArray(to, from, pack) {
648
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
649
- if (ar || !(i in from)) {
650
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
651
- ar[i] = from[i];
652
- }
653
- }
654
- return to.concat(ar || Array.prototype.slice.call(from));
655
- }
656
-
657
- function __await(v) {
658
- return this instanceof __await ? (this.v = v, this) : new __await(v);
659
- }
660
-
661
- function __asyncGenerator(thisArg, _arguments, generator) {
662
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
663
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
664
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
665
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
666
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
667
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
668
- function fulfill(value) { resume("next", value); }
669
- function reject(value) { resume("throw", value); }
670
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
671
- }
672
-
673
- function __asyncDelegator(o) {
674
- var i, p;
675
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
676
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
677
- }
678
-
679
- function __asyncValues(o) {
680
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
681
- var m = o[Symbol.asyncIterator], i;
682
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
683
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
684
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
685
- }
686
-
687
- function __makeTemplateObject(cooked, raw) {
688
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
689
- return cooked;
690
- };
691
-
692
- var __setModuleDefault = Object.create ? (function(o, v) {
693
- Object.defineProperty(o, "default", { enumerable: true, value: v });
694
- }) : function(o, v) {
695
- o["default"] = v;
696
- };
697
-
698
- function __importStar(mod) {
699
- if (mod && mod.__esModule) return mod;
700
- var result = {};
701
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
702
- __setModuleDefault(result, mod);
703
- return result;
704
- }
705
-
706
- function __importDefault(mod) {
707
- return (mod && mod.__esModule) ? mod : { default: mod };
708
- }
709
-
710
- function __classPrivateFieldGet(receiver, state, kind, f) {
711
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
712
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
713
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
714
- }
715
-
716
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
717
- if (kind === "m") throw new TypeError("Private method is not writable");
718
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
719
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
720
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
721
- }
722
-
723
- function __classPrivateFieldIn(state, receiver) {
724
- if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
725
- return typeof state === "function" ? receiver === state : state.has(receiver);
726
- }
727
-
728
- function __addDisposableResource(env, value, async) {
729
- if (value !== null && value !== void 0) {
730
- if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
731
- var dispose;
732
- if (async) {
733
- if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
734
- dispose = value[Symbol.asyncDispose];
735
- }
736
- if (dispose === void 0) {
737
- if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
738
- dispose = value[Symbol.dispose];
739
- }
740
- if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
741
- env.stack.push({ value: value, dispose: dispose, async: async });
742
- }
743
- else if (async) {
744
- env.stack.push({ async: true });
745
- }
746
- return value;
747
- }
748
-
749
- var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
750
- var e = new Error(message);
751
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
752
- };
753
-
754
- function __disposeResources(env) {
755
- function fail(e) {
756
- env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
757
- env.hasError = true;
758
- }
759
- function next() {
760
- while (env.stack.length) {
761
- var rec = env.stack.pop();
762
- try {
763
- var result = rec.dispose && rec.dispose.call(rec.value);
764
- if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
765
- }
766
- catch (e) {
767
- fail(e);
768
- }
769
- }
770
- if (env.hasError) throw env.error;
771
- }
772
- return next();
773
- }
774
-
775
- /* harmony default export */ const tslib_es6 = ({
776
- __extends,
777
- __assign,
778
- __rest,
779
- __decorate,
780
- __param,
781
- __metadata,
782
- __awaiter,
783
- __generator,
784
- __createBinding,
785
- __exportStar,
786
- __values,
787
- __read,
788
- __spread,
789
- __spreadArrays,
790
- __spreadArray,
791
- __await,
792
- __asyncGenerator,
793
- __asyncDelegator,
794
- __asyncValues,
795
- __makeTemplateObject,
796
- __importStar,
797
- __importDefault,
798
- __classPrivateFieldGet,
799
- __classPrivateFieldSet,
800
- __classPrivateFieldIn,
801
- __addDisposableResource,
802
- __disposeResources,
803
- });
804
-
805
- ;// CONCATENATED MODULE: external "../config-provider"
806
- var external_config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
807
- var external_config_provider_y = x => () => x
808
- const external_config_provider_namespaceObject = external_config_provider_x({ ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__.usePrefix });
809
- ;// CONCATENATED MODULE: external "../input"
810
- var external_input_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
811
- var external_input_y = x => () => x
812
- const external_input_namespaceObject = external_input_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE__input_752b0149__["default"] });
813
- ;// CONCATENATED MODULE: external "../popover"
814
- var external_popover_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
815
- var external_popover_y = x => () => x
816
- const external_popover_namespaceObject = external_popover_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE__popover_cf5f8dce__["default"] });
817
- ;// CONCATENATED MODULE: ../../packages/slider/src/slider-button.tsx
818
-
819
- /**
820
- * Tencent is pleased to support the open source community by making
821
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
822
- *
823
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
824
- *
825
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
826
- *
827
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
828
- *
829
- * ---------------------------------------------------
830
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
831
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
832
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
833
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
834
- *
835
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
836
- * the Software.
837
- *
838
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
839
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
840
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
841
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
842
- * IN THE SOFTWARE.
843
- */
844
-
845
-
846
-
847
-
848
-
849
- /* harmony default export */ const slider_button = ((0,external_vue_namespaceObject.defineComponent)({
850
- name: 'SliderButton',
851
- props: {
852
- modelValue: {
853
- type: Number,
854
- "default": 0
855
- },
856
- params: {
857
- type: Object,
858
- "default": function _default() {
859
- return {};
860
- }
861
- }
862
- },
863
- emits: ['emitChange', 'resetSize', 'update:modelValue'],
864
- setup: function setup(props, _ref) {
865
- var emit = _ref.emit;
866
- var dragging = (0,external_vue_namespaceObject.ref)(false);
867
- var isClick = (0,external_vue_namespaceObject.ref)(false);
868
- var startY = (0,external_vue_namespaceObject.ref)(0);
869
- var startX = (0,external_vue_namespaceObject.ref)(0);
870
- var startPosition = (0,external_vue_namespaceObject.ref)(0);
871
- var newPosition = (0,external_vue_namespaceObject.ref)(null);
872
- var oldValue = (0,external_vue_namespaceObject.ref)(props.modelValue);
873
- var currentY = (0,external_vue_namespaceObject.ref)(0);
874
- var currentX = (0,external_vue_namespaceObject.ref)(0);
875
- var isMove = (0,external_vue_namespaceObject.ref)(false);
876
- var button = (0,external_vue_namespaceObject.ref)(null);
877
- var tip = (0,external_vue_namespaceObject.computed)(function () {
878
- var _a, _b;
879
- var tip = '';
880
- if ((_a = props.params.customContent) === null || _a === void 0 ? void 0 : _a[props.modelValue]) {
881
- var customContent = props.params.customContent[props.modelValue];
882
- tip = customContent.tip || customContent.label || '';
883
- }
884
- var placement = props.params.vertical ? external_shared_namespaceObject.PlacementEnum.RIGHT : external_shared_namespaceObject.PlacementEnum.TOP;
885
- if ((_b = props.params) === null || _b === void 0 ? void 0 : _b.showTip) {
886
- return {
887
- content: props.params.formatterTipLabel("".concat(tip || (props === null || props === void 0 ? void 0 : props.modelValue) || '0')),
888
- placement: placement
889
- };
890
- }
891
- return {
892
- content: '',
893
- placement: placement
894
- };
895
- });
896
- var currentPosition = (0,external_vue_namespaceObject.computed)(function () {
897
- return "".concat((props.modelValue - props.params.minValue) / (props.params.maxValue - props.params.minValue) * 100, "%");
898
- });
899
- var wrapperStyle = (0,external_vue_namespaceObject.computed)(function () {
900
- return props.params.vertical ? {
901
- bottom: currentPosition.value
902
- } : {
903
- left: currentPosition.value
904
- };
905
- });
906
- var buttonLabel = (0,external_vue_namespaceObject.computed)(function () {
907
- return props.params.formatterButtonLabel(props.modelValue);
908
- });
909
- var onButtonDown = function onButtonDown(event) {
910
- if (props.params.disable) return;
911
- event.preventDefault();
912
- onDragStart(event);
913
- on(window, 'mousemove', onDragging);
914
- on(window, 'touchmove', onDragging);
915
- on(window, 'mouseup', onDragEnd);
916
- on(window, 'touchend', onDragEnd);
917
- };
918
- var onDragStart = function onDragStart(event) {
919
- dragging.value = true;
920
- isClick.value = true;
921
- if (props.params.vertical) {
922
- startY.value = event.clientY;
923
- } else {
924
- startX.value = event.clientX;
925
- }
926
- startPosition.value = parseFloat(currentPosition.value);
927
- newPosition.value = startPosition.value;
928
- };
929
- var onDragging = function onDragging(event) {
930
- if (dragging.value) {
931
- isClick.value = false;
932
- emit('resetSize');
933
- var diff = 0;
934
- if (props.params.vertical) {
935
- currentY.value = event.clientY;
936
- diff = (startY.value - currentY.value) / props.params.sliderSize * 100;
937
- } else {
938
- currentX.value = event.clientX;
939
- diff = (currentX.value - startX.value) / props.params.sliderSize * 100;
940
- }
941
- newPosition.value = startPosition.value + diff;
942
- setPosition(newPosition.value);
943
- }
944
- };
945
- var onDragEnd = function onDragEnd() {
946
- isMove.value = false;
947
- if (dragging.value) {
948
- setTimeout(function () {
949
- dragging.value = false;
950
- if (!isClick.value) {
951
- setPosition(newPosition.value);
952
- emit('emitChange');
953
- }
954
- }, 0);
955
- off(window, 'mousemove', onDragging);
956
- off(window, 'touchmove', onDragging);
957
- off(window, 'mouseup', onDragEnd);
958
- off(window, 'touchend', onDragEnd);
959
- }
960
- };
961
- var setPosition = function setPosition(position) {
962
- if (position === null || isNaN(position)) return;
963
- if (position < 0) {
964
- newPosition.value = 0;
965
- } else if (position > 100) {
966
- newPosition.value = 100;
967
- }
968
- var lengthPerStep = 100 / ((props.params.maxValue - props.params.minValue) / props.params.step);
969
- var steps = Math.round(position / lengthPerStep);
970
- var value = steps * lengthPerStep * (props.params.maxValue - props.params.minValue) * 0.01 + props.params.minValue;
971
- value = parseFloat(value.toFixed(props.params.precision));
972
- emit('update:modelValue', value);
973
- if (!dragging.value && props.modelValue !== oldValue.value) {
974
- oldValue.value = props.modelValue;
975
- }
976
- };
977
- var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
978
- resolveClassName = _usePrefix.resolveClassName;
979
- var renderDom = function renderDom() {
980
- return (0,external_vue_namespaceObject.createVNode)("div", {
981
- "class": ["".concat(resolveClassName('slider-button')), props.params.vertical ? 'vertical' : 'horizontal', {
982
- grabbing: dragging.value
983
- }],
984
- "ref": button,
985
- "tabindex": "0",
986
- "style": wrapperStyle.value,
987
- "onClick": function onClick(event) {
988
- return event.stopPropagation();
989
- },
990
- "onMousedown": onButtonDown
991
- }, [Boolean(tip.value.content) ? (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)(external_popover_namespaceObject["default"], {
992
- "content": tip.value.content,
993
- "theme": 'dark',
994
- "placement": tip.value.placement,
995
- "boundary": document.body
996
- }, {
997
- "default": function _default() {
998
- return [(0,external_vue_namespaceObject.createVNode)("div", {
999
- "class": ['slider-button', {
1000
- 'slider-button-disable': props.params.disable
1001
- }]
1002
- }, null)];
1003
- }
1004
- })]) : (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)("div", {
1005
- "class": ['slider-button', {
1006
- 'slider-button-disable': props.params.disable
1007
- }]
1008
- }, null)]), props.params.showButtonLabel && !props.params.showIntervalLabel ? (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)("div", {
1009
- "class": ['slider-button-label', props.params.vertical ? 'vertical' : 'horizontal']
1010
- }, [buttonLabel.value])]) : null]);
1011
- };
1012
- return {
1013
- renderDom: renderDom,
1014
- setPosition: setPosition,
1015
- tip: tip
1016
- };
1017
- },
1018
- render: function render() {
1019
- return this.renderDom();
1020
- }
1021
- }));
1022
- ;// CONCATENATED MODULE: ../../packages/slider/src/slider.tsx
1023
-
1024
-
1025
- /**
1026
- * Tencent is pleased to support the open source community by making
1027
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1028
- *
1029
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1030
- *
1031
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1032
- *
1033
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1034
- *
1035
- * ---------------------------------------------------
1036
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1037
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1038
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1039
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1040
- *
1041
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1042
- * the Software.
1043
- *
1044
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1045
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1046
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1047
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1048
- * IN THE SOFTWARE.
1049
- */
1050
-
1051
-
1052
-
1053
-
1054
-
1055
-
1056
- var on = function on(element, event, handler) {
1057
- if (element && event && handler) {
1058
- element.addEventListener(event, handler, false);
1059
- }
1060
- };
1061
- var off = function off(element, event, handler) {
1062
- if (element && event && handler) {
1063
- element.removeEventListener(event, handler, false);
1064
- }
1065
- };
1066
- /* harmony default export */ const slider = ((0,external_vue_namespaceObject.defineComponent)({
1067
- name: 'Slider',
1068
- props: {
1069
- modelValue: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.arrayOf(external_shared_namespaceObject.PropTypes.number), external_shared_namespaceObject.PropTypes.number]),
1070
- extCls: {
1071
- type: String,
1072
- "default": ''
1073
- },
1074
- vertical: {
1075
- type: Boolean,
1076
- "default": false
1077
- },
1078
- height: {
1079
- type: String,
1080
- "default": '200px'
1081
- },
1082
- disable: {
1083
- type: Boolean,
1084
- "default": false
1085
- },
1086
- showTip: {
1087
- type: Boolean,
1088
- "default": false
1089
- },
1090
- maxValue: {
1091
- type: [Number],
1092
- "default": 100
1093
- },
1094
- minValue: {
1095
- type: [Number],
1096
- "default": 0
1097
- },
1098
- step: {
1099
- type: [Number],
1100
- "default": 1
1101
- },
1102
- range: {
1103
- type: Boolean,
1104
- "default": false
1105
- },
1106
- showInterval: {
1107
- type: Boolean,
1108
- "default": false
1109
- },
1110
- showIntervalLabel: {
1111
- type: Boolean,
1112
- "default": false
1113
- },
1114
- showButtonLabel: {
1115
- type: Boolean,
1116
- "default": false
1117
- },
1118
- showBetweenLabel: {
1119
- type: Boolean,
1120
- "default": false
1121
- },
1122
- showInput: {
1123
- type: Boolean,
1124
- "default": false
1125
- },
1126
- customContent: {
1127
- type: Object,
1128
- "default": null
1129
- },
1130
- formatterLabel: {
1131
- type: Function,
1132
- "default": function _default(value) {
1133
- return value;
1134
- }
1135
- },
1136
- formatterButtonLabel: {
1137
- type: Function,
1138
- "default": function _default(value) {
1139
- return value;
1140
- }
1141
- },
1142
- formatterTipLabel: {
1143
- type: Function,
1144
- "default": function _default(value) {
1145
- return value;
1146
- }
1147
- } // 自定义tip格式
1148
- },
1149
-
1150
- emits: ['update:modelValue', 'change'],
1151
- setup: function setup(props, _ref) {
1152
- var _this = this;
1153
- var slots = _ref.slots,
1154
- emit = _ref.emit;
1155
- /* 滑动选择器长度 */
1156
- var sliderSize = (0,external_vue_namespaceObject.ref)(1);
1157
- /* 第一个滑块与第二个滑块的值 */
1158
- var firstValue = (0,external_vue_namespaceObject.ref)(null);
1159
- var secondValue = (0,external_vue_namespaceObject.ref)(null);
1160
- var oldValue = (0,external_vue_namespaceObject.ref)(null);
1161
- /* 第一个输入框与第二个输入框的值 */
1162
- var firstInput = (0,external_vue_namespaceObject.ref)(0);
1163
- var secondInput = (0,external_vue_namespaceObject.ref)(0);
1164
- /* 以下为refDom */
1165
- var slider = (0,external_vue_namespaceObject.ref)(null);
1166
- var firstbutton = (0,external_vue_namespaceObject.ref)(null);
1167
- var secondbutton = (0,external_vue_namespaceObject.ref)(null);
1168
- var curButtonRef = (0,external_vue_namespaceObject.ref)(null);
1169
- // 小数点后最大位数
1170
- var precision = (0,external_vue_namespaceObject.computed)(function () {
1171
- var precisions = [props.minValue, props.maxValue, props.step].map(function (item) {
1172
- var decimal = "".concat(item).split('.')[1];
1173
- return decimal ? decimal.length : 0;
1174
- });
1175
- return Math.max.apply(null, precisions);
1176
- });
1177
- /* 当前滑块的最小值与最大值 */
1178
- var rangeMinValue = (0,external_vue_namespaceObject.computed)(function () {
1179
- return Math.min(firstValue.value, secondValue.value);
1180
- });
1181
- var rangeMaxValue = (0,external_vue_namespaceObject.computed)(function () {
1182
- return Math.max(firstValue.value, secondValue.value);
1183
- });
1184
- var barSize = (0,external_vue_namespaceObject.computed)(function () {
1185
- return props.range ? "".concat(100 * (rangeMaxValue.value - rangeMinValue.value) / (props.maxValue - props.minValue), "%") : "".concat(100 * (firstValue.value - props.minValue) / (props.maxValue - props.minValue), "%");
1186
- });
1187
- var barStart = (0,external_vue_namespaceObject.computed)(function () {
1188
- return props.range ? "".concat(100 * (rangeMinValue.value - props.minValue) / (props.maxValue - props.minValue), "%") : '0%';
1189
- });
1190
- /* 当前滑动区域的位置与长度 */
1191
- var barStyle = (0,external_vue_namespaceObject.computed)(function () {
1192
- return props.vertical ? {
1193
- height: barSize.value,
1194
- bottom: barStart.value
1195
- } : {
1196
- width: barSize.value,
1197
- left: barStart.value
1198
- };
1199
- });
1200
- /* 断点 */
1201
- var intervals = (0,external_vue_namespaceObject.computed)(function () {
1202
- if (!props.showInterval || props.minValue > props.maxValue) return [];
1203
- if (props.step === 0) {
1204
- console.warn('WARNNING:step should not be 0');
1205
- return [];
1206
- }
1207
- var stopCount = (props.maxValue - props.minValue) / props.step;
1208
- var stepWidth = 100 * props.step / (props.maxValue - props.minValue);
1209
- var result = [];
1210
- for (var i = 1; i < stopCount; i++) {
1211
- result.push(i * stepWidth);
1212
- }
1213
- if (props.range) {
1214
- // eslint-disable-next-line max-len
1215
- return result.filter(function (step) {
1216
- return step < 100 * (rangeMinValue.value - props.minValue) / (props.maxValue - props.minValue) || step > 100 * (rangeMaxValue.value - props.minValue) / (props.maxValue - props.minValue);
1217
- });
1218
- }
1219
- // eslint-disable-next-line max-len
1220
- return result.filter(function (step) {
1221
- return step > 100 * (firstValue.value - props.minValue) / (props.maxValue - props.minValue);
1222
- });
1223
- });
1224
- /* 可滑动区域的样式 */
1225
- var runwayStyle = (0,external_vue_namespaceObject.computed)(function () {
1226
- return props.vertical ? {
1227
- height: props.height,
1228
- width: '4px'
1229
- } : {};
1230
- });
1231
- /* 断点下方的文案 */
1232
- var intervalLabels = (0,external_vue_namespaceObject.computed)(function () {
1233
- if (!props.showIntervalLabel) return [];
1234
- if (props.step === 0) {
1235
- console.warn('WARNNING:step should not be 0');
1236
- return [];
1237
- }
1238
- var stepWidth = 100 * props.step / (props.maxValue - props.minValue);
1239
- var result = [];
1240
- for (var i = props.minValue, j = 0; i <= props.maxValue; i += props.step, j++) {
1241
- var item = {
1242
- stepWidth: j * stepWidth,
1243
- stepLabel: props.formatterLabel(i)
1244
- };
1245
- result.push(item);
1246
- }
1247
- return result;
1248
- });
1249
- /* 是否显示第二个输入框 */
1250
- var showSecondInput = (0,external_vue_namespaceObject.computed)(function () {
1251
- return Array.isArray(props.modelValue);
1252
- });
1253
- /* 自定义断点 */
1254
- var customList = (0,external_vue_namespaceObject.computed)(function () {
1255
- if (!props.customContent) {
1256
- return [];
1257
- }
1258
- return Object.keys(props.customContent).sort(function (a, b) {
1259
- return Number(a) - Number(b);
1260
- }).filter(function (value) {
1261
- return Number(value) >= props.minValue && Number(value) <= props.maxValue;
1262
- }).map(function (item) {
1263
- var tip = props.customContent[item].tip;
1264
- var label = props.customContent[item].label;
1265
- return {
1266
- tip: tip || label || '',
1267
- label: label || '',
1268
- percent: (Number(item) - props.minValue) / (props.maxValue - props.minValue) * 100
1269
- };
1270
- });
1271
- });
1272
- /* 传入到滑块的参数 */
1273
- var buttonParms = (0,external_vue_namespaceObject.computed)(function () {
1274
- return {
1275
- vertical: props.vertical,
1276
- showTip: props.showTip,
1277
- disable: props.disable,
1278
- maxValue: props.maxValue,
1279
- minValue: props.minValue,
1280
- step: props.step,
1281
- precision: precision.value,
1282
- showButtonLabel: props.showButtonLabel,
1283
- formatterButtonLabel: props.formatterButtonLabel,
1284
- showIntervalLabel: props.showIntervalLabel,
1285
- customContent: props.customContent,
1286
- sliderSize: sliderSize.value,
1287
- formatterTipLabel: props.formatterTipLabel
1288
- };
1289
- });
1290
- // 监听
1291
- (0,external_vue_namespaceObject.watch)(function () {
1292
- return props.modelValue;
1293
- }, function () {
1294
- setValues();
1295
- });
1296
- (0,external_vue_namespaceObject.watch)(function () {
1297
- return firstValue.value;
1298
- }, function (val) {
1299
- if (props.range) {
1300
- emit('update:modelValue', [rangeMinValue.value, rangeMaxValue.value]);
1301
- } else {
1302
- emit('update:modelValue', val);
1303
- }
1304
- firstInput.value = val;
1305
- });
1306
- (0,external_vue_namespaceObject.watch)(function () {
1307
- return secondValue.value;
1308
- }, function (val) {
1309
- emit('update:modelValue', [rangeMinValue.value, rangeMaxValue.value]);
1310
- secondInput.value = val;
1311
- });
1312
- /* 初始化 */
1313
- (0,external_vue_namespaceObject.onMounted)(function () {
1314
- if (props.range) {
1315
- if (Array.isArray(props.modelValue)) {
1316
- firstValue.value = Math.max(props.minValue, Number(props.modelValue[0]));
1317
- secondValue.value = Math.min(props.maxValue, Number(props.modelValue[1]));
1318
- } else {
1319
- firstValue.value = props.minValue;
1320
- secondValue.value = props.maxValue;
1321
- }
1322
- oldValue.value = [firstValue.value, secondValue.value];
1323
- } else {
1324
- if (typeof props.modelValue !== 'number' || isNaN(props.modelValue)) {
1325
- firstValue.value = props.minValue;
1326
- } else {
1327
- firstValue.value = Math.min(props.maxValue, Math.max(props.minValue, props.modelValue));
1328
- }
1329
- oldValue.value = firstValue.value;
1330
- }
1331
- resetSize();
1332
- on(window, 'resize', resetSize());
1333
- });
1334
- var resetSize = function resetSize() {
1335
- if (slider.value) {
1336
- sliderSize.value = slider.value["client".concat(props.vertical ? 'Height' : 'Width')];
1337
- }
1338
- };
1339
- /* 点击容器时设置滑块位置 */
1340
- var setButtonPos = function setButtonPos(event) {
1341
- var _a, _b;
1342
- event.stopPropagation();
1343
- if (props.disable) return;
1344
- resetSize();
1345
- if (props.vertical) {
1346
- var offsetBottom = (_a = slider.value) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().bottom;
1347
- setPosition((offsetBottom - event.clientY) / sliderSize.value * 100);
1348
- } else {
1349
- var offsetLeft = (_b = slider.value) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect().left;
1350
- setPosition((event.clientX - offsetLeft) / sliderSize.value * 100);
1351
- }
1352
- emitChange();
1353
- };
1354
- /* 是否更改了值 */
1355
- var valueChanged = function valueChanged() {
1356
- if (props.range) {
1357
- return ![rangeMinValue.value, rangeMaxValue.value].every(function (item, index) {
1358
- return item === oldValue.value[index];
1359
- });
1360
- }
1361
- return props.modelValue !== oldValue.value;
1362
- };
1363
- /* emit */
1364
- var setValues = function setValues() {
1365
- if (props.minValue > props.maxValue) {
1366
- console.error('min should not be greater than max.');
1367
- return;
1368
- }
1369
- var val = props.modelValue;
1370
- if (props.range && Array.isArray(val)) {
1371
- if (val[1] < props.minValue) {
1372
- emit('update:modelValue', [props.minValue, props.minValue]);
1373
- } else if (val[0] > props.maxValue) {
1374
- emit('update:modelValue', [props.maxValue, props.maxValue]);
1375
- } else if (val[0] < props.minValue) {
1376
- emit('update:modelValue', [props.minValue, val[1]]);
1377
- } else if (val[1] > props.maxValue) {
1378
- emit('update:modelValue', [val[0], props.maxValue]);
1379
- } else {
1380
- firstValue.value = Number(val[0]);
1381
- secondValue.value = Number(val[1]);
1382
- if (valueChanged()) {
1383
- oldValue.value = val.slice();
1384
- }
1385
- }
1386
- } else if (!props.range && typeof val === 'number' && !isNaN(val)) {
1387
- if (val < props.minValue) {
1388
- emit('update:modelValue', props.minValue);
1389
- } else if (val > props.maxValue) {
1390
- emit('update:modelValue', props.maxValue);
1391
- } else {
1392
- firstValue.value = val;
1393
- if (valueChanged()) {
1394
- oldValue.value = val;
1395
- }
1396
- }
1397
- }
1398
- };
1399
- /* 派出事件 */
1400
- var emitChange = function emitChange() {
1401
- return __awaiter(_this, void 0, void 0, /*#__PURE__*/regenerator_default().mark(function _callee() {
1402
- return regenerator_default().wrap(function _callee$(_context) {
1403
- while (1) switch (_context.prev = _context.next) {
1404
- case 0:
1405
- _context.next = 2;
1406
- return (0,external_vue_namespaceObject.nextTick)();
1407
- case 2:
1408
- emit('change', props.range ? [rangeMinValue.value, rangeMaxValue.value] : props.modelValue);
1409
- case 3:
1410
- case "end":
1411
- return _context.stop();
1412
- }
1413
- }, _callee);
1414
- }));
1415
- };
1416
- /* 断点样式 */
1417
- var getIntervalStyle = function getIntervalStyle(position) {
1418
- return props.vertical ? {
1419
- bottom: "".concat(position, "%")
1420
- } : {
1421
- left: "".concat(position, "%")
1422
- };
1423
- };
1424
- /* 设置滑块位置 */
1425
- var setPosition = function setPosition(percent) {
1426
- if (!props.range) {
1427
- firstbutton.value.setPosition(percent);
1428
- return;
1429
- }
1430
- var targetValue = props.minValue + percent * (props.maxValue - props.minValue) / 100;
1431
- // 绝对值
1432
- if (Math.abs(rangeMinValue.value - targetValue) < Math.abs(rangeMaxValue.value - targetValue)) {
1433
- curButtonRef.value = firstValue.value < secondValue.value ? firstbutton.value : secondbutton.value;
1434
- } else {
1435
- curButtonRef.value = firstValue.value > secondValue.value ? firstbutton.value : secondbutton.value;
1436
- }
1437
- curButtonRef.value.setPosition(percent);
1438
- };
1439
- var firstInputChange = function firstInputChange(v) {
1440
- if (v === '') {
1441
- return;
1442
- }
1443
- var val = parseFloat(v);
1444
- if (val < props.minValue) {
1445
- firstInput.value = props.minValue;
1446
- firstValue.value = props.minValue;
1447
- } else if (val > props.maxValue) {
1448
- firstInput.value = props.maxValue;
1449
- firstValue.value = props.maxValue;
1450
- } else {
1451
- firstValue.value = val;
1452
- }
1453
- };
1454
- var secondInputChange = function secondInputChange(v) {
1455
- if (v === '') {
1456
- return;
1457
- }
1458
- var val = parseFloat(v.toString());
1459
- if (val < props.minValue) {
1460
- secondInput.value = props.minValue;
1461
- secondValue.value = props.minValue;
1462
- } else if (val > props.maxValue) {
1463
- secondInput.value = props.maxValue;
1464
- secondValue.value = props.maxValue;
1465
- } else {
1466
- secondValue.value = val;
1467
- }
1468
- };
1469
- var betweenLabelStyle = function betweenLabelStyle(postion) {
1470
- var value = 0;
1471
- if (postion === 'start') {
1472
- value = props.vertical ? props.maxValue : props.minValue;
1473
- } else {
1474
- value = props.vertical ? props.minValue : props.maxValue;
1475
- }
1476
- if (props.showButtonLabel && [firstValue.value, secondValue.value].includes(value)) {
1477
- return '0';
1478
- }
1479
- return '1';
1480
- };
1481
- var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
1482
- resolveClassName = _usePrefix.resolveClassName;
1483
- var renderDom = function renderDom() {
1484
- var _a, _b;
1485
- return (0,external_vue_namespaceObject.createVNode)("div", {
1486
- "class": ["".concat(resolveClassName('slider')), props.extCls]
1487
- }, [(_a = slots.start) === null || _a === void 0 ? void 0 : _a.call(slots), (0,external_vue_namespaceObject.createVNode)("div", {
1488
- "class": "".concat(resolveClassName('slider-runway')),
1489
- "ref": slider,
1490
- "style": runwayStyle.value,
1491
- "onClick": setButtonPos
1492
- }, [(0,external_vue_namespaceObject.createVNode)("div", {
1493
- "class": ["".concat(resolveClassName('slider-bar')), props.vertical ? 'vertical' : 'horizontal', {
1494
- disable: props.disable
1495
- }],
1496
- "style": barStyle.value
1497
- }, null), props.showInterval ? intervals.value.map(function (interval, index) {
1498
- return (0,external_vue_namespaceObject.createVNode)("div", {
1499
- "key": index,
1500
- "class": ["".concat(resolveClassName('slider-interval')), {
1501
- vertical: props.vertical
1502
- }],
1503
- "style": getIntervalStyle(interval)
1504
- }, null);
1505
- }) : undefined, props.customContent ? customList.value.map(function (custom, index) {
1506
- return (0,external_vue_namespaceObject.createVNode)("div", {
1507
- "key": index,
1508
- "class": ["".concat(resolveClassName('slider-interval')), {
1509
- vertical: props.vertical
1510
- }],
1511
- "style": getIntervalStyle(custom.percent)
1512
- }, null);
1513
- }) : undefined, props.showBetweenLabel || props.showIntervalLabel || props.customContent ? (0,external_vue_namespaceObject.createVNode)("div", {
1514
- "class": ["".concat(resolveClassName('slider-labels')), props.vertical ? 'vertical' : 'horizontal']
1515
- }, [function () {
1516
- if (props.showBetweenLabel) {
1517
- return [(0,external_vue_namespaceObject.createVNode)("div", {
1518
- "class": "label-start",
1519
- "style": [{
1520
- opacity: betweenLabelStyle('start')
1521
- }]
1522
- }, [props.formatterLabel(props.minValue)]), (0,external_vue_namespaceObject.createVNode)("div", {
1523
- "class": "label-end",
1524
- "style": [{
1525
- opacity: betweenLabelStyle('end')
1526
- }]
1527
- }, [props.formatterLabel(props.maxValue)])];
1528
- }
1529
- if (props.showIntervalLabel) {
1530
- return intervalLabels.value.map(function (intervalLabel, index) {
1531
- return (0,external_vue_namespaceObject.createVNode)("div", {
1532
- "class": ["".concat(resolveClassName('slider-label')), props.vertical ? 'vertical' : 'horizontal'],
1533
- "key": index,
1534
- "style": getIntervalStyle(intervalLabel.stepWidth)
1535
- }, [intervalLabel.stepLabel]);
1536
- });
1537
- }
1538
- if (props.customContent) {
1539
- return customList.value.map(function (item, index) {
1540
- return (0,external_vue_namespaceObject.createVNode)("div", {
1541
- "class": ["".concat(resolveClassName('slider-label')), props.vertical ? 'vertical' : 'horizontal'],
1542
- "key": index,
1543
- "style": getIntervalStyle(item.percent)
1544
- }, [item.label]);
1545
- });
1546
- }
1547
- return undefined;
1548
- }()]) : undefined, (0,external_vue_namespaceObject.createVNode)(slider_button, {
1549
- "modelValue": firstValue.value,
1550
- "onUpdate:modelValue": function onUpdateModelValue($event) {
1551
- return firstValue.value = $event;
1552
- },
1553
- "ref": firstbutton,
1554
- "params": buttonParms.value,
1555
- "onEmitChange": emitChange,
1556
- "onResetSize": resetSize
1557
- }, null), props.range ? (0,external_vue_namespaceObject.createVNode)(slider_button, {
1558
- "modelValue": secondValue.value,
1559
- "onUpdate:modelValue": function onUpdateModelValue($event) {
1560
- return secondValue.value = $event;
1561
- },
1562
- "ref": secondbutton,
1563
- "params": buttonParms.value,
1564
- "onEmitChange": emitChange,
1565
- "onResetSize": resetSize
1566
- }, null) : undefined]), props.showInput && !props.vertical ? (0,external_vue_namespaceObject.createVNode)("div", {
1567
- "class": "".concat(resolveClassName('slider-input'))
1568
- }, [(0,external_vue_namespaceObject.createVNode)("div", {
1569
- "class": "input-item"
1570
- }, [(0,external_vue_namespaceObject.createVNode)(external_input_namespaceObject["default"], {
1571
- "type": "number",
1572
- "modelValue": firstInput.value,
1573
- "max": props.maxValue,
1574
- "min": props.minValue,
1575
- "onChange": firstInputChange
1576
- }, null)]), showSecondInput.value && secondValue.value ? [(0,external_vue_namespaceObject.createVNode)("div", {
1577
- "class": "input-center"
1578
- }, [(0,external_vue_namespaceObject.createTextVNode)("\uFF5E")]), (0,external_vue_namespaceObject.createVNode)("div", {
1579
- "class": "input-item"
1580
- }, [(0,external_vue_namespaceObject.createVNode)(external_input_namespaceObject["default"], {
1581
- "type": "number",
1582
- "modelValue": secondInput.value,
1583
- "max": props.maxValue,
1584
- "min": props.minValue,
1585
- "onChange": secondInputChange
1586
- }, null)])] : undefined]) : undefined, (_b = slots.end) === null || _b === void 0 ? void 0 : _b.call(slots)]);
1587
- };
1588
- return {
1589
- renderDom: renderDom
1590
- };
1591
- },
1592
- render: function render() {
1593
- return this.renderDom();
1594
- }
1595
- }));
1596
- ;// CONCATENATED MODULE: ../../packages/slider/src/index.ts
1597
- /**
1598
- * Tencent is pleased to support the open source community by making
1599
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1600
- *
1601
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1602
- *
1603
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1604
- *
1605
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1606
- *
1607
- * ---------------------------------------------------
1608
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1609
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1610
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1611
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1612
- *
1613
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1614
- * the Software.
1615
- *
1616
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1617
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1618
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1619
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1620
- * IN THE SOFTWARE.
1621
- */
1622
-
1623
-
1624
- var Slider = (0,external_shared_namespaceObject.withInstall)(slider);
1625
- /* harmony default export */ const src = (Slider);
1626
- })();
1627
-
1628
- var __webpack_exports__default = __webpack_exports__.Z;
1629
- export { __webpack_exports__default as default };
1
+ /*! For license information please see index.js.LICENSE.txt */
2
+ import*as e from"../shared";import*as t from"vue";import*as a from"../config-provider";import*as r from"../input";import*as n from"../popover";var o={7609:(e,t,a)=>{var r=a(7425).default;function n(){e.exports=n=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},a=Object.prototype,o=a.hasOwnProperty,l=Object.defineProperty||function(e,t,a){e[t]=a.value},u="function"==typeof Symbol?Symbol:{},i=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function m(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{m({},"")}catch(e){m=function(e,t,a){return e[t]=a}}function v(e,t,a,r){var n=t&&t.prototype instanceof p?t:p,o=Object.create(n.prototype),u=new P(r||[]);return l(o,"_invoke",{value:L(e,a,u)}),o}function d(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}t.wrap=v;var f={};function p(){}function h(){}function V(){}var y={};m(y,i,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(S([])));x&&x!==a&&o.call(x,i)&&(y=x);var g=V.prototype=p.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){m(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function a(n,l,u,i){var c=d(e[n],e,l);if("throw"!==c.type){var s=c.arg,m=s.value;return m&&"object"==r(m)&&o.call(m,"__await")?t.resolve(m.__await).then((function(e){a("next",e,u,i)}),(function(e){a("throw",e,u,i)})):t.resolve(m).then((function(e){s.value=e,u(s)}),(function(e){return a("throw",e,u,i)}))}i(c.arg)}var n;l(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,n){a(e,r,t,n)}))}return n=n?n.then(o,o):o()}})}function L(e,t,a){var r="suspendedStart";return function(n,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===n)throw o;return{value:void 0,done:!0}}for(a.method=n,a.arg=o;;){var l=a.delegate;if(l){var u=E(l,a);if(u){if(u===f)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===r)throw r="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r="executing";var i=d(e,t,a);if("normal"===i.type){if(r=a.done?"completed":"suspendedYield",i.arg===f)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(r="completed",a.method="throw",a.arg=i.arg)}}}function E(e,t){var a=t.method,r=e.iterator[a];if(void 0===r)return t.delegate=null,"throw"===a&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==a&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+a+"' method")),f;var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function S(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function t(){for(;++a<e.length;)if(o.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:B}}function B(){return{value:void 0,done:!0}}return h.prototype=V,l(g,"constructor",{value:V,configurable:!0}),l(V,"constructor",{value:h,configurable:!0}),h.displayName=m(V,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,V):(e.__proto__=V,m(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e},t.awrap=function(e){return{__await:e}},w(N.prototype),m(N.prototype,c,(function(){return this})),t.AsyncIterator=N,t.async=function(e,a,r,n,o){void 0===o&&(o=Promise);var l=new N(v(e,a,r,n),o);return t.isGeneratorFunction(a)?l:l.next().then((function(e){return e.done?e.value:l.next()}))},w(g),m(g,s,"Generator"),m(g,i,(function(){return this})),m(g,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),a=[];for(var r in t)a.push(r);return a.reverse(),function e(){for(;a.length;){var r=a.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=S,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(a,r){return l.type="throw",l.arg=e,t.next=a,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r],l=n.completion;if("root"===n.tryLoc)return a("end");if(n.tryLoc<=this.prev){var u=o.call(n,"catchLoc"),i=o.call(n,"finallyLoc");if(u&&i){if(this.prev<n.catchLoc)return a(n.catchLoc,!0);if(this.prev<n.finallyLoc)return a(n.finallyLoc)}else if(u){if(this.prev<n.catchLoc)return a(n.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return a(n.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var n=r;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var l=n?n.completion:{};return l.type=e,l.arg=t,n?(this.method="next",this.next=n.finallyLoc,f):this.complete(l)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),C(a),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var r=a.completion;if("throw"===r.type){var n=r.arg;C(a)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,a){return this.delegate={iterator:S(e),resultName:t,nextLoc:a},"next"===this.method&&(this.arg=void 0),f}},t}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},7425:e=>{function t(a){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2841:(e,t,a)=>{var r=a(7609)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},l={};function u(e){var t=l[e];if(void 0!==t)return t.exports;var a=l[e]={exports:{}};return o[e](a,a.exports,u),a.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var a in t)u.o(t,a)&&!u.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i={};(()=>{u.d(i,{Z:()=>x});const o=(l={PlacementEnum:()=>e.PlacementEnum,PropTypes:()=>e.PropTypes,withInstall:()=>e.withInstall},c={},u.d(c,l),c);var l,c;const s=(e=>{var t={};return u.d(t,e),t})({Fragment:()=>t.Fragment,computed:()=>t.computed,createTextVNode:()=>t.createTextVNode,createVNode:()=>t.createVNode,defineComponent:()=>t.defineComponent,nextTick:()=>t.nextTick,onMounted:()=>t.onMounted,ref:()=>t.ref,watch:()=>t.watch});var m=u(2841),v=u.n(m);Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;const d=(e=>{var t={};return u.d(t,e),t})({usePrefix:()=>a.usePrefix}),f=(e=>{var t={};return u.d(t,e),t})({default:()=>r.default}),p=(e=>{var t={};return u.d(t,e),t})({default:()=>n.default}),h=(0,s.defineComponent)({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:function(){return{}}}},emits:["emitChange","resetSize","update:modelValue"],setup:function(e,t){var a=t.emit,r=(0,s.ref)(!1),n=(0,s.ref)(!1),l=(0,s.ref)(0),u=(0,s.ref)(0),i=(0,s.ref)(0),c=(0,s.ref)(null),m=(0,s.ref)(e.modelValue),v=(0,s.ref)(0),f=(0,s.ref)(0),h=(0,s.ref)(!1),b=(0,s.ref)(null),x=(0,s.computed)((function(){var t,a,r="";if(null===(t=e.params.customContent)||void 0===t?void 0:t[e.modelValue]){var n=e.params.customContent[e.modelValue];r=n.tip||n.label||""}var l=e.params.vertical?o.PlacementEnum.RIGHT:o.PlacementEnum.TOP;return(null===(a=e.params)||void 0===a?void 0:a.showTip)?{content:e.params.formatterTipLabel("".concat(r||(null==e?void 0:e.modelValue)||"0")),placement:l}:{content:"",placement:l}})),g=(0,s.computed)((function(){return"".concat((e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100,"%")})),w=(0,s.computed)((function(){return e.params.vertical?{bottom:g.value}:{left:g.value}})),N=(0,s.computed)((function(){return e.params.formatterButtonLabel(e.modelValue)})),L=function(t){e.params.disable||(t.preventDefault(),E(t),V(window,"mousemove",T),V(window,"touchmove",T),V(window,"mouseup",C),V(window,"touchend",C))},E=function(t){r.value=!0,n.value=!0,e.params.vertical?l.value=t.clientY:u.value=t.clientX,i.value=parseFloat(g.value),c.value=i.value},T=function(t){if(r.value){n.value=!1,a("resetSize");var o=0;e.params.vertical?(v.value=t.clientY,o=(l.value-v.value)/e.params.sliderSize*100):(f.value=t.clientX,o=(f.value-u.value)/e.params.sliderSize*100),c.value=i.value+o,P(c.value)}},C=function e(){h.value=!1,r.value&&(setTimeout((function(){r.value=!1,n.value||(P(c.value),a("emitChange"))}),0),y(window,"mousemove",T),y(window,"touchmove",T),y(window,"mouseup",e),y(window,"touchend",e))},P=function(t){if(null!==t&&!isNaN(t)){t<0?c.value=0:t>100&&(c.value=100);var n=100/((e.params.maxValue-e.params.minValue)/e.params.step),o=Math.round(t/n)*n*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;o=parseFloat(o.toFixed(e.params.precision)),a("update:modelValue",o),r.value||e.modelValue===m.value||(m.value=e.modelValue)}},S=(0,d.usePrefix)().resolveClassName;return{renderDom:function(){return(0,s.createVNode)("div",{class:["".concat(S("slider-button")),e.params.vertical?"vertical":"horizontal",{grabbing:r.value}],ref:b,tabindex:"0",style:w.value,onClick:function(e){return e.stopPropagation()},onMousedown:L},[Boolean(x.value.content)?(0,s.createVNode)(s.Fragment,null,[(0,s.createVNode)(p.default,{content:x.value.content,theme:"dark",placement:x.value.placement,boundary:document.body},{default:function(){return[(0,s.createVNode)("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]}})]):(0,s.createVNode)(s.Fragment,null,[(0,s.createVNode)("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]),e.params.showButtonLabel&&!e.params.showIntervalLabel?(0,s.createVNode)(s.Fragment,null,[(0,s.createVNode)("div",{class:["slider-button-label",e.params.vertical?"vertical":"horizontal"]},[N.value])]):null])},setPosition:P,tip:x}},render:function(){return this.renderDom()}});var V=function(e,t,a){e&&t&&a&&e.addEventListener(t,a,!1)},y=function(e,t,a){e&&t&&a&&e.removeEventListener(t,a,!1)};const b=(0,s.defineComponent)({name:"Slider",props:{modelValue:o.PropTypes.oneOfType([o.PropTypes.arrayOf(o.PropTypes.number),o.PropTypes.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:function(e){return e}},formatterButtonLabel:{type:Function,default:function(e){return e}},formatterTipLabel:{type:Function,default:function(e){return e}}},emits:["update:modelValue","change"],setup:function(e,t){var a=this,r=t.slots,n=t.emit,o=(0,s.ref)(1),l=(0,s.ref)(null),u=(0,s.ref)(null),i=(0,s.ref)(null),c=(0,s.ref)(0),m=(0,s.ref)(0),p=(0,s.ref)(null),y=(0,s.ref)(null),b=(0,s.ref)(null),x=(0,s.ref)(null),g=(0,s.computed)((function(){var t=[e.minValue,e.maxValue,e.step].map((function(e){var t="".concat(e).split(".")[1];return t?t.length:0}));return Math.max.apply(null,t)})),w=(0,s.computed)((function(){return Math.min(l.value,u.value)})),N=(0,s.computed)((function(){return Math.max(l.value,u.value)})),L=(0,s.computed)((function(){return e.range?"".concat(100*(N.value-w.value)/(e.maxValue-e.minValue),"%"):"".concat(100*(l.value-e.minValue)/(e.maxValue-e.minValue),"%")})),E=(0,s.computed)((function(){return e.range?"".concat(100*(w.value-e.minValue)/(e.maxValue-e.minValue),"%"):"0%"})),T=(0,s.computed)((function(){return e.vertical?{height:L.value,bottom:E.value}:{width:L.value,left:E.value}})),C=(0,s.computed)((function(){if(!e.showInterval||e.minValue>e.maxValue)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=(e.maxValue-e.minValue)/e.step,a=100*e.step/(e.maxValue-e.minValue),r=[],n=1;n<t;n++)r.push(n*a);return e.range?r.filter((function(t){return t<100*(w.value-e.minValue)/(e.maxValue-e.minValue)||t>100*(N.value-e.minValue)/(e.maxValue-e.minValue)})):r.filter((function(t){return t>100*(l.value-e.minValue)/(e.maxValue-e.minValue)}))})),P=(0,s.computed)((function(){return e.vertical?{height:e.height,width:"4px"}:{}})),S=(0,s.computed)((function(){if(!e.showIntervalLabel)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=100*e.step/(e.maxValue-e.minValue),a=[],r=e.minValue,n=0;r<=e.maxValue;r+=e.step,n++){var o={stepWidth:n*t,stepLabel:e.formatterLabel(r)};a.push(o)}return a})),B=(0,s.computed)((function(){return Array.isArray(e.modelValue)})),O=(0,s.computed)((function(){return e.customContent?Object.keys(e.customContent).sort((function(e,t){return Number(e)-Number(t)})).filter((function(t){return Number(t)>=e.minValue&&Number(t)<=e.maxValue})).map((function(t){var a=e.customContent[t].tip,r=e.customContent[t].label;return{tip:a||r||"",label:r||"",percent:(Number(t)-e.minValue)/(e.maxValue-e.minValue)*100}})):[]})),_=(0,s.computed)((function(){return{vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:g.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:o.value,formatterTipLabel:e.formatterTipLabel}}));(0,s.watch)((function(){return e.modelValue}),(function(){F()})),(0,s.watch)((function(){return l.value}),(function(t){e.range?n("update:modelValue",[w.value,N.value]):n("update:modelValue",t),c.value=t})),(0,s.watch)((function(){return u.value}),(function(e){n("update:modelValue",[w.value,N.value]),m.value=e})),(0,s.onMounted)((function(){e.range?(Array.isArray(e.modelValue)?(l.value=Math.max(e.minValue,Number(e.modelValue[0])),u.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(l.value=e.minValue,u.value=e.maxValue),i.value=[l.value,u.value]):("number"!=typeof e.modelValue||isNaN(e.modelValue)?l.value=e.minValue:l.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),i.value=l.value),j(),V(window,"resize",j())}));var j=function(){p.value&&(o.value=p.value["client".concat(e.vertical?"Height":"Width")])},I=function(t){var a,r;if(t.stopPropagation(),!e.disable){if(j(),e.vertical){var n=null===(a=p.value)||void 0===a?void 0:a.getBoundingClientRect().bottom;G((n-t.clientY)/o.value*100)}else{var l=null===(r=p.value)||void 0===r?void 0:r.getBoundingClientRect().left;G((t.clientX-l)/o.value*100)}M()}},k=function(){return e.range?![w.value,N.value].every((function(e,t){return e===i.value[t]})):e.modelValue!==i.value},F=function(){if(e.minValue>e.maxValue)console.error("min should not be greater than max.");else{var t=e.modelValue;e.range&&Array.isArray(t)?t[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):t[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):t[0]<e.minValue?n("update:modelValue",[e.minValue,t[1]]):t[1]>e.maxValue?n("update:modelValue",[t[0],e.maxValue]):(l.value=Number(t[0]),u.value=Number(t[1]),k()&&(i.value=t.slice())):e.range||"number"!=typeof t||isNaN(t)||(t<e.minValue?n("update:modelValue",e.minValue):t>e.maxValue?n("update:modelValue",e.maxValue):(l.value=t,k()&&(i.value=t)))}},M=function(){return t=a,r=void 0,o=void 0,l=v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,s.nextTick)();case 2:n("change",e.range?[w.value,N.value]:e.modelValue);case 3:case"end":return t.stop()}}),t)})),new(o||(o=Promise))((function(e,a){function n(e){try{i(l.next(e))}catch(e){a(e)}}function u(e){try{i(l.throw(e))}catch(e){a(e)}}function i(t){var a;t.done?e(t.value):(a=t.value,a instanceof o?a:new o((function(e){e(a)}))).then(n,u)}i((l=l.apply(t,r||[])).next())}));var t,r,o,l},z=function(t){return e.vertical?{bottom:"".concat(t,"%")}:{left:"".concat(t,"%")}},G=function(t){if(e.range){var a=e.minValue+t*(e.maxValue-e.minValue)/100;Math.abs(w.value-a)<Math.abs(N.value-a)?x.value=l.value<u.value?y.value:b.value:x.value=l.value>u.value?y.value:b.value,x.value.setPosition(t)}else y.value.setPosition(t)},A=function(t){if(""!==t){var a=parseFloat(t);a<e.minValue?(c.value=e.minValue,l.value=e.minValue):a>e.maxValue?(c.value=e.maxValue,l.value=e.maxValue):l.value=a}},R=function(t){if(""!==t){var a=parseFloat(t.toString());a<e.minValue?(m.value=e.minValue,u.value=e.minValue):a>e.maxValue?(m.value=e.maxValue,u.value=e.maxValue):u.value=a}},D=function(t){var a;return a="start"===t?e.vertical?e.maxValue:e.minValue:e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[l.value,u.value].includes(a)?"0":"1"},W=(0,d.usePrefix)().resolveClassName;return{renderDom:function(){var t,a;return(0,s.createVNode)("div",{class:["".concat(W("slider")),e.extCls]},[null===(t=r.start)||void 0===t?void 0:t.call(r),(0,s.createVNode)("div",{class:"".concat(W("slider-runway")),ref:p,style:P.value,onClick:I},[(0,s.createVNode)("div",{class:["".concat(W("slider-bar")),e.vertical?"vertical":"horizontal",{disable:e.disable}],style:T.value},null),e.showInterval?C.value.map((function(t,a){return(0,s.createVNode)("div",{key:a,class:["".concat(W("slider-interval")),{vertical:e.vertical}],style:z(t)},null)})):void 0,e.customContent?O.value.map((function(t,a){return(0,s.createVNode)("div",{key:a,class:["".concat(W("slider-interval")),{vertical:e.vertical}],style:z(t.percent)},null)})):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?(0,s.createVNode)("div",{class:["".concat(W("slider-labels")),e.vertical?"vertical":"horizontal"]},[e.showBetweenLabel?[(0,s.createVNode)("div",{class:"label-start",style:[{opacity:D("start")}]},[e.formatterLabel(e.minValue)]),(0,s.createVNode)("div",{class:"label-end",style:[{opacity:D("end")}]},[e.formatterLabel(e.maxValue)])]:e.showIntervalLabel?S.value.map((function(t,a){return(0,s.createVNode)("div",{class:["".concat(W("slider-label")),e.vertical?"vertical":"horizontal"],key:a,style:z(t.stepWidth)},[t.stepLabel])})):e.customContent?O.value.map((function(t,a){return(0,s.createVNode)("div",{class:["".concat(W("slider-label")),e.vertical?"vertical":"horizontal"],key:a,style:z(t.percent)},[t.label])})):void 0]):void 0,(0,s.createVNode)(h,{modelValue:l.value,"onUpdate:modelValue":function(e){return l.value=e},ref:y,params:_.value,onEmitChange:M,onResetSize:j},null),e.range?(0,s.createVNode)(h,{modelValue:u.value,"onUpdate:modelValue":function(e){return u.value=e},ref:b,params:_.value,onEmitChange:M,onResetSize:j},null):void 0]),e.showInput&&!e.vertical?(0,s.createVNode)("div",{class:"".concat(W("slider-input"))},[(0,s.createVNode)("div",{class:"input-item"},[(0,s.createVNode)(f.default,{type:"number",modelValue:c.value,max:e.maxValue,min:e.minValue,onChange:A},null)]),B.value&&u.value?[(0,s.createVNode)("div",{class:"input-center"},[(0,s.createTextVNode)("~")]),(0,s.createVNode)("div",{class:"input-item"},[(0,s.createVNode)(f.default,{type:"number",modelValue:m.value,max:e.maxValue,min:e.minValue,onChange:R},null)])]:void 0]):void 0,null===(a=r.end)||void 0===a?void 0:a.call(r)])}}},render:function(){return this.renderDom()}}),x=(0,o.withInstall)(b)})();var c=i.Z;export{c as default};