xianniu-ui 0.5.2-beta.0 → 0.5.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/static/fonts/element-icons.535877f5.woff +0 -0
- package/lib/static/fonts/element-icons.732389de.ttf +0 -0
- package/lib/xianniu-ui.common.js +50276 -62
- package/lib/xianniu-ui.css +1 -0
- package/lib/xianniu-ui.umd.js +50287 -63
- package/lib/xianniu-ui.umd.min.js +16 -1
- package/package.json +1 -1
- package/lib/static/css/xianniu-ui.common.5be6bd50.css +0 -1
- package/lib/static/css/xianniu-ui.umd.5be6bd50.css +0 -1
- package/lib/static/css/xianniu-ui.umd.min.5be6bd50.css +0 -1
- package/lib/xianniu-ui.common.chunk-elementUI.js +0 -69440
- package/lib/xianniu-ui.common.chunk-libs~253ae210.js +0 -3816
- package/lib/xianniu-ui.common.chunk-libs~31ecd969.js +0 -1267
- package/lib/xianniu-ui.common.chunk-libs~6cb95173.js +0 -1594
- package/lib/xianniu-ui.common.chunk-libs~93acefaf.js +0 -3328
- package/lib/xianniu-ui.common.chunk-libs~af0f4b76.js +0 -17212
- package/lib/xianniu-ui.common.chunk-libs~b58f7129.js +0 -1723
- package/lib/xianniu-ui.common.chunk-libs~d939e436.js +0 -2356
- package/lib/xianniu-ui.common.chunk-libs~dfe5688e.js +0 -4924
- package/lib/xianniu-ui.common.xianniu-ui.common.js +0 -17165
- package/lib/xianniu-ui.umd.chunk-elementUI.js +0 -69440
- package/lib/xianniu-ui.umd.chunk-libs~253ae210.js +0 -3816
- package/lib/xianniu-ui.umd.chunk-libs~31ecd969.js +0 -1267
- package/lib/xianniu-ui.umd.chunk-libs~6cb95173.js +0 -1594
- package/lib/xianniu-ui.umd.chunk-libs~93acefaf.js +0 -3328
- package/lib/xianniu-ui.umd.chunk-libs~af0f4b76.js +0 -17212
- package/lib/xianniu-ui.umd.chunk-libs~b58f7129.js +0 -1723
- package/lib/xianniu-ui.umd.chunk-libs~d939e436.js +0 -2356
- package/lib/xianniu-ui.umd.chunk-libs~dfe5688e.js +0 -4924
- package/lib/xianniu-ui.umd.min.chunk-elementUI.js +0 -9
- package/lib/xianniu-ui.umd.min.chunk-libs~253ae210.js +0 -1
- package/lib/xianniu-ui.umd.min.chunk-libs~31ecd969.js +0 -1
- package/lib/xianniu-ui.umd.min.chunk-libs~6cb95173.js +0 -1
- package/lib/xianniu-ui.umd.min.chunk-libs~93acefaf.js +0 -1
- package/lib/xianniu-ui.umd.min.chunk-libs~af0f4b76.js +0 -9
- package/lib/xianniu-ui.umd.min.chunk-libs~b58f7129.js +0 -16
- package/lib/xianniu-ui.umd.min.chunk-libs~d939e436.js +0 -1
- package/lib/xianniu-ui.umd.min.chunk-libs~dfe5688e.js +0 -8
- package/lib/xianniu-ui.umd.min.xianniu-ui.umd.min.js +0 -1
- package/lib/xianniu-ui.umd.xianniu-ui.umd.js +0 -17175
|
@@ -1,1723 +0,0 @@
|
|
|
1
|
-
((typeof self !== 'undefined' ? self : this)["webpackJsonpxianniu_ui"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpxianniu_ui"] || []).push([[6],{
|
|
2
|
-
|
|
3
|
-
/***/ "4362":
|
|
4
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
5
|
-
|
|
6
|
-
exports.nextTick = function nextTick(fn) {
|
|
7
|
-
var args = Array.prototype.slice.call(arguments);
|
|
8
|
-
args.shift();
|
|
9
|
-
setTimeout(function () {
|
|
10
|
-
fn.apply(null, args);
|
|
11
|
-
}, 0);
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
exports.platform = exports.arch =
|
|
15
|
-
exports.execPath = exports.title = 'browser';
|
|
16
|
-
exports.pid = 1;
|
|
17
|
-
exports.browser = true;
|
|
18
|
-
exports.env = {};
|
|
19
|
-
exports.argv = [];
|
|
20
|
-
|
|
21
|
-
exports.binding = function (name) {
|
|
22
|
-
throw new Error('No such module. (Possibly not yet loaded)')
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
(function () {
|
|
26
|
-
var cwd = '/';
|
|
27
|
-
var path;
|
|
28
|
-
exports.cwd = function () { return cwd };
|
|
29
|
-
exports.chdir = function (dir) {
|
|
30
|
-
if (!path) path = __webpack_require__("df7c");
|
|
31
|
-
cwd = path.resolve(dir, cwd);
|
|
32
|
-
};
|
|
33
|
-
})();
|
|
34
|
-
|
|
35
|
-
exports.exit = exports.kill =
|
|
36
|
-
exports.umask = exports.dlopen =
|
|
37
|
-
exports.uptime = exports.memoryUsage =
|
|
38
|
-
exports.uvCounters = function() {};
|
|
39
|
-
exports.features = {};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
/***/ }),
|
|
43
|
-
|
|
44
|
-
/***/ "7b3e":
|
|
45
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
46
|
-
|
|
47
|
-
"use strict";
|
|
48
|
-
/**
|
|
49
|
-
* Copyright 2013-2015, Facebook, Inc.
|
|
50
|
-
* All rights reserved.
|
|
51
|
-
*
|
|
52
|
-
* This source code is licensed under the BSD-style license found in the
|
|
53
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
54
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
55
|
-
*
|
|
56
|
-
* @providesModule isEventSupported
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
var ExecutionEnvironment = __webpack_require__("a3de");
|
|
62
|
-
|
|
63
|
-
var useHasFeature;
|
|
64
|
-
if (ExecutionEnvironment.canUseDOM) {
|
|
65
|
-
useHasFeature =
|
|
66
|
-
document.implementation &&
|
|
67
|
-
document.implementation.hasFeature &&
|
|
68
|
-
// always returns true in newer browsers as per the standard.
|
|
69
|
-
// @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
|
|
70
|
-
document.implementation.hasFeature('', '') !== true;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Checks if an event is supported in the current execution environment.
|
|
75
|
-
*
|
|
76
|
-
* NOTE: This will not work correctly for non-generic events such as `change`,
|
|
77
|
-
* `reset`, `load`, `error`, and `select`.
|
|
78
|
-
*
|
|
79
|
-
* Borrows from Modernizr.
|
|
80
|
-
*
|
|
81
|
-
* @param {string} eventNameSuffix Event name, e.g. "click".
|
|
82
|
-
* @param {?boolean} capture Check if the capture phase is supported.
|
|
83
|
-
* @return {boolean} True if the event is supported.
|
|
84
|
-
* @internal
|
|
85
|
-
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
86
|
-
*/
|
|
87
|
-
function isEventSupported(eventNameSuffix, capture) {
|
|
88
|
-
if (!ExecutionEnvironment.canUseDOM ||
|
|
89
|
-
capture && !('addEventListener' in document)) {
|
|
90
|
-
return false;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
var eventName = 'on' + eventNameSuffix;
|
|
94
|
-
var isSupported = eventName in document;
|
|
95
|
-
|
|
96
|
-
if (!isSupported) {
|
|
97
|
-
var element = document.createElement('div');
|
|
98
|
-
element.setAttribute(eventName, 'return;');
|
|
99
|
-
isSupported = typeof element[eventName] === 'function';
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
|
|
103
|
-
// This is the only way to test support for the `wheel` event in IE9+.
|
|
104
|
-
isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return isSupported;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
module.exports = isEventSupported;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
/***/ }),
|
|
114
|
-
|
|
115
|
-
/***/ "8eb7":
|
|
116
|
-
/***/ (function(module, exports) {
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Copyright 2004-present Facebook. All Rights Reserved.
|
|
120
|
-
*
|
|
121
|
-
* @providesModule UserAgent_DEPRECATED
|
|
122
|
-
*/
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Provides entirely client-side User Agent and OS detection. You should prefer
|
|
126
|
-
* the non-deprecated UserAgent module when possible, which exposes our
|
|
127
|
-
* authoritative server-side PHP-based detection to the client.
|
|
128
|
-
*
|
|
129
|
-
* Usage is straightforward:
|
|
130
|
-
*
|
|
131
|
-
* if (UserAgent_DEPRECATED.ie()) {
|
|
132
|
-
* // IE
|
|
133
|
-
* }
|
|
134
|
-
*
|
|
135
|
-
* You can also do version checks:
|
|
136
|
-
*
|
|
137
|
-
* if (UserAgent_DEPRECATED.ie() >= 7) {
|
|
138
|
-
* // IE7 or better
|
|
139
|
-
* }
|
|
140
|
-
*
|
|
141
|
-
* The browser functions will return NaN if the browser does not match, so
|
|
142
|
-
* you can also do version compares the other way:
|
|
143
|
-
*
|
|
144
|
-
* if (UserAgent_DEPRECATED.ie() < 7) {
|
|
145
|
-
* // IE6 or worse
|
|
146
|
-
* }
|
|
147
|
-
*
|
|
148
|
-
* Note that the version is a float and may include a minor version number,
|
|
149
|
-
* so you should always use range operators to perform comparisons, not
|
|
150
|
-
* strict equality.
|
|
151
|
-
*
|
|
152
|
-
* **Note:** You should **strongly** prefer capability detection to browser
|
|
153
|
-
* version detection where it's reasonable:
|
|
154
|
-
*
|
|
155
|
-
* http://www.quirksmode.org/js/support.html
|
|
156
|
-
*
|
|
157
|
-
* Further, we have a large number of mature wrapper functions and classes
|
|
158
|
-
* which abstract away many browser irregularities. Check the documentation,
|
|
159
|
-
* grep for things, or ask on javascript@lists.facebook.com before writing yet
|
|
160
|
-
* another copy of "event || window.event".
|
|
161
|
-
*
|
|
162
|
-
*/
|
|
163
|
-
|
|
164
|
-
var _populated = false;
|
|
165
|
-
|
|
166
|
-
// Browsers
|
|
167
|
-
var _ie, _firefox, _opera, _webkit, _chrome;
|
|
168
|
-
|
|
169
|
-
// Actual IE browser for compatibility mode
|
|
170
|
-
var _ie_real_version;
|
|
171
|
-
|
|
172
|
-
// Platforms
|
|
173
|
-
var _osx, _windows, _linux, _android;
|
|
174
|
-
|
|
175
|
-
// Architectures
|
|
176
|
-
var _win64;
|
|
177
|
-
|
|
178
|
-
// Devices
|
|
179
|
-
var _iphone, _ipad, _native;
|
|
180
|
-
|
|
181
|
-
var _mobile;
|
|
182
|
-
|
|
183
|
-
function _populate() {
|
|
184
|
-
if (_populated) {
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
_populated = true;
|
|
189
|
-
|
|
190
|
-
// To work around buggy JS libraries that can't handle multi-digit
|
|
191
|
-
// version numbers, Opera 10's user agent string claims it's Opera
|
|
192
|
-
// 9, then later includes a Version/X.Y field:
|
|
193
|
-
//
|
|
194
|
-
// Opera/9.80 (foo) Presto/2.2.15 Version/10.10
|
|
195
|
-
var uas = navigator.userAgent;
|
|
196
|
-
var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
|
|
197
|
-
var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
|
|
198
|
-
|
|
199
|
-
_iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
|
|
200
|
-
_ipad = /\b(iP[ao]d)/.exec(uas);
|
|
201
|
-
_android = /Android/i.exec(uas);
|
|
202
|
-
_native = /FBAN\/\w+;/i.exec(uas);
|
|
203
|
-
_mobile = /Mobile/i.exec(uas);
|
|
204
|
-
|
|
205
|
-
// Note that the IE team blog would have you believe you should be checking
|
|
206
|
-
// for 'Win64; x64'. But MSDN then reveals that you can actually be coming
|
|
207
|
-
// from either x64 or ia64; so ultimately, you should just check for Win64
|
|
208
|
-
// as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit
|
|
209
|
-
// Windows will send 'WOW64' instead.
|
|
210
|
-
_win64 = !!(/Win64/.exec(uas));
|
|
211
|
-
|
|
212
|
-
if (agent) {
|
|
213
|
-
_ie = agent[1] ? parseFloat(agent[1]) : (
|
|
214
|
-
agent[5] ? parseFloat(agent[5]) : NaN);
|
|
215
|
-
// IE compatibility mode
|
|
216
|
-
if (_ie && document && document.documentMode) {
|
|
217
|
-
_ie = document.documentMode;
|
|
218
|
-
}
|
|
219
|
-
// grab the "true" ie version from the trident token if available
|
|
220
|
-
var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
|
|
221
|
-
_ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
|
|
222
|
-
|
|
223
|
-
_firefox = agent[2] ? parseFloat(agent[2]) : NaN;
|
|
224
|
-
_opera = agent[3] ? parseFloat(agent[3]) : NaN;
|
|
225
|
-
_webkit = agent[4] ? parseFloat(agent[4]) : NaN;
|
|
226
|
-
if (_webkit) {
|
|
227
|
-
// We do not add the regexp to the above test, because it will always
|
|
228
|
-
// match 'safari' only since 'AppleWebKit' appears before 'Chrome' in
|
|
229
|
-
// the userAgent string.
|
|
230
|
-
agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
|
|
231
|
-
_chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
|
|
232
|
-
} else {
|
|
233
|
-
_chrome = NaN;
|
|
234
|
-
}
|
|
235
|
-
} else {
|
|
236
|
-
_ie = _firefox = _opera = _chrome = _webkit = NaN;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
if (os) {
|
|
240
|
-
if (os[1]) {
|
|
241
|
-
// Detect OS X version. If no version number matches, set _osx to true.
|
|
242
|
-
// Version examples: 10, 10_6_1, 10.7
|
|
243
|
-
// Parses version number as a float, taking only first two sets of
|
|
244
|
-
// digits. If only one set of digits is found, returns just the major
|
|
245
|
-
// version number.
|
|
246
|
-
var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
|
|
247
|
-
|
|
248
|
-
_osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;
|
|
249
|
-
} else {
|
|
250
|
-
_osx = false;
|
|
251
|
-
}
|
|
252
|
-
_windows = !!os[2];
|
|
253
|
-
_linux = !!os[3];
|
|
254
|
-
} else {
|
|
255
|
-
_osx = _windows = _linux = false;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
var UserAgent_DEPRECATED = {
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Check if the UA is Internet Explorer.
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
* @return float|NaN Version number (if match) or NaN.
|
|
266
|
-
*/
|
|
267
|
-
ie: function() {
|
|
268
|
-
return _populate() || _ie;
|
|
269
|
-
},
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Check if we're in Internet Explorer compatibility mode.
|
|
273
|
-
*
|
|
274
|
-
* @return bool true if in compatibility mode, false if
|
|
275
|
-
* not compatibility mode or not ie
|
|
276
|
-
*/
|
|
277
|
-
ieCompatibilityMode: function() {
|
|
278
|
-
return _populate() || (_ie_real_version > _ie);
|
|
279
|
-
},
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
|
|
284
|
-
* only need this because Skype can't handle 64-bit IE yet. We need to remove
|
|
285
|
-
* this when we don't need it -- tracked by #601957.
|
|
286
|
-
*/
|
|
287
|
-
ie64: function() {
|
|
288
|
-
return UserAgent_DEPRECATED.ie() && _win64;
|
|
289
|
-
},
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Check if the UA is Firefox.
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
* @return float|NaN Version number (if match) or NaN.
|
|
296
|
-
*/
|
|
297
|
-
firefox: function() {
|
|
298
|
-
return _populate() || _firefox;
|
|
299
|
-
},
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* Check if the UA is Opera.
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
* @return float|NaN Version number (if match) or NaN.
|
|
307
|
-
*/
|
|
308
|
-
opera: function() {
|
|
309
|
-
return _populate() || _opera;
|
|
310
|
-
},
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* Check if the UA is WebKit.
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
* @return float|NaN Version number (if match) or NaN.
|
|
318
|
-
*/
|
|
319
|
-
webkit: function() {
|
|
320
|
-
return _populate() || _webkit;
|
|
321
|
-
},
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* For Push
|
|
325
|
-
* WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
|
|
326
|
-
*/
|
|
327
|
-
safari: function() {
|
|
328
|
-
return UserAgent_DEPRECATED.webkit();
|
|
329
|
-
},
|
|
330
|
-
|
|
331
|
-
/**
|
|
332
|
-
* Check if the UA is a Chrome browser.
|
|
333
|
-
*
|
|
334
|
-
*
|
|
335
|
-
* @return float|NaN Version number (if match) or NaN.
|
|
336
|
-
*/
|
|
337
|
-
chrome : function() {
|
|
338
|
-
return _populate() || _chrome;
|
|
339
|
-
},
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Check if the user is running Windows.
|
|
344
|
-
*
|
|
345
|
-
* @return bool `true' if the user's OS is Windows.
|
|
346
|
-
*/
|
|
347
|
-
windows: function() {
|
|
348
|
-
return _populate() || _windows;
|
|
349
|
-
},
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
/**
|
|
353
|
-
* Check if the user is running Mac OS X.
|
|
354
|
-
*
|
|
355
|
-
* @return float|bool Returns a float if a version number is detected,
|
|
356
|
-
* otherwise true/false.
|
|
357
|
-
*/
|
|
358
|
-
osx: function() {
|
|
359
|
-
return _populate() || _osx;
|
|
360
|
-
},
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* Check if the user is running Linux.
|
|
364
|
-
*
|
|
365
|
-
* @return bool `true' if the user's OS is some flavor of Linux.
|
|
366
|
-
*/
|
|
367
|
-
linux: function() {
|
|
368
|
-
return _populate() || _linux;
|
|
369
|
-
},
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* Check if the user is running on an iPhone or iPod platform.
|
|
373
|
-
*
|
|
374
|
-
* @return bool `true' if the user is running some flavor of the
|
|
375
|
-
* iPhone OS.
|
|
376
|
-
*/
|
|
377
|
-
iphone: function() {
|
|
378
|
-
return _populate() || _iphone;
|
|
379
|
-
},
|
|
380
|
-
|
|
381
|
-
mobile: function() {
|
|
382
|
-
return _populate() || (_iphone || _ipad || _android || _mobile);
|
|
383
|
-
},
|
|
384
|
-
|
|
385
|
-
nativeApp: function() {
|
|
386
|
-
// webviews inside of the native apps
|
|
387
|
-
return _populate() || _native;
|
|
388
|
-
},
|
|
389
|
-
|
|
390
|
-
android: function() {
|
|
391
|
-
return _populate() || _android;
|
|
392
|
-
},
|
|
393
|
-
|
|
394
|
-
ipad: function() {
|
|
395
|
-
return _populate() || _ipad;
|
|
396
|
-
}
|
|
397
|
-
};
|
|
398
|
-
|
|
399
|
-
module.exports = UserAgent_DEPRECATED;
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
/***/ }),
|
|
403
|
-
|
|
404
|
-
/***/ "96cf":
|
|
405
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
406
|
-
|
|
407
|
-
/**
|
|
408
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
409
|
-
*
|
|
410
|
-
* This source code is licensed under the MIT license found in the
|
|
411
|
-
* LICENSE file in the root directory of this source tree.
|
|
412
|
-
*/
|
|
413
|
-
|
|
414
|
-
var runtime = (function (exports) {
|
|
415
|
-
"use strict";
|
|
416
|
-
|
|
417
|
-
var Op = Object.prototype;
|
|
418
|
-
var hasOwn = Op.hasOwnProperty;
|
|
419
|
-
var undefined; // More compressible than void 0.
|
|
420
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
421
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
422
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
423
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
424
|
-
|
|
425
|
-
function define(obj, key, value) {
|
|
426
|
-
Object.defineProperty(obj, key, {
|
|
427
|
-
value: value,
|
|
428
|
-
enumerable: true,
|
|
429
|
-
configurable: true,
|
|
430
|
-
writable: true
|
|
431
|
-
});
|
|
432
|
-
return obj[key];
|
|
433
|
-
}
|
|
434
|
-
try {
|
|
435
|
-
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
436
|
-
define({}, "");
|
|
437
|
-
} catch (err) {
|
|
438
|
-
define = function(obj, key, value) {
|
|
439
|
-
return obj[key] = value;
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
444
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
445
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
446
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
447
|
-
var context = new Context(tryLocsList || []);
|
|
448
|
-
|
|
449
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
450
|
-
// .throw, and .return methods.
|
|
451
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
452
|
-
|
|
453
|
-
return generator;
|
|
454
|
-
}
|
|
455
|
-
exports.wrap = wrap;
|
|
456
|
-
|
|
457
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
458
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
459
|
-
// have been (and was previously) designed to take a closure to be
|
|
460
|
-
// invoked without arguments, but in all the cases we care about we
|
|
461
|
-
// already have an existing method we want to call, so there's no need
|
|
462
|
-
// to create a new function object. We can even get away with assuming
|
|
463
|
-
// the method takes exactly one argument, since that happens to be true
|
|
464
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
465
|
-
// only additional allocation required is the completion record, which
|
|
466
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
467
|
-
function tryCatch(fn, obj, arg) {
|
|
468
|
-
try {
|
|
469
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
470
|
-
} catch (err) {
|
|
471
|
-
return { type: "throw", arg: err };
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
476
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
477
|
-
var GenStateExecuting = "executing";
|
|
478
|
-
var GenStateCompleted = "completed";
|
|
479
|
-
|
|
480
|
-
// Returning this object from the innerFn has the same effect as
|
|
481
|
-
// breaking out of the dispatch switch statement.
|
|
482
|
-
var ContinueSentinel = {};
|
|
483
|
-
|
|
484
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
485
|
-
// .constructor.prototype properties for functions that return Generator
|
|
486
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
487
|
-
// minifier not to mangle the names of these two functions.
|
|
488
|
-
function Generator() {}
|
|
489
|
-
function GeneratorFunction() {}
|
|
490
|
-
function GeneratorFunctionPrototype() {}
|
|
491
|
-
|
|
492
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
493
|
-
// don't natively support it.
|
|
494
|
-
var IteratorPrototype = {};
|
|
495
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
496
|
-
return this;
|
|
497
|
-
});
|
|
498
|
-
|
|
499
|
-
var getProto = Object.getPrototypeOf;
|
|
500
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
501
|
-
if (NativeIteratorPrototype &&
|
|
502
|
-
NativeIteratorPrototype !== Op &&
|
|
503
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
504
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
505
|
-
// of the polyfill.
|
|
506
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
510
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
511
|
-
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
512
|
-
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
513
|
-
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
514
|
-
GeneratorFunction.displayName = define(
|
|
515
|
-
GeneratorFunctionPrototype,
|
|
516
|
-
toStringTagSymbol,
|
|
517
|
-
"GeneratorFunction"
|
|
518
|
-
);
|
|
519
|
-
|
|
520
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
521
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
522
|
-
function defineIteratorMethods(prototype) {
|
|
523
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
524
|
-
define(prototype, method, function(arg) {
|
|
525
|
-
return this._invoke(method, arg);
|
|
526
|
-
});
|
|
527
|
-
});
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
exports.isGeneratorFunction = function(genFun) {
|
|
531
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
532
|
-
return ctor
|
|
533
|
-
? ctor === GeneratorFunction ||
|
|
534
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
535
|
-
// do is to check its .name property.
|
|
536
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
537
|
-
: false;
|
|
538
|
-
};
|
|
539
|
-
|
|
540
|
-
exports.mark = function(genFun) {
|
|
541
|
-
if (Object.setPrototypeOf) {
|
|
542
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
543
|
-
} else {
|
|
544
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
545
|
-
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
546
|
-
}
|
|
547
|
-
genFun.prototype = Object.create(Gp);
|
|
548
|
-
return genFun;
|
|
549
|
-
};
|
|
550
|
-
|
|
551
|
-
// Within the body of any async function, `await x` is transformed to
|
|
552
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
553
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
554
|
-
// meant to be awaited.
|
|
555
|
-
exports.awrap = function(arg) {
|
|
556
|
-
return { __await: arg };
|
|
557
|
-
};
|
|
558
|
-
|
|
559
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
560
|
-
function invoke(method, arg, resolve, reject) {
|
|
561
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
562
|
-
if (record.type === "throw") {
|
|
563
|
-
reject(record.arg);
|
|
564
|
-
} else {
|
|
565
|
-
var result = record.arg;
|
|
566
|
-
var value = result.value;
|
|
567
|
-
if (value &&
|
|
568
|
-
typeof value === "object" &&
|
|
569
|
-
hasOwn.call(value, "__await")) {
|
|
570
|
-
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
571
|
-
invoke("next", value, resolve, reject);
|
|
572
|
-
}, function(err) {
|
|
573
|
-
invoke("throw", err, resolve, reject);
|
|
574
|
-
});
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
578
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
579
|
-
// the .value of the Promise<{value,done}> result for the
|
|
580
|
-
// current iteration.
|
|
581
|
-
result.value = unwrapped;
|
|
582
|
-
resolve(result);
|
|
583
|
-
}, function(error) {
|
|
584
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
585
|
-
// into the async generator function so it can be handled there.
|
|
586
|
-
return invoke("throw", error, resolve, reject);
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
var previousPromise;
|
|
592
|
-
|
|
593
|
-
function enqueue(method, arg) {
|
|
594
|
-
function callInvokeWithMethodAndArg() {
|
|
595
|
-
return new PromiseImpl(function(resolve, reject) {
|
|
596
|
-
invoke(method, arg, resolve, reject);
|
|
597
|
-
});
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
return previousPromise =
|
|
601
|
-
// If enqueue has been called before, then we want to wait until
|
|
602
|
-
// all previous Promises have been resolved before calling invoke,
|
|
603
|
-
// so that results are always delivered in the correct order. If
|
|
604
|
-
// enqueue has not been called before, then it is important to
|
|
605
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
606
|
-
// so that the async generator function has the opportunity to do
|
|
607
|
-
// any necessary setup in a predictable way. This predictability
|
|
608
|
-
// is why the Promise constructor synchronously invokes its
|
|
609
|
-
// executor callback, and why async functions synchronously
|
|
610
|
-
// execute code before the first await. Since we implement simple
|
|
611
|
-
// async functions in terms of async generators, it is especially
|
|
612
|
-
// important to get this right, even though it requires care.
|
|
613
|
-
previousPromise ? previousPromise.then(
|
|
614
|
-
callInvokeWithMethodAndArg,
|
|
615
|
-
// Avoid propagating failures to Promises returned by later
|
|
616
|
-
// invocations of the iterator.
|
|
617
|
-
callInvokeWithMethodAndArg
|
|
618
|
-
) : callInvokeWithMethodAndArg();
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
// Define the unified helper method that is used to implement .next,
|
|
622
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
623
|
-
this._invoke = enqueue;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
627
|
-
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
628
|
-
return this;
|
|
629
|
-
});
|
|
630
|
-
exports.AsyncIterator = AsyncIterator;
|
|
631
|
-
|
|
632
|
-
// Note that simple async functions are implemented on top of
|
|
633
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
634
|
-
// the final result produced by the iterator.
|
|
635
|
-
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
636
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
637
|
-
|
|
638
|
-
var iter = new AsyncIterator(
|
|
639
|
-
wrap(innerFn, outerFn, self, tryLocsList),
|
|
640
|
-
PromiseImpl
|
|
641
|
-
);
|
|
642
|
-
|
|
643
|
-
return exports.isGeneratorFunction(outerFn)
|
|
644
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
645
|
-
: iter.next().then(function(result) {
|
|
646
|
-
return result.done ? result.value : iter.next();
|
|
647
|
-
});
|
|
648
|
-
};
|
|
649
|
-
|
|
650
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
651
|
-
var state = GenStateSuspendedStart;
|
|
652
|
-
|
|
653
|
-
return function invoke(method, arg) {
|
|
654
|
-
if (state === GenStateExecuting) {
|
|
655
|
-
throw new Error("Generator is already running");
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
if (state === GenStateCompleted) {
|
|
659
|
-
if (method === "throw") {
|
|
660
|
-
throw arg;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
664
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
665
|
-
return doneResult();
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
context.method = method;
|
|
669
|
-
context.arg = arg;
|
|
670
|
-
|
|
671
|
-
while (true) {
|
|
672
|
-
var delegate = context.delegate;
|
|
673
|
-
if (delegate) {
|
|
674
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
675
|
-
if (delegateResult) {
|
|
676
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
677
|
-
return delegateResult;
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
if (context.method === "next") {
|
|
682
|
-
// Setting context._sent for legacy support of Babel's
|
|
683
|
-
// function.sent implementation.
|
|
684
|
-
context.sent = context._sent = context.arg;
|
|
685
|
-
|
|
686
|
-
} else if (context.method === "throw") {
|
|
687
|
-
if (state === GenStateSuspendedStart) {
|
|
688
|
-
state = GenStateCompleted;
|
|
689
|
-
throw context.arg;
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
context.dispatchException(context.arg);
|
|
693
|
-
|
|
694
|
-
} else if (context.method === "return") {
|
|
695
|
-
context.abrupt("return", context.arg);
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
state = GenStateExecuting;
|
|
699
|
-
|
|
700
|
-
var record = tryCatch(innerFn, self, context);
|
|
701
|
-
if (record.type === "normal") {
|
|
702
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
703
|
-
// GenStateExecuting and loop back for another invocation.
|
|
704
|
-
state = context.done
|
|
705
|
-
? GenStateCompleted
|
|
706
|
-
: GenStateSuspendedYield;
|
|
707
|
-
|
|
708
|
-
if (record.arg === ContinueSentinel) {
|
|
709
|
-
continue;
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
return {
|
|
713
|
-
value: record.arg,
|
|
714
|
-
done: context.done
|
|
715
|
-
};
|
|
716
|
-
|
|
717
|
-
} else if (record.type === "throw") {
|
|
718
|
-
state = GenStateCompleted;
|
|
719
|
-
// Dispatch the exception by looping back around to the
|
|
720
|
-
// context.dispatchException(context.arg) call above.
|
|
721
|
-
context.method = "throw";
|
|
722
|
-
context.arg = record.arg;
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
};
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
729
|
-
// result, either by returning a { value, done } result from the
|
|
730
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
731
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
732
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
733
|
-
var method = delegate.iterator[context.method];
|
|
734
|
-
if (method === undefined) {
|
|
735
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
736
|
-
// method always terminates the yield* loop.
|
|
737
|
-
context.delegate = null;
|
|
738
|
-
|
|
739
|
-
if (context.method === "throw") {
|
|
740
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
741
|
-
if (delegate.iterator["return"]) {
|
|
742
|
-
// If the delegate iterator has a return method, give it a
|
|
743
|
-
// chance to clean up.
|
|
744
|
-
context.method = "return";
|
|
745
|
-
context.arg = undefined;
|
|
746
|
-
maybeInvokeDelegate(delegate, context);
|
|
747
|
-
|
|
748
|
-
if (context.method === "throw") {
|
|
749
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
750
|
-
// "return" to "throw", let that override the TypeError below.
|
|
751
|
-
return ContinueSentinel;
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
context.method = "throw";
|
|
756
|
-
context.arg = new TypeError(
|
|
757
|
-
"The iterator does not provide a 'throw' method");
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
return ContinueSentinel;
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
764
|
-
|
|
765
|
-
if (record.type === "throw") {
|
|
766
|
-
context.method = "throw";
|
|
767
|
-
context.arg = record.arg;
|
|
768
|
-
context.delegate = null;
|
|
769
|
-
return ContinueSentinel;
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
var info = record.arg;
|
|
773
|
-
|
|
774
|
-
if (! info) {
|
|
775
|
-
context.method = "throw";
|
|
776
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
777
|
-
context.delegate = null;
|
|
778
|
-
return ContinueSentinel;
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
if (info.done) {
|
|
782
|
-
// Assign the result of the finished delegate to the temporary
|
|
783
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
784
|
-
context[delegate.resultName] = info.value;
|
|
785
|
-
|
|
786
|
-
// Resume execution at the desired location (see delegateYield).
|
|
787
|
-
context.next = delegate.nextLoc;
|
|
788
|
-
|
|
789
|
-
// If context.method was "throw" but the delegate handled the
|
|
790
|
-
// exception, let the outer generator proceed normally. If
|
|
791
|
-
// context.method was "next", forget context.arg since it has been
|
|
792
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
793
|
-
// "return", allow the original .return call to continue in the
|
|
794
|
-
// outer generator.
|
|
795
|
-
if (context.method !== "return") {
|
|
796
|
-
context.method = "next";
|
|
797
|
-
context.arg = undefined;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
} else {
|
|
801
|
-
// Re-yield the result returned by the delegate method.
|
|
802
|
-
return info;
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
806
|
-
// the outer generator.
|
|
807
|
-
context.delegate = null;
|
|
808
|
-
return ContinueSentinel;
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
812
|
-
// unified ._invoke helper method.
|
|
813
|
-
defineIteratorMethods(Gp);
|
|
814
|
-
|
|
815
|
-
define(Gp, toStringTagSymbol, "Generator");
|
|
816
|
-
|
|
817
|
-
// A Generator should always return itself as the iterator object when the
|
|
818
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
819
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
820
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
821
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
822
|
-
define(Gp, iteratorSymbol, function() {
|
|
823
|
-
return this;
|
|
824
|
-
});
|
|
825
|
-
|
|
826
|
-
define(Gp, "toString", function() {
|
|
827
|
-
return "[object Generator]";
|
|
828
|
-
});
|
|
829
|
-
|
|
830
|
-
function pushTryEntry(locs) {
|
|
831
|
-
var entry = { tryLoc: locs[0] };
|
|
832
|
-
|
|
833
|
-
if (1 in locs) {
|
|
834
|
-
entry.catchLoc = locs[1];
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
if (2 in locs) {
|
|
838
|
-
entry.finallyLoc = locs[2];
|
|
839
|
-
entry.afterLoc = locs[3];
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
this.tryEntries.push(entry);
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
function resetTryEntry(entry) {
|
|
846
|
-
var record = entry.completion || {};
|
|
847
|
-
record.type = "normal";
|
|
848
|
-
delete record.arg;
|
|
849
|
-
entry.completion = record;
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
function Context(tryLocsList) {
|
|
853
|
-
// The root entry object (effectively a try statement without a catch
|
|
854
|
-
// or a finally block) gives us a place to store values thrown from
|
|
855
|
-
// locations where there is no enclosing try statement.
|
|
856
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
857
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
858
|
-
this.reset(true);
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
exports.keys = function(object) {
|
|
862
|
-
var keys = [];
|
|
863
|
-
for (var key in object) {
|
|
864
|
-
keys.push(key);
|
|
865
|
-
}
|
|
866
|
-
keys.reverse();
|
|
867
|
-
|
|
868
|
-
// Rather than returning an object with a next method, we keep
|
|
869
|
-
// things simple and return the next function itself.
|
|
870
|
-
return function next() {
|
|
871
|
-
while (keys.length) {
|
|
872
|
-
var key = keys.pop();
|
|
873
|
-
if (key in object) {
|
|
874
|
-
next.value = key;
|
|
875
|
-
next.done = false;
|
|
876
|
-
return next;
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
// To avoid creating an additional object, we just hang the .value
|
|
881
|
-
// and .done properties off the next function object itself. This
|
|
882
|
-
// also ensures that the minifier will not anonymize the function.
|
|
883
|
-
next.done = true;
|
|
884
|
-
return next;
|
|
885
|
-
};
|
|
886
|
-
};
|
|
887
|
-
|
|
888
|
-
function values(iterable) {
|
|
889
|
-
if (iterable) {
|
|
890
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
891
|
-
if (iteratorMethod) {
|
|
892
|
-
return iteratorMethod.call(iterable);
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
if (typeof iterable.next === "function") {
|
|
896
|
-
return iterable;
|
|
897
|
-
}
|
|
898
|
-
|
|
899
|
-
if (!isNaN(iterable.length)) {
|
|
900
|
-
var i = -1, next = function next() {
|
|
901
|
-
while (++i < iterable.length) {
|
|
902
|
-
if (hasOwn.call(iterable, i)) {
|
|
903
|
-
next.value = iterable[i];
|
|
904
|
-
next.done = false;
|
|
905
|
-
return next;
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
next.value = undefined;
|
|
910
|
-
next.done = true;
|
|
911
|
-
|
|
912
|
-
return next;
|
|
913
|
-
};
|
|
914
|
-
|
|
915
|
-
return next.next = next;
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
// Return an iterator with no values.
|
|
920
|
-
return { next: doneResult };
|
|
921
|
-
}
|
|
922
|
-
exports.values = values;
|
|
923
|
-
|
|
924
|
-
function doneResult() {
|
|
925
|
-
return { value: undefined, done: true };
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
Context.prototype = {
|
|
929
|
-
constructor: Context,
|
|
930
|
-
|
|
931
|
-
reset: function(skipTempReset) {
|
|
932
|
-
this.prev = 0;
|
|
933
|
-
this.next = 0;
|
|
934
|
-
// Resetting context._sent for legacy support of Babel's
|
|
935
|
-
// function.sent implementation.
|
|
936
|
-
this.sent = this._sent = undefined;
|
|
937
|
-
this.done = false;
|
|
938
|
-
this.delegate = null;
|
|
939
|
-
|
|
940
|
-
this.method = "next";
|
|
941
|
-
this.arg = undefined;
|
|
942
|
-
|
|
943
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
944
|
-
|
|
945
|
-
if (!skipTempReset) {
|
|
946
|
-
for (var name in this) {
|
|
947
|
-
// Not sure about the optimal order of these conditions:
|
|
948
|
-
if (name.charAt(0) === "t" &&
|
|
949
|
-
hasOwn.call(this, name) &&
|
|
950
|
-
!isNaN(+name.slice(1))) {
|
|
951
|
-
this[name] = undefined;
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
},
|
|
956
|
-
|
|
957
|
-
stop: function() {
|
|
958
|
-
this.done = true;
|
|
959
|
-
|
|
960
|
-
var rootEntry = this.tryEntries[0];
|
|
961
|
-
var rootRecord = rootEntry.completion;
|
|
962
|
-
if (rootRecord.type === "throw") {
|
|
963
|
-
throw rootRecord.arg;
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
return this.rval;
|
|
967
|
-
},
|
|
968
|
-
|
|
969
|
-
dispatchException: function(exception) {
|
|
970
|
-
if (this.done) {
|
|
971
|
-
throw exception;
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
var context = this;
|
|
975
|
-
function handle(loc, caught) {
|
|
976
|
-
record.type = "throw";
|
|
977
|
-
record.arg = exception;
|
|
978
|
-
context.next = loc;
|
|
979
|
-
|
|
980
|
-
if (caught) {
|
|
981
|
-
// If the dispatched exception was caught by a catch block,
|
|
982
|
-
// then let that catch block handle the exception normally.
|
|
983
|
-
context.method = "next";
|
|
984
|
-
context.arg = undefined;
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
return !! caught;
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
991
|
-
var entry = this.tryEntries[i];
|
|
992
|
-
var record = entry.completion;
|
|
993
|
-
|
|
994
|
-
if (entry.tryLoc === "root") {
|
|
995
|
-
// Exception thrown outside of any try block that could handle
|
|
996
|
-
// it, so set the completion value of the entire function to
|
|
997
|
-
// throw the exception.
|
|
998
|
-
return handle("end");
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
if (entry.tryLoc <= this.prev) {
|
|
1002
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
1003
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
1004
|
-
|
|
1005
|
-
if (hasCatch && hasFinally) {
|
|
1006
|
-
if (this.prev < entry.catchLoc) {
|
|
1007
|
-
return handle(entry.catchLoc, true);
|
|
1008
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
1009
|
-
return handle(entry.finallyLoc);
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
} else if (hasCatch) {
|
|
1013
|
-
if (this.prev < entry.catchLoc) {
|
|
1014
|
-
return handle(entry.catchLoc, true);
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
} else if (hasFinally) {
|
|
1018
|
-
if (this.prev < entry.finallyLoc) {
|
|
1019
|
-
return handle(entry.finallyLoc);
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
} else {
|
|
1023
|
-
throw new Error("try statement without catch or finally");
|
|
1024
|
-
}
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
},
|
|
1028
|
-
|
|
1029
|
-
abrupt: function(type, arg) {
|
|
1030
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1031
|
-
var entry = this.tryEntries[i];
|
|
1032
|
-
if (entry.tryLoc <= this.prev &&
|
|
1033
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
1034
|
-
this.prev < entry.finallyLoc) {
|
|
1035
|
-
var finallyEntry = entry;
|
|
1036
|
-
break;
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
if (finallyEntry &&
|
|
1041
|
-
(type === "break" ||
|
|
1042
|
-
type === "continue") &&
|
|
1043
|
-
finallyEntry.tryLoc <= arg &&
|
|
1044
|
-
arg <= finallyEntry.finallyLoc) {
|
|
1045
|
-
// Ignore the finally entry if control is not jumping to a
|
|
1046
|
-
// location outside the try/catch block.
|
|
1047
|
-
finallyEntry = null;
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
1051
|
-
record.type = type;
|
|
1052
|
-
record.arg = arg;
|
|
1053
|
-
|
|
1054
|
-
if (finallyEntry) {
|
|
1055
|
-
this.method = "next";
|
|
1056
|
-
this.next = finallyEntry.finallyLoc;
|
|
1057
|
-
return ContinueSentinel;
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
return this.complete(record);
|
|
1061
|
-
},
|
|
1062
|
-
|
|
1063
|
-
complete: function(record, afterLoc) {
|
|
1064
|
-
if (record.type === "throw") {
|
|
1065
|
-
throw record.arg;
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
if (record.type === "break" ||
|
|
1069
|
-
record.type === "continue") {
|
|
1070
|
-
this.next = record.arg;
|
|
1071
|
-
} else if (record.type === "return") {
|
|
1072
|
-
this.rval = this.arg = record.arg;
|
|
1073
|
-
this.method = "return";
|
|
1074
|
-
this.next = "end";
|
|
1075
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
1076
|
-
this.next = afterLoc;
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
return ContinueSentinel;
|
|
1080
|
-
},
|
|
1081
|
-
|
|
1082
|
-
finish: function(finallyLoc) {
|
|
1083
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1084
|
-
var entry = this.tryEntries[i];
|
|
1085
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
1086
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
1087
|
-
resetTryEntry(entry);
|
|
1088
|
-
return ContinueSentinel;
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
},
|
|
1092
|
-
|
|
1093
|
-
"catch": function(tryLoc) {
|
|
1094
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1095
|
-
var entry = this.tryEntries[i];
|
|
1096
|
-
if (entry.tryLoc === tryLoc) {
|
|
1097
|
-
var record = entry.completion;
|
|
1098
|
-
if (record.type === "throw") {
|
|
1099
|
-
var thrown = record.arg;
|
|
1100
|
-
resetTryEntry(entry);
|
|
1101
|
-
}
|
|
1102
|
-
return thrown;
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
// The context.catch method must only be called with a location
|
|
1107
|
-
// argument that corresponds to a known catch block.
|
|
1108
|
-
throw new Error("illegal catch attempt");
|
|
1109
|
-
},
|
|
1110
|
-
|
|
1111
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
1112
|
-
this.delegate = {
|
|
1113
|
-
iterator: values(iterable),
|
|
1114
|
-
resultName: resultName,
|
|
1115
|
-
nextLoc: nextLoc
|
|
1116
|
-
};
|
|
1117
|
-
|
|
1118
|
-
if (this.method === "next") {
|
|
1119
|
-
// Deliberately forget the last sent value so that we don't
|
|
1120
|
-
// accidentally pass it on to the delegate.
|
|
1121
|
-
this.arg = undefined;
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
return ContinueSentinel;
|
|
1125
|
-
}
|
|
1126
|
-
};
|
|
1127
|
-
|
|
1128
|
-
// Regardless of whether this script is executing as a CommonJS module
|
|
1129
|
-
// or not, return the runtime object so that we can declare the variable
|
|
1130
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
1131
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
1132
|
-
return exports;
|
|
1133
|
-
|
|
1134
|
-
}(
|
|
1135
|
-
// If this script is executing as a CommonJS module, use module.exports
|
|
1136
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
1137
|
-
// object. Either way, the resulting object will be used to initialize
|
|
1138
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
1139
|
-
true ? module.exports : undefined
|
|
1140
|
-
));
|
|
1141
|
-
|
|
1142
|
-
try {
|
|
1143
|
-
regeneratorRuntime = runtime;
|
|
1144
|
-
} catch (accidentalStrictMode) {
|
|
1145
|
-
// This module should not be running in strict mode, so the above
|
|
1146
|
-
// assignment should always work unless something is misconfigured. Just
|
|
1147
|
-
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
1148
|
-
// we can explicitly access globalThis. In older engines we can escape
|
|
1149
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
1150
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
1151
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
1152
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
1153
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
1154
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
1155
|
-
if (typeof globalThis === "object") {
|
|
1156
|
-
globalThis.regeneratorRuntime = runtime;
|
|
1157
|
-
} else {
|
|
1158
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
/***/ }),
|
|
1164
|
-
|
|
1165
|
-
/***/ "a3de":
|
|
1166
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1167
|
-
|
|
1168
|
-
"use strict";
|
|
1169
|
-
/**
|
|
1170
|
-
* Copyright (c) 2015, Facebook, Inc.
|
|
1171
|
-
* All rights reserved.
|
|
1172
|
-
*
|
|
1173
|
-
* This source code is licensed under the BSD-style license found in the
|
|
1174
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
1175
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
1176
|
-
*
|
|
1177
|
-
* @providesModule ExecutionEnvironment
|
|
1178
|
-
*/
|
|
1179
|
-
|
|
1180
|
-
/*jslint evil: true */
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
var canUseDOM = !!(
|
|
1185
|
-
typeof window !== 'undefined' &&
|
|
1186
|
-
window.document &&
|
|
1187
|
-
window.document.createElement
|
|
1188
|
-
);
|
|
1189
|
-
|
|
1190
|
-
/**
|
|
1191
|
-
* Simple, lightweight module assisting with the detection and context of
|
|
1192
|
-
* Worker. Helps avoid circular dependencies and allows code to reason about
|
|
1193
|
-
* whether or not they are in a Worker, even if they never include the main
|
|
1194
|
-
* `ReactWorker` dependency.
|
|
1195
|
-
*/
|
|
1196
|
-
var ExecutionEnvironment = {
|
|
1197
|
-
|
|
1198
|
-
canUseDOM: canUseDOM,
|
|
1199
|
-
|
|
1200
|
-
canUseWorkers: typeof Worker !== 'undefined',
|
|
1201
|
-
|
|
1202
|
-
canUseEventListeners:
|
|
1203
|
-
canUseDOM && !!(window.addEventListener || window.attachEvent),
|
|
1204
|
-
|
|
1205
|
-
canUseViewport: canUseDOM && !!window.screen,
|
|
1206
|
-
|
|
1207
|
-
isInWorker: !canUseDOM // For now, this is true - might change in the future.
|
|
1208
|
-
|
|
1209
|
-
};
|
|
1210
|
-
|
|
1211
|
-
module.exports = ExecutionEnvironment;
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
/***/ }),
|
|
1215
|
-
|
|
1216
|
-
/***/ "c098":
|
|
1217
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1218
|
-
|
|
1219
|
-
module.exports = __webpack_require__("d4af");
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
/***/ }),
|
|
1223
|
-
|
|
1224
|
-
/***/ "d4af":
|
|
1225
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1226
|
-
|
|
1227
|
-
"use strict";
|
|
1228
|
-
/**
|
|
1229
|
-
* Copyright (c) 2015, Facebook, Inc.
|
|
1230
|
-
* All rights reserved.
|
|
1231
|
-
*
|
|
1232
|
-
* This source code is licensed under the BSD-style license found in the
|
|
1233
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
1234
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
1235
|
-
*
|
|
1236
|
-
* @providesModule normalizeWheel
|
|
1237
|
-
* @typechecks
|
|
1238
|
-
*/
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
var UserAgent_DEPRECATED = __webpack_require__("8eb7");
|
|
1243
|
-
|
|
1244
|
-
var isEventSupported = __webpack_require__("7b3e");
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
// Reasonable defaults
|
|
1248
|
-
var PIXEL_STEP = 10;
|
|
1249
|
-
var LINE_HEIGHT = 40;
|
|
1250
|
-
var PAGE_HEIGHT = 800;
|
|
1251
|
-
|
|
1252
|
-
/**
|
|
1253
|
-
* Mouse wheel (and 2-finger trackpad) support on the web sucks. It is
|
|
1254
|
-
* complicated, thus this doc is long and (hopefully) detailed enough to answer
|
|
1255
|
-
* your questions.
|
|
1256
|
-
*
|
|
1257
|
-
* If you need to react to the mouse wheel in a predictable way, this code is
|
|
1258
|
-
* like your bestest friend. * hugs *
|
|
1259
|
-
*
|
|
1260
|
-
* As of today, there are 4 DOM event types you can listen to:
|
|
1261
|
-
*
|
|
1262
|
-
* 'wheel' -- Chrome(31+), FF(17+), IE(9+)
|
|
1263
|
-
* 'mousewheel' -- Chrome, IE(6+), Opera, Safari
|
|
1264
|
-
* 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!
|
|
1265
|
-
* 'DOMMouseScroll' -- FF(0.9.7+) since 2003
|
|
1266
|
-
*
|
|
1267
|
-
* So what to do? The is the best:
|
|
1268
|
-
*
|
|
1269
|
-
* normalizeWheel.getEventType();
|
|
1270
|
-
*
|
|
1271
|
-
* In your event callback, use this code to get sane interpretation of the
|
|
1272
|
-
* deltas. This code will return an object with properties:
|
|
1273
|
-
*
|
|
1274
|
-
* spinX -- normalized spin speed (use for zoom) - x plane
|
|
1275
|
-
* spinY -- " - y plane
|
|
1276
|
-
* pixelX -- normalized distance (to pixels) - x plane
|
|
1277
|
-
* pixelY -- " - y plane
|
|
1278
|
-
*
|
|
1279
|
-
* Wheel values are provided by the browser assuming you are using the wheel to
|
|
1280
|
-
* scroll a web page by a number of lines or pixels (or pages). Values can vary
|
|
1281
|
-
* significantly on different platforms and browsers, forgetting that you can
|
|
1282
|
-
* scroll at different speeds. Some devices (like trackpads) emit more events
|
|
1283
|
-
* at smaller increments with fine granularity, and some emit massive jumps with
|
|
1284
|
-
* linear speed or acceleration.
|
|
1285
|
-
*
|
|
1286
|
-
* This code does its best to normalize the deltas for you:
|
|
1287
|
-
*
|
|
1288
|
-
* - spin is trying to normalize how far the wheel was spun (or trackpad
|
|
1289
|
-
* dragged). This is super useful for zoom support where you want to
|
|
1290
|
-
* throw away the chunky scroll steps on the PC and make those equal to
|
|
1291
|
-
* the slow and smooth tiny steps on the Mac. Key data: This code tries to
|
|
1292
|
-
* resolve a single slow step on a wheel to 1.
|
|
1293
|
-
*
|
|
1294
|
-
* - pixel is normalizing the desired scroll delta in pixel units. You'll
|
|
1295
|
-
* get the crazy differences between browsers, but at least it'll be in
|
|
1296
|
-
* pixels!
|
|
1297
|
-
*
|
|
1298
|
-
* - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This
|
|
1299
|
-
* should translate to positive value zooming IN, negative zooming OUT.
|
|
1300
|
-
* This matches the newer 'wheel' event.
|
|
1301
|
-
*
|
|
1302
|
-
* Why are there spinX, spinY (or pixels)?
|
|
1303
|
-
*
|
|
1304
|
-
* - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
|
|
1305
|
-
* with a mouse. It results in side-scrolling in the browser by default.
|
|
1306
|
-
*
|
|
1307
|
-
* - spinY is what you expect -- it's the classic axis of a mouse wheel.
|
|
1308
|
-
*
|
|
1309
|
-
* - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and
|
|
1310
|
-
* probably is by browsers in conjunction with fancy 3D controllers .. but
|
|
1311
|
-
* you know.
|
|
1312
|
-
*
|
|
1313
|
-
* Implementation info:
|
|
1314
|
-
*
|
|
1315
|
-
* Examples of 'wheel' event if you scroll slowly (down) by one step with an
|
|
1316
|
-
* average mouse:
|
|
1317
|
-
*
|
|
1318
|
-
* OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)
|
|
1319
|
-
* OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)
|
|
1320
|
-
* OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)
|
|
1321
|
-
* Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)
|
|
1322
|
-
* Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)
|
|
1323
|
-
*
|
|
1324
|
-
* On the trackpad:
|
|
1325
|
-
*
|
|
1326
|
-
* OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)
|
|
1327
|
-
* OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)
|
|
1328
|
-
*
|
|
1329
|
-
* On other/older browsers.. it's more complicated as there can be multiple and
|
|
1330
|
-
* also missing delta values.
|
|
1331
|
-
*
|
|
1332
|
-
* The 'wheel' event is more standard:
|
|
1333
|
-
*
|
|
1334
|
-
* http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
|
|
1335
|
-
*
|
|
1336
|
-
* The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
|
|
1337
|
-
* deltaX, deltaY and deltaZ. Some browsers provide other values to maintain
|
|
1338
|
-
* backward compatibility with older events. Those other values help us
|
|
1339
|
-
* better normalize spin speed. Example of what the browsers provide:
|
|
1340
|
-
*
|
|
1341
|
-
* | event.wheelDelta | event.detail
|
|
1342
|
-
* ------------------+------------------+--------------
|
|
1343
|
-
* Safari v5/OS X | -120 | 0
|
|
1344
|
-
* Safari v5/Win7 | -120 | 0
|
|
1345
|
-
* Chrome v17/OS X | -120 | 0
|
|
1346
|
-
* Chrome v17/Win7 | -120 | 0
|
|
1347
|
-
* IE9/Win7 | -120 | undefined
|
|
1348
|
-
* Firefox v4/OS X | undefined | 1
|
|
1349
|
-
* Firefox v4/Win7 | undefined | 3
|
|
1350
|
-
*
|
|
1351
|
-
*/
|
|
1352
|
-
function normalizeWheel(/*object*/ event) /*object*/ {
|
|
1353
|
-
var sX = 0, sY = 0, // spinX, spinY
|
|
1354
|
-
pX = 0, pY = 0; // pixelX, pixelY
|
|
1355
|
-
|
|
1356
|
-
// Legacy
|
|
1357
|
-
if ('detail' in event) { sY = event.detail; }
|
|
1358
|
-
if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }
|
|
1359
|
-
if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }
|
|
1360
|
-
if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }
|
|
1361
|
-
|
|
1362
|
-
// side scrolling on FF with DOMMouseScroll
|
|
1363
|
-
if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
|
|
1364
|
-
sX = sY;
|
|
1365
|
-
sY = 0;
|
|
1366
|
-
}
|
|
1367
|
-
|
|
1368
|
-
pX = sX * PIXEL_STEP;
|
|
1369
|
-
pY = sY * PIXEL_STEP;
|
|
1370
|
-
|
|
1371
|
-
if ('deltaY' in event) { pY = event.deltaY; }
|
|
1372
|
-
if ('deltaX' in event) { pX = event.deltaX; }
|
|
1373
|
-
|
|
1374
|
-
if ((pX || pY) && event.deltaMode) {
|
|
1375
|
-
if (event.deltaMode == 1) { // delta in LINE units
|
|
1376
|
-
pX *= LINE_HEIGHT;
|
|
1377
|
-
pY *= LINE_HEIGHT;
|
|
1378
|
-
} else { // delta in PAGE units
|
|
1379
|
-
pX *= PAGE_HEIGHT;
|
|
1380
|
-
pY *= PAGE_HEIGHT;
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
// Fall-back if spin cannot be determined
|
|
1385
|
-
if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }
|
|
1386
|
-
if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }
|
|
1387
|
-
|
|
1388
|
-
return { spinX : sX,
|
|
1389
|
-
spinY : sY,
|
|
1390
|
-
pixelX : pX,
|
|
1391
|
-
pixelY : pY };
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
/**
|
|
1396
|
-
* The best combination if you prefer spinX + spinY normalization. It favors
|
|
1397
|
-
* the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with
|
|
1398
|
-
* 'wheel' event, making spin speed determination impossible.
|
|
1399
|
-
*/
|
|
1400
|
-
normalizeWheel.getEventType = function() /*string*/ {
|
|
1401
|
-
return (UserAgent_DEPRECATED.firefox())
|
|
1402
|
-
? 'DOMMouseScroll'
|
|
1403
|
-
: (isEventSupported('wheel'))
|
|
1404
|
-
? 'wheel'
|
|
1405
|
-
: 'mousewheel';
|
|
1406
|
-
};
|
|
1407
|
-
|
|
1408
|
-
module.exports = normalizeWheel;
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
/***/ }),
|
|
1412
|
-
|
|
1413
|
-
/***/ "df7c":
|
|
1414
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1415
|
-
|
|
1416
|
-
/* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
|
|
1417
|
-
// backported and transplited with Babel, with backwards-compat fixes
|
|
1418
|
-
|
|
1419
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
|
1420
|
-
//
|
|
1421
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
1422
|
-
// copy of this software and associated documentation files (the
|
|
1423
|
-
// "Software"), to deal in the Software without restriction, including
|
|
1424
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
|
1425
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
1426
|
-
// persons to whom the Software is furnished to do so, subject to the
|
|
1427
|
-
// following conditions:
|
|
1428
|
-
//
|
|
1429
|
-
// The above copyright notice and this permission notice shall be included
|
|
1430
|
-
// in all copies or substantial portions of the Software.
|
|
1431
|
-
//
|
|
1432
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
1433
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
1434
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
1435
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
1436
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
1437
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
1438
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1439
|
-
|
|
1440
|
-
// resolves . and .. elements in a path array with directory names there
|
|
1441
|
-
// must be no slashes, empty elements, or device names (c:\) in the array
|
|
1442
|
-
// (so also no leading and trailing slashes - it does not distinguish
|
|
1443
|
-
// relative and absolute paths)
|
|
1444
|
-
function normalizeArray(parts, allowAboveRoot) {
|
|
1445
|
-
// if the path tries to go above the root, `up` ends up > 0
|
|
1446
|
-
var up = 0;
|
|
1447
|
-
for (var i = parts.length - 1; i >= 0; i--) {
|
|
1448
|
-
var last = parts[i];
|
|
1449
|
-
if (last === '.') {
|
|
1450
|
-
parts.splice(i, 1);
|
|
1451
|
-
} else if (last === '..') {
|
|
1452
|
-
parts.splice(i, 1);
|
|
1453
|
-
up++;
|
|
1454
|
-
} else if (up) {
|
|
1455
|
-
parts.splice(i, 1);
|
|
1456
|
-
up--;
|
|
1457
|
-
}
|
|
1458
|
-
}
|
|
1459
|
-
|
|
1460
|
-
// if the path is allowed to go above the root, restore leading ..s
|
|
1461
|
-
if (allowAboveRoot) {
|
|
1462
|
-
for (; up--; up) {
|
|
1463
|
-
parts.unshift('..');
|
|
1464
|
-
}
|
|
1465
|
-
}
|
|
1466
|
-
|
|
1467
|
-
return parts;
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
|
-
// path.resolve([from ...], to)
|
|
1471
|
-
// posix version
|
|
1472
|
-
exports.resolve = function() {
|
|
1473
|
-
var resolvedPath = '',
|
|
1474
|
-
resolvedAbsolute = false;
|
|
1475
|
-
|
|
1476
|
-
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
1477
|
-
var path = (i >= 0) ? arguments[i] : process.cwd();
|
|
1478
|
-
|
|
1479
|
-
// Skip empty and invalid entries
|
|
1480
|
-
if (typeof path !== 'string') {
|
|
1481
|
-
throw new TypeError('Arguments to path.resolve must be strings');
|
|
1482
|
-
} else if (!path) {
|
|
1483
|
-
continue;
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
resolvedPath = path + '/' + resolvedPath;
|
|
1487
|
-
resolvedAbsolute = path.charAt(0) === '/';
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
// At this point the path should be resolved to a full absolute path, but
|
|
1491
|
-
// handle relative paths to be safe (might happen when process.cwd() fails)
|
|
1492
|
-
|
|
1493
|
-
// Normalize the path
|
|
1494
|
-
resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
|
|
1495
|
-
return !!p;
|
|
1496
|
-
}), !resolvedAbsolute).join('/');
|
|
1497
|
-
|
|
1498
|
-
return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
|
|
1499
|
-
};
|
|
1500
|
-
|
|
1501
|
-
// path.normalize(path)
|
|
1502
|
-
// posix version
|
|
1503
|
-
exports.normalize = function(path) {
|
|
1504
|
-
var isAbsolute = exports.isAbsolute(path),
|
|
1505
|
-
trailingSlash = substr(path, -1) === '/';
|
|
1506
|
-
|
|
1507
|
-
// Normalize the path
|
|
1508
|
-
path = normalizeArray(filter(path.split('/'), function(p) {
|
|
1509
|
-
return !!p;
|
|
1510
|
-
}), !isAbsolute).join('/');
|
|
1511
|
-
|
|
1512
|
-
if (!path && !isAbsolute) {
|
|
1513
|
-
path = '.';
|
|
1514
|
-
}
|
|
1515
|
-
if (path && trailingSlash) {
|
|
1516
|
-
path += '/';
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
return (isAbsolute ? '/' : '') + path;
|
|
1520
|
-
};
|
|
1521
|
-
|
|
1522
|
-
// posix version
|
|
1523
|
-
exports.isAbsolute = function(path) {
|
|
1524
|
-
return path.charAt(0) === '/';
|
|
1525
|
-
};
|
|
1526
|
-
|
|
1527
|
-
// posix version
|
|
1528
|
-
exports.join = function() {
|
|
1529
|
-
var paths = Array.prototype.slice.call(arguments, 0);
|
|
1530
|
-
return exports.normalize(filter(paths, function(p, index) {
|
|
1531
|
-
if (typeof p !== 'string') {
|
|
1532
|
-
throw new TypeError('Arguments to path.join must be strings');
|
|
1533
|
-
}
|
|
1534
|
-
return p;
|
|
1535
|
-
}).join('/'));
|
|
1536
|
-
};
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
// path.relative(from, to)
|
|
1540
|
-
// posix version
|
|
1541
|
-
exports.relative = function(from, to) {
|
|
1542
|
-
from = exports.resolve(from).substr(1);
|
|
1543
|
-
to = exports.resolve(to).substr(1);
|
|
1544
|
-
|
|
1545
|
-
function trim(arr) {
|
|
1546
|
-
var start = 0;
|
|
1547
|
-
for (; start < arr.length; start++) {
|
|
1548
|
-
if (arr[start] !== '') break;
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
var end = arr.length - 1;
|
|
1552
|
-
for (; end >= 0; end--) {
|
|
1553
|
-
if (arr[end] !== '') break;
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
if (start > end) return [];
|
|
1557
|
-
return arr.slice(start, end - start + 1);
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
|
-
var fromParts = trim(from.split('/'));
|
|
1561
|
-
var toParts = trim(to.split('/'));
|
|
1562
|
-
|
|
1563
|
-
var length = Math.min(fromParts.length, toParts.length);
|
|
1564
|
-
var samePartsLength = length;
|
|
1565
|
-
for (var i = 0; i < length; i++) {
|
|
1566
|
-
if (fromParts[i] !== toParts[i]) {
|
|
1567
|
-
samePartsLength = i;
|
|
1568
|
-
break;
|
|
1569
|
-
}
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
|
-
var outputParts = [];
|
|
1573
|
-
for (var i = samePartsLength; i < fromParts.length; i++) {
|
|
1574
|
-
outputParts.push('..');
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
outputParts = outputParts.concat(toParts.slice(samePartsLength));
|
|
1578
|
-
|
|
1579
|
-
return outputParts.join('/');
|
|
1580
|
-
};
|
|
1581
|
-
|
|
1582
|
-
exports.sep = '/';
|
|
1583
|
-
exports.delimiter = ':';
|
|
1584
|
-
|
|
1585
|
-
exports.dirname = function (path) {
|
|
1586
|
-
if (typeof path !== 'string') path = path + '';
|
|
1587
|
-
if (path.length === 0) return '.';
|
|
1588
|
-
var code = path.charCodeAt(0);
|
|
1589
|
-
var hasRoot = code === 47 /*/*/;
|
|
1590
|
-
var end = -1;
|
|
1591
|
-
var matchedSlash = true;
|
|
1592
|
-
for (var i = path.length - 1; i >= 1; --i) {
|
|
1593
|
-
code = path.charCodeAt(i);
|
|
1594
|
-
if (code === 47 /*/*/) {
|
|
1595
|
-
if (!matchedSlash) {
|
|
1596
|
-
end = i;
|
|
1597
|
-
break;
|
|
1598
|
-
}
|
|
1599
|
-
} else {
|
|
1600
|
-
// We saw the first non-path separator
|
|
1601
|
-
matchedSlash = false;
|
|
1602
|
-
}
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1605
|
-
if (end === -1) return hasRoot ? '/' : '.';
|
|
1606
|
-
if (hasRoot && end === 1) {
|
|
1607
|
-
// return '//';
|
|
1608
|
-
// Backwards-compat fix:
|
|
1609
|
-
return '/';
|
|
1610
|
-
}
|
|
1611
|
-
return path.slice(0, end);
|
|
1612
|
-
};
|
|
1613
|
-
|
|
1614
|
-
function basename(path) {
|
|
1615
|
-
if (typeof path !== 'string') path = path + '';
|
|
1616
|
-
|
|
1617
|
-
var start = 0;
|
|
1618
|
-
var end = -1;
|
|
1619
|
-
var matchedSlash = true;
|
|
1620
|
-
var i;
|
|
1621
|
-
|
|
1622
|
-
for (i = path.length - 1; i >= 0; --i) {
|
|
1623
|
-
if (path.charCodeAt(i) === 47 /*/*/) {
|
|
1624
|
-
// If we reached a path separator that was not part of a set of path
|
|
1625
|
-
// separators at the end of the string, stop now
|
|
1626
|
-
if (!matchedSlash) {
|
|
1627
|
-
start = i + 1;
|
|
1628
|
-
break;
|
|
1629
|
-
}
|
|
1630
|
-
} else if (end === -1) {
|
|
1631
|
-
// We saw the first non-path separator, mark this as the end of our
|
|
1632
|
-
// path component
|
|
1633
|
-
matchedSlash = false;
|
|
1634
|
-
end = i + 1;
|
|
1635
|
-
}
|
|
1636
|
-
}
|
|
1637
|
-
|
|
1638
|
-
if (end === -1) return '';
|
|
1639
|
-
return path.slice(start, end);
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
// Uses a mixed approach for backwards-compatibility, as ext behavior changed
|
|
1643
|
-
// in new Node.js versions, so only basename() above is backported here
|
|
1644
|
-
exports.basename = function (path, ext) {
|
|
1645
|
-
var f = basename(path);
|
|
1646
|
-
if (ext && f.substr(-1 * ext.length) === ext) {
|
|
1647
|
-
f = f.substr(0, f.length - ext.length);
|
|
1648
|
-
}
|
|
1649
|
-
return f;
|
|
1650
|
-
};
|
|
1651
|
-
|
|
1652
|
-
exports.extname = function (path) {
|
|
1653
|
-
if (typeof path !== 'string') path = path + '';
|
|
1654
|
-
var startDot = -1;
|
|
1655
|
-
var startPart = 0;
|
|
1656
|
-
var end = -1;
|
|
1657
|
-
var matchedSlash = true;
|
|
1658
|
-
// Track the state of characters (if any) we see before our first dot and
|
|
1659
|
-
// after any path separator we find
|
|
1660
|
-
var preDotState = 0;
|
|
1661
|
-
for (var i = path.length - 1; i >= 0; --i) {
|
|
1662
|
-
var code = path.charCodeAt(i);
|
|
1663
|
-
if (code === 47 /*/*/) {
|
|
1664
|
-
// If we reached a path separator that was not part of a set of path
|
|
1665
|
-
// separators at the end of the string, stop now
|
|
1666
|
-
if (!matchedSlash) {
|
|
1667
|
-
startPart = i + 1;
|
|
1668
|
-
break;
|
|
1669
|
-
}
|
|
1670
|
-
continue;
|
|
1671
|
-
}
|
|
1672
|
-
if (end === -1) {
|
|
1673
|
-
// We saw the first non-path separator, mark this as the end of our
|
|
1674
|
-
// extension
|
|
1675
|
-
matchedSlash = false;
|
|
1676
|
-
end = i + 1;
|
|
1677
|
-
}
|
|
1678
|
-
if (code === 46 /*.*/) {
|
|
1679
|
-
// If this is our first dot, mark it as the start of our extension
|
|
1680
|
-
if (startDot === -1)
|
|
1681
|
-
startDot = i;
|
|
1682
|
-
else if (preDotState !== 1)
|
|
1683
|
-
preDotState = 1;
|
|
1684
|
-
} else if (startDot !== -1) {
|
|
1685
|
-
// We saw a non-dot and non-path separator before our dot, so we should
|
|
1686
|
-
// have a good chance at having a non-empty extension
|
|
1687
|
-
preDotState = -1;
|
|
1688
|
-
}
|
|
1689
|
-
}
|
|
1690
|
-
|
|
1691
|
-
if (startDot === -1 || end === -1 ||
|
|
1692
|
-
// We saw a non-dot character immediately before the dot
|
|
1693
|
-
preDotState === 0 ||
|
|
1694
|
-
// The (right-most) trimmed path component is exactly '..'
|
|
1695
|
-
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
|
1696
|
-
return '';
|
|
1697
|
-
}
|
|
1698
|
-
return path.slice(startDot, end);
|
|
1699
|
-
};
|
|
1700
|
-
|
|
1701
|
-
function filter (xs, f) {
|
|
1702
|
-
if (xs.filter) return xs.filter(f);
|
|
1703
|
-
var res = [];
|
|
1704
|
-
for (var i = 0; i < xs.length; i++) {
|
|
1705
|
-
if (f(xs[i], i, xs)) res.push(xs[i]);
|
|
1706
|
-
}
|
|
1707
|
-
return res;
|
|
1708
|
-
}
|
|
1709
|
-
|
|
1710
|
-
// String.prototype.substr - negative index don't work in IE8
|
|
1711
|
-
var substr = 'ab'.substr(-1) === 'b'
|
|
1712
|
-
? function (str, start, len) { return str.substr(start, len) }
|
|
1713
|
-
: function (str, start, len) {
|
|
1714
|
-
if (start < 0) start = str.length + start;
|
|
1715
|
-
return str.substr(start, len);
|
|
1716
|
-
}
|
|
1717
|
-
;
|
|
1718
|
-
|
|
1719
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("4362")))
|
|
1720
|
-
|
|
1721
|
-
/***/ })
|
|
1722
|
-
|
|
1723
|
-
}]);
|