bk-magic-vue 2.3.2-beta.4 → 2.3.2-beta.6

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 (111) hide show
  1. package/dist/bk-magic-vue.css +4 -4
  2. package/dist/bk-magic-vue.js +1507 -2471
  3. package/dist/bk-magic-vue.min.css +1 -1
  4. package/dist/bk-magic-vue.min.css.gz +0 -0
  5. package/dist/bk-magic-vue.min.css.map +1 -1
  6. package/dist/bk-magic-vue.min.js +1 -1
  7. package/dist/bk-magic-vue.min.js.gz +0 -0
  8. package/dist/bk-magic-vue.min.js.map +1 -1
  9. package/lib/alert.js +5 -11
  10. package/lib/animate-number.js +2 -9
  11. package/lib/badge.js +7 -25
  12. package/lib/big-tree.js +2549 -2788
  13. package/lib/breadcrumb-item.js +3 -10
  14. package/lib/breadcrumb.js +1 -9
  15. package/lib/button.js +1 -9
  16. package/lib/card.js +41 -70
  17. package/lib/cascade.js +442 -698
  18. package/lib/checkbox-group.js +2 -16
  19. package/lib/checkbox.js +972 -1179
  20. package/lib/col.js +9 -17
  21. package/lib/collapse-item.js +1 -10
  22. package/lib/collapse.js +1 -9
  23. package/lib/color-picker.js +38 -96
  24. package/lib/compose-form-item.js +1 -4
  25. package/lib/container.js +3 -11
  26. package/lib/date-picker.js +202 -330
  27. package/lib/dialog.js +2572 -2782
  28. package/lib/diff.js +2 -10
  29. package/lib/directives/clickoutside.js +2 -2
  30. package/lib/directives/overflow-tips.js +57 -73
  31. package/lib/directives/tooltips.js +65 -79
  32. package/lib/directives/transfer-dom.js +1 -4
  33. package/lib/divider.js +1 -9
  34. package/lib/dropdown-menu.js +7 -17
  35. package/lib/exception.js +5 -14
  36. package/lib/fixed-navbar.js +2 -13
  37. package/lib/form-item.js +253 -483
  38. package/lib/form.js +5 -22
  39. package/lib/icon.js +4 -5
  40. package/lib/image-viewer.js +22 -35
  41. package/lib/image.js +45 -72
  42. package/lib/info-box.js +2701 -2918
  43. package/lib/input.js +10 -33
  44. package/lib/link.js +1 -9
  45. package/lib/loading.js +9 -21
  46. package/lib/locale/index.js +5 -11
  47. package/lib/message.js +10 -22
  48. package/lib/navigation-menu-group.js +0 -4
  49. package/lib/navigation-menu-item.js +6 -19
  50. package/lib/navigation-menu.js +1046 -1252
  51. package/lib/navigation.js +34 -39
  52. package/lib/notify.js +20 -34
  53. package/lib/option-group.js +5 -10
  54. package/lib/option.js +15 -20
  55. package/lib/pagination.js +6706 -7013
  56. package/lib/popconfirm.js +66 -83
  57. package/lib/popover.js +55 -66
  58. package/lib/process.js +2 -17
  59. package/lib/progress.js +4 -10
  60. package/lib/radio-button.js +6 -13
  61. package/lib/radio-group.js +2 -9
  62. package/lib/radio.js +6 -13
  63. package/lib/rate.js +5 -21
  64. package/lib/resize-layout.js +11 -20
  65. package/lib/round-progress.js +1 -9
  66. package/lib/row.js +5 -18
  67. package/lib/search-select.js +409 -635
  68. package/lib/select.js +5989 -6261
  69. package/lib/sideslider.js +1560 -1769
  70. package/lib/slider.js +78 -127
  71. package/lib/star.js +3 -11
  72. package/lib/steps.js +1754 -1961
  73. package/lib/swiper.js +20 -33
  74. package/lib/switcher.js +3 -12
  75. package/lib/tab-panel.js +2 -9
  76. package/lib/tab.js +2330 -2536
  77. package/lib/table-column.js +328 -547
  78. package/lib/table-setting-content.js +321 -558
  79. package/lib/table.js +566 -917
  80. package/lib/tag-input.js +397 -649
  81. package/lib/tag.js +2 -10
  82. package/lib/time-picker.js +144 -219
  83. package/lib/timeline.js +23 -35
  84. package/lib/transfer.js +111 -161
  85. package/lib/transition.js +1 -9
  86. package/lib/tree.js +31 -75
  87. package/lib/ui/bk-magic-vue.css +4 -4
  88. package/lib/ui/bk-magic-vue.min.css +1 -1
  89. package/lib/ui/bk-magic-vue.min.css.gz +0 -0
  90. package/lib/ui/bk-magic-vue.min.css.map +1 -1
  91. package/lib/ui/button.css +1 -1
  92. package/lib/ui/button.min.css +1 -1
  93. package/lib/ui/button.min.css.map +1 -1
  94. package/lib/ui/dialog.css +2 -2
  95. package/lib/ui/dialog.min.css +1 -1
  96. package/lib/ui/dialog.min.css.map +1 -1
  97. package/lib/ui/info-box.css +2 -2
  98. package/lib/ui/info-box.min.css +1 -1
  99. package/lib/ui/info-box.min.css.map +1 -1
  100. package/lib/ui/popconfirm.css +1 -1
  101. package/lib/ui/popconfirm.min.css +1 -1
  102. package/lib/ui/popconfirm.min.css.map +1 -1
  103. package/lib/upload.js +63 -87
  104. package/lib/utils/deepmerge.js +5 -11
  105. package/lib/utils/pinyin.js +5 -11
  106. package/lib/utils/pop-manager.js +2 -2
  107. package/lib/utils/tippy.js +48 -49
  108. package/lib/version-detail.js +5854 -6081
  109. package/lib/virtual-scroll.js +17 -23
  110. package/lib/zoom-image.js +3 -11
  111. package/package.json +1 -1
package/lib/sideslider.js CHANGED
@@ -1,1774 +1,1565 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('bk-magic-vue/lib/locale'), require('vue')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'bk-magic-vue/lib/locale', 'vue'], factory) :
4
- (global = global || self, factory(global.library = {}, global.locale, global.Vue));
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('bk-magic-vue/lib/locale'), require('vue')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'bk-magic-vue/lib/locale', 'vue'], factory) :
4
+ (global = global || self, factory(global.library = {}, global.locale, global.Vue));
5
5
  }(this, function (exports, locale, Vue) { 'use strict';
6
6
 
7
- locale = locale && locale.hasOwnProperty('default') ? locale['default'] : locale;
8
- Vue = Vue && Vue.hasOwnProperty('default') ? Vue['default'] : Vue;
9
-
10
- function createCommonjsModule(fn, module) {
11
- return module = { exports: {} }, fn(module, module.exports), module.exports;
12
- }
13
-
14
- var runtime_1 = createCommonjsModule(function (module) {
15
- var runtime = (function (exports) {
16
- var Op = Object.prototype;
17
- var hasOwn = Op.hasOwnProperty;
18
- var undefined$1;
19
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
20
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
21
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
22
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
23
- function define(obj, key, value) {
24
- Object.defineProperty(obj, key, {
25
- value: value,
26
- enumerable: true,
27
- configurable: true,
28
- writable: true
29
- });
30
- return obj[key];
31
- }
32
- try {
33
- define({}, "");
34
- } catch (err) {
35
- define = function(obj, key, value) {
36
- return obj[key] = value;
37
- };
38
- }
39
- function wrap(innerFn, outerFn, self, tryLocsList) {
40
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
41
- var generator = Object.create(protoGenerator.prototype);
42
- var context = new Context(tryLocsList || []);
43
- generator._invoke = makeInvokeMethod(innerFn, self, context);
44
- return generator;
45
- }
46
- exports.wrap = wrap;
47
- function tryCatch(fn, obj, arg) {
48
- try {
49
- return { type: "normal", arg: fn.call(obj, arg) };
50
- } catch (err) {
51
- return { type: "throw", arg: err };
52
- }
53
- }
54
- var GenStateSuspendedStart = "suspendedStart";
55
- var GenStateSuspendedYield = "suspendedYield";
56
- var GenStateExecuting = "executing";
57
- var GenStateCompleted = "completed";
58
- var ContinueSentinel = {};
59
- function Generator() {}
60
- function GeneratorFunction() {}
61
- function GeneratorFunctionPrototype() {}
62
- var IteratorPrototype = {};
63
- IteratorPrototype[iteratorSymbol] = function () {
64
- return this;
65
- };
66
- var getProto = Object.getPrototypeOf;
67
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
68
- if (NativeIteratorPrototype &&
69
- NativeIteratorPrototype !== Op &&
70
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
71
- IteratorPrototype = NativeIteratorPrototype;
72
- }
73
- var Gp = GeneratorFunctionPrototype.prototype =
74
- Generator.prototype = Object.create(IteratorPrototype);
75
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
76
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
77
- GeneratorFunction.displayName = define(
78
- GeneratorFunctionPrototype,
79
- toStringTagSymbol,
80
- "GeneratorFunction"
81
- );
82
- function defineIteratorMethods(prototype) {
83
- ["next", "throw", "return"].forEach(function(method) {
84
- define(prototype, method, function(arg) {
85
- return this._invoke(method, arg);
86
- });
87
- });
88
- }
89
- exports.isGeneratorFunction = function(genFun) {
90
- var ctor = typeof genFun === "function" && genFun.constructor;
91
- return ctor
92
- ? ctor === GeneratorFunction ||
93
- (ctor.displayName || ctor.name) === "GeneratorFunction"
94
- : false;
95
- };
96
- exports.mark = function(genFun) {
97
- if (Object.setPrototypeOf) {
98
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
99
- } else {
100
- genFun.__proto__ = GeneratorFunctionPrototype;
101
- define(genFun, toStringTagSymbol, "GeneratorFunction");
102
- }
103
- genFun.prototype = Object.create(Gp);
104
- return genFun;
105
- };
106
- exports.awrap = function(arg) {
107
- return { __await: arg };
108
- };
109
- function AsyncIterator(generator, PromiseImpl) {
110
- function invoke(method, arg, resolve, reject) {
111
- var record = tryCatch(generator[method], generator, arg);
112
- if (record.type === "throw") {
113
- reject(record.arg);
114
- } else {
115
- var result = record.arg;
116
- var value = result.value;
117
- if (value &&
118
- typeof value === "object" &&
119
- hasOwn.call(value, "__await")) {
120
- return PromiseImpl.resolve(value.__await).then(function(value) {
121
- invoke("next", value, resolve, reject);
122
- }, function(err) {
123
- invoke("throw", err, resolve, reject);
124
- });
125
- }
126
- return PromiseImpl.resolve(value).then(function(unwrapped) {
127
- result.value = unwrapped;
128
- resolve(result);
129
- }, function(error) {
130
- return invoke("throw", error, resolve, reject);
131
- });
132
- }
133
- }
134
- var previousPromise;
135
- function enqueue(method, arg) {
136
- function callInvokeWithMethodAndArg() {
137
- return new PromiseImpl(function(resolve, reject) {
138
- invoke(method, arg, resolve, reject);
139
- });
140
- }
141
- return previousPromise =
142
- previousPromise ? previousPromise.then(
143
- callInvokeWithMethodAndArg,
144
- callInvokeWithMethodAndArg
145
- ) : callInvokeWithMethodAndArg();
146
- }
147
- this._invoke = enqueue;
148
- }
149
- defineIteratorMethods(AsyncIterator.prototype);
150
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
151
- return this;
152
- };
153
- exports.AsyncIterator = AsyncIterator;
154
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
155
- if (PromiseImpl === void 0) PromiseImpl = Promise;
156
- var iter = new AsyncIterator(
157
- wrap(innerFn, outerFn, self, tryLocsList),
158
- PromiseImpl
159
- );
160
- return exports.isGeneratorFunction(outerFn)
161
- ? iter
162
- : iter.next().then(function(result) {
163
- return result.done ? result.value : iter.next();
164
- });
165
- };
166
- function makeInvokeMethod(innerFn, self, context) {
167
- var state = GenStateSuspendedStart;
168
- return function invoke(method, arg) {
169
- if (state === GenStateExecuting) {
170
- throw new Error("Generator is already running");
171
- }
172
- if (state === GenStateCompleted) {
173
- if (method === "throw") {
174
- throw arg;
175
- }
176
- return doneResult();
177
- }
178
- context.method = method;
179
- context.arg = arg;
180
- while (true) {
181
- var delegate = context.delegate;
182
- if (delegate) {
183
- var delegateResult = maybeInvokeDelegate(delegate, context);
184
- if (delegateResult) {
185
- if (delegateResult === ContinueSentinel) continue;
186
- return delegateResult;
187
- }
188
- }
189
- if (context.method === "next") {
190
- context.sent = context._sent = context.arg;
191
- } else if (context.method === "throw") {
192
- if (state === GenStateSuspendedStart) {
193
- state = GenStateCompleted;
194
- throw context.arg;
195
- }
196
- context.dispatchException(context.arg);
197
- } else if (context.method === "return") {
198
- context.abrupt("return", context.arg);
199
- }
200
- state = GenStateExecuting;
201
- var record = tryCatch(innerFn, self, context);
202
- if (record.type === "normal") {
203
- state = context.done
204
- ? GenStateCompleted
205
- : GenStateSuspendedYield;
206
- if (record.arg === ContinueSentinel) {
207
- continue;
208
- }
209
- return {
210
- value: record.arg,
211
- done: context.done
212
- };
213
- } else if (record.type === "throw") {
214
- state = GenStateCompleted;
215
- context.method = "throw";
216
- context.arg = record.arg;
217
- }
218
- }
219
- };
220
- }
221
- function maybeInvokeDelegate(delegate, context) {
222
- var method = delegate.iterator[context.method];
223
- if (method === undefined$1) {
224
- context.delegate = null;
225
- if (context.method === "throw") {
226
- if (delegate.iterator["return"]) {
227
- context.method = "return";
228
- context.arg = undefined$1;
229
- maybeInvokeDelegate(delegate, context);
230
- if (context.method === "throw") {
231
- return ContinueSentinel;
232
- }
233
- }
234
- context.method = "throw";
235
- context.arg = new TypeError(
236
- "The iterator does not provide a 'throw' method");
237
- }
238
- return ContinueSentinel;
239
- }
240
- var record = tryCatch(method, delegate.iterator, context.arg);
241
- if (record.type === "throw") {
242
- context.method = "throw";
243
- context.arg = record.arg;
244
- context.delegate = null;
245
- return ContinueSentinel;
246
- }
247
- var info = record.arg;
248
- if (! info) {
249
- context.method = "throw";
250
- context.arg = new TypeError("iterator result is not an object");
251
- context.delegate = null;
252
- return ContinueSentinel;
253
- }
254
- if (info.done) {
255
- context[delegate.resultName] = info.value;
256
- context.next = delegate.nextLoc;
257
- if (context.method !== "return") {
258
- context.method = "next";
259
- context.arg = undefined$1;
260
- }
261
- } else {
262
- return info;
263
- }
264
- context.delegate = null;
265
- return ContinueSentinel;
266
- }
267
- defineIteratorMethods(Gp);
268
- define(Gp, toStringTagSymbol, "Generator");
269
- Gp[iteratorSymbol] = function() {
270
- return this;
271
- };
272
- Gp.toString = function() {
273
- return "[object Generator]";
274
- };
275
- function pushTryEntry(locs) {
276
- var entry = { tryLoc: locs[0] };
277
- if (1 in locs) {
278
- entry.catchLoc = locs[1];
279
- }
280
- if (2 in locs) {
281
- entry.finallyLoc = locs[2];
282
- entry.afterLoc = locs[3];
283
- }
284
- this.tryEntries.push(entry);
285
- }
286
- function resetTryEntry(entry) {
287
- var record = entry.completion || {};
288
- record.type = "normal";
289
- delete record.arg;
290
- entry.completion = record;
291
- }
292
- function Context(tryLocsList) {
293
- this.tryEntries = [{ tryLoc: "root" }];
294
- tryLocsList.forEach(pushTryEntry, this);
295
- this.reset(true);
296
- }
297
- exports.keys = function(object) {
298
- var keys = [];
299
- for (var key in object) {
300
- keys.push(key);
301
- }
302
- keys.reverse();
303
- return function next() {
304
- while (keys.length) {
305
- var key = keys.pop();
306
- if (key in object) {
307
- next.value = key;
308
- next.done = false;
309
- return next;
310
- }
311
- }
312
- next.done = true;
313
- return next;
314
- };
315
- };
316
- function values(iterable) {
317
- if (iterable) {
318
- var iteratorMethod = iterable[iteratorSymbol];
319
- if (iteratorMethod) {
320
- return iteratorMethod.call(iterable);
321
- }
322
- if (typeof iterable.next === "function") {
323
- return iterable;
324
- }
325
- if (!isNaN(iterable.length)) {
326
- var i = -1, next = function next() {
327
- while (++i < iterable.length) {
328
- if (hasOwn.call(iterable, i)) {
329
- next.value = iterable[i];
330
- next.done = false;
331
- return next;
332
- }
333
- }
334
- next.value = undefined$1;
335
- next.done = true;
336
- return next;
337
- };
338
- return next.next = next;
339
- }
340
- }
341
- return { next: doneResult };
342
- }
343
- exports.values = values;
344
- function doneResult() {
345
- return { value: undefined$1, done: true };
346
- }
347
- Context.prototype = {
348
- constructor: Context,
349
- reset: function(skipTempReset) {
350
- this.prev = 0;
351
- this.next = 0;
352
- this.sent = this._sent = undefined$1;
353
- this.done = false;
354
- this.delegate = null;
355
- this.method = "next";
356
- this.arg = undefined$1;
357
- this.tryEntries.forEach(resetTryEntry);
358
- if (!skipTempReset) {
359
- for (var name in this) {
360
- if (name.charAt(0) === "t" &&
361
- hasOwn.call(this, name) &&
362
- !isNaN(+name.slice(1))) {
363
- this[name] = undefined$1;
364
- }
365
- }
366
- }
367
- },
368
- stop: function() {
369
- this.done = true;
370
- var rootEntry = this.tryEntries[0];
371
- var rootRecord = rootEntry.completion;
372
- if (rootRecord.type === "throw") {
373
- throw rootRecord.arg;
374
- }
375
- return this.rval;
376
- },
377
- dispatchException: function(exception) {
378
- if (this.done) {
379
- throw exception;
380
- }
381
- var context = this;
382
- function handle(loc, caught) {
383
- record.type = "throw";
384
- record.arg = exception;
385
- context.next = loc;
386
- if (caught) {
387
- context.method = "next";
388
- context.arg = undefined$1;
389
- }
390
- return !! caught;
391
- }
392
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
393
- var entry = this.tryEntries[i];
394
- var record = entry.completion;
395
- if (entry.tryLoc === "root") {
396
- return handle("end");
397
- }
398
- if (entry.tryLoc <= this.prev) {
399
- var hasCatch = hasOwn.call(entry, "catchLoc");
400
- var hasFinally = hasOwn.call(entry, "finallyLoc");
401
- if (hasCatch && hasFinally) {
402
- if (this.prev < entry.catchLoc) {
403
- return handle(entry.catchLoc, true);
404
- } else if (this.prev < entry.finallyLoc) {
405
- return handle(entry.finallyLoc);
406
- }
407
- } else if (hasCatch) {
408
- if (this.prev < entry.catchLoc) {
409
- return handle(entry.catchLoc, true);
410
- }
411
- } else if (hasFinally) {
412
- if (this.prev < entry.finallyLoc) {
413
- return handle(entry.finallyLoc);
414
- }
415
- } else {
416
- throw new Error("try statement without catch or finally");
417
- }
418
- }
419
- }
420
- },
421
- abrupt: function(type, arg) {
422
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
423
- var entry = this.tryEntries[i];
424
- if (entry.tryLoc <= this.prev &&
425
- hasOwn.call(entry, "finallyLoc") &&
426
- this.prev < entry.finallyLoc) {
427
- var finallyEntry = entry;
428
- break;
429
- }
430
- }
431
- if (finallyEntry &&
432
- (type === "break" ||
433
- type === "continue") &&
434
- finallyEntry.tryLoc <= arg &&
435
- arg <= finallyEntry.finallyLoc) {
436
- finallyEntry = null;
437
- }
438
- var record = finallyEntry ? finallyEntry.completion : {};
439
- record.type = type;
440
- record.arg = arg;
441
- if (finallyEntry) {
442
- this.method = "next";
443
- this.next = finallyEntry.finallyLoc;
444
- return ContinueSentinel;
445
- }
446
- return this.complete(record);
447
- },
448
- complete: function(record, afterLoc) {
449
- if (record.type === "throw") {
450
- throw record.arg;
451
- }
452
- if (record.type === "break" ||
453
- record.type === "continue") {
454
- this.next = record.arg;
455
- } else if (record.type === "return") {
456
- this.rval = this.arg = record.arg;
457
- this.method = "return";
458
- this.next = "end";
459
- } else if (record.type === "normal" && afterLoc) {
460
- this.next = afterLoc;
461
- }
462
- return ContinueSentinel;
463
- },
464
- finish: function(finallyLoc) {
465
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
466
- var entry = this.tryEntries[i];
467
- if (entry.finallyLoc === finallyLoc) {
468
- this.complete(entry.completion, entry.afterLoc);
469
- resetTryEntry(entry);
470
- return ContinueSentinel;
471
- }
472
- }
473
- },
474
- "catch": function(tryLoc) {
475
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
476
- var entry = this.tryEntries[i];
477
- if (entry.tryLoc === tryLoc) {
478
- var record = entry.completion;
479
- if (record.type === "throw") {
480
- var thrown = record.arg;
481
- resetTryEntry(entry);
482
- }
483
- return thrown;
484
- }
485
- }
486
- throw new Error("illegal catch attempt");
487
- },
488
- delegateYield: function(iterable, resultName, nextLoc) {
489
- this.delegate = {
490
- iterator: values(iterable),
491
- resultName: resultName,
492
- nextLoc: nextLoc
493
- };
494
- if (this.method === "next") {
495
- this.arg = undefined$1;
496
- }
497
- return ContinueSentinel;
498
- }
499
- };
500
- return exports;
501
- }(
502
- module.exports
503
- ));
504
- try {
505
- regeneratorRuntime = runtime;
506
- } catch (accidentalStrictMode) {
507
- Function("r", "regeneratorRuntime = r")(runtime);
508
- }
509
- });
510
-
511
- var regenerator = runtime_1;
512
-
513
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
514
- try {
515
- var info = gen[key](arg);
516
- var value = info.value;
517
- } catch (error) {
518
- reject(error);
519
- return;
520
- }
521
-
522
- if (info.done) {
523
- resolve(value);
524
- } else {
525
- Promise.resolve(value).then(_next, _throw);
526
- }
527
- }
528
-
529
- function _asyncToGenerator(fn) {
530
- return function () {
531
- var self = this,
532
- args = arguments;
533
- return new Promise(function (resolve, reject) {
534
- var gen = fn.apply(self, args);
535
-
536
- function _next(value) {
537
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
538
- }
539
-
540
- function _throw(err) {
541
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
542
- }
543
-
544
- _next(undefined);
545
- });
546
- };
547
- }
548
-
549
- function _extends() {
550
- _extends = Object.assign || function (target) {
551
- for (var i = 1; i < arguments.length; i++) {
552
- var source = arguments[i];
553
-
554
- for (var key in source) {
555
- if (Object.prototype.hasOwnProperty.call(source, key)) {
556
- target[key] = source[key];
557
- }
558
- }
559
- }
560
-
561
- return target;
562
- };
563
-
564
- return _extends.apply(this, arguments);
565
- }
566
-
567
- var _global = createCommonjsModule(function (module) {
568
- var global = module.exports = typeof window != 'undefined' && window.Math == Math
569
- ? window : typeof self != 'undefined' && self.Math == Math ? self
570
- : Function('return this')();
571
- if (typeof __g == 'number') __g = global;
572
- });
573
-
574
- var _core = createCommonjsModule(function (module) {
575
- var core = module.exports = { version: '2.6.12' };
576
- if (typeof __e == 'number') __e = core;
577
- });
578
- var _core_1 = _core.version;
579
-
580
- var _aFunction = function (it) {
581
- if (typeof it != 'function') throw TypeError(it + ' is not a function!');
582
- return it;
583
- };
584
-
585
- var _ctx = function (fn, that, length) {
586
- _aFunction(fn);
587
- if (that === undefined) return fn;
588
- switch (length) {
589
- case 1: return function (a) {
590
- return fn.call(that, a);
591
- };
592
- case 2: return function (a, b) {
593
- return fn.call(that, a, b);
594
- };
595
- case 3: return function (a, b, c) {
596
- return fn.call(that, a, b, c);
597
- };
598
- }
599
- return function () {
600
- return fn.apply(that, arguments);
601
- };
602
- };
603
-
604
- var _isObject = function (it) {
605
- return typeof it === 'object' ? it !== null : typeof it === 'function';
606
- };
607
-
608
- var _anObject = function (it) {
609
- if (!_isObject(it)) throw TypeError(it + ' is not an object!');
610
- return it;
611
- };
612
-
613
- var _fails = function (exec) {
614
- try {
615
- return !!exec();
616
- } catch (e) {
617
- return true;
618
- }
619
- };
620
-
621
- var _descriptors = !_fails(function () {
622
- return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
623
- });
624
-
625
- var document$1 = _global.document;
626
- var is = _isObject(document$1) && _isObject(document$1.createElement);
627
- var _domCreate = function (it) {
628
- return is ? document$1.createElement(it) : {};
629
- };
630
-
631
- var _ie8DomDefine = !_descriptors && !_fails(function () {
632
- return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7;
633
- });
634
-
635
- var _toPrimitive = function (it, S) {
636
- if (!_isObject(it)) return it;
637
- var fn, val;
638
- if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
639
- if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val;
640
- if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
641
- throw TypeError("Can't convert object to primitive value");
642
- };
643
-
644
- var dP = Object.defineProperty;
645
- var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
646
- _anObject(O);
647
- P = _toPrimitive(P, true);
648
- _anObject(Attributes);
649
- if (_ie8DomDefine) try {
650
- return dP(O, P, Attributes);
651
- } catch (e) { }
652
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
653
- if ('value' in Attributes) O[P] = Attributes.value;
654
- return O;
655
- };
656
- var _objectDp = {
657
- f: f
658
- };
659
-
660
- var _propertyDesc = function (bitmap, value) {
661
- return {
662
- enumerable: !(bitmap & 1),
663
- configurable: !(bitmap & 2),
664
- writable: !(bitmap & 4),
665
- value: value
666
- };
667
- };
668
-
669
- var _hide = _descriptors ? function (object, key, value) {
670
- return _objectDp.f(object, key, _propertyDesc(1, value));
671
- } : function (object, key, value) {
672
- object[key] = value;
673
- return object;
674
- };
675
-
676
- var hasOwnProperty = {}.hasOwnProperty;
677
- var _has = function (it, key) {
678
- return hasOwnProperty.call(it, key);
679
- };
680
-
681
- var PROTOTYPE = 'prototype';
682
- var $export = function (type, name, source) {
683
- var IS_FORCED = type & $export.F;
684
- var IS_GLOBAL = type & $export.G;
685
- var IS_STATIC = type & $export.S;
686
- var IS_PROTO = type & $export.P;
687
- var IS_BIND = type & $export.B;
688
- var IS_WRAP = type & $export.W;
689
- var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});
690
- var expProto = exports[PROTOTYPE];
691
- var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] : (_global[name] || {})[PROTOTYPE];
692
- var key, own, out;
693
- if (IS_GLOBAL) source = name;
694
- for (key in source) {
695
- own = !IS_FORCED && target && target[key] !== undefined;
696
- if (own && _has(exports, key)) continue;
697
- out = own ? target[key] : source[key];
698
- exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
699
- : IS_BIND && own ? _ctx(out, _global)
700
- : IS_WRAP && target[key] == out ? (function (C) {
701
- var F = function (a, b, c) {
702
- if (this instanceof C) {
703
- switch (arguments.length) {
704
- case 0: return new C();
705
- case 1: return new C(a);
706
- case 2: return new C(a, b);
707
- } return new C(a, b, c);
708
- } return C.apply(this, arguments);
709
- };
710
- F[PROTOTYPE] = C[PROTOTYPE];
711
- return F;
712
- })(out) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out;
713
- if (IS_PROTO) {
714
- (exports.virtual || (exports.virtual = {}))[key] = out;
715
- if (type & $export.R && expProto && !expProto[key]) _hide(expProto, key, out);
716
- }
717
- }
718
- };
719
- $export.F = 1;
720
- $export.G = 2;
721
- $export.S = 4;
722
- $export.P = 8;
723
- $export.B = 16;
724
- $export.W = 32;
725
- $export.U = 64;
726
- $export.R = 128;
727
- var _export = $export;
728
-
729
- var _defined = function (it) {
730
- if (it == undefined) throw TypeError("Can't call method on " + it);
731
- return it;
732
- };
733
-
734
- var _stringWs = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
735
- '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
736
-
737
- var space = '[' + _stringWs + ']';
738
- var non = '\u200b\u0085';
739
- var ltrim = RegExp('^' + space + space + '*');
740
- var rtrim = RegExp(space + space + '*$');
741
- var exporter = function (KEY, exec, ALIAS) {
742
- var exp = {};
743
- var FORCE = _fails(function () {
744
- return !!_stringWs[KEY]() || non[KEY]() != non;
745
- });
746
- var fn = exp[KEY] = FORCE ? exec(trim) : _stringWs[KEY];
747
- if (ALIAS) exp[ALIAS] = fn;
748
- _export(_export.P + _export.F * FORCE, 'String', exp);
749
- };
750
- var trim = exporter.trim = function (string, TYPE) {
751
- string = String(_defined(string));
752
- if (TYPE & 1) string = string.replace(ltrim, '');
753
- if (TYPE & 2) string = string.replace(rtrim, '');
754
- return string;
755
- };
756
- var _stringTrim = exporter;
757
-
758
- var $parseFloat = _global.parseFloat;
759
- var $trim = _stringTrim.trim;
760
- var _parseFloat = 1 / $parseFloat(_stringWs + '-0') !== -Infinity ? function parseFloat(str) {
761
- var string = $trim(String(str), 3);
762
- var result = $parseFloat(string);
763
- return result === 0 && string.charAt(0) == '-' ? -0 : result;
764
- } : $parseFloat;
765
-
766
- _export(_export.G + _export.F * (parseFloat != _parseFloat), { parseFloat: _parseFloat });
767
-
768
- var _parseFloat$1 = _core.parseFloat;
769
-
770
- var $parseInt = _global.parseInt;
771
- var $trim$1 = _stringTrim.trim;
772
- var hex = /^[-+]?0[xX]/;
773
- var _parseInt = $parseInt(_stringWs + '08') !== 8 || $parseInt(_stringWs + '0x16') !== 22 ? function parseInt(str, radix) {
774
- var string = $trim$1(String(str), 3);
775
- return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
776
- } : $parseInt;
777
-
778
- _export(_export.G + _export.F * (parseInt != _parseInt), { parseInt: _parseInt });
779
-
780
- var _parseInt$1 = _core.parseInt;
781
-
782
- var toString = {}.toString;
783
- var _cof = function (it) {
784
- return toString.call(it).slice(8, -1);
785
- };
786
-
787
- var _isArray = Array.isArray || function isArray(arg) {
788
- return _cof(arg) == 'Array';
789
- };
790
-
791
- _export(_export.S, 'Array', { isArray: _isArray });
792
-
793
- var isArray = _core.Array.isArray;
794
-
795
- function addClass(node, className) {
796
- var classNames = className.split(' ');
797
- if (node.nodeType === 1) {
798
- if (!node.className && classNames.length === 1) {
799
- node.className = className;
800
- } else {
801
- var setClass = ' ' + node.className + ' ';
802
- classNames.forEach(function (cl) {
803
- if (setClass.indexOf(' ' + cl + ' ') < 0) {
804
- setClass += cl + ' ';
805
- }
806
- });
807
- var rtrim = /^\s+|\s+$/;
808
- node.className = setClass.replace(rtrim, '');
809
- }
810
- }
811
- }
812
- function removeClass(node, className) {
813
- var classNames = className.split(' ');
814
- if (node.nodeType === 1) {
815
- var setClass = ' ' + node.className + ' ';
816
- classNames.forEach(function (cl) {
817
- setClass = setClass.replace(' ' + cl + ' ', ' ');
818
- });
819
- var rtrim = /^\s+|\s+$/;
820
- node.className = setClass.replace(rtrim, '');
821
- }
822
- }
823
- var requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {
824
- window.setTimeout(callback, 1000 / 60);
825
- };
826
- var cancelAnimationFrame = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame || function (id) {
827
- window.clearTimeout(id);
828
- };
829
- function uuid() {
830
- var id = '';
831
- var randomNum = Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
832
- for (var i = 0; i < 7; i++) {
833
- id += randomNum;
834
- }
835
- return id;
836
- }
837
-
838
- var requestFrame = function () {
839
- var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function (fn) {
840
- return window.setTimeout(fn, 20);
841
- };
842
- return function (fn) {
843
- return raf(fn);
844
- };
845
- }();
846
- var cancelFrame = function () {
847
- var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;
848
- return function (id) {
849
- return cancel(id);
850
- };
851
- }();
852
- var resetTrigger = function resetTrigger(element) {
853
- var trigger = element.__resizeTrigger__;
854
- var expand = trigger.firstElementChild;
855
- var contract = trigger.lastElementChild;
856
- var expandChild = expand.firstElementChild;
857
- contract.scrollLeft = contract.scrollWidth;
858
- contract.scrollTop = contract.scrollHeight;
859
- expandChild.style.width = expand.offsetWidth + 1 + 'px';
860
- expandChild.style.height = expand.offsetHeight + 1 + 'px';
861
- expand.scrollLeft = expand.scrollWidth;
862
- expand.scrollTop = expand.scrollHeight;
863
- };
864
- var checkTriggers = function checkTriggers(element) {
865
- return element.offsetWidth !== element.__resizeLast__.width || element.offsetHeight !== element.__resizeLast__.height;
866
- };
867
- var scrollListener = function scrollListener(event) {
868
- var _this = this;
869
- resetTrigger(this);
870
- if (this.__resizeRAF__) cancelFrame(this.__resizeRAF__);
871
- this.__resizeRAF__ = requestFrame(function () {
872
- if (checkTriggers(_this)) {
873
- _this.__resizeLast__.width = _this.offsetWidth;
874
- _this.__resizeLast__.height = _this.offsetHeight;
875
- _this.__resizeListeners__.forEach(function (fn) {
876
- fn.call(_this, event);
877
- });
878
- }
879
- });
880
- };
881
- var attachEvent = document.attachEvent;
882
- var DOM_PREFIXES = 'Webkit Moz O ms'.split(' ');
883
- var START_EVENTS = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' ');
884
- var RESIZE_ANIMATION_NAME = 'resizeanim';
885
- var animation = false;
886
- var keyFramePrefix = '';
887
- var animationStartEvent = 'animationstart';
888
- if (!attachEvent) {
889
- var testElement = document.createElement('fakeelement');
890
- if (testElement.style.animationName !== undefined) {
891
- animation = true;
892
- }
893
- if (animation === false) {
894
- var prefix = '';
895
- for (var i = 0; i < DOM_PREFIXES.length; i++) {
896
- if (testElement.style[DOM_PREFIXES[i] + 'AnimationName'] !== undefined) {
897
- prefix = DOM_PREFIXES[i];
898
- keyFramePrefix = '-' + prefix.toLowerCase() + '-';
899
- animationStartEvent = START_EVENTS[i];
900
- animation = true;
901
- break;
902
- }
903
- }
904
- }
905
- }
906
- var stylesCreated = false;
907
- var createStyles = function createStyles() {
908
- if (!stylesCreated) {
909
- var animationKeyframes = "@".concat(keyFramePrefix, "keyframes ").concat(RESIZE_ANIMATION_NAME, " { from { opacity: 0; } to { opacity: 0; } } ");
910
- var animationStyle = "".concat(keyFramePrefix, "animation: 1ms ").concat(RESIZE_ANIMATION_NAME, ";");
911
- var css = "".concat(animationKeyframes, "\n .resize-triggers { ").concat(animationStyle, " visibility: hidden; opacity: 0; }\n .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1 }\n .resize-triggers > div { background: #eee; overflow: auto; }\n .contract-trigger:before { width: 200%; height: 200%; }");
912
- var head = document.head || document.getElementsByTagName('head')[0];
913
- var style = document.createElement('style');
914
- style.type = 'text/css';
915
- if (style.styleSheet) {
916
- style.styleSheet.cssText = css;
917
- } else {
918
- style.appendChild(document.createTextNode(css));
919
- }
920
- head.appendChild(style);
921
- stylesCreated = true;
922
- }
923
- };
924
- var addResizeListener = function addResizeListener(element, fn) {
925
- if (attachEvent) {
926
- element.attachEvent('onresize', fn);
927
- } else {
928
- if (!element.__resizeTrigger__) {
929
- if (getComputedStyle(element).position === 'static') {
930
- element.style.position = 'relative';
931
- }
932
- createStyles();
933
- element.__resizeLast__ = {};
934
- element.__resizeListeners__ = [];
935
- var resizeTrigger = element.__resizeTrigger__ = document.createElement('div');
936
- resizeTrigger.className = 'resize-triggers';
937
- resizeTrigger.innerHTML = '<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';
938
- element.appendChild(resizeTrigger);
939
- resetTrigger(element);
940
- element.addEventListener('scroll', scrollListener, true);
941
- if (animationStartEvent) {
942
- resizeTrigger.addEventListener(animationStartEvent, function (event) {
943
- if (event.animationName === RESIZE_ANIMATION_NAME) {
944
- resetTrigger(element);
945
- }
946
- });
947
- }
948
- }
949
- element.__resizeListeners__.push(fn);
950
- }
951
- };
952
- var removeResizeListener = function removeResizeListener(element, fn) {
953
- if (!element || !element.__resizeListeners__) return;
954
- if (attachEvent) {
955
- element.detachEvent('onresize', fn);
956
- } else {
957
- element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
958
- if (!element.__resizeListeners__.length) {
959
- element.removeEventListener('scroll', scrollListener);
960
- element.__resizeTrigger__ = !element.removeChild(element.__resizeTrigger__);
961
- }
962
- }
963
- };
964
-
965
- _export(_export.S + _export.F * !_descriptors, 'Object', { defineProperty: _objectDp.f });
966
-
967
- var $Object = _core.Object;
968
- var defineProperty = function defineProperty(it, key, desc) {
969
- return $Object.defineProperty(it, key, desc);
970
- };
971
-
972
- var defineProperty$1 = defineProperty;
973
-
974
- var hasInitZIndex = false;
975
- var zIndex;
976
- (function () {
977
- if (!window['__bk_zIndex_manager']) {
978
- var zIndexManager = {
979
- nextZIndex: function nextZIndex() {
980
- var zIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default';
981
- return zIndex === 'default' ? zIndexManager.zIndex++ : zIndex;
982
- },
983
- nextTickIndex: function nextTickIndex() {
984
- var tick = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
985
- var zIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
986
- if (zIndex === 'default') {
987
- zIndexManager.zIndex += tick;
988
- return zIndexManager.zIndex;
989
- }
990
- return zIndex;
991
- }
992
- };
993
- defineProperty$1(zIndexManager, 'zIndex', {
994
- configurable: true,
995
- get: function get() {
996
- if (!hasInitZIndex) {
997
- zIndex = zIndex || (Vue.prototype.$BK_EL || {}).zIndex || 2000;
998
- hasInitZIndex = true;
999
- }
1000
- return zIndex;
1001
- },
1002
- set: function set(value) {
1003
- zIndex = value;
1004
- }
1005
- });
1006
- window['__bk_zIndex_manager'] = zIndexManager;
1007
- }
1008
- })();
1009
- var zIndexManager = window['__bk_zIndex_manager'];
1010
-
1011
- _export(_export.S, 'Number', {
1012
- isNaN: function isNaN(number) {
1013
- return number != number;
1014
- }
1015
- });
1016
-
1017
- var isNan = _core.Number.isNaN;
1018
-
1019
- var isNan$1 = isNan;
1020
-
1021
- (function () {
1022
- if (!window['__bk_pop_manager']) {
1023
- var __containerId = "bk_pop_".concat(new Date().getTime());
1024
- var __maskId = "bk_pop_mask_".concat(new Date().getTime());
1025
- var __defaultKey = "bk_pop_key_".concat(new Date().getTime());
1026
- var __popInstances = [];
1027
- var popManager = {
1028
- containerId: __containerId,
1029
- maskId: __maskId,
1030
- defaultKey: __defaultKey,
1031
- formatKey: function formatKey(key) {
1032
- return String(key).replace(/#/g, '_');
1033
- },
1034
- show: function show(key, instance) {
1035
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
1036
- tplAction: 'keepAll',
1037
- zIndex: '',
1038
- beforeHide: function beforeHide() {},
1039
- ignoreExistMask: false,
1040
- appendToBody: false
1041
- };
1042
- key = key === undefined || key === null || isNan$1(key) ? this.defaultKey : key;
1043
- key = this.formatKey(key);
1044
- var uid = uuid();
1045
- var isAppendToBody = false;
1046
- if (options.tplAction === 'onlyone') {
1047
- this.clearByTpl(key);
1048
- }
1049
- if (this.shouldAppendToBody(key)) {
1050
- isAppendToBody = true;
1051
- this.showModalMask(options.zIndex);
1052
- !options.appendToBody && this.container.append(instance);
1053
- } else {
1054
- isAppendToBody = false;
1055
- var lastInsZindex = options.zIndex;
1056
- this.showModalMask(lastInsZindex);
1057
- }
1058
- var beforeHide = options.beforeHide,
1059
- zIndex = options.zIndex,
1060
- ignoreExistMask = options.ignoreExistMask;
1061
- this.instances.push({
1062
- uid: uid,
1063
- ins: instance,
1064
- tplName: key,
1065
- beforeHide: beforeHide,
1066
- zIndex: zIndex,
1067
- ignoreExistMask: ignoreExistMask,
1068
- isAppendToBody: isAppendToBody
1069
- });
1070
- return "".concat(uid, "#").concat(key);
1071
- },
1072
- shouldAppendToBody: function shouldAppendToBody(tplName) {
1073
- return this.instances.some(function (item) {
1074
- return item.tplName === tplName;
1075
- });
1076
- },
1077
- hide: function hide(popId, options) {
1078
- options = options || {
1079
- action: 'hideUid'
1080
- };
1081
- switch (options.action) {
1082
- case 'hideAll':
1083
- this.clearAll();
1084
- break;
1085
- case 'hideUid':
1086
- this.clearByUid(popId);
1087
- break;
1088
- case 'hideSameTpl':
1089
- this.clearByTpl(popId);
1090
- break;
1091
- default:
1092
- this.autoClear(popId);
1093
- break;
1094
- }
1095
- this.updateModalMaskIndex();
1096
- },
1097
- updateModalMaskIndex: function updateModalMaskIndex() {
1098
- if (this.instances.length) {
1099
- var lastIns = this.instances.slice(-1)[0];
1100
- var lastInsZindex = lastIns.isAppendToBody ? lastIns.zIndex : lastIns.zIndex - 1;
1101
- this.showModalMask(lastInsZindex);
1102
- } else {
1103
- this.hideModalMask();
1104
- }
1105
- },
1106
- autoClear: function autoClear() {
1107
- var uid = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
1108
- if (uid.indexOf('#') > 0) {
1109
- this.clearByUid(uid);
1110
- } else {
1111
- this.clearByTpl();
1112
- }
1113
- },
1114
- clearByTpl: function clearByTpl(uid) {
1115
- var _this = this;
1116
- var keyStr = uid.split('#');
1117
- var tplName = keyStr.slice(-1)[0];
1118
- this.instances = this.instances.filter(function (item) {
1119
- if (item.tplName === tplName) {
1120
- _this.__hideInstance(item);
1121
- return false;
1122
- } else {
1123
- return true;
1124
- }
1125
- });
1126
- },
1127
- clearByUid: function clearByUid(uid) {
1128
- var keyStr = uid.split('#');
1129
- var instanceUid = keyStr[0];
1130
- var tplName = keyStr[1];
1131
- var index = this.instances.findIndex(function (ins) {
1132
- return ins.uid === instanceUid && ins.tplName === tplName;
1133
- });
1134
- if (index >= 0) {
1135
- this.__hideInstance(this.instances[index]);
1136
- this.instances.splice(index, 1);
1137
- } else {
1138
- console.warn('Can not find pop instance with index ' + index);
1139
- }
1140
- },
1141
- clearAll: function clearAll() {
1142
- var _this2 = this;
1143
- this.instances.forEach(function (item) {
1144
- return _this2.__hideInstance(item);
1145
- });
1146
- this.instances = [];
1147
- },
1148
- showModalMask: function showModalMask(zIndex) {
1149
- this.dialogMask.setAttribute('style', "z-index:".concat(zIndex, ";"));
1150
- document.body.style.overflow = 'hidden';
1151
- this.dialogMask.classList.remove('hide-active');
1152
- this.dialogMask.classList.add('show-active');
1153
- },
1154
- hideModalMask: function hideModalMask() {
1155
- this.dialogMask.classList.remove('show-active');
1156
- this.dialogMask.classList.add('hide-active');
1157
- document.body.style.overflow = '';
1158
- },
1159
- __hideInstance: function __hideInstance(instance) {
1160
- if (typeof instance.beforeHide === 'function') {
1161
- instance.beforeHide();
1162
- setTimeout(function () {
1163
- if (instance.isAppendToBody) {
1164
- instance.ins.remove();
1165
- }
1166
- });
1167
- } else {
1168
- if (instance.isAppendToBody) {
1169
- instance.ins.remove();
1170
- }
1171
- }
1172
- }
1173
- };
1174
- defineProperty$1(popManager, 'container', {
1175
- get: function get() {
1176
- var container = document.querySelector('[data-bkpop-container]');
1177
- if (!container) {
1178
- container = document.createElement('div');
1179
- container.setAttribute('id', this.containerId);
1180
- container.setAttribute('data-bkpop-container', 'true');
1181
- document.body.append(container);
1182
- }
1183
- return container;
1184
- }
1185
- });
1186
- defineProperty$1(popManager, 'dialogMask', {
1187
- get: function get() {
1188
- var mask = document.querySelector('[data-bkpop-mask]');
1189
- if (!mask) {
1190
- mask = document.createElement('div');
1191
- mask.setAttribute('id', this.maskId);
1192
- mask.setAttribute('class', 'bk-dialog-mask');
1193
- mask.setAttribute('data-bkpop-mask', 'true');
1194
- this.container.append(mask);
1195
- }
1196
- return mask;
1197
- }
1198
- });
1199
- defineProperty$1(popManager, 'instances', {
1200
- get: function get() {
1201
- return __popInstances;
1202
- },
1203
- set: function set(val) {
1204
- __popInstances = val;
1205
- }
1206
- });
1207
- window['__bk_pop_manager'] = popManager;
1208
- window['__bk_pop_manager'].__container = popManager.container;
1209
- }
1210
- })();
1211
- var popManager = window['__bk_pop_manager'];
1212
-
1213
- function getTarget(node) {
1214
- if (node === void 0) {
1215
- node = document.body;
1216
- }
1217
- if (node === true) {
1218
- return document.body;
1219
- }
1220
- return node instanceof window.Node ? node : document.querySelector(node);
1221
- }
1222
- var transferDom = {
1223
- inserted: function inserted(el, _ref, vnode) {
1224
- var value = _ref.value;
1225
- if (el.dataset.transfer !== 'true') {
1226
- return false;
1227
- }
1228
- el.className = el.className ? el.className + ' v-transfer-dom' : 'v-transfer-dom';
1229
- var parentNode = el.parentNode;
1230
- if (!parentNode) {
1231
- return;
1232
- }
1233
- var home = document.createComment('');
1234
- var hasMovedOut = false;
1235
- if (value !== false) {
1236
- parentNode.replaceChild(home, el);
1237
- getTarget(value).appendChild(el);
1238
- hasMovedOut = true;
1239
- }
1240
- if (!el.__transferDomData) {
1241
- el.__transferDomData = {
1242
- parentNode: parentNode,
1243
- home: home,
1244
- target: getTarget(value),
1245
- hasMovedOut: hasMovedOut
1246
- };
1247
- }
1248
- },
1249
- componentUpdated: function componentUpdated(el, _ref2) {
1250
- var value = _ref2.value;
1251
- if (el.dataset.transfer !== 'true') {
1252
- return false;
1253
- }
1254
- var ref$1 = el.__transferDomData;
1255
- if (!ref$1) {
1256
- return;
1257
- }
1258
- var parentNode = ref$1.parentNode;
1259
- var home = ref$1.home;
1260
- var hasMovedOut = ref$1.hasMovedOut;
1261
- if (!hasMovedOut && value) {
1262
- parentNode.replaceChild(home, el);
1263
- getTarget(value).appendChild(el);
1264
- el.__transferDomData = _extends({}, el.__transferDomData, {
1265
- hasMovedOut: true,
1266
- target: getTarget(value)
1267
- });
1268
- } else if (hasMovedOut && value === false) {
1269
- parentNode.replaceChild(el, home);
1270
- el.__transferDomData = _extends({}, el.__transferDomData, {
1271
- hasMovedOut: false,
1272
- target: getTarget(value)
1273
- });
1274
- } else if (value) {
1275
- getTarget(value).appendChild(el);
1276
- }
1277
- },
1278
- unbind: function unbind(el) {
1279
- if (el.dataset.transfer !== 'true') {
1280
- return false;
1281
- }
1282
- el.className = el.className.replace('v-transfer-dom', '');
1283
- var ref$1 = el.__transferDomData;
1284
- if (!ref$1) {
1285
- return;
1286
- }
1287
- if (el.__transferDomData.hasMovedOut === true) {
1288
- el.__transferDomData.parentNode && el.__transferDomData.parentNode.appendChild(el);
1289
- }
1290
- el.__transferDomData = null;
1291
- }
1292
- };
1293
- transferDom.install = function (Vue) {
1294
- Vue.directive('bk-transfer-dom', transferDom);
1295
- };
1296
-
1297
- var script = {
1298
- name: 'bk-sideslider',
1299
- directives: {
1300
- transferDom: transferDom
1301
- },
1302
- mixins: [locale.mixin],
1303
- props: {
1304
- isShow: {
1305
- type: Boolean,
1306
- default: false
1307
- },
1308
- title: {
1309
- type: String,
1310
- default: ''
1311
- },
1312
- quickClose: {
1313
- type: Boolean,
1314
- default: false
1315
- },
1316
- showMask: {
1317
- type: Boolean,
1318
- default: true
1319
- },
1320
- width: {
1321
- type: Number,
1322
- default: 400
1323
- },
1324
- beforeClose: {
1325
- type: Function,
1326
- default: function _default(res) {
1327
- return true;
1328
- }
1329
- },
1330
- direction: {
1331
- type: String,
1332
- default: 'right',
1333
- validator: function validator(value) {
1334
- return ['left', 'right'].indexOf(value) > -1;
1335
- }
1336
- },
1337
- extCls: {
1338
- type: String,
1339
- default: ''
1340
- },
1341
- zIndex: {
1342
- type: [Number, String],
1343
- default: 'default'
1344
- },
1345
- multiInstance: {
1346
- type: Boolean,
1347
- default: true
1348
- },
1349
- transfer: {
1350
- type: Boolean,
1351
- default: false
1352
- },
1353
- appendToBody: {
1354
- type: Boolean,
1355
- default: false
1356
- }
1357
- },
1358
- data: function data() {
1359
- return {
1360
- needBorder: false,
1361
- localZIndex: zIndexManager.nextTickIndex(2),
1362
- popUid: ''
1363
- };
1364
- },
1365
- computed: {
1366
- calcDirection: function calcDirection() {
1367
- return this.direction === 'left' ? 'right' : 'left';
1368
- }
1369
- },
1370
- watch: {
1371
- isShow: function isShow(val) {
1372
- var _this = this;
1373
- var root = document.documentElement;
1374
- if (val) {
1375
- this.localZIndex = zIndexManager.nextTickIndex(2);
1376
- addClass(root, 'bk-sideslider-show');
1377
- if (this.isScrollY()) {
1378
- addClass(root, 'has-sideslider-padding');
1379
- }
1380
- if (this.showMask) {
1381
- this.generatePopUid();
1382
- }
1383
- setTimeout(function () {
1384
- _this.$emit('shown');
1385
- }, 200);
1386
- } else {
1387
- removeClass(root, 'bk-sideslider-show has-sideslider-padding');
1388
- if (this.popUid) {
1389
- popManager.hide(this.popUid);
1390
- this.popUid = '';
1391
- }
1392
- setTimeout(function () {
1393
- _this.$emit('hidden');
1394
- }, 200);
1395
- }
1396
- }
1397
- },
1398
- mounted: function mounted() {
1399
- if (this.$refs.content && this.showMask) {
1400
- this.generatePopUid();
1401
- addResizeListener(this.$refs.content, this.handleContentResize);
1402
- }
1403
- },
1404
- destroyed: function destroyed() {
1405
- var root = document.querySelector('html');
1406
- removeClass(root, 'bk-sideslider-show');
1407
- removeResizeListener(this.$refs.content, this.handleContentResize);
1408
- },
1409
- beforeDestroy: function beforeDestroy() {
1410
- this.isShow && this.popUid && popManager.hide(this.popUid);
1411
- },
1412
- methods: {
1413
- generatePopUid: function generatePopUid() {
1414
- this.popUid = popManager.show('bk-sideslider', this.$el, {
1415
- zIndex: this.localZIndex - 1,
1416
- tplAction: this.multiInstance && 'keepAll' || 'onlyone',
1417
- appendToBody: this.transfer
1418
- });
1419
- },
1420
- isScrollY: function isScrollY() {
1421
- return document.documentElement.offsetHeight > document.documentElement.clientHeight;
1422
- },
1423
- show: function show() {
1424
- var root = document.documentElement;
1425
- addClass(root, 'bk-sideslider-show');
1426
- this.isShow = true;
1427
- },
1428
- hide: function hide() {
1429
- var root = document.querySelector('html');
1430
- removeClass(root, 'bk-sideslider-show');
1431
- this.isShow = false;
1432
- },
1433
- handleClose: function handleClose() {
1434
- var _this2 = this;
1435
- return _asyncToGenerator( regenerator.mark(function _callee() {
1436
- var shouldClose;
1437
- return regenerator.wrap(function _callee$(_context) {
1438
- while (1) {
1439
- switch (_context.prev = _context.next) {
1440
- case 0:
1441
- shouldClose = true;
1442
- if (!(typeof _this2.beforeClose === 'function')) {
1443
- _context.next = 5;
1444
- break;
1445
- }
1446
- _context.next = 4;
1447
- return _this2.beforeClose();
1448
- case 4:
1449
- shouldClose = _context.sent;
1450
- case 5:
1451
- if (shouldClose) {
1452
- _this2.$emit('update:isShow', false);
1453
- setTimeout(function () {
1454
- _this2.$emit('animation-end');
1455
- }, 250);
1456
- }
1457
- case 6:
1458
- case "end":
1459
- return _context.stop();
1460
- }
1461
- }
1462
- }, _callee);
1463
- }))();
1464
- },
1465
- handleQuickClose: function handleQuickClose() {
1466
- if (this.quickClose) {
1467
- this.handleClose();
1468
- }
1469
- },
1470
- handleContentResize: function handleContentResize() {
1471
- var ref = this.$refs.content;
1472
- this.needBorder = ref.scrollHeight > ref.clientHeight;
1473
- }
1474
- }
1475
- };
1476
-
1477
- function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
1478
- , shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
1479
- if (typeof shadowMode !== 'boolean') {
1480
- createInjectorSSR = createInjector;
1481
- createInjector = shadowMode;
1482
- shadowMode = false;
1483
- }
1484
- var options = typeof script === 'function' ? script.options : script;
1485
- if (template && template.render) {
1486
- options.render = template.render;
1487
- options.staticRenderFns = template.staticRenderFns;
1488
- options._compiled = true;
1489
- if (isFunctionalTemplate) {
1490
- options.functional = true;
1491
- }
1492
- }
1493
- if (scopeId) {
1494
- options._scopeId = scopeId;
1495
- }
1496
- var hook;
1497
- if (moduleIdentifier) {
1498
- hook = function hook(context) {
1499
- context = context ||
1500
- this.$vnode && this.$vnode.ssrContext ||
1501
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
1502
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
1503
- context = __VUE_SSR_CONTEXT__;
1504
- }
1505
- if (style) {
1506
- style.call(this, createInjectorSSR(context));
1507
- }
1508
- if (context && context._registeredComponents) {
1509
- context._registeredComponents.add(moduleIdentifier);
1510
- }
1511
- };
1512
- options._ssrRegister = hook;
1513
- } else if (style) {
1514
- hook = shadowMode ? function () {
1515
- style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
1516
- } : function (context) {
1517
- style.call(this, createInjector(context));
1518
- };
1519
- }
1520
- if (hook) {
1521
- if (options.functional) {
1522
- var originalRender = options.render;
1523
- options.render = function renderWithStyleInjection(h, context) {
1524
- hook.call(context);
1525
- return originalRender(h, context);
1526
- };
1527
- } else {
1528
- var existing = options.beforeCreate;
1529
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
1530
- }
1531
- }
1532
- return script;
1533
- }
1534
- var normalizeComponent_1 = normalizeComponent;
1535
-
1536
- /* script */
1537
- var __vue_script__ = script;
1538
- /* template */
1539
-
1540
- var __vue_render__ = function __vue_render__() {
1541
- var _vm = this;
1542
-
1543
- var _h = _vm.$createElement;
1544
-
1545
- var _c = _vm._self._c || _h;
1546
-
1547
- return _c('transition', {
1548
- attrs: {
1549
- "name": "slide"
1550
- }
1551
- }, [_vm.isShow ? _c('article', {
1552
- directives: [{
1553
- name: "transfer-dom",
1554
- rawName: "v-transfer-dom"
1555
- }],
1556
- staticClass: "bk-sideslider",
1557
- class: _vm.extCls,
1558
- style: {
1559
- zIndex: _vm.localZIndex
1560
- },
1561
- attrs: {
1562
- "data-transfer": _vm.transfer
1563
- },
1564
- on: {
1565
- "mousedown": function mousedown($event) {
1566
- if ($event.target !== $event.currentTarget) {
1567
- return null;
1568
- }
1569
-
1570
- return _vm.handleQuickClose($event);
1571
- }
1572
- }
1573
- }, [_c('section', {
1574
- staticClass: "bk-sideslider-wrapper",
1575
- class: [{
1576
- left: _vm.direction === 'left',
1577
- right: _vm.direction === 'right'
1578
- }],
1579
- style: {
1580
- width: _vm.width + 'px'
1581
- }
1582
- }, [_c('div', {
1583
- staticClass: "bk-sideslider-header"
1584
- }, [_c('div', {
1585
- staticClass: "bk-sideslider-closer",
1586
- style: {
1587
- float: _vm.calcDirection
1588
- },
1589
- on: {
1590
- "click": _vm.handleClose
1591
- }
1592
- }, [_c('i', {
1593
- staticClass: "bk-icon",
1594
- class: 'icon-angle-' + _vm.direction
1595
- })]), _c('div', {
1596
- staticClass: "bk-sideslider-title",
1597
- style: {
1598
- padding: _vm.calcDirection === 'left' ? '0 0 0 50px' : '0 0 0 30px'
1599
- }
1600
- }, [_vm._t("header", [_vm._v("\n " + _vm._s(_vm.title || _vm.t('bk.sideslider.title')) + "\n ")])], 2)]), _c('div', {
1601
- ref: "content",
1602
- staticClass: "bk-sideslider-content",
1603
- style: {
1604
- maxHeight: _vm.$slots.footer ? 'calc(100vh - 114px)' : 'calc(100vh - 60px)'
1605
- }
1606
- }, [_vm._t("content")], 2), _vm.$slots.footer ? _c('div', {
1607
- staticClass: "bk-sideslider-footer",
1608
- style: {
1609
- borderTopColor: !_vm.needBorder ? 'transparent' : '#dcdee5',
1610
- backgroundColor: !_vm.needBorder ? '#fafbfd' : '#ffffff'
1611
- }
1612
- }, [_vm._t("footer")], 2) : _vm._e()])]) : _vm._e()]);
1613
- };
1614
-
1615
- var __vue_staticRenderFns__ = [];
1616
- /* style */
1617
-
1618
- var __vue_inject_styles__ = undefined;
1619
- /* scoped */
1620
-
1621
- var __vue_scope_id__ = undefined;
1622
- /* module identifier */
1623
-
1624
- var __vue_module_identifier__ = undefined;
1625
- /* functional template */
1626
-
1627
- var __vue_is_functional_template__ = false;
1628
- /* style inject */
1629
-
1630
- /* style inject SSR */
1631
-
1632
- /* style inject shadow dom */
1633
-
1634
- var __vue_component__ = /*#__PURE__*/normalizeComponent_1({
1635
- render: __vue_render__,
1636
- staticRenderFns: __vue_staticRenderFns__
1637
- }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
1638
-
1639
- var _toObject = function (it) {
1640
- return Object(_defined(it));
1641
- };
1642
-
1643
- var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
1644
- return _cof(it) == 'String' ? it.split('') : Object(it);
1645
- };
1646
-
1647
- var _toIobject = function (it) {
1648
- return _iobject(_defined(it));
1649
- };
1650
-
1651
- var ceil = Math.ceil;
1652
- var floor = Math.floor;
1653
- var _toInteger = function (it) {
1654
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
1655
- };
1656
-
1657
- var min = Math.min;
1658
- var _toLength = function (it) {
1659
- return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0;
1660
- };
1661
-
1662
- var max = Math.max;
1663
- var min$1 = Math.min;
1664
- var _toAbsoluteIndex = function (index, length) {
1665
- index = _toInteger(index);
1666
- return index < 0 ? max(index + length, 0) : min$1(index, length);
1667
- };
1668
-
1669
- var _arrayIncludes = function (IS_INCLUDES) {
1670
- return function ($this, el, fromIndex) {
1671
- var O = _toIobject($this);
1672
- var length = _toLength(O.length);
1673
- var index = _toAbsoluteIndex(fromIndex, length);
1674
- var value;
1675
- if (IS_INCLUDES && el != el) while (length > index) {
1676
- value = O[index++];
1677
- if (value != value) return true;
1678
- } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
1679
- if (O[index] === el) return IS_INCLUDES || index || 0;
1680
- } return !IS_INCLUDES && -1;
1681
- };
1682
- };
1683
-
1684
- var _shared = createCommonjsModule(function (module) {
1685
- var SHARED = '__core-js_shared__';
1686
- var store = _global[SHARED] || (_global[SHARED] = {});
1687
- (module.exports = function (key, value) {
1688
- return store[key] || (store[key] = value !== undefined ? value : {});
1689
- })('versions', []).push({
1690
- version: _core.version,
1691
- mode: 'pure' ,
1692
- copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
1693
- });
1694
- });
1695
-
1696
- var id = 0;
1697
- var px = Math.random();
1698
- var _uid = function (key) {
1699
- return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
1700
- };
1701
-
1702
- var shared = _shared('keys');
1703
- var _sharedKey = function (key) {
1704
- return shared[key] || (shared[key] = _uid(key));
1705
- };
1706
-
1707
- var arrayIndexOf = _arrayIncludes(false);
1708
- var IE_PROTO = _sharedKey('IE_PROTO');
1709
- var _objectKeysInternal = function (object, names) {
1710
- var O = _toIobject(object);
1711
- var i = 0;
1712
- var result = [];
1713
- var key;
1714
- for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key);
1715
- while (names.length > i) if (_has(O, key = names[i++])) {
1716
- ~arrayIndexOf(result, key) || result.push(key);
1717
- }
1718
- return result;
1719
- };
1720
-
1721
- var _enumBugKeys = (
1722
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
1723
- ).split(',');
1724
-
1725
- var _objectKeys = Object.keys || function keys(O) {
1726
- return _objectKeysInternal(O, _enumBugKeys);
1727
- };
1728
-
1729
- var _objectSap = function (KEY, exec) {
1730
- var fn = (_core.Object || {})[KEY] || Object[KEY];
1731
- var exp = {};
1732
- exp[KEY] = exec(fn);
1733
- _export(_export.S + _export.F * _fails(function () { fn(1); }), 'Object', exp);
1734
- };
1735
-
1736
- _objectSap('keys', function () {
1737
- return function keys(it) {
1738
- return _objectKeys(_toObject(it));
1739
- };
1740
- });
1741
-
1742
- var keys = _core.Object.keys;
1743
-
1744
- var keys$1 = keys;
1745
-
1746
- function setInstaller (component, afterInstall) {
1747
- component.install = function (Vue) {
1748
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1749
- var props = component.props || {};
1750
- keys$1(options).forEach(function (key) {
1751
- if (props.hasOwnProperty(key)) {
1752
- if (typeof props[key] === 'function' || props[key] instanceof Array) {
1753
- props[key] = {
1754
- type: props[key],
1755
- default: options[key]
1756
- };
1757
- } else {
1758
- props[key].default = options[key];
1759
- }
1760
- }
1761
- });
1762
- component.name = options.namespace ? component.name.replace('bk', options.namespace) : component.name;
1763
- Vue.component(component.name, component);
1764
- typeof afterInstall === 'function' && afterInstall(Vue, options);
1765
- };
1766
- }
1767
-
1768
- setInstaller(__vue_component__);
1769
-
1770
- exports.default = __vue_component__;
1771
-
1772
- Object.defineProperty(exports, '__esModule', { value: true });
7
+ locale = locale && locale.hasOwnProperty('default') ? locale['default'] : locale;
8
+ Vue = Vue && Vue.hasOwnProperty('default') ? Vue['default'] : Vue;
9
+
10
+ function _regeneratorRuntime() {
11
+ _regeneratorRuntime = function () {
12
+ return exports;
13
+ };
14
+ var exports = {},
15
+ Op = Object.prototype,
16
+ hasOwn = Op.hasOwnProperty,
17
+ defineProperty = Object.defineProperty || function (obj, key, desc) {
18
+ obj[key] = desc.value;
19
+ },
20
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
21
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
22
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
23
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
24
+ function define(obj, key, value) {
25
+ return Object.defineProperty(obj, key, {
26
+ value: value,
27
+ enumerable: !0,
28
+ configurable: !0,
29
+ writable: !0
30
+ }), obj[key];
31
+ }
32
+ try {
33
+ define({}, "");
34
+ } catch (err) {
35
+ define = function (obj, key, value) {
36
+ return obj[key] = value;
37
+ };
38
+ }
39
+ function wrap(innerFn, outerFn, self, tryLocsList) {
40
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
41
+ generator = Object.create(protoGenerator.prototype),
42
+ context = new Context(tryLocsList || []);
43
+ return defineProperty(generator, "_invoke", {
44
+ value: makeInvokeMethod(innerFn, self, context)
45
+ }), generator;
46
+ }
47
+ function tryCatch(fn, obj, arg) {
48
+ try {
49
+ return {
50
+ type: "normal",
51
+ arg: fn.call(obj, arg)
52
+ };
53
+ } catch (err) {
54
+ return {
55
+ type: "throw",
56
+ arg: err
57
+ };
58
+ }
59
+ }
60
+ exports.wrap = wrap;
61
+ var ContinueSentinel = {};
62
+ function Generator() {}
63
+ function GeneratorFunction() {}
64
+ function GeneratorFunctionPrototype() {}
65
+ var IteratorPrototype = {};
66
+ define(IteratorPrototype, iteratorSymbol, function () {
67
+ return this;
68
+ });
69
+ var getProto = Object.getPrototypeOf,
70
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
71
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
72
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
73
+ function defineIteratorMethods(prototype) {
74
+ ["next", "throw", "return"].forEach(function (method) {
75
+ define(prototype, method, function (arg) {
76
+ return this._invoke(method, arg);
77
+ });
78
+ });
79
+ }
80
+ function AsyncIterator(generator, PromiseImpl) {
81
+ function invoke(method, arg, resolve, reject) {
82
+ var record = tryCatch(generator[method], generator, arg);
83
+ if ("throw" !== record.type) {
84
+ var result = record.arg,
85
+ value = result.value;
86
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
87
+ invoke("next", value, resolve, reject);
88
+ }, function (err) {
89
+ invoke("throw", err, resolve, reject);
90
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
91
+ result.value = unwrapped, resolve(result);
92
+ }, function (error) {
93
+ return invoke("throw", error, resolve, reject);
94
+ });
95
+ }
96
+ reject(record.arg);
97
+ }
98
+ var previousPromise;
99
+ defineProperty(this, "_invoke", {
100
+ value: function (method, arg) {
101
+ function callInvokeWithMethodAndArg() {
102
+ return new PromiseImpl(function (resolve, reject) {
103
+ invoke(method, arg, resolve, reject);
104
+ });
105
+ }
106
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
107
+ }
108
+ });
109
+ }
110
+ function makeInvokeMethod(innerFn, self, context) {
111
+ var state = "suspendedStart";
112
+ return function (method, arg) {
113
+ if ("executing" === state) throw new Error("Generator is already running");
114
+ if ("completed" === state) {
115
+ if ("throw" === method) throw arg;
116
+ return doneResult();
117
+ }
118
+ for (context.method = method, context.arg = arg;;) {
119
+ var delegate = context.delegate;
120
+ if (delegate) {
121
+ var delegateResult = maybeInvokeDelegate(delegate, context);
122
+ if (delegateResult) {
123
+ if (delegateResult === ContinueSentinel) continue;
124
+ return delegateResult;
125
+ }
126
+ }
127
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
128
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
129
+ context.dispatchException(context.arg);
130
+ } else "return" === context.method && context.abrupt("return", context.arg);
131
+ state = "executing";
132
+ var record = tryCatch(innerFn, self, context);
133
+ if ("normal" === record.type) {
134
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
135
+ return {
136
+ value: record.arg,
137
+ done: context.done
138
+ };
139
+ }
140
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
141
+ }
142
+ };
143
+ }
144
+ function maybeInvokeDelegate(delegate, context) {
145
+ var method = delegate.iterator[context.method];
146
+ if (undefined === method) {
147
+ if (context.delegate = null, "throw" === context.method) {
148
+ if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
149
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
150
+ }
151
+ return ContinueSentinel;
152
+ }
153
+ var record = tryCatch(method, delegate.iterator, context.arg);
154
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
155
+ var info = record.arg;
156
+ 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);
157
+ }
158
+ function pushTryEntry(locs) {
159
+ var entry = {
160
+ tryLoc: locs[0]
161
+ };
162
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
163
+ }
164
+ function resetTryEntry(entry) {
165
+ var record = entry.completion || {};
166
+ record.type = "normal", delete record.arg, entry.completion = record;
167
+ }
168
+ function Context(tryLocsList) {
169
+ this.tryEntries = [{
170
+ tryLoc: "root"
171
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
172
+ }
173
+ function values(iterable) {
174
+ if (iterable) {
175
+ var iteratorMethod = iterable[iteratorSymbol];
176
+ if (iteratorMethod) return iteratorMethod.call(iterable);
177
+ if ("function" == typeof iterable.next) return iterable;
178
+ if (!isNaN(iterable.length)) {
179
+ var i = -1,
180
+ next = function next() {
181
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
182
+ return next.value = undefined, next.done = !0, next;
183
+ };
184
+ return next.next = next;
185
+ }
186
+ }
187
+ return {
188
+ next: doneResult
189
+ };
190
+ }
191
+ function doneResult() {
192
+ return {
193
+ value: undefined,
194
+ done: !0
195
+ };
196
+ }
197
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
198
+ value: GeneratorFunctionPrototype,
199
+ configurable: !0
200
+ }), defineProperty(GeneratorFunctionPrototype, "constructor", {
201
+ value: GeneratorFunction,
202
+ configurable: !0
203
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
204
+ var ctor = "function" == typeof genFun && genFun.constructor;
205
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
206
+ }, exports.mark = function (genFun) {
207
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
208
+ }, exports.awrap = function (arg) {
209
+ return {
210
+ __await: arg
211
+ };
212
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
213
+ return this;
214
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
215
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
216
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
217
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
218
+ return result.done ? result.value : iter.next();
219
+ });
220
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
221
+ return this;
222
+ }), define(Gp, "toString", function () {
223
+ return "[object Generator]";
224
+ }), exports.keys = function (val) {
225
+ var object = Object(val),
226
+ keys = [];
227
+ for (var key in object) keys.push(key);
228
+ return keys.reverse(), function next() {
229
+ for (; keys.length;) {
230
+ var key = keys.pop();
231
+ if (key in object) return next.value = key, next.done = !1, next;
232
+ }
233
+ return next.done = !0, next;
234
+ };
235
+ }, exports.values = values, Context.prototype = {
236
+ constructor: Context,
237
+ reset: function (skipTempReset) {
238
+ 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);
239
+ },
240
+ stop: function () {
241
+ this.done = !0;
242
+ var rootRecord = this.tryEntries[0].completion;
243
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
244
+ return this.rval;
245
+ },
246
+ dispatchException: function (exception) {
247
+ if (this.done) throw exception;
248
+ var context = this;
249
+ function handle(loc, caught) {
250
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
251
+ }
252
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
253
+ var entry = this.tryEntries[i],
254
+ record = entry.completion;
255
+ if ("root" === entry.tryLoc) return handle("end");
256
+ if (entry.tryLoc <= this.prev) {
257
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
258
+ hasFinally = hasOwn.call(entry, "finallyLoc");
259
+ if (hasCatch && hasFinally) {
260
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
261
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
262
+ } else if (hasCatch) {
263
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
264
+ } else {
265
+ if (!hasFinally) throw new Error("try statement without catch or finally");
266
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
267
+ }
268
+ }
269
+ }
270
+ },
271
+ abrupt: function (type, arg) {
272
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
273
+ var entry = this.tryEntries[i];
274
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
275
+ var finallyEntry = entry;
276
+ break;
277
+ }
278
+ }
279
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
280
+ var record = finallyEntry ? finallyEntry.completion : {};
281
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
282
+ },
283
+ complete: function (record, afterLoc) {
284
+ if ("throw" === record.type) throw record.arg;
285
+ 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;
286
+ },
287
+ finish: function (finallyLoc) {
288
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
289
+ var entry = this.tryEntries[i];
290
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
291
+ }
292
+ },
293
+ catch: function (tryLoc) {
294
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
295
+ var entry = this.tryEntries[i];
296
+ if (entry.tryLoc === tryLoc) {
297
+ var record = entry.completion;
298
+ if ("throw" === record.type) {
299
+ var thrown = record.arg;
300
+ resetTryEntry(entry);
301
+ }
302
+ return thrown;
303
+ }
304
+ }
305
+ throw new Error("illegal catch attempt");
306
+ },
307
+ delegateYield: function (iterable, resultName, nextLoc) {
308
+ return this.delegate = {
309
+ iterator: values(iterable),
310
+ resultName: resultName,
311
+ nextLoc: nextLoc
312
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
313
+ }
314
+ }, exports;
315
+ }
316
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
317
+ try {
318
+ var info = gen[key](arg);
319
+ var value = info.value;
320
+ } catch (error) {
321
+ reject(error);
322
+ return;
323
+ }
324
+ if (info.done) {
325
+ resolve(value);
326
+ } else {
327
+ Promise.resolve(value).then(_next, _throw);
328
+ }
329
+ }
330
+ function _asyncToGenerator(fn) {
331
+ return function () {
332
+ var self = this,
333
+ args = arguments;
334
+ return new Promise(function (resolve, reject) {
335
+ var gen = fn.apply(self, args);
336
+ function _next(value) {
337
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
338
+ }
339
+ function _throw(err) {
340
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
341
+ }
342
+ _next(undefined);
343
+ });
344
+ };
345
+ }
346
+ function _extends() {
347
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
348
+ for (var i = 1; i < arguments.length; i++) {
349
+ var source = arguments[i];
350
+ for (var key in source) {
351
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
352
+ target[key] = source[key];
353
+ }
354
+ }
355
+ }
356
+ return target;
357
+ };
358
+ return _extends.apply(this, arguments);
359
+ }
360
+
361
+ function createCommonjsModule(fn, module) {
362
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
363
+ }
364
+
365
+ var _global = createCommonjsModule(function (module) {
366
+ var global = module.exports = typeof window != 'undefined' && window.Math == Math
367
+ ? window : typeof self != 'undefined' && self.Math == Math ? self
368
+ : Function('return this')();
369
+ if (typeof __g == 'number') __g = global;
370
+ });
371
+
372
+ var _core = createCommonjsModule(function (module) {
373
+ var core = module.exports = { version: '2.6.12' };
374
+ if (typeof __e == 'number') __e = core;
375
+ });
376
+ var _core_1 = _core.version;
377
+
378
+ var _aFunction = function (it) {
379
+ if (typeof it != 'function') throw TypeError(it + ' is not a function!');
380
+ return it;
381
+ };
382
+
383
+ var _ctx = function (fn, that, length) {
384
+ _aFunction(fn);
385
+ if (that === undefined) return fn;
386
+ switch (length) {
387
+ case 1: return function (a) {
388
+ return fn.call(that, a);
389
+ };
390
+ case 2: return function (a, b) {
391
+ return fn.call(that, a, b);
392
+ };
393
+ case 3: return function (a, b, c) {
394
+ return fn.call(that, a, b, c);
395
+ };
396
+ }
397
+ return function () {
398
+ return fn.apply(that, arguments);
399
+ };
400
+ };
401
+
402
+ var _isObject = function (it) {
403
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
404
+ };
405
+
406
+ var _anObject = function (it) {
407
+ if (!_isObject(it)) throw TypeError(it + ' is not an object!');
408
+ return it;
409
+ };
410
+
411
+ var _fails = function (exec) {
412
+ try {
413
+ return !!exec();
414
+ } catch (e) {
415
+ return true;
416
+ }
417
+ };
418
+
419
+ var _descriptors = !_fails(function () {
420
+ return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
421
+ });
422
+
423
+ var document$1 = _global.document;
424
+ var is = _isObject(document$1) && _isObject(document$1.createElement);
425
+ var _domCreate = function (it) {
426
+ return is ? document$1.createElement(it) : {};
427
+ };
428
+
429
+ var _ie8DomDefine = !_descriptors && !_fails(function () {
430
+ return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7;
431
+ });
432
+
433
+ var _toPrimitive = function (it, S) {
434
+ if (!_isObject(it)) return it;
435
+ var fn, val;
436
+ if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
437
+ if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val;
438
+ if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
439
+ throw TypeError("Can't convert object to primitive value");
440
+ };
441
+
442
+ var dP = Object.defineProperty;
443
+ var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
444
+ _anObject(O);
445
+ P = _toPrimitive(P, true);
446
+ _anObject(Attributes);
447
+ if (_ie8DomDefine) try {
448
+ return dP(O, P, Attributes);
449
+ } catch (e) { }
450
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
451
+ if ('value' in Attributes) O[P] = Attributes.value;
452
+ return O;
453
+ };
454
+ var _objectDp = {
455
+ f: f
456
+ };
457
+
458
+ var _propertyDesc = function (bitmap, value) {
459
+ return {
460
+ enumerable: !(bitmap & 1),
461
+ configurable: !(bitmap & 2),
462
+ writable: !(bitmap & 4),
463
+ value: value
464
+ };
465
+ };
466
+
467
+ var _hide = _descriptors ? function (object, key, value) {
468
+ return _objectDp.f(object, key, _propertyDesc(1, value));
469
+ } : function (object, key, value) {
470
+ object[key] = value;
471
+ return object;
472
+ };
473
+
474
+ var hasOwnProperty = {}.hasOwnProperty;
475
+ var _has = function (it, key) {
476
+ return hasOwnProperty.call(it, key);
477
+ };
478
+
479
+ var PROTOTYPE = 'prototype';
480
+ var $export = function (type, name, source) {
481
+ var IS_FORCED = type & $export.F;
482
+ var IS_GLOBAL = type & $export.G;
483
+ var IS_STATIC = type & $export.S;
484
+ var IS_PROTO = type & $export.P;
485
+ var IS_BIND = type & $export.B;
486
+ var IS_WRAP = type & $export.W;
487
+ var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});
488
+ var expProto = exports[PROTOTYPE];
489
+ var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] : (_global[name] || {})[PROTOTYPE];
490
+ var key, own, out;
491
+ if (IS_GLOBAL) source = name;
492
+ for (key in source) {
493
+ own = !IS_FORCED && target && target[key] !== undefined;
494
+ if (own && _has(exports, key)) continue;
495
+ out = own ? target[key] : source[key];
496
+ exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
497
+ : IS_BIND && own ? _ctx(out, _global)
498
+ : IS_WRAP && target[key] == out ? (function (C) {
499
+ var F = function (a, b, c) {
500
+ if (this instanceof C) {
501
+ switch (arguments.length) {
502
+ case 0: return new C();
503
+ case 1: return new C(a);
504
+ case 2: return new C(a, b);
505
+ } return new C(a, b, c);
506
+ } return C.apply(this, arguments);
507
+ };
508
+ F[PROTOTYPE] = C[PROTOTYPE];
509
+ return F;
510
+ })(out) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out;
511
+ if (IS_PROTO) {
512
+ (exports.virtual || (exports.virtual = {}))[key] = out;
513
+ if (type & $export.R && expProto && !expProto[key]) _hide(expProto, key, out);
514
+ }
515
+ }
516
+ };
517
+ $export.F = 1;
518
+ $export.G = 2;
519
+ $export.S = 4;
520
+ $export.P = 8;
521
+ $export.B = 16;
522
+ $export.W = 32;
523
+ $export.U = 64;
524
+ $export.R = 128;
525
+ var _export = $export;
526
+
527
+ var _defined = function (it) {
528
+ if (it == undefined) throw TypeError("Can't call method on " + it);
529
+ return it;
530
+ };
531
+
532
+ var _stringWs = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
533
+ '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
534
+
535
+ var space = '[' + _stringWs + ']';
536
+ var non = '\u200b\u0085';
537
+ var ltrim = RegExp('^' + space + space + '*');
538
+ var rtrim = RegExp(space + space + '*$');
539
+ var exporter = function (KEY, exec, ALIAS) {
540
+ var exp = {};
541
+ var FORCE = _fails(function () {
542
+ return !!_stringWs[KEY]() || non[KEY]() != non;
543
+ });
544
+ var fn = exp[KEY] = FORCE ? exec(trim) : _stringWs[KEY];
545
+ if (ALIAS) exp[ALIAS] = fn;
546
+ _export(_export.P + _export.F * FORCE, 'String', exp);
547
+ };
548
+ var trim = exporter.trim = function (string, TYPE) {
549
+ string = String(_defined(string));
550
+ if (TYPE & 1) string = string.replace(ltrim, '');
551
+ if (TYPE & 2) string = string.replace(rtrim, '');
552
+ return string;
553
+ };
554
+ var _stringTrim = exporter;
555
+
556
+ var $parseFloat = _global.parseFloat;
557
+ var $trim = _stringTrim.trim;
558
+ var _parseFloat = 1 / $parseFloat(_stringWs + '-0') !== -Infinity ? function parseFloat(str) {
559
+ var string = $trim(String(str), 3);
560
+ var result = $parseFloat(string);
561
+ return result === 0 && string.charAt(0) == '-' ? -0 : result;
562
+ } : $parseFloat;
563
+
564
+ _export(_export.G + _export.F * (parseFloat != _parseFloat), { parseFloat: _parseFloat });
565
+
566
+ var _parseFloat$1 = _core.parseFloat;
567
+
568
+ var $parseInt = _global.parseInt;
569
+ var $trim$1 = _stringTrim.trim;
570
+ var hex = /^[-+]?0[xX]/;
571
+ var _parseInt = $parseInt(_stringWs + '08') !== 8 || $parseInt(_stringWs + '0x16') !== 22 ? function parseInt(str, radix) {
572
+ var string = $trim$1(String(str), 3);
573
+ return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
574
+ } : $parseInt;
575
+
576
+ _export(_export.G + _export.F * (parseInt != _parseInt), { parseInt: _parseInt });
577
+
578
+ var _parseInt$1 = _core.parseInt;
579
+
580
+ var toString = {}.toString;
581
+ var _cof = function (it) {
582
+ return toString.call(it).slice(8, -1);
583
+ };
584
+
585
+ var _isArray = Array.isArray || function isArray(arg) {
586
+ return _cof(arg) == 'Array';
587
+ };
588
+
589
+ _export(_export.S, 'Array', { isArray: _isArray });
590
+
591
+ var isArray = _core.Array.isArray;
592
+
593
+ function addClass(node, className) {
594
+ var classNames = className.split(' ');
595
+ if (node.nodeType === 1) {
596
+ if (!node.className && classNames.length === 1) {
597
+ node.className = className;
598
+ } else {
599
+ var setClass = ' ' + node.className + ' ';
600
+ classNames.forEach(function (cl) {
601
+ if (setClass.indexOf(' ' + cl + ' ') < 0) {
602
+ setClass += cl + ' ';
603
+ }
604
+ });
605
+ var rtrim = /^\s+|\s+$/;
606
+ node.className = setClass.replace(rtrim, '');
607
+ }
608
+ }
609
+ }
610
+ function removeClass(node, className) {
611
+ var classNames = className.split(' ');
612
+ if (node.nodeType === 1) {
613
+ var setClass = ' ' + node.className + ' ';
614
+ classNames.forEach(function (cl) {
615
+ setClass = setClass.replace(' ' + cl + ' ', ' ');
616
+ });
617
+ var rtrim = /^\s+|\s+$/;
618
+ node.className = setClass.replace(rtrim, '');
619
+ }
620
+ }
621
+ var requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {
622
+ window.setTimeout(callback, 1000 / 60);
623
+ };
624
+ var cancelAnimationFrame = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame || function (id) {
625
+ window.clearTimeout(id);
626
+ };
627
+ function uuid() {
628
+ var id = '';
629
+ var randomNum = Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
630
+ for (var i = 0; i < 7; i++) {
631
+ id += randomNum;
632
+ }
633
+ return id;
634
+ }
635
+
636
+ var requestFrame = function () {
637
+ var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function (fn) {
638
+ return window.setTimeout(fn, 20);
639
+ };
640
+ return function (fn) {
641
+ return raf(fn);
642
+ };
643
+ }();
644
+ var cancelFrame = function () {
645
+ var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;
646
+ return function (id) {
647
+ return cancel(id);
648
+ };
649
+ }();
650
+ var resetTrigger = function resetTrigger(element) {
651
+ var trigger = element.__resizeTrigger__;
652
+ var expand = trigger.firstElementChild;
653
+ var contract = trigger.lastElementChild;
654
+ var expandChild = expand.firstElementChild;
655
+ contract.scrollLeft = contract.scrollWidth;
656
+ contract.scrollTop = contract.scrollHeight;
657
+ expandChild.style.width = expand.offsetWidth + 1 + 'px';
658
+ expandChild.style.height = expand.offsetHeight + 1 + 'px';
659
+ expand.scrollLeft = expand.scrollWidth;
660
+ expand.scrollTop = expand.scrollHeight;
661
+ };
662
+ var checkTriggers = function checkTriggers(element) {
663
+ return element.offsetWidth !== element.__resizeLast__.width || element.offsetHeight !== element.__resizeLast__.height;
664
+ };
665
+ var scrollListener = function scrollListener(event) {
666
+ var _this = this;
667
+ resetTrigger(this);
668
+ if (this.__resizeRAF__) cancelFrame(this.__resizeRAF__);
669
+ this.__resizeRAF__ = requestFrame(function () {
670
+ if (checkTriggers(_this)) {
671
+ _this.__resizeLast__.width = _this.offsetWidth;
672
+ _this.__resizeLast__.height = _this.offsetHeight;
673
+ _this.__resizeListeners__.forEach(function (fn) {
674
+ fn.call(_this, event);
675
+ });
676
+ }
677
+ });
678
+ };
679
+ var attachEvent = document.attachEvent;
680
+ var DOM_PREFIXES = 'Webkit Moz O ms'.split(' ');
681
+ var START_EVENTS = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' ');
682
+ var RESIZE_ANIMATION_NAME = 'resizeanim';
683
+ var animation = false;
684
+ var keyFramePrefix = '';
685
+ var animationStartEvent = 'animationstart';
686
+ if (!attachEvent) {
687
+ var testElement = document.createElement('fakeelement');
688
+ if (testElement.style.animationName !== undefined) {
689
+ animation = true;
690
+ }
691
+ if (animation === false) {
692
+ var prefix = '';
693
+ for (var i = 0; i < DOM_PREFIXES.length; i++) {
694
+ if (testElement.style[DOM_PREFIXES[i] + 'AnimationName'] !== undefined) {
695
+ prefix = DOM_PREFIXES[i];
696
+ keyFramePrefix = '-' + prefix.toLowerCase() + '-';
697
+ animationStartEvent = START_EVENTS[i];
698
+ animation = true;
699
+ break;
700
+ }
701
+ }
702
+ }
703
+ }
704
+ var stylesCreated = false;
705
+ var createStyles = function createStyles() {
706
+ if (!stylesCreated) {
707
+ var animationKeyframes = "@".concat(keyFramePrefix, "keyframes ").concat(RESIZE_ANIMATION_NAME, " { from { opacity: 0; } to { opacity: 0; } } ");
708
+ var animationStyle = "".concat(keyFramePrefix, "animation: 1ms ").concat(RESIZE_ANIMATION_NAME, ";");
709
+ var css = "".concat(animationKeyframes, "\n .resize-triggers { ").concat(animationStyle, " visibility: hidden; opacity: 0; }\n .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1 }\n .resize-triggers > div { background: #eee; overflow: auto; }\n .contract-trigger:before { width: 200%; height: 200%; }");
710
+ var head = document.head || document.getElementsByTagName('head')[0];
711
+ var style = document.createElement('style');
712
+ style.type = 'text/css';
713
+ if (style.styleSheet) {
714
+ style.styleSheet.cssText = css;
715
+ } else {
716
+ style.appendChild(document.createTextNode(css));
717
+ }
718
+ head.appendChild(style);
719
+ stylesCreated = true;
720
+ }
721
+ };
722
+ var addResizeListener = function addResizeListener(element, fn) {
723
+ if (attachEvent) {
724
+ element.attachEvent('onresize', fn);
725
+ } else {
726
+ if (!element.__resizeTrigger__) {
727
+ if (getComputedStyle(element).position === 'static') {
728
+ element.style.position = 'relative';
729
+ }
730
+ createStyles();
731
+ element.__resizeLast__ = {};
732
+ element.__resizeListeners__ = [];
733
+ var resizeTrigger = element.__resizeTrigger__ = document.createElement('div');
734
+ resizeTrigger.className = 'resize-triggers';
735
+ resizeTrigger.innerHTML = '<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';
736
+ element.appendChild(resizeTrigger);
737
+ resetTrigger(element);
738
+ element.addEventListener('scroll', scrollListener, true);
739
+ if (animationStartEvent) {
740
+ resizeTrigger.addEventListener(animationStartEvent, function (event) {
741
+ if (event.animationName === RESIZE_ANIMATION_NAME) {
742
+ resetTrigger(element);
743
+ }
744
+ });
745
+ }
746
+ }
747
+ element.__resizeListeners__.push(fn);
748
+ }
749
+ };
750
+ var removeResizeListener = function removeResizeListener(element, fn) {
751
+ if (!element || !element.__resizeListeners__) return;
752
+ if (attachEvent) {
753
+ element.detachEvent('onresize', fn);
754
+ } else {
755
+ element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
756
+ if (!element.__resizeListeners__.length) {
757
+ element.removeEventListener('scroll', scrollListener);
758
+ element.__resizeTrigger__ = !element.removeChild(element.__resizeTrigger__);
759
+ }
760
+ }
761
+ };
762
+
763
+ _export(_export.S + _export.F * !_descriptors, 'Object', { defineProperty: _objectDp.f });
764
+
765
+ var $Object = _core.Object;
766
+ var defineProperty = function defineProperty(it, key, desc) {
767
+ return $Object.defineProperty(it, key, desc);
768
+ };
769
+
770
+ var defineProperty$1 = defineProperty;
771
+
772
+ var hasInitZIndex = false;
773
+ var zIndex;
774
+ (function () {
775
+ if (!window['__bk_zIndex_manager']) {
776
+ var zIndexManager = {
777
+ nextZIndex: function nextZIndex() {
778
+ var zIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default';
779
+ return zIndex === 'default' ? zIndexManager.zIndex++ : zIndex;
780
+ },
781
+ nextTickIndex: function nextTickIndex() {
782
+ var tick = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
783
+ var zIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
784
+ if (zIndex === 'default') {
785
+ zIndexManager.zIndex += tick;
786
+ return zIndexManager.zIndex;
787
+ }
788
+ return zIndex;
789
+ }
790
+ };
791
+ defineProperty$1(zIndexManager, 'zIndex', {
792
+ configurable: true,
793
+ get: function get() {
794
+ if (!hasInitZIndex) {
795
+ zIndex = zIndex || (Vue.prototype.$BK_EL || {}).zIndex || 2000;
796
+ hasInitZIndex = true;
797
+ }
798
+ return zIndex;
799
+ },
800
+ set: function set(value) {
801
+ zIndex = value;
802
+ }
803
+ });
804
+ window['__bk_zIndex_manager'] = zIndexManager;
805
+ }
806
+ })();
807
+ var zIndexManager = window['__bk_zIndex_manager'];
808
+
809
+ _export(_export.S, 'Number', {
810
+ isNaN: function isNaN(number) {
811
+ return number != number;
812
+ }
813
+ });
814
+
815
+ var isNan = _core.Number.isNaN;
816
+
817
+ var isNan$1 = isNan;
818
+
819
+ (function () {
820
+ if (!window['__bk_pop_manager']) {
821
+ var __containerId = "bk_pop_".concat(new Date().getTime());
822
+ var __maskId = "bk_pop_mask_".concat(new Date().getTime());
823
+ var __defaultKey = "bk_pop_key_".concat(new Date().getTime());
824
+ var __popInstances = [];
825
+ var popManager = {
826
+ containerId: __containerId,
827
+ maskId: __maskId,
828
+ defaultKey: __defaultKey,
829
+ formatKey: function formatKey(key) {
830
+ return String(key).replace(/#/g, '_');
831
+ },
832
+ show: function show(key, instance) {
833
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
834
+ tplAction: 'keepAll',
835
+ zIndex: '',
836
+ beforeHide: function beforeHide() {},
837
+ ignoreExistMask: false,
838
+ appendToBody: false
839
+ };
840
+ key = key === undefined || key === null || isNan$1(key) ? this.defaultKey : key;
841
+ key = this.formatKey(key);
842
+ var uid = uuid();
843
+ var isAppendToBody = false;
844
+ if (options.tplAction === 'onlyone') {
845
+ this.clearByTpl(key);
846
+ }
847
+ if (this.shouldAppendToBody(key)) {
848
+ isAppendToBody = true;
849
+ this.showModalMask(options.zIndex);
850
+ !options.appendToBody && this.container.append(instance);
851
+ } else {
852
+ isAppendToBody = false;
853
+ var lastInsZindex = options.zIndex;
854
+ this.showModalMask(lastInsZindex);
855
+ }
856
+ var beforeHide = options.beforeHide,
857
+ zIndex = options.zIndex,
858
+ ignoreExistMask = options.ignoreExistMask;
859
+ this.instances.push({
860
+ uid: uid,
861
+ ins: instance,
862
+ tplName: key,
863
+ beforeHide: beforeHide,
864
+ zIndex: zIndex,
865
+ ignoreExistMask: ignoreExistMask,
866
+ isAppendToBody: isAppendToBody
867
+ });
868
+ return "".concat(uid, "#").concat(key);
869
+ },
870
+ shouldAppendToBody: function shouldAppendToBody(tplName) {
871
+ return this.instances.some(function (item) {
872
+ return item.tplName === tplName;
873
+ });
874
+ },
875
+ hide: function hide(popId, options) {
876
+ options = options || {
877
+ action: 'hideUid'
878
+ };
879
+ switch (options.action) {
880
+ case 'hideAll':
881
+ this.clearAll();
882
+ break;
883
+ case 'hideUid':
884
+ this.clearByUid(popId);
885
+ break;
886
+ case 'hideSameTpl':
887
+ this.clearByTpl(popId);
888
+ break;
889
+ default:
890
+ this.autoClear(popId);
891
+ break;
892
+ }
893
+ this.updateModalMaskIndex();
894
+ },
895
+ updateModalMaskIndex: function updateModalMaskIndex() {
896
+ if (this.instances.length) {
897
+ var lastIns = this.instances.slice(-1)[0];
898
+ var lastInsZindex = lastIns.isAppendToBody ? lastIns.zIndex : lastIns.zIndex - 1;
899
+ this.showModalMask(lastInsZindex);
900
+ } else {
901
+ this.hideModalMask();
902
+ }
903
+ },
904
+ autoClear: function autoClear() {
905
+ var uid = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
906
+ if (uid.indexOf('#') > 0) {
907
+ this.clearByUid(uid);
908
+ } else {
909
+ this.clearByTpl();
910
+ }
911
+ },
912
+ clearByTpl: function clearByTpl(uid) {
913
+ var _this = this;
914
+ var keyStr = uid.split('#');
915
+ var tplName = keyStr.slice(-1)[0];
916
+ this.instances = this.instances.filter(function (item) {
917
+ if (item.tplName === tplName) {
918
+ _this.__hideInstance(item);
919
+ return false;
920
+ } else {
921
+ return true;
922
+ }
923
+ });
924
+ },
925
+ clearByUid: function clearByUid(uid) {
926
+ var keyStr = uid.split('#');
927
+ var instanceUid = keyStr[0];
928
+ var tplName = keyStr[1];
929
+ var index = this.instances.findIndex(function (ins) {
930
+ return ins.uid === instanceUid && ins.tplName === tplName;
931
+ });
932
+ if (index >= 0) {
933
+ this.__hideInstance(this.instances[index]);
934
+ this.instances.splice(index, 1);
935
+ } else {
936
+ console.warn('Can not find pop instance with index ' + index);
937
+ }
938
+ },
939
+ clearAll: function clearAll() {
940
+ var _this2 = this;
941
+ this.instances.forEach(function (item) {
942
+ return _this2.__hideInstance(item);
943
+ });
944
+ this.instances = [];
945
+ },
946
+ showModalMask: function showModalMask(zIndex) {
947
+ this.dialogMask.setAttribute('style', "z-index:".concat(zIndex, ";"));
948
+ document.body.style.overflow = 'hidden';
949
+ this.dialogMask.classList.remove('hide-active');
950
+ this.dialogMask.classList.add('show-active');
951
+ },
952
+ hideModalMask: function hideModalMask() {
953
+ this.dialogMask.classList.remove('show-active');
954
+ this.dialogMask.classList.add('hide-active');
955
+ document.body.style.overflow = '';
956
+ },
957
+ __hideInstance: function __hideInstance(instance) {
958
+ if (typeof instance.beforeHide === 'function') {
959
+ instance.beforeHide();
960
+ setTimeout(function () {
961
+ if (instance.isAppendToBody) {
962
+ instance.ins.remove();
963
+ }
964
+ });
965
+ } else {
966
+ if (instance.isAppendToBody) {
967
+ instance.ins.remove();
968
+ }
969
+ }
970
+ }
971
+ };
972
+ defineProperty$1(popManager, 'container', {
973
+ get: function get() {
974
+ var container = document.querySelector('[data-bkpop-container]');
975
+ if (!container) {
976
+ container = document.createElement('div');
977
+ container.setAttribute('id', this.containerId);
978
+ container.setAttribute('data-bkpop-container', 'true');
979
+ document.body.append(container);
980
+ }
981
+ return container;
982
+ }
983
+ });
984
+ defineProperty$1(popManager, 'dialogMask', {
985
+ get: function get() {
986
+ var mask = document.querySelector('[data-bkpop-mask]');
987
+ if (!mask) {
988
+ mask = document.createElement('div');
989
+ mask.setAttribute('id', this.maskId);
990
+ mask.setAttribute('class', 'bk-dialog-mask');
991
+ mask.setAttribute('data-bkpop-mask', 'true');
992
+ this.container.append(mask);
993
+ }
994
+ return mask;
995
+ }
996
+ });
997
+ defineProperty$1(popManager, 'instances', {
998
+ get: function get() {
999
+ return __popInstances;
1000
+ },
1001
+ set: function set(val) {
1002
+ __popInstances = val;
1003
+ }
1004
+ });
1005
+ window['__bk_pop_manager'] = popManager;
1006
+ window['__bk_pop_manager'].__container = popManager.container;
1007
+ }
1008
+ })();
1009
+ var popManager = window['__bk_pop_manager'];
1010
+
1011
+ function getTarget(node) {
1012
+ if (node === void 0) {
1013
+ node = document.body;
1014
+ }
1015
+ if (node === true) {
1016
+ return document.body;
1017
+ }
1018
+ return node instanceof window.Node ? node : document.querySelector(node);
1019
+ }
1020
+ var transferDom = {
1021
+ inserted: function inserted(el, _ref, vnode) {
1022
+ var value = _ref.value;
1023
+ if (el.dataset.transfer !== 'true') {
1024
+ return false;
1025
+ }
1026
+ el.className = el.className ? el.className + ' v-transfer-dom' : 'v-transfer-dom';
1027
+ var parentNode = el.parentNode;
1028
+ if (!parentNode) {
1029
+ return;
1030
+ }
1031
+ var home = document.createComment('');
1032
+ var hasMovedOut = false;
1033
+ if (value !== false) {
1034
+ parentNode.replaceChild(home, el);
1035
+ getTarget(value).appendChild(el);
1036
+ hasMovedOut = true;
1037
+ }
1038
+ if (!el.__transferDomData) {
1039
+ el.__transferDomData = {
1040
+ parentNode: parentNode,
1041
+ home: home,
1042
+ target: getTarget(value),
1043
+ hasMovedOut: hasMovedOut
1044
+ };
1045
+ }
1046
+ },
1047
+ componentUpdated: function componentUpdated(el, _ref2) {
1048
+ var value = _ref2.value;
1049
+ if (el.dataset.transfer !== 'true') {
1050
+ return false;
1051
+ }
1052
+ var ref$1 = el.__transferDomData;
1053
+ if (!ref$1) {
1054
+ return;
1055
+ }
1056
+ var parentNode = ref$1.parentNode;
1057
+ var home = ref$1.home;
1058
+ var hasMovedOut = ref$1.hasMovedOut;
1059
+ if (!hasMovedOut && value) {
1060
+ parentNode.replaceChild(home, el);
1061
+ getTarget(value).appendChild(el);
1062
+ el.__transferDomData = _extends({}, el.__transferDomData, {
1063
+ hasMovedOut: true,
1064
+ target: getTarget(value)
1065
+ });
1066
+ } else if (hasMovedOut && value === false) {
1067
+ parentNode.replaceChild(el, home);
1068
+ el.__transferDomData = _extends({}, el.__transferDomData, {
1069
+ hasMovedOut: false,
1070
+ target: getTarget(value)
1071
+ });
1072
+ } else if (value) {
1073
+ getTarget(value).appendChild(el);
1074
+ }
1075
+ },
1076
+ unbind: function unbind(el) {
1077
+ if (el.dataset.transfer !== 'true') {
1078
+ return false;
1079
+ }
1080
+ el.className = el.className.replace('v-transfer-dom', '');
1081
+ var ref$1 = el.__transferDomData;
1082
+ if (!ref$1) {
1083
+ return;
1084
+ }
1085
+ if (el.__transferDomData.hasMovedOut === true) {
1086
+ el.__transferDomData.parentNode && el.__transferDomData.parentNode.appendChild(el);
1087
+ }
1088
+ el.__transferDomData = null;
1089
+ }
1090
+ };
1091
+ transferDom.install = function (Vue) {
1092
+ Vue.directive('bk-transfer-dom', transferDom);
1093
+ };
1094
+
1095
+ var script = {
1096
+ name: 'bk-sideslider',
1097
+ directives: {
1098
+ transferDom: transferDom
1099
+ },
1100
+ mixins: [locale.mixin],
1101
+ props: {
1102
+ isShow: {
1103
+ type: Boolean,
1104
+ default: false
1105
+ },
1106
+ title: {
1107
+ type: String,
1108
+ default: ''
1109
+ },
1110
+ quickClose: {
1111
+ type: Boolean,
1112
+ default: false
1113
+ },
1114
+ showMask: {
1115
+ type: Boolean,
1116
+ default: true
1117
+ },
1118
+ width: {
1119
+ type: Number,
1120
+ default: 400
1121
+ },
1122
+ beforeClose: {
1123
+ type: Function,
1124
+ default: function _default(res) {
1125
+ return true;
1126
+ }
1127
+ },
1128
+ direction: {
1129
+ type: String,
1130
+ default: 'right',
1131
+ validator: function validator(value) {
1132
+ return ['left', 'right'].indexOf(value) > -1;
1133
+ }
1134
+ },
1135
+ extCls: {
1136
+ type: String,
1137
+ default: ''
1138
+ },
1139
+ zIndex: {
1140
+ type: [Number, String],
1141
+ default: 'default'
1142
+ },
1143
+ multiInstance: {
1144
+ type: Boolean,
1145
+ default: true
1146
+ },
1147
+ transfer: {
1148
+ type: Boolean,
1149
+ default: false
1150
+ },
1151
+ appendToBody: {
1152
+ type: Boolean,
1153
+ default: false
1154
+ }
1155
+ },
1156
+ data: function data() {
1157
+ return {
1158
+ needBorder: false,
1159
+ localZIndex: zIndexManager.nextTickIndex(2),
1160
+ popUid: ''
1161
+ };
1162
+ },
1163
+ computed: {
1164
+ calcDirection: function calcDirection() {
1165
+ return this.direction === 'left' ? 'right' : 'left';
1166
+ }
1167
+ },
1168
+ watch: {
1169
+ isShow: function isShow(val) {
1170
+ var _this = this;
1171
+ var root = document.documentElement;
1172
+ if (val) {
1173
+ this.localZIndex = zIndexManager.nextTickIndex(2);
1174
+ addClass(root, 'bk-sideslider-show');
1175
+ if (this.isScrollY()) {
1176
+ addClass(root, 'has-sideslider-padding');
1177
+ }
1178
+ if (this.showMask) {
1179
+ this.generatePopUid();
1180
+ }
1181
+ setTimeout(function () {
1182
+ _this.$emit('shown');
1183
+ }, 200);
1184
+ } else {
1185
+ removeClass(root, 'bk-sideslider-show has-sideslider-padding');
1186
+ if (this.popUid) {
1187
+ popManager.hide(this.popUid);
1188
+ this.popUid = '';
1189
+ }
1190
+ setTimeout(function () {
1191
+ _this.$emit('hidden');
1192
+ }, 200);
1193
+ }
1194
+ }
1195
+ },
1196
+ mounted: function mounted() {
1197
+ if (this.$refs.content && this.showMask) {
1198
+ this.generatePopUid();
1199
+ addResizeListener(this.$refs.content, this.handleContentResize);
1200
+ }
1201
+ },
1202
+ destroyed: function destroyed() {
1203
+ var root = document.querySelector('html');
1204
+ removeClass(root, 'bk-sideslider-show');
1205
+ removeResizeListener(this.$refs.content, this.handleContentResize);
1206
+ },
1207
+ beforeDestroy: function beforeDestroy() {
1208
+ this.isShow && this.popUid && popManager.hide(this.popUid);
1209
+ },
1210
+ methods: {
1211
+ generatePopUid: function generatePopUid() {
1212
+ this.popUid = popManager.show('bk-sideslider', this.$el, {
1213
+ zIndex: this.localZIndex - 1,
1214
+ tplAction: this.multiInstance && 'keepAll' || 'onlyone',
1215
+ appendToBody: this.transfer
1216
+ });
1217
+ },
1218
+ isScrollY: function isScrollY() {
1219
+ return document.documentElement.offsetHeight > document.documentElement.clientHeight;
1220
+ },
1221
+ show: function show() {
1222
+ var root = document.documentElement;
1223
+ addClass(root, 'bk-sideslider-show');
1224
+ this.isShow = true;
1225
+ },
1226
+ hide: function hide() {
1227
+ var root = document.querySelector('html');
1228
+ removeClass(root, 'bk-sideslider-show');
1229
+ this.isShow = false;
1230
+ },
1231
+ handleClose: function handleClose() {
1232
+ var _this2 = this;
1233
+ return _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
1234
+ var shouldClose;
1235
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1236
+ while (1) {
1237
+ switch (_context.prev = _context.next) {
1238
+ case 0:
1239
+ shouldClose = true;
1240
+ if (!(typeof _this2.beforeClose === 'function')) {
1241
+ _context.next = 5;
1242
+ break;
1243
+ }
1244
+ _context.next = 4;
1245
+ return _this2.beforeClose();
1246
+ case 4:
1247
+ shouldClose = _context.sent;
1248
+ case 5:
1249
+ if (shouldClose) {
1250
+ _this2.$emit('update:isShow', false);
1251
+ setTimeout(function () {
1252
+ _this2.$emit('animation-end');
1253
+ }, 250);
1254
+ }
1255
+ case 6:
1256
+ case "end":
1257
+ return _context.stop();
1258
+ }
1259
+ }
1260
+ }, _callee);
1261
+ }))();
1262
+ },
1263
+ handleQuickClose: function handleQuickClose() {
1264
+ if (this.quickClose) {
1265
+ this.handleClose();
1266
+ }
1267
+ },
1268
+ handleContentResize: function handleContentResize() {
1269
+ var ref = this.$refs.content;
1270
+ this.needBorder = ref.scrollHeight > ref.clientHeight;
1271
+ }
1272
+ }
1273
+ };
1274
+
1275
+ function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
1276
+ , shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
1277
+ if (typeof shadowMode !== 'boolean') {
1278
+ createInjectorSSR = createInjector;
1279
+ createInjector = shadowMode;
1280
+ shadowMode = false;
1281
+ }
1282
+ var options = typeof script === 'function' ? script.options : script;
1283
+ if (template && template.render) {
1284
+ options.render = template.render;
1285
+ options.staticRenderFns = template.staticRenderFns;
1286
+ options._compiled = true;
1287
+ if (isFunctionalTemplate) {
1288
+ options.functional = true;
1289
+ }
1290
+ }
1291
+ if (scopeId) {
1292
+ options._scopeId = scopeId;
1293
+ }
1294
+ var hook;
1295
+ if (moduleIdentifier) {
1296
+ hook = function hook(context) {
1297
+ context = context ||
1298
+ this.$vnode && this.$vnode.ssrContext ||
1299
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
1300
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
1301
+ context = __VUE_SSR_CONTEXT__;
1302
+ }
1303
+ if (style) {
1304
+ style.call(this, createInjectorSSR(context));
1305
+ }
1306
+ if (context && context._registeredComponents) {
1307
+ context._registeredComponents.add(moduleIdentifier);
1308
+ }
1309
+ };
1310
+ options._ssrRegister = hook;
1311
+ } else if (style) {
1312
+ hook = shadowMode ? function () {
1313
+ style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
1314
+ } : function (context) {
1315
+ style.call(this, createInjector(context));
1316
+ };
1317
+ }
1318
+ if (hook) {
1319
+ if (options.functional) {
1320
+ var originalRender = options.render;
1321
+ options.render = function renderWithStyleInjection(h, context) {
1322
+ hook.call(context);
1323
+ return originalRender(h, context);
1324
+ };
1325
+ } else {
1326
+ var existing = options.beforeCreate;
1327
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
1328
+ }
1329
+ }
1330
+ return script;
1331
+ }
1332
+ var normalizeComponent_1 = normalizeComponent;
1333
+
1334
+ /* script */
1335
+ var __vue_script__ = script;
1336
+ /* template */
1337
+ var __vue_render__ = function __vue_render__() {
1338
+ var _vm = this;
1339
+ var _h = _vm.$createElement;
1340
+ var _c = _vm._self._c || _h;
1341
+ return _c('transition', {
1342
+ attrs: {
1343
+ "name": "slide"
1344
+ }
1345
+ }, [_vm.isShow ? _c('article', {
1346
+ directives: [{
1347
+ name: "transfer-dom",
1348
+ rawName: "v-transfer-dom"
1349
+ }],
1350
+ staticClass: "bk-sideslider",
1351
+ class: _vm.extCls,
1352
+ style: {
1353
+ zIndex: _vm.localZIndex
1354
+ },
1355
+ attrs: {
1356
+ "data-transfer": _vm.transfer
1357
+ },
1358
+ on: {
1359
+ "mousedown": function mousedown($event) {
1360
+ if ($event.target !== $event.currentTarget) {
1361
+ return null;
1362
+ }
1363
+ return _vm.handleQuickClose.apply(null, arguments);
1364
+ }
1365
+ }
1366
+ }, [_c('section', {
1367
+ staticClass: "bk-sideslider-wrapper",
1368
+ class: [{
1369
+ left: _vm.direction === 'left',
1370
+ right: _vm.direction === 'right'
1371
+ }],
1372
+ style: {
1373
+ width: _vm.width + 'px'
1374
+ }
1375
+ }, [_c('div', {
1376
+ staticClass: "bk-sideslider-header"
1377
+ }, [_c('div', {
1378
+ staticClass: "bk-sideslider-closer",
1379
+ style: {
1380
+ float: _vm.calcDirection
1381
+ },
1382
+ on: {
1383
+ "click": _vm.handleClose
1384
+ }
1385
+ }, [_c('i', {
1386
+ staticClass: "bk-icon",
1387
+ class: 'icon-angle-' + _vm.direction
1388
+ })]), _c('div', {
1389
+ staticClass: "bk-sideslider-title",
1390
+ style: {
1391
+ padding: _vm.calcDirection === 'left' ? '0 0 0 50px' : '0 0 0 30px'
1392
+ }
1393
+ }, [_vm._t("header", function () {
1394
+ return [_vm._v("\n " + _vm._s(_vm.title || _vm.t('bk.sideslider.title')) + "\n ")];
1395
+ })], 2)]), _c('div', {
1396
+ ref: "content",
1397
+ staticClass: "bk-sideslider-content",
1398
+ style: {
1399
+ maxHeight: _vm.$slots.footer ? 'calc(100vh - 114px)' : 'calc(100vh - 60px)'
1400
+ }
1401
+ }, [_vm._t("content")], 2), _vm.$slots.footer ? _c('div', {
1402
+ staticClass: "bk-sideslider-footer",
1403
+ style: {
1404
+ borderTopColor: !_vm.needBorder ? 'transparent' : '#dcdee5',
1405
+ backgroundColor: !_vm.needBorder ? '#fafbfd' : '#ffffff'
1406
+ }
1407
+ }, [_vm._t("footer")], 2) : _vm._e()])]) : _vm._e()]);
1408
+ };
1409
+ var __vue_staticRenderFns__ = [];
1410
+
1411
+ /* style */
1412
+ var __vue_inject_styles__ = undefined;
1413
+ /* scoped */
1414
+ var __vue_scope_id__ = undefined;
1415
+ /* module identifier */
1416
+ var __vue_module_identifier__ = undefined;
1417
+ /* functional template */
1418
+ var __vue_is_functional_template__ = false;
1419
+ /* style inject */
1420
+
1421
+ /* style inject SSR */
1422
+
1423
+ /* style inject shadow dom */
1424
+
1425
+ var __vue_component__ = /*#__PURE__*/normalizeComponent_1({
1426
+ render: __vue_render__,
1427
+ staticRenderFns: __vue_staticRenderFns__
1428
+ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
1429
+
1430
+ var _toObject = function (it) {
1431
+ return Object(_defined(it));
1432
+ };
1433
+
1434
+ var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
1435
+ return _cof(it) == 'String' ? it.split('') : Object(it);
1436
+ };
1437
+
1438
+ var _toIobject = function (it) {
1439
+ return _iobject(_defined(it));
1440
+ };
1441
+
1442
+ var ceil = Math.ceil;
1443
+ var floor = Math.floor;
1444
+ var _toInteger = function (it) {
1445
+ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
1446
+ };
1447
+
1448
+ var min = Math.min;
1449
+ var _toLength = function (it) {
1450
+ return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0;
1451
+ };
1452
+
1453
+ var max = Math.max;
1454
+ var min$1 = Math.min;
1455
+ var _toAbsoluteIndex = function (index, length) {
1456
+ index = _toInteger(index);
1457
+ return index < 0 ? max(index + length, 0) : min$1(index, length);
1458
+ };
1459
+
1460
+ var _arrayIncludes = function (IS_INCLUDES) {
1461
+ return function ($this, el, fromIndex) {
1462
+ var O = _toIobject($this);
1463
+ var length = _toLength(O.length);
1464
+ var index = _toAbsoluteIndex(fromIndex, length);
1465
+ var value;
1466
+ if (IS_INCLUDES && el != el) while (length > index) {
1467
+ value = O[index++];
1468
+ if (value != value) return true;
1469
+ } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
1470
+ if (O[index] === el) return IS_INCLUDES || index || 0;
1471
+ } return !IS_INCLUDES && -1;
1472
+ };
1473
+ };
1474
+
1475
+ var _shared = createCommonjsModule(function (module) {
1476
+ var SHARED = '__core-js_shared__';
1477
+ var store = _global[SHARED] || (_global[SHARED] = {});
1478
+ (module.exports = function (key, value) {
1479
+ return store[key] || (store[key] = value !== undefined ? value : {});
1480
+ })('versions', []).push({
1481
+ version: _core.version,
1482
+ mode: 'pure' ,
1483
+ copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
1484
+ });
1485
+ });
1486
+
1487
+ var id = 0;
1488
+ var px = Math.random();
1489
+ var _uid = function (key) {
1490
+ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
1491
+ };
1492
+
1493
+ var shared = _shared('keys');
1494
+ var _sharedKey = function (key) {
1495
+ return shared[key] || (shared[key] = _uid(key));
1496
+ };
1497
+
1498
+ var arrayIndexOf = _arrayIncludes(false);
1499
+ var IE_PROTO = _sharedKey('IE_PROTO');
1500
+ var _objectKeysInternal = function (object, names) {
1501
+ var O = _toIobject(object);
1502
+ var i = 0;
1503
+ var result = [];
1504
+ var key;
1505
+ for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key);
1506
+ while (names.length > i) if (_has(O, key = names[i++])) {
1507
+ ~arrayIndexOf(result, key) || result.push(key);
1508
+ }
1509
+ return result;
1510
+ };
1511
+
1512
+ var _enumBugKeys = (
1513
+ 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
1514
+ ).split(',');
1515
+
1516
+ var _objectKeys = Object.keys || function keys(O) {
1517
+ return _objectKeysInternal(O, _enumBugKeys);
1518
+ };
1519
+
1520
+ var _objectSap = function (KEY, exec) {
1521
+ var fn = (_core.Object || {})[KEY] || Object[KEY];
1522
+ var exp = {};
1523
+ exp[KEY] = exec(fn);
1524
+ _export(_export.S + _export.F * _fails(function () { fn(1); }), 'Object', exp);
1525
+ };
1526
+
1527
+ _objectSap('keys', function () {
1528
+ return function keys(it) {
1529
+ return _objectKeys(_toObject(it));
1530
+ };
1531
+ });
1532
+
1533
+ var keys = _core.Object.keys;
1534
+
1535
+ var keys$1 = keys;
1536
+
1537
+ function setInstaller (component, afterInstall) {
1538
+ component.install = function (Vue) {
1539
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1540
+ var props = component.props || {};
1541
+ keys$1(options).forEach(function (key) {
1542
+ if (props.hasOwnProperty(key)) {
1543
+ if (typeof props[key] === 'function' || props[key] instanceof Array) {
1544
+ props[key] = {
1545
+ type: props[key],
1546
+ default: options[key]
1547
+ };
1548
+ } else {
1549
+ props[key].default = options[key];
1550
+ }
1551
+ }
1552
+ });
1553
+ component.name = options.namespace ? component.name.replace('bk', options.namespace) : component.name;
1554
+ Vue.component(component.name, component);
1555
+ typeof afterInstall === 'function' && afterInstall(Vue, options);
1556
+ };
1557
+ }
1558
+
1559
+ setInstaller(__vue_component__);
1560
+
1561
+ exports.default = __vue_component__;
1562
+
1563
+ Object.defineProperty(exports, '__esModule', { value: true });
1773
1564
 
1774
1565
  }));