1 | (function webpackUniversalModuleDefinition(root, factory) {
|
2 | if(typeof exports === 'object' && typeof module === 'object')
|
3 | module.exports = factory();
|
4 | else if(typeof define === 'function' && define.amd)
|
5 | define([], factory);
|
6 | else if(typeof exports === 'object')
|
7 | exports["AV"] = factory();
|
8 | else
|
9 | root["AV"] = factory();
|
10 | })(typeof self !== 'undefined' ? self : this, function() {
|
11 | return (function(modules) {
|
12 |
|
13 | var installedModules = {};
|
14 |
|
15 |
|
16 | function __webpack_require__(moduleId) {
|
17 |
|
18 |
|
19 | if(installedModules[moduleId]) {
|
20 | return installedModules[moduleId].exports;
|
21 | }
|
22 |
|
23 | var module = installedModules[moduleId] = {
|
24 | i: moduleId,
|
25 | l: false,
|
26 | exports: {}
|
27 | };
|
28 |
|
29 |
|
30 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
31 |
|
32 |
|
33 | module.l = true;
|
34 |
|
35 |
|
36 | return module.exports;
|
37 | }
|
38 |
|
39 |
|
40 |
|
41 | __webpack_require__.m = modules;
|
42 |
|
43 |
|
44 | __webpack_require__.c = installedModules;
|
45 |
|
46 |
|
47 | __webpack_require__.d = function(exports, name, getter) {
|
48 | if(!__webpack_require__.o(exports, name)) {
|
49 | Object.defineProperty(exports, name, {
|
50 | configurable: false,
|
51 | enumerable: true,
|
52 | get: getter
|
53 | /******/ });
|
54 | /******/ }
|
55 | /******/ };
|
56 | /******/
|
57 | /******/ // getDefaultExport function for compatibility with non-harmony modules
|
58 | /******/ __webpack_require__.n = function(module) {
|
59 | var getter = module && module.__esModule ?
|
60 | function getDefault() { return module['default']; } :
|
61 | function getModuleExports() { return module; };
|
62 | __webpack_require__.d(getter, 'a', getter);
|
63 | return getter;
|
64 | };
|
65 |
|
66 |
|
67 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
68 |
|
69 |
|
70 | __webpack_require__.p = "";
|
71 |
|
72 |
|
73 | return __webpack_require__(__webpack_require__.s = 249);
|
74 | })
|
75 |
|
76 | ([
|
77 |
|
78 | (function(module, exports, __webpack_require__) {
|
79 |
|
80 | "use strict";
|
81 |
|
82 | var global = __webpack_require__(6);
|
83 | var apply = __webpack_require__(69);
|
84 | var uncurryThis = __webpack_require__(4);
|
85 | var isCallable = __webpack_require__(7);
|
86 | var getOwnPropertyDescriptor = __webpack_require__(71).f;
|
87 | var isForced = __webpack_require__(149);
|
88 | var path = __webpack_require__(10);
|
89 | var bind = __webpack_require__(45);
|
90 | var createNonEnumerableProperty = __webpack_require__(35);
|
91 | var hasOwn = __webpack_require__(14);
|
92 |
|
93 | var wrapConstructor = function (NativeConstructor) {
|
94 | var Wrapper = function (a, b, c) {
|
95 | if (this instanceof Wrapper) {
|
96 | switch (arguments.length) {
|
97 | case 0: return new NativeConstructor();
|
98 | case 1: return new NativeConstructor(a);
|
99 | case 2: return new NativeConstructor(a, b);
|
100 | } return new NativeConstructor(a, b, c);
|
101 | } return apply(NativeConstructor, this, arguments);
|
102 | };
|
103 | Wrapper.prototype = NativeConstructor.prototype;
|
104 | return Wrapper;
|
105 | };
|
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 | module.exports = function (options, source) {
|
123 | var TARGET = options.target;
|
124 | var GLOBAL = options.global;
|
125 | var STATIC = options.stat;
|
126 | var PROTO = options.proto;
|
127 |
|
128 | var nativeSource = GLOBAL ? global : STATIC ? global[TARGET] : (global[TARGET] || {}).prototype;
|
129 |
|
130 | var target = GLOBAL ? path : path[TARGET] || createNonEnumerableProperty(path, TARGET, {})[TARGET];
|
131 | var targetPrototype = target.prototype;
|
132 |
|
133 | var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;
|
134 | var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;
|
135 |
|
136 | for (key in source) {
|
137 | FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
138 |
|
139 | USE_NATIVE = !FORCED && nativeSource && hasOwn(nativeSource, key);
|
140 |
|
141 | targetProperty = target[key];
|
142 |
|
143 | if (USE_NATIVE) if (options.dontCallGetSet) {
|
144 | descriptor = getOwnPropertyDescriptor(nativeSource, key);
|
145 | nativeProperty = descriptor && descriptor.value;
|
146 | } else nativeProperty = nativeSource[key];
|
147 |
|
148 |
|
149 | sourceProperty = (USE_NATIVE && nativeProperty) ? nativeProperty : source[key];
|
150 |
|
151 | if (USE_NATIVE && typeof targetProperty == typeof sourceProperty) continue;
|
152 |
|
153 |
|
154 | if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty, global);
|
155 |
|
156 | else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);
|
157 |
|
158 | else if (PROTO && isCallable(sourceProperty)) resultProperty = uncurryThis(sourceProperty);
|
159 |
|
160 | else resultProperty = sourceProperty;
|
161 |
|
162 |
|
163 | if (options.sham || (sourceProperty && sourceProperty.sham) || (targetProperty && targetProperty.sham)) {
|
164 | createNonEnumerableProperty(resultProperty, 'sham', true);
|
165 | }
|
166 |
|
167 | createNonEnumerableProperty(target, key, resultProperty);
|
168 |
|
169 | if (PROTO) {
|
170 | VIRTUAL_PROTOTYPE = TARGET + 'Prototype';
|
171 | if (!hasOwn(path, VIRTUAL_PROTOTYPE)) {
|
172 | createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});
|
173 | }
|
174 |
|
175 | createNonEnumerableProperty(path[VIRTUAL_PROTOTYPE], key, sourceProperty);
|
176 |
|
177 | if (options.real && targetPrototype && !targetPrototype[key]) {
|
178 | createNonEnumerableProperty(targetPrototype, key, sourceProperty);
|
179 | }
|
180 | }
|
181 | }
|
182 | };
|
183 |
|
184 |
|
185 | }),
|
186 |
|
187 | (function(module, exports) {
|
188 |
|
189 | function _interopRequireDefault(obj) {
|
190 | return obj && obj.__esModule ? obj : {
|
191 | "default": obj
|
192 | };
|
193 | }
|
194 |
|
195 | module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
196 |
|
197 | }),
|
198 |
|
199 | (function(module, __webpack_exports__, __webpack_require__) {
|
200 |
|
201 | "use strict";
|
202 | Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
203 | var __WEBPACK_IMPORTED_MODULE_0__index_default_js__ = __webpack_require__(290);
|
204 | __webpack_require__.d(__webpack_exports__, "default", function() { return __WEBPACK_IMPORTED_MODULE_0__index_default_js__["a"]; });
|
205 | var __WEBPACK_IMPORTED_MODULE_1__index_js__ = __webpack_require__(126);
|
206 | __webpack_require__.d(__webpack_exports__, "VERSION", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["VERSION"]; });
|
207 | __webpack_require__.d(__webpack_exports__, "restArguments", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["restArguments"]; });
|
208 | __webpack_require__.d(__webpack_exports__, "isObject", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isObject"]; });
|
209 | __webpack_require__.d(__webpack_exports__, "isNull", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isNull"]; });
|
210 | __webpack_require__.d(__webpack_exports__, "isUndefined", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isUndefined"]; });
|
211 | __webpack_require__.d(__webpack_exports__, "isBoolean", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isBoolean"]; });
|
212 | __webpack_require__.d(__webpack_exports__, "isElement", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isElement"]; });
|
213 | __webpack_require__.d(__webpack_exports__, "isString", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isString"]; });
|
214 | __webpack_require__.d(__webpack_exports__, "isNumber", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isNumber"]; });
|
215 | __webpack_require__.d(__webpack_exports__, "isDate", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isDate"]; });
|
216 | __webpack_require__.d(__webpack_exports__, "isRegExp", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isRegExp"]; });
|
217 | __webpack_require__.d(__webpack_exports__, "isError", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isError"]; });
|
218 | __webpack_require__.d(__webpack_exports__, "isSymbol", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isSymbol"]; });
|
219 | __webpack_require__.d(__webpack_exports__, "isArrayBuffer", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isArrayBuffer"]; });
|
220 | __webpack_require__.d(__webpack_exports__, "isDataView", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isDataView"]; });
|
221 | __webpack_require__.d(__webpack_exports__, "isArray", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isArray"]; });
|
222 | __webpack_require__.d(__webpack_exports__, "isFunction", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isFunction"]; });
|
223 | __webpack_require__.d(__webpack_exports__, "isArguments", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isArguments"]; });
|
224 | __webpack_require__.d(__webpack_exports__, "isFinite", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isFinite"]; });
|
225 | __webpack_require__.d(__webpack_exports__, "isNaN", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isNaN"]; });
|
226 | __webpack_require__.d(__webpack_exports__, "isTypedArray", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isTypedArray"]; });
|
227 | __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isEmpty"]; });
|
228 | __webpack_require__.d(__webpack_exports__, "isMatch", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isMatch"]; });
|
229 | __webpack_require__.d(__webpack_exports__, "isEqual", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isEqual"]; });
|
230 | __webpack_require__.d(__webpack_exports__, "isMap", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isMap"]; });
|
231 | __webpack_require__.d(__webpack_exports__, "isWeakMap", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isWeakMap"]; });
|
232 | __webpack_require__.d(__webpack_exports__, "isSet", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isSet"]; });
|
233 | __webpack_require__.d(__webpack_exports__, "isWeakSet", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isWeakSet"]; });
|
234 | __webpack_require__.d(__webpack_exports__, "keys", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["keys"]; });
|
235 | __webpack_require__.d(__webpack_exports__, "allKeys", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["allKeys"]; });
|
236 | __webpack_require__.d(__webpack_exports__, "values", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["values"]; });
|
237 | __webpack_require__.d(__webpack_exports__, "pairs", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["pairs"]; });
|
238 | __webpack_require__.d(__webpack_exports__, "invert", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["invert"]; });
|
239 | __webpack_require__.d(__webpack_exports__, "functions", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["functions"]; });
|
240 | __webpack_require__.d(__webpack_exports__, "methods", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["methods"]; });
|
241 | __webpack_require__.d(__webpack_exports__, "extend", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["extend"]; });
|
242 | __webpack_require__.d(__webpack_exports__, "extendOwn", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["extendOwn"]; });
|
243 | __webpack_require__.d(__webpack_exports__, "assign", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["assign"]; });
|
244 | __webpack_require__.d(__webpack_exports__, "defaults", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["defaults"]; });
|
245 | __webpack_require__.d(__webpack_exports__, "create", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["create"]; });
|
246 | __webpack_require__.d(__webpack_exports__, "clone", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["clone"]; });
|
247 | __webpack_require__.d(__webpack_exports__, "tap", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["tap"]; });
|
248 | __webpack_require__.d(__webpack_exports__, "get", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["get"]; });
|
249 | __webpack_require__.d(__webpack_exports__, "has", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["has"]; });
|
250 | __webpack_require__.d(__webpack_exports__, "mapObject", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["mapObject"]; });
|
251 | __webpack_require__.d(__webpack_exports__, "identity", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["identity"]; });
|
252 | __webpack_require__.d(__webpack_exports__, "constant", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["constant"]; });
|
253 | __webpack_require__.d(__webpack_exports__, "noop", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["noop"]; });
|
254 | __webpack_require__.d(__webpack_exports__, "toPath", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["toPath"]; });
|
255 | __webpack_require__.d(__webpack_exports__, "property", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["property"]; });
|
256 | __webpack_require__.d(__webpack_exports__, "propertyOf", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["propertyOf"]; });
|
257 | __webpack_require__.d(__webpack_exports__, "matcher", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["matcher"]; });
|
258 | __webpack_require__.d(__webpack_exports__, "matches", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["matches"]; });
|
259 | __webpack_require__.d(__webpack_exports__, "times", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["times"]; });
|
260 | __webpack_require__.d(__webpack_exports__, "random", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["random"]; });
|
261 | __webpack_require__.d(__webpack_exports__, "now", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["now"]; });
|
262 | __webpack_require__.d(__webpack_exports__, "escape", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["escape"]; });
|
263 | __webpack_require__.d(__webpack_exports__, "unescape", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["unescape"]; });
|
264 | __webpack_require__.d(__webpack_exports__, "templateSettings", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["templateSettings"]; });
|
265 | __webpack_require__.d(__webpack_exports__, "template", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["template"]; });
|
266 | __webpack_require__.d(__webpack_exports__, "result", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["result"]; });
|
267 | __webpack_require__.d(__webpack_exports__, "uniqueId", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["uniqueId"]; });
|
268 | __webpack_require__.d(__webpack_exports__, "chain", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["chain"]; });
|
269 | __webpack_require__.d(__webpack_exports__, "iteratee", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["iteratee"]; });
|
270 | __webpack_require__.d(__webpack_exports__, "partial", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["partial"]; });
|
271 | __webpack_require__.d(__webpack_exports__, "bind", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["bind"]; });
|
272 | __webpack_require__.d(__webpack_exports__, "bindAll", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["bindAll"]; });
|
273 | __webpack_require__.d(__webpack_exports__, "memoize", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["memoize"]; });
|
274 | __webpack_require__.d(__webpack_exports__, "delay", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["delay"]; });
|
275 | __webpack_require__.d(__webpack_exports__, "defer", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["defer"]; });
|
276 | __webpack_require__.d(__webpack_exports__, "throttle", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["throttle"]; });
|
277 | __webpack_require__.d(__webpack_exports__, "debounce", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["debounce"]; });
|
278 | __webpack_require__.d(__webpack_exports__, "wrap", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["wrap"]; });
|
279 | __webpack_require__.d(__webpack_exports__, "negate", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["negate"]; });
|
280 | __webpack_require__.d(__webpack_exports__, "compose", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["compose"]; });
|
281 | __webpack_require__.d(__webpack_exports__, "after", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["after"]; });
|
282 | __webpack_require__.d(__webpack_exports__, "before", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["before"]; });
|
283 | __webpack_require__.d(__webpack_exports__, "once", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["once"]; });
|
284 | __webpack_require__.d(__webpack_exports__, "findKey", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["findKey"]; });
|
285 | __webpack_require__.d(__webpack_exports__, "findIndex", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["findIndex"]; });
|
286 | __webpack_require__.d(__webpack_exports__, "findLastIndex", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["findLastIndex"]; });
|
287 | __webpack_require__.d(__webpack_exports__, "sortedIndex", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["sortedIndex"]; });
|
288 | __webpack_require__.d(__webpack_exports__, "indexOf", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["indexOf"]; });
|
289 | __webpack_require__.d(__webpack_exports__, "lastIndexOf", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["lastIndexOf"]; });
|
290 | __webpack_require__.d(__webpack_exports__, "find", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["find"]; });
|
291 | __webpack_require__.d(__webpack_exports__, "detect", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["detect"]; });
|
292 | __webpack_require__.d(__webpack_exports__, "findWhere", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["findWhere"]; });
|
293 | __webpack_require__.d(__webpack_exports__, "each", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["each"]; });
|
294 | __webpack_require__.d(__webpack_exports__, "forEach", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["forEach"]; });
|
295 | __webpack_require__.d(__webpack_exports__, "map", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["map"]; });
|
296 | __webpack_require__.d(__webpack_exports__, "collect", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["collect"]; });
|
297 | __webpack_require__.d(__webpack_exports__, "reduce", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["reduce"]; });
|
298 | __webpack_require__.d(__webpack_exports__, "foldl", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["foldl"]; });
|
299 | __webpack_require__.d(__webpack_exports__, "inject", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["inject"]; });
|
300 | __webpack_require__.d(__webpack_exports__, "reduceRight", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["reduceRight"]; });
|
301 | __webpack_require__.d(__webpack_exports__, "foldr", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["foldr"]; });
|
302 | __webpack_require__.d(__webpack_exports__, "filter", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["filter"]; });
|
303 | __webpack_require__.d(__webpack_exports__, "select", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["select"]; });
|
304 | __webpack_require__.d(__webpack_exports__, "reject", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["reject"]; });
|
305 | __webpack_require__.d(__webpack_exports__, "every", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["every"]; });
|
306 | __webpack_require__.d(__webpack_exports__, "all", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["all"]; });
|
307 | __webpack_require__.d(__webpack_exports__, "some", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["some"]; });
|
308 | __webpack_require__.d(__webpack_exports__, "any", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["any"]; });
|
309 | __webpack_require__.d(__webpack_exports__, "contains", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["contains"]; });
|
310 | __webpack_require__.d(__webpack_exports__, "includes", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["includes"]; });
|
311 | __webpack_require__.d(__webpack_exports__, "include", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["include"]; });
|
312 | __webpack_require__.d(__webpack_exports__, "invoke", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["invoke"]; });
|
313 | __webpack_require__.d(__webpack_exports__, "pluck", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["pluck"]; });
|
314 | __webpack_require__.d(__webpack_exports__, "where", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["where"]; });
|
315 | __webpack_require__.d(__webpack_exports__, "max", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["max"]; });
|
316 | __webpack_require__.d(__webpack_exports__, "min", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["min"]; });
|
317 | __webpack_require__.d(__webpack_exports__, "shuffle", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["shuffle"]; });
|
318 | __webpack_require__.d(__webpack_exports__, "sample", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["sample"]; });
|
319 | __webpack_require__.d(__webpack_exports__, "sortBy", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["sortBy"]; });
|
320 | __webpack_require__.d(__webpack_exports__, "groupBy", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["groupBy"]; });
|
321 | __webpack_require__.d(__webpack_exports__, "indexBy", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["indexBy"]; });
|
322 | __webpack_require__.d(__webpack_exports__, "countBy", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["countBy"]; });
|
323 | __webpack_require__.d(__webpack_exports__, "partition", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["partition"]; });
|
324 | __webpack_require__.d(__webpack_exports__, "toArray", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["toArray"]; });
|
325 | __webpack_require__.d(__webpack_exports__, "size", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["size"]; });
|
326 | __webpack_require__.d(__webpack_exports__, "pick", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["pick"]; });
|
327 | __webpack_require__.d(__webpack_exports__, "omit", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["omit"]; });
|
328 | __webpack_require__.d(__webpack_exports__, "first", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["first"]; });
|
329 | __webpack_require__.d(__webpack_exports__, "head", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["head"]; });
|
330 | __webpack_require__.d(__webpack_exports__, "take", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["take"]; });
|
331 | __webpack_require__.d(__webpack_exports__, "initial", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["initial"]; });
|
332 | __webpack_require__.d(__webpack_exports__, "last", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["last"]; });
|
333 | __webpack_require__.d(__webpack_exports__, "rest", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["rest"]; });
|
334 | __webpack_require__.d(__webpack_exports__, "tail", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["tail"]; });
|
335 | __webpack_require__.d(__webpack_exports__, "drop", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["drop"]; });
|
336 | __webpack_require__.d(__webpack_exports__, "compact", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["compact"]; });
|
337 | __webpack_require__.d(__webpack_exports__, "flatten", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["flatten"]; });
|
338 | __webpack_require__.d(__webpack_exports__, "without", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["without"]; });
|
339 | __webpack_require__.d(__webpack_exports__, "uniq", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["uniq"]; });
|
340 | __webpack_require__.d(__webpack_exports__, "unique", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["unique"]; });
|
341 | __webpack_require__.d(__webpack_exports__, "union", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["union"]; });
|
342 | __webpack_require__.d(__webpack_exports__, "intersection", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["intersection"]; });
|
343 | __webpack_require__.d(__webpack_exports__, "difference", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["difference"]; });
|
344 | __webpack_require__.d(__webpack_exports__, "unzip", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["unzip"]; });
|
345 | __webpack_require__.d(__webpack_exports__, "transpose", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["transpose"]; });
|
346 | __webpack_require__.d(__webpack_exports__, "zip", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["zip"]; });
|
347 | __webpack_require__.d(__webpack_exports__, "object", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["object"]; });
|
348 | __webpack_require__.d(__webpack_exports__, "range", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["range"]; });
|
349 | __webpack_require__.d(__webpack_exports__, "chunk", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["chunk"]; });
|
350 | __webpack_require__.d(__webpack_exports__, "mixin", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["mixin"]; });
|
351 |
|
352 |
|
353 |
|
354 |
|
355 |
|
356 |
|
357 |
|
358 |
|
359 |
|
360 |
|
361 |
|
362 |
|
363 |
|
364 |
|
365 |
|
366 |
|
367 |
|
368 |
|
369 |
|
370 |
|
371 | }),
|
372 |
|
373 | (function(module, exports) {
|
374 |
|
375 | module.exports = function (exec) {
|
376 | try {
|
377 | return !!exec();
|
378 | } catch (error) {
|
379 | return true;
|
380 | }
|
381 | };
|
382 |
|
383 |
|
384 | }),
|
385 |
|
386 | (function(module, exports, __webpack_require__) {
|
387 |
|
388 | var NATIVE_BIND = __webpack_require__(70);
|
389 |
|
390 | var FunctionPrototype = Function.prototype;
|
391 | var bind = FunctionPrototype.bind;
|
392 | var call = FunctionPrototype.call;
|
393 | var uncurryThis = NATIVE_BIND && bind.bind(call, call);
|
394 |
|
395 | module.exports = NATIVE_BIND ? function (fn) {
|
396 | return fn && uncurryThis(fn);
|
397 | } : function (fn) {
|
398 | return fn && function () {
|
399 | return call.apply(fn, arguments);
|
400 | };
|
401 | };
|
402 |
|
403 |
|
404 | }),
|
405 |
|
406 | (function(module, __webpack_exports__, __webpack_require__) {
|
407 |
|
408 | "use strict";
|
409 | (function(global) { __webpack_require__.d(__webpack_exports__, "e", function() { return VERSION; });
|
410 | __webpack_require__.d(__webpack_exports__, "p", function() { return root; });
|
411 | __webpack_require__.d(__webpack_exports__, "a", function() { return ArrayProto; });
|
412 | __webpack_require__.d(__webpack_exports__, "c", function() { return ObjProto; });
|
413 | __webpack_require__.d(__webpack_exports__, "d", function() { return SymbolProto; });
|
414 | __webpack_require__.d(__webpack_exports__, "o", function() { return push; });
|
415 | __webpack_require__.d(__webpack_exports__, "q", function() { return slice; });
|
416 | __webpack_require__.d(__webpack_exports__, "t", function() { return toString; });
|
417 | __webpack_require__.d(__webpack_exports__, "i", function() { return hasOwnProperty; });
|
418 | __webpack_require__.d(__webpack_exports__, "r", function() { return supportsArrayBuffer; });
|
419 | __webpack_require__.d(__webpack_exports__, "s", function() { return supportsDataView; });
|
420 | __webpack_require__.d(__webpack_exports__, "k", function() { return nativeIsArray; });
|
421 | __webpack_require__.d(__webpack_exports__, "m", function() { return nativeKeys; });
|
422 | __webpack_require__.d(__webpack_exports__, "j", function() { return nativeCreate; });
|
423 | __webpack_require__.d(__webpack_exports__, "l", function() { return nativeIsView; });
|
424 | __webpack_require__.d(__webpack_exports__, "g", function() { return _isNaN; });
|
425 | __webpack_require__.d(__webpack_exports__, "f", function() { return _isFinite; });
|
426 | __webpack_require__.d(__webpack_exports__, "h", function() { return hasEnumBug; });
|
427 | __webpack_require__.d(__webpack_exports__, "n", function() { return nonEnumerableProps; });
|
428 | __webpack_require__.d(__webpack_exports__, "b", function() { return MAX_ARRAY_INDEX; });
|
429 |
|
430 | var VERSION = '1.12.1';
|
431 |
|
432 |
|
433 |
|
434 |
|
435 | var root = typeof self == 'object' && self.self === self && self ||
|
436 | typeof global == 'object' && global.global === global && global ||
|
437 | Function('return this')() ||
|
438 | {};
|
439 |
|
440 |
|
441 | var ArrayProto = Array.prototype, ObjProto = Object.prototype;
|
442 | var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
|
443 |
|
444 |
|
445 | var push = ArrayProto.push,
|
446 | slice = ArrayProto.slice,
|
447 | toString = ObjProto.toString,
|
448 | hasOwnProperty = ObjProto.hasOwnProperty;
|
449 |
|
450 |
|
451 | var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',
|
452 | supportsDataView = typeof DataView !== 'undefined';
|
453 |
|
454 |
|
455 |
|
456 | var nativeIsArray = Array.isArray,
|
457 | nativeKeys = Object.keys,
|
458 | nativeCreate = Object.create,
|
459 | nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;
|
460 |
|
461 |
|
462 | var _isNaN = isNaN,
|
463 | _isFinite = isFinite;
|
464 |
|
465 |
|
466 | var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
|
467 | var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
|
468 | 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
|
469 |
|
470 |
|
471 | var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
|
472 |
|
473 | }.call(__webpack_exports__, __webpack_require__(112)))
|
474 |
|
475 | }),
|
476 |
|
477 | (function(module, exports, __webpack_require__) {
|
478 |
|
479 | (function(global) {var check = function (it) {
|
480 | return it && it.Math == Math && it;
|
481 | };
|
482 |
|
483 |
|
484 | module.exports =
|
485 |
|
486 | check(typeof globalThis == 'object' && globalThis) ||
|
487 | check(typeof window == 'object' && window) ||
|
488 |
|
489 | check(typeof self == 'object' && self) ||
|
490 | check(typeof global == 'object' && global) ||
|
491 |
|
492 | (function () { return this; })() || Function('return this')();
|
493 |
|
494 | }.call(exports, __webpack_require__(112)))
|
495 |
|
496 | }),
|
497 |
|
498 | (function(module, exports) {
|
499 |
|
500 |
|
501 |
|
502 | module.exports = function (argument) {
|
503 | return typeof argument == 'function';
|
504 | };
|
505 |
|
506 |
|
507 | }),
|
508 |
|
509 | (function(module, exports, __webpack_require__) {
|
510 |
|
511 | var path = __webpack_require__(10);
|
512 | var hasOwn = __webpack_require__(14);
|
513 | var wrappedWellKnownSymbolModule = __webpack_require__(144);
|
514 | var defineProperty = __webpack_require__(22).f;
|
515 |
|
516 | module.exports = function (NAME) {
|
517 | var Symbol = path.Symbol || (path.Symbol = {});
|
518 | if (!hasOwn(Symbol, NAME)) defineProperty(Symbol, NAME, {
|
519 | value: wrappedWellKnownSymbolModule.f(NAME)
|
520 | });
|
521 | };
|
522 |
|
523 |
|
524 | }),
|
525 |
|
526 | (function(module, exports, __webpack_require__) {
|
527 |
|
528 | var global = __webpack_require__(6);
|
529 | var shared = __webpack_require__(73);
|
530 | var hasOwn = __webpack_require__(14);
|
531 | var uid = __webpack_require__(92);
|
532 | var NATIVE_SYMBOL = __webpack_require__(57);
|
533 | var USE_SYMBOL_AS_UID = __webpack_require__(147);
|
534 |
|
535 | var WellKnownSymbolsStore = shared('wks');
|
536 | var Symbol = global.Symbol;
|
537 | var symbolFor = Symbol && Symbol['for'];
|
538 | var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
|
539 |
|
540 | module.exports = function (name) {
|
541 | if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
542 | var description = 'Symbol.' + name;
|
543 | if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {
|
544 | WellKnownSymbolsStore[name] = Symbol[name];
|
545 | } else if (USE_SYMBOL_AS_UID && symbolFor) {
|
546 | WellKnownSymbolsStore[name] = symbolFor(description);
|
547 | } else {
|
548 | WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
549 | }
|
550 | } return WellKnownSymbolsStore[name];
|
551 | };
|
552 |
|
553 |
|
554 | }),
|
555 |
|
556 | (function(module, exports) {
|
557 |
|
558 | module.exports = {};
|
559 |
|
560 |
|
561 | }),
|
562 |
|
563 | (function(module, exports, __webpack_require__) {
|
564 |
|
565 | var isCallable = __webpack_require__(7);
|
566 |
|
567 | module.exports = function (it) {
|
568 | return typeof it == 'object' ? it !== null : isCallable(it);
|
569 | };
|
570 |
|
571 |
|
572 | }),
|
573 |
|
574 | (function(module, exports, __webpack_require__) {
|
575 |
|
576 | module.exports = __webpack_require__(252);
|
577 |
|
578 | }),
|
579 |
|
580 | (function(module, exports, __webpack_require__) {
|
581 |
|
582 | var NATIVE_BIND = __webpack_require__(70);
|
583 |
|
584 | var call = Function.prototype.call;
|
585 |
|
586 | module.exports = NATIVE_BIND ? call.bind(call) : function () {
|
587 | return call.apply(call, arguments);
|
588 | };
|
589 |
|
590 |
|
591 | }),
|
592 |
|
593 | (function(module, exports, __webpack_require__) {
|
594 |
|
595 | var uncurryThis = __webpack_require__(4);
|
596 | var toObject = __webpack_require__(34);
|
597 |
|
598 | var hasOwnProperty = uncurryThis({}.hasOwnProperty);
|
599 |
|
600 |
|
601 |
|
602 |
|
603 | module.exports = Object.hasOwn || function hasOwn(it, key) {
|
604 | return hasOwnProperty(toObject(it), key);
|
605 | };
|
606 |
|
607 |
|
608 | }),
|
609 |
|
610 | (function(module, __webpack_exports__, __webpack_require__) {
|
611 |
|
612 | "use strict";
|
613 | __webpack_exports__["a"] = keys;
|
614 | var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(52);
|
615 | var __WEBPACK_IMPORTED_MODULE_1__setup_js__ = __webpack_require__(5);
|
616 | var __WEBPACK_IMPORTED_MODULE_2__has_js__ = __webpack_require__(40);
|
617 | var __WEBPACK_IMPORTED_MODULE_3__collectNonEnumProps_js__ = __webpack_require__(180);
|
618 |
|
619 |
|
620 |
|
621 |
|
622 |
|
623 |
|
624 |
|
625 | function keys(obj) {
|
626 | if (!Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" ])(obj)) return [];
|
627 | if (__WEBPACK_IMPORTED_MODULE_1__setup_js__["m" ]) return Object(__WEBPACK_IMPORTED_MODULE_1__setup_js__["m" ])(obj);
|
628 | var keys = [];
|
629 | for (var key in obj) if (Object(__WEBPACK_IMPORTED_MODULE_2__has_js__["a" ])(obj, key)) keys.push(key);
|
630 |
|
631 | if (__WEBPACK_IMPORTED_MODULE_1__setup_js__["h" ]) Object(__WEBPACK_IMPORTED_MODULE_3__collectNonEnumProps_js__["a" ])(obj, keys);
|
632 | return keys;
|
633 | }
|
634 |
|
635 |
|
636 | }),
|
637 |
|
638 | (function(module, exports, __webpack_require__) {
|
639 |
|
640 | var fails = __webpack_require__(3);
|
641 |
|
642 |
|
643 | module.exports = !fails(function () {
|
644 |
|
645 | return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
646 | });
|
647 |
|
648 |
|
649 | }),
|
650 |
|
651 | (function(module, __webpack_exports__, __webpack_require__) {
|
652 |
|
653 | "use strict";
|
654 | __webpack_exports__["a"] = tagTester;
|
655 | var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(5);
|
656 |
|
657 |
|
658 |
|
659 | function tagTester(name) {
|
660 | var tag = '[object ' + name + ']';
|
661 | return function(obj) {
|
662 | return __WEBPACK_IMPORTED_MODULE_0__setup_js__["t" ].call(obj) === tag;
|
663 | };
|
664 | }
|
665 |
|
666 |
|
667 | }),
|
668 |
|
669 | (function(module, exports, __webpack_require__) {
|
670 |
|
671 | var path = __webpack_require__(10);
|
672 | var global = __webpack_require__(6);
|
673 | var isCallable = __webpack_require__(7);
|
674 |
|
675 | var aFunction = function (variable) {
|
676 | return isCallable(variable) ? variable : undefined;
|
677 | };
|
678 |
|
679 | module.exports = function (namespace, method) {
|
680 | return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
|
681 | : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
|
682 | };
|
683 |
|
684 |
|
685 | }),
|
686 |
|
687 | (function(module, exports, __webpack_require__) {
|
688 |
|
689 | var isObject = __webpack_require__(11);
|
690 |
|
691 | var $String = String;
|
692 | var $TypeError = TypeError;
|
693 |
|
694 |
|
695 | module.exports = function (argument) {
|
696 | if (isObject(argument)) return argument;
|
697 | throw $TypeError($String(argument) + ' is not an object');
|
698 | };
|
699 |
|
700 |
|
701 | }),
|
702 |
|
703 | (function(module, __webpack_exports__, __webpack_require__) {
|
704 |
|
705 | "use strict";
|
706 | __webpack_exports__["a"] = cb;
|
707 | var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(24);
|
708 | var __WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__ = __webpack_require__(190);
|
709 | var __WEBPACK_IMPORTED_MODULE_2__iteratee_js__ = __webpack_require__(191);
|
710 |
|
711 |
|
712 |
|
713 |
|
714 |
|
715 |
|
716 | function cb(value, context, argCount) {
|
717 | if (__WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" ].iteratee !== __WEBPACK_IMPORTED_MODULE_2__iteratee_js__["a" ]) return __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" ].iteratee(value, context);
|
718 | return Object(__WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__["a" ])(value, context, argCount);
|
719 | }
|
720 |
|
721 |
|
722 | }),
|
723 |
|
724 | (function(module, exports, __webpack_require__) {
|
725 |
|
726 | var uncurryThis = __webpack_require__(4);
|
727 |
|
728 | module.exports = uncurryThis({}.isPrototypeOf);
|
729 |
|
730 |
|
731 | }),
|
732 |
|
733 | (function(module, exports, __webpack_require__) {
|
734 |
|
735 | var DESCRIPTORS = __webpack_require__(16);
|
736 | var IE8_DOM_DEFINE = __webpack_require__(148);
|
737 | var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(150);
|
738 | var anObject = __webpack_require__(19);
|
739 | var toPropertyKey = __webpack_require__(88);
|
740 |
|
741 | var $TypeError = TypeError;
|
742 |
|
743 | var $defineProperty = Object.defineProperty;
|
744 |
|
745 | var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
746 | var ENUMERABLE = 'enumerable';
|
747 | var CONFIGURABLE = 'configurable';
|
748 | var WRITABLE = 'writable';
|
749 |
|
750 |
|
751 |
|
752 | exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
|
753 | anObject(O);
|
754 | P = toPropertyKey(P);
|
755 | anObject(Attributes);
|
756 | if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
757 | var current = $getOwnPropertyDescriptor(O, P);
|
758 | if (current && current[WRITABLE]) {
|
759 | O[P] = Attributes.value;
|
760 | Attributes = {
|
761 | configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
|
762 | enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
763 | writable: false
|
764 | };
|
765 | }
|
766 | } return $defineProperty(O, P, Attributes);
|
767 | } : $defineProperty : function defineProperty(O, P, Attributes) {
|
768 | anObject(O);
|
769 | P = toPropertyKey(P);
|
770 | anObject(Attributes);
|
771 | if (IE8_DOM_DEFINE) try {
|
772 | return $defineProperty(O, P, Attributes);
|
773 | } catch (error) { }
|
774 | if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');
|
775 | if ('value' in Attributes) O[P] = Attributes.value;
|
776 | return O;
|
777 | };
|
778 |
|
779 |
|
780 | }),
|
781 |
|
782 | (function(module, __webpack_exports__, __webpack_require__) {
|
783 |
|
784 | "use strict";
|
785 | __webpack_exports__["a"] = restArguments;
|
786 |
|
787 |
|
788 |
|
789 |
|
790 |
|
791 | function restArguments(func, startIndex) {
|
792 | startIndex = startIndex == null ? func.length - 1 : +startIndex;
|
793 | return function() {
|
794 | var length = Math.max(arguments.length - startIndex, 0),
|
795 | rest = Array(length),
|
796 | index = 0;
|
797 | for (; index < length; index++) {
|
798 | rest[index] = arguments[index + startIndex];
|
799 | }
|
800 | switch (startIndex) {
|
801 | case 0: return func.call(this, rest);
|
802 | case 1: return func.call(this, arguments[0], rest);
|
803 | case 2: return func.call(this, arguments[0], arguments[1], rest);
|
804 | }
|
805 | var args = Array(startIndex + 1);
|
806 | for (index = 0; index < startIndex; index++) {
|
807 | args[index] = arguments[index];
|
808 | }
|
809 | args[startIndex] = rest;
|
810 | return func.apply(this, args);
|
811 | };
|
812 | }
|
813 |
|
814 |
|
815 | }),
|
816 |
|
817 | (function(module, __webpack_exports__, __webpack_require__) {
|
818 |
|
819 | "use strict";
|
820 | __webpack_exports__["a"] = _;
|
821 | var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(5);
|
822 |
|
823 |
|
824 |
|
825 |
|
826 |
|
827 | function _(obj) {
|
828 | if (obj instanceof _) return obj;
|
829 | if (!(this instanceof _)) return new _(obj);
|
830 | this._wrapped = obj;
|
831 | }
|
832 |
|
833 | _.VERSION = __WEBPACK_IMPORTED_MODULE_0__setup_js__["e" ];
|
834 |
|
835 |
|
836 | _.prototype.value = function() {
|
837 | return this._wrapped;
|
838 | };
|
839 |
|
840 |
|
841 |
|
842 | _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
|
843 |
|
844 | _.prototype.toString = function() {
|
845 | return String(this._wrapped);
|
846 | };
|
847 |
|
848 |
|
849 | }),
|
850 |
|
851 | (function(module, __webpack_exports__, __webpack_require__) {
|
852 |
|
853 | "use strict";
|
854 | var __WEBPACK_IMPORTED_MODULE_0__createSizePropertyCheck_js__ = __webpack_require__(178);
|
855 | var __WEBPACK_IMPORTED_MODULE_1__getLength_js__ = __webpack_require__(28);
|
856 |
|
857 |
|
858 |
|
859 |
|
860 |
|
861 |
|
862 |
|
863 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createSizePropertyCheck_js__["a" ])(__WEBPACK_IMPORTED_MODULE_1__getLength_js__["a" ]));
|
864 |
|
865 |
|
866 | }),
|
867 |
|
868 | (function(module, exports, __webpack_require__) {
|
869 |
|
870 | "use strict";
|
871 |
|
872 |
|
873 | var _interopRequireDefault = __webpack_require__(1);
|
874 |
|
875 | var _concat = _interopRequireDefault(__webpack_require__(30));
|
876 |
|
877 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
878 |
|
879 | var _ = __webpack_require__(2);
|
880 |
|
881 | var md5 = __webpack_require__(502);
|
882 |
|
883 | var _require = __webpack_require__(2),
|
884 | extend = _require.extend;
|
885 |
|
886 | var AV = __webpack_require__(65);
|
887 |
|
888 | var AVError = __webpack_require__(43);
|
889 |
|
890 | var _require2 = __webpack_require__(29),
|
891 | getSessionToken = _require2.getSessionToken;
|
892 |
|
893 | var ajax = __webpack_require__(108);
|
894 |
|
895 |
|
896 | var sign = function sign(key, isMasterKey) {
|
897 | var _context2;
|
898 |
|
899 | var now = new Date().getTime();
|
900 | var signature = md5(now + key);
|
901 |
|
902 | if (isMasterKey) {
|
903 | var _context;
|
904 |
|
905 | return (0, _concat.default)(_context = "".concat(signature, ",")).call(_context, now, ",master");
|
906 | }
|
907 |
|
908 | return (0, _concat.default)(_context2 = "".concat(signature, ",")).call(_context2, now);
|
909 | };
|
910 |
|
911 | var setAppKey = function setAppKey(headers, signKey) {
|
912 | if (signKey) {
|
913 | headers['X-LC-Sign'] = sign(AV.applicationKey);
|
914 | } else {
|
915 | headers['X-LC-Key'] = AV.applicationKey;
|
916 | }
|
917 | };
|
918 |
|
919 | var setHeaders = function setHeaders() {
|
920 | var authOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
921 | var signKey = arguments.length > 1 ? arguments[1] : undefined;
|
922 | var headers = {
|
923 | 'X-LC-Id': AV.applicationId,
|
924 | 'Content-Type': 'application/json;charset=UTF-8'
|
925 | };
|
926 | var useMasterKey = false;
|
927 |
|
928 | if (typeof authOptions.useMasterKey === 'boolean') {
|
929 | useMasterKey = authOptions.useMasterKey;
|
930 | } else if (typeof AV._config.useMasterKey === 'boolean') {
|
931 | useMasterKey = AV._config.useMasterKey;
|
932 | }
|
933 |
|
934 | if (useMasterKey) {
|
935 | if (AV.masterKey) {
|
936 | if (signKey) {
|
937 | headers['X-LC-Sign'] = sign(AV.masterKey, true);
|
938 | } else {
|
939 | headers['X-LC-Key'] = "".concat(AV.masterKey, ",master");
|
940 | }
|
941 | } else {
|
942 | console.warn('masterKey is not set, fall back to use appKey');
|
943 | setAppKey(headers, signKey);
|
944 | }
|
945 | } else {
|
946 | setAppKey(headers, signKey);
|
947 | }
|
948 |
|
949 | if (AV.hookKey) {
|
950 | headers['X-LC-Hook-Key'] = AV.hookKey;
|
951 | }
|
952 |
|
953 | if (AV._config.production !== null) {
|
954 | headers['X-LC-Prod'] = String(AV._config.production);
|
955 | }
|
956 |
|
957 | headers[ false ? 'User-Agent' : 'X-LC-UA'] = AV._sharedConfig.userAgent;
|
958 | return _promise.default.resolve().then(function () {
|
959 |
|
960 | var sessionToken = getSessionToken(authOptions);
|
961 |
|
962 | if (sessionToken) {
|
963 | headers['X-LC-Session'] = sessionToken;
|
964 | } else if (!AV._config.disableCurrentUser) {
|
965 | return AV.User.currentAsync().then(function (currentUser) {
|
966 | if (currentUser && currentUser._sessionToken) {
|
967 | headers['X-LC-Session'] = currentUser._sessionToken;
|
968 | }
|
969 |
|
970 | return headers;
|
971 | });
|
972 | }
|
973 |
|
974 | return headers;
|
975 | });
|
976 | };
|
977 |
|
978 | var createApiUrl = function createApiUrl(_ref) {
|
979 | var _ref$service = _ref.service,
|
980 | service = _ref$service === void 0 ? 'api' : _ref$service,
|
981 | _ref$version = _ref.version,
|
982 | version = _ref$version === void 0 ? '1.1' : _ref$version,
|
983 | path = _ref.path;
|
984 | var apiURL = AV._config.serverURLs[service];
|
985 | if (!apiURL) throw new Error("undefined server URL for ".concat(service));
|
986 |
|
987 | if (apiURL.charAt(apiURL.length - 1) !== '/') {
|
988 | apiURL += '/';
|
989 | }
|
990 |
|
991 | apiURL += version;
|
992 |
|
993 | if (path) {
|
994 | apiURL += path;
|
995 | }
|
996 |
|
997 | return apiURL;
|
998 | };
|
999 |
|
1000 |
|
1001 |
|
1002 |
|
1003 |
|
1004 |
|
1005 |
|
1006 |
|
1007 |
|
1008 |
|
1009 |
|
1010 |
|
1011 |
|
1012 |
|
1013 |
|
1014 | var request = function request(_ref2) {
|
1015 | var service = _ref2.service,
|
1016 | version = _ref2.version,
|
1017 | method = _ref2.method,
|
1018 | path = _ref2.path,
|
1019 | query = _ref2.query,
|
1020 | data = _ref2.data,
|
1021 | authOptions = _ref2.authOptions,
|
1022 | _ref2$signKey = _ref2.signKey,
|
1023 | signKey = _ref2$signKey === void 0 ? true : _ref2$signKey;
|
1024 |
|
1025 | if (!(AV.applicationId && (AV.applicationKey || AV.masterKey))) {
|
1026 | throw new Error('Not initialized');
|
1027 | }
|
1028 |
|
1029 | if (AV._appRouter) {
|
1030 | AV._appRouter.refresh();
|
1031 | }
|
1032 |
|
1033 | var timeout = AV._config.requestTimeout;
|
1034 | var url = createApiUrl({
|
1035 | service: service,
|
1036 | path: path,
|
1037 | version: version
|
1038 | });
|
1039 | return setHeaders(authOptions, signKey).then(function (headers) {
|
1040 | return ajax({
|
1041 | method: method,
|
1042 | url: url,
|
1043 | query: query,
|
1044 | data: data,
|
1045 | headers: headers,
|
1046 | timeout: timeout
|
1047 | }).catch(function (error) {
|
1048 | var errorJSON = {
|
1049 | code: error.code || -1,
|
1050 | error: error.message || error.responseText
|
1051 | };
|
1052 |
|
1053 | if (error.response && error.response.code) {
|
1054 | errorJSON = error.response;
|
1055 | } else if (error.responseText) {
|
1056 | try {
|
1057 | errorJSON = JSON.parse(error.responseText);
|
1058 | } catch (e) {
|
1059 | }
|
1060 | }
|
1061 |
|
1062 | errorJSON.rawMessage = errorJSON.rawMessage || errorJSON.error;
|
1063 |
|
1064 | if (!AV._sharedConfig.keepErrorRawMessage) {
|
1065 | var _context3, _context4;
|
1066 |
|
1067 | errorJSON.error += (0, _concat.default)(_context3 = (0, _concat.default)(_context4 = " [".concat(error.statusCode || 'N/A', " ")).call(_context4, method, " ")).call(_context3, url, "]");
|
1068 | }
|
1069 |
|
1070 |
|
1071 |
|
1072 | var err = new AVError(errorJSON.code, errorJSON.error);
|
1073 | delete errorJSON.error;
|
1074 | throw _.extend(err, errorJSON);
|
1075 | });
|
1076 | });
|
1077 | };
|
1078 |
|
1079 |
|
1080 | var _request = function _request(route, className, objectId, method, data, authOptions, query) {
|
1081 | var path = '';
|
1082 | if (route) path += "/".concat(route);
|
1083 | if (className) path += "/".concat(className);
|
1084 | if (objectId) path += "/".concat(objectId);
|
1085 |
|
1086 | if (data && data._fetchWhenSave) throw new Error('_fetchWhenSave should be in the query');
|
1087 | if (data && data._where) throw new Error('_where should be in the query');
|
1088 |
|
1089 | if (method && method.toLowerCase() === 'get') {
|
1090 | query = extend({}, query, data);
|
1091 | data = null;
|
1092 | }
|
1093 |
|
1094 | return request({
|
1095 | method: method,
|
1096 | path: path,
|
1097 | query: query,
|
1098 | data: data,
|
1099 | authOptions: authOptions
|
1100 | });
|
1101 | };
|
1102 |
|
1103 | AV.request = request;
|
1104 | module.exports = {
|
1105 | _request: _request,
|
1106 | request: request
|
1107 | };
|
1108 |
|
1109 | }),
|
1110 |
|
1111 | (function(module, __webpack_exports__, __webpack_require__) {
|
1112 |
|
1113 | "use strict";
|
1114 | var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(17);
|
1115 | var __WEBPACK_IMPORTED_MODULE_1__setup_js__ = __webpack_require__(5);
|
1116 |
|
1117 |
|
1118 |
|
1119 | var isFunction = Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" ])('Function');
|
1120 |
|
1121 |
|
1122 |
|
1123 | var nodelist = __WEBPACK_IMPORTED_MODULE_1__setup_js__["p" ].document && __WEBPACK_IMPORTED_MODULE_1__setup_js__["p" ].document.childNodes;
|
1124 | if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
|
1125 | isFunction = function(obj) {
|
1126 | return typeof obj == 'function' || false;
|
1127 | };
|
1128 | }
|
1129 |
|
1130 | __webpack_exports__["a"] = (isFunction);
|
1131 |
|
1132 |
|
1133 | }),
|
1134 |
|
1135 | (function(module, __webpack_exports__, __webpack_require__) {
|
1136 |
|
1137 | "use strict";
|
1138 | var __WEBPACK_IMPORTED_MODULE_0__shallowProperty_js__ = __webpack_require__(179);
|
1139 |
|
1140 |
|
1141 |
|
1142 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__shallowProperty_js__["a" ])('length'));
|
1143 |
|
1144 |
|
1145 | }),
|
1146 |
|
1147 | (function(module, exports, __webpack_require__) {
|
1148 |
|
1149 | "use strict";
|
1150 |
|
1151 |
|
1152 | var _interopRequireDefault = __webpack_require__(1);
|
1153 |
|
1154 | var _keys = _interopRequireDefault(__webpack_require__(55));
|
1155 |
|
1156 | var _getPrototypeOf = _interopRequireDefault(__webpack_require__(142));
|
1157 |
|
1158 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
1159 |
|
1160 | var _ = __webpack_require__(2);
|
1161 |
|
1162 |
|
1163 | var isNullOrUndefined = function isNullOrUndefined(x) {
|
1164 | return _.isNull(x) || _.isUndefined(x);
|
1165 | };
|
1166 |
|
1167 | var ensureArray = function ensureArray(target) {
|
1168 | if (_.isArray(target)) {
|
1169 | return target;
|
1170 | }
|
1171 |
|
1172 | if (target === undefined || target === null) {
|
1173 | return [];
|
1174 | }
|
1175 |
|
1176 | return [target];
|
1177 | };
|
1178 |
|
1179 | var transformFetchOptions = function transformFetchOptions() {
|
1180 | var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
1181 | keys = (0, _keys.default)(_ref),
|
1182 | include = _ref.include,
|
1183 | includeACL = _ref.includeACL;
|
1184 |
|
1185 | var fetchOptions = {};
|
1186 |
|
1187 | if (keys) {
|
1188 | fetchOptions.keys = ensureArray(keys).join(',');
|
1189 | }
|
1190 |
|
1191 | if (include) {
|
1192 | fetchOptions.include = ensureArray(include).join(',');
|
1193 | }
|
1194 |
|
1195 | if (includeACL) {
|
1196 | fetchOptions.returnACL = includeACL;
|
1197 | }
|
1198 |
|
1199 | return fetchOptions;
|
1200 | };
|
1201 |
|
1202 | var getSessionToken = function getSessionToken(authOptions) {
|
1203 | if (authOptions.sessionToken) {
|
1204 | return authOptions.sessionToken;
|
1205 | }
|
1206 |
|
1207 | if (authOptions.user && typeof authOptions.user.getSessionToken === 'function') {
|
1208 | return authOptions.user.getSessionToken();
|
1209 | }
|
1210 | };
|
1211 |
|
1212 | var tap = function tap(interceptor) {
|
1213 | return function (value) {
|
1214 | return interceptor(value), value;
|
1215 | };
|
1216 | };
|
1217 |
|
1218 |
|
1219 | var EmptyConstructor = function EmptyConstructor() {};
|
1220 |
|
1221 |
|
1222 |
|
1223 |
|
1224 | var inherits = function inherits(parent, protoProps, staticProps) {
|
1225 | var child;
|
1226 |
|
1227 |
|
1228 |
|
1229 | if (protoProps && protoProps.hasOwnProperty('constructor')) {
|
1230 | child = protoProps.constructor;
|
1231 | } else {
|
1232 |
|
1233 | child = function child() {
|
1234 | parent.apply(this, arguments);
|
1235 | };
|
1236 | }
|
1237 |
|
1238 |
|
1239 | _.extend(child, parent);
|
1240 |
|
1241 |
|
1242 |
|
1243 | EmptyConstructor.prototype = parent.prototype;
|
1244 | child.prototype = new EmptyConstructor();
|
1245 |
|
1246 |
|
1247 | if (protoProps) {
|
1248 | _.extend(child.prototype, protoProps);
|
1249 | }
|
1250 |
|
1251 |
|
1252 | if (staticProps) {
|
1253 | _.extend(child, staticProps);
|
1254 | }
|
1255 |
|
1256 |
|
1257 | child.prototype.constructor = child;
|
1258 |
|
1259 |
|
1260 | child.__super__ = parent.prototype;
|
1261 | return child;
|
1262 | };
|
1263 |
|
1264 | var parseDate = function parseDate(iso8601) {
|
1265 | return new Date(iso8601);
|
1266 | };
|
1267 |
|
1268 | var setValue = function setValue(target, key, value) {
|
1269 |
|
1270 | var segs = key.split('.');
|
1271 | var lastSeg = segs.pop();
|
1272 | var currentTarget = target;
|
1273 | segs.forEach(function (seg) {
|
1274 | if (currentTarget[seg] === undefined) currentTarget[seg] = {};
|
1275 | currentTarget = currentTarget[seg];
|
1276 | });
|
1277 | currentTarget[lastSeg] = value;
|
1278 | return target;
|
1279 | };
|
1280 |
|
1281 | var findValue = function findValue(target, key) {
|
1282 | var segs = key.split('.');
|
1283 | var firstSeg = segs[0];
|
1284 | var lastSeg = segs.pop();
|
1285 | var currentTarget = target;
|
1286 |
|
1287 | for (var i = 0; i < segs.length; i++) {
|
1288 | currentTarget = currentTarget[segs[i]];
|
1289 |
|
1290 | if (currentTarget === undefined) {
|
1291 | return [undefined, undefined, lastSeg];
|
1292 | }
|
1293 | }
|
1294 |
|
1295 | var value = currentTarget[lastSeg];
|
1296 | return [value, currentTarget, lastSeg, firstSeg];
|
1297 | };
|
1298 |
|
1299 | var isPlainObject = function isPlainObject(obj) {
|
1300 | return _.isObject(obj) && (0, _getPrototypeOf.default)(obj) === Object.prototype;
|
1301 | };
|
1302 |
|
1303 | var continueWhile = function continueWhile(predicate, asyncFunction) {
|
1304 | if (predicate()) {
|
1305 | return asyncFunction().then(function () {
|
1306 | return continueWhile(predicate, asyncFunction);
|
1307 | });
|
1308 | }
|
1309 |
|
1310 | return _promise.default.resolve();
|
1311 | };
|
1312 |
|
1313 | module.exports = {
|
1314 | isNullOrUndefined: isNullOrUndefined,
|
1315 | ensureArray: ensureArray,
|
1316 | transformFetchOptions: transformFetchOptions,
|
1317 | getSessionToken: getSessionToken,
|
1318 | tap: tap,
|
1319 | inherits: inherits,
|
1320 | parseDate: parseDate,
|
1321 | setValue: setValue,
|
1322 | findValue: findValue,
|
1323 | isPlainObject: isPlainObject,
|
1324 | continueWhile: continueWhile
|
1325 | };
|
1326 |
|
1327 | }),
|
1328 |
|
1329 | (function(module, exports, __webpack_require__) {
|
1330 |
|
1331 | module.exports = __webpack_require__(362);
|
1332 |
|
1333 | }),
|
1334 |
|
1335 | (function(module, exports, __webpack_require__) {
|
1336 |
|
1337 | var isCallable = __webpack_require__(7);
|
1338 | var tryToString = __webpack_require__(72);
|
1339 |
|
1340 | var $TypeError = TypeError;
|
1341 |
|
1342 |
|
1343 | module.exports = function (argument) {
|
1344 | if (isCallable(argument)) return argument;
|
1345 | throw $TypeError(tryToString(argument) + ' is not a function');
|
1346 | };
|
1347 |
|
1348 |
|
1349 | }),
|
1350 |
|
1351 | (function(module, exports) {
|
1352 |
|
1353 | module.exports = true;
|
1354 |
|
1355 |
|
1356 | }),
|
1357 |
|
1358 | (function(module, exports, __webpack_require__) {
|
1359 |
|
1360 |
|
1361 | var IndexedObject = __webpack_require__(114);
|
1362 | var requireObjectCoercible = __webpack_require__(115);
|
1363 |
|
1364 | module.exports = function (it) {
|
1365 | return IndexedObject(requireObjectCoercible(it));
|
1366 | };
|
1367 |
|
1368 |
|
1369 | }),
|
1370 |
|
1371 | (function(module, exports, __webpack_require__) {
|
1372 |
|
1373 | var requireObjectCoercible = __webpack_require__(115);
|
1374 |
|
1375 | var $Object = Object;
|
1376 |
|
1377 |
|
1378 |
|
1379 | module.exports = function (argument) {
|
1380 | return $Object(requireObjectCoercible(argument));
|
1381 | };
|
1382 |
|
1383 |
|
1384 | }),
|
1385 |
|
1386 | (function(module, exports, __webpack_require__) {
|
1387 |
|
1388 | var DESCRIPTORS = __webpack_require__(16);
|
1389 | var definePropertyModule = __webpack_require__(22);
|
1390 | var createPropertyDescriptor = __webpack_require__(44);
|
1391 |
|
1392 | module.exports = DESCRIPTORS ? function (object, key, value) {
|
1393 | return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
|
1394 | } : function (object, key, value) {
|
1395 | object[key] = value;
|
1396 | return object;
|
1397 | };
|
1398 |
|
1399 |
|
1400 | }),
|
1401 |
|
1402 | (function(module, exports, __webpack_require__) {
|
1403 |
|
1404 | module.exports = __webpack_require__(374);
|
1405 |
|
1406 | }),
|
1407 |
|
1408 | (function(module, exports, __webpack_require__) {
|
1409 |
|
1410 | var bind = __webpack_require__(45);
|
1411 | var call = __webpack_require__(13);
|
1412 | var anObject = __webpack_require__(19);
|
1413 | var tryToString = __webpack_require__(72);
|
1414 | var isArrayIteratorMethod = __webpack_require__(156);
|
1415 | var lengthOfArrayLike = __webpack_require__(46);
|
1416 | var isPrototypeOf = __webpack_require__(21);
|
1417 | var getIterator = __webpack_require__(157);
|
1418 | var getIteratorMethod = __webpack_require__(99);
|
1419 | var iteratorClose = __webpack_require__(158);
|
1420 |
|
1421 | var $TypeError = TypeError;
|
1422 |
|
1423 | var Result = function (stopped, result) {
|
1424 | this.stopped = stopped;
|
1425 | this.result = result;
|
1426 | };
|
1427 |
|
1428 | var ResultPrototype = Result.prototype;
|
1429 |
|
1430 | module.exports = function (iterable, unboundFunction, options) {
|
1431 | var that = options && options.that;
|
1432 | var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
1433 | var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
1434 | var INTERRUPTED = !!(options && options.INTERRUPTED);
|
1435 | var fn = bind(unboundFunction, that);
|
1436 | var iterator, iterFn, index, length, result, next, step;
|
1437 |
|
1438 | var stop = function (condition) {
|
1439 | if (iterator) iteratorClose(iterator, 'normal', condition);
|
1440 | return new Result(true, condition);
|
1441 | };
|
1442 |
|
1443 | var callFn = function (value) {
|
1444 | if (AS_ENTRIES) {
|
1445 | anObject(value);
|
1446 | return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
1447 | } return INTERRUPTED ? fn(value, stop) : fn(value);
|
1448 | };
|
1449 |
|
1450 | if (IS_ITERATOR) {
|
1451 | iterator = iterable;
|
1452 | } else {
|
1453 | iterFn = getIteratorMethod(iterable);
|
1454 | if (!iterFn) throw $TypeError(tryToString(iterable) + ' is not iterable');
|
1455 |
|
1456 | if (isArrayIteratorMethod(iterFn)) {
|
1457 | for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
1458 | result = callFn(iterable[index]);
|
1459 | if (result && isPrototypeOf(ResultPrototype, result)) return result;
|
1460 | } return new Result(false);
|
1461 | }
|
1462 | iterator = getIterator(iterable, iterFn);
|
1463 | }
|
1464 |
|
1465 | next = iterator.next;
|
1466 | while (!(step = call(next, iterator)).done) {
|
1467 | try {
|
1468 | result = callFn(step.value);
|
1469 | } catch (error) {
|
1470 | iteratorClose(iterator, 'throw', error);
|
1471 | }
|
1472 | if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
|
1473 | } return new Result(false);
|
1474 | };
|
1475 |
|
1476 |
|
1477 | }),
|
1478 |
|
1479 | (function(module, exports, __webpack_require__) {
|
1480 |
|
1481 | var NATIVE_WEAK_MAP = __webpack_require__(160);
|
1482 | var global = __webpack_require__(6);
|
1483 | var uncurryThis = __webpack_require__(4);
|
1484 | var isObject = __webpack_require__(11);
|
1485 | var createNonEnumerableProperty = __webpack_require__(35);
|
1486 | var hasOwn = __webpack_require__(14);
|
1487 | var shared = __webpack_require__(117);
|
1488 | var sharedKey = __webpack_require__(94);
|
1489 | var hiddenKeys = __webpack_require__(74);
|
1490 |
|
1491 | var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
1492 | var TypeError = global.TypeError;
|
1493 | var WeakMap = global.WeakMap;
|
1494 | var set, get, has;
|
1495 |
|
1496 | var enforce = function (it) {
|
1497 | return has(it) ? get(it) : set(it, {});
|
1498 | };
|
1499 |
|
1500 | var getterFor = function (TYPE) {
|
1501 | return function (it) {
|
1502 | var state;
|
1503 | if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
1504 | throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
1505 | } return state;
|
1506 | };
|
1507 | };
|
1508 |
|
1509 | if (NATIVE_WEAK_MAP || shared.state) {
|
1510 | var store = shared.state || (shared.state = new WeakMap());
|
1511 | var wmget = uncurryThis(store.get);
|
1512 | var wmhas = uncurryThis(store.has);
|
1513 | var wmset = uncurryThis(store.set);
|
1514 | set = function (it, metadata) {
|
1515 | if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
|
1516 | metadata.facade = it;
|
1517 | wmset(store, it, metadata);
|
1518 | return metadata;
|
1519 | };
|
1520 | get = function (it) {
|
1521 | return wmget(store, it) || {};
|
1522 | };
|
1523 | has = function (it) {
|
1524 | return wmhas(store, it);
|
1525 | };
|
1526 | } else {
|
1527 | var STATE = sharedKey('state');
|
1528 | hiddenKeys[STATE] = true;
|
1529 | set = function (it, metadata) {
|
1530 | if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
|
1531 | metadata.facade = it;
|
1532 | createNonEnumerableProperty(it, STATE, metadata);
|
1533 | return metadata;
|
1534 | };
|
1535 | get = function (it) {
|
1536 | return hasOwn(it, STATE) ? it[STATE] : {};
|
1537 | };
|
1538 | has = function (it) {
|
1539 | return hasOwn(it, STATE);
|
1540 | };
|
1541 | }
|
1542 |
|
1543 | module.exports = {
|
1544 | set: set,
|
1545 | get: get,
|
1546 | has: has,
|
1547 | enforce: enforce,
|
1548 | getterFor: getterFor
|
1549 | };
|
1550 |
|
1551 |
|
1552 | /***/ }),
|
1553 | /* 39 */
|
1554 | /***/ (function(module, exports, __webpack_require__) {
|
1555 |
|
1556 | var createNonEnumerableProperty = __webpack_require__(35);
|
1557 |
|
1558 | module.exports = function (target, key, value, options) {
|
1559 | if (options && options.enumerable) target[key] = value;
|
1560 | else createNonEnumerableProperty(target, key, value);
|
1561 | return target;
|
1562 | };
|
1563 |
|
1564 |
|
1565 | }),
|
1566 |
|
1567 | (function(module, __webpack_exports__, __webpack_require__) {
|
1568 |
|
1569 | "use strict";
|
1570 | __webpack_exports__["a"] = has;
|
1571 | var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(5);
|
1572 |
|
1573 |
|
1574 |
|
1575 | function has(obj, key) {
|
1576 | return obj != null && __WEBPACK_IMPORTED_MODULE_0__setup_js__["i" ].call(obj, key);
|
1577 | }
|
1578 |
|
1579 |
|
1580 | }),
|
1581 |
|
1582 | (function(module, exports, __webpack_require__) {
|
1583 |
|
1584 | var path = __webpack_require__(10);
|
1585 |
|
1586 | module.exports = function (CONSTRUCTOR) {
|
1587 | return path[CONSTRUCTOR + 'Prototype'];
|
1588 | };
|
1589 |
|
1590 |
|
1591 | }),
|
1592 |
|
1593 | (function(module, exports, __webpack_require__) {
|
1594 |
|
1595 | module.exports = __webpack_require__(367);
|
1596 |
|
1597 | }),
|
1598 |
|
1599 | (function(module, exports, __webpack_require__) {
|
1600 |
|
1601 | "use strict";
|
1602 |
|
1603 |
|
1604 | var _interopRequireDefault = __webpack_require__(1);
|
1605 |
|
1606 | var _setPrototypeOf = _interopRequireDefault(__webpack_require__(227));
|
1607 |
|
1608 | var _getPrototypeOf = _interopRequireDefault(__webpack_require__(142));
|
1609 |
|
1610 | var _ = __webpack_require__(2);
|
1611 |
|
1612 |
|
1613 |
|
1614 |
|
1615 |
|
1616 | function AVError(code, message) {
|
1617 | if (this instanceof AVError ? this.constructor : void 0) {
|
1618 | var error = new Error(message);
|
1619 | (0, _setPrototypeOf.default)(error, (0, _getPrototypeOf.default)(this));
|
1620 | error.code = code;
|
1621 | return error;
|
1622 | }
|
1623 |
|
1624 | return new AVError(code, message);
|
1625 | }
|
1626 |
|
1627 | AVError.prototype = Object.create(Error.prototype, {
|
1628 | constructor: {
|
1629 | value: Error,
|
1630 | enumerable: false,
|
1631 | writable: true,
|
1632 | configurable: true
|
1633 | }
|
1634 | });
|
1635 | (0, _setPrototypeOf.default)(AVError, Error);
|
1636 |
|
1637 | _.extend(AVError,
|
1638 |
|
1639 | {
|
1640 | |
1641 |
|
1642 |
|
1643 |
|
1644 | OTHER_CAUSE: -1,
|
1645 |
|
1646 | |
1647 |
|
1648 |
|
1649 |
|
1650 |
|
1651 | INTERNAL_SERVER_ERROR: 1,
|
1652 |
|
1653 | |
1654 |
|
1655 |
|
1656 |
|
1657 | CONNECTION_FAILED: 100,
|
1658 |
|
1659 | |
1660 |
|
1661 |
|
1662 |
|
1663 | OBJECT_NOT_FOUND: 101,
|
1664 |
|
1665 | |
1666 |
|
1667 |
|
1668 |
|
1669 |
|
1670 | INVALID_QUERY: 102,
|
1671 |
|
1672 | |
1673 |
|
1674 |
|
1675 |
|
1676 |
|
1677 |
|
1678 | INVALID_CLASS_NAME: 103,
|
1679 |
|
1680 | |
1681 |
|
1682 |
|
1683 |
|
1684 | MISSING_OBJECT_ID: 104,
|
1685 |
|
1686 | |
1687 |
|
1688 |
|
1689 |
|
1690 |
|
1691 | INVALID_KEY_NAME: 105,
|
1692 |
|
1693 | |
1694 |
|
1695 |
|
1696 |
|
1697 |
|
1698 | INVALID_POINTER: 106,
|
1699 |
|
1700 | |
1701 |
|
1702 |
|
1703 |
|
1704 |
|
1705 |
|
1706 | INVALID_JSON: 107,
|
1707 |
|
1708 | |
1709 |
|
1710 |
|
1711 |
|
1712 |
|
1713 | COMMAND_UNAVAILABLE: 108,
|
1714 |
|
1715 | |
1716 |
|
1717 |
|
1718 |
|
1719 | NOT_INITIALIZED: 109,
|
1720 |
|
1721 | |
1722 |
|
1723 |
|
1724 |
|
1725 | INCORRECT_TYPE: 111,
|
1726 |
|
1727 | |
1728 |
|
1729 |
|
1730 |
|
1731 |
|
1732 |
|
1733 | INVALID_CHANNEL_NAME: 112,
|
1734 |
|
1735 | |
1736 |
|
1737 |
|
1738 |
|
1739 | PUSH_MISCONFIGURED: 115,
|
1740 |
|
1741 | |
1742 |
|
1743 |
|
1744 |
|
1745 | OBJECT_TOO_LARGE: 116,
|
1746 |
|
1747 | |
1748 |
|
1749 |
|
1750 |
|
1751 | OPERATION_FORBIDDEN: 119,
|
1752 |
|
1753 | |
1754 |
|
1755 |
|
1756 |
|
1757 | CACHE_MISS: 120,
|
1758 |
|
1759 | |
1760 |
|
1761 |
|
1762 |
|
1763 |
|
1764 | INVALID_NESTED_KEY: 121,
|
1765 |
|
1766 | |
1767 |
|
1768 |
|
1769 |
|
1770 |
|
1771 |
|
1772 | INVALID_FILE_NAME: 122,
|
1773 |
|
1774 | |
1775 |
|
1776 |
|
1777 |
|
1778 | INVALID_ACL: 123,
|
1779 |
|
1780 | |
1781 |
|
1782 |
|
1783 |
|
1784 |
|
1785 | TIMEOUT: 124,
|
1786 |
|
1787 | |
1788 |
|
1789 |
|
1790 |
|
1791 | INVALID_EMAIL_ADDRESS: 125,
|
1792 |
|
1793 | |
1794 |
|
1795 |
|
1796 |
|
1797 | MISSING_CONTENT_TYPE: 126,
|
1798 |
|
1799 | |
1800 |
|
1801 |
|
1802 |
|
1803 | MISSING_CONTENT_LENGTH: 127,
|
1804 |
|
1805 | |
1806 |
|
1807 |
|
1808 |
|
1809 | INVALID_CONTENT_LENGTH: 128,
|
1810 |
|
1811 | |
1812 |
|
1813 |
|
1814 |
|
1815 | FILE_TOO_LARGE: 129,
|
1816 |
|
1817 | |
1818 |
|
1819 |
|
1820 |
|
1821 | FILE_SAVE_ERROR: 130,
|
1822 |
|
1823 | |
1824 |
|
1825 |
|
1826 |
|
1827 | FILE_DELETE_ERROR: 153,
|
1828 |
|
1829 | |
1830 |
|
1831 |
|
1832 |
|
1833 |
|
1834 | DUPLICATE_VALUE: 137,
|
1835 |
|
1836 | |
1837 |
|
1838 |
|
1839 |
|
1840 | INVALID_ROLE_NAME: 139,
|
1841 |
|
1842 | |
1843 |
|
1844 |
|
1845 |
|
1846 |
|
1847 | EXCEEDED_QUOTA: 140,
|
1848 |
|
1849 | |
1850 |
|
1851 |
|
1852 |
|
1853 | SCRIPT_FAILED: 141,
|
1854 |
|
1855 | |
1856 |
|
1857 |
|
1858 |
|
1859 | VALIDATION_ERROR: 142,
|
1860 |
|
1861 | |
1862 |
|
1863 |
|
1864 |
|
1865 | INVALID_IMAGE_DATA: 150,
|
1866 |
|
1867 | |
1868 |
|
1869 |
|
1870 |
|
1871 | UNSAVED_FILE_ERROR: 151,
|
1872 |
|
1873 | |
1874 |
|
1875 |
|
1876 |
|
1877 | INVALID_PUSH_TIME_ERROR: 152,
|
1878 |
|
1879 | |
1880 |
|
1881 |
|
1882 |
|
1883 | USERNAME_MISSING: 200,
|
1884 |
|
1885 | |
1886 |
|
1887 |
|
1888 |
|
1889 | PASSWORD_MISSING: 201,
|
1890 |
|
1891 | |
1892 |
|
1893 |
|
1894 |
|
1895 | USERNAME_TAKEN: 202,
|
1896 |
|
1897 | |
1898 |
|
1899 |
|
1900 |
|
1901 | EMAIL_TAKEN: 203,
|
1902 |
|
1903 | |
1904 |
|
1905 |
|
1906 |
|
1907 | EMAIL_MISSING: 204,
|
1908 |
|
1909 | |
1910 |
|
1911 |
|
1912 |
|
1913 | EMAIL_NOT_FOUND: 205,
|
1914 |
|
1915 | |
1916 |
|
1917 |
|
1918 |
|
1919 |
|
1920 | SESSION_MISSING: 206,
|
1921 |
|
1922 | |
1923 |
|
1924 |
|
1925 |
|
1926 | MUST_CREATE_USER_THROUGH_SIGNUP: 207,
|
1927 |
|
1928 | |
1929 |
|
1930 |
|
1931 |
|
1932 |
|
1933 | ACCOUNT_ALREADY_LINKED: 208,
|
1934 |
|
1935 | |
1936 |
|
1937 |
|
1938 |
|
1939 |
|
1940 | LINKED_ID_MISSING: 250,
|
1941 |
|
1942 | |
1943 |
|
1944 |
|
1945 |
|
1946 |
|
1947 | INVALID_LINKED_SESSION: 251,
|
1948 |
|
1949 | |
1950 |
|
1951 |
|
1952 |
|
1953 |
|
1954 | UNSUPPORTED_SERVICE: 252,
|
1955 |
|
1956 | |
1957 |
|
1958 |
|
1959 |
|
1960 |
|
1961 |
|
1962 |
|
1963 | X_DOMAIN_REQUEST: 602
|
1964 | });
|
1965 |
|
1966 | module.exports = AVError;
|
1967 |
|
1968 | }),
|
1969 |
|
1970 | (function(module, exports) {
|
1971 |
|
1972 | module.exports = function (bitmap, value) {
|
1973 | return {
|
1974 | enumerable: !(bitmap & 1),
|
1975 | configurable: !(bitmap & 2),
|
1976 | writable: !(bitmap & 4),
|
1977 | value: value
|
1978 | };
|
1979 | };
|
1980 |
|
1981 |
|
1982 | }),
|
1983 |
|
1984 | (function(module, exports, __webpack_require__) {
|
1985 |
|
1986 | var uncurryThis = __webpack_require__(4);
|
1987 | var aCallable = __webpack_require__(31);
|
1988 | var NATIVE_BIND = __webpack_require__(70);
|
1989 |
|
1990 | var bind = uncurryThis(uncurryThis.bind);
|
1991 |
|
1992 |
|
1993 | module.exports = function (fn, that) {
|
1994 | aCallable(fn);
|
1995 | return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
|
1996 | return fn.apply(that, arguments);
|
1997 | };
|
1998 | };
|
1999 |
|
2000 |
|
2001 | }),
|
2002 |
|
2003 | (function(module, exports, __webpack_require__) {
|
2004 |
|
2005 | var toLength = __webpack_require__(263);
|
2006 |
|
2007 |
|
2008 |
|
2009 | module.exports = function (obj) {
|
2010 | return toLength(obj.length);
|
2011 | };
|
2012 |
|
2013 |
|
2014 | }),
|
2015 |
|
2016 | (function(module, exports, __webpack_require__) {
|
2017 |
|
2018 |
|
2019 | var anObject = __webpack_require__(19);
|
2020 | var definePropertiesModule = __webpack_require__(154);
|
2021 | var enumBugKeys = __webpack_require__(121);
|
2022 | var hiddenKeys = __webpack_require__(74);
|
2023 | var html = __webpack_require__(155);
|
2024 | var documentCreateElement = __webpack_require__(118);
|
2025 | var sharedKey = __webpack_require__(94);
|
2026 |
|
2027 | var GT = '>';
|
2028 | var LT = '<';
|
2029 | var PROTOTYPE = 'prototype';
|
2030 | var SCRIPT = 'script';
|
2031 | var IE_PROTO = sharedKey('IE_PROTO');
|
2032 |
|
2033 | var EmptyConstructor = function () { };
|
2034 |
|
2035 | var scriptTag = function (content) {
|
2036 | return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
2037 | };
|
2038 |
|
2039 |
|
2040 | var NullProtoObjectViaActiveX = function (activeXDocument) {
|
2041 | activeXDocument.write(scriptTag(''));
|
2042 | activeXDocument.close();
|
2043 | var temp = activeXDocument.parentWindow.Object;
|
2044 | activeXDocument = null;
|
2045 | return temp;
|
2046 | };
|
2047 |
|
2048 |
|
2049 | var NullProtoObjectViaIFrame = function () {
|
2050 |
|
2051 | var iframe = documentCreateElement('iframe');
|
2052 | var JS = 'java' + SCRIPT + ':';
|
2053 | var iframeDocument;
|
2054 | iframe.style.display = 'none';
|
2055 | html.appendChild(iframe);
|
2056 |
|
2057 | iframe.src = String(JS);
|
2058 | iframeDocument = iframe.contentWindow.document;
|
2059 | iframeDocument.open();
|
2060 | iframeDocument.write(scriptTag('document.F=Object'));
|
2061 | iframeDocument.close();
|
2062 | return iframeDocument.F;
|
2063 | };
|
2064 |
|
2065 |
|
2066 |
|
2067 |
|
2068 |
|
2069 |
|
2070 | var activeXDocument;
|
2071 | var NullProtoObject = function () {
|
2072 | try {
|
2073 | activeXDocument = new ActiveXObject('htmlfile');
|
2074 | } catch (error) { }
|
2075 | NullProtoObject = typeof document != 'undefined'
|
2076 | ? document.domain && activeXDocument
|
2077 | ? NullProtoObjectViaActiveX(activeXDocument)
|
2078 | : NullProtoObjectViaIFrame()
|
2079 | : NullProtoObjectViaActiveX(activeXDocument);
|
2080 | var length = enumBugKeys.length;
|
2081 | while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
2082 | return NullProtoObject();
|
2083 | };
|
2084 |
|
2085 | hiddenKeys[IE_PROTO] = true;
|
2086 |
|
2087 |
|
2088 |
|
2089 |
|
2090 | module.exports = Object.create || function create(O, Properties) {
|
2091 | var result;
|
2092 | if (O !== null) {
|
2093 | EmptyConstructor[PROTOTYPE] = anObject(O);
|
2094 | result = new EmptyConstructor();
|
2095 | EmptyConstructor[PROTOTYPE] = null;
|
2096 |
|
2097 | result[IE_PROTO] = O;
|
2098 | } else result = NullProtoObject();
|
2099 | return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
2100 | };
|
2101 |
|
2102 |
|
2103 | }),
|
2104 |
|
2105 | (function(module, exports, __webpack_require__) {
|
2106 |
|
2107 | "use strict";
|
2108 |
|
2109 | var toIndexedObject = __webpack_require__(33);
|
2110 | var addToUnscopables = __webpack_require__(159);
|
2111 | var Iterators = __webpack_require__(58);
|
2112 | var InternalStateModule = __webpack_require__(38);
|
2113 | var defineProperty = __webpack_require__(22).f;
|
2114 | var defineIterator = __webpack_require__(124);
|
2115 | var IS_PURE = __webpack_require__(32);
|
2116 | var DESCRIPTORS = __webpack_require__(16);
|
2117 |
|
2118 | var ARRAY_ITERATOR = 'Array Iterator';
|
2119 | var setInternalState = InternalStateModule.set;
|
2120 | var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
|
2121 |
|
2122 |
|
2123 |
|
2124 |
|
2125 |
|
2126 |
|
2127 |
|
2128 |
|
2129 |
|
2130 |
|
2131 |
|
2132 | module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
|
2133 | setInternalState(this, {
|
2134 | type: ARRAY_ITERATOR,
|
2135 | target: toIndexedObject(iterated),
|
2136 | index: 0,
|
2137 | kind: kind
|
2138 | });
|
2139 |
|
2140 |
|
2141 | }, function () {
|
2142 | var state = getInternalState(this);
|
2143 | var target = state.target;
|
2144 | var kind = state.kind;
|
2145 | var index = state.index++;
|
2146 | if (!target || index >= target.length) {
|
2147 | state.target = undefined;
|
2148 | return { value: undefined, done: true };
|
2149 | }
|
2150 | if (kind == 'keys') return { value: index, done: false };
|
2151 | if (kind == 'values') return { value: target[index], done: false };
|
2152 | return { value: [index, target[index]], done: false };
|
2153 | }, 'values');
|
2154 |
|
2155 |
|
2156 |
|
2157 |
|
2158 | var values = Iterators.Arguments = Iterators.Array;
|
2159 |
|
2160 |
|
2161 | addToUnscopables('keys');
|
2162 | addToUnscopables('values');
|
2163 | addToUnscopables('entries');
|
2164 |
|
2165 |
|
2166 | if (!IS_PURE && DESCRIPTORS && values.name !== 'values') try {
|
2167 | defineProperty(values, 'name', { value: 'values' });
|
2168 | } catch (error) { }
|
2169 |
|
2170 |
|
2171 | }),
|
2172 |
|
2173 | (function(module, exports, __webpack_require__) {
|
2174 |
|
2175 | var TO_STRING_TAG_SUPPORT = __webpack_require__(122);
|
2176 | var defineProperty = __webpack_require__(22).f;
|
2177 | var createNonEnumerableProperty = __webpack_require__(35);
|
2178 | var hasOwn = __webpack_require__(14);
|
2179 | var toString = __webpack_require__(270);
|
2180 | var wellKnownSymbol = __webpack_require__(9);
|
2181 |
|
2182 | var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
2183 |
|
2184 | module.exports = function (it, TAG, STATIC, SET_METHOD) {
|
2185 | if (it) {
|
2186 | var target = STATIC ? it : it.prototype;
|
2187 | if (!hasOwn(target, TO_STRING_TAG)) {
|
2188 | defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });
|
2189 | }
|
2190 | if (SET_METHOD && !TO_STRING_TAG_SUPPORT) {
|
2191 | createNonEnumerableProperty(target, 'toString', toString);
|
2192 | }
|
2193 | }
|
2194 | };
|
2195 |
|
2196 |
|
2197 | }),
|
2198 |
|
2199 | (function(module, exports, __webpack_require__) {
|
2200 |
|
2201 | "use strict";
|
2202 |
|
2203 | var aCallable = __webpack_require__(31);
|
2204 |
|
2205 | var PromiseCapability = function (C) {
|
2206 | var resolve, reject;
|
2207 | this.promise = new C(function ($$resolve, $$reject) {
|
2208 | if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
|
2209 | resolve = $$resolve;
|
2210 | reject = $$reject;
|
2211 | });
|
2212 | this.resolve = aCallable(resolve);
|
2213 | this.reject = aCallable(reject);
|
2214 | };
|
2215 |
|
2216 |
|
2217 |
|
2218 | module.exports.f = function (C) {
|
2219 | return new PromiseCapability(C);
|
2220 | };
|
2221 |
|
2222 |
|
2223 | }),
|
2224 |
|
2225 | (function(module, exports, __webpack_require__) {
|
2226 |
|
2227 | __webpack_require__(48);
|
2228 | var DOMIterables = __webpack_require__(289);
|
2229 | var global = __webpack_require__(6);
|
2230 | var classof = __webpack_require__(59);
|
2231 | var createNonEnumerableProperty = __webpack_require__(35);
|
2232 | var Iterators = __webpack_require__(58);
|
2233 | var wellKnownSymbol = __webpack_require__(9);
|
2234 |
|
2235 | var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
2236 |
|
2237 | for (var COLLECTION_NAME in DOMIterables) {
|
2238 | var Collection = global[COLLECTION_NAME];
|
2239 | var CollectionPrototype = Collection && Collection.prototype;
|
2240 | if (CollectionPrototype && classof(CollectionPrototype) !== TO_STRING_TAG) {
|
2241 | createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
|
2242 | }
|
2243 | Iterators[COLLECTION_NAME] = Iterators.Array;
|
2244 | }
|
2245 |
|
2246 |
|
2247 | }),
|
2248 |
|
2249 | (function(module, __webpack_exports__, __webpack_require__) {
|
2250 |
|
2251 | "use strict";
|
2252 | __webpack_exports__["a"] = isObject;
|
2253 |
|
2254 | function isObject(obj) {
|
2255 | var type = typeof obj;
|
2256 | return type === 'function' || type === 'object' && !!obj;
|
2257 | }
|
2258 |
|
2259 |
|
2260 | }),
|
2261 |
|
2262 | (function(module, __webpack_exports__, __webpack_require__) {
|
2263 |
|
2264 | "use strict";
|
2265 | var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(5);
|
2266 | var __WEBPACK_IMPORTED_MODULE_1__tagTester_js__ = __webpack_require__(17);
|
2267 |
|
2268 |
|
2269 |
|
2270 |
|
2271 |
|
2272 | __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__setup_js__["k" ] || Object(__WEBPACK_IMPORTED_MODULE_1__tagTester_js__["a" ])('Array'));
|
2273 |
|
2274 |
|
2275 | }),
|
2276 |
|
2277 | (function(module, __webpack_exports__, __webpack_require__) {
|
2278 |
|
2279 | "use strict";
|
2280 | __webpack_exports__["a"] = each;
|
2281 | var __WEBPACK_IMPORTED_MODULE_0__optimizeCb_js__ = __webpack_require__(82);
|
2282 | var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(25);
|
2283 | var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(15);
|
2284 |
|
2285 |
|
2286 |
|
2287 |
|
2288 |
|
2289 |
|
2290 |
|
2291 |
|
2292 | function each(obj, iteratee, context) {
|
2293 | iteratee = Object(__WEBPACK_IMPORTED_MODULE_0__optimizeCb_js__["a" ])(iteratee, context);
|
2294 | var i, length;
|
2295 | if (Object(__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" ])(obj)) {
|
2296 | for (i = 0, length = obj.length; i < length; i++) {
|
2297 | iteratee(obj[i], i, obj);
|
2298 | }
|
2299 | } else {
|
2300 | var _keys = Object(__WEBPACK_IMPORTED_MODULE_2__keys_js__["a" ])(obj);
|
2301 | for (i = 0, length = _keys.length; i < length; i++) {
|
2302 | iteratee(obj[_keys[i]], _keys[i], obj);
|
2303 | }
|
2304 | }
|
2305 | return obj;
|
2306 | }
|
2307 |
|
2308 |
|
2309 | }),
|
2310 |
|
2311 | (function(module, exports, __webpack_require__) {
|
2312 |
|
2313 | module.exports = __webpack_require__(381);
|
2314 |
|
2315 | }),
|
2316 |
|
2317 | (function(module, exports, __webpack_require__) {
|
2318 |
|
2319 | var uncurryThis = __webpack_require__(4);
|
2320 |
|
2321 | var toString = uncurryThis({}.toString);
|
2322 | var stringSlice = uncurryThis(''.slice);
|
2323 |
|
2324 | module.exports = function (it) {
|
2325 | return stringSlice(toString(it), 8, -1);
|
2326 | };
|
2327 |
|
2328 |
|
2329 | }),
|
2330 |
|
2331 | (function(module, exports, __webpack_require__) {
|
2332 |
|
2333 |
|
2334 | var V8_VERSION = __webpack_require__(90);
|
2335 | var fails = __webpack_require__(3);
|
2336 |
|
2337 |
|
2338 | module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
|
2339 | var symbol = Symbol();
|
2340 |
|
2341 |
|
2342 | return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
|
2343 |
|
2344 | !Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
2345 | });
|
2346 |
|
2347 |
|
2348 | }),
|
2349 |
|
2350 | (function(module, exports) {
|
2351 |
|
2352 | module.exports = {};
|
2353 |
|
2354 |
|
2355 | }),
|
2356 |
|
2357 | (function(module, exports, __webpack_require__) {
|
2358 |
|
2359 | var TO_STRING_TAG_SUPPORT = __webpack_require__(122);
|
2360 | var isCallable = __webpack_require__(7);
|
2361 | var classofRaw = __webpack_require__(56);
|
2362 | var wellKnownSymbol = __webpack_require__(9);
|
2363 |
|
2364 | var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
2365 | var $Object = Object;
|
2366 |
|
2367 |
|
2368 | var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
2369 |
|
2370 |
|
2371 | var tryGet = function (it, key) {
|
2372 | try {
|
2373 | return it[key];
|
2374 | } catch (error) { }
|
2375 | };
|
2376 |
|
2377 |
|
2378 | module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
2379 | var O, tag, result;
|
2380 | return it === undefined ? 'Undefined' : it === null ? 'Null'
|
2381 |
|
2382 | : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
|
2383 |
|
2384 | : CORRECT_ARGUMENTS ? classofRaw(O)
|
2385 |
|
2386 | : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
2387 | };
|
2388 |
|
2389 |
|
2390 | }),
|
2391 |
|
2392 | (function(module, exports) {
|
2393 |
|
2394 |
|
2395 |
|
2396 |
|
2397 | }),
|
2398 |
|
2399 | (function(module, exports, __webpack_require__) {
|
2400 |
|
2401 | var global = __webpack_require__(6);
|
2402 |
|
2403 | module.exports = global.Promise;
|
2404 |
|
2405 |
|
2406 | }),
|
2407 |
|
2408 | (function(module, __webpack_exports__, __webpack_require__) {
|
2409 |
|
2410 | "use strict";
|
2411 | __webpack_exports__["a"] = values;
|
2412 | var __WEBPACK_IMPORTED_MODULE_0__keys_js__ = __webpack_require__(15);
|
2413 |
|
2414 |
|
2415 |
|
2416 | function values(obj) {
|
2417 | var _keys = Object(__WEBPACK_IMPORTED_MODULE_0__keys_js__["a" ])(obj);
|
2418 | var length = _keys.length;
|
2419 | var values = Array(length);
|
2420 | for (var i = 0; i < length; i++) {
|
2421 | values[i] = obj[_keys[i]];
|
2422 | }
|
2423 | return values;
|
2424 | }
|
2425 |
|
2426 |
|
2427 | }),
|
2428 |
|
2429 | (function(module, __webpack_exports__, __webpack_require__) {
|
2430 |
|
2431 | "use strict";
|
2432 | __webpack_exports__["a"] = flatten;
|
2433 | var __WEBPACK_IMPORTED_MODULE_0__getLength_js__ = __webpack_require__(28);
|
2434 | var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(25);
|
2435 | var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(53);
|
2436 | var __WEBPACK_IMPORTED_MODULE_3__isArguments_js__ = __webpack_require__(129);
|
2437 |
|
2438 |
|
2439 |
|
2440 |
|
2441 |
|
2442 |
|
2443 | function flatten(input, depth, strict, output) {
|
2444 | output = output || [];
|
2445 | if (!depth && depth !== 0) {
|
2446 | depth = Infinity;
|
2447 | } else if (depth <= 0) {
|
2448 | return output.concat(input);
|
2449 | }
|
2450 | var idx = output.length;
|
2451 | for (var i = 0, length = Object(__WEBPACK_IMPORTED_MODULE_0__getLength_js__["a" ])(input); i < length; i++) {
|
2452 | var value = input[i];
|
2453 | if (Object(__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" ])(value) && (Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" ])(value) || Object(__WEBPACK_IMPORTED_MODULE_3__isArguments_js__["a" ])(value))) {
|
2454 |
|
2455 | if (depth > 1) {
|
2456 | flatten(value, depth - 1, strict, output);
|
2457 | idx = output.length;
|
2458 | } else {
|
2459 | var j = 0, len = value.length;
|
2460 | while (j < len) output[idx++] = value[j++];
|
2461 | }
|
2462 | } else if (!strict) {
|
2463 | output[idx++] = value;
|
2464 | }
|
2465 | }
|
2466 | return output;
|
2467 | }
|
2468 |
|
2469 |
|
2470 | }),
|
2471 |
|
2472 | (function(module, __webpack_exports__, __webpack_require__) {
|
2473 |
|
2474 | "use strict";
|
2475 | __webpack_exports__["a"] = map;
|
2476 | var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(20);
|
2477 | var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(25);
|
2478 | var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(15);
|
2479 |
|
2480 |
|
2481 |
|
2482 |
|
2483 |
|
2484 | function map(obj, iteratee, context) {
|
2485 | iteratee = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" ])(iteratee, context);
|
2486 | var _keys = !Object(__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" ])(obj) && Object(__WEBPACK_IMPORTED_MODULE_2__keys_js__["a" ])(obj),
|
2487 | length = (_keys || obj).length,
|
2488 | results = Array(length);
|
2489 | for (var index = 0; index < length; index++) {
|
2490 | var currentKey = _keys ? _keys[index] : index;
|
2491 | results[index] = iteratee(obj[currentKey], currentKey, obj);
|
2492 | }
|
2493 | return results;
|
2494 | }
|
2495 |
|
2496 |
|
2497 | }),
|
2498 |
|
2499 | (function(module, exports, __webpack_require__) {
|
2500 |
|
2501 | "use strict";
|
2502 | (function(global) {
|
2503 |
|
2504 | var _interopRequireDefault = __webpack_require__(1);
|
2505 |
|
2506 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
2507 |
|
2508 | var _concat = _interopRequireDefault(__webpack_require__(30));
|
2509 |
|
2510 | var _map = _interopRequireDefault(__webpack_require__(42));
|
2511 |
|
2512 | var _keys = _interopRequireDefault(__webpack_require__(141));
|
2513 |
|
2514 | var _stringify = _interopRequireDefault(__webpack_require__(36));
|
2515 |
|
2516 | var _indexOf = _interopRequireDefault(__webpack_require__(86));
|
2517 |
|
2518 | var _keys2 = _interopRequireDefault(__webpack_require__(55));
|
2519 |
|
2520 | var _ = __webpack_require__(2);
|
2521 |
|
2522 | var uuid = __webpack_require__(221);
|
2523 |
|
2524 | var debug = __webpack_require__(67);
|
2525 |
|
2526 | var _require = __webpack_require__(29),
|
2527 | inherits = _require.inherits,
|
2528 | parseDate = _require.parseDate;
|
2529 |
|
2530 | var version = __webpack_require__(223);
|
2531 |
|
2532 | var _require2 = __webpack_require__(68),
|
2533 | setAdapters = _require2.setAdapters,
|
2534 | adapterManager = _require2.adapterManager;
|
2535 |
|
2536 | var AV = global.AV || {};
|
2537 |
|
2538 | AV._config = {
|
2539 | serverURLs: {},
|
2540 | useMasterKey: false,
|
2541 | production: null,
|
2542 | realtime: null,
|
2543 | requestTimeout: null
|
2544 | };
|
2545 | var initialUserAgent = "LeanCloud-JS-SDK/".concat(version);
|
2546 |
|
2547 | AV._sharedConfig = {
|
2548 | userAgent: initialUserAgent,
|
2549 | liveQueryRealtime: null
|
2550 | };
|
2551 | adapterManager.on('platformInfo', function (platformInfo) {
|
2552 | var ua = initialUserAgent;
|
2553 |
|
2554 | if (platformInfo) {
|
2555 | if (platformInfo.userAgent) {
|
2556 | ua = platformInfo.userAgent;
|
2557 | } else {
|
2558 | var comments = platformInfo.name;
|
2559 |
|
2560 | if (platformInfo.version) {
|
2561 | comments += "/".concat(platformInfo.version);
|
2562 | }
|
2563 |
|
2564 | if (platformInfo.extra) {
|
2565 | comments += "; ".concat(platformInfo.extra);
|
2566 | }
|
2567 |
|
2568 | ua += " (".concat(comments, ")");
|
2569 | }
|
2570 | }
|
2571 |
|
2572 | AV._sharedConfig.userAgent = ua;
|
2573 | });
|
2574 |
|
2575 |
|
2576 |
|
2577 |
|
2578 |
|
2579 |
|
2580 |
|
2581 |
|
2582 |
|
2583 |
|
2584 |
|
2585 |
|
2586 |
|
2587 | AV._getAVPath = function (path) {
|
2588 | if (!AV.applicationId) {
|
2589 | throw new Error('You need to call AV.initialize before using AV.');
|
2590 | }
|
2591 |
|
2592 | if (!path) {
|
2593 | path = '';
|
2594 | }
|
2595 |
|
2596 | if (!_.isString(path)) {
|
2597 | throw new Error("Tried to get a localStorage path that wasn't a String.");
|
2598 | }
|
2599 |
|
2600 | if (path[0] === '/') {
|
2601 | path = path.substring(1);
|
2602 | }
|
2603 |
|
2604 | return 'AV/' + AV.applicationId + '/' + path;
|
2605 | };
|
2606 |
|
2607 |
|
2608 |
|
2609 |
|
2610 |
|
2611 |
|
2612 |
|
2613 | AV._installationId = null;
|
2614 |
|
2615 | AV._getInstallationId = function () {
|
2616 |
|
2617 | if (AV._installationId) {
|
2618 | return _promise.default.resolve(AV._installationId);
|
2619 | }
|
2620 |
|
2621 |
|
2622 | var path = AV._getAVPath('installationId');
|
2623 |
|
2624 | return AV.localStorage.getItemAsync(path).then(function (_installationId) {
|
2625 | AV._installationId = _installationId;
|
2626 |
|
2627 | if (!AV._installationId) {
|
2628 |
|
2629 | AV._installationId = _installationId = uuid();
|
2630 | return AV.localStorage.setItemAsync(path, _installationId).then(function () {
|
2631 | return _installationId;
|
2632 | });
|
2633 | }
|
2634 |
|
2635 | return _installationId;
|
2636 | });
|
2637 | };
|
2638 |
|
2639 | AV._subscriptionId = null;
|
2640 |
|
2641 | AV._refreshSubscriptionId = function () {
|
2642 | var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : AV._getAVPath('subscriptionId');
|
2643 | var subscriptionId = AV._subscriptionId = uuid();
|
2644 | return AV.localStorage.setItemAsync(path, subscriptionId).then(function () {
|
2645 | return subscriptionId;
|
2646 | });
|
2647 | };
|
2648 |
|
2649 | AV._getSubscriptionId = function () {
|
2650 |
|
2651 | if (AV._subscriptionId) {
|
2652 | return _promise.default.resolve(AV._subscriptionId);
|
2653 | }
|
2654 |
|
2655 |
|
2656 | var path = AV._getAVPath('subscriptionId');
|
2657 |
|
2658 | return AV.localStorage.getItemAsync(path).then(function (_subscriptionId) {
|
2659 | AV._subscriptionId = _subscriptionId;
|
2660 |
|
2661 | if (!AV._subscriptionId) {
|
2662 |
|
2663 | _subscriptionId = AV._refreshSubscriptionId(path);
|
2664 | }
|
2665 |
|
2666 | return _subscriptionId;
|
2667 | });
|
2668 | };
|
2669 |
|
2670 | AV._parseDate = parseDate;
|
2671 |
|
2672 | AV._extend = function (protoProps, classProps) {
|
2673 | var child = inherits(this, protoProps, classProps);
|
2674 | child.extend = this.extend;
|
2675 | return child;
|
2676 | };
|
2677 |
|
2678 |
|
2679 |
|
2680 |
|
2681 |
|
2682 |
|
2683 |
|
2684 |
|
2685 |
|
2686 |
|
2687 |
|
2688 |
|
2689 | AV._encode = function (value, seenObjects, disallowObjects) {
|
2690 | var full = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
2691 |
|
2692 | if (value instanceof AV.Object) {
|
2693 | if (disallowObjects) {
|
2694 | throw new Error('AV.Objects not allowed here');
|
2695 | }
|
2696 |
|
2697 | if (!seenObjects || _.include(seenObjects, value) || !value._hasData) {
|
2698 | return value._toPointer();
|
2699 | }
|
2700 |
|
2701 | return value._toFullJSON((0, _concat.default)(seenObjects).call(seenObjects, value), full);
|
2702 | }
|
2703 |
|
2704 | if (value instanceof AV.ACL) {
|
2705 | return value.toJSON();
|
2706 | }
|
2707 |
|
2708 | if (_.isDate(value)) {
|
2709 | return full ? {
|
2710 | __type: 'Date',
|
2711 | iso: value.toJSON()
|
2712 | } : value.toJSON();
|
2713 | }
|
2714 |
|
2715 | if (value instanceof AV.GeoPoint) {
|
2716 | return value.toJSON();
|
2717 | }
|
2718 |
|
2719 | if (_.isArray(value)) {
|
2720 | return (0, _map.default)(_).call(_, value, function (x) {
|
2721 | return AV._encode(x, seenObjects, disallowObjects, full);
|
2722 | });
|
2723 | }
|
2724 |
|
2725 | if (_.isRegExp(value)) {
|
2726 | return value.source;
|
2727 | }
|
2728 |
|
2729 | if (value instanceof AV.Relation) {
|
2730 | return value.toJSON();
|
2731 | }
|
2732 |
|
2733 | if (value instanceof AV.Op) {
|
2734 | return value.toJSON();
|
2735 | }
|
2736 |
|
2737 | if (value instanceof AV.File) {
|
2738 | if (!value.url() && !value.id) {
|
2739 | throw new Error('Tried to save an object containing an unsaved file.');
|
2740 | }
|
2741 |
|
2742 | return value._toFullJSON(seenObjects, full);
|
2743 | }
|
2744 |
|
2745 | if (_.isObject(value)) {
|
2746 | return _.mapObject(value, function (v, k) {
|
2747 | return AV._encode(v, seenObjects, disallowObjects, full);
|
2748 | });
|
2749 | }
|
2750 |
|
2751 | return value;
|
2752 | };
|
2753 |
|
2754 |
|
2755 |
|
2756 |
|
2757 |
|
2758 |
|
2759 | AV._decode = function (value, key) {
|
2760 | if (!_.isObject(value) || _.isDate(value)) {
|
2761 | return value;
|
2762 | }
|
2763 |
|
2764 | if (_.isArray(value)) {
|
2765 | return (0, _map.default)(_).call(_, value, function (v) {
|
2766 | return AV._decode(v);
|
2767 | });
|
2768 | }
|
2769 |
|
2770 | if (value instanceof AV.Object) {
|
2771 | return value;
|
2772 | }
|
2773 |
|
2774 | if (value instanceof AV.File) {
|
2775 | return value;
|
2776 | }
|
2777 |
|
2778 | if (value instanceof AV.Op) {
|
2779 | return value;
|
2780 | }
|
2781 |
|
2782 | if (value instanceof AV.GeoPoint) {
|
2783 | return value;
|
2784 | }
|
2785 |
|
2786 | if (value instanceof AV.ACL) {
|
2787 | return value;
|
2788 | }
|
2789 |
|
2790 | if (key === 'ACL') {
|
2791 | return new AV.ACL(value);
|
2792 | }
|
2793 |
|
2794 | if (value.__op) {
|
2795 | return AV.Op._decode(value);
|
2796 | }
|
2797 |
|
2798 | var className;
|
2799 |
|
2800 | if (value.__type === 'Pointer') {
|
2801 | className = value.className;
|
2802 |
|
2803 | var pointer = AV.Object._create(className);
|
2804 |
|
2805 | if ((0, _keys.default)(value).length > 3) {
|
2806 | var v = _.clone(value);
|
2807 |
|
2808 | delete v.__type;
|
2809 | delete v.className;
|
2810 |
|
2811 | pointer._finishFetch(v, true);
|
2812 | } else {
|
2813 | pointer._finishFetch({
|
2814 | objectId: value.objectId
|
2815 | }, false);
|
2816 | }
|
2817 |
|
2818 | return pointer;
|
2819 | }
|
2820 |
|
2821 | if (value.__type === 'Object') {
|
2822 |
|
2823 | className = value.className;
|
2824 |
|
2825 | var _v = _.clone(value);
|
2826 |
|
2827 | delete _v.__type;
|
2828 | delete _v.className;
|
2829 |
|
2830 | var object = AV.Object._create(className);
|
2831 |
|
2832 | object._finishFetch(_v, true);
|
2833 |
|
2834 | return object;
|
2835 | }
|
2836 |
|
2837 | if (value.__type === 'Date') {
|
2838 | return AV._parseDate(value.iso);
|
2839 | }
|
2840 |
|
2841 | if (value.__type === 'GeoPoint') {
|
2842 | return new AV.GeoPoint({
|
2843 | latitude: value.latitude,
|
2844 | longitude: value.longitude
|
2845 | });
|
2846 | }
|
2847 |
|
2848 | if (value.__type === 'Relation') {
|
2849 | if (!key) throw new Error('key missing decoding a Relation');
|
2850 | var relation = new AV.Relation(null, key);
|
2851 | relation.targetClassName = value.className;
|
2852 | return relation;
|
2853 | }
|
2854 |
|
2855 | if (value.__type === 'File') {
|
2856 | var file = new AV.File(value.name);
|
2857 |
|
2858 | var _v2 = _.clone(value);
|
2859 |
|
2860 | delete _v2.__type;
|
2861 |
|
2862 | file._finishFetch(_v2);
|
2863 |
|
2864 | return file;
|
2865 | }
|
2866 |
|
2867 | return _.mapObject(value, AV._decode);
|
2868 | };
|
2869 |
|
2870 |
|
2871 |
|
2872 |
|
2873 |
|
2874 |
|
2875 |
|
2876 |
|
2877 |
|
2878 | AV.parseJSON = AV._decode;
|
2879 |
|
2880 |
|
2881 |
|
2882 |
|
2883 |
|
2884 |
|
2885 |
|
2886 |
|
2887 | AV.parse = function (text) {
|
2888 | return AV.parseJSON(JSON.parse(text));
|
2889 | };
|
2890 |
|
2891 |
|
2892 |
|
2893 |
|
2894 |
|
2895 |
|
2896 |
|
2897 |
|
2898 | AV.stringify = function (target) {
|
2899 | return (0, _stringify.default)(AV._encode(target, [], false, true));
|
2900 | };
|
2901 |
|
2902 | AV._encodeObjectOrArray = function (value) {
|
2903 | var encodeAVObject = function encodeAVObject(object) {
|
2904 | if (object && object._toFullJSON) {
|
2905 | object = object._toFullJSON([]);
|
2906 | }
|
2907 |
|
2908 | return _.mapObject(object, function (value) {
|
2909 | return AV._encode(value, []);
|
2910 | });
|
2911 | };
|
2912 |
|
2913 | if (_.isArray(value)) {
|
2914 | return (0, _map.default)(value).call(value, function (object) {
|
2915 | return encodeAVObject(object);
|
2916 | });
|
2917 | } else {
|
2918 | return encodeAVObject(value);
|
2919 | }
|
2920 | };
|
2921 |
|
2922 | AV._arrayEach = _.each;
|
2923 |
|
2924 |
|
2925 |
|
2926 |
|
2927 |
|
2928 |
|
2929 |
|
2930 |
|
2931 |
|
2932 |
|
2933 | AV._traverse = function (object, func, seen) {
|
2934 | if (object instanceof AV.Object) {
|
2935 | seen = seen || [];
|
2936 |
|
2937 | if ((0, _indexOf.default)(_).call(_, seen, object) >= 0) {
|
2938 |
|
2939 | return;
|
2940 | }
|
2941 |
|
2942 | seen.push(object);
|
2943 |
|
2944 | AV._traverse(object.attributes, func, seen);
|
2945 |
|
2946 | return func(object);
|
2947 | }
|
2948 |
|
2949 | if (object instanceof AV.Relation || object instanceof AV.File) {
|
2950 |
|
2951 |
|
2952 | return func(object);
|
2953 | }
|
2954 |
|
2955 | if (_.isArray(object)) {
|
2956 | _.each(object, function (child, index) {
|
2957 | var newChild = AV._traverse(child, func, seen);
|
2958 |
|
2959 | if (newChild) {
|
2960 | object[index] = newChild;
|
2961 | }
|
2962 | });
|
2963 |
|
2964 | return func(object);
|
2965 | }
|
2966 |
|
2967 | if (_.isObject(object)) {
|
2968 | AV._each(object, function (child, key) {
|
2969 | var newChild = AV._traverse(child, func, seen);
|
2970 |
|
2971 | if (newChild) {
|
2972 | object[key] = newChild;
|
2973 | }
|
2974 | });
|
2975 |
|
2976 | return func(object);
|
2977 | }
|
2978 |
|
2979 | return func(object);
|
2980 | };
|
2981 |
|
2982 |
|
2983 |
|
2984 |
|
2985 |
|
2986 |
|
2987 |
|
2988 |
|
2989 | AV._objectEach = AV._each = function (obj, callback) {
|
2990 | if (_.isObject(obj)) {
|
2991 | _.each((0, _keys2.default)(_).call(_, obj), function (key) {
|
2992 | callback(obj[key], key);
|
2993 | });
|
2994 | } else {
|
2995 | _.each(obj, callback);
|
2996 | }
|
2997 | };
|
2998 |
|
2999 |
|
3000 |
|
3001 |
|
3002 |
|
3003 |
|
3004 | AV.debug = {
|
3005 | |
3006 |
|
3007 |
|
3008 | enable: function enable() {
|
3009 | var namespaces = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'leancloud*';
|
3010 | return debug.enable(namespaces);
|
3011 | },
|
3012 |
|
3013 | |
3014 |
|
3015 |
|
3016 | disable: debug.disable
|
3017 | };
|
3018 |
|
3019 |
|
3020 |
|
3021 |
|
3022 |
|
3023 |
|
3024 |
|
3025 | AV.setAdapters = setAdapters;
|
3026 | module.exports = AV;
|
3027 | }.call(exports, __webpack_require__(112)))
|
3028 |
|
3029 | }),
|
3030 |
|
3031 | (function(module, exports, __webpack_require__) {
|
3032 |
|
3033 | var bind = __webpack_require__(45);
|
3034 | var uncurryThis = __webpack_require__(4);
|
3035 | var IndexedObject = __webpack_require__(114);
|
3036 | var toObject = __webpack_require__(34);
|
3037 | var lengthOfArrayLike = __webpack_require__(46);
|
3038 | var arraySpeciesCreate = __webpack_require__(219);
|
3039 |
|
3040 | var push = uncurryThis([].push);
|
3041 |
|
3042 |
|
3043 | var createMethod = function (TYPE) {
|
3044 | var IS_MAP = TYPE == 1;
|
3045 | var IS_FILTER = TYPE == 2;
|
3046 | var IS_SOME = TYPE == 3;
|
3047 | var IS_EVERY = TYPE == 4;
|
3048 | var IS_FIND_INDEX = TYPE == 6;
|
3049 | var IS_FILTER_REJECT = TYPE == 7;
|
3050 | var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
3051 | return function ($this, callbackfn, that, specificCreate) {
|
3052 | var O = toObject($this);
|
3053 | var self = IndexedObject(O);
|
3054 | var boundFunction = bind(callbackfn, that);
|
3055 | var length = lengthOfArrayLike(self);
|
3056 | var index = 0;
|
3057 | var create = specificCreate || arraySpeciesCreate;
|
3058 | var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
|
3059 | var value, result;
|
3060 | for (;length > index; index++) if (NO_HOLES || index in self) {
|
3061 | value = self[index];
|
3062 | result = boundFunction(value, index, O);
|
3063 | if (TYPE) {
|
3064 | if (IS_MAP) target[index] = result;
|
3065 | else if (result) switch (TYPE) {
|
3066 | case 3: return true;
|
3067 | case 5: return value;
|
3068 | case 6: return index;
|
3069 | case 2: push(target, value);
|
3070 | } else switch (TYPE) {
|
3071 | case 4: return false;
|
3072 | case 7: push(target, value);
|
3073 | }
|
3074 | }
|
3075 | }
|
3076 | return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
3077 | };
|
3078 | };
|
3079 |
|
3080 | module.exports = {
|
3081 |
|
3082 |
|
3083 | forEach: createMethod(0),
|
3084 |
|
3085 |
|
3086 | map: createMethod(1),
|
3087 |
|
3088 |
|
3089 | filter: createMethod(2),
|
3090 |
|
3091 |
|
3092 | some: createMethod(3),
|
3093 |
|
3094 |
|
3095 | every: createMethod(4),
|
3096 |
|
3097 |
|
3098 | find: createMethod(5),
|
3099 |
|
3100 |
|
3101 | findIndex: createMethod(6),
|
3102 |
|
3103 |
|
3104 | filterReject: createMethod(7)
|
3105 | };
|
3106 |
|
3107 |
|
3108 | }),
|
3109 |
|
3110 | (function(module, exports, __webpack_require__) {
|
3111 |
|
3112 | "use strict";
|
3113 |
|
3114 |
|
3115 | function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
3116 |
|
3117 |
|
3118 |
|
3119 |
|
3120 |
|
3121 |
|
3122 | exports.log = log;
|
3123 | exports.formatArgs = formatArgs;
|
3124 | exports.save = save;
|
3125 | exports.load = load;
|
3126 | exports.useColors = useColors;
|
3127 | exports.storage = localstorage();
|
3128 |
|
3129 |
|
3130 |
|
3131 |
|
3132 | exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
|
3133 |
|
3134 |
|
3135 |
|
3136 |
|
3137 |
|
3138 |
|
3139 |
|
3140 |
|
3141 |
|
3142 | function useColors() {
|
3143 |
|
3144 |
|
3145 |
|
3146 | if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
3147 | return true;
|
3148 | }
|
3149 |
|
3150 |
|
3151 | if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
3152 | return false;
|
3153 | }
|
3154 |
|
3155 |
|
3156 |
|
3157 | return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||
|
3158 | typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) ||
|
3159 |
|
3160 | typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||
|
3161 | typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
3162 | }
|
3163 |
|
3164 |
|
3165 |
|
3166 |
|
3167 |
|
3168 |
|
3169 |
|
3170 | function formatArgs(args) {
|
3171 | args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
|
3172 |
|
3173 | if (!this.useColors) {
|
3174 | return;
|
3175 | }
|
3176 |
|
3177 | var c = 'color: ' + this.color;
|
3178 | args.splice(1, 0, c, 'color: inherit');
|
3179 |
|
3180 |
|
3181 |
|
3182 | var index = 0;
|
3183 | var lastC = 0;
|
3184 | args[0].replace(/%[a-zA-Z%]/g, function (match) {
|
3185 | if (match === '%%') {
|
3186 | return;
|
3187 | }
|
3188 |
|
3189 | index++;
|
3190 |
|
3191 | if (match === '%c') {
|
3192 |
|
3193 |
|
3194 | lastC = index;
|
3195 | }
|
3196 | });
|
3197 | args.splice(lastC, 0, c);
|
3198 | }
|
3199 |
|
3200 |
|
3201 |
|
3202 |
|
3203 |
|
3204 |
|
3205 |
|
3206 |
|
3207 | function log() {
|
3208 | var _console;
|
3209 |
|
3210 |
|
3211 |
|
3212 | return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
|
3213 | }
|
3214 |
|
3215 |
|
3216 |
|
3217 |
|
3218 |
|
3219 |
|
3220 |
|
3221 |
|
3222 | function save(namespaces) {
|
3223 | try {
|
3224 | if (namespaces) {
|
3225 | exports.storage.setItem('debug', namespaces);
|
3226 | } else {
|
3227 | exports.storage.removeItem('debug');
|
3228 | }
|
3229 | } catch (error) {
|
3230 |
|
3231 | }
|
3232 | }
|
3233 |
|
3234 |
|
3235 |
|
3236 |
|
3237 |
|
3238 |
|
3239 |
|
3240 |
|
3241 | function load() {
|
3242 | var r;
|
3243 |
|
3244 | try {
|
3245 | r = exports.storage.getItem('debug');
|
3246 | } catch (error) {}
|
3247 |
|
3248 |
|
3249 |
|
3250 |
|
3251 | if (!r && typeof process !== 'undefined' && 'env' in process) {
|
3252 | r = process.env.DEBUG;
|
3253 | }
|
3254 |
|
3255 | return r;
|
3256 | }
|
3257 |
|
3258 |
|
3259 |
|
3260 |
|
3261 |
|
3262 |
|
3263 |
|
3264 |
|
3265 |
|
3266 |
|
3267 |
|
3268 |
|
3269 | function localstorage() {
|
3270 | try {
|
3271 |
|
3272 |
|
3273 | return localStorage;
|
3274 | } catch (error) {
|
3275 |
|
3276 | }
|
3277 | }
|
3278 |
|
3279 | module.exports = __webpack_require__(386)(exports);
|
3280 | var formatters = module.exports.formatters;
|
3281 |
|
3282 |
|
3283 |
|
3284 |
|
3285 | formatters.j = function (v) {
|
3286 | try {
|
3287 | return JSON.stringify(v);
|
3288 | } catch (error) {
|
3289 | return '[UnexpectedJSONParseError]: ' + error.message;
|
3290 | }
|
3291 | };
|
3292 |
|
3293 |
|
3294 |
|
3295 | }),
|
3296 |
|
3297 | (function(module, exports, __webpack_require__) {
|
3298 |
|
3299 | "use strict";
|
3300 |
|
3301 |
|
3302 | var _interopRequireDefault = __webpack_require__(1);
|
3303 |
|
3304 | var _keys = _interopRequireDefault(__webpack_require__(55));
|
3305 |
|
3306 | var _ = __webpack_require__(2);
|
3307 |
|
3308 | var EventEmitter = __webpack_require__(224);
|
3309 |
|
3310 | var _require = __webpack_require__(29),
|
3311 | inherits = _require.inherits;
|
3312 |
|
3313 | var AdapterManager = inherits(EventEmitter, {
|
3314 | constructor: function constructor() {
|
3315 | EventEmitter.apply(this);
|
3316 | this._adapters = {};
|
3317 | },
|
3318 | getAdapter: function getAdapter(name) {
|
3319 | var adapter = this._adapters[name];
|
3320 |
|
3321 | if (adapter === undefined) {
|
3322 | throw new Error("".concat(name, " adapter is not configured"));
|
3323 | }
|
3324 |
|
3325 | return adapter;
|
3326 | },
|
3327 | setAdapters: function setAdapters(newAdapters) {
|
3328 | var _this = this;
|
3329 |
|
3330 | _.extend(this._adapters, newAdapters);
|
3331 |
|
3332 | (0, _keys.default)(_).call(_, newAdapters).forEach(function (name) {
|
3333 | return _this.emit(name, newAdapters[name]);
|
3334 | });
|
3335 | }
|
3336 | });
|
3337 | var adapterManager = new AdapterManager();
|
3338 | module.exports = {
|
3339 | getAdapter: adapterManager.getAdapter.bind(adapterManager),
|
3340 | setAdapters: adapterManager.setAdapters.bind(adapterManager),
|
3341 | adapterManager: adapterManager
|
3342 | };
|
3343 |
|
3344 | }),
|
3345 |
|
3346 | (function(module, exports, __webpack_require__) {
|
3347 |
|
3348 | var NATIVE_BIND = __webpack_require__(70);
|
3349 |
|
3350 | var FunctionPrototype = Function.prototype;
|
3351 | var apply = FunctionPrototype.apply;
|
3352 | var call = FunctionPrototype.call;
|
3353 |
|
3354 |
|
3355 | module.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {
|
3356 | return call.apply(apply, arguments);
|
3357 | });
|
3358 |
|
3359 |
|
3360 | }),
|
3361 |
|
3362 | (function(module, exports, __webpack_require__) {
|
3363 |
|
3364 | var fails = __webpack_require__(3);
|
3365 |
|
3366 | module.exports = !fails(function () {
|
3367 |
|
3368 | var test = (function () { }).bind();
|
3369 |
|
3370 | return typeof test != 'function' || test.hasOwnProperty('prototype');
|
3371 | });
|
3372 |
|
3373 |
|
3374 | }),
|
3375 |
|
3376 | (function(module, exports, __webpack_require__) {
|
3377 |
|
3378 | var DESCRIPTORS = __webpack_require__(16);
|
3379 | var call = __webpack_require__(13);
|
3380 | var propertyIsEnumerableModule = __webpack_require__(113);
|
3381 | var createPropertyDescriptor = __webpack_require__(44);
|
3382 | var toIndexedObject = __webpack_require__(33);
|
3383 | var toPropertyKey = __webpack_require__(88);
|
3384 | var hasOwn = __webpack_require__(14);
|
3385 | var IE8_DOM_DEFINE = __webpack_require__(148);
|
3386 |
|
3387 |
|
3388 | var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
3389 |
|
3390 |
|
3391 |
|
3392 | exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
3393 | O = toIndexedObject(O);
|
3394 | P = toPropertyKey(P);
|
3395 | if (IE8_DOM_DEFINE) try {
|
3396 | return $getOwnPropertyDescriptor(O, P);
|
3397 | } catch (error) { }
|
3398 | if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
|
3399 | };
|
3400 |
|
3401 |
|
3402 | }),
|
3403 |
|
3404 | (function(module, exports) {
|
3405 |
|
3406 | var $String = String;
|
3407 |
|
3408 | module.exports = function (argument) {
|
3409 | try {
|
3410 | return $String(argument);
|
3411 | } catch (error) {
|
3412 | return 'Object';
|
3413 | }
|
3414 | };
|
3415 |
|
3416 |
|
3417 | }),
|
3418 |
|
3419 | (function(module, exports, __webpack_require__) {
|
3420 |
|
3421 | var IS_PURE = __webpack_require__(32);
|
3422 | var store = __webpack_require__(117);
|
3423 |
|
3424 | (module.exports = function (key, value) {
|
3425 | return store[key] || (store[key] = value !== undefined ? value : {});
|
3426 | })('versions', []).push({
|
3427 | version: '3.23.3',
|
3428 | mode: IS_PURE ? 'pure' : 'global',
|
3429 | copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
3430 | license: 'https://github.com/zloirock/core-js/blob/v3.23.3/LICENSE',
|
3431 | source: 'https://github.com/zloirock/core-js'
|
3432 | });
|
3433 |
|
3434 |
|
3435 | }),
|
3436 |
|
3437 | (function(module, exports) {
|
3438 |
|
3439 | module.exports = {};
|
3440 |
|
3441 |
|
3442 | }),
|
3443 |
|
3444 | (function(module, exports, __webpack_require__) {
|
3445 |
|
3446 | var classof = __webpack_require__(59);
|
3447 |
|
3448 | var $String = String;
|
3449 |
|
3450 | module.exports = function (argument) {
|
3451 | if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
3452 | return $String(argument);
|
3453 | };
|
3454 |
|
3455 |
|
3456 | }),
|
3457 |
|
3458 | (function(module, exports) {
|
3459 |
|
3460 | module.exports = function (exec) {
|
3461 | try {
|
3462 | return { error: false, value: exec() };
|
3463 | } catch (error) {
|
3464 | return { error: true, value: error };
|
3465 | }
|
3466 | };
|
3467 |
|
3468 |
|
3469 | }),
|
3470 |
|
3471 | (function(module, exports, __webpack_require__) {
|
3472 |
|
3473 | var global = __webpack_require__(6);
|
3474 | var NativePromiseConstructor = __webpack_require__(61);
|
3475 | var isCallable = __webpack_require__(7);
|
3476 | var isForced = __webpack_require__(149);
|
3477 | var inspectSource = __webpack_require__(123);
|
3478 | var wellKnownSymbol = __webpack_require__(9);
|
3479 | var IS_BROWSER = __webpack_require__(279);
|
3480 | var IS_PURE = __webpack_require__(32);
|
3481 | var V8_VERSION = __webpack_require__(90);
|
3482 |
|
3483 | var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
|
3484 | var SPECIES = wellKnownSymbol('species');
|
3485 | var SUBCLASSING = false;
|
3486 | var NATIVE_PROMISE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent);
|
3487 |
|
3488 | var FORCED_PROMISE_CONSTRUCTOR = isForced('Promise', function () {
|
3489 | var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor);
|
3490 | var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor);
|
3491 |
|
3492 |
|
3493 |
|
3494 | if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
|
3495 |
|
3496 | if (IS_PURE && !(NativePromisePrototype['catch'] && NativePromisePrototype['finally'])) return true;
|
3497 |
|
3498 |
|
3499 |
|
3500 | if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;
|
3501 |
|
3502 | var promise = new NativePromiseConstructor(function (resolve) { resolve(1); });
|
3503 | var FakePromise = function (exec) {
|
3504 | exec(function () { }, function () { });
|
3505 | };
|
3506 | var constructor = promise.constructor = {};
|
3507 | constructor[SPECIES] = FakePromise;
|
3508 | SUBCLASSING = promise.then(function () { }) instanceof FakePromise;
|
3509 | if (!SUBCLASSING) return true;
|
3510 |
|
3511 | return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_PROMISE_REJECTION_EVENT;
|
3512 | });
|
3513 |
|
3514 | module.exports = {
|
3515 | CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR,
|
3516 | REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT,
|
3517 | SUBCLASSING: SUBCLASSING
|
3518 | };
|
3519 |
|
3520 |
|
3521 | }),
|
3522 |
|
3523 | (function(module, exports, __webpack_require__) {
|
3524 |
|
3525 | "use strict";
|
3526 |
|
3527 | var charAt = __webpack_require__(288).charAt;
|
3528 | var toString = __webpack_require__(75);
|
3529 | var InternalStateModule = __webpack_require__(38);
|
3530 | var defineIterator = __webpack_require__(124);
|
3531 |
|
3532 | var STRING_ITERATOR = 'String Iterator';
|
3533 | var setInternalState = InternalStateModule.set;
|
3534 | var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
|
3535 |
|
3536 |
|
3537 |
|
3538 | defineIterator(String, 'String', function (iterated) {
|
3539 | setInternalState(this, {
|
3540 | type: STRING_ITERATOR,
|
3541 | string: toString(iterated),
|
3542 | index: 0
|
3543 | });
|
3544 |
|
3545 |
|
3546 | }, function next() {
|
3547 | var state = getInternalState(this);
|
3548 | var string = state.string;
|
3549 | var index = state.index;
|
3550 | var point;
|
3551 | if (index >= string.length) return { value: undefined, done: true };
|
3552 | point = charAt(string, index);
|
3553 | state.index += point.length;
|
3554 | return { value: point, done: false };
|
3555 | });
|
3556 |
|
3557 |
|
3558 | }),
|
3559 |
|
3560 | (function(module, __webpack_exports__, __webpack_require__) {
|
3561 |
|
3562 | "use strict";
|
3563 | __webpack_require__.d(__webpack_exports__, "a", function() { return hasStringTagBug; });
|
3564 | __webpack_require__.d(__webpack_exports__, "b", function() { return isIE11; });
|
3565 | var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(5);
|
3566 | var __WEBPACK_IMPORTED_MODULE_1__hasObjectTag_js__ = __webpack_require__(296);
|
3567 |
|
3568 |
|
3569 |
|
3570 |
|
3571 |
|
3572 |
|
3573 | var hasStringTagBug = (
|
3574 | __WEBPACK_IMPORTED_MODULE_0__setup_js__["s" ] && Object(__WEBPACK_IMPORTED_MODULE_1__hasObjectTag_js__["a" ])(new DataView(new ArrayBuffer(8)))
|
3575 | ),
|
3576 | isIE11 = (typeof Map !== 'undefined' && Object(__WEBPACK_IMPORTED_MODULE_1__hasObjectTag_js__["a" ])(new Map));
|
3577 |
|
3578 |
|
3579 | }),
|
3580 |
|
3581 | (function(module, __webpack_exports__, __webpack_require__) {
|
3582 |
|
3583 | "use strict";
|
3584 | __webpack_exports__["a"] = allKeys;
|
3585 | var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(52);
|
3586 | var __WEBPACK_IMPORTED_MODULE_1__setup_js__ = __webpack_require__(5);
|
3587 | var __WEBPACK_IMPORTED_MODULE_2__collectNonEnumProps_js__ = __webpack_require__(180);
|
3588 |
|
3589 |
|
3590 |
|
3591 |
|
3592 |
|
3593 | function allKeys(obj) {
|
3594 | if (!Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" ])(obj)) return [];
|
3595 | var keys = [];
|
3596 | for (var key in obj) keys.push(key);
|
3597 |
|
3598 | if (__WEBPACK_IMPORTED_MODULE_1__setup_js__["h" ]) Object(__WEBPACK_IMPORTED_MODULE_2__collectNonEnumProps_js__["a" ])(obj, keys);
|
3599 | return keys;
|
3600 | }
|
3601 |
|
3602 |
|
3603 | }),
|
3604 |
|
3605 | (function(module, __webpack_exports__, __webpack_require__) {
|
3606 |
|
3607 | "use strict";
|
3608 | __webpack_exports__["a"] = toPath;
|
3609 | var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(24);
|
3610 | var __WEBPACK_IMPORTED_MODULE_1__toPath_js__ = __webpack_require__(189);
|
3611 |
|
3612 |
|
3613 |
|
3614 |
|
3615 |
|
3616 | function toPath(path) {
|
3617 | return __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" ].toPath(path);
|
3618 | }
|
3619 |
|
3620 |
|
3621 | }),
|
3622 |
|
3623 | (function(module, __webpack_exports__, __webpack_require__) {
|
3624 |
|
3625 | "use strict";
|
3626 | __webpack_exports__["a"] = optimizeCb;
|
3627 |
|
3628 |
|
3629 |
|
3630 | function optimizeCb(func, context, argCount) {
|
3631 | if (context === void 0) return func;
|
3632 | switch (argCount == null ? 3 : argCount) {
|
3633 | case 1: return function(value) {
|
3634 | return func.call(context, value);
|
3635 | };
|
3636 |
|
3637 | case 3: return function(value, index, collection) {
|
3638 | return func.call(context, value, index, collection);
|
3639 | };
|
3640 | case 4: return function(accumulator, value, index, collection) {
|
3641 | return func.call(context, accumulator, value, index, collection);
|
3642 | };
|
3643 | }
|
3644 | return function() {
|
3645 | return func.apply(context, arguments);
|
3646 | };
|
3647 | }
|
3648 |
|
3649 |
|
3650 | }),
|
3651 |
|
3652 | (function(module, __webpack_exports__, __webpack_require__) {
|
3653 |
|
3654 | "use strict";
|
3655 | __webpack_exports__["a"] = filter;
|
3656 | var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(20);
|
3657 | var __WEBPACK_IMPORTED_MODULE_1__each_js__ = __webpack_require__(54);
|
3658 |
|
3659 |
|
3660 |
|
3661 |
|
3662 | function filter(obj, predicate, context) {
|
3663 | var results = [];
|
3664 | predicate = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" ])(predicate, context);
|
3665 | Object(__WEBPACK_IMPORTED_MODULE_1__each_js__["a" ])(obj, function(value, index, list) {
|
3666 | if (predicate(value, index, list)) results.push(value);
|
3667 | });
|
3668 | return results;
|
3669 | }
|
3670 |
|
3671 |
|
3672 | }),
|
3673 |
|
3674 | (function(module, __webpack_exports__, __webpack_require__) {
|
3675 |
|
3676 | "use strict";
|
3677 | __webpack_exports__["a"] = contains;
|
3678 | var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(25);
|
3679 | var __WEBPACK_IMPORTED_MODULE_1__values_js__ = __webpack_require__(62);
|
3680 | var __WEBPACK_IMPORTED_MODULE_2__indexOf_js__ = __webpack_require__(205);
|
3681 |
|
3682 |
|
3683 |
|
3684 |
|
3685 |
|
3686 | function contains(obj, item, fromIndex, guard) {
|
3687 | if (!Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" ])(obj)) obj = Object(__WEBPACK_IMPORTED_MODULE_1__values_js__["a" ])(obj);
|
3688 | if (typeof fromIndex != 'number' || guard) fromIndex = 0;
|
3689 | return Object(__WEBPACK_IMPORTED_MODULE_2__indexOf_js__["a" ])(obj, item, fromIndex) >= 0;
|
3690 | }
|
3691 |
|
3692 |
|
3693 | }),
|
3694 |
|
3695 | (function(module, exports, __webpack_require__) {
|
3696 |
|
3697 | var classof = __webpack_require__(56);
|
3698 |
|
3699 |
|
3700 |
|
3701 |
|
3702 | module.exports = Array.isArray || function isArray(argument) {
|
3703 | return classof(argument) == 'Array';
|
3704 | };
|
3705 |
|
3706 |
|
3707 | }),
|
3708 |
|
3709 | (function(module, exports, __webpack_require__) {
|
3710 |
|
3711 | module.exports = __webpack_require__(376);
|
3712 |
|
3713 | }),
|
3714 |
|
3715 | (function(module, exports, __webpack_require__) {
|
3716 |
|
3717 | module.exports = __webpack_require__(229);
|
3718 |
|
3719 | }),
|
3720 |
|
3721 | (function(module, exports, __webpack_require__) {
|
3722 |
|
3723 | var toPrimitive = __webpack_require__(256);
|
3724 | var isSymbol = __webpack_require__(89);
|
3725 |
|
3726 |
|
3727 |
|
3728 | module.exports = function (argument) {
|
3729 | var key = toPrimitive(argument, 'string');
|
3730 | return isSymbol(key) ? key : key + '';
|
3731 | };
|
3732 |
|
3733 |
|
3734 | }),
|
3735 |
|
3736 | (function(module, exports, __webpack_require__) {
|
3737 |
|
3738 | var getBuiltIn = __webpack_require__(18);
|
3739 | var isCallable = __webpack_require__(7);
|
3740 | var isPrototypeOf = __webpack_require__(21);
|
3741 | var USE_SYMBOL_AS_UID = __webpack_require__(147);
|
3742 |
|
3743 | var $Object = Object;
|
3744 |
|
3745 | module.exports = USE_SYMBOL_AS_UID ? function (it) {
|
3746 | return typeof it == 'symbol';
|
3747 | } : function (it) {
|
3748 | var $Symbol = getBuiltIn('Symbol');
|
3749 | return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
|
3750 | };
|
3751 |
|
3752 |
|
3753 | }),
|
3754 |
|
3755 | (function(module, exports, __webpack_require__) {
|
3756 |
|
3757 | var global = __webpack_require__(6);
|
3758 | var userAgent = __webpack_require__(91);
|
3759 |
|
3760 | var process = global.process;
|
3761 | var Deno = global.Deno;
|
3762 | var versions = process && process.versions || Deno && Deno.version;
|
3763 | var v8 = versions && versions.v8;
|
3764 | var match, version;
|
3765 |
|
3766 | if (v8) {
|
3767 | match = v8.split('.');
|
3768 |
|
3769 |
|
3770 | version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
3771 | }
|
3772 |
|
3773 |
|
3774 |
|
3775 | if (!version && userAgent) {
|
3776 | match = userAgent.match(/Edge\/(\d+)/);
|
3777 | if (!match || match[1] >= 74) {
|
3778 | match = userAgent.match(/Chrome\/(\d+)/);
|
3779 | if (match) version = +match[1];
|
3780 | }
|
3781 | }
|
3782 |
|
3783 | module.exports = version;
|
3784 |
|
3785 |
|
3786 | }),
|
3787 |
|
3788 | (function(module, exports, __webpack_require__) {
|
3789 |
|
3790 | var getBuiltIn = __webpack_require__(18);
|
3791 |
|
3792 | module.exports = getBuiltIn('navigator', 'userAgent') || '';
|
3793 |
|
3794 |
|
3795 | }),
|
3796 |
|
3797 | (function(module, exports, __webpack_require__) {
|
3798 |
|
3799 | var uncurryThis = __webpack_require__(4);
|
3800 |
|
3801 | var id = 0;
|
3802 | var postfix = Math.random();
|
3803 | var toString = uncurryThis(1.0.toString);
|
3804 |
|
3805 | module.exports = function (key) {
|
3806 | return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
3807 | };
|
3808 |
|
3809 |
|
3810 | }),
|
3811 |
|
3812 | (function(module, exports, __webpack_require__) {
|
3813 |
|
3814 | var hasOwn = __webpack_require__(14);
|
3815 | var isCallable = __webpack_require__(7);
|
3816 | var toObject = __webpack_require__(34);
|
3817 | var sharedKey = __webpack_require__(94);
|
3818 | var CORRECT_PROTOTYPE_GETTER = __webpack_require__(151);
|
3819 |
|
3820 | var IE_PROTO = sharedKey('IE_PROTO');
|
3821 | var $Object = Object;
|
3822 | var ObjectPrototype = $Object.prototype;
|
3823 |
|
3824 |
|
3825 |
|
3826 |
|
3827 | module.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
|
3828 | var object = toObject(O);
|
3829 | if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
|
3830 | var constructor = object.constructor;
|
3831 | if (isCallable(constructor) && object instanceof constructor) {
|
3832 | return constructor.prototype;
|
3833 | } return object instanceof $Object ? ObjectPrototype : null;
|
3834 | };
|
3835 |
|
3836 |
|
3837 | /***/ }),
|
3838 | /* 94 */
|
3839 | /***/ (function(module, exports, __webpack_require__) {
|
3840 |
|
3841 | var shared = __webpack_require__(73);
|
3842 | var uid = __webpack_require__(92);
|
3843 |
|
3844 | var keys = shared('keys');
|
3845 |
|
3846 | module.exports = function (key) {
|
3847 | return keys[key] || (keys[key] = uid(key));
|
3848 | };
|
3849 |
|
3850 |
|
3851 | }),
|
3852 |
|
3853 | (function(module, exports, __webpack_require__) {
|
3854 |
|
3855 |
|
3856 | var uncurryThis = __webpack_require__(4);
|
3857 | var anObject = __webpack_require__(19);
|
3858 | var aPossiblePrototype = __webpack_require__(259);
|
3859 |
|
3860 |
|
3861 |
|
3862 |
|
3863 |
|
3864 | module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
3865 | var CORRECT_SETTER = false;
|
3866 | var test = {};
|
3867 | var setter;
|
3868 | try {
|
3869 |
|
3870 | setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
3871 | setter(test, []);
|
3872 | CORRECT_SETTER = test instanceof Array;
|
3873 | } catch (error) { }
|
3874 | return function setPrototypeOf(O, proto) {
|
3875 | anObject(O);
|
3876 | aPossiblePrototype(proto);
|
3877 | if (CORRECT_SETTER) setter(O, proto);
|
3878 | else O.__proto__ = proto;
|
3879 | return O;
|
3880 | };
|
3881 | }() : undefined);
|
3882 |
|
3883 |
|
3884 | }),
|
3885 |
|
3886 | (function(module, exports, __webpack_require__) {
|
3887 |
|
3888 | var internalObjectKeys = __webpack_require__(152);
|
3889 | var enumBugKeys = __webpack_require__(121);
|
3890 |
|
3891 | var hiddenKeys = enumBugKeys.concat('length', 'prototype');
|
3892 |
|
3893 |
|
3894 |
|
3895 |
|
3896 | exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
3897 | return internalObjectKeys(O, hiddenKeys);
|
3898 | };
|
3899 |
|
3900 |
|
3901 | }),
|
3902 |
|
3903 | (function(module, exports) {
|
3904 |
|
3905 |
|
3906 | exports.f = Object.getOwnPropertySymbols;
|
3907 |
|
3908 |
|
3909 | }),
|
3910 |
|
3911 | (function(module, exports, __webpack_require__) {
|
3912 |
|
3913 | var internalObjectKeys = __webpack_require__(152);
|
3914 | var enumBugKeys = __webpack_require__(121);
|
3915 |
|
3916 |
|
3917 |
|
3918 |
|
3919 | module.exports = Object.keys || function keys(O) {
|
3920 | return internalObjectKeys(O, enumBugKeys);
|
3921 | };
|
3922 |
|
3923 |
|
3924 | }),
|
3925 |
|
3926 | (function(module, exports, __webpack_require__) {
|
3927 |
|
3928 | var classof = __webpack_require__(59);
|
3929 | var getMethod = __webpack_require__(116);
|
3930 | var Iterators = __webpack_require__(58);
|
3931 | var wellKnownSymbol = __webpack_require__(9);
|
3932 |
|
3933 | var ITERATOR = wellKnownSymbol('iterator');
|
3934 |
|
3935 | module.exports = function (it) {
|
3936 | if (it != undefined) return getMethod(it, ITERATOR)
|
3937 | || getMethod(it, '@@iterator')
|
3938 | || Iterators[classof(it)];
|
3939 | };
|
3940 |
|
3941 |
|
3942 | }),
|
3943 |
|
3944 | (function(module, exports, __webpack_require__) {
|
3945 |
|
3946 | var isPrototypeOf = __webpack_require__(21);
|
3947 |
|
3948 | var $TypeError = TypeError;
|
3949 |
|
3950 | module.exports = function (it, Prototype) {
|
3951 | if (isPrototypeOf(Prototype, it)) return it;
|
3952 | throw $TypeError('Incorrect invocation');
|
3953 | };
|
3954 |
|
3955 |
|
3956 | }),
|
3957 |
|
3958 | (function(module, exports, __webpack_require__) {
|
3959 |
|
3960 | var uncurryThis = __webpack_require__(4);
|
3961 | var fails = __webpack_require__(3);
|
3962 | var isCallable = __webpack_require__(7);
|
3963 | var classof = __webpack_require__(59);
|
3964 | var getBuiltIn = __webpack_require__(18);
|
3965 | var inspectSource = __webpack_require__(123);
|
3966 |
|
3967 | var noop = function () { };
|
3968 | var empty = [];
|
3969 | var construct = getBuiltIn('Reflect', 'construct');
|
3970 | var constructorRegExp = /^\s*(?:class|function)\b/;
|
3971 | var exec = uncurryThis(constructorRegExp.exec);
|
3972 | var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
3973 |
|
3974 | var isConstructorModern = function isConstructor(argument) {
|
3975 | if (!isCallable(argument)) return false;
|
3976 | try {
|
3977 | construct(noop, empty, argument);
|
3978 | return true;
|
3979 | } catch (error) {
|
3980 | return false;
|
3981 | }
|
3982 | };
|
3983 |
|
3984 | var isConstructorLegacy = function isConstructor(argument) {
|
3985 | if (!isCallable(argument)) return false;
|
3986 | switch (classof(argument)) {
|
3987 | case 'AsyncFunction':
|
3988 | case 'GeneratorFunction':
|
3989 | case 'AsyncGeneratorFunction': return false;
|
3990 | }
|
3991 | try {
|
3992 |
|
3993 |
|
3994 |
|
3995 | return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
|
3996 | } catch (error) {
|
3997 | return true;
|
3998 | }
|
3999 | };
|
4000 |
|
4001 | isConstructorLegacy.sham = true;
|
4002 |
|
4003 |
|
4004 |
|
4005 | module.exports = !construct || fails(function () {
|
4006 | var called;
|
4007 | return isConstructorModern(isConstructorModern.call)
|
4008 | || !isConstructorModern(Object)
|
4009 | || !isConstructorModern(function () { called = true; })
|
4010 | || called;
|
4011 | }) ? isConstructorLegacy : isConstructorModern;
|
4012 |
|
4013 |
|
4014 | }),
|
4015 |
|
4016 | (function(module, exports, __webpack_require__) {
|
4017 |
|
4018 | var uncurryThis = __webpack_require__(4);
|
4019 |
|
4020 | module.exports = uncurryThis([].slice);
|
4021 |
|
4022 |
|
4023 | }),
|
4024 |
|
4025 | (function(module, __webpack_exports__, __webpack_require__) {
|
4026 |
|
4027 | "use strict";
|
4028 | __webpack_exports__["a"] = matcher;
|
4029 | var __WEBPACK_IMPORTED_MODULE_0__extendOwn_js__ = __webpack_require__(133);
|
4030 | var __WEBPACK_IMPORTED_MODULE_1__isMatch_js__ = __webpack_require__(181);
|
4031 |
|
4032 |
|
4033 |
|
4034 |
|
4035 |
|
4036 | function matcher(attrs) {
|
4037 | attrs = Object(__WEBPACK_IMPORTED_MODULE_0__extendOwn_js__["a" ])({}, attrs);
|
4038 | return function(obj) {
|
4039 | return Object(__WEBPACK_IMPORTED_MODULE_1__isMatch_js__["a" ])(obj, attrs);
|
4040 | };
|
4041 | }
|
4042 |
|
4043 |
|
4044 | }),
|
4045 |
|
4046 | (function(module, __webpack_exports__, __webpack_require__) {
|
4047 |
|
4048 | "use strict";
|
4049 | var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(23);
|
4050 | var __WEBPACK_IMPORTED_MODULE_1__executeBound_js__ = __webpack_require__(197);
|
4051 | var __WEBPACK_IMPORTED_MODULE_2__underscore_js__ = __webpack_require__(24);
|
4052 |
|
4053 |
|
4054 |
|
4055 |
|
4056 |
|
4057 |
|
4058 |
|
4059 |
|
4060 | var partial = Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" ])(function(func, boundArgs) {
|
4061 | var placeholder = partial.placeholder;
|
4062 | var bound = function() {
|
4063 | var position = 0, length = boundArgs.length;
|
4064 | var args = Array(length);
|
4065 | for (var i = 0; i < length; i++) {
|
4066 | args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
|
4067 | }
|
4068 | while (position < arguments.length) args.push(arguments[position++]);
|
4069 | return Object(__WEBPACK_IMPORTED_MODULE_1__executeBound_js__["a" ])(func, bound, this, this, args);
|
4070 | };
|
4071 | return bound;
|
4072 | });
|
4073 |
|
4074 | partial.placeholder = __WEBPACK_IMPORTED_MODULE_2__underscore_js__["a" ];
|
4075 | __webpack_exports__["a"] = (partial);
|
4076 |
|
4077 |
|
4078 | }),
|
4079 |
|
4080 | (function(module, __webpack_exports__, __webpack_require__) {
|
4081 |
|
4082 | "use strict";
|
4083 | __webpack_exports__["a"] = group;
|
4084 | var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(20);
|
4085 | var __WEBPACK_IMPORTED_MODULE_1__each_js__ = __webpack_require__(54);
|
4086 |
|
4087 |
|
4088 |
|
4089 |
|
4090 | function group(behavior, partition) {
|
4091 | return function(obj, iteratee, context) {
|
4092 | var result = partition ? [[], []] : {};
|
4093 | iteratee = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" ])(iteratee, context);
|
4094 | Object(__WEBPACK_IMPORTED_MODULE_1__each_js__["a" ])(obj, function(value, index) {
|
4095 | var key = iteratee(value, index, obj);
|
4096 | behavior(result, value, key);
|
4097 | });
|
4098 | return result;
|
4099 | };
|
4100 | }
|
4101 |
|
4102 |
|
4103 | }),
|
4104 |
|
4105 | (function(module, exports, __webpack_require__) {
|
4106 |
|
4107 | "use strict";
|
4108 |
|
4109 | var toPropertyKey = __webpack_require__(88);
|
4110 | var definePropertyModule = __webpack_require__(22);
|
4111 | var createPropertyDescriptor = __webpack_require__(44);
|
4112 |
|
4113 | module.exports = function (object, key, value) {
|
4114 | var propertyKey = toPropertyKey(key);
|
4115 | if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
|
4116 | else object[propertyKey] = value;
|
4117 | };
|
4118 |
|
4119 |
|
4120 | }),
|
4121 |
|
4122 | (function(module, exports, __webpack_require__) {
|
4123 |
|
4124 | var fails = __webpack_require__(3);
|
4125 | var wellKnownSymbol = __webpack_require__(9);
|
4126 | var V8_VERSION = __webpack_require__(90);
|
4127 |
|
4128 | var SPECIES = wellKnownSymbol('species');
|
4129 |
|
4130 | module.exports = function (METHOD_NAME) {
|
4131 |
|
4132 |
|
4133 |
|
4134 | return V8_VERSION >= 51 || !fails(function () {
|
4135 | var array = [];
|
4136 | var constructor = array.constructor = {};
|
4137 | constructor[SPECIES] = function () {
|
4138 | return { foo: 1 };
|
4139 | };
|
4140 | return array[METHOD_NAME](Boolean).foo !== 1;
|
4141 | });
|
4142 | };
|
4143 |
|
4144 |
|
4145 | }),
|
4146 |
|
4147 | (function(module, exports, __webpack_require__) {
|
4148 |
|
4149 | "use strict";
|
4150 |
|
4151 |
|
4152 | var _interopRequireDefault = __webpack_require__(1);
|
4153 |
|
4154 | var _typeof2 = _interopRequireDefault(__webpack_require__(109));
|
4155 |
|
4156 | var _filter = _interopRequireDefault(__webpack_require__(437));
|
4157 |
|
4158 | var _map = _interopRequireDefault(__webpack_require__(42));
|
4159 |
|
4160 | var _keys = _interopRequireDefault(__webpack_require__(141));
|
4161 |
|
4162 | var _stringify = _interopRequireDefault(__webpack_require__(36));
|
4163 |
|
4164 | var _concat = _interopRequireDefault(__webpack_require__(30));
|
4165 |
|
4166 | var _ = __webpack_require__(2);
|
4167 |
|
4168 | var _require = __webpack_require__(442),
|
4169 | timeout = _require.timeout;
|
4170 |
|
4171 | var debug = __webpack_require__(67);
|
4172 |
|
4173 | var debugRequest = debug('leancloud:request');
|
4174 | var debugRequestError = debug('leancloud:request:error');
|
4175 |
|
4176 | var _require2 = __webpack_require__(68),
|
4177 | getAdapter = _require2.getAdapter;
|
4178 |
|
4179 | var requestsCount = 0;
|
4180 |
|
4181 | var ajax = function ajax(_ref) {
|
4182 | var method = _ref.method,
|
4183 | url = _ref.url,
|
4184 | query = _ref.query,
|
4185 | data = _ref.data,
|
4186 | _ref$headers = _ref.headers,
|
4187 | headers = _ref$headers === void 0 ? {} : _ref$headers,
|
4188 | time = _ref.timeout,
|
4189 | onprogress = _ref.onprogress;
|
4190 |
|
4191 | if (query) {
|
4192 | var _context, _context2, _context4;
|
4193 |
|
4194 | var queryString = (0, _filter.default)(_context = (0, _map.default)(_context2 = (0, _keys.default)(query)).call(_context2, function (key) {
|
4195 | var _context3;
|
4196 |
|
4197 | var value = query[key];
|
4198 | if (value === undefined) return undefined;
|
4199 | var v = (0, _typeof2.default)(value) === 'object' ? (0, _stringify.default)(value) : value;
|
4200 | return (0, _concat.default)(_context3 = "".concat(encodeURIComponent(key), "=")).call(_context3, encodeURIComponent(v));
|
4201 | })).call(_context, function (qs) {
|
4202 | return qs;
|
4203 | }).join('&');
|
4204 | url = (0, _concat.default)(_context4 = "".concat(url, "?")).call(_context4, queryString);
|
4205 | }
|
4206 |
|
4207 | var count = requestsCount++;
|
4208 | debugRequest('request(%d) %s %s %o %o %o', count, method, url, query, data, headers);
|
4209 | var request = getAdapter('request');
|
4210 | var promise = request(url, {
|
4211 | method: method,
|
4212 | headers: headers,
|
4213 | data: data,
|
4214 | onprogress: onprogress
|
4215 | }).then(function (response) {
|
4216 | debugRequest('response(%d) %d %O %o', count, response.status, response.data || response.text, response.header);
|
4217 |
|
4218 | if (response.ok === false) {
|
4219 | var error = new Error();
|
4220 | error.response = response;
|
4221 | throw error;
|
4222 | }
|
4223 |
|
4224 | return response.data;
|
4225 | }).catch(function (error) {
|
4226 | if (error.response) {
|
4227 | if (!debug.enabled('leancloud:request')) {
|
4228 | debugRequestError('request(%d) %s %s %o %o %o', count, method, url, query, data, headers);
|
4229 | }
|
4230 |
|
4231 | debugRequestError('response(%d) %d %O %o', count, error.response.status, error.response.data || error.response.text, error.response.header);
|
4232 | error.statusCode = error.response.status;
|
4233 | error.responseText = error.response.text;
|
4234 | error.response = error.response.data;
|
4235 | }
|
4236 |
|
4237 | throw error;
|
4238 | });
|
4239 | return time ? timeout(promise, time) : promise;
|
4240 | };
|
4241 |
|
4242 | module.exports = ajax;
|
4243 |
|
4244 | }),
|
4245 |
|
4246 | (function(module, exports, __webpack_require__) {
|
4247 |
|
4248 | var _Symbol = __webpack_require__(231);
|
4249 |
|
4250 | var _Symbol$iterator = __webpack_require__(432);
|
4251 |
|
4252 | function _typeof(obj) {
|
4253 | "@babel/helpers - typeof";
|
4254 |
|
4255 | return (module.exports = _typeof = "function" == typeof _Symbol && "symbol" == typeof _Symbol$iterator ? function (obj) {
|
4256 | return typeof obj;
|
4257 | } : function (obj) {
|
4258 | return obj && "function" == typeof _Symbol && obj.constructor === _Symbol && obj !== _Symbol.prototype ? "symbol" : typeof obj;
|
4259 | }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
4260 | }
|
4261 |
|
4262 | module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
4263 |
|
4264 | }),
|
4265 |
|
4266 | (function(module, exports, __webpack_require__) {
|
4267 |
|
4268 | module.exports = __webpack_require__(447);
|
4269 |
|
4270 | }),
|
4271 |
|
4272 | (function(module, exports, __webpack_require__) {
|
4273 |
|
4274 | var $ = __webpack_require__(0);
|
4275 | var uncurryThis = __webpack_require__(4);
|
4276 | var hiddenKeys = __webpack_require__(74);
|
4277 | var isObject = __webpack_require__(11);
|
4278 | var hasOwn = __webpack_require__(14);
|
4279 | var defineProperty = __webpack_require__(22).f;
|
4280 | var getOwnPropertyNamesModule = __webpack_require__(96);
|
4281 | var getOwnPropertyNamesExternalModule = __webpack_require__(234);
|
4282 | var isExtensible = __webpack_require__(247);
|
4283 | var uid = __webpack_require__(92);
|
4284 | var FREEZING = __webpack_require__(562);
|
4285 |
|
4286 | var REQUIRED = false;
|
4287 | var METADATA = uid('meta');
|
4288 | var id = 0;
|
4289 |
|
4290 | var setMetadata = function (it) {
|
4291 | defineProperty(it, METADATA, { value: {
|
4292 | objectID: 'O' + id++,
|
4293 | weakData: {}
|
4294 | } });
|
4295 | };
|
4296 |
|
4297 | var fastKey = function (it, create) {
|
4298 |
|
4299 | if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
|
4300 | if (!hasOwn(it, METADATA)) {
|
4301 |
|
4302 | if (!isExtensible(it)) return 'F';
|
4303 |
|
4304 | if (!create) return 'E';
|
4305 |
|
4306 | setMetadata(it);
|
4307 |
|
4308 | } return it[METADATA].objectID;
|
4309 | };
|
4310 |
|
4311 | var getWeakData = function (it, create) {
|
4312 | if (!hasOwn(it, METADATA)) {
|
4313 |
|
4314 | if (!isExtensible(it)) return true;
|
4315 |
|
4316 | if (!create) return false;
|
4317 |
|
4318 | setMetadata(it);
|
4319 |
|
4320 | } return it[METADATA].weakData;
|
4321 | };
|
4322 |
|
4323 |
|
4324 | var onFreeze = function (it) {
|
4325 | if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn(it, METADATA)) setMetadata(it);
|
4326 | return it;
|
4327 | };
|
4328 |
|
4329 | var enable = function () {
|
4330 | meta.enable = function () { };
|
4331 | REQUIRED = true;
|
4332 | var getOwnPropertyNames = getOwnPropertyNamesModule.f;
|
4333 | var splice = uncurryThis([].splice);
|
4334 | var test = {};
|
4335 | test[METADATA] = 1;
|
4336 |
|
4337 |
|
4338 | if (getOwnPropertyNames(test).length) {
|
4339 | getOwnPropertyNamesModule.f = function (it) {
|
4340 | var result = getOwnPropertyNames(it);
|
4341 | for (var i = 0, length = result.length; i < length; i++) {
|
4342 | if (result[i] === METADATA) {
|
4343 | splice(result, i, 1);
|
4344 | break;
|
4345 | }
|
4346 | } return result;
|
4347 | };
|
4348 |
|
4349 | $({ target: 'Object', stat: true, forced: true }, {
|
4350 | getOwnPropertyNames: getOwnPropertyNamesExternalModule.f
|
4351 | });
|
4352 | }
|
4353 | };
|
4354 |
|
4355 | var meta = module.exports = {
|
4356 | enable: enable,
|
4357 | fastKey: fastKey,
|
4358 | getWeakData: getWeakData,
|
4359 | onFreeze: onFreeze
|
4360 | };
|
4361 |
|
4362 | hiddenKeys[METADATA] = true;
|
4363 |
|
4364 |
|
4365 | }),
|
4366 |
|
4367 | (function(module, exports) {
|
4368 |
|
4369 | var g;
|
4370 |
|
4371 |
|
4372 | g = (function() {
|
4373 | return this;
|
4374 | })();
|
4375 |
|
4376 | try {
|
4377 |
|
4378 | g = g || Function("return this")() || (1,eval)("this");
|
4379 | } catch(e) {
|
4380 |
|
4381 | if(typeof window === "object")
|
4382 | g = window;
|
4383 | }
|
4384 |
|
4385 |
|
4386 |
|
4387 |
|
4388 |
|
4389 | module.exports = g;
|
4390 |
|
4391 |
|
4392 | }),
|
4393 |
|
4394 | (function(module, exports, __webpack_require__) {
|
4395 |
|
4396 | "use strict";
|
4397 |
|
4398 | var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
4399 |
|
4400 | var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
4401 |
|
4402 |
|
4403 | var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
4404 |
|
4405 |
|
4406 |
|
4407 | exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
4408 | var descriptor = getOwnPropertyDescriptor(this, V);
|
4409 | return !!descriptor && descriptor.enumerable;
|
4410 | } : $propertyIsEnumerable;
|
4411 |
|
4412 |
|
4413 | }),
|
4414 |
|
4415 | (function(module, exports, __webpack_require__) {
|
4416 |
|
4417 | var uncurryThis = __webpack_require__(4);
|
4418 | var fails = __webpack_require__(3);
|
4419 | var classof = __webpack_require__(56);
|
4420 |
|
4421 | var $Object = Object;
|
4422 | var split = uncurryThis(''.split);
|
4423 |
|
4424 |
|
4425 | module.exports = fails(function () {
|
4426 |
|
4427 |
|
4428 | return !$Object('z').propertyIsEnumerable(0);
|
4429 | }) ? function (it) {
|
4430 | return classof(it) == 'String' ? split(it, '') : $Object(it);
|
4431 | } : $Object;
|
4432 |
|
4433 |
|
4434 | }),
|
4435 |
|
4436 | (function(module, exports) {
|
4437 |
|
4438 | var $TypeError = TypeError;
|
4439 |
|
4440 |
|
4441 |
|
4442 | module.exports = function (it) {
|
4443 | if (it == undefined) throw $TypeError("Can't call method on " + it);
|
4444 | return it;
|
4445 | };
|
4446 |
|
4447 |
|
4448 | }),
|
4449 |
|
4450 | (function(module, exports, __webpack_require__) {
|
4451 |
|
4452 | var aCallable = __webpack_require__(31);
|
4453 |
|
4454 |
|
4455 |
|
4456 | module.exports = function (V, P) {
|
4457 | var func = V[P];
|
4458 | return func == null ? undefined : aCallable(func);
|
4459 | };
|
4460 |
|
4461 |
|
4462 | }),
|
4463 |
|
4464 | (function(module, exports, __webpack_require__) {
|
4465 |
|
4466 | var global = __webpack_require__(6);
|
4467 | var defineGlobalProperty = __webpack_require__(258);
|
4468 |
|
4469 | var SHARED = '__core-js_shared__';
|
4470 | var store = global[SHARED] || defineGlobalProperty(SHARED, {});
|
4471 |
|
4472 | module.exports = store;
|
4473 |
|
4474 |
|
4475 | }),
|
4476 |
|
4477 | (function(module, exports, __webpack_require__) {
|
4478 |
|
4479 | var global = __webpack_require__(6);
|
4480 | var isObject = __webpack_require__(11);
|
4481 |
|
4482 | var document = global.document;
|
4483 |
|
4484 | var EXISTS = isObject(document) && isObject(document.createElement);
|
4485 |
|
4486 | module.exports = function (it) {
|
4487 | return EXISTS ? document.createElement(it) : {};
|
4488 | };
|
4489 |
|
4490 |
|
4491 | }),
|
4492 |
|
4493 | (function(module, exports, __webpack_require__) {
|
4494 |
|
4495 | var toIntegerOrInfinity = __webpack_require__(120);
|
4496 |
|
4497 | var max = Math.max;
|
4498 | var min = Math.min;
|
4499 |
|
4500 |
|
4501 |
|
4502 |
|
4503 | module.exports = function (index, length) {
|
4504 | var integer = toIntegerOrInfinity(index);
|
4505 | return integer < 0 ? max(integer + length, 0) : min(integer, length);
|
4506 | };
|
4507 |
|
4508 |
|
4509 | }),
|
4510 |
|
4511 | (function(module, exports, __webpack_require__) {
|
4512 |
|
4513 | var trunc = __webpack_require__(262);
|
4514 |
|
4515 |
|
4516 |
|
4517 | module.exports = function (argument) {
|
4518 | var number = +argument;
|
4519 |
|
4520 | return number !== number || number === 0 ? 0 : trunc(number);
|
4521 | };
|
4522 |
|
4523 |
|
4524 | }),
|
4525 |
|
4526 | (function(module, exports) {
|
4527 |
|
4528 |
|
4529 | module.exports = [
|
4530 | 'constructor',
|
4531 | 'hasOwnProperty',
|
4532 | 'isPrototypeOf',
|
4533 | 'propertyIsEnumerable',
|
4534 | 'toLocaleString',
|
4535 | 'toString',
|
4536 | 'valueOf'
|
4537 | ];
|
4538 |
|
4539 |
|
4540 | }),
|
4541 |
|
4542 | (function(module, exports, __webpack_require__) {
|
4543 |
|
4544 | var wellKnownSymbol = __webpack_require__(9);
|
4545 |
|
4546 | var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
4547 | var test = {};
|
4548 |
|
4549 | test[TO_STRING_TAG] = 'z';
|
4550 |
|
4551 | module.exports = String(test) === '[object z]';
|
4552 |
|
4553 |
|
4554 | }),
|
4555 |
|
4556 | (function(module, exports, __webpack_require__) {
|
4557 |
|
4558 | var uncurryThis = __webpack_require__(4);
|
4559 | var isCallable = __webpack_require__(7);
|
4560 | var store = __webpack_require__(117);
|
4561 |
|
4562 | var functionToString = uncurryThis(Function.toString);
|
4563 |
|
4564 |
|
4565 | if (!isCallable(store.inspectSource)) {
|
4566 | store.inspectSource = function (it) {
|
4567 | return functionToString(it);
|
4568 | };
|
4569 | }
|
4570 |
|
4571 | module.exports = store.inspectSource;
|
4572 |
|
4573 |
|
4574 | }),
|
4575 |
|
4576 | (function(module, exports, __webpack_require__) {
|
4577 |
|
4578 | "use strict";
|
4579 |
|
4580 | var $ = __webpack_require__(0);
|
4581 | var call = __webpack_require__(13);
|
4582 | var IS_PURE = __webpack_require__(32);
|
4583 | var FunctionName = __webpack_require__(268);
|
4584 | var isCallable = __webpack_require__(7);
|
4585 | var createIteratorConstructor = __webpack_require__(269);
|
4586 | var getPrototypeOf = __webpack_require__(93);
|
4587 | var setPrototypeOf = __webpack_require__(95);
|
4588 | var setToStringTag = __webpack_require__(49);
|
4589 | var createNonEnumerableProperty = __webpack_require__(35);
|
4590 | var defineBuiltIn = __webpack_require__(39);
|
4591 | var wellKnownSymbol = __webpack_require__(9);
|
4592 | var Iterators = __webpack_require__(58);
|
4593 | var IteratorsCore = __webpack_require__(161);
|
4594 |
|
4595 | var PROPER_FUNCTION_NAME = FunctionName.PROPER;
|
4596 | var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
4597 | var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
4598 | var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
4599 | var ITERATOR = wellKnownSymbol('iterator');
|
4600 | var KEYS = 'keys';
|
4601 | var VALUES = 'values';
|
4602 | var ENTRIES = 'entries';
|
4603 |
|
4604 | var returnThis = function () { return this; };
|
4605 |
|
4606 | module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
|
4607 | createIteratorConstructor(IteratorConstructor, NAME, next);
|
4608 |
|
4609 | var getIterationMethod = function (KIND) {
|
4610 | if (KIND === DEFAULT && defaultIterator) return defaultIterator;
|
4611 | if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
|
4612 | switch (KIND) {
|
4613 | case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
|
4614 | case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
|
4615 | case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
|
4616 | } return function () { return new IteratorConstructor(this); };
|
4617 | };
|
4618 |
|
4619 | var TO_STRING_TAG = NAME + ' Iterator';
|
4620 | var INCORRECT_VALUES_NAME = false;
|
4621 | var IterablePrototype = Iterable.prototype;
|
4622 | var nativeIterator = IterablePrototype[ITERATOR]
|
4623 | || IterablePrototype['@@iterator']
|
4624 | || DEFAULT && IterablePrototype[DEFAULT];
|
4625 | var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
|
4626 | var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
|
4627 | var CurrentIteratorPrototype, methods, KEY;
|
4628 |
|
4629 |
|
4630 | if (anyNativeIterator) {
|
4631 | CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
|
4632 | if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
|
4633 | if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
|
4634 | if (setPrototypeOf) {
|
4635 | setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
|
4636 | } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {
|
4637 | defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis);
|
4638 | }
|
4639 | }
|
4640 |
|
4641 | setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
|
4642 | if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
|
4643 | }
|
4644 | }
|
4645 |
|
4646 |
|
4647 | if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
4648 | if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {
|
4649 | createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
|
4650 | } else {
|
4651 | INCORRECT_VALUES_NAME = true;
|
4652 | defaultIterator = function values() { return call(nativeIterator, this); };
|
4653 | }
|
4654 | }
|
4655 |
|
4656 |
|
4657 | if (DEFAULT) {
|
4658 | methods = {
|
4659 | values: getIterationMethod(VALUES),
|
4660 | keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
|
4661 | entries: getIterationMethod(ENTRIES)
|
4662 | };
|
4663 | if (FORCED) for (KEY in methods) {
|
4664 | if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
4665 | defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
|
4666 | }
|
4667 | } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
4668 | }
|
4669 |
|
4670 |
|
4671 | if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
|
4672 | defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });
|
4673 | }
|
4674 | Iterators[NAME] = defaultIterator;
|
4675 |
|
4676 | return methods;
|
4677 | };
|
4678 |
|
4679 |
|
4680 | }),
|
4681 |
|
4682 | (function(module, exports, __webpack_require__) {
|
4683 |
|
4684 | var classof = __webpack_require__(56);
|
4685 | var global = __webpack_require__(6);
|
4686 |
|
4687 | module.exports = classof(global.process) == 'process';
|
4688 |
|
4689 |
|
4690 | }),
|
4691 |
|
4692 | (function(module, __webpack_exports__, __webpack_require__) {
|
4693 |
|
4694 | "use strict";
|
4695 | Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
4696 | var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(5);
|
4697 | __webpack_require__.d(__webpack_exports__, "VERSION", function() { return __WEBPACK_IMPORTED_MODULE_0__setup_js__["e"]; });
|
4698 | var __WEBPACK_IMPORTED_MODULE_1__restArguments_js__ = __webpack_require__(23);
|
4699 | __webpack_require__.d(__webpack_exports__, "restArguments", function() { return __WEBPACK_IMPORTED_MODULE_1__restArguments_js__["a"]; });
|
4700 | var __WEBPACK_IMPORTED_MODULE_2__isObject_js__ = __webpack_require__(52);
|
4701 | __webpack_require__.d(__webpack_exports__, "isObject", function() { return __WEBPACK_IMPORTED_MODULE_2__isObject_js__["a"]; });
|
4702 | var __WEBPACK_IMPORTED_MODULE_3__isNull_js__ = __webpack_require__(291);
|
4703 | __webpack_require__.d(__webpack_exports__, "isNull", function() { return __WEBPACK_IMPORTED_MODULE_3__isNull_js__["a"]; });
|
4704 | var __WEBPACK_IMPORTED_MODULE_4__isUndefined_js__ = __webpack_require__(170);
|
4705 | __webpack_require__.d(__webpack_exports__, "isUndefined", function() { return __WEBPACK_IMPORTED_MODULE_4__isUndefined_js__["a"]; });
|
4706 | var __WEBPACK_IMPORTED_MODULE_5__isBoolean_js__ = __webpack_require__(171);
|
4707 | __webpack_require__.d(__webpack_exports__, "isBoolean", function() { return __WEBPACK_IMPORTED_MODULE_5__isBoolean_js__["a"]; });
|
4708 | var __WEBPACK_IMPORTED_MODULE_6__isElement_js__ = __webpack_require__(292);
|
4709 | __webpack_require__.d(__webpack_exports__, "isElement", function() { return __WEBPACK_IMPORTED_MODULE_6__isElement_js__["a"]; });
|
4710 | var __WEBPACK_IMPORTED_MODULE_7__isString_js__ = __webpack_require__(127);
|
4711 | __webpack_require__.d(__webpack_exports__, "isString", function() { return __WEBPACK_IMPORTED_MODULE_7__isString_js__["a"]; });
|
4712 | var __WEBPACK_IMPORTED_MODULE_8__isNumber_js__ = __webpack_require__(172);
|
4713 | __webpack_require__.d(__webpack_exports__, "isNumber", function() { return __WEBPACK_IMPORTED_MODULE_8__isNumber_js__["a"]; });
|
4714 | var __WEBPACK_IMPORTED_MODULE_9__isDate_js__ = __webpack_require__(293);
|
4715 | __webpack_require__.d(__webpack_exports__, "isDate", function() { return __WEBPACK_IMPORTED_MODULE_9__isDate_js__["a"]; });
|
4716 | var __WEBPACK_IMPORTED_MODULE_10__isRegExp_js__ = __webpack_require__(294);
|
4717 | __webpack_require__.d(__webpack_exports__, "isRegExp", function() { return __WEBPACK_IMPORTED_MODULE_10__isRegExp_js__["a"]; });
|
4718 | var __WEBPACK_IMPORTED_MODULE_11__isError_js__ = __webpack_require__(295);
|
4719 | __webpack_require__.d(__webpack_exports__, "isError", function() { return __WEBPACK_IMPORTED_MODULE_11__isError_js__["a"]; });
|
4720 | var __WEBPACK_IMPORTED_MODULE_12__isSymbol_js__ = __webpack_require__(173);
|
4721 | __webpack_require__.d(__webpack_exports__, "isSymbol", function() { return __WEBPACK_IMPORTED_MODULE_12__isSymbol_js__["a"]; });
|
4722 | var __WEBPACK_IMPORTED_MODULE_13__isArrayBuffer_js__ = __webpack_require__(174);
|
4723 | __webpack_require__.d(__webpack_exports__, "isArrayBuffer", function() { return __WEBPACK_IMPORTED_MODULE_13__isArrayBuffer_js__["a"]; });
|
4724 | var __WEBPACK_IMPORTED_MODULE_14__isDataView_js__ = __webpack_require__(128);
|
4725 | __webpack_require__.d(__webpack_exports__, "isDataView", function() { return __WEBPACK_IMPORTED_MODULE_14__isDataView_js__["a"]; });
|
4726 | var __WEBPACK_IMPORTED_MODULE_15__isArray_js__ = __webpack_require__(53);
|
4727 | __webpack_require__.d(__webpack_exports__, "isArray", function() { return __WEBPACK_IMPORTED_MODULE_15__isArray_js__["a"]; });
|
4728 | var __WEBPACK_IMPORTED_MODULE_16__isFunction_js__ = __webpack_require__(27);
|
4729 | __webpack_require__.d(__webpack_exports__, "isFunction", function() { return __WEBPACK_IMPORTED_MODULE_16__isFunction_js__["a"]; });
|
4730 | var __WEBPACK_IMPORTED_MODULE_17__isArguments_js__ = __webpack_require__(129);
|
4731 | __webpack_require__.d(__webpack_exports__, "isArguments", function() { return __WEBPACK_IMPORTED_MODULE_17__isArguments_js__["a"]; });
|
4732 | var __WEBPACK_IMPORTED_MODULE_18__isFinite_js__ = __webpack_require__(297);
|
4733 | __webpack_require__.d(__webpack_exports__, "isFinite", function() { return __WEBPACK_IMPORTED_MODULE_18__isFinite_js__["a"]; });
|
4734 | var __WEBPACK_IMPORTED_MODULE_19__isNaN_js__ = __webpack_require__(175);
|
4735 | __webpack_require__.d(__webpack_exports__, "isNaN", function() { return __WEBPACK_IMPORTED_MODULE_19__isNaN_js__["a"]; });
|
4736 | var __WEBPACK_IMPORTED_MODULE_20__isTypedArray_js__ = __webpack_require__(176);
|
4737 | __webpack_require__.d(__webpack_exports__, "isTypedArray", function() { return __WEBPACK_IMPORTED_MODULE_20__isTypedArray_js__["a"]; });
|
4738 | var __WEBPACK_IMPORTED_MODULE_21__isEmpty_js__ = __webpack_require__(299);
|
4739 | __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return __WEBPACK_IMPORTED_MODULE_21__isEmpty_js__["a"]; });
|
4740 | var __WEBPACK_IMPORTED_MODULE_22__isMatch_js__ = __webpack_require__(181);
|
4741 | __webpack_require__.d(__webpack_exports__, "isMatch", function() { return __WEBPACK_IMPORTED_MODULE_22__isMatch_js__["a"]; });
|
4742 | var __WEBPACK_IMPORTED_MODULE_23__isEqual_js__ = __webpack_require__(300);
|
4743 | __webpack_require__.d(__webpack_exports__, "isEqual", function() { return __WEBPACK_IMPORTED_MODULE_23__isEqual_js__["a"]; });
|
4744 | var __WEBPACK_IMPORTED_MODULE_24__isMap_js__ = __webpack_require__(302);
|
4745 | __webpack_require__.d(__webpack_exports__, "isMap", function() { return __WEBPACK_IMPORTED_MODULE_24__isMap_js__["a"]; });
|
4746 | var __WEBPACK_IMPORTED_MODULE_25__isWeakMap_js__ = __webpack_require__(303);
|
4747 | __webpack_require__.d(__webpack_exports__, "isWeakMap", function() { return __WEBPACK_IMPORTED_MODULE_25__isWeakMap_js__["a"]; });
|
4748 | var __WEBPACK_IMPORTED_MODULE_26__isSet_js__ = __webpack_require__(304);
|
4749 | __webpack_require__.d(__webpack_exports__, "isSet", function() { return __WEBPACK_IMPORTED_MODULE_26__isSet_js__["a"]; });
|
4750 | var __WEBPACK_IMPORTED_MODULE_27__isWeakSet_js__ = __webpack_require__(305);
|
4751 | __webpack_require__.d(__webpack_exports__, "isWeakSet", function() { return __WEBPACK_IMPORTED_MODULE_27__isWeakSet_js__["a"]; });
|
4752 | var __WEBPACK_IMPORTED_MODULE_28__keys_js__ = __webpack_require__(15);
|
4753 | __webpack_require__.d(__webpack_exports__, "keys", function() { return __WEBPACK_IMPORTED_MODULE_28__keys_js__["a"]; });
|
4754 | var __WEBPACK_IMPORTED_MODULE_29__allKeys_js__ = __webpack_require__(80);
|
4755 | __webpack_require__.d(__webpack_exports__, "allKeys", function() { return __WEBPACK_IMPORTED_MODULE_29__allKeys_js__["a"]; });
|
4756 | var __WEBPACK_IMPORTED_MODULE_30__values_js__ = __webpack_require__(62);
|
4757 | __webpack_require__.d(__webpack_exports__, "values", function() { return __WEBPACK_IMPORTED_MODULE_30__values_js__["a"]; });
|
4758 | var __WEBPACK_IMPORTED_MODULE_31__pairs_js__ = __webpack_require__(306);
|
4759 | __webpack_require__.d(__webpack_exports__, "pairs", function() { return __WEBPACK_IMPORTED_MODULE_31__pairs_js__["a"]; });
|
4760 | var __WEBPACK_IMPORTED_MODULE_32__invert_js__ = __webpack_require__(182);
|
4761 | __webpack_require__.d(__webpack_exports__, "invert", function() { return __WEBPACK_IMPORTED_MODULE_32__invert_js__["a"]; });
|
4762 | var __WEBPACK_IMPORTED_MODULE_33__functions_js__ = __webpack_require__(183);
|
4763 | __webpack_require__.d(__webpack_exports__, "functions", function() { return __WEBPACK_IMPORTED_MODULE_33__functions_js__["a"]; });
|
4764 | __webpack_require__.d(__webpack_exports__, "methods", function() { return __WEBPACK_IMPORTED_MODULE_33__functions_js__["a"]; });
|
4765 | var __WEBPACK_IMPORTED_MODULE_34__extend_js__ = __webpack_require__(184);
|
4766 | __webpack_require__.d(__webpack_exports__, "extend", function() { return __WEBPACK_IMPORTED_MODULE_34__extend_js__["a"]; });
|
4767 | var __WEBPACK_IMPORTED_MODULE_35__extendOwn_js__ = __webpack_require__(133);
|
4768 | __webpack_require__.d(__webpack_exports__, "extendOwn", function() { return __WEBPACK_IMPORTED_MODULE_35__extendOwn_js__["a"]; });
|
4769 | __webpack_require__.d(__webpack_exports__, "assign", function() { return __WEBPACK_IMPORTED_MODULE_35__extendOwn_js__["a"]; });
|
4770 | var __WEBPACK_IMPORTED_MODULE_36__defaults_js__ = __webpack_require__(185);
|
4771 | __webpack_require__.d(__webpack_exports__, "defaults", function() { return __WEBPACK_IMPORTED_MODULE_36__defaults_js__["a"]; });
|
4772 | var __WEBPACK_IMPORTED_MODULE_37__create_js__ = __webpack_require__(307);
|
4773 | __webpack_require__.d(__webpack_exports__, "create", function() { return __WEBPACK_IMPORTED_MODULE_37__create_js__["a"]; });
|
4774 | var __WEBPACK_IMPORTED_MODULE_38__clone_js__ = __webpack_require__(187);
|
4775 | __webpack_require__.d(__webpack_exports__, "clone", function() { return __WEBPACK_IMPORTED_MODULE_38__clone_js__["a"]; });
|
4776 | var __WEBPACK_IMPORTED_MODULE_39__tap_js__ = __webpack_require__(308);
|
4777 | __webpack_require__.d(__webpack_exports__, "tap", function() { return __WEBPACK_IMPORTED_MODULE_39__tap_js__["a"]; });
|
4778 | var __WEBPACK_IMPORTED_MODULE_40__get_js__ = __webpack_require__(188);
|
4779 | __webpack_require__.d(__webpack_exports__, "get", function() { return __WEBPACK_IMPORTED_MODULE_40__get_js__["a"]; });
|
4780 | var __WEBPACK_IMPORTED_MODULE_41__has_js__ = __webpack_require__(309);
|
4781 | __webpack_require__.d(__webpack_exports__, "has", function() { return __WEBPACK_IMPORTED_MODULE_41__has_js__["a"]; });
|
4782 | var __WEBPACK_IMPORTED_MODULE_42__mapObject_js__ = __webpack_require__(310);
|
4783 | __webpack_require__.d(__webpack_exports__, "mapObject", function() { return __WEBPACK_IMPORTED_MODULE_42__mapObject_js__["a"]; });
|
4784 | var __WEBPACK_IMPORTED_MODULE_43__identity_js__ = __webpack_require__(135);
|
4785 | __webpack_require__.d(__webpack_exports__, "identity", function() { return __WEBPACK_IMPORTED_MODULE_43__identity_js__["a"]; });
|
4786 | var __WEBPACK_IMPORTED_MODULE_44__constant_js__ = __webpack_require__(177);
|
4787 | __webpack_require__.d(__webpack_exports__, "constant", function() { return __WEBPACK_IMPORTED_MODULE_44__constant_js__["a"]; });
|
4788 | var __WEBPACK_IMPORTED_MODULE_45__noop_js__ = __webpack_require__(192);
|
4789 | __webpack_require__.d(__webpack_exports__, "noop", function() { return __WEBPACK_IMPORTED_MODULE_45__noop_js__["a"]; });
|
4790 | var __WEBPACK_IMPORTED_MODULE_46__toPath_js__ = __webpack_require__(189);
|
4791 | __webpack_require__.d(__webpack_exports__, "toPath", function() { return __WEBPACK_IMPORTED_MODULE_46__toPath_js__["a"]; });
|
4792 | var __WEBPACK_IMPORTED_MODULE_47__property_js__ = __webpack_require__(136);
|
4793 | __webpack_require__.d(__webpack_exports__, "property", function() { return __WEBPACK_IMPORTED_MODULE_47__property_js__["a"]; });
|
4794 | var __WEBPACK_IMPORTED_MODULE_48__propertyOf_js__ = __webpack_require__(311);
|
4795 | __webpack_require__.d(__webpack_exports__, "propertyOf", function() { return __WEBPACK_IMPORTED_MODULE_48__propertyOf_js__["a"]; });
|
4796 | var __WEBPACK_IMPORTED_MODULE_49__matcher_js__ = __webpack_require__(103);
|
4797 | __webpack_require__.d(__webpack_exports__, "matcher", function() { return __WEBPACK_IMPORTED_MODULE_49__matcher_js__["a"]; });
|
4798 | __webpack_require__.d(__webpack_exports__, "matches", function() { return __WEBPACK_IMPORTED_MODULE_49__matcher_js__["a"]; });
|
4799 | var __WEBPACK_IMPORTED_MODULE_50__times_js__ = __webpack_require__(312);
|
4800 | __webpack_require__.d(__webpack_exports__, "times", function() { return __WEBPACK_IMPORTED_MODULE_50__times_js__["a"]; });
|
4801 | var __WEBPACK_IMPORTED_MODULE_51__random_js__ = __webpack_require__(193);
|
4802 | __webpack_require__.d(__webpack_exports__, "random", function() { return __WEBPACK_IMPORTED_MODULE_51__random_js__["a"]; });
|
4803 | var __WEBPACK_IMPORTED_MODULE_52__now_js__ = __webpack_require__(137);
|
4804 | __webpack_require__.d(__webpack_exports__, "now", function() { return __WEBPACK_IMPORTED_MODULE_52__now_js__["a"]; });
|
4805 | var __WEBPACK_IMPORTED_MODULE_53__escape_js__ = __webpack_require__(313);
|
4806 | __webpack_require__.d(__webpack_exports__, "escape", function() { return __WEBPACK_IMPORTED_MODULE_53__escape_js__["a"]; });
|
4807 | var __WEBPACK_IMPORTED_MODULE_54__unescape_js__ = __webpack_require__(314);
|
4808 | __webpack_require__.d(__webpack_exports__, "unescape", function() { return __WEBPACK_IMPORTED_MODULE_54__unescape_js__["a"]; });
|
4809 | var __WEBPACK_IMPORTED_MODULE_55__templateSettings_js__ = __webpack_require__(196);
|
4810 | __webpack_require__.d(__webpack_exports__, "templateSettings", function() { return __WEBPACK_IMPORTED_MODULE_55__templateSettings_js__["a"]; });
|
4811 | var __WEBPACK_IMPORTED_MODULE_56__template_js__ = __webpack_require__(316);
|
4812 | __webpack_require__.d(__webpack_exports__, "template", function() { return __WEBPACK_IMPORTED_MODULE_56__template_js__["a"]; });
|
4813 | var __WEBPACK_IMPORTED_MODULE_57__result_js__ = __webpack_require__(317);
|
4814 | __webpack_require__.d(__webpack_exports__, "result", function() { return __WEBPACK_IMPORTED_MODULE_57__result_js__["a"]; });
|
4815 | var __WEBPACK_IMPORTED_MODULE_58__uniqueId_js__ = __webpack_require__(318);
|
4816 | __webpack_require__.d(__webpack_exports__, "uniqueId", function() { return __WEBPACK_IMPORTED_MODULE_58__uniqueId_js__["a"]; });
|
4817 | var __WEBPACK_IMPORTED_MODULE_59__chain_js__ = __webpack_require__(319);
|
4818 | __webpack_require__.d(__webpack_exports__, "chain", function() { return __WEBPACK_IMPORTED_MODULE_59__chain_js__["a"]; });
|
4819 | var __WEBPACK_IMPORTED_MODULE_60__iteratee_js__ = __webpack_require__(191);
|
4820 | __webpack_require__.d(__webpack_exports__, "iteratee", function() { return __WEBPACK_IMPORTED_MODULE_60__iteratee_js__["a"]; });
|
4821 | var __WEBPACK_IMPORTED_MODULE_61__partial_js__ = __webpack_require__(104);
|
4822 | __webpack_require__.d(__webpack_exports__, "partial", function() { return __WEBPACK_IMPORTED_MODULE_61__partial_js__["a"]; });
|
4823 | var __WEBPACK_IMPORTED_MODULE_62__bind_js__ = __webpack_require__(198);
|
4824 | __webpack_require__.d(__webpack_exports__, "bind", function() { return __WEBPACK_IMPORTED_MODULE_62__bind_js__["a"]; });
|
4825 | var __WEBPACK_IMPORTED_MODULE_63__bindAll_js__ = __webpack_require__(320);
|
4826 | __webpack_require__.d(__webpack_exports__, "bindAll", function() { return __WEBPACK_IMPORTED_MODULE_63__bindAll_js__["a"]; });
|
4827 | var __WEBPACK_IMPORTED_MODULE_64__memoize_js__ = __webpack_require__(321);
|
4828 | __webpack_require__.d(__webpack_exports__, "memoize", function() { return __WEBPACK_IMPORTED_MODULE_64__memoize_js__["a"]; });
|
4829 | var __WEBPACK_IMPORTED_MODULE_65__delay_js__ = __webpack_require__(199);
|
4830 | __webpack_require__.d(__webpack_exports__, "delay", function() { return __WEBPACK_IMPORTED_MODULE_65__delay_js__["a"]; });
|
4831 | var __WEBPACK_IMPORTED_MODULE_66__defer_js__ = __webpack_require__(322);
|
4832 | __webpack_require__.d(__webpack_exports__, "defer", function() { return __WEBPACK_IMPORTED_MODULE_66__defer_js__["a"]; });
|
4833 | var __WEBPACK_IMPORTED_MODULE_67__throttle_js__ = __webpack_require__(323);
|
4834 | __webpack_require__.d(__webpack_exports__, "throttle", function() { return __WEBPACK_IMPORTED_MODULE_67__throttle_js__["a"]; });
|
4835 | var __WEBPACK_IMPORTED_MODULE_68__debounce_js__ = __webpack_require__(324);
|
4836 | __webpack_require__.d(__webpack_exports__, "debounce", function() { return __WEBPACK_IMPORTED_MODULE_68__debounce_js__["a"]; });
|
4837 | var __WEBPACK_IMPORTED_MODULE_69__wrap_js__ = __webpack_require__(325);
|
4838 | __webpack_require__.d(__webpack_exports__, "wrap", function() { return __WEBPACK_IMPORTED_MODULE_69__wrap_js__["a"]; });
|
4839 | var __WEBPACK_IMPORTED_MODULE_70__negate_js__ = __webpack_require__(138);
|
4840 | __webpack_require__.d(__webpack_exports__, "negate", function() { return __WEBPACK_IMPORTED_MODULE_70__negate_js__["a"]; });
|
4841 | var __WEBPACK_IMPORTED_MODULE_71__compose_js__ = __webpack_require__(326);
|
4842 | __webpack_require__.d(__webpack_exports__, "compose", function() { return __WEBPACK_IMPORTED_MODULE_71__compose_js__["a"]; });
|
4843 | var __WEBPACK_IMPORTED_MODULE_72__after_js__ = __webpack_require__(327);
|
4844 | __webpack_require__.d(__webpack_exports__, "after", function() { return __WEBPACK_IMPORTED_MODULE_72__after_js__["a"]; });
|
4845 | var __WEBPACK_IMPORTED_MODULE_73__before_js__ = __webpack_require__(200);
|
4846 | __webpack_require__.d(__webpack_exports__, "before", function() { return __WEBPACK_IMPORTED_MODULE_73__before_js__["a"]; });
|
4847 | var __WEBPACK_IMPORTED_MODULE_74__once_js__ = __webpack_require__(328);
|
4848 | __webpack_require__.d(__webpack_exports__, "once", function() { return __WEBPACK_IMPORTED_MODULE_74__once_js__["a"]; });
|
4849 | var __WEBPACK_IMPORTED_MODULE_75__findKey_js__ = __webpack_require__(201);
|
4850 | __webpack_require__.d(__webpack_exports__, "findKey", function() { return __WEBPACK_IMPORTED_MODULE_75__findKey_js__["a"]; });
|
4851 | var __WEBPACK_IMPORTED_MODULE_76__findIndex_js__ = __webpack_require__(139);
|
4852 | __webpack_require__.d(__webpack_exports__, "findIndex", function() { return __WEBPACK_IMPORTED_MODULE_76__findIndex_js__["a"]; });
|
4853 | var __WEBPACK_IMPORTED_MODULE_77__findLastIndex_js__ = __webpack_require__(203);
|
4854 | __webpack_require__.d(__webpack_exports__, "findLastIndex", function() { return __WEBPACK_IMPORTED_MODULE_77__findLastIndex_js__["a"]; });
|
4855 | var __WEBPACK_IMPORTED_MODULE_78__sortedIndex_js__ = __webpack_require__(204);
|
4856 | __webpack_require__.d(__webpack_exports__, "sortedIndex", function() { return __WEBPACK_IMPORTED_MODULE_78__sortedIndex_js__["a"]; });
|
4857 | var __WEBPACK_IMPORTED_MODULE_79__indexOf_js__ = __webpack_require__(205);
|
4858 | __webpack_require__.d(__webpack_exports__, "indexOf", function() { return __WEBPACK_IMPORTED_MODULE_79__indexOf_js__["a"]; });
|
4859 | var __WEBPACK_IMPORTED_MODULE_80__lastIndexOf_js__ = __webpack_require__(329);
|
4860 | __webpack_require__.d(__webpack_exports__, "lastIndexOf", function() { return __WEBPACK_IMPORTED_MODULE_80__lastIndexOf_js__["a"]; });
|
4861 | var __WEBPACK_IMPORTED_MODULE_81__find_js__ = __webpack_require__(207);
|
4862 | __webpack_require__.d(__webpack_exports__, "find", function() { return __WEBPACK_IMPORTED_MODULE_81__find_js__["a"]; });
|
4863 | __webpack_require__.d(__webpack_exports__, "detect", function() { return __WEBPACK_IMPORTED_MODULE_81__find_js__["a"]; });
|
4864 | var __WEBPACK_IMPORTED_MODULE_82__findWhere_js__ = __webpack_require__(330);
|
4865 | __webpack_require__.d(__webpack_exports__, "findWhere", function() { return __WEBPACK_IMPORTED_MODULE_82__findWhere_js__["a"]; });
|
4866 | var __WEBPACK_IMPORTED_MODULE_83__each_js__ = __webpack_require__(54);
|
4867 | __webpack_require__.d(__webpack_exports__, "each", function() { return __WEBPACK_IMPORTED_MODULE_83__each_js__["a"]; });
|
4868 | __webpack_require__.d(__webpack_exports__, "forEach", function() { return __WEBPACK_IMPORTED_MODULE_83__each_js__["a"]; });
|
4869 | var __WEBPACK_IMPORTED_MODULE_84__map_js__ = __webpack_require__(64);
|
4870 | __webpack_require__.d(__webpack_exports__, "map", function() { return __WEBPACK_IMPORTED_MODULE_84__map_js__["a"]; });
|
4871 | __webpack_require__.d(__webpack_exports__, "collect", function() { return __WEBPACK_IMPORTED_MODULE_84__map_js__["a"]; });
|
4872 | var __WEBPACK_IMPORTED_MODULE_85__reduce_js__ = __webpack_require__(331);
|
4873 | __webpack_require__.d(__webpack_exports__, "reduce", function() { return __WEBPACK_IMPORTED_MODULE_85__reduce_js__["a"]; });
|
4874 | __webpack_require__.d(__webpack_exports__, "foldl", function() { return __WEBPACK_IMPORTED_MODULE_85__reduce_js__["a"]; });
|
4875 | __webpack_require__.d(__webpack_exports__, "inject", function() { return __WEBPACK_IMPORTED_MODULE_85__reduce_js__["a"]; });
|
4876 | var __WEBPACK_IMPORTED_MODULE_86__reduceRight_js__ = __webpack_require__(332);
|
4877 | __webpack_require__.d(__webpack_exports__, "reduceRight", function() { return __WEBPACK_IMPORTED_MODULE_86__reduceRight_js__["a"]; });
|
4878 | __webpack_require__.d(__webpack_exports__, "foldr", function() { return __WEBPACK_IMPORTED_MODULE_86__reduceRight_js__["a"]; });
|
4879 | var __WEBPACK_IMPORTED_MODULE_87__filter_js__ = __webpack_require__(83);
|
4880 | __webpack_require__.d(__webpack_exports__, "filter", function() { return __WEBPACK_IMPORTED_MODULE_87__filter_js__["a"]; });
|
4881 | __webpack_require__.d(__webpack_exports__, "select", function() { return __WEBPACK_IMPORTED_MODULE_87__filter_js__["a"]; });
|
4882 | var __WEBPACK_IMPORTED_MODULE_88__reject_js__ = __webpack_require__(333);
|
4883 | __webpack_require__.d(__webpack_exports__, "reject", function() { return __WEBPACK_IMPORTED_MODULE_88__reject_js__["a"]; });
|
4884 | var __WEBPACK_IMPORTED_MODULE_89__every_js__ = __webpack_require__(334);
|
4885 | __webpack_require__.d(__webpack_exports__, "every", function() { return __WEBPACK_IMPORTED_MODULE_89__every_js__["a"]; });
|
4886 | __webpack_require__.d(__webpack_exports__, "all", function() { return __WEBPACK_IMPORTED_MODULE_89__every_js__["a"]; });
|
4887 | var __WEBPACK_IMPORTED_MODULE_90__some_js__ = __webpack_require__(335);
|
4888 | __webpack_require__.d(__webpack_exports__, "some", function() { return __WEBPACK_IMPORTED_MODULE_90__some_js__["a"]; });
|
4889 | __webpack_require__.d(__webpack_exports__, "any", function() { return __WEBPACK_IMPORTED_MODULE_90__some_js__["a"]; });
|
4890 | var __WEBPACK_IMPORTED_MODULE_91__contains_js__ = __webpack_require__(84);
|
4891 | __webpack_require__.d(__webpack_exports__, "contains", function() { return __WEBPACK_IMPORTED_MODULE_91__contains_js__["a"]; });
|
4892 | __webpack_require__.d(__webpack_exports__, "includes", function() { return __WEBPACK_IMPORTED_MODULE_91__contains_js__["a"]; });
|
4893 | __webpack_require__.d(__webpack_exports__, "include", function() { return __WEBPACK_IMPORTED_MODULE_91__contains_js__["a"]; });
|
4894 | var __WEBPACK_IMPORTED_MODULE_92__invoke_js__ = __webpack_require__(336);
|
4895 | __webpack_require__.d(__webpack_exports__, "invoke", function() { return __WEBPACK_IMPORTED_MODULE_92__invoke_js__["a"]; });
|
4896 | var __WEBPACK_IMPORTED_MODULE_93__pluck_js__ = __webpack_require__(140);
|
4897 | __webpack_require__.d(__webpack_exports__, "pluck", function() { return __WEBPACK_IMPORTED_MODULE_93__pluck_js__["a"]; });
|
4898 | var __WEBPACK_IMPORTED_MODULE_94__where_js__ = __webpack_require__(337);
|
4899 | __webpack_require__.d(__webpack_exports__, "where", function() { return __WEBPACK_IMPORTED_MODULE_94__where_js__["a"]; });
|
4900 | var __WEBPACK_IMPORTED_MODULE_95__max_js__ = __webpack_require__(209);
|
4901 | __webpack_require__.d(__webpack_exports__, "max", function() { return __WEBPACK_IMPORTED_MODULE_95__max_js__["a"]; });
|
4902 | var __WEBPACK_IMPORTED_MODULE_96__min_js__ = __webpack_require__(338);
|
4903 | __webpack_require__.d(__webpack_exports__, "min", function() { return __WEBPACK_IMPORTED_MODULE_96__min_js__["a"]; });
|
4904 | var __WEBPACK_IMPORTED_MODULE_97__shuffle_js__ = __webpack_require__(339);
|
4905 | __webpack_require__.d(__webpack_exports__, "shuffle", function() { return __WEBPACK_IMPORTED_MODULE_97__shuffle_js__["a"]; });
|
4906 | var __WEBPACK_IMPORTED_MODULE_98__sample_js__ = __webpack_require__(210);
|
4907 | __webpack_require__.d(__webpack_exports__, "sample", function() { return __WEBPACK_IMPORTED_MODULE_98__sample_js__["a"]; });
|
4908 | var __WEBPACK_IMPORTED_MODULE_99__sortBy_js__ = __webpack_require__(340);
|
4909 | __webpack_require__.d(__webpack_exports__, "sortBy", function() { return __WEBPACK_IMPORTED_MODULE_99__sortBy_js__["a"]; });
|
4910 | var __WEBPACK_IMPORTED_MODULE_100__groupBy_js__ = __webpack_require__(341);
|
4911 | __webpack_require__.d(__webpack_exports__, "groupBy", function() { return __WEBPACK_IMPORTED_MODULE_100__groupBy_js__["a"]; });
|
4912 | var __WEBPACK_IMPORTED_MODULE_101__indexBy_js__ = __webpack_require__(342);
|
4913 | __webpack_require__.d(__webpack_exports__, "indexBy", function() { return __WEBPACK_IMPORTED_MODULE_101__indexBy_js__["a"]; });
|
4914 | var __WEBPACK_IMPORTED_MODULE_102__countBy_js__ = __webpack_require__(343);
|
4915 | __webpack_require__.d(__webpack_exports__, "countBy", function() { return __WEBPACK_IMPORTED_MODULE_102__countBy_js__["a"]; });
|
4916 | var __WEBPACK_IMPORTED_MODULE_103__partition_js__ = __webpack_require__(344);
|
4917 | __webpack_require__.d(__webpack_exports__, "partition", function() { return __WEBPACK_IMPORTED_MODULE_103__partition_js__["a"]; });
|
4918 | var __WEBPACK_IMPORTED_MODULE_104__toArray_js__ = __webpack_require__(345);
|
4919 | __webpack_require__.d(__webpack_exports__, "toArray", function() { return __WEBPACK_IMPORTED_MODULE_104__toArray_js__["a"]; });
|
4920 | var __WEBPACK_IMPORTED_MODULE_105__size_js__ = __webpack_require__(346);
|
4921 | __webpack_require__.d(__webpack_exports__, "size", function() { return __WEBPACK_IMPORTED_MODULE_105__size_js__["a"]; });
|
4922 | var __WEBPACK_IMPORTED_MODULE_106__pick_js__ = __webpack_require__(211);
|
4923 | __webpack_require__.d(__webpack_exports__, "pick", function() { return __WEBPACK_IMPORTED_MODULE_106__pick_js__["a"]; });
|
4924 | var __WEBPACK_IMPORTED_MODULE_107__omit_js__ = __webpack_require__(348);
|
4925 | __webpack_require__.d(__webpack_exports__, "omit", function() { return __WEBPACK_IMPORTED_MODULE_107__omit_js__["a"]; });
|
4926 | var __WEBPACK_IMPORTED_MODULE_108__first_js__ = __webpack_require__(349);
|
4927 | __webpack_require__.d(__webpack_exports__, "first", function() { return __WEBPACK_IMPORTED_MODULE_108__first_js__["a"]; });
|
4928 | __webpack_require__.d(__webpack_exports__, "head", function() { return __WEBPACK_IMPORTED_MODULE_108__first_js__["a"]; });
|
4929 | __webpack_require__.d(__webpack_exports__, "take", function() { return __WEBPACK_IMPORTED_MODULE_108__first_js__["a"]; });
|
4930 | var __WEBPACK_IMPORTED_MODULE_109__initial_js__ = __webpack_require__(212);
|
4931 | __webpack_require__.d(__webpack_exports__, "initial", function() { return __WEBPACK_IMPORTED_MODULE_109__initial_js__["a"]; });
|
4932 | var __WEBPACK_IMPORTED_MODULE_110__last_js__ = __webpack_require__(350);
|
4933 | __webpack_require__.d(__webpack_exports__, "last", function() { return __WEBPACK_IMPORTED_MODULE_110__last_js__["a"]; });
|
4934 | var __WEBPACK_IMPORTED_MODULE_111__rest_js__ = __webpack_require__(213);
|
4935 | __webpack_require__.d(__webpack_exports__, "rest", function() { return __WEBPACK_IMPORTED_MODULE_111__rest_js__["a"]; });
|
4936 | __webpack_require__.d(__webpack_exports__, "tail", function() { return __WEBPACK_IMPORTED_MODULE_111__rest_js__["a"]; });
|
4937 | __webpack_require__.d(__webpack_exports__, "drop", function() { return __WEBPACK_IMPORTED_MODULE_111__rest_js__["a"]; });
|
4938 | var __WEBPACK_IMPORTED_MODULE_112__compact_js__ = __webpack_require__(351);
|
4939 | __webpack_require__.d(__webpack_exports__, "compact", function() { return __WEBPACK_IMPORTED_MODULE_112__compact_js__["a"]; });
|
4940 | var __WEBPACK_IMPORTED_MODULE_113__flatten_js__ = __webpack_require__(352);
|
4941 | __webpack_require__.d(__webpack_exports__, "flatten", function() { return __WEBPACK_IMPORTED_MODULE_113__flatten_js__["a"]; });
|
4942 | var __WEBPACK_IMPORTED_MODULE_114__without_js__ = __webpack_require__(353);
|
4943 | __webpack_require__.d(__webpack_exports__, "without", function() { return __WEBPACK_IMPORTED_MODULE_114__without_js__["a"]; });
|
4944 | var __WEBPACK_IMPORTED_MODULE_115__uniq_js__ = __webpack_require__(215);
|
4945 | __webpack_require__.d(__webpack_exports__, "uniq", function() { return __WEBPACK_IMPORTED_MODULE_115__uniq_js__["a"]; });
|
4946 | __webpack_require__.d(__webpack_exports__, "unique", function() { return __WEBPACK_IMPORTED_MODULE_115__uniq_js__["a"]; });
|
4947 | var __WEBPACK_IMPORTED_MODULE_116__union_js__ = __webpack_require__(354);
|
4948 | __webpack_require__.d(__webpack_exports__, "union", function() { return __WEBPACK_IMPORTED_MODULE_116__union_js__["a"]; });
|
4949 | var __WEBPACK_IMPORTED_MODULE_117__intersection_js__ = __webpack_require__(355);
|
4950 | __webpack_require__.d(__webpack_exports__, "intersection", function() { return __WEBPACK_IMPORTED_MODULE_117__intersection_js__["a"]; });
|
4951 | var __WEBPACK_IMPORTED_MODULE_118__difference_js__ = __webpack_require__(214);
|
4952 | __webpack_require__.d(__webpack_exports__, "difference", function() { return __WEBPACK_IMPORTED_MODULE_118__difference_js__["a"]; });
|
4953 | var __WEBPACK_IMPORTED_MODULE_119__unzip_js__ = __webpack_require__(216);
|
4954 | __webpack_require__.d(__webpack_exports__, "unzip", function() { return __WEBPACK_IMPORTED_MODULE_119__unzip_js__["a"]; });
|
4955 | __webpack_require__.d(__webpack_exports__, "transpose", function() { return __WEBPACK_IMPORTED_MODULE_119__unzip_js__["a"]; });
|
4956 | var __WEBPACK_IMPORTED_MODULE_120__zip_js__ = __webpack_require__(356);
|
4957 | __webpack_require__.d(__webpack_exports__, "zip", function() { return __WEBPACK_IMPORTED_MODULE_120__zip_js__["a"]; });
|
4958 | var __WEBPACK_IMPORTED_MODULE_121__object_js__ = __webpack_require__(357);
|
4959 | __webpack_require__.d(__webpack_exports__, "object", function() { return __WEBPACK_IMPORTED_MODULE_121__object_js__["a"]; });
|
4960 | var __WEBPACK_IMPORTED_MODULE_122__range_js__ = __webpack_require__(358);
|
4961 | __webpack_require__.d(__webpack_exports__, "range", function() { return __WEBPACK_IMPORTED_MODULE_122__range_js__["a"]; });
|
4962 | var __WEBPACK_IMPORTED_MODULE_123__chunk_js__ = __webpack_require__(359);
|
4963 | __webpack_require__.d(__webpack_exports__, "chunk", function() { return __WEBPACK_IMPORTED_MODULE_123__chunk_js__["a"]; });
|
4964 | var __WEBPACK_IMPORTED_MODULE_124__mixin_js__ = __webpack_require__(360);
|
4965 | __webpack_require__.d(__webpack_exports__, "mixin", function() { return __WEBPACK_IMPORTED_MODULE_124__mixin_js__["a"]; });
|
4966 | var __WEBPACK_IMPORTED_MODULE_125__underscore_array_methods_js__ = __webpack_require__(361);
|
4967 | __webpack_require__.d(__webpack_exports__, "default", function() { return __WEBPACK_IMPORTED_MODULE_125__underscore_array_methods_js__["a"]; });
|
4968 |
|
4969 |
|
4970 |
|
4971 |
|
4972 |
|
4973 |
|
4974 |
|
4975 |
|
4976 |
|
4977 |
|
4978 |
|
4979 |
|
4980 |
|
4981 |
|
4982 |
|
4983 |
|
4984 |
|
4985 |
|
4986 |
|
4987 |
|
4988 |
|
4989 |
|
4990 |
|
4991 |
|
4992 |
|
4993 |
|
4994 |
|
4995 |
|
4996 |
|
4997 |
|
4998 |
|
4999 |
|
5000 |
|
5001 |
|
5002 |
|
5003 |
|
5004 |
|
5005 |
|
5006 |
|
5007 |
|
5008 |
|
5009 |
|
5010 |
|
5011 |
|
5012 |
|
5013 |
|
5014 |
|
5015 |
|
5016 |
|
5017 |
|
5018 |
|
5019 |
|
5020 |
|
5021 |
|
5022 |
|
5023 |
|
5024 |
|
5025 |
|
5026 |
|
5027 |
|
5028 |
|
5029 |
|
5030 |
|
5031 |
|
5032 |
|
5033 |
|
5034 |
|
5035 |
|
5036 |
|
5037 |
|
5038 |
|
5039 |
|
5040 |
|
5041 |
|
5042 |
|
5043 |
|
5044 |
|
5045 |
|
5046 |
|
5047 |
|
5048 |
|
5049 |
|
5050 |
|
5051 |
|
5052 |
|
5053 |
|
5054 |
|
5055 |
|
5056 |
|
5057 |
|
5058 |
|
5059 |
|
5060 |
|
5061 |
|
5062 |
|
5063 |
|
5064 |
|
5065 |
|
5066 |
|
5067 |
|
5068 |
|
5069 |
|
5070 |
|
5071 |
|
5072 |
|
5073 |
|
5074 |
|
5075 |
|
5076 |
|
5077 |
|
5078 |
|
5079 |
|
5080 |
|
5081 |
|
5082 |
|
5083 |
|
5084 |
|
5085 |
|
5086 |
|
5087 |
|
5088 |
|
5089 |
|
5090 |
|
5091 |
|
5092 |
|
5093 |
|
5094 |
|
5095 |
|
5096 |
|
5097 |
|
5098 |
|
5099 |
|
5100 |
|
5101 |
|
5102 |
|
5103 |
|
5104 |
|
5105 |
|
5106 |
|
5107 |
|
5108 |
|
5109 |
|
5110 |
|
5111 |
|
5112 |
|
5113 |
|
5114 |
|
5115 |
|
5116 |
|
5117 |
|
5118 |
|
5119 |
|
5120 |
|
5121 |
|
5122 |
|
5123 |
|
5124 |
|
5125 |
|
5126 |
|
5127 |
|
5128 |
|
5129 |
|
5130 |
|
5131 |
|
5132 |
|
5133 |
|
5134 |
|
5135 |
|
5136 |
|
5137 |
|
5138 |
|
5139 |
|
5140 |
|
5141 |
|
5142 |
|
5143 |
|
5144 |
|
5145 |
|
5146 |
|
5147 |
|
5148 |
|
5149 |
|
5150 | }),
|
5151 |
|
5152 | (function(module, __webpack_exports__, __webpack_require__) {
|
5153 |
|
5154 | "use strict";
|
5155 | var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(17);
|
5156 |
|
5157 |
|
5158 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" ])('String'));
|
5159 |
|
5160 |
|
5161 | }),
|
5162 |
|
5163 | (function(module, __webpack_exports__, __webpack_require__) {
|
5164 |
|
5165 | "use strict";
|
5166 | var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(17);
|
5167 | var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(27);
|
5168 | var __WEBPACK_IMPORTED_MODULE_2__isArrayBuffer_js__ = __webpack_require__(174);
|
5169 | var __WEBPACK_IMPORTED_MODULE_3__stringTagBug_js__ = __webpack_require__(79);
|
5170 |
|
5171 |
|
5172 |
|
5173 |
|
5174 |
|
5175 | var isDataView = Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" ])('DataView');
|
5176 |
|
5177 |
|
5178 |
|
5179 | function ie10IsDataView(obj) {
|
5180 | return obj != null && Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" ])(obj.getInt8) && Object(__WEBPACK_IMPORTED_MODULE_2__isArrayBuffer_js__["a" ])(obj.buffer);
|
5181 | }
|
5182 |
|
5183 | __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_3__stringTagBug_js__["a" ] ? ie10IsDataView : isDataView);
|
5184 |
|
5185 |
|
5186 | }),
|
5187 |
|
5188 | (function(module, __webpack_exports__, __webpack_require__) {
|
5189 |
|
5190 | "use strict";
|
5191 | var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(17);
|
5192 | var __WEBPACK_IMPORTED_MODULE_1__has_js__ = __webpack_require__(40);
|
5193 |
|
5194 |
|
5195 |
|
5196 | var isArguments = Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" ])('Arguments');
|
5197 |
|
5198 |
|
5199 |
|
5200 | (function() {
|
5201 | if (!isArguments(arguments)) {
|
5202 | isArguments = function(obj) {
|
5203 | return Object(__WEBPACK_IMPORTED_MODULE_1__has_js__["a" ])(obj, 'callee');
|
5204 | };
|
5205 | }
|
5206 | }());
|
5207 |
|
5208 | __webpack_exports__["a"] = (isArguments);
|
5209 |
|
5210 |
|
5211 | }),
|
5212 |
|
5213 | (function(module, __webpack_exports__, __webpack_require__) {
|
5214 |
|
5215 | "use strict";
|
5216 | var __WEBPACK_IMPORTED_MODULE_0__shallowProperty_js__ = __webpack_require__(179);
|
5217 |
|
5218 |
|
5219 |
|
5220 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__shallowProperty_js__["a" ])('byteLength'));
|
5221 |
|
5222 |
|
5223 | }),
|
5224 |
|
5225 | (function(module, __webpack_exports__, __webpack_require__) {
|
5226 |
|
5227 | "use strict";
|
5228 | __webpack_exports__["a"] = ie11fingerprint;
|
5229 | __webpack_require__.d(__webpack_exports__, "b", function() { return mapMethods; });
|
5230 | __webpack_require__.d(__webpack_exports__, "d", function() { return weakMapMethods; });
|
5231 | __webpack_require__.d(__webpack_exports__, "c", function() { return setMethods; });
|
5232 | var __WEBPACK_IMPORTED_MODULE_0__getLength_js__ = __webpack_require__(28);
|
5233 | var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(27);
|
5234 | var __WEBPACK_IMPORTED_MODULE_2__allKeys_js__ = __webpack_require__(80);
|
5235 |
|
5236 |
|
5237 |
|
5238 |
|
5239 |
|
5240 |
|
5241 |
|
5242 |
|
5243 | function ie11fingerprint(methods) {
|
5244 | var length = Object(__WEBPACK_IMPORTED_MODULE_0__getLength_js__["a" ])(methods);
|
5245 | return function(obj) {
|
5246 | if (obj == null) return false;
|
5247 |
|
5248 | var keys = Object(__WEBPACK_IMPORTED_MODULE_2__allKeys_js__["a" ])(obj);
|
5249 | if (Object(__WEBPACK_IMPORTED_MODULE_0__getLength_js__["a" ])(keys)) return false;
|
5250 | for (var i = 0; i < length; i++) {
|
5251 | if (!Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" ])(obj[methods[i]])) return false;
|
5252 | }
|
5253 |
|
5254 |
|
5255 |
|
5256 | return methods !== weakMapMethods || !Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" ])(obj[forEachName]);
|
5257 | };
|
5258 | }
|
5259 |
|
5260 |
|
5261 |
|
5262 | var forEachName = 'forEach',
|
5263 | hasName = 'has',
|
5264 | commonInit = ['clear', 'delete'],
|
5265 | mapTail = ['get', hasName, 'set'];
|
5266 |
|
5267 |
|
5268 |
|
5269 | var mapMethods = commonInit.concat(forEachName, mapTail),
|
5270 | weakMapMethods = commonInit.concat(mapTail),
|
5271 | setMethods = ['add'].concat(commonInit, forEachName, hasName);
|
5272 |
|
5273 |
|
5274 | }),
|
5275 |
|
5276 | (function(module, __webpack_exports__, __webpack_require__) {
|
5277 |
|
5278 | "use strict";
|
5279 | __webpack_exports__["a"] = createAssigner;
|
5280 |
|
5281 | function createAssigner(keysFunc, defaults) {
|
5282 | return function(obj) {
|
5283 | var length = arguments.length;
|
5284 | if (defaults) obj = Object(obj);
|
5285 | if (length < 2 || obj == null) return obj;
|
5286 | for (var index = 1; index < length; index++) {
|
5287 | var source = arguments[index],
|
5288 | keys = keysFunc(source),
|
5289 | l = keys.length;
|
5290 | for (var i = 0; i < l; i++) {
|
5291 | var key = keys[i];
|
5292 | if (!defaults || obj[key] === void 0) obj[key] = source[key];
|
5293 | }
|
5294 | }
|
5295 | return obj;
|
5296 | };
|
5297 | }
|
5298 |
|
5299 |
|
5300 | }),
|
5301 |
|
5302 | (function(module, __webpack_exports__, __webpack_require__) {
|
5303 |
|
5304 | "use strict";
|
5305 | var __WEBPACK_IMPORTED_MODULE_0__createAssigner_js__ = __webpack_require__(132);
|
5306 | var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(15);
|
5307 |
|
5308 |
|
5309 |
|
5310 |
|
5311 |
|
5312 |
|
5313 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createAssigner_js__["a" ])(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" ]));
|
5314 |
|
5315 |
|
5316 | }),
|
5317 |
|
5318 | (function(module, __webpack_exports__, __webpack_require__) {
|
5319 |
|
5320 | "use strict";
|
5321 | __webpack_exports__["a"] = deepGet;
|
5322 |
|
5323 | function deepGet(obj, path) {
|
5324 | var length = path.length;
|
5325 | for (var i = 0; i < length; i++) {
|
5326 | if (obj == null) return void 0;
|
5327 | obj = obj[path[i]];
|
5328 | }
|
5329 | return length ? obj : void 0;
|
5330 | }
|
5331 |
|
5332 |
|
5333 | }),
|
5334 |
|
5335 | (function(module, __webpack_exports__, __webpack_require__) {
|
5336 |
|
5337 | "use strict";
|
5338 | __webpack_exports__["a"] = identity;
|
5339 |
|
5340 | function identity(value) {
|
5341 | return value;
|
5342 | }
|
5343 |
|
5344 |
|
5345 | }),
|
5346 |
|
5347 | (function(module, __webpack_exports__, __webpack_require__) {
|
5348 |
|
5349 | "use strict";
|
5350 | __webpack_exports__["a"] = property;
|
5351 | var __WEBPACK_IMPORTED_MODULE_0__deepGet_js__ = __webpack_require__(134);
|
5352 | var __WEBPACK_IMPORTED_MODULE_1__toPath_js__ = __webpack_require__(81);
|
5353 |
|
5354 |
|
5355 |
|
5356 |
|
5357 |
|
5358 | function property(path) {
|
5359 | path = Object(__WEBPACK_IMPORTED_MODULE_1__toPath_js__["a" ])(path);
|
5360 | return function(obj) {
|
5361 | return Object(__WEBPACK_IMPORTED_MODULE_0__deepGet_js__["a" ])(obj, path);
|
5362 | };
|
5363 | }
|
5364 |
|
5365 |
|
5366 | }),
|
5367 |
|
5368 | (function(module, __webpack_exports__, __webpack_require__) {
|
5369 |
|
5370 | "use strict";
|
5371 |
|
5372 | __webpack_exports__["a"] = (Date.now || function() {
|
5373 | return new Date().getTime();
|
5374 | });
|
5375 |
|
5376 |
|
5377 | }),
|
5378 |
|
5379 | (function(module, __webpack_exports__, __webpack_require__) {
|
5380 |
|
5381 | "use strict";
|
5382 | __webpack_exports__["a"] = negate;
|
5383 |
|
5384 | function negate(predicate) {
|
5385 | return function() {
|
5386 | return !predicate.apply(this, arguments);
|
5387 | };
|
5388 | }
|
5389 |
|
5390 |
|
5391 | }),
|
5392 |
|
5393 | (function(module, __webpack_exports__, __webpack_require__) {
|
5394 |
|
5395 | "use strict";
|
5396 | var __WEBPACK_IMPORTED_MODULE_0__createPredicateIndexFinder_js__ = __webpack_require__(202);
|
5397 |
|
5398 |
|
5399 |
|
5400 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createPredicateIndexFinder_js__["a" ])(1));
|
5401 |
|
5402 |
|
5403 | }),
|
5404 |
|
5405 | (function(module, __webpack_exports__, __webpack_require__) {
|
5406 |
|
5407 | "use strict";
|
5408 | __webpack_exports__["a"] = pluck;
|
5409 | var __WEBPACK_IMPORTED_MODULE_0__map_js__ = __webpack_require__(64);
|
5410 | var __WEBPACK_IMPORTED_MODULE_1__property_js__ = __webpack_require__(136);
|
5411 |
|
5412 |
|
5413 |
|
5414 |
|
5415 | function pluck(obj, key) {
|
5416 | return Object(__WEBPACK_IMPORTED_MODULE_0__map_js__["a" ])(obj, Object(__WEBPACK_IMPORTED_MODULE_1__property_js__["a" ])(key));
|
5417 | }
|
5418 |
|
5419 |
|
5420 | }),
|
5421 |
|
5422 | (function(module, exports, __webpack_require__) {
|
5423 |
|
5424 | module.exports = __webpack_require__(371);
|
5425 |
|
5426 | }),
|
5427 |
|
5428 | (function(module, exports, __webpack_require__) {
|
5429 |
|
5430 | module.exports = __webpack_require__(222);
|
5431 |
|
5432 | }),
|
5433 |
|
5434 | (function(module, exports, __webpack_require__) {
|
5435 |
|
5436 | module.exports = __webpack_require__(230);
|
5437 |
|
5438 | }),
|
5439 |
|
5440 | (function(module, exports, __webpack_require__) {
|
5441 |
|
5442 | var wellKnownSymbol = __webpack_require__(9);
|
5443 |
|
5444 | exports.f = wellKnownSymbol;
|
5445 |
|
5446 |
|
5447 | }),
|
5448 |
|
5449 | (function(module, exports, __webpack_require__) {
|
5450 |
|
5451 | module.exports = __webpack_require__(477);
|
5452 |
|
5453 | }),
|
5454 |
|
5455 | (function(module, exports, __webpack_require__) {
|
5456 |
|
5457 | var defineBuiltIn = __webpack_require__(39);
|
5458 |
|
5459 | module.exports = function (target, src, options) {
|
5460 | for (var key in src) {
|
5461 | if (options && options.unsafe && target[key]) target[key] = src[key];
|
5462 | else defineBuiltIn(target, key, src[key], options);
|
5463 | } return target;
|
5464 | };
|
5465 |
|
5466 |
|
5467 | }),
|
5468 |
|
5469 | (function(module, exports, __webpack_require__) {
|
5470 |
|
5471 |
|
5472 | var NATIVE_SYMBOL = __webpack_require__(57);
|
5473 |
|
5474 | module.exports = NATIVE_SYMBOL
|
5475 | && !Symbol.sham
|
5476 | && typeof Symbol.iterator == 'symbol';
|
5477 |
|
5478 |
|
5479 | }),
|
5480 |
|
5481 | (function(module, exports, __webpack_require__) {
|
5482 |
|
5483 | var DESCRIPTORS = __webpack_require__(16);
|
5484 | var fails = __webpack_require__(3);
|
5485 | var createElement = __webpack_require__(118);
|
5486 |
|
5487 |
|
5488 | module.exports = !DESCRIPTORS && !fails(function () {
|
5489 |
|
5490 | return Object.defineProperty(createElement('div'), 'a', {
|
5491 | get: function () { return 7; }
|
5492 | }).a != 7;
|
5493 | });
|
5494 |
|
5495 |
|
5496 | }),
|
5497 |
|
5498 | (function(module, exports, __webpack_require__) {
|
5499 |
|
5500 | var fails = __webpack_require__(3);
|
5501 | var isCallable = __webpack_require__(7);
|
5502 |
|
5503 | var replacement = /#|\.prototype\./;
|
5504 |
|
5505 | var isForced = function (feature, detection) {
|
5506 | var value = data[normalize(feature)];
|
5507 | return value == POLYFILL ? true
|
5508 | : value == NATIVE ? false
|
5509 | : isCallable(detection) ? fails(detection)
|
5510 | : !!detection;
|
5511 | };
|
5512 |
|
5513 | var normalize = isForced.normalize = function (string) {
|
5514 | return String(string).replace(replacement, '.').toLowerCase();
|
5515 | };
|
5516 |
|
5517 | var data = isForced.data = {};
|
5518 | var NATIVE = isForced.NATIVE = 'N';
|
5519 | var POLYFILL = isForced.POLYFILL = 'P';
|
5520 |
|
5521 | module.exports = isForced;
|
5522 |
|
5523 |
|
5524 | }),
|
5525 |
|
5526 | (function(module, exports, __webpack_require__) {
|
5527 |
|
5528 | var DESCRIPTORS = __webpack_require__(16);
|
5529 | var fails = __webpack_require__(3);
|
5530 |
|
5531 |
|
5532 |
|
5533 | module.exports = DESCRIPTORS && fails(function () {
|
5534 |
|
5535 | return Object.defineProperty(function () { }, 'prototype', {
|
5536 | value: 42,
|
5537 | writable: false
|
5538 | }).prototype != 42;
|
5539 | });
|
5540 |
|
5541 |
|
5542 | }),
|
5543 |
|
5544 | (function(module, exports, __webpack_require__) {
|
5545 |
|
5546 | var fails = __webpack_require__(3);
|
5547 |
|
5548 | module.exports = !fails(function () {
|
5549 | function F() { }
|
5550 | F.prototype.constructor = null;
|
5551 |
|
5552 | return Object.getPrototypeOf(new F()) !== F.prototype;
|
5553 | });
|
5554 |
|
5555 |
|
5556 | }),
|
5557 |
|
5558 | (function(module, exports, __webpack_require__) {
|
5559 |
|
5560 | var uncurryThis = __webpack_require__(4);
|
5561 | var hasOwn = __webpack_require__(14);
|
5562 | var toIndexedObject = __webpack_require__(33);
|
5563 | var indexOf = __webpack_require__(153).indexOf;
|
5564 | var hiddenKeys = __webpack_require__(74);
|
5565 |
|
5566 | var push = uncurryThis([].push);
|
5567 |
|
5568 | module.exports = function (object, names) {
|
5569 | var O = toIndexedObject(object);
|
5570 | var i = 0;
|
5571 | var result = [];
|
5572 | var key;
|
5573 | for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
|
5574 |
|
5575 | while (names.length > i) if (hasOwn(O, key = names[i++])) {
|
5576 | ~indexOf(result, key) || push(result, key);
|
5577 | }
|
5578 | return result;
|
5579 | };
|
5580 |
|
5581 |
|
5582 | }),
|
5583 |
|
5584 | (function(module, exports, __webpack_require__) {
|
5585 |
|
5586 | var toIndexedObject = __webpack_require__(33);
|
5587 | var toAbsoluteIndex = __webpack_require__(119);
|
5588 | var lengthOfArrayLike = __webpack_require__(46);
|
5589 |
|
5590 |
|
5591 | var createMethod = function (IS_INCLUDES) {
|
5592 | return function ($this, el, fromIndex) {
|
5593 | var O = toIndexedObject($this);
|
5594 | var length = lengthOfArrayLike(O);
|
5595 | var index = toAbsoluteIndex(fromIndex, length);
|
5596 | var value;
|
5597 |
|
5598 |
|
5599 | if (IS_INCLUDES && el != el) while (length > index) {
|
5600 | value = O[index++];
|
5601 |
|
5602 | if (value != value) return true;
|
5603 |
|
5604 | } else for (;length > index; index++) {
|
5605 | if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
5606 | } return !IS_INCLUDES && -1;
|
5607 | };
|
5608 | };
|
5609 |
|
5610 | module.exports = {
|
5611 |
|
5612 |
|
5613 | includes: createMethod(true),
|
5614 |
|
5615 |
|
5616 | indexOf: createMethod(false)
|
5617 | };
|
5618 |
|
5619 |
|
5620 | }),
|
5621 |
|
5622 | (function(module, exports, __webpack_require__) {
|
5623 |
|
5624 | var DESCRIPTORS = __webpack_require__(16);
|
5625 | var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(150);
|
5626 | var definePropertyModule = __webpack_require__(22);
|
5627 | var anObject = __webpack_require__(19);
|
5628 | var toIndexedObject = __webpack_require__(33);
|
5629 | var objectKeys = __webpack_require__(98);
|
5630 |
|
5631 |
|
5632 |
|
5633 |
|
5634 | exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
5635 | anObject(O);
|
5636 | var props = toIndexedObject(Properties);
|
5637 | var keys = objectKeys(Properties);
|
5638 | var length = keys.length;
|
5639 | var index = 0;
|
5640 | var key;
|
5641 | while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
5642 | return O;
|
5643 | };
|
5644 |
|
5645 |
|
5646 | }),
|
5647 |
|
5648 | (function(module, exports, __webpack_require__) {
|
5649 |
|
5650 | var getBuiltIn = __webpack_require__(18);
|
5651 |
|
5652 | module.exports = getBuiltIn('document', 'documentElement');
|
5653 |
|
5654 |
|
5655 | }),
|
5656 |
|
5657 | (function(module, exports, __webpack_require__) {
|
5658 |
|
5659 | var wellKnownSymbol = __webpack_require__(9);
|
5660 | var Iterators = __webpack_require__(58);
|
5661 |
|
5662 | var ITERATOR = wellKnownSymbol('iterator');
|
5663 | var ArrayPrototype = Array.prototype;
|
5664 |
|
5665 |
|
5666 | module.exports = function (it) {
|
5667 | return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
|
5668 | };
|
5669 |
|
5670 |
|
5671 | }),
|
5672 |
|
5673 | (function(module, exports, __webpack_require__) {
|
5674 |
|
5675 | var call = __webpack_require__(13);
|
5676 | var aCallable = __webpack_require__(31);
|
5677 | var anObject = __webpack_require__(19);
|
5678 | var tryToString = __webpack_require__(72);
|
5679 | var getIteratorMethod = __webpack_require__(99);
|
5680 |
|
5681 | var $TypeError = TypeError;
|
5682 |
|
5683 | module.exports = function (argument, usingIterator) {
|
5684 | var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
|
5685 | if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));
|
5686 | throw $TypeError(tryToString(argument) + ' is not iterable');
|
5687 | };
|
5688 |
|
5689 |
|
5690 | }),
|
5691 |
|
5692 | (function(module, exports, __webpack_require__) {
|
5693 |
|
5694 | var call = __webpack_require__(13);
|
5695 | var anObject = __webpack_require__(19);
|
5696 | var getMethod = __webpack_require__(116);
|
5697 |
|
5698 | module.exports = function (iterator, kind, value) {
|
5699 | var innerResult, innerError;
|
5700 | anObject(iterator);
|
5701 | try {
|
5702 | innerResult = getMethod(iterator, 'return');
|
5703 | if (!innerResult) {
|
5704 | if (kind === 'throw') throw value;
|
5705 | return value;
|
5706 | }
|
5707 | innerResult = call(innerResult, iterator);
|
5708 | } catch (error) {
|
5709 | innerError = true;
|
5710 | innerResult = error;
|
5711 | }
|
5712 | if (kind === 'throw') throw value;
|
5713 | if (innerError) throw innerResult;
|
5714 | anObject(innerResult);
|
5715 | return value;
|
5716 | };
|
5717 |
|
5718 |
|
5719 | }),
|
5720 |
|
5721 | (function(module, exports) {
|
5722 |
|
5723 | module.exports = function () { };
|
5724 |
|
5725 |
|
5726 | }),
|
5727 |
|
5728 | (function(module, exports, __webpack_require__) {
|
5729 |
|
5730 | var global = __webpack_require__(6);
|
5731 | var isCallable = __webpack_require__(7);
|
5732 | var inspectSource = __webpack_require__(123);
|
5733 |
|
5734 | var WeakMap = global.WeakMap;
|
5735 |
|
5736 | module.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));
|
5737 |
|
5738 |
|
5739 | }),
|
5740 |
|
5741 | (function(module, exports, __webpack_require__) {
|
5742 |
|
5743 | "use strict";
|
5744 |
|
5745 | var fails = __webpack_require__(3);
|
5746 | var isCallable = __webpack_require__(7);
|
5747 | var create = __webpack_require__(47);
|
5748 | var getPrototypeOf = __webpack_require__(93);
|
5749 | var defineBuiltIn = __webpack_require__(39);
|
5750 | var wellKnownSymbol = __webpack_require__(9);
|
5751 | var IS_PURE = __webpack_require__(32);
|
5752 |
|
5753 | var ITERATOR = wellKnownSymbol('iterator');
|
5754 | var BUGGY_SAFARI_ITERATORS = false;
|
5755 |
|
5756 |
|
5757 |
|
5758 | var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
5759 |
|
5760 |
|
5761 | if ([].keys) {
|
5762 | arrayIterator = [].keys();
|
5763 |
|
5764 | if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
|
5765 | else {
|
5766 | PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
|
5767 | if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
|
5768 | }
|
5769 | }
|
5770 |
|
5771 | var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
|
5772 | var test = {};
|
5773 |
|
5774 | return IteratorPrototype[ITERATOR].call(test) !== test;
|
5775 | });
|
5776 |
|
5777 | if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
|
5778 | else if (IS_PURE) IteratorPrototype = create(IteratorPrototype);
|
5779 |
|
5780 |
|
5781 |
|
5782 | if (!isCallable(IteratorPrototype[ITERATOR])) {
|
5783 | defineBuiltIn(IteratorPrototype, ITERATOR, function () {
|
5784 | return this;
|
5785 | });
|
5786 | }
|
5787 |
|
5788 | module.exports = {
|
5789 | IteratorPrototype: IteratorPrototype,
|
5790 | BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
|
5791 | };
|
5792 |
|
5793 |
|
5794 | }),
|
5795 |
|
5796 | (function(module, exports, __webpack_require__) {
|
5797 |
|
5798 | "use strict";
|
5799 |
|
5800 | var getBuiltIn = __webpack_require__(18);
|
5801 | var definePropertyModule = __webpack_require__(22);
|
5802 | var wellKnownSymbol = __webpack_require__(9);
|
5803 | var DESCRIPTORS = __webpack_require__(16);
|
5804 |
|
5805 | var SPECIES = wellKnownSymbol('species');
|
5806 |
|
5807 | module.exports = function (CONSTRUCTOR_NAME) {
|
5808 | var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
|
5809 | var defineProperty = definePropertyModule.f;
|
5810 |
|
5811 | if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
|
5812 | defineProperty(Constructor, SPECIES, {
|
5813 | configurable: true,
|
5814 | get: function () { return this; }
|
5815 | });
|
5816 | }
|
5817 | };
|
5818 |
|
5819 |
|
5820 | }),
|
5821 |
|
5822 | (function(module, exports, __webpack_require__) {
|
5823 |
|
5824 | var anObject = __webpack_require__(19);
|
5825 | var aConstructor = __webpack_require__(164);
|
5826 | var wellKnownSymbol = __webpack_require__(9);
|
5827 |
|
5828 | var SPECIES = wellKnownSymbol('species');
|
5829 |
|
5830 |
|
5831 |
|
5832 | module.exports = function (O, defaultConstructor) {
|
5833 | var C = anObject(O).constructor;
|
5834 | var S;
|
5835 | return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aConstructor(S);
|
5836 | };
|
5837 |
|
5838 |
|
5839 | }),
|
5840 |
|
5841 | (function(module, exports, __webpack_require__) {
|
5842 |
|
5843 | var isConstructor = __webpack_require__(101);
|
5844 | var tryToString = __webpack_require__(72);
|
5845 |
|
5846 | var $TypeError = TypeError;
|
5847 |
|
5848 |
|
5849 | module.exports = function (argument) {
|
5850 | if (isConstructor(argument)) return argument;
|
5851 | throw $TypeError(tryToString(argument) + ' is not a constructor');
|
5852 | };
|
5853 |
|
5854 |
|
5855 | }),
|
5856 |
|
5857 | (function(module, exports, __webpack_require__) {
|
5858 |
|
5859 | var global = __webpack_require__(6);
|
5860 | var apply = __webpack_require__(69);
|
5861 | var bind = __webpack_require__(45);
|
5862 | var isCallable = __webpack_require__(7);
|
5863 | var hasOwn = __webpack_require__(14);
|
5864 | var fails = __webpack_require__(3);
|
5865 | var html = __webpack_require__(155);
|
5866 | var arraySlice = __webpack_require__(102);
|
5867 | var createElement = __webpack_require__(118);
|
5868 | var validateArgumentsLength = __webpack_require__(273);
|
5869 | var IS_IOS = __webpack_require__(166);
|
5870 | var IS_NODE = __webpack_require__(125);
|
5871 |
|
5872 | var set = global.setImmediate;
|
5873 | var clear = global.clearImmediate;
|
5874 | var process = global.process;
|
5875 | var Dispatch = global.Dispatch;
|
5876 | var Function = global.Function;
|
5877 | var MessageChannel = global.MessageChannel;
|
5878 | var String = global.String;
|
5879 | var counter = 0;
|
5880 | var queue = {};
|
5881 | var ONREADYSTATECHANGE = 'onreadystatechange';
|
5882 | var location, defer, channel, port;
|
5883 |
|
5884 | try {
|
5885 |
|
5886 | location = global.location;
|
5887 | } catch (error) { }
|
5888 |
|
5889 | var run = function (id) {
|
5890 | if (hasOwn(queue, id)) {
|
5891 | var fn = queue[id];
|
5892 | delete queue[id];
|
5893 | fn();
|
5894 | }
|
5895 | };
|
5896 |
|
5897 | var runner = function (id) {
|
5898 | return function () {
|
5899 | run(id);
|
5900 | };
|
5901 | };
|
5902 |
|
5903 | var listener = function (event) {
|
5904 | run(event.data);
|
5905 | };
|
5906 |
|
5907 | var post = function (id) {
|
5908 |
|
5909 | global.postMessage(String(id), location.protocol + '//' + location.host);
|
5910 | };
|
5911 |
|
5912 |
|
5913 | if (!set || !clear) {
|
5914 | set = function setImmediate(handler) {
|
5915 | validateArgumentsLength(arguments.length, 1);
|
5916 | var fn = isCallable(handler) ? handler : Function(handler);
|
5917 | var args = arraySlice(arguments, 1);
|
5918 | queue[++counter] = function () {
|
5919 | apply(fn, undefined, args);
|
5920 | };
|
5921 | defer(counter);
|
5922 | return counter;
|
5923 | };
|
5924 | clear = function clearImmediate(id) {
|
5925 | delete queue[id];
|
5926 | };
|
5927 |
|
5928 | if (IS_NODE) {
|
5929 | defer = function (id) {
|
5930 | process.nextTick(runner(id));
|
5931 | };
|
5932 |
|
5933 | } else if (Dispatch && Dispatch.now) {
|
5934 | defer = function (id) {
|
5935 | Dispatch.now(runner(id));
|
5936 | };
|
5937 |
|
5938 |
|
5939 | } else if (MessageChannel && !IS_IOS) {
|
5940 | channel = new MessageChannel();
|
5941 | port = channel.port2;
|
5942 | channel.port1.onmessage = listener;
|
5943 | defer = bind(port.postMessage, port);
|
5944 |
|
5945 |
|
5946 | } else if (
|
5947 | global.addEventListener &&
|
5948 | isCallable(global.postMessage) &&
|
5949 | !global.importScripts &&
|
5950 | location && location.protocol !== 'file:' &&
|
5951 | !fails(post)
|
5952 | ) {
|
5953 | defer = post;
|
5954 | global.addEventListener('message', listener, false);
|
5955 |
|
5956 | } else if (ONREADYSTATECHANGE in createElement('script')) {
|
5957 | defer = function (id) {
|
5958 | html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
|
5959 | html.removeChild(this);
|
5960 | run(id);
|
5961 | };
|
5962 | };
|
5963 |
|
5964 | } else {
|
5965 | defer = function (id) {
|
5966 | setTimeout(runner(id), 0);
|
5967 | };
|
5968 | }
|
5969 | }
|
5970 |
|
5971 | module.exports = {
|
5972 | set: set,
|
5973 | clear: clear
|
5974 | };
|
5975 |
|
5976 |
|
5977 | /***/ }),
|
5978 | /* 166 */
|
5979 | /***/ (function(module, exports, __webpack_require__) {
|
5980 |
|
5981 | var userAgent = __webpack_require__(91);
|
5982 |
|
5983 | module.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent);
|
5984 |
|
5985 |
|
5986 | }),
|
5987 |
|
5988 | (function(module, exports, __webpack_require__) {
|
5989 |
|
5990 | var NativePromiseConstructor = __webpack_require__(61);
|
5991 | var checkCorrectnessOfIteration = __webpack_require__(168);
|
5992 | var FORCED_PROMISE_CONSTRUCTOR = __webpack_require__(77).CONSTRUCTOR;
|
5993 |
|
5994 | module.exports = FORCED_PROMISE_CONSTRUCTOR || !checkCorrectnessOfIteration(function (iterable) {
|
5995 | NativePromiseConstructor.all(iterable).then(undefined, function () { });
|
5996 | });
|
5997 |
|
5998 |
|
5999 | }),
|
6000 |
|
6001 | (function(module, exports, __webpack_require__) {
|
6002 |
|
6003 | var wellKnownSymbol = __webpack_require__(9);
|
6004 |
|
6005 | var ITERATOR = wellKnownSymbol('iterator');
|
6006 | var SAFE_CLOSING = false;
|
6007 |
|
6008 | try {
|
6009 | var called = 0;
|
6010 | var iteratorWithReturn = {
|
6011 | next: function () {
|
6012 | return { done: !!called++ };
|
6013 | },
|
6014 | 'return': function () {
|
6015 | SAFE_CLOSING = true;
|
6016 | }
|
6017 | };
|
6018 | iteratorWithReturn[ITERATOR] = function () {
|
6019 | return this;
|
6020 | };
|
6021 |
|
6022 | Array.from(iteratorWithReturn, function () { throw 2; });
|
6023 | } catch (error) { }
|
6024 |
|
6025 | module.exports = function (exec, SKIP_CLOSING) {
|
6026 | if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
|
6027 | var ITERATION_SUPPORT = false;
|
6028 | try {
|
6029 | var object = {};
|
6030 | object[ITERATOR] = function () {
|
6031 | return {
|
6032 | next: function () {
|
6033 | return { done: ITERATION_SUPPORT = true };
|
6034 | }
|
6035 | };
|
6036 | };
|
6037 | exec(object);
|
6038 | } catch (error) { }
|
6039 | return ITERATION_SUPPORT;
|
6040 | };
|
6041 |
|
6042 |
|
6043 | }),
|
6044 |
|
6045 | (function(module, exports, __webpack_require__) {
|
6046 |
|
6047 | var anObject = __webpack_require__(19);
|
6048 | var isObject = __webpack_require__(11);
|
6049 | var newPromiseCapability = __webpack_require__(50);
|
6050 |
|
6051 | module.exports = function (C, x) {
|
6052 | anObject(C);
|
6053 | if (isObject(x) && x.constructor === C) return x;
|
6054 | var promiseCapability = newPromiseCapability.f(C);
|
6055 | var resolve = promiseCapability.resolve;
|
6056 | resolve(x);
|
6057 | return promiseCapability.promise;
|
6058 | };
|
6059 |
|
6060 |
|
6061 | }),
|
6062 |
|
6063 | (function(module, __webpack_exports__, __webpack_require__) {
|
6064 |
|
6065 | "use strict";
|
6066 | __webpack_exports__["a"] = isUndefined;
|
6067 |
|
6068 | function isUndefined(obj) {
|
6069 | return obj === void 0;
|
6070 | }
|
6071 |
|
6072 |
|
6073 | }),
|
6074 |
|
6075 | (function(module, __webpack_exports__, __webpack_require__) {
|
6076 |
|
6077 | "use strict";
|
6078 | __webpack_exports__["a"] = isBoolean;
|
6079 | var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(5);
|
6080 |
|
6081 |
|
6082 |
|
6083 | function isBoolean(obj) {
|
6084 | return obj === true || obj === false || __WEBPACK_IMPORTED_MODULE_0__setup_js__["t" ].call(obj) === '[object Boolean]';
|
6085 | }
|
6086 |
|
6087 |
|
6088 | }),
|
6089 |
|
6090 | (function(module, __webpack_exports__, __webpack_require__) {
|
6091 |
|
6092 | "use strict";
|
6093 | var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(17);
|
6094 |
|
6095 |
|
6096 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" ])('Number'));
|
6097 |
|
6098 |
|
6099 | }),
|
6100 |
|
6101 | (function(module, __webpack_exports__, __webpack_require__) {
|
6102 |
|
6103 | "use strict";
|
6104 | var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(17);
|
6105 |
|
6106 |
|
6107 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" ])('Symbol'));
|
6108 |
|
6109 |
|
6110 | }),
|
6111 |
|
6112 | (function(module, __webpack_exports__, __webpack_require__) {
|
6113 |
|
6114 | "use strict";
|
6115 | var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(17);
|
6116 |
|
6117 |
|
6118 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" ])('ArrayBuffer'));
|
6119 |
|
6120 |
|
6121 | }),
|
6122 |
|
6123 | (function(module, __webpack_exports__, __webpack_require__) {
|
6124 |
|
6125 | "use strict";
|
6126 | __webpack_exports__["a"] = isNaN;
|
6127 | var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(5);
|
6128 | var __WEBPACK_IMPORTED_MODULE_1__isNumber_js__ = __webpack_require__(172);
|
6129 |
|
6130 |
|
6131 |
|
6132 |
|
6133 | function isNaN(obj) {
|
6134 | return Object(__WEBPACK_IMPORTED_MODULE_1__isNumber_js__["a" ])(obj) && Object(__WEBPACK_IMPORTED_MODULE_0__setup_js__["g" ])(obj);
|
6135 | }
|
6136 |
|
6137 |
|
6138 | }),
|
6139 |
|
6140 | (function(module, __webpack_exports__, __webpack_require__) {
|
6141 |
|
6142 | "use strict";
|
6143 | var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(5);
|
6144 | var __WEBPACK_IMPORTED_MODULE_1__isDataView_js__ = __webpack_require__(128);
|
6145 | var __WEBPACK_IMPORTED_MODULE_2__constant_js__ = __webpack_require__(177);
|
6146 | var __WEBPACK_IMPORTED_MODULE_3__isBufferLike_js__ = __webpack_require__(298);
|
6147 |
|
6148 |
|
6149 |
|
6150 |
|
6151 |
|
6152 |
|
6153 | var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
|
6154 | function isTypedArray(obj) {
|
6155 |
|
6156 |
|
6157 | return __WEBPACK_IMPORTED_MODULE_0__setup_js__["l" ] ? (Object(__WEBPACK_IMPORTED_MODULE_0__setup_js__["l" ])(obj) && !Object(__WEBPACK_IMPORTED_MODULE_1__isDataView_js__["a" ])(obj)) :
|
6158 | Object(__WEBPACK_IMPORTED_MODULE_3__isBufferLike_js__["a" ])(obj) && typedArrayPattern.test(__WEBPACK_IMPORTED_MODULE_0__setup_js__["t" ].call(obj));
|
6159 | }
|
6160 |
|
6161 | __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__setup_js__["r" ] ? isTypedArray : Object(__WEBPACK_IMPORTED_MODULE_2__constant_js__["a" ])(false));
|
6162 |
|
6163 |
|
6164 | }),
|
6165 |
|
6166 | (function(module, __webpack_exports__, __webpack_require__) {
|
6167 |
|
6168 | "use strict";
|
6169 | __webpack_exports__["a"] = constant;
|
6170 |
|
6171 | function constant(value) {
|
6172 | return function() {
|
6173 | return value;
|
6174 | };
|
6175 | }
|
6176 |
|
6177 |
|
6178 | }),
|
6179 |
|
6180 | (function(module, __webpack_exports__, __webpack_require__) {
|
6181 |
|
6182 | "use strict";
|
6183 | __webpack_exports__["a"] = createSizePropertyCheck;
|
6184 | var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(5);
|
6185 |
|
6186 |
|
6187 |
|
6188 | function createSizePropertyCheck(getSizeProperty) {
|
6189 | return function(collection) {
|
6190 | var sizeProperty = getSizeProperty(collection);
|
6191 | return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= __WEBPACK_IMPORTED_MODULE_0__setup_js__["b" ];
|
6192 | }
|
6193 | }
|
6194 |
|
6195 |
|
6196 | }),
|
6197 |
|
6198 | (function(module, __webpack_exports__, __webpack_require__) {
|
6199 |
|
6200 | "use strict";
|
6201 | __webpack_exports__["a"] = shallowProperty;
|
6202 |
|
6203 | function shallowProperty(key) {
|
6204 | return function(obj) {
|
6205 | return obj == null ? void 0 : obj[key];
|
6206 | };
|
6207 | }
|
6208 |
|
6209 |
|
6210 | }),
|
6211 |
|
6212 | (function(module, __webpack_exports__, __webpack_require__) {
|
6213 |
|
6214 | "use strict";
|
6215 | __webpack_exports__["a"] = collectNonEnumProps;
|
6216 | var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(5);
|
6217 | var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(27);
|
6218 | var __WEBPACK_IMPORTED_MODULE_2__has_js__ = __webpack_require__(40);
|
6219 |
|
6220 |
|
6221 |
|
6222 |
|
6223 |
|
6224 |
|
6225 |
|
6226 |
|
6227 | function emulatedSet(keys) {
|
6228 | var hash = {};
|
6229 | for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
|
6230 | return {
|
6231 | contains: function(key) { return hash[key]; },
|
6232 | push: function(key) {
|
6233 | hash[key] = true;
|
6234 | return keys.push(key);
|
6235 | }
|
6236 | };
|
6237 | }
|
6238 |
|
6239 |
|
6240 |
|
6241 |
|
6242 | function collectNonEnumProps(obj, keys) {
|
6243 | keys = emulatedSet(keys);
|
6244 | var nonEnumIdx = __WEBPACK_IMPORTED_MODULE_0__setup_js__["n" ].length;
|
6245 | var constructor = obj.constructor;
|
6246 | var proto = Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" /* default */])(constructor) && constructor.prototype || __WEBPACK_IMPORTED_MODULE_0__setup_js__["c" /* ObjProto */];
|
6247 |
|
6248 | // Constructor is a special case.
|
6249 | var prop = 'constructor';
|
6250 | if (Object(__WEBPACK_IMPORTED_MODULE_2__has_js__["a" /* default */])(obj, prop) && !keys.contains(prop)) keys.push(prop);
|
6251 |
|
6252 | while (nonEnumIdx--) {
|
6253 | prop = __WEBPACK_IMPORTED_MODULE_0__setup_js__["n" ][nonEnumIdx];
|
6254 | if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {
|
6255 | keys.push(prop);
|
6256 | }
|
6257 | }
|
6258 | }
|
6259 |
|
6260 |
|
6261 | }),
|
6262 |
|
6263 | (function(module, __webpack_exports__, __webpack_require__) {
|
6264 |
|
6265 | "use strict";
|
6266 | __webpack_exports__["a"] = isMatch;
|
6267 | var __WEBPACK_IMPORTED_MODULE_0__keys_js__ = __webpack_require__(15);
|
6268 |
|
6269 |
|
6270 |
|
6271 | function isMatch(object, attrs) {
|
6272 | var _keys = Object(__WEBPACK_IMPORTED_MODULE_0__keys_js__["a" ])(attrs), length = _keys.length;
|
6273 | if (object == null) return !length;
|
6274 | var obj = Object(object);
|
6275 | for (var i = 0; i < length; i++) {
|
6276 | var key = _keys[i];
|
6277 | if (attrs[key] !== obj[key] || !(key in obj)) return false;
|
6278 | }
|
6279 | return true;
|
6280 | }
|
6281 |
|
6282 |
|
6283 | }),
|
6284 |
|
6285 | (function(module, __webpack_exports__, __webpack_require__) {
|
6286 |
|
6287 | "use strict";
|
6288 | __webpack_exports__["a"] = invert;
|
6289 | var __WEBPACK_IMPORTED_MODULE_0__keys_js__ = __webpack_require__(15);
|
6290 |
|
6291 |
|
6292 |
|
6293 | function invert(obj) {
|
6294 | var result = {};
|
6295 | var _keys = Object(__WEBPACK_IMPORTED_MODULE_0__keys_js__["a" ])(obj);
|
6296 | for (var i = 0, length = _keys.length; i < length; i++) {
|
6297 | result[obj[_keys[i]]] = _keys[i];
|
6298 | }
|
6299 | return result;
|
6300 | }
|
6301 |
|
6302 |
|
6303 | }),
|
6304 |
|
6305 | (function(module, __webpack_exports__, __webpack_require__) {
|
6306 |
|
6307 | "use strict";
|
6308 | __webpack_exports__["a"] = functions;
|
6309 | var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(27);
|
6310 |
|
6311 |
|
6312 |
|
6313 | function functions(obj) {
|
6314 | var names = [];
|
6315 | for (var key in obj) {
|
6316 | if (Object(__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" ])(obj[key])) names.push(key);
|
6317 | }
|
6318 | return names.sort();
|
6319 | }
|
6320 |
|
6321 |
|
6322 | }),
|
6323 |
|
6324 | (function(module, __webpack_exports__, __webpack_require__) {
|
6325 |
|
6326 | "use strict";
|
6327 | var __WEBPACK_IMPORTED_MODULE_0__createAssigner_js__ = __webpack_require__(132);
|
6328 | var __WEBPACK_IMPORTED_MODULE_1__allKeys_js__ = __webpack_require__(80);
|
6329 |
|
6330 |
|
6331 |
|
6332 |
|
6333 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createAssigner_js__["a" ])(__WEBPACK_IMPORTED_MODULE_1__allKeys_js__["a" ]));
|
6334 |
|
6335 |
|
6336 | }),
|
6337 |
|
6338 | (function(module, __webpack_exports__, __webpack_require__) {
|
6339 |
|
6340 | "use strict";
|
6341 | var __WEBPACK_IMPORTED_MODULE_0__createAssigner_js__ = __webpack_require__(132);
|
6342 | var __WEBPACK_IMPORTED_MODULE_1__allKeys_js__ = __webpack_require__(80);
|
6343 |
|
6344 |
|
6345 |
|
6346 |
|
6347 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createAssigner_js__["a" ])(__WEBPACK_IMPORTED_MODULE_1__allKeys_js__["a" ], true));
|
6348 |
|
6349 |
|
6350 | }),
|
6351 |
|
6352 | (function(module, __webpack_exports__, __webpack_require__) {
|
6353 |
|
6354 | "use strict";
|
6355 | __webpack_exports__["a"] = baseCreate;
|
6356 | var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(52);
|
6357 | var __WEBPACK_IMPORTED_MODULE_1__setup_js__ = __webpack_require__(5);
|
6358 |
|
6359 |
|
6360 |
|
6361 |
|
6362 | function ctor() {
|
6363 | return function(){};
|
6364 | }
|
6365 |
|
6366 |
|
6367 | function baseCreate(prototype) {
|
6368 | if (!Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" ])(prototype)) return {};
|
6369 | if (__WEBPACK_IMPORTED_MODULE_1__setup_js__["j" ]) return Object(__WEBPACK_IMPORTED_MODULE_1__setup_js__["j" ])(prototype);
|
6370 | var Ctor = ctor();
|
6371 | Ctor.prototype = prototype;
|
6372 | var result = new Ctor;
|
6373 | Ctor.prototype = null;
|
6374 | return result;
|
6375 | }
|
6376 |
|
6377 |
|
6378 | }),
|
6379 |
|
6380 | (function(module, __webpack_exports__, __webpack_require__) {
|
6381 |
|
6382 | "use strict";
|
6383 | __webpack_exports__["a"] = clone;
|
6384 | var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(52);
|
6385 | var __WEBPACK_IMPORTED_MODULE_1__isArray_js__ = __webpack_require__(53);
|
6386 | var __WEBPACK_IMPORTED_MODULE_2__extend_js__ = __webpack_require__(184);
|
6387 |
|
6388 |
|
6389 |
|
6390 |
|
6391 |
|
6392 | function clone(obj) {
|
6393 | if (!Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" ])(obj)) return obj;
|
6394 | return Object(__WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" ])(obj) ? obj.slice() : Object(__WEBPACK_IMPORTED_MODULE_2__extend_js__["a" ])({}, obj);
|
6395 | }
|
6396 |
|
6397 |
|
6398 | }),
|
6399 |
|
6400 | (function(module, __webpack_exports__, __webpack_require__) {
|
6401 |
|
6402 | "use strict";
|
6403 | __webpack_exports__["a"] = get;
|
6404 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__toPath_js__ = __webpack_require__(81);
|
6405 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__deepGet_js__ = __webpack_require__(134);
|
6406 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isUndefined_js__ = __webpack_require__(170);
|
6407 |
|
6408 |
|
6409 |
|
6410 |
|
6411 | // Get the value of the (deep) property on `path` from `object`.
|
6412 | // If any property in `path` does not exist or if the value is
|
6413 | // `undefined`, return `defaultValue` instead.
|
6414 | // The `path` is normalized through `_.toPath`.
|
6415 | function get(object, path, defaultValue) {
|
6416 | var value = Object(__WEBPACK_IMPORTED_MODULE_1__deepGet_js__["a" ])(object, Object(__WEBPACK_IMPORTED_MODULE_0__toPath_js__["a" ])(path));
|
6417 | return Object(__WEBPACK_IMPORTED_MODULE_2__isUndefined_js__["a" ])(value) ? defaultValue : value;
|
6418 | }
|
6419 |
|
6420 |
|
6421 | }),
|
6422 |
|
6423 | (function(module, __webpack_exports__, __webpack_require__) {
|
6424 |
|
6425 | "use strict";
|
6426 | __webpack_exports__["a"] = toPath;
|
6427 | var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(24);
|
6428 | var __WEBPACK_IMPORTED_MODULE_1__isArray_js__ = __webpack_require__(53);
|
6429 |
|
6430 |
|
6431 |
|
6432 |
|
6433 |
|
6434 | function toPath(path) {
|
6435 | return Object(__WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" ])(path) ? path : [path];
|
6436 | }
|
6437 | __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" ].toPath = toPath;
|
6438 |
|
6439 |
|
6440 | }),
|
6441 |
|
6442 | (function(module, __webpack_exports__, __webpack_require__) {
|
6443 |
|
6444 | "use strict";
|
6445 | __webpack_exports__["a"] = baseIteratee;
|
6446 | var __WEBPACK_IMPORTED_MODULE_0__identity_js__ = __webpack_require__(135);
|
6447 | var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(27);
|
6448 | var __WEBPACK_IMPORTED_MODULE_2__isObject_js__ = __webpack_require__(52);
|
6449 | var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(53);
|
6450 | var __WEBPACK_IMPORTED_MODULE_4__matcher_js__ = __webpack_require__(103);
|
6451 | var __WEBPACK_IMPORTED_MODULE_5__property_js__ = __webpack_require__(136);
|
6452 | var __WEBPACK_IMPORTED_MODULE_6__optimizeCb_js__ = __webpack_require__(82);
|
6453 |
|
6454 |
|
6455 |
|
6456 |
|
6457 |
|
6458 |
|
6459 |
|
6460 |
|
6461 |
|
6462 |
|
6463 |
|
6464 | function baseIteratee(value, context, argCount) {
|
6465 | if (value == null) return __WEBPACK_IMPORTED_MODULE_0__identity_js__["a" ];
|
6466 | if (Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" ])(value)) return Object(__WEBPACK_IMPORTED_MODULE_6__optimizeCb_js__["a" ])(value, context, argCount);
|
6467 | if (Object(__WEBPACK_IMPORTED_MODULE_2__isObject_js__["a" ])(value) && !Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" ])(value)) return Object(__WEBPACK_IMPORTED_MODULE_4__matcher_js__["a" ])(value);
|
6468 | return Object(__WEBPACK_IMPORTED_MODULE_5__property_js__["a" ])(value);
|
6469 | }
|
6470 |
|
6471 |
|
6472 | }),
|
6473 |
|
6474 | (function(module, __webpack_exports__, __webpack_require__) {
|
6475 |
|
6476 | "use strict";
|
6477 | __webpack_exports__["a"] = iteratee;
|
6478 | var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(24);
|
6479 | var __WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__ = __webpack_require__(190);
|
6480 |
|
6481 |
|
6482 |
|
6483 |
|
6484 |
|
6485 |
|
6486 | function iteratee(value, context) {
|
6487 | return Object(__WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__["a" ])(value, context, Infinity);
|
6488 | }
|
6489 | __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" ].iteratee = iteratee;
|
6490 |
|
6491 |
|
6492 | }),
|
6493 |
|
6494 | (function(module, __webpack_exports__, __webpack_require__) {
|
6495 |
|
6496 | "use strict";
|
6497 | __webpack_exports__["a"] = noop;
|
6498 |
|
6499 | function noop(){}
|
6500 |
|
6501 |
|
6502 | }),
|
6503 |
|
6504 | (function(module, __webpack_exports__, __webpack_require__) {
|
6505 |
|
6506 | "use strict";
|
6507 | __webpack_exports__["a"] = random;
|
6508 |
|
6509 | function random(min, max) {
|
6510 | if (max == null) {
|
6511 | max = min;
|
6512 | min = 0;
|
6513 | }
|
6514 | return min + Math.floor(Math.random() * (max - min + 1));
|
6515 | }
|
6516 |
|
6517 |
|
6518 | }),
|
6519 |
|
6520 | (function(module, __webpack_exports__, __webpack_require__) {
|
6521 |
|
6522 | "use strict";
|
6523 | __webpack_exports__["a"] = createEscaper;
|
6524 | var __WEBPACK_IMPORTED_MODULE_0__keys_js__ = __webpack_require__(15);
|
6525 |
|
6526 |
|
6527 |
|
6528 |
|
6529 | function createEscaper(map) {
|
6530 | var escaper = function(match) {
|
6531 | return map[match];
|
6532 | };
|
6533 |
|
6534 | var source = '(?:' + Object(__WEBPACK_IMPORTED_MODULE_0__keys_js__["a" ])(map).join('|') + ')';
|
6535 | var testRegexp = RegExp(source);
|
6536 | var replaceRegexp = RegExp(source, 'g');
|
6537 | return function(string) {
|
6538 | string = string == null ? '' : '' + string;
|
6539 | return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
|
6540 | };
|
6541 | }
|
6542 |
|
6543 |
|
6544 | }),
|
6545 |
|
6546 | (function(module, __webpack_exports__, __webpack_require__) {
|
6547 |
|
6548 | "use strict";
|
6549 |
|
6550 | __webpack_exports__["a"] = ({
|
6551 | '&': '&',
|
6552 | '<': '<',
|
6553 | '>': '>',
|
6554 | '"': '"',
|
6555 | "'": ''',
|
6556 | '`': '`'
|
6557 | });
|
6558 |
|
6559 |
|
6560 | }),
|
6561 |
|
6562 | (function(module, __webpack_exports__, __webpack_require__) {
|
6563 |
|
6564 | "use strict";
|
6565 | var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(24);
|
6566 |
|
6567 |
|
6568 |
|
6569 |
|
6570 | __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" ].templateSettings = {
|
6571 | evaluate: /<%([\s\S]+?)%>/g,
|
6572 | interpolate: /<%=([\s\S]+?)%>/g,
|
6573 | escape: /<%-([\s\S]+?)%>/g
|
6574 | });
|
6575 |
|
6576 |
|
6577 | }),
|
6578 |
|
6579 | (function(module, __webpack_exports__, __webpack_require__) {
|
6580 |
|
6581 | "use strict";
|
6582 | __webpack_exports__["a"] = executeBound;
|
6583 | var __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__ = __webpack_require__(186);
|
6584 | var __WEBPACK_IMPORTED_MODULE_1__isObject_js__ = __webpack_require__(52);
|
6585 |
|
6586 |
|
6587 |
|
6588 |
|
6589 |
|
6590 |
|
6591 | function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
|
6592 | if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
|
6593 | var self = Object(__WEBPACK_IMPORTED_MODULE_0__baseCreate_js__["a" ])(sourceFunc.prototype);
|
6594 | var result = sourceFunc.apply(self, args);
|
6595 | if (Object(__WEBPACK_IMPORTED_MODULE_1__isObject_js__["a" ])(result)) return result;
|
6596 | return self;
|
6597 | }
|
6598 |
|
6599 |
|
6600 | }),
|
6601 |
|
6602 | (function(module, __webpack_exports__, __webpack_require__) {
|
6603 |
|
6604 | "use strict";
|
6605 | var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(23);
|
6606 | var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(27);
|
6607 | var __WEBPACK_IMPORTED_MODULE_2__executeBound_js__ = __webpack_require__(197);
|
6608 |
|
6609 |
|
6610 |
|
6611 |
|
6612 |
|
6613 |
|
6614 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" ])(function(func, context, args) {
|
6615 | if (!Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" ])(func)) throw new TypeError('Bind must be called on a function');
|
6616 | var bound = Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" ])(function(callArgs) {
|
6617 | return Object(__WEBPACK_IMPORTED_MODULE_2__executeBound_js__["a" ])(func, bound, context, this, args.concat(callArgs));
|
6618 | });
|
6619 | return bound;
|
6620 | }));
|
6621 |
|
6622 |
|
6623 | }),
|
6624 |
|
6625 | (function(module, __webpack_exports__, __webpack_require__) {
|
6626 |
|
6627 | "use strict";
|
6628 | var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(23);
|
6629 |
|
6630 |
|
6631 |
|
6632 |
|
6633 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" ])(function(func, wait, args) {
|
6634 | return setTimeout(function() {
|
6635 | return func.apply(null, args);
|
6636 | }, wait);
|
6637 | }));
|
6638 |
|
6639 |
|
6640 | }),
|
6641 |
|
6642 | (function(module, __webpack_exports__, __webpack_require__) {
|
6643 |
|
6644 | "use strict";
|
6645 | __webpack_exports__["a"] = before;
|
6646 |
|
6647 |
|
6648 | function before(times, func) {
|
6649 | var memo;
|
6650 | return function() {
|
6651 | if (--times > 0) {
|
6652 | memo = func.apply(this, arguments);
|
6653 | }
|
6654 | if (times <= 1) func = null;
|
6655 | return memo;
|
6656 | };
|
6657 | }
|
6658 |
|
6659 |
|
6660 | }),
|
6661 |
|
6662 | (function(module, __webpack_exports__, __webpack_require__) {
|
6663 |
|
6664 | "use strict";
|
6665 | __webpack_exports__["a"] = findKey;
|
6666 | var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(20);
|
6667 | var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(15);
|
6668 |
|
6669 |
|
6670 |
|
6671 |
|
6672 | function findKey(obj, predicate, context) {
|
6673 | predicate = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" ])(predicate, context);
|
6674 | var _keys = Object(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" ])(obj), key;
|
6675 | for (var i = 0, length = _keys.length; i < length; i++) {
|
6676 | key = _keys[i];
|
6677 | if (predicate(obj[key], key, obj)) return key;
|
6678 | }
|
6679 | }
|
6680 |
|
6681 |
|
6682 | }),
|
6683 |
|
6684 | (function(module, __webpack_exports__, __webpack_require__) {
|
6685 |
|
6686 | "use strict";
|
6687 | __webpack_exports__["a"] = createPredicateIndexFinder;
|
6688 | var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(20);
|
6689 | var __WEBPACK_IMPORTED_MODULE_1__getLength_js__ = __webpack_require__(28);
|
6690 |
|
6691 |
|
6692 |
|
6693 |
|
6694 | function createPredicateIndexFinder(dir) {
|
6695 | return function(array, predicate, context) {
|
6696 | predicate = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" ])(predicate, context);
|
6697 | var length = Object(__WEBPACK_IMPORTED_MODULE_1__getLength_js__["a" ])(array);
|
6698 | var index = dir > 0 ? 0 : length - 1;
|
6699 | for (; index >= 0 && index < length; index += dir) {
|
6700 | if (predicate(array[index], index, array)) return index;
|
6701 | }
|
6702 | return -1;
|
6703 | };
|
6704 | }
|
6705 |
|
6706 |
|
6707 | }),
|
6708 |
|
6709 | (function(module, __webpack_exports__, __webpack_require__) {
|
6710 |
|
6711 | "use strict";
|
6712 | var __WEBPACK_IMPORTED_MODULE_0__createPredicateIndexFinder_js__ = __webpack_require__(202);
|
6713 |
|
6714 |
|
6715 |
|
6716 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createPredicateIndexFinder_js__["a" ])(-1));
|
6717 |
|
6718 |
|
6719 | }),
|
6720 |
|
6721 | (function(module, __webpack_exports__, __webpack_require__) {
|
6722 |
|
6723 | "use strict";
|
6724 | __webpack_exports__["a"] = sortedIndex;
|
6725 | var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(20);
|
6726 | var __WEBPACK_IMPORTED_MODULE_1__getLength_js__ = __webpack_require__(28);
|
6727 |
|
6728 |
|
6729 |
|
6730 |
|
6731 |
|
6732 | function sortedIndex(array, obj, iteratee, context) {
|
6733 | iteratee = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" ])(iteratee, context, 1);
|
6734 | var value = iteratee(obj);
|
6735 | var low = 0, high = Object(__WEBPACK_IMPORTED_MODULE_1__getLength_js__["a" ])(array);
|
6736 | while (low < high) {
|
6737 | var mid = Math.floor((low + high) / 2);
|
6738 | if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
|
6739 | }
|
6740 | return low;
|
6741 | }
|
6742 |
|
6743 |
|
6744 | }),
|
6745 |
|
6746 | (function(module, __webpack_exports__, __webpack_require__) {
|
6747 |
|
6748 | "use strict";
|
6749 | var __WEBPACK_IMPORTED_MODULE_0__sortedIndex_js__ = __webpack_require__(204);
|
6750 | var __WEBPACK_IMPORTED_MODULE_1__findIndex_js__ = __webpack_require__(139);
|
6751 | var __WEBPACK_IMPORTED_MODULE_2__createIndexFinder_js__ = __webpack_require__(206);
|
6752 |
|
6753 |
|
6754 |
|
6755 |
|
6756 |
|
6757 |
|
6758 |
|
6759 |
|
6760 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_2__createIndexFinder_js__["a" ])(1, __WEBPACK_IMPORTED_MODULE_1__findIndex_js__["a" ], __WEBPACK_IMPORTED_MODULE_0__sortedIndex_js__["a" ]));
|
6761 |
|
6762 |
|
6763 | }),
|
6764 |
|
6765 | (function(module, __webpack_exports__, __webpack_require__) {
|
6766 |
|
6767 | "use strict";
|
6768 | __webpack_exports__["a"] = createIndexFinder;
|
6769 | var __WEBPACK_IMPORTED_MODULE_0__getLength_js__ = __webpack_require__(28);
|
6770 | var __WEBPACK_IMPORTED_MODULE_1__setup_js__ = __webpack_require__(5);
|
6771 | var __WEBPACK_IMPORTED_MODULE_2__isNaN_js__ = __webpack_require__(175);
|
6772 |
|
6773 |
|
6774 |
|
6775 |
|
6776 |
|
6777 | function createIndexFinder(dir, predicateFind, sortedIndex) {
|
6778 | return function(array, item, idx) {
|
6779 | var i = 0, length = Object(__WEBPACK_IMPORTED_MODULE_0__getLength_js__["a" ])(array);
|
6780 | if (typeof idx == 'number') {
|
6781 | if (dir > 0) {
|
6782 | i = idx >= 0 ? idx : Math.max(idx + length, i);
|
6783 | } else {
|
6784 | length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
|
6785 | }
|
6786 | } else if (sortedIndex && idx && length) {
|
6787 | idx = sortedIndex(array, item);
|
6788 | return array[idx] === item ? idx : -1;
|
6789 | }
|
6790 | if (item !== item) {
|
6791 | idx = predicateFind(__WEBPACK_IMPORTED_MODULE_1__setup_js__["q" ].call(array, i, length), __WEBPACK_IMPORTED_MODULE_2__isNaN_js__["a" ]);
|
6792 | return idx >= 0 ? idx + i : -1;
|
6793 | }
|
6794 | for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
|
6795 | if (array[idx] === item) return idx;
|
6796 | }
|
6797 | return -1;
|
6798 | };
|
6799 | }
|
6800 |
|
6801 |
|
6802 | }),
|
6803 |
|
6804 | (function(module, __webpack_exports__, __webpack_require__) {
|
6805 |
|
6806 | "use strict";
|
6807 | __webpack_exports__["a"] = find;
|
6808 | var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(25);
|
6809 | var __WEBPACK_IMPORTED_MODULE_1__findIndex_js__ = __webpack_require__(139);
|
6810 | var __WEBPACK_IMPORTED_MODULE_2__findKey_js__ = __webpack_require__(201);
|
6811 |
|
6812 |
|
6813 |
|
6814 |
|
6815 |
|
6816 | function find(obj, predicate, context) {
|
6817 | var keyFinder = Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" ])(obj) ? __WEBPACK_IMPORTED_MODULE_1__findIndex_js__["a" ] : __WEBPACK_IMPORTED_MODULE_2__findKey_js__["a" ];
|
6818 | var key = keyFinder(obj, predicate, context);
|
6819 | if (key !== void 0 && key !== -1) return obj[key];
|
6820 | }
|
6821 |
|
6822 |
|
6823 | }),
|
6824 |
|
6825 | (function(module, __webpack_exports__, __webpack_require__) {
|
6826 |
|
6827 | "use strict";
|
6828 | __webpack_exports__["a"] = createReduce;
|
6829 | var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(25);
|
6830 | var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(15);
|
6831 | var __WEBPACK_IMPORTED_MODULE_2__optimizeCb_js__ = __webpack_require__(82);
|
6832 |
|
6833 |
|
6834 |
|
6835 |
|
6836 |
|
6837 | function createReduce(dir) {
|
6838 |
|
6839 |
|
6840 | var reducer = function(obj, iteratee, memo, initial) {
|
6841 | var _keys = !Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" ])(obj) && Object(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" ])(obj),
|
6842 | length = (_keys || obj).length,
|
6843 | index = dir > 0 ? 0 : length - 1;
|
6844 | if (!initial) {
|
6845 | memo = obj[_keys ? _keys[index] : index];
|
6846 | index += dir;
|
6847 | }
|
6848 | for (; index >= 0 && index < length; index += dir) {
|
6849 | var currentKey = _keys ? _keys[index] : index;
|
6850 | memo = iteratee(memo, obj[currentKey], currentKey, obj);
|
6851 | }
|
6852 | return memo;
|
6853 | };
|
6854 |
|
6855 | return function(obj, iteratee, memo, context) {
|
6856 | var initial = arguments.length >= 3;
|
6857 | return reducer(obj, Object(__WEBPACK_IMPORTED_MODULE_2__optimizeCb_js__["a" ])(iteratee, context, 4), memo, initial);
|
6858 | };
|
6859 | }
|
6860 |
|
6861 |
|
6862 | }),
|
6863 |
|
6864 | (function(module, __webpack_exports__, __webpack_require__) {
|
6865 |
|
6866 | "use strict";
|
6867 | __webpack_exports__["a"] = max;
|
6868 | var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(25);
|
6869 | var __WEBPACK_IMPORTED_MODULE_1__values_js__ = __webpack_require__(62);
|
6870 | var __WEBPACK_IMPORTED_MODULE_2__cb_js__ = __webpack_require__(20);
|
6871 | var __WEBPACK_IMPORTED_MODULE_3__each_js__ = __webpack_require__(54);
|
6872 |
|
6873 |
|
6874 |
|
6875 |
|
6876 |
|
6877 |
|
6878 | function max(obj, iteratee, context) {
|
6879 | var result = -Infinity, lastComputed = -Infinity,
|
6880 | value, computed;
|
6881 | if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
|
6882 | obj = Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" ])(obj) ? obj : Object(__WEBPACK_IMPORTED_MODULE_1__values_js__["a" ])(obj);
|
6883 | for (var i = 0, length = obj.length; i < length; i++) {
|
6884 | value = obj[i];
|
6885 | if (value != null && value > result) {
|
6886 | result = value;
|
6887 | }
|
6888 | }
|
6889 | } else {
|
6890 | iteratee = Object(__WEBPACK_IMPORTED_MODULE_2__cb_js__["a" ])(iteratee, context);
|
6891 | Object(__WEBPACK_IMPORTED_MODULE_3__each_js__["a" ])(obj, function(v, index, list) {
|
6892 | computed = iteratee(v, index, list);
|
6893 | if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
|
6894 | result = v;
|
6895 | lastComputed = computed;
|
6896 | }
|
6897 | });
|
6898 | }
|
6899 | return result;
|
6900 | }
|
6901 |
|
6902 |
|
6903 | }),
|
6904 |
|
6905 | (function(module, __webpack_exports__, __webpack_require__) {
|
6906 |
|
6907 | "use strict";
|
6908 | __webpack_exports__["a"] = sample;
|
6909 | var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(25);
|
6910 | var __WEBPACK_IMPORTED_MODULE_1__clone_js__ = __webpack_require__(187);
|
6911 | var __WEBPACK_IMPORTED_MODULE_2__values_js__ = __webpack_require__(62);
|
6912 | var __WEBPACK_IMPORTED_MODULE_3__getLength_js__ = __webpack_require__(28);
|
6913 | var __WEBPACK_IMPORTED_MODULE_4__random_js__ = __webpack_require__(193);
|
6914 |
|
6915 |
|
6916 |
|
6917 |
|
6918 |
|
6919 |
|
6920 |
|
6921 |
|
6922 |
|
6923 |
|
6924 | function sample(obj, n, guard) {
|
6925 | if (n == null || guard) {
|
6926 | if (!Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" ])(obj)) obj = Object(__WEBPACK_IMPORTED_MODULE_2__values_js__["a" ])(obj);
|
6927 | return obj[Object(__WEBPACK_IMPORTED_MODULE_4__random_js__["a" ])(obj.length - 1)];
|
6928 | }
|
6929 | var sample = Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" ])(obj) ? Object(__WEBPACK_IMPORTED_MODULE_1__clone_js__["a" ])(obj) : Object(__WEBPACK_IMPORTED_MODULE_2__values_js__["a" ])(obj);
|
6930 | var length = Object(__WEBPACK_IMPORTED_MODULE_3__getLength_js__["a" ])(sample);
|
6931 | n = Math.max(Math.min(n, length), 0);
|
6932 | var last = length - 1;
|
6933 | for (var index = 0; index < n; index++) {
|
6934 | var rand = Object(__WEBPACK_IMPORTED_MODULE_4__random_js__["a" ])(index, last);
|
6935 | var temp = sample[index];
|
6936 | sample[index] = sample[rand];
|
6937 | sample[rand] = temp;
|
6938 | }
|
6939 | return sample.slice(0, n);
|
6940 | }
|
6941 |
|
6942 |
|
6943 | }),
|
6944 |
|
6945 | (function(module, __webpack_exports__, __webpack_require__) {
|
6946 |
|
6947 | "use strict";
|
6948 | var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(23);
|
6949 | var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(27);
|
6950 | var __WEBPACK_IMPORTED_MODULE_2__optimizeCb_js__ = __webpack_require__(82);
|
6951 | var __WEBPACK_IMPORTED_MODULE_3__allKeys_js__ = __webpack_require__(80);
|
6952 | var __WEBPACK_IMPORTED_MODULE_4__keyInObj_js__ = __webpack_require__(347);
|
6953 | var __WEBPACK_IMPORTED_MODULE_5__flatten_js__ = __webpack_require__(63);
|
6954 |
|
6955 |
|
6956 |
|
6957 |
|
6958 |
|
6959 |
|
6960 |
|
6961 |
|
6962 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" ])(function(obj, keys) {
|
6963 | var result = {}, iteratee = keys[0];
|
6964 | if (obj == null) return result;
|
6965 | if (Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" ])(iteratee)) {
|
6966 | if (keys.length > 1) iteratee = Object(__WEBPACK_IMPORTED_MODULE_2__optimizeCb_js__["a" ])(iteratee, keys[1]);
|
6967 | keys = Object(__WEBPACK_IMPORTED_MODULE_3__allKeys_js__["a" ])(obj);
|
6968 | } else {
|
6969 | iteratee = __WEBPACK_IMPORTED_MODULE_4__keyInObj_js__["a" ];
|
6970 | keys = Object(__WEBPACK_IMPORTED_MODULE_5__flatten_js__["a" ])(keys, false, false);
|
6971 | obj = Object(obj);
|
6972 | }
|
6973 | for (var i = 0, length = keys.length; i < length; i++) {
|
6974 | var key = keys[i];
|
6975 | var value = obj[key];
|
6976 | if (iteratee(value, key, obj)) result[key] = value;
|
6977 | }
|
6978 | return result;
|
6979 | }));
|
6980 |
|
6981 |
|
6982 | }),
|
6983 |
|
6984 | (function(module, __webpack_exports__, __webpack_require__) {
|
6985 |
|
6986 | "use strict";
|
6987 | __webpack_exports__["a"] = initial;
|
6988 | var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(5);
|
6989 |
|
6990 |
|
6991 |
|
6992 |
|
6993 |
|
6994 | function initial(array, n, guard) {
|
6995 | return __WEBPACK_IMPORTED_MODULE_0__setup_js__["q" ].call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
|
6996 | }
|
6997 |
|
6998 |
|
6999 | }),
|
7000 |
|
7001 | (function(module, __webpack_exports__, __webpack_require__) {
|
7002 |
|
7003 | "use strict";
|
7004 | __webpack_exports__["a"] = rest;
|
7005 | var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(5);
|
7006 |
|
7007 |
|
7008 |
|
7009 |
|
7010 |
|
7011 | function rest(array, n, guard) {
|
7012 | return __WEBPACK_IMPORTED_MODULE_0__setup_js__["q" ].call(array, n == null || guard ? 1 : n);
|
7013 | }
|
7014 |
|
7015 |
|
7016 | }),
|
7017 |
|
7018 | (function(module, __webpack_exports__, __webpack_require__) {
|
7019 |
|
7020 | "use strict";
|
7021 | var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(23);
|
7022 | var __WEBPACK_IMPORTED_MODULE_1__flatten_js__ = __webpack_require__(63);
|
7023 | var __WEBPACK_IMPORTED_MODULE_2__filter_js__ = __webpack_require__(83);
|
7024 | var __WEBPACK_IMPORTED_MODULE_3__contains_js__ = __webpack_require__(84);
|
7025 |
|
7026 |
|
7027 |
|
7028 |
|
7029 |
|
7030 |
|
7031 |
|
7032 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" ])(function(array, rest) {
|
7033 | rest = Object(__WEBPACK_IMPORTED_MODULE_1__flatten_js__["a" ])(rest, true, true);
|
7034 | return Object(__WEBPACK_IMPORTED_MODULE_2__filter_js__["a" ])(array, function(value){
|
7035 | return !Object(__WEBPACK_IMPORTED_MODULE_3__contains_js__["a" ])(rest, value);
|
7036 | });
|
7037 | }));
|
7038 |
|
7039 |
|
7040 | }),
|
7041 |
|
7042 | (function(module, __webpack_exports__, __webpack_require__) {
|
7043 |
|
7044 | "use strict";
|
7045 | __webpack_exports__["a"] = uniq;
|
7046 | var __WEBPACK_IMPORTED_MODULE_0__isBoolean_js__ = __webpack_require__(171);
|
7047 | var __WEBPACK_IMPORTED_MODULE_1__cb_js__ = __webpack_require__(20);
|
7048 | var __WEBPACK_IMPORTED_MODULE_2__getLength_js__ = __webpack_require__(28);
|
7049 | var __WEBPACK_IMPORTED_MODULE_3__contains_js__ = __webpack_require__(84);
|
7050 |
|
7051 |
|
7052 |
|
7053 |
|
7054 |
|
7055 |
|
7056 |
|
7057 |
|
7058 |
|
7059 |
|
7060 | function uniq(array, isSorted, iteratee, context) {
|
7061 | if (!Object(__WEBPACK_IMPORTED_MODULE_0__isBoolean_js__["a" ])(isSorted)) {
|
7062 | context = iteratee;
|
7063 | iteratee = isSorted;
|
7064 | isSorted = false;
|
7065 | }
|
7066 | if (iteratee != null) iteratee = Object(__WEBPACK_IMPORTED_MODULE_1__cb_js__["a" ])(iteratee, context);
|
7067 | var result = [];
|
7068 | var seen = [];
|
7069 | for (var i = 0, length = Object(__WEBPACK_IMPORTED_MODULE_2__getLength_js__["a" ])(array); i < length; i++) {
|
7070 | var value = array[i],
|
7071 | computed = iteratee ? iteratee(value, i, array) : value;
|
7072 | if (isSorted && !iteratee) {
|
7073 | if (!i || seen !== computed) result.push(value);
|
7074 | seen = computed;
|
7075 | } else if (iteratee) {
|
7076 | if (!Object(__WEBPACK_IMPORTED_MODULE_3__contains_js__["a" ])(seen, computed)) {
|
7077 | seen.push(computed);
|
7078 | result.push(value);
|
7079 | }
|
7080 | } else if (!Object(__WEBPACK_IMPORTED_MODULE_3__contains_js__["a" ])(result, value)) {
|
7081 | result.push(value);
|
7082 | }
|
7083 | }
|
7084 | return result;
|
7085 | }
|
7086 |
|
7087 |
|
7088 | }),
|
7089 |
|
7090 | (function(module, __webpack_exports__, __webpack_require__) {
|
7091 |
|
7092 | "use strict";
|
7093 | __webpack_exports__["a"] = unzip;
|
7094 | var __WEBPACK_IMPORTED_MODULE_0__max_js__ = __webpack_require__(209);
|
7095 | var __WEBPACK_IMPORTED_MODULE_1__getLength_js__ = __webpack_require__(28);
|
7096 | var __WEBPACK_IMPORTED_MODULE_2__pluck_js__ = __webpack_require__(140);
|
7097 |
|
7098 |
|
7099 |
|
7100 |
|
7101 |
|
7102 |
|
7103 | function unzip(array) {
|
7104 | var length = array && Object(__WEBPACK_IMPORTED_MODULE_0__max_js__["a" ])(array, __WEBPACK_IMPORTED_MODULE_1__getLength_js__["a" ]).length || 0;
|
7105 | var result = Array(length);
|
7106 |
|
7107 | for (var index = 0; index < length; index++) {
|
7108 | result[index] = Object(__WEBPACK_IMPORTED_MODULE_2__pluck_js__["a" ])(array, index);
|
7109 | }
|
7110 | return result;
|
7111 | }
|
7112 |
|
7113 |
|
7114 | }),
|
7115 |
|
7116 | (function(module, __webpack_exports__, __webpack_require__) {
|
7117 |
|
7118 | "use strict";
|
7119 | __webpack_exports__["a"] = chainResult;
|
7120 | var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(24);
|
7121 |
|
7122 |
|
7123 |
|
7124 | function chainResult(instance, obj) {
|
7125 | return instance._chain ? Object(__WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" ])(obj).chain() : obj;
|
7126 | }
|
7127 |
|
7128 |
|
7129 | }),
|
7130 |
|
7131 | (function(module, exports, __webpack_require__) {
|
7132 |
|
7133 | "use strict";
|
7134 |
|
7135 | var $ = __webpack_require__(0);
|
7136 | var fails = __webpack_require__(3);
|
7137 | var isArray = __webpack_require__(85);
|
7138 | var isObject = __webpack_require__(11);
|
7139 | var toObject = __webpack_require__(34);
|
7140 | var lengthOfArrayLike = __webpack_require__(46);
|
7141 | var doesNotExceedSafeInteger = __webpack_require__(365);
|
7142 | var createProperty = __webpack_require__(106);
|
7143 | var arraySpeciesCreate = __webpack_require__(219);
|
7144 | var arrayMethodHasSpeciesSupport = __webpack_require__(107);
|
7145 | var wellKnownSymbol = __webpack_require__(9);
|
7146 | var V8_VERSION = __webpack_require__(90);
|
7147 |
|
7148 | var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
7149 |
|
7150 |
|
7151 |
|
7152 |
|
7153 | var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
|
7154 | var array = [];
|
7155 | array[IS_CONCAT_SPREADABLE] = false;
|
7156 | return array.concat()[0] !== array;
|
7157 | });
|
7158 |
|
7159 | var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
|
7160 |
|
7161 | var isConcatSpreadable = function (O) {
|
7162 | if (!isObject(O)) return false;
|
7163 | var spreadable = O[IS_CONCAT_SPREADABLE];
|
7164 | return spreadable !== undefined ? !!spreadable : isArray(O);
|
7165 | };
|
7166 |
|
7167 | var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
7168 |
|
7169 |
|
7170 |
|
7171 |
|
7172 | $({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
|
7173 |
|
7174 | concat: function concat(arg) {
|
7175 | var O = toObject(this);
|
7176 | var A = arraySpeciesCreate(O, 0);
|
7177 | var n = 0;
|
7178 | var i, k, length, len, E;
|
7179 | for (i = -1, length = arguments.length; i < length; i++) {
|
7180 | E = i === -1 ? O : arguments[i];
|
7181 | if (isConcatSpreadable(E)) {
|
7182 | len = lengthOfArrayLike(E);
|
7183 | doesNotExceedSafeInteger(n + len);
|
7184 | for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
7185 | } else {
|
7186 | doesNotExceedSafeInteger(n + 1);
|
7187 | createProperty(A, n++, E);
|
7188 | }
|
7189 | }
|
7190 | A.length = n;
|
7191 | return A;
|
7192 | }
|
7193 | });
|
7194 |
|
7195 |
|
7196 | }),
|
7197 |
|
7198 | (function(module, exports, __webpack_require__) {
|
7199 |
|
7200 | var arraySpeciesConstructor = __webpack_require__(366);
|
7201 |
|
7202 |
|
7203 |
|
7204 | module.exports = function (originalArray, length) {
|
7205 | return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
|
7206 | };
|
7207 |
|
7208 |
|
7209 | }),
|
7210 |
|
7211 | (function(module, exports, __webpack_require__) {
|
7212 |
|
7213 | var $ = __webpack_require__(0);
|
7214 | var getBuiltIn = __webpack_require__(18);
|
7215 | var apply = __webpack_require__(69);
|
7216 | var call = __webpack_require__(13);
|
7217 | var uncurryThis = __webpack_require__(4);
|
7218 | var fails = __webpack_require__(3);
|
7219 | var isArray = __webpack_require__(85);
|
7220 | var isCallable = __webpack_require__(7);
|
7221 | var isObject = __webpack_require__(11);
|
7222 | var isSymbol = __webpack_require__(89);
|
7223 | var arraySlice = __webpack_require__(102);
|
7224 | var NATIVE_SYMBOL = __webpack_require__(57);
|
7225 |
|
7226 | var $stringify = getBuiltIn('JSON', 'stringify');
|
7227 | var exec = uncurryThis(/./.exec);
|
7228 | var charAt = uncurryThis(''.charAt);
|
7229 | var charCodeAt = uncurryThis(''.charCodeAt);
|
7230 | var replace = uncurryThis(''.replace);
|
7231 | var numberToString = uncurryThis(1.0.toString);
|
7232 |
|
7233 | var tester = /[\uD800-\uDFFF]/g;
|
7234 | var low = /^[\uD800-\uDBFF]$/;
|
7235 | var hi = /^[\uDC00-\uDFFF]$/;
|
7236 |
|
7237 | var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails(function () {
|
7238 | var symbol = getBuiltIn('Symbol')();
|
7239 |
|
7240 | return $stringify([symbol]) != '[null]'
|
7241 |
|
7242 | || $stringify({ a: symbol }) != '{}'
|
7243 |
|
7244 | || $stringify(Object(symbol)) != '{}';
|
7245 | });
|
7246 |
|
7247 |
|
7248 | var ILL_FORMED_UNICODE = fails(function () {
|
7249 | return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
|
7250 | || $stringify('\uDEAD') !== '"\\udead"';
|
7251 | });
|
7252 |
|
7253 | var stringifyWithSymbolsFix = function (it, replacer) {
|
7254 | var args = arraySlice(arguments);
|
7255 | var $replacer = replacer;
|
7256 | if (!isObject(replacer) && it === undefined || isSymbol(it)) return;
|
7257 | if (!isArray(replacer)) replacer = function (key, value) {
|
7258 | if (isCallable($replacer)) value = call($replacer, this, key, value);
|
7259 | if (!isSymbol(value)) return value;
|
7260 | };
|
7261 | args[1] = replacer;
|
7262 | return apply($stringify, null, args);
|
7263 | };
|
7264 |
|
7265 | var fixIllFormed = function (match, offset, string) {
|
7266 | var prev = charAt(string, offset - 1);
|
7267 | var next = charAt(string, offset + 1);
|
7268 | if ((exec(low, match) && !exec(hi, next)) || (exec(hi, match) && !exec(low, prev))) {
|
7269 | return '\\u' + numberToString(charCodeAt(match, 0), 16);
|
7270 | } return match;
|
7271 | };
|
7272 |
|
7273 | if ($stringify) {
|
7274 |
|
7275 |
|
7276 | $({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
|
7277 |
|
7278 | stringify: function stringify(it, replacer, space) {
|
7279 | var args = arraySlice(arguments);
|
7280 | var result = apply(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);
|
7281 | return ILL_FORMED_UNICODE && typeof result == 'string' ? replace(result, tester, fixIllFormed) : result;
|
7282 | }
|
7283 | });
|
7284 | }
|
7285 |
|
7286 |
|
7287 | }),
|
7288 |
|
7289 | (function(module, exports, __webpack_require__) {
|
7290 |
|
7291 | var rng = __webpack_require__(384);
|
7292 | var bytesToUuid = __webpack_require__(385);
|
7293 |
|
7294 | function v4(options, buf, offset) {
|
7295 | var i = buf && offset || 0;
|
7296 |
|
7297 | if (typeof(options) == 'string') {
|
7298 | buf = options === 'binary' ? new Array(16) : null;
|
7299 | options = null;
|
7300 | }
|
7301 | options = options || {};
|
7302 |
|
7303 | var rnds = options.random || (options.rng || rng)();
|
7304 |
|
7305 |
|
7306 | rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
7307 | rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
7308 |
|
7309 |
|
7310 | if (buf) {
|
7311 | for (var ii = 0; ii < 16; ++ii) {
|
7312 | buf[i + ii] = rnds[ii];
|
7313 | }
|
7314 | }
|
7315 |
|
7316 | return buf || bytesToUuid(rnds);
|
7317 | }
|
7318 |
|
7319 | module.exports = v4;
|
7320 |
|
7321 |
|
7322 | }),
|
7323 |
|
7324 | (function(module, exports, __webpack_require__) {
|
7325 |
|
7326 | var parent = __webpack_require__(388);
|
7327 |
|
7328 | module.exports = parent;
|
7329 |
|
7330 |
|
7331 | }),
|
7332 |
|
7333 | (function(module, exports, __webpack_require__) {
|
7334 |
|
7335 | "use strict";
|
7336 |
|
7337 |
|
7338 | module.exports = '4.13.3';
|
7339 |
|
7340 | }),
|
7341 |
|
7342 | (function(module, exports, __webpack_require__) {
|
7343 |
|
7344 | "use strict";
|
7345 |
|
7346 |
|
7347 | var has = Object.prototype.hasOwnProperty
|
7348 | , prefix = '~';
|
7349 |
|
7350 |
|
7351 |
|
7352 |
|
7353 |
|
7354 |
|
7355 |
|
7356 |
|
7357 | function Events() {}
|
7358 |
|
7359 |
|
7360 |
|
7361 |
|
7362 |
|
7363 |
|
7364 |
|
7365 |
|
7366 | if (Object.create) {
|
7367 | Events.prototype = Object.create(null);
|
7368 |
|
7369 |
|
7370 |
|
7371 |
|
7372 |
|
7373 | if (!new Events().__proto__) prefix = false;
|
7374 | }
|
7375 |
|
7376 |
|
7377 |
|
7378 |
|
7379 |
|
7380 |
|
7381 |
|
7382 |
|
7383 |
|
7384 |
|
7385 | function EE(fn, context, once) {
|
7386 | this.fn = fn;
|
7387 | this.context = context;
|
7388 | this.once = once || false;
|
7389 | }
|
7390 |
|
7391 |
|
7392 |
|
7393 |
|
7394 |
|
7395 |
|
7396 |
|
7397 |
|
7398 | function EventEmitter() {
|
7399 | this._events = new Events();
|
7400 | this._eventsCount = 0;
|
7401 | }
|
7402 |
|
7403 |
|
7404 |
|
7405 |
|
7406 |
|
7407 |
|
7408 |
|
7409 |
|
7410 | EventEmitter.prototype.eventNames = function eventNames() {
|
7411 | var names = []
|
7412 | , events
|
7413 | , name;
|
7414 |
|
7415 | if (this._eventsCount === 0) return names;
|
7416 |
|
7417 | for (name in (events = this._events)) {
|
7418 | if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
|
7419 | }
|
7420 |
|
7421 | if (Object.getOwnPropertySymbols) {
|
7422 | return names.concat(Object.getOwnPropertySymbols(events));
|
7423 | }
|
7424 |
|
7425 | return names;
|
7426 | };
|
7427 |
|
7428 |
|
7429 |
|
7430 |
|
7431 |
|
7432 |
|
7433 |
|
7434 |
|
7435 |
|
7436 | EventEmitter.prototype.listeners = function listeners(event, exists) {
|
7437 | var evt = prefix ? prefix + event : event
|
7438 | , available = this._events[evt];
|
7439 |
|
7440 | if (exists) return !!available;
|
7441 | if (!available) return [];
|
7442 | if (available.fn) return [available.fn];
|
7443 |
|
7444 | for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) {
|
7445 | ee[i] = available[i].fn;
|
7446 | }
|
7447 |
|
7448 | return ee;
|
7449 | };
|
7450 |
|
7451 |
|
7452 |
|
7453 |
|
7454 |
|
7455 |
|
7456 |
|
7457 |
|
7458 | EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
|
7459 | var evt = prefix ? prefix + event : event;
|
7460 |
|
7461 | if (!this._events[evt]) return false;
|
7462 |
|
7463 | var listeners = this._events[evt]
|
7464 | , len = arguments.length
|
7465 | , args
|
7466 | , i;
|
7467 |
|
7468 | if (listeners.fn) {
|
7469 | if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
|
7470 |
|
7471 | switch (len) {
|
7472 | case 1: return listeners.fn.call(listeners.context), true;
|
7473 | case 2: return listeners.fn.call(listeners.context, a1), true;
|
7474 | case 3: return listeners.fn.call(listeners.context, a1, a2), true;
|
7475 | case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
|
7476 | case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
|
7477 | case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
|
7478 | }
|
7479 |
|
7480 | for (i = 1, args = new Array(len -1); i < len; i++) {
|
7481 | args[i - 1] = arguments[i];
|
7482 | }
|
7483 |
|
7484 | listeners.fn.apply(listeners.context, args);
|
7485 | } else {
|
7486 | var length = listeners.length
|
7487 | , j;
|
7488 |
|
7489 | for (i = 0; i < length; i++) {
|
7490 | if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
|
7491 |
|
7492 | switch (len) {
|
7493 | case 1: listeners[i].fn.call(listeners[i].context); break;
|
7494 | case 2: listeners[i].fn.call(listeners[i].context, a1); break;
|
7495 | case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
|
7496 | case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
|
7497 | default:
|
7498 | if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
|
7499 | args[j - 1] = arguments[j];
|
7500 | }
|
7501 |
|
7502 | listeners[i].fn.apply(listeners[i].context, args);
|
7503 | }
|
7504 | }
|
7505 | }
|
7506 |
|
7507 | return true;
|
7508 | };
|
7509 |
|
7510 |
|
7511 |
|
7512 |
|
7513 |
|
7514 |
|
7515 |
|
7516 |
|
7517 |
|
7518 |
|
7519 | EventEmitter.prototype.on = function on(event, fn, context) {
|
7520 | var listener = new EE(fn, context || this)
|
7521 | , evt = prefix ? prefix + event : event;
|
7522 |
|
7523 | if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;
|
7524 | else if (!this._events[evt].fn) this._events[evt].push(listener);
|
7525 | else this._events[evt] = [this._events[evt], listener];
|
7526 |
|
7527 | return this;
|
7528 | };
|
7529 |
|
7530 |
|
7531 |
|
7532 |
|
7533 |
|
7534 |
|
7535 |
|
7536 |
|
7537 |
|
7538 |
|
7539 | EventEmitter.prototype.once = function once(event, fn, context) {
|
7540 | var listener = new EE(fn, context || this, true)
|
7541 | , evt = prefix ? prefix + event : event;
|
7542 |
|
7543 | if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;
|
7544 | else if (!this._events[evt].fn) this._events[evt].push(listener);
|
7545 | else this._events[evt] = [this._events[evt], listener];
|
7546 |
|
7547 | return this;
|
7548 | };
|
7549 |
|
7550 |
|
7551 |
|
7552 |
|
7553 |
|
7554 |
|
7555 |
|
7556 |
|
7557 |
|
7558 |
|
7559 |
|
7560 | EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
|
7561 | var evt = prefix ? prefix + event : event;
|
7562 |
|
7563 | if (!this._events[evt]) return this;
|
7564 | if (!fn) {
|
7565 | if (--this._eventsCount === 0) this._events = new Events();
|
7566 | else delete this._events[evt];
|
7567 | return this;
|
7568 | }
|
7569 |
|
7570 | var listeners = this._events[evt];
|
7571 |
|
7572 | if (listeners.fn) {
|
7573 | if (
|
7574 | listeners.fn === fn
|
7575 | && (!once || listeners.once)
|
7576 | && (!context || listeners.context === context)
|
7577 | ) {
|
7578 | if (--this._eventsCount === 0) this._events = new Events();
|
7579 | else delete this._events[evt];
|
7580 | }
|
7581 | } else {
|
7582 | for (var i = 0, events = [], length = listeners.length; i < length; i++) {
|
7583 | if (
|
7584 | listeners[i].fn !== fn
|
7585 | || (once && !listeners[i].once)
|
7586 | || (context && listeners[i].context !== context)
|
7587 | ) {
|
7588 | events.push(listeners[i]);
|
7589 | }
|
7590 | }
|
7591 |
|
7592 |
|
7593 |
|
7594 |
|
7595 | if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
|
7596 | else if (--this._eventsCount === 0) this._events = new Events();
|
7597 | else delete this._events[evt];
|
7598 | }
|
7599 |
|
7600 | return this;
|
7601 | };
|
7602 |
|
7603 |
|
7604 |
|
7605 |
|
7606 |
|
7607 |
|
7608 |
|
7609 |
|
7610 | EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
|
7611 | var evt;
|
7612 |
|
7613 | if (event) {
|
7614 | evt = prefix ? prefix + event : event;
|
7615 | if (this._events[evt]) {
|
7616 | if (--this._eventsCount === 0) this._events = new Events();
|
7617 | else delete this._events[evt];
|
7618 | }
|
7619 | } else {
|
7620 | this._events = new Events();
|
7621 | this._eventsCount = 0;
|
7622 | }
|
7623 |
|
7624 | return this;
|
7625 | };
|
7626 |
|
7627 |
|
7628 |
|
7629 |
|
7630 | EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
|
7631 | EventEmitter.prototype.addListener = EventEmitter.prototype.on;
|
7632 |
|
7633 |
|
7634 |
|
7635 |
|
7636 | EventEmitter.prototype.setMaxListeners = function setMaxListeners() {
|
7637 | return this;
|
7638 | };
|
7639 |
|
7640 |
|
7641 |
|
7642 |
|
7643 | EventEmitter.prefixed = prefix;
|
7644 |
|
7645 |
|
7646 |
|
7647 |
|
7648 | EventEmitter.EventEmitter = EventEmitter;
|
7649 |
|
7650 |
|
7651 |
|
7652 |
|
7653 | if (true) {
|
7654 | module.exports = EventEmitter;
|
7655 | }
|
7656 |
|
7657 |
|
7658 | }),
|
7659 |
|
7660 | (function(module, exports, __webpack_require__) {
|
7661 |
|
7662 | "use strict";
|
7663 |
|
7664 |
|
7665 | var _interopRequireDefault = __webpack_require__(1);
|
7666 |
|
7667 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
7668 |
|
7669 | var _require = __webpack_require__(68),
|
7670 | getAdapter = _require.getAdapter;
|
7671 |
|
7672 | var syncApiNames = ['getItem', 'setItem', 'removeItem', 'clear'];
|
7673 | var localStorage = {
|
7674 | get async() {
|
7675 | return getAdapter('storage').async;
|
7676 | }
|
7677 |
|
7678 | };
|
7679 |
|
7680 | syncApiNames.forEach(function (apiName) {
|
7681 | localStorage[apiName + 'Async'] = function () {
|
7682 | var storage = getAdapter('storage');
|
7683 | return _promise.default.resolve(storage[apiName].apply(storage, arguments));
|
7684 | };
|
7685 |
|
7686 | localStorage[apiName] = function () {
|
7687 | var storage = getAdapter('storage');
|
7688 |
|
7689 | if (!storage.async) {
|
7690 | return storage[apiName].apply(storage, arguments);
|
7691 | }
|
7692 |
|
7693 | var error = new Error('Synchronous API [' + apiName + '] is not available in this runtime.');
|
7694 | error.code = 'SYNC_API_NOT_AVAILABLE';
|
7695 | throw error;
|
7696 | };
|
7697 | });
|
7698 | module.exports = localStorage;
|
7699 |
|
7700 | }),
|
7701 |
|
7702 | (function(module, exports, __webpack_require__) {
|
7703 |
|
7704 | "use strict";
|
7705 |
|
7706 |
|
7707 | var _interopRequireDefault = __webpack_require__(1);
|
7708 |
|
7709 | var _concat = _interopRequireDefault(__webpack_require__(30));
|
7710 |
|
7711 | var _stringify = _interopRequireDefault(__webpack_require__(36));
|
7712 |
|
7713 | var storage = __webpack_require__(225);
|
7714 |
|
7715 | var AV = __webpack_require__(65);
|
7716 |
|
7717 | var removeAsync = exports.removeAsync = storage.removeItemAsync.bind(storage);
|
7718 |
|
7719 | var getCacheData = function getCacheData(cacheData, key) {
|
7720 | try {
|
7721 | cacheData = JSON.parse(cacheData);
|
7722 | } catch (e) {
|
7723 | return null;
|
7724 | }
|
7725 |
|
7726 | if (cacheData) {
|
7727 | var expired = cacheData.expiredAt && cacheData.expiredAt < Date.now();
|
7728 |
|
7729 | if (!expired) {
|
7730 | return cacheData.value;
|
7731 | }
|
7732 |
|
7733 | return removeAsync(key).then(function () {
|
7734 | return null;
|
7735 | });
|
7736 | }
|
7737 |
|
7738 | return null;
|
7739 | };
|
7740 |
|
7741 | exports.getAsync = function (key) {
|
7742 | var _context;
|
7743 |
|
7744 | key = (0, _concat.default)(_context = "AV/".concat(AV.applicationId, "/")).call(_context, key);
|
7745 | return storage.getItemAsync(key).then(function (cache) {
|
7746 | return getCacheData(cache, key);
|
7747 | });
|
7748 | };
|
7749 |
|
7750 | exports.setAsync = function (key, value, ttl) {
|
7751 | var _context2;
|
7752 |
|
7753 | var cache = {
|
7754 | value: value
|
7755 | };
|
7756 |
|
7757 | if (typeof ttl === 'number') {
|
7758 | cache.expiredAt = Date.now() + ttl;
|
7759 | }
|
7760 |
|
7761 | return storage.setItemAsync((0, _concat.default)(_context2 = "AV/".concat(AV.applicationId, "/")).call(_context2, key), (0, _stringify.default)(cache));
|
7762 | };
|
7763 |
|
7764 | }),
|
7765 |
|
7766 | (function(module, exports, __webpack_require__) {
|
7767 |
|
7768 | module.exports = __webpack_require__(228);
|
7769 |
|
7770 | }),
|
7771 |
|
7772 | (function(module, exports, __webpack_require__) {
|
7773 |
|
7774 | var parent = __webpack_require__(390);
|
7775 |
|
7776 | module.exports = parent;
|
7777 |
|
7778 |
|
7779 | }),
|
7780 |
|
7781 | (function(module, exports, __webpack_require__) {
|
7782 |
|
7783 | var parent = __webpack_require__(393);
|
7784 |
|
7785 | module.exports = parent;
|
7786 |
|
7787 |
|
7788 | }),
|
7789 |
|
7790 | (function(module, exports, __webpack_require__) {
|
7791 |
|
7792 | var parent = __webpack_require__(396);
|
7793 |
|
7794 | module.exports = parent;
|
7795 |
|
7796 |
|
7797 | }),
|
7798 |
|
7799 | (function(module, exports, __webpack_require__) {
|
7800 |
|
7801 | module.exports = __webpack_require__(399);
|
7802 |
|
7803 | }),
|
7804 |
|
7805 | (function(module, exports, __webpack_require__) {
|
7806 |
|
7807 | var parent = __webpack_require__(402);
|
7808 | __webpack_require__(51);
|
7809 |
|
7810 | module.exports = parent;
|
7811 |
|
7812 |
|
7813 | }),
|
7814 |
|
7815 | (function(module, exports, __webpack_require__) {
|
7816 |
|
7817 |
|
7818 | __webpack_require__(403);
|
7819 | __webpack_require__(405);
|
7820 | __webpack_require__(406);
|
7821 | __webpack_require__(220);
|
7822 | __webpack_require__(407);
|
7823 |
|
7824 |
|
7825 | }),
|
7826 |
|
7827 | (function(module, exports, __webpack_require__) {
|
7828 |
|
7829 |
|
7830 | var classof = __webpack_require__(56);
|
7831 | var toIndexedObject = __webpack_require__(33);
|
7832 | var $getOwnPropertyNames = __webpack_require__(96).f;
|
7833 | var arraySlice = __webpack_require__(404);
|
7834 |
|
7835 | var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
7836 | ? Object.getOwnPropertyNames(window) : [];
|
7837 |
|
7838 | var getWindowNames = function (it) {
|
7839 | try {
|
7840 | return $getOwnPropertyNames(it);
|
7841 | } catch (error) {
|
7842 | return arraySlice(windowNames);
|
7843 | }
|
7844 | };
|
7845 |
|
7846 |
|
7847 | module.exports.f = function getOwnPropertyNames(it) {
|
7848 | return windowNames && classof(it) == 'Window'
|
7849 | ? getWindowNames(it)
|
7850 | : $getOwnPropertyNames(toIndexedObject(it));
|
7851 | };
|
7852 |
|
7853 |
|
7854 | }),
|
7855 |
|
7856 | (function(module, exports, __webpack_require__) {
|
7857 |
|
7858 | var call = __webpack_require__(13);
|
7859 | var getBuiltIn = __webpack_require__(18);
|
7860 | var wellKnownSymbol = __webpack_require__(9);
|
7861 | var defineBuiltIn = __webpack_require__(39);
|
7862 |
|
7863 | module.exports = function () {
|
7864 | var Symbol = getBuiltIn('Symbol');
|
7865 | var SymbolPrototype = Symbol && Symbol.prototype;
|
7866 | var valueOf = SymbolPrototype && SymbolPrototype.valueOf;
|
7867 | var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
7868 |
|
7869 | if (SymbolPrototype && !SymbolPrototype[TO_PRIMITIVE]) {
|
7870 |
|
7871 |
|
7872 |
|
7873 | defineBuiltIn(SymbolPrototype, TO_PRIMITIVE, function (hint) {
|
7874 | return call(valueOf, this);
|
7875 | }, { arity: 1 });
|
7876 | }
|
7877 | };
|
7878 |
|
7879 |
|
7880 | }),
|
7881 |
|
7882 | (function(module, exports, __webpack_require__) {
|
7883 |
|
7884 | var NATIVE_SYMBOL = __webpack_require__(57);
|
7885 |
|
7886 |
|
7887 | module.exports = NATIVE_SYMBOL && !!Symbol['for'] && !!Symbol.keyFor;
|
7888 |
|
7889 |
|
7890 | }),
|
7891 |
|
7892 | (function(module, exports, __webpack_require__) {
|
7893 |
|
7894 | var defineWellKnownSymbol = __webpack_require__(8);
|
7895 |
|
7896 |
|
7897 |
|
7898 | defineWellKnownSymbol('iterator');
|
7899 |
|
7900 |
|
7901 | }),
|
7902 |
|
7903 | (function(module, exports, __webpack_require__) {
|
7904 |
|
7905 | var parent = __webpack_require__(436);
|
7906 | __webpack_require__(51);
|
7907 |
|
7908 | module.exports = parent;
|
7909 |
|
7910 |
|
7911 | }),
|
7912 |
|
7913 | (function(module, exports, __webpack_require__) {
|
7914 |
|
7915 | var parent = __webpack_require__(456);
|
7916 |
|
7917 | module.exports = parent;
|
7918 |
|
7919 |
|
7920 | }),
|
7921 |
|
7922 | (function(module, exports, __webpack_require__) {
|
7923 |
|
7924 | module.exports = __webpack_require__(232);
|
7925 |
|
7926 | }),
|
7927 |
|
7928 | (function(module, exports, __webpack_require__) {
|
7929 |
|
7930 | module.exports = __webpack_require__(460);
|
7931 |
|
7932 | }),
|
7933 |
|
7934 | (function(module, exports, __webpack_require__) {
|
7935 |
|
7936 | "use strict";
|
7937 |
|
7938 | var uncurryThis = __webpack_require__(4);
|
7939 | var aCallable = __webpack_require__(31);
|
7940 | var isObject = __webpack_require__(11);
|
7941 | var hasOwn = __webpack_require__(14);
|
7942 | var arraySlice = __webpack_require__(102);
|
7943 | var NATIVE_BIND = __webpack_require__(70);
|
7944 |
|
7945 | var $Function = Function;
|
7946 | var concat = uncurryThis([].concat);
|
7947 | var join = uncurryThis([].join);
|
7948 | var factories = {};
|
7949 |
|
7950 | var construct = function (C, argsLength, args) {
|
7951 | if (!hasOwn(factories, argsLength)) {
|
7952 | for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
|
7953 | factories[argsLength] = $Function('C,a', 'return new C(' + join(list, ',') + ')');
|
7954 | } return factories[argsLength](C, args);
|
7955 | };
|
7956 |
|
7957 |
|
7958 |
|
7959 | module.exports = NATIVE_BIND ? $Function.bind : function bind(that /* , ...args */) {
|
7960 | var F = aCallable(this);
|
7961 | var Prototype = F.prototype;
|
7962 | var partArgs = arraySlice(arguments, 1);
|
7963 | var boundFunction = function bound(/* args... */) {
|
7964 | var args = concat(partArgs, arraySlice(arguments));
|
7965 | return this instanceof boundFunction ? construct(F, args.length, args) : F.apply(that, args);
|
7966 | };
|
7967 | if (isObject(Prototype)) boundFunction.prototype = Prototype;
|
7968 | return boundFunction;
|
7969 | };
|
7970 |
|
7971 |
|
7972 | }),
|
7973 |
|
7974 | (function(module, exports, __webpack_require__) {
|
7975 |
|
7976 | module.exports = __webpack_require__(481);
|
7977 |
|
7978 | }),
|
7979 |
|
7980 | (function(module, exports, __webpack_require__) {
|
7981 |
|
7982 | module.exports = __webpack_require__(484);
|
7983 |
|
7984 | }),
|
7985 |
|
7986 | (function(module, exports) {
|
7987 |
|
7988 | var charenc = {
|
7989 |
|
7990 | utf8: {
|
7991 |
|
7992 | stringToBytes: function(str) {
|
7993 | return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
|
7994 | },
|
7995 |
|
7996 |
|
7997 | bytesToString: function(bytes) {
|
7998 | return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
|
7999 | }
|
8000 | },
|
8001 |
|
8002 |
|
8003 | bin: {
|
8004 |
|
8005 | stringToBytes: function(str) {
|
8006 | for (var bytes = [], i = 0; i < str.length; i++)
|
8007 | bytes.push(str.charCodeAt(i) & 0xFF);
|
8008 | return bytes;
|
8009 | },
|
8010 |
|
8011 |
|
8012 | bytesToString: function(bytes) {
|
8013 | for (var str = [], i = 0; i < bytes.length; i++)
|
8014 | str.push(String.fromCharCode(bytes[i]));
|
8015 | return str.join('');
|
8016 | }
|
8017 | }
|
8018 | };
|
8019 |
|
8020 | module.exports = charenc;
|
8021 |
|
8022 |
|
8023 | }),
|
8024 |
|
8025 | (function(module, exports, __webpack_require__) {
|
8026 |
|
8027 | module.exports = __webpack_require__(528);
|
8028 |
|
8029 | }),
|
8030 |
|
8031 | (function(module, exports, __webpack_require__) {
|
8032 |
|
8033 | var fails = __webpack_require__(3);
|
8034 | var isObject = __webpack_require__(11);
|
8035 | var classof = __webpack_require__(56);
|
8036 | var ARRAY_BUFFER_NON_EXTENSIBLE = __webpack_require__(561);
|
8037 |
|
8038 |
|
8039 | var $isExtensible = Object.isExtensible;
|
8040 | var FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); });
|
8041 |
|
8042 |
|
8043 |
|
8044 | module.exports = (FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE) ? function isExtensible(it) {
|
8045 | if (!isObject(it)) return false;
|
8046 | if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) == 'ArrayBuffer') return false;
|
8047 | return $isExtensible ? $isExtensible(it) : true;
|
8048 | } : $isExtensible;
|
8049 |
|
8050 |
|
8051 | }),
|
8052 |
|
8053 | (function(module, exports, __webpack_require__) {
|
8054 |
|
8055 | "use strict";
|
8056 |
|
8057 | var $ = __webpack_require__(0);
|
8058 | var global = __webpack_require__(6);
|
8059 | var InternalMetadataModule = __webpack_require__(111);
|
8060 | var fails = __webpack_require__(3);
|
8061 | var createNonEnumerableProperty = __webpack_require__(35);
|
8062 | var iterate = __webpack_require__(37);
|
8063 | var anInstance = __webpack_require__(100);
|
8064 | var isCallable = __webpack_require__(7);
|
8065 | var isObject = __webpack_require__(11);
|
8066 | var setToStringTag = __webpack_require__(49);
|
8067 | var defineProperty = __webpack_require__(22).f;
|
8068 | var forEach = __webpack_require__(66).forEach;
|
8069 | var DESCRIPTORS = __webpack_require__(16);
|
8070 | var InternalStateModule = __webpack_require__(38);
|
8071 |
|
8072 | var setInternalState = InternalStateModule.set;
|
8073 | var internalStateGetterFor = InternalStateModule.getterFor;
|
8074 |
|
8075 | module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
|
8076 | var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
|
8077 | var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
|
8078 | var ADDER = IS_MAP ? 'set' : 'add';
|
8079 | var NativeConstructor = global[CONSTRUCTOR_NAME];
|
8080 | var NativePrototype = NativeConstructor && NativeConstructor.prototype;
|
8081 | var exported = {};
|
8082 | var Constructor;
|
8083 |
|
8084 | if (!DESCRIPTORS || !isCallable(NativeConstructor)
|
8085 | || !(IS_WEAK || NativePrototype.forEach && !fails(function () { new NativeConstructor().entries().next(); }))
|
8086 | ) {
|
8087 |
|
8088 | Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
|
8089 | InternalMetadataModule.enable();
|
8090 | } else {
|
8091 | Constructor = wrapper(function (target, iterable) {
|
8092 | setInternalState(anInstance(target, Prototype), {
|
8093 | type: CONSTRUCTOR_NAME,
|
8094 | collection: new NativeConstructor()
|
8095 | });
|
8096 | if (iterable != undefined) iterate(iterable, target[ADDER], { that: target, AS_ENTRIES: IS_MAP });
|
8097 | });
|
8098 |
|
8099 | var Prototype = Constructor.prototype;
|
8100 |
|
8101 | var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
8102 |
|
8103 | forEach(['add', 'clear', 'delete', 'forEach', 'get', 'has', 'set', 'keys', 'values', 'entries'], function (KEY) {
|
8104 | var IS_ADDER = KEY == 'add' || KEY == 'set';
|
8105 | if (KEY in NativePrototype && !(IS_WEAK && KEY == 'clear')) {
|
8106 | createNonEnumerableProperty(Prototype, KEY, function (a, b) {
|
8107 | var collection = getInternalState(this).collection;
|
8108 | if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false;
|
8109 | var result = collection[KEY](a === 0 ? 0 : a, b);
|
8110 | return IS_ADDER ? this : result;
|
8111 | });
|
8112 | }
|
8113 | });
|
8114 |
|
8115 | IS_WEAK || defineProperty(Prototype, 'size', {
|
8116 | configurable: true,
|
8117 | get: function () {
|
8118 | return getInternalState(this).collection.size;
|
8119 | }
|
8120 | });
|
8121 | }
|
8122 |
|
8123 | setToStringTag(Constructor, CONSTRUCTOR_NAME, false, true);
|
8124 |
|
8125 | exported[CONSTRUCTOR_NAME] = Constructor;
|
8126 | $({ global: true, forced: true }, exported);
|
8127 |
|
8128 | if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
|
8129 |
|
8130 | return Constructor;
|
8131 | };
|
8132 |
|
8133 |
|
8134 | }),
|
8135 |
|
8136 | (function(module, exports, __webpack_require__) {
|
8137 |
|
8138 | "use strict";
|
8139 |
|
8140 |
|
8141 | var AV = __webpack_require__(250);
|
8142 |
|
8143 | var useAdatpers = __webpack_require__(545);
|
8144 |
|
8145 | module.exports = useAdatpers(AV);
|
8146 |
|
8147 | }),
|
8148 |
|
8149 | (function(module, exports, __webpack_require__) {
|
8150 |
|
8151 | "use strict";
|
8152 |
|
8153 |
|
8154 | module.exports = __webpack_require__(251);
|
8155 |
|
8156 | }),
|
8157 |
|
8158 | (function(module, exports, __webpack_require__) {
|
8159 |
|
8160 | "use strict";
|
8161 |
|
8162 |
|
8163 | var _interopRequireDefault = __webpack_require__(1);
|
8164 |
|
8165 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
8166 |
|
8167 |
|
8168 |
|
8169 |
|
8170 |
|
8171 |
|
8172 |
|
8173 |
|
8174 | var _ = __webpack_require__(2);
|
8175 |
|
8176 | var AV = __webpack_require__(65);
|
8177 |
|
8178 | AV._ = _;
|
8179 | AV.version = __webpack_require__(223);
|
8180 | AV.Promise = _promise.default;
|
8181 | AV.localStorage = __webpack_require__(225);
|
8182 | AV.Cache = __webpack_require__(226);
|
8183 | AV.Error = __webpack_require__(43);
|
8184 |
|
8185 | __webpack_require__(392);
|
8186 |
|
8187 | __webpack_require__(443)(AV);
|
8188 |
|
8189 | __webpack_require__(444)(AV);
|
8190 |
|
8191 | __webpack_require__(445)(AV);
|
8192 |
|
8193 | __webpack_require__(446)(AV);
|
8194 |
|
8195 | __webpack_require__(451)(AV);
|
8196 |
|
8197 | __webpack_require__(452)(AV);
|
8198 |
|
8199 | __webpack_require__(506)(AV);
|
8200 |
|
8201 | __webpack_require__(531)(AV);
|
8202 |
|
8203 | __webpack_require__(532)(AV);
|
8204 |
|
8205 | __webpack_require__(534)(AV);
|
8206 |
|
8207 | __webpack_require__(535)(AV);
|
8208 |
|
8209 | __webpack_require__(536)(AV);
|
8210 |
|
8211 | __webpack_require__(537)(AV);
|
8212 |
|
8213 | __webpack_require__(538)(AV);
|
8214 |
|
8215 | __webpack_require__(539)(AV);
|
8216 |
|
8217 | __webpack_require__(540)(AV);
|
8218 |
|
8219 | __webpack_require__(541)(AV);
|
8220 |
|
8221 | __webpack_require__(542)(AV);
|
8222 |
|
8223 | AV.Conversation = __webpack_require__(543);
|
8224 |
|
8225 | __webpack_require__(544);
|
8226 |
|
8227 | module.exports = AV;
|
8228 |
|
8229 |
|
8230 |
|
8231 |
|
8232 |
|
8233 |
|
8234 |
|
8235 |
|
8236 |
|
8237 |
|
8238 |
|
8239 |
|
8240 |
|
8241 |
|
8242 |
|
8243 |
|
8244 |
|
8245 | }),
|
8246 |
|
8247 | (function(module, exports, __webpack_require__) {
|
8248 |
|
8249 | var parent = __webpack_require__(253);
|
8250 | __webpack_require__(51);
|
8251 |
|
8252 | module.exports = parent;
|
8253 |
|
8254 |
|
8255 | }),
|
8256 |
|
8257 | (function(module, exports, __webpack_require__) {
|
8258 |
|
8259 | __webpack_require__(254);
|
8260 | __webpack_require__(48);
|
8261 | __webpack_require__(60);
|
8262 | __webpack_require__(271);
|
8263 | __webpack_require__(285);
|
8264 | __webpack_require__(286);
|
8265 | __webpack_require__(287);
|
8266 | __webpack_require__(78);
|
8267 | var path = __webpack_require__(10);
|
8268 |
|
8269 | module.exports = path.Promise;
|
8270 |
|
8271 |
|
8272 | }),
|
8273 |
|
8274 | (function(module, exports, __webpack_require__) {
|
8275 |
|
8276 |
|
8277 | __webpack_require__(255);
|
8278 |
|
8279 |
|
8280 | }),
|
8281 |
|
8282 | (function(module, exports, __webpack_require__) {
|
8283 |
|
8284 | "use strict";
|
8285 |
|
8286 | var $ = __webpack_require__(0);
|
8287 | var isPrototypeOf = __webpack_require__(21);
|
8288 | var getPrototypeOf = __webpack_require__(93);
|
8289 | var setPrototypeOf = __webpack_require__(95);
|
8290 | var copyConstructorProperties = __webpack_require__(260);
|
8291 | var create = __webpack_require__(47);
|
8292 | var createNonEnumerableProperty = __webpack_require__(35);
|
8293 | var createPropertyDescriptor = __webpack_require__(44);
|
8294 | var clearErrorStack = __webpack_require__(264);
|
8295 | var installErrorCause = __webpack_require__(265);
|
8296 | var iterate = __webpack_require__(37);
|
8297 | var normalizeStringArgument = __webpack_require__(266);
|
8298 | var wellKnownSymbol = __webpack_require__(9);
|
8299 | var ERROR_STACK_INSTALLABLE = __webpack_require__(267);
|
8300 |
|
8301 | var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
8302 | var $Error = Error;
|
8303 | var push = [].push;
|
8304 |
|
8305 | var $AggregateError = function AggregateError(errors, message /* , options */) {
|
8306 | var options = arguments.length > 2 ? arguments[2] : undefined;
|
8307 | var isInstance = isPrototypeOf(AggregateErrorPrototype, this);
|
8308 | var that;
|
8309 | if (setPrototypeOf) {
|
8310 | that = setPrototypeOf(new $Error(), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype);
|
8311 | } else {
|
8312 | that = isInstance ? this : create(AggregateErrorPrototype);
|
8313 | createNonEnumerableProperty(that, TO_STRING_TAG, 'Error');
|
8314 | }
|
8315 | if (message !== undefined) createNonEnumerableProperty(that, 'message', normalizeStringArgument(message));
|
8316 | if (ERROR_STACK_INSTALLABLE) createNonEnumerableProperty(that, 'stack', clearErrorStack(that.stack, 1));
|
8317 | installErrorCause(that, options);
|
8318 | var errorsArray = [];
|
8319 | iterate(errors, push, { that: errorsArray });
|
8320 | createNonEnumerableProperty(that, 'errors', errorsArray);
|
8321 | return that;
|
8322 | };
|
8323 |
|
8324 | if (setPrototypeOf) setPrototypeOf($AggregateError, $Error);
|
8325 | else copyConstructorProperties($AggregateError, $Error, { name: true });
|
8326 |
|
8327 | var AggregateErrorPrototype = $AggregateError.prototype = create($Error.prototype, {
|
8328 | constructor: createPropertyDescriptor(1, $AggregateError),
|
8329 | message: createPropertyDescriptor(1, ''),
|
8330 | name: createPropertyDescriptor(1, 'AggregateError')
|
8331 | });
|
8332 |
|
8333 | // `AggregateError` constructor
|
8334 | // https://tc39.es/ecma262/#sec-aggregate-error-constructor
|
8335 | $({ global: true, constructor: true, arity: 2 }, {
|
8336 | AggregateError: $AggregateError
|
8337 | });
|
8338 |
|
8339 |
|
8340 | }),
|
8341 |
|
8342 | (function(module, exports, __webpack_require__) {
|
8343 |
|
8344 | var call = __webpack_require__(13);
|
8345 | var isObject = __webpack_require__(11);
|
8346 | var isSymbol = __webpack_require__(89);
|
8347 | var getMethod = __webpack_require__(116);
|
8348 | var ordinaryToPrimitive = __webpack_require__(257);
|
8349 | var wellKnownSymbol = __webpack_require__(9);
|
8350 |
|
8351 | var $TypeError = TypeError;
|
8352 | var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
8353 |
|
8354 |
|
8355 |
|
8356 | module.exports = function (input, pref) {
|
8357 | if (!isObject(input) || isSymbol(input)) return input;
|
8358 | var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
8359 | var result;
|
8360 | if (exoticToPrim) {
|
8361 | if (pref === undefined) pref = 'default';
|
8362 | result = call(exoticToPrim, input, pref);
|
8363 | if (!isObject(result) || isSymbol(result)) return result;
|
8364 | throw $TypeError("Can't convert object to primitive value");
|
8365 | }
|
8366 | if (pref === undefined) pref = 'number';
|
8367 | return ordinaryToPrimitive(input, pref);
|
8368 | };
|
8369 |
|
8370 |
|
8371 | }),
|
8372 |
|
8373 | (function(module, exports, __webpack_require__) {
|
8374 |
|
8375 | var call = __webpack_require__(13);
|
8376 | var isCallable = __webpack_require__(7);
|
8377 | var isObject = __webpack_require__(11);
|
8378 |
|
8379 | var $TypeError = TypeError;
|
8380 |
|
8381 |
|
8382 |
|
8383 | module.exports = function (input, pref) {
|
8384 | var fn, val;
|
8385 | if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
|
8386 | if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
|
8387 | if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
|
8388 | throw $TypeError("Can't convert object to primitive value");
|
8389 | };
|
8390 |
|
8391 |
|
8392 | }),
|
8393 |
|
8394 | (function(module, exports, __webpack_require__) {
|
8395 |
|
8396 | var global = __webpack_require__(6);
|
8397 |
|
8398 |
|
8399 | var defineProperty = Object.defineProperty;
|
8400 |
|
8401 | module.exports = function (key, value) {
|
8402 | try {
|
8403 | defineProperty(global, key, { value: value, configurable: true, writable: true });
|
8404 | } catch (error) {
|
8405 | global[key] = value;
|
8406 | } return value;
|
8407 | };
|
8408 |
|
8409 |
|
8410 | }),
|
8411 |
|
8412 | (function(module, exports, __webpack_require__) {
|
8413 |
|
8414 | var isCallable = __webpack_require__(7);
|
8415 |
|
8416 | var $String = String;
|
8417 | var $TypeError = TypeError;
|
8418 |
|
8419 | module.exports = function (argument) {
|
8420 | if (typeof argument == 'object' || isCallable(argument)) return argument;
|
8421 | throw $TypeError("Can't set " + $String(argument) + ' as a prototype');
|
8422 | };
|
8423 |
|
8424 |
|
8425 | }),
|
8426 |
|
8427 | (function(module, exports, __webpack_require__) {
|
8428 |
|
8429 | var hasOwn = __webpack_require__(14);
|
8430 | var ownKeys = __webpack_require__(261);
|
8431 | var getOwnPropertyDescriptorModule = __webpack_require__(71);
|
8432 | var definePropertyModule = __webpack_require__(22);
|
8433 |
|
8434 | module.exports = function (target, source, exceptions) {
|
8435 | var keys = ownKeys(source);
|
8436 | var defineProperty = definePropertyModule.f;
|
8437 | var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
8438 | for (var i = 0; i < keys.length; i++) {
|
8439 | var key = keys[i];
|
8440 | if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
|
8441 | defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
8442 | }
|
8443 | }
|
8444 | };
|
8445 |
|
8446 |
|
8447 | }),
|
8448 |
|
8449 | (function(module, exports, __webpack_require__) {
|
8450 |
|
8451 | var getBuiltIn = __webpack_require__(18);
|
8452 | var uncurryThis = __webpack_require__(4);
|
8453 | var getOwnPropertyNamesModule = __webpack_require__(96);
|
8454 | var getOwnPropertySymbolsModule = __webpack_require__(97);
|
8455 | var anObject = __webpack_require__(19);
|
8456 |
|
8457 | var concat = uncurryThis([].concat);
|
8458 |
|
8459 |
|
8460 | module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
8461 | var keys = getOwnPropertyNamesModule.f(anObject(it));
|
8462 | var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
8463 | return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
|
8464 | };
|
8465 |
|
8466 |
|
8467 | }),
|
8468 |
|
8469 | (function(module, exports) {
|
8470 |
|
8471 | var ceil = Math.ceil;
|
8472 | var floor = Math.floor;
|
8473 |
|
8474 |
|
8475 |
|
8476 |
|
8477 | module.exports = Math.trunc || function trunc(x) {
|
8478 | var n = +x;
|
8479 | return (n > 0 ? floor : ceil)(n);
|
8480 | };
|
8481 |
|
8482 |
|
8483 | }),
|
8484 |
|
8485 | (function(module, exports, __webpack_require__) {
|
8486 |
|
8487 | var toIntegerOrInfinity = __webpack_require__(120);
|
8488 |
|
8489 | var min = Math.min;
|
8490 |
|
8491 |
|
8492 |
|
8493 | module.exports = function (argument) {
|
8494 | return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0;
|
8495 | };
|
8496 |
|
8497 |
|
8498 | }),
|
8499 |
|
8500 | (function(module, exports, __webpack_require__) {
|
8501 |
|
8502 | var uncurryThis = __webpack_require__(4);
|
8503 |
|
8504 | var $Error = Error;
|
8505 | var replace = uncurryThis(''.replace);
|
8506 |
|
8507 | var TEST = (function (arg) { return String($Error(arg).stack); })('zxcasd');
|
8508 | var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
|
8509 | var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
|
8510 |
|
8511 | module.exports = function (stack, dropEntries) {
|
8512 | if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
|
8513 | while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
|
8514 | } return stack;
|
8515 | };
|
8516 |
|
8517 |
|
8518 | }),
|
8519 |
|
8520 | (function(module, exports, __webpack_require__) {
|
8521 |
|
8522 | var isObject = __webpack_require__(11);
|
8523 | var createNonEnumerableProperty = __webpack_require__(35);
|
8524 |
|
8525 |
|
8526 |
|
8527 | module.exports = function (O, options) {
|
8528 | if (isObject(options) && 'cause' in options) {
|
8529 | createNonEnumerableProperty(O, 'cause', options.cause);
|
8530 | }
|
8531 | };
|
8532 |
|
8533 |
|
8534 | }),
|
8535 |
|
8536 | (function(module, exports, __webpack_require__) {
|
8537 |
|
8538 | var toString = __webpack_require__(75);
|
8539 |
|
8540 | module.exports = function (argument, $default) {
|
8541 | return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
|
8542 | };
|
8543 |
|
8544 |
|
8545 | }),
|
8546 |
|
8547 | (function(module, exports, __webpack_require__) {
|
8548 |
|
8549 | var fails = __webpack_require__(3);
|
8550 | var createPropertyDescriptor = __webpack_require__(44);
|
8551 |
|
8552 | module.exports = !fails(function () {
|
8553 | var error = Error('a');
|
8554 | if (!('stack' in error)) return true;
|
8555 |
|
8556 | Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
|
8557 | return error.stack !== 7;
|
8558 | });
|
8559 |
|
8560 |
|
8561 | }),
|
8562 |
|
8563 | (function(module, exports, __webpack_require__) {
|
8564 |
|
8565 | var DESCRIPTORS = __webpack_require__(16);
|
8566 | var hasOwn = __webpack_require__(14);
|
8567 |
|
8568 | var FunctionPrototype = Function.prototype;
|
8569 |
|
8570 | var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
|
8571 |
|
8572 | var EXISTS = hasOwn(FunctionPrototype, 'name');
|
8573 |
|
8574 | var PROPER = EXISTS && (function something() { }).name === 'something';
|
8575 | var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
|
8576 |
|
8577 | module.exports = {
|
8578 | EXISTS: EXISTS,
|
8579 | PROPER: PROPER,
|
8580 | CONFIGURABLE: CONFIGURABLE
|
8581 | };
|
8582 |
|
8583 |
|
8584 | }),
|
8585 |
|
8586 | (function(module, exports, __webpack_require__) {
|
8587 |
|
8588 | "use strict";
|
8589 |
|
8590 | var IteratorPrototype = __webpack_require__(161).IteratorPrototype;
|
8591 | var create = __webpack_require__(47);
|
8592 | var createPropertyDescriptor = __webpack_require__(44);
|
8593 | var setToStringTag = __webpack_require__(49);
|
8594 | var Iterators = __webpack_require__(58);
|
8595 |
|
8596 | var returnThis = function () { return this; };
|
8597 |
|
8598 | module.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
8599 | var TO_STRING_TAG = NAME + ' Iterator';
|
8600 | IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
|
8601 | setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
|
8602 | Iterators[TO_STRING_TAG] = returnThis;
|
8603 | return IteratorConstructor;
|
8604 | };
|
8605 |
|
8606 |
|
8607 | }),
|
8608 |
|
8609 | (function(module, exports, __webpack_require__) {
|
8610 |
|
8611 | "use strict";
|
8612 |
|
8613 | var TO_STRING_TAG_SUPPORT = __webpack_require__(122);
|
8614 | var classof = __webpack_require__(59);
|
8615 |
|
8616 |
|
8617 |
|
8618 | module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
|
8619 | return '[object ' + classof(this) + ']';
|
8620 | };
|
8621 |
|
8622 |
|
8623 | }),
|
8624 |
|
8625 | (function(module, exports, __webpack_require__) {
|
8626 |
|
8627 |
|
8628 | __webpack_require__(272);
|
8629 | __webpack_require__(280);
|
8630 | __webpack_require__(281);
|
8631 | __webpack_require__(282);
|
8632 | __webpack_require__(283);
|
8633 | __webpack_require__(284);
|
8634 |
|
8635 |
|
8636 | }),
|
8637 |
|
8638 | (function(module, exports, __webpack_require__) {
|
8639 |
|
8640 | "use strict";
|
8641 |
|
8642 | var $ = __webpack_require__(0);
|
8643 | var IS_PURE = __webpack_require__(32);
|
8644 | var IS_NODE = __webpack_require__(125);
|
8645 | var global = __webpack_require__(6);
|
8646 | var call = __webpack_require__(13);
|
8647 | var defineBuiltIn = __webpack_require__(39);
|
8648 | var setPrototypeOf = __webpack_require__(95);
|
8649 | var setToStringTag = __webpack_require__(49);
|
8650 | var setSpecies = __webpack_require__(162);
|
8651 | var aCallable = __webpack_require__(31);
|
8652 | var isCallable = __webpack_require__(7);
|
8653 | var isObject = __webpack_require__(11);
|
8654 | var anInstance = __webpack_require__(100);
|
8655 | var speciesConstructor = __webpack_require__(163);
|
8656 | var task = __webpack_require__(165).set;
|
8657 | var microtask = __webpack_require__(274);
|
8658 | var hostReportErrors = __webpack_require__(277);
|
8659 | var perform = __webpack_require__(76);
|
8660 | var Queue = __webpack_require__(278);
|
8661 | var InternalStateModule = __webpack_require__(38);
|
8662 | var NativePromiseConstructor = __webpack_require__(61);
|
8663 | var PromiseConstructorDetection = __webpack_require__(77);
|
8664 | var newPromiseCapabilityModule = __webpack_require__(50);
|
8665 |
|
8666 | var PROMISE = 'Promise';
|
8667 | var FORCED_PROMISE_CONSTRUCTOR = PromiseConstructorDetection.CONSTRUCTOR;
|
8668 | var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
|
8669 | var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
|
8670 | var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
|
8671 | var setInternalState = InternalStateModule.set;
|
8672 | var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
|
8673 | var PromiseConstructor = NativePromiseConstructor;
|
8674 | var PromisePrototype = NativePromisePrototype;
|
8675 | var TypeError = global.TypeError;
|
8676 | var document = global.document;
|
8677 | var process = global.process;
|
8678 | var newPromiseCapability = newPromiseCapabilityModule.f;
|
8679 | var newGenericPromiseCapability = newPromiseCapability;
|
8680 |
|
8681 | var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
|
8682 | var UNHANDLED_REJECTION = 'unhandledrejection';
|
8683 | var REJECTION_HANDLED = 'rejectionhandled';
|
8684 | var PENDING = 0;
|
8685 | var FULFILLED = 1;
|
8686 | var REJECTED = 2;
|
8687 | var HANDLED = 1;
|
8688 | var UNHANDLED = 2;
|
8689 |
|
8690 | var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
|
8691 |
|
8692 |
|
8693 | var isThenable = function (it) {
|
8694 | var then;
|
8695 | return isObject(it) && isCallable(then = it.then) ? then : false;
|
8696 | };
|
8697 |
|
8698 | var callReaction = function (reaction, state) {
|
8699 | var value = state.value;
|
8700 | var ok = state.state == FULFILLED;
|
8701 | var handler = ok ? reaction.ok : reaction.fail;
|
8702 | var resolve = reaction.resolve;
|
8703 | var reject = reaction.reject;
|
8704 | var domain = reaction.domain;
|
8705 | var result, then, exited;
|
8706 | try {
|
8707 | if (handler) {
|
8708 | if (!ok) {
|
8709 | if (state.rejection === UNHANDLED) onHandleUnhandled(state);
|
8710 | state.rejection = HANDLED;
|
8711 | }
|
8712 | if (handler === true) result = value;
|
8713 | else {
|
8714 | if (domain) domain.enter();
|
8715 | result = handler(value);
|
8716 | if (domain) {
|
8717 | domain.exit();
|
8718 | exited = true;
|
8719 | }
|
8720 | }
|
8721 | if (result === reaction.promise) {
|
8722 | reject(TypeError('Promise-chain cycle'));
|
8723 | } else if (then = isThenable(result)) {
|
8724 | call(then, result, resolve, reject);
|
8725 | } else resolve(result);
|
8726 | } else reject(value);
|
8727 | } catch (error) {
|
8728 | if (domain && !exited) domain.exit();
|
8729 | reject(error);
|
8730 | }
|
8731 | };
|
8732 |
|
8733 | var notify = function (state, isReject) {
|
8734 | if (state.notified) return;
|
8735 | state.notified = true;
|
8736 | microtask(function () {
|
8737 | var reactions = state.reactions;
|
8738 | var reaction;
|
8739 | while (reaction = reactions.get()) {
|
8740 | callReaction(reaction, state);
|
8741 | }
|
8742 | state.notified = false;
|
8743 | if (isReject && !state.rejection) onUnhandled(state);
|
8744 | });
|
8745 | };
|
8746 |
|
8747 | var dispatchEvent = function (name, promise, reason) {
|
8748 | var event, handler;
|
8749 | if (DISPATCH_EVENT) {
|
8750 | event = document.createEvent('Event');
|
8751 | event.promise = promise;
|
8752 | event.reason = reason;
|
8753 | event.initEvent(name, false, true);
|
8754 | global.dispatchEvent(event);
|
8755 | } else event = { promise: promise, reason: reason };
|
8756 | if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);
|
8757 | else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
8758 | };
|
8759 |
|
8760 | var onUnhandled = function (state) {
|
8761 | call(task, global, function () {
|
8762 | var promise = state.facade;
|
8763 | var value = state.value;
|
8764 | var IS_UNHANDLED = isUnhandled(state);
|
8765 | var result;
|
8766 | if (IS_UNHANDLED) {
|
8767 | result = perform(function () {
|
8768 | if (IS_NODE) {
|
8769 | process.emit('unhandledRejection', value, promise);
|
8770 | } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
8771 | });
|
8772 |
|
8773 | state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
|
8774 | if (result.error) throw result.value;
|
8775 | }
|
8776 | });
|
8777 | };
|
8778 |
|
8779 | var isUnhandled = function (state) {
|
8780 | return state.rejection !== HANDLED && !state.parent;
|
8781 | };
|
8782 |
|
8783 | var onHandleUnhandled = function (state) {
|
8784 | call(task, global, function () {
|
8785 | var promise = state.facade;
|
8786 | if (IS_NODE) {
|
8787 | process.emit('rejectionHandled', promise);
|
8788 | } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
|
8789 | });
|
8790 | };
|
8791 |
|
8792 | var bind = function (fn, state, unwrap) {
|
8793 | return function (value) {
|
8794 | fn(state, value, unwrap);
|
8795 | };
|
8796 | };
|
8797 |
|
8798 | var internalReject = function (state, value, unwrap) {
|
8799 | if (state.done) return;
|
8800 | state.done = true;
|
8801 | if (unwrap) state = unwrap;
|
8802 | state.value = value;
|
8803 | state.state = REJECTED;
|
8804 | notify(state, true);
|
8805 | };
|
8806 |
|
8807 | var internalResolve = function (state, value, unwrap) {
|
8808 | if (state.done) return;
|
8809 | state.done = true;
|
8810 | if (unwrap) state = unwrap;
|
8811 | try {
|
8812 | if (state.facade === value) throw TypeError("Promise can't be resolved itself");
|
8813 | var then = isThenable(value);
|
8814 | if (then) {
|
8815 | microtask(function () {
|
8816 | var wrapper = { done: false };
|
8817 | try {
|
8818 | call(then, value,
|
8819 | bind(internalResolve, wrapper, state),
|
8820 | bind(internalReject, wrapper, state)
|
8821 | );
|
8822 | } catch (error) {
|
8823 | internalReject(wrapper, error, state);
|
8824 | }
|
8825 | });
|
8826 | } else {
|
8827 | state.value = value;
|
8828 | state.state = FULFILLED;
|
8829 | notify(state, false);
|
8830 | }
|
8831 | } catch (error) {
|
8832 | internalReject({ done: false }, error, state);
|
8833 | }
|
8834 | };
|
8835 |
|
8836 |
|
8837 | if (FORCED_PROMISE_CONSTRUCTOR) {
|
8838 |
|
8839 | PromiseConstructor = function Promise(executor) {
|
8840 | anInstance(this, PromisePrototype);
|
8841 | aCallable(executor);
|
8842 | call(Internal, this);
|
8843 | var state = getInternalPromiseState(this);
|
8844 | try {
|
8845 | executor(bind(internalResolve, state), bind(internalReject, state));
|
8846 | } catch (error) {
|
8847 | internalReject(state, error);
|
8848 | }
|
8849 | };
|
8850 |
|
8851 | PromisePrototype = PromiseConstructor.prototype;
|
8852 |
|
8853 |
|
8854 | Internal = function Promise(executor) {
|
8855 | setInternalState(this, {
|
8856 | type: PROMISE,
|
8857 | done: false,
|
8858 | notified: false,
|
8859 | parent: false,
|
8860 | reactions: new Queue(),
|
8861 | rejection: false,
|
8862 | state: PENDING,
|
8863 | value: undefined
|
8864 | });
|
8865 | };
|
8866 |
|
8867 |
|
8868 |
|
8869 | Internal.prototype = defineBuiltIn(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
|
8870 | var state = getInternalPromiseState(this);
|
8871 | var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
|
8872 | state.parent = true;
|
8873 | reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
|
8874 | reaction.fail = isCallable(onRejected) && onRejected;
|
8875 | reaction.domain = IS_NODE ? process.domain : undefined;
|
8876 | if (state.state == PENDING) state.reactions.add(reaction);
|
8877 | else microtask(function () {
|
8878 | callReaction(reaction, state);
|
8879 | });
|
8880 | return reaction.promise;
|
8881 | });
|
8882 |
|
8883 | OwnPromiseCapability = function () {
|
8884 | var promise = new Internal();
|
8885 | var state = getInternalPromiseState(promise);
|
8886 | this.promise = promise;
|
8887 | this.resolve = bind(internalResolve, state);
|
8888 | this.reject = bind(internalReject, state);
|
8889 | };
|
8890 |
|
8891 | newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
|
8892 | return C === PromiseConstructor || C === PromiseWrapper
|
8893 | ? new OwnPromiseCapability(C)
|
8894 | : newGenericPromiseCapability(C);
|
8895 | };
|
8896 |
|
8897 | if (!IS_PURE && isCallable(NativePromiseConstructor) && NativePromisePrototype !== Object.prototype) {
|
8898 | nativeThen = NativePromisePrototype.then;
|
8899 |
|
8900 | if (!NATIVE_PROMISE_SUBCLASSING) {
|
8901 |
|
8902 | defineBuiltIn(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
|
8903 | var that = this;
|
8904 | return new PromiseConstructor(function (resolve, reject) {
|
8905 | call(nativeThen, that, resolve, reject);
|
8906 | }).then(onFulfilled, onRejected);
|
8907 |
|
8908 | }, { unsafe: true });
|
8909 | }
|
8910 |
|
8911 |
|
8912 | try {
|
8913 | delete NativePromisePrototype.constructor;
|
8914 | } catch (error) { }
|
8915 |
|
8916 |
|
8917 | if (setPrototypeOf) {
|
8918 | setPrototypeOf(NativePromisePrototype, PromisePrototype);
|
8919 | }
|
8920 | }
|
8921 | }
|
8922 |
|
8923 | $({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
8924 | Promise: PromiseConstructor
|
8925 | });
|
8926 |
|
8927 | setToStringTag(PromiseConstructor, PROMISE, false, true);
|
8928 | setSpecies(PROMISE);
|
8929 |
|
8930 |
|
8931 | }),
|
8932 |
|
8933 | (function(module, exports) {
|
8934 |
|
8935 | var $TypeError = TypeError;
|
8936 |
|
8937 | module.exports = function (passed, required) {
|
8938 | if (passed < required) throw $TypeError('Not enough arguments');
|
8939 | return passed;
|
8940 | };
|
8941 |
|
8942 |
|
8943 | }),
|
8944 |
|
8945 | (function(module, exports, __webpack_require__) {
|
8946 |
|
8947 | var global = __webpack_require__(6);
|
8948 | var bind = __webpack_require__(45);
|
8949 | var getOwnPropertyDescriptor = __webpack_require__(71).f;
|
8950 | var macrotask = __webpack_require__(165).set;
|
8951 | var IS_IOS = __webpack_require__(166);
|
8952 | var IS_IOS_PEBBLE = __webpack_require__(275);
|
8953 | var IS_WEBOS_WEBKIT = __webpack_require__(276);
|
8954 | var IS_NODE = __webpack_require__(125);
|
8955 |
|
8956 | var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
|
8957 | var document = global.document;
|
8958 | var process = global.process;
|
8959 | var Promise = global.Promise;
|
8960 |
|
8961 | var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');
|
8962 | var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
|
8963 |
|
8964 | var flush, head, last, notify, toggle, node, promise, then;
|
8965 |
|
8966 |
|
8967 | if (!queueMicrotask) {
|
8968 | flush = function () {
|
8969 | var parent, fn;
|
8970 | if (IS_NODE && (parent = process.domain)) parent.exit();
|
8971 | while (head) {
|
8972 | fn = head.fn;
|
8973 | head = head.next;
|
8974 | try {
|
8975 | fn();
|
8976 | } catch (error) {
|
8977 | if (head) notify();
|
8978 | else last = undefined;
|
8979 | throw error;
|
8980 | }
|
8981 | } last = undefined;
|
8982 | if (parent) parent.enter();
|
8983 | };
|
8984 |
|
8985 |
|
8986 |
|
8987 | if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {
|
8988 | toggle = true;
|
8989 | node = document.createTextNode('');
|
8990 | new MutationObserver(flush).observe(node, { characterData: true });
|
8991 | notify = function () {
|
8992 | node.data = toggle = !toggle;
|
8993 | };
|
8994 |
|
8995 | } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {
|
8996 |
|
8997 | promise = Promise.resolve(undefined);
|
8998 |
|
8999 | promise.constructor = Promise;
|
9000 | then = bind(promise.then, promise);
|
9001 | notify = function () {
|
9002 | then(flush);
|
9003 | };
|
9004 |
|
9005 | } else if (IS_NODE) {
|
9006 | notify = function () {
|
9007 | process.nextTick(flush);
|
9008 | };
|
9009 |
|
9010 |
|
9011 |
|
9012 |
|
9013 |
|
9014 |
|
9015 | } else {
|
9016 |
|
9017 | macrotask = bind(macrotask, global);
|
9018 | notify = function () {
|
9019 | macrotask(flush);
|
9020 | };
|
9021 | }
|
9022 | }
|
9023 |
|
9024 | module.exports = queueMicrotask || function (fn) {
|
9025 | var task = { fn: fn, next: undefined };
|
9026 | if (last) last.next = task;
|
9027 | if (!head) {
|
9028 | head = task;
|
9029 | notify();
|
9030 | } last = task;
|
9031 | };
|
9032 |
|
9033 |
|
9034 | }),
|
9035 |
|
9036 | (function(module, exports, __webpack_require__) {
|
9037 |
|
9038 | var userAgent = __webpack_require__(91);
|
9039 | var global = __webpack_require__(6);
|
9040 |
|
9041 | module.exports = /ipad|iphone|ipod/i.test(userAgent) && global.Pebble !== undefined;
|
9042 |
|
9043 |
|
9044 | }),
|
9045 |
|
9046 | (function(module, exports, __webpack_require__) {
|
9047 |
|
9048 | var userAgent = __webpack_require__(91);
|
9049 |
|
9050 | module.exports = /web0s(?!.*chrome)/i.test(userAgent);
|
9051 |
|
9052 |
|
9053 | }),
|
9054 |
|
9055 | (function(module, exports, __webpack_require__) {
|
9056 |
|
9057 | var global = __webpack_require__(6);
|
9058 |
|
9059 | module.exports = function (a, b) {
|
9060 | var console = global.console;
|
9061 | if (console && console.error) {
|
9062 | arguments.length == 1 ? console.error(a) : console.error(a, b);
|
9063 | }
|
9064 | };
|
9065 |
|
9066 |
|
9067 | }),
|
9068 |
|
9069 | (function(module, exports) {
|
9070 |
|
9071 | var Queue = function () {
|
9072 | this.head = null;
|
9073 | this.tail = null;
|
9074 | };
|
9075 |
|
9076 | Queue.prototype = {
|
9077 | add: function (item) {
|
9078 | var entry = { item: item, next: null };
|
9079 | if (this.head) this.tail.next = entry;
|
9080 | else this.head = entry;
|
9081 | this.tail = entry;
|
9082 | },
|
9083 | get: function () {
|
9084 | var entry = this.head;
|
9085 | if (entry) {
|
9086 | this.head = entry.next;
|
9087 | if (this.tail === entry) this.tail = null;
|
9088 | return entry.item;
|
9089 | }
|
9090 | }
|
9091 | };
|
9092 |
|
9093 | module.exports = Queue;
|
9094 |
|
9095 |
|
9096 | }),
|
9097 |
|
9098 | (function(module, exports) {
|
9099 |
|
9100 | module.exports = typeof window == 'object' && typeof Deno != 'object';
|
9101 |
|
9102 |
|
9103 | }),
|
9104 |
|
9105 | (function(module, exports, __webpack_require__) {
|
9106 |
|
9107 | "use strict";
|
9108 |
|
9109 | var $ = __webpack_require__(0);
|
9110 | var call = __webpack_require__(13);
|
9111 | var aCallable = __webpack_require__(31);
|
9112 | var newPromiseCapabilityModule = __webpack_require__(50);
|
9113 | var perform = __webpack_require__(76);
|
9114 | var iterate = __webpack_require__(37);
|
9115 | var PROMISE_STATICS_INCORRECT_ITERATION = __webpack_require__(167);
|
9116 |
|
9117 |
|
9118 |
|
9119 | $({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
|
9120 | all: function all(iterable) {
|
9121 | var C = this;
|
9122 | var capability = newPromiseCapabilityModule.f(C);
|
9123 | var resolve = capability.resolve;
|
9124 | var reject = capability.reject;
|
9125 | var result = perform(function () {
|
9126 | var $promiseResolve = aCallable(C.resolve);
|
9127 | var values = [];
|
9128 | var counter = 0;
|
9129 | var remaining = 1;
|
9130 | iterate(iterable, function (promise) {
|
9131 | var index = counter++;
|
9132 | var alreadyCalled = false;
|
9133 | remaining++;
|
9134 | call($promiseResolve, C, promise).then(function (value) {
|
9135 | if (alreadyCalled) return;
|
9136 | alreadyCalled = true;
|
9137 | values[index] = value;
|
9138 | --remaining || resolve(values);
|
9139 | }, reject);
|
9140 | });
|
9141 | --remaining || resolve(values);
|
9142 | });
|
9143 | if (result.error) reject(result.value);
|
9144 | return capability.promise;
|
9145 | }
|
9146 | });
|
9147 |
|
9148 |
|
9149 | }),
|
9150 |
|
9151 | (function(module, exports, __webpack_require__) {
|
9152 |
|
9153 | "use strict";
|
9154 |
|
9155 | var $ = __webpack_require__(0);
|
9156 | var IS_PURE = __webpack_require__(32);
|
9157 | var FORCED_PROMISE_CONSTRUCTOR = __webpack_require__(77).CONSTRUCTOR;
|
9158 | var NativePromiseConstructor = __webpack_require__(61);
|
9159 | var getBuiltIn = __webpack_require__(18);
|
9160 | var isCallable = __webpack_require__(7);
|
9161 | var defineBuiltIn = __webpack_require__(39);
|
9162 |
|
9163 | var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
|
9164 |
|
9165 |
|
9166 |
|
9167 | $({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR, real: true }, {
|
9168 | 'catch': function (onRejected) {
|
9169 | return this.then(undefined, onRejected);
|
9170 | }
|
9171 | });
|
9172 |
|
9173 |
|
9174 | if (!IS_PURE && isCallable(NativePromiseConstructor)) {
|
9175 | var method = getBuiltIn('Promise').prototype['catch'];
|
9176 | if (NativePromisePrototype['catch'] !== method) {
|
9177 | defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });
|
9178 | }
|
9179 | }
|
9180 |
|
9181 |
|
9182 | }),
|
9183 |
|
9184 | (function(module, exports, __webpack_require__) {
|
9185 |
|
9186 | "use strict";
|
9187 |
|
9188 | var $ = __webpack_require__(0);
|
9189 | var call = __webpack_require__(13);
|
9190 | var aCallable = __webpack_require__(31);
|
9191 | var newPromiseCapabilityModule = __webpack_require__(50);
|
9192 | var perform = __webpack_require__(76);
|
9193 | var iterate = __webpack_require__(37);
|
9194 | var PROMISE_STATICS_INCORRECT_ITERATION = __webpack_require__(167);
|
9195 |
|
9196 |
|
9197 |
|
9198 | $({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
|
9199 | race: function race(iterable) {
|
9200 | var C = this;
|
9201 | var capability = newPromiseCapabilityModule.f(C);
|
9202 | var reject = capability.reject;
|
9203 | var result = perform(function () {
|
9204 | var $promiseResolve = aCallable(C.resolve);
|
9205 | iterate(iterable, function (promise) {
|
9206 | call($promiseResolve, C, promise).then(capability.resolve, reject);
|
9207 | });
|
9208 | });
|
9209 | if (result.error) reject(result.value);
|
9210 | return capability.promise;
|
9211 | }
|
9212 | });
|
9213 |
|
9214 |
|
9215 | }),
|
9216 |
|
9217 | (function(module, exports, __webpack_require__) {
|
9218 |
|
9219 | "use strict";
|
9220 |
|
9221 | var $ = __webpack_require__(0);
|
9222 | var call = __webpack_require__(13);
|
9223 | var newPromiseCapabilityModule = __webpack_require__(50);
|
9224 | var FORCED_PROMISE_CONSTRUCTOR = __webpack_require__(77).CONSTRUCTOR;
|
9225 |
|
9226 |
|
9227 |
|
9228 | $({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
9229 | reject: function reject(r) {
|
9230 | var capability = newPromiseCapabilityModule.f(this);
|
9231 | call(capability.reject, undefined, r);
|
9232 | return capability.promise;
|
9233 | }
|
9234 | });
|
9235 |
|
9236 |
|
9237 | }),
|
9238 |
|
9239 | (function(module, exports, __webpack_require__) {
|
9240 |
|
9241 | "use strict";
|
9242 |
|
9243 | var $ = __webpack_require__(0);
|
9244 | var getBuiltIn = __webpack_require__(18);
|
9245 | var IS_PURE = __webpack_require__(32);
|
9246 | var NativePromiseConstructor = __webpack_require__(61);
|
9247 | var FORCED_PROMISE_CONSTRUCTOR = __webpack_require__(77).CONSTRUCTOR;
|
9248 | var promiseResolve = __webpack_require__(169);
|
9249 |
|
9250 | var PromiseConstructorWrapper = getBuiltIn('Promise');
|
9251 | var CHECK_WRAPPER = IS_PURE && !FORCED_PROMISE_CONSTRUCTOR;
|
9252 |
|
9253 |
|
9254 |
|
9255 | $({ target: 'Promise', stat: true, forced: IS_PURE || FORCED_PROMISE_CONSTRUCTOR }, {
|
9256 | resolve: function resolve(x) {
|
9257 | return promiseResolve(CHECK_WRAPPER && this === PromiseConstructorWrapper ? NativePromiseConstructor : this, x);
|
9258 | }
|
9259 | });
|
9260 |
|
9261 |
|
9262 | }),
|
9263 |
|
9264 | (function(module, exports, __webpack_require__) {
|
9265 |
|
9266 | "use strict";
|
9267 |
|
9268 | var $ = __webpack_require__(0);
|
9269 | var call = __webpack_require__(13);
|
9270 | var aCallable = __webpack_require__(31);
|
9271 | var newPromiseCapabilityModule = __webpack_require__(50);
|
9272 | var perform = __webpack_require__(76);
|
9273 | var iterate = __webpack_require__(37);
|
9274 |
|
9275 |
|
9276 |
|
9277 | $({ target: 'Promise', stat: true }, {
|
9278 | allSettled: function allSettled(iterable) {
|
9279 | var C = this;
|
9280 | var capability = newPromiseCapabilityModule.f(C);
|
9281 | var resolve = capability.resolve;
|
9282 | var reject = capability.reject;
|
9283 | var result = perform(function () {
|
9284 | var promiseResolve = aCallable(C.resolve);
|
9285 | var values = [];
|
9286 | var counter = 0;
|
9287 | var remaining = 1;
|
9288 | iterate(iterable, function (promise) {
|
9289 | var index = counter++;
|
9290 | var alreadyCalled = false;
|
9291 | remaining++;
|
9292 | call(promiseResolve, C, promise).then(function (value) {
|
9293 | if (alreadyCalled) return;
|
9294 | alreadyCalled = true;
|
9295 | values[index] = { status: 'fulfilled', value: value };
|
9296 | --remaining || resolve(values);
|
9297 | }, function (error) {
|
9298 | if (alreadyCalled) return;
|
9299 | alreadyCalled = true;
|
9300 | values[index] = { status: 'rejected', reason: error };
|
9301 | --remaining || resolve(values);
|
9302 | });
|
9303 | });
|
9304 | --remaining || resolve(values);
|
9305 | });
|
9306 | if (result.error) reject(result.value);
|
9307 | return capability.promise;
|
9308 | }
|
9309 | });
|
9310 |
|
9311 |
|
9312 | }),
|
9313 |
|
9314 | (function(module, exports, __webpack_require__) {
|
9315 |
|
9316 | "use strict";
|
9317 |
|
9318 | var $ = __webpack_require__(0);
|
9319 | var call = __webpack_require__(13);
|
9320 | var aCallable = __webpack_require__(31);
|
9321 | var getBuiltIn = __webpack_require__(18);
|
9322 | var newPromiseCapabilityModule = __webpack_require__(50);
|
9323 | var perform = __webpack_require__(76);
|
9324 | var iterate = __webpack_require__(37);
|
9325 |
|
9326 | var PROMISE_ANY_ERROR = 'No one promise resolved';
|
9327 |
|
9328 |
|
9329 |
|
9330 | $({ target: 'Promise', stat: true }, {
|
9331 | any: function any(iterable) {
|
9332 | var C = this;
|
9333 | var AggregateError = getBuiltIn('AggregateError');
|
9334 | var capability = newPromiseCapabilityModule.f(C);
|
9335 | var resolve = capability.resolve;
|
9336 | var reject = capability.reject;
|
9337 | var result = perform(function () {
|
9338 | var promiseResolve = aCallable(C.resolve);
|
9339 | var errors = [];
|
9340 | var counter = 0;
|
9341 | var remaining = 1;
|
9342 | var alreadyResolved = false;
|
9343 | iterate(iterable, function (promise) {
|
9344 | var index = counter++;
|
9345 | var alreadyRejected = false;
|
9346 | remaining++;
|
9347 | call(promiseResolve, C, promise).then(function (value) {
|
9348 | if (alreadyRejected || alreadyResolved) return;
|
9349 | alreadyResolved = true;
|
9350 | resolve(value);
|
9351 | }, function (error) {
|
9352 | if (alreadyRejected || alreadyResolved) return;
|
9353 | alreadyRejected = true;
|
9354 | errors[index] = error;
|
9355 | --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));
|
9356 | });
|
9357 | });
|
9358 | --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));
|
9359 | });
|
9360 | if (result.error) reject(result.value);
|
9361 | return capability.promise;
|
9362 | }
|
9363 | });
|
9364 |
|
9365 |
|
9366 | }),
|
9367 |
|
9368 | (function(module, exports, __webpack_require__) {
|
9369 |
|
9370 | "use strict";
|
9371 |
|
9372 | var $ = __webpack_require__(0);
|
9373 | var IS_PURE = __webpack_require__(32);
|
9374 | var NativePromiseConstructor = __webpack_require__(61);
|
9375 | var fails = __webpack_require__(3);
|
9376 | var getBuiltIn = __webpack_require__(18);
|
9377 | var isCallable = __webpack_require__(7);
|
9378 | var speciesConstructor = __webpack_require__(163);
|
9379 | var promiseResolve = __webpack_require__(169);
|
9380 | var defineBuiltIn = __webpack_require__(39);
|
9381 |
|
9382 | var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
|
9383 |
|
9384 |
|
9385 | var NON_GENERIC = !!NativePromiseConstructor && fails(function () {
|
9386 |
|
9387 | NativePromisePrototype['finally'].call({ then: function () { } }, function () { });
|
9388 | });
|
9389 |
|
9390 |
|
9391 |
|
9392 | $({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {
|
9393 | 'finally': function (onFinally) {
|
9394 | var C = speciesConstructor(this, getBuiltIn('Promise'));
|
9395 | var isFunction = isCallable(onFinally);
|
9396 | return this.then(
|
9397 | isFunction ? function (x) {
|
9398 | return promiseResolve(C, onFinally()).then(function () { return x; });
|
9399 | } : onFinally,
|
9400 | isFunction ? function (e) {
|
9401 | return promiseResolve(C, onFinally()).then(function () { throw e; });
|
9402 | } : onFinally
|
9403 | );
|
9404 | }
|
9405 | });
|
9406 |
|
9407 |
|
9408 | if (!IS_PURE && isCallable(NativePromiseConstructor)) {
|
9409 | var method = getBuiltIn('Promise').prototype['finally'];
|
9410 | if (NativePromisePrototype['finally'] !== method) {
|
9411 | defineBuiltIn(NativePromisePrototype, 'finally', method, { unsafe: true });
|
9412 | }
|
9413 | }
|
9414 |
|
9415 |
|
9416 | }),
|
9417 |
|
9418 | (function(module, exports, __webpack_require__) {
|
9419 |
|
9420 | var uncurryThis = __webpack_require__(4);
|
9421 | var toIntegerOrInfinity = __webpack_require__(120);
|
9422 | var toString = __webpack_require__(75);
|
9423 | var requireObjectCoercible = __webpack_require__(115);
|
9424 |
|
9425 | var charAt = uncurryThis(''.charAt);
|
9426 | var charCodeAt = uncurryThis(''.charCodeAt);
|
9427 | var stringSlice = uncurryThis(''.slice);
|
9428 |
|
9429 | var createMethod = function (CONVERT_TO_STRING) {
|
9430 | return function ($this, pos) {
|
9431 | var S = toString(requireObjectCoercible($this));
|
9432 | var position = toIntegerOrInfinity(pos);
|
9433 | var size = S.length;
|
9434 | var first, second;
|
9435 | if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
9436 | first = charCodeAt(S, position);
|
9437 | return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
9438 | || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
|
9439 | ? CONVERT_TO_STRING
|
9440 | ? charAt(S, position)
|
9441 | : first
|
9442 | : CONVERT_TO_STRING
|
9443 | ? stringSlice(S, position, position + 2)
|
9444 | : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
9445 | };
|
9446 | };
|
9447 |
|
9448 | module.exports = {
|
9449 |
|
9450 |
|
9451 | codeAt: createMethod(false),
|
9452 |
|
9453 |
|
9454 | charAt: createMethod(true)
|
9455 | };
|
9456 |
|
9457 |
|
9458 | }),
|
9459 |
|
9460 | (function(module, exports) {
|
9461 |
|
9462 |
|
9463 |
|
9464 | module.exports = {
|
9465 | CSSRuleList: 0,
|
9466 | CSSStyleDeclaration: 0,
|
9467 | CSSValueList: 0,
|
9468 | ClientRectList: 0,
|
9469 | DOMRectList: 0,
|
9470 | DOMStringList: 0,
|
9471 | DOMTokenList: 1,
|
9472 | DataTransferItemList: 0,
|
9473 | FileList: 0,
|
9474 | HTMLAllCollection: 0,
|
9475 | HTMLCollection: 0,
|
9476 | HTMLFormElement: 0,
|
9477 | HTMLSelectElement: 0,
|
9478 | MediaList: 0,
|
9479 | MimeTypeArray: 0,
|
9480 | NamedNodeMap: 0,
|
9481 | NodeList: 1,
|
9482 | PaintRequestList: 0,
|
9483 | Plugin: 0,
|
9484 | PluginArray: 0,
|
9485 | SVGLengthList: 0,
|
9486 | SVGNumberList: 0,
|
9487 | SVGPathSegList: 0,
|
9488 | SVGPointList: 0,
|
9489 | SVGStringList: 0,
|
9490 | SVGTransformList: 0,
|
9491 | SourceBufferList: 0,
|
9492 | StyleSheetList: 0,
|
9493 | TextTrackCueList: 0,
|
9494 | TextTrackList: 0,
|
9495 | TouchList: 0
|
9496 | };
|
9497 |
|
9498 |
|
9499 | }),
|
9500 |
|
9501 | (function(module, __webpack_exports__, __webpack_require__) {
|
9502 |
|
9503 | "use strict";
|
9504 | var __WEBPACK_IMPORTED_MODULE_0__index_js__ = __webpack_require__(126);
|
9505 |
|
9506 |
|
9507 |
|
9508 |
|
9509 |
|
9510 |
|
9511 |
|
9512 |
|
9513 |
|
9514 |
|
9515 |
|
9516 |
|
9517 |
|
9518 |
|
9519 |
|
9520 |
|
9521 |
|
9522 |
|
9523 |
|
9524 |
|
9525 |
|
9526 |
|
9527 | var _ = Object(__WEBPACK_IMPORTED_MODULE_0__index_js__["mixin"])(__WEBPACK_IMPORTED_MODULE_0__index_js__);
|
9528 |
|
9529 | _._ = _;
|
9530 |
|
9531 | __webpack_exports__["a"] = (_);
|
9532 |
|
9533 |
|
9534 | }),
|
9535 |
|
9536 | (function(module, __webpack_exports__, __webpack_require__) {
|
9537 |
|
9538 | "use strict";
|
9539 | __webpack_exports__["a"] = isNull;
|
9540 |
|
9541 | function isNull(obj) {
|
9542 | return obj === null;
|
9543 | }
|
9544 |
|
9545 |
|
9546 | }),
|
9547 |
|
9548 | (function(module, __webpack_exports__, __webpack_require__) {
|
9549 |
|
9550 | "use strict";
|
9551 | __webpack_exports__["a"] = isElement;
|
9552 |
|
9553 | function isElement(obj) {
|
9554 | return !!(obj && obj.nodeType === 1);
|
9555 | }
|
9556 |
|
9557 |
|
9558 | }),
|
9559 |
|
9560 | (function(module, __webpack_exports__, __webpack_require__) {
|
9561 |
|
9562 | "use strict";
|
9563 | var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(17);
|
9564 |
|
9565 |
|
9566 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" ])('Date'));
|
9567 |
|
9568 |
|
9569 | }),
|
9570 |
|
9571 | (function(module, __webpack_exports__, __webpack_require__) {
|
9572 |
|
9573 | "use strict";
|
9574 | var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(17);
|
9575 |
|
9576 |
|
9577 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" ])('RegExp'));
|
9578 |
|
9579 |
|
9580 | }),
|
9581 |
|
9582 | (function(module, __webpack_exports__, __webpack_require__) {
|
9583 |
|
9584 | "use strict";
|
9585 | var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(17);
|
9586 |
|
9587 |
|
9588 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" ])('Error'));
|
9589 |
|
9590 |
|
9591 | }),
|
9592 |
|
9593 | (function(module, __webpack_exports__, __webpack_require__) {
|
9594 |
|
9595 | "use strict";
|
9596 | var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(17);
|
9597 |
|
9598 |
|
9599 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" ])('Object'));
|
9600 |
|
9601 |
|
9602 | }),
|
9603 |
|
9604 | (function(module, __webpack_exports__, __webpack_require__) {
|
9605 |
|
9606 | "use strict";
|
9607 | __webpack_exports__["a"] = isFinite;
|
9608 | var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(5);
|
9609 | var __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__ = __webpack_require__(173);
|
9610 |
|
9611 |
|
9612 |
|
9613 |
|
9614 | function isFinite(obj) {
|
9615 | return !Object(__WEBPACK_IMPORTED_MODULE_1__isSymbol_js__["a" ])(obj) && Object(__WEBPACK_IMPORTED_MODULE_0__setup_js__["f" ])(obj) && !isNaN(parseFloat(obj));
|
9616 | }
|
9617 |
|
9618 |
|
9619 | }),
|
9620 |
|
9621 | (function(module, __webpack_exports__, __webpack_require__) {
|
9622 |
|
9623 | "use strict";
|
9624 | var __WEBPACK_IMPORTED_MODULE_0__createSizePropertyCheck_js__ = __webpack_require__(178);
|
9625 | var __WEBPACK_IMPORTED_MODULE_1__getByteLength_js__ = __webpack_require__(130);
|
9626 |
|
9627 |
|
9628 |
|
9629 |
|
9630 |
|
9631 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createSizePropertyCheck_js__["a" ])(__WEBPACK_IMPORTED_MODULE_1__getByteLength_js__["a" ]));
|
9632 |
|
9633 |
|
9634 | }),
|
9635 |
|
9636 | (function(module, __webpack_exports__, __webpack_require__) {
|
9637 |
|
9638 | "use strict";
|
9639 | __webpack_exports__["a"] = isEmpty;
|
9640 | var __WEBPACK_IMPORTED_MODULE_0__getLength_js__ = __webpack_require__(28);
|
9641 | var __WEBPACK_IMPORTED_MODULE_1__isArray_js__ = __webpack_require__(53);
|
9642 | var __WEBPACK_IMPORTED_MODULE_2__isString_js__ = __webpack_require__(127);
|
9643 | var __WEBPACK_IMPORTED_MODULE_3__isArguments_js__ = __webpack_require__(129);
|
9644 | var __WEBPACK_IMPORTED_MODULE_4__keys_js__ = __webpack_require__(15);
|
9645 |
|
9646 |
|
9647 |
|
9648 |
|
9649 |
|
9650 |
|
9651 |
|
9652 |
|
9653 | function isEmpty(obj) {
|
9654 | if (obj == null) return true;
|
9655 |
|
9656 |
|
9657 | var length = Object(__WEBPACK_IMPORTED_MODULE_0__getLength_js__["a" ])(obj);
|
9658 | if (typeof length == 'number' && (
|
9659 | Object(__WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" ])(obj) || Object(__WEBPACK_IMPORTED_MODULE_2__isString_js__["a" ])(obj) || Object(__WEBPACK_IMPORTED_MODULE_3__isArguments_js__["a" ])(obj)
|
9660 | )) return length === 0;
|
9661 | return Object(__WEBPACK_IMPORTED_MODULE_0__getLength_js__["a" ])(Object(__WEBPACK_IMPORTED_MODULE_4__keys_js__["a" ])(obj)) === 0;
|
9662 | }
|
9663 |
|
9664 |
|
9665 | }),
|
9666 |
|
9667 | (function(module, __webpack_exports__, __webpack_require__) {
|
9668 |
|
9669 | "use strict";
|
9670 | __webpack_exports__["a"] = isEqual;
|
9671 | var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(24);
|
9672 | var __WEBPACK_IMPORTED_MODULE_1__setup_js__ = __webpack_require__(5);
|
9673 | var __WEBPACK_IMPORTED_MODULE_2__getByteLength_js__ = __webpack_require__(130);
|
9674 | var __WEBPACK_IMPORTED_MODULE_3__isTypedArray_js__ = __webpack_require__(176);
|
9675 | var __WEBPACK_IMPORTED_MODULE_4__isFunction_js__ = __webpack_require__(27);
|
9676 | var __WEBPACK_IMPORTED_MODULE_5__stringTagBug_js__ = __webpack_require__(79);
|
9677 | var __WEBPACK_IMPORTED_MODULE_6__isDataView_js__ = __webpack_require__(128);
|
9678 | var __WEBPACK_IMPORTED_MODULE_7__keys_js__ = __webpack_require__(15);
|
9679 | var __WEBPACK_IMPORTED_MODULE_8__has_js__ = __webpack_require__(40);
|
9680 | var __WEBPACK_IMPORTED_MODULE_9__toBufferView_js__ = __webpack_require__(301);
|
9681 |
|
9682 |
|
9683 |
|
9684 |
|
9685 |
|
9686 |
|
9687 |
|
9688 |
|
9689 |
|
9690 |
|
9691 |
|
9692 |
|
9693 | var tagDataView = '[object DataView]';
|
9694 |
|
9695 |
|
9696 | function eq(a, b, aStack, bStack) {
|
9697 |
|
9698 |
|
9699 | if (a === b) return a !== 0 || 1 / a === 1 / b;
|
9700 |
|
9701 | if (a == null || b == null) return false;
|
9702 |
|
9703 | if (a !== a) return b !== b;
|
9704 |
|
9705 | var type = typeof a;
|
9706 | if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
|
9707 | return deepEq(a, b, aStack, bStack);
|
9708 | }
|
9709 |
|
9710 |
|
9711 | function deepEq(a, b, aStack, bStack) {
|
9712 |
|
9713 | if (a instanceof __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" ]) a = a._wrapped;
|
9714 | if (b instanceof __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" ]) b = b._wrapped;
|
9715 |
|
9716 | var className = __WEBPACK_IMPORTED_MODULE_1__setup_js__["t" ].call(a);
|
9717 | if (className !== __WEBPACK_IMPORTED_MODULE_1__setup_js__["t" ].call(b)) return false;
|
9718 |
|
9719 | if (__WEBPACK_IMPORTED_MODULE_5__stringTagBug_js__["a" ] && className == '[object Object]' && Object(__WEBPACK_IMPORTED_MODULE_6__isDataView_js__["a" ])(a)) {
|
9720 | if (!Object(__WEBPACK_IMPORTED_MODULE_6__isDataView_js__["a" ])(b)) return false;
|
9721 | className = tagDataView;
|
9722 | }
|
9723 | switch (className) {
|
9724 |
|
9725 | case '[object RegExp]':
|
9726 |
|
9727 | case '[object String]':
|
9728 |
|
9729 |
|
9730 | return '' + a === '' + b;
|
9731 | case '[object Number]':
|
9732 |
|
9733 |
|
9734 | if (+a !== +a) return +b !== +b;
|
9735 |
|
9736 | return +a === 0 ? 1 / +a === 1 / b : +a === +b;
|
9737 | case '[object Date]':
|
9738 | case '[object Boolean]':
|
9739 |
|
9740 |
|
9741 |
|
9742 | return +a === +b;
|
9743 | case '[object Symbol]':
|
9744 | return __WEBPACK_IMPORTED_MODULE_1__setup_js__["d" ].valueOf.call(a) === __WEBPACK_IMPORTED_MODULE_1__setup_js__["d" ].valueOf.call(b);
|
9745 | case '[object ArrayBuffer]':
|
9746 | case tagDataView:
|
9747 |
|
9748 | return deepEq(Object(__WEBPACK_IMPORTED_MODULE_9__toBufferView_js__["a" ])(a), Object(__WEBPACK_IMPORTED_MODULE_9__toBufferView_js__["a" ])(b), aStack, bStack);
|
9749 | }
|
9750 |
|
9751 | var areArrays = className === '[object Array]';
|
9752 | if (!areArrays && Object(__WEBPACK_IMPORTED_MODULE_3__isTypedArray_js__["a" ])(a)) {
|
9753 | var byteLength = Object(__WEBPACK_IMPORTED_MODULE_2__getByteLength_js__["a" ])(a);
|
9754 | if (byteLength !== Object(__WEBPACK_IMPORTED_MODULE_2__getByteLength_js__["a" ])(b)) return false;
|
9755 | if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;
|
9756 | areArrays = true;
|
9757 | }
|
9758 | if (!areArrays) {
|
9759 | if (typeof a != 'object' || typeof b != 'object') return false;
|
9760 |
|
9761 |
|
9762 |
|
9763 | var aCtor = a.constructor, bCtor = b.constructor;
|
9764 | if (aCtor !== bCtor && !(Object(__WEBPACK_IMPORTED_MODULE_4__isFunction_js__["a" ])(aCtor) && aCtor instanceof aCtor &&
|
9765 | Object(__WEBPACK_IMPORTED_MODULE_4__isFunction_js__["a" ])(bCtor) && bCtor instanceof bCtor)
|
9766 | && ('constructor' in a && 'constructor' in b)) {
|
9767 | return false;
|
9768 | }
|
9769 | }
|
9770 |
|
9771 |
|
9772 |
|
9773 |
|
9774 |
|
9775 | aStack = aStack || [];
|
9776 | bStack = bStack || [];
|
9777 | var length = aStack.length;
|
9778 | while (length--) {
|
9779 |
|
9780 |
|
9781 | if (aStack[length] === a) return bStack[length] === b;
|
9782 | }
|
9783 |
|
9784 |
|
9785 | aStack.push(a);
|
9786 | bStack.push(b);
|
9787 |
|
9788 |
|
9789 | if (areArrays) {
|
9790 |
|
9791 | length = a.length;
|
9792 | if (length !== b.length) return false;
|
9793 |
|
9794 | while (length--) {
|
9795 | if (!eq(a[length], b[length], aStack, bStack)) return false;
|
9796 | }
|
9797 | } else {
|
9798 |
|
9799 | var _keys = Object(__WEBPACK_IMPORTED_MODULE_7__keys_js__["a" ])(a), key;
|
9800 | length = _keys.length;
|
9801 |
|
9802 | if (Object(__WEBPACK_IMPORTED_MODULE_7__keys_js__["a" ])(b).length !== length) return false;
|
9803 | while (length--) {
|
9804 |
|
9805 | key = _keys[length];
|
9806 | if (!(Object(__WEBPACK_IMPORTED_MODULE_8__has_js__["a" ])(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
|
9807 | }
|
9808 | }
|
9809 |
|
9810 | aStack.pop();
|
9811 | bStack.pop();
|
9812 | return true;
|
9813 | }
|
9814 |
|
9815 |
|
9816 | function isEqual(a, b) {
|
9817 | return eq(a, b);
|
9818 | }
|
9819 |
|
9820 |
|
9821 | }),
|
9822 |
|
9823 | (function(module, __webpack_exports__, __webpack_require__) {
|
9824 |
|
9825 | "use strict";
|
9826 | __webpack_exports__["a"] = toBufferView;
|
9827 | var __WEBPACK_IMPORTED_MODULE_0__getByteLength_js__ = __webpack_require__(130);
|
9828 |
|
9829 |
|
9830 |
|
9831 |
|
9832 | function toBufferView(bufferSource) {
|
9833 | return new Uint8Array(
|
9834 | bufferSource.buffer || bufferSource,
|
9835 | bufferSource.byteOffset || 0,
|
9836 | Object(__WEBPACK_IMPORTED_MODULE_0__getByteLength_js__["a" ])(bufferSource)
|
9837 | );
|
9838 | }
|
9839 |
|
9840 |
|
9841 | }),
|
9842 |
|
9843 | (function(module, __webpack_exports__, __webpack_require__) {
|
9844 |
|
9845 | "use strict";
|
9846 | var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(17);
|
9847 | var __WEBPACK_IMPORTED_MODULE_1__stringTagBug_js__ = __webpack_require__(79);
|
9848 | var __WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__ = __webpack_require__(131);
|
9849 |
|
9850 |
|
9851 |
|
9852 |
|
9853 | __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_1__stringTagBug_js__["b" ] ? Object(__WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__["a" ])(__WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__["b" ]) : Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" ])('Map'));
|
9854 |
|
9855 |
|
9856 | }),
|
9857 |
|
9858 | (function(module, __webpack_exports__, __webpack_require__) {
|
9859 |
|
9860 | "use strict";
|
9861 | var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(17);
|
9862 | var __WEBPACK_IMPORTED_MODULE_1__stringTagBug_js__ = __webpack_require__(79);
|
9863 | var __WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__ = __webpack_require__(131);
|
9864 |
|
9865 |
|
9866 |
|
9867 |
|
9868 | __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_1__stringTagBug_js__["b" ] ? Object(__WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__["a" ])(__WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__["d" ]) : Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" ])('WeakMap'));
|
9869 |
|
9870 |
|
9871 | }),
|
9872 |
|
9873 | (function(module, __webpack_exports__, __webpack_require__) {
|
9874 |
|
9875 | "use strict";
|
9876 | var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(17);
|
9877 | var __WEBPACK_IMPORTED_MODULE_1__stringTagBug_js__ = __webpack_require__(79);
|
9878 | var __WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__ = __webpack_require__(131);
|
9879 |
|
9880 |
|
9881 |
|
9882 |
|
9883 | __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_1__stringTagBug_js__["b" ] ? Object(__WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__["a" ])(__WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__["c" ]) : Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" ])('Set'));
|
9884 |
|
9885 |
|
9886 | }),
|
9887 |
|
9888 | (function(module, __webpack_exports__, __webpack_require__) {
|
9889 |
|
9890 | "use strict";
|
9891 | var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(17);
|
9892 |
|
9893 |
|
9894 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" ])('WeakSet'));
|
9895 |
|
9896 |
|
9897 | }),
|
9898 |
|
9899 | (function(module, __webpack_exports__, __webpack_require__) {
|
9900 |
|
9901 | "use strict";
|
9902 | __webpack_exports__["a"] = pairs;
|
9903 | var __WEBPACK_IMPORTED_MODULE_0__keys_js__ = __webpack_require__(15);
|
9904 |
|
9905 |
|
9906 |
|
9907 |
|
9908 | function pairs(obj) {
|
9909 | var _keys = Object(__WEBPACK_IMPORTED_MODULE_0__keys_js__["a" ])(obj);
|
9910 | var length = _keys.length;
|
9911 | var pairs = Array(length);
|
9912 | for (var i = 0; i < length; i++) {
|
9913 | pairs[i] = [_keys[i], obj[_keys[i]]];
|
9914 | }
|
9915 | return pairs;
|
9916 | }
|
9917 |
|
9918 |
|
9919 | }),
|
9920 |
|
9921 | (function(module, __webpack_exports__, __webpack_require__) {
|
9922 |
|
9923 | "use strict";
|
9924 | __webpack_exports__["a"] = create;
|
9925 | var __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__ = __webpack_require__(186);
|
9926 | var __WEBPACK_IMPORTED_MODULE_1__extendOwn_js__ = __webpack_require__(133);
|
9927 |
|
9928 |
|
9929 |
|
9930 |
|
9931 |
|
9932 |
|
9933 | function create(prototype, props) {
|
9934 | var result = Object(__WEBPACK_IMPORTED_MODULE_0__baseCreate_js__["a" ])(prototype);
|
9935 | if (props) Object(__WEBPACK_IMPORTED_MODULE_1__extendOwn_js__["a" ])(result, props);
|
9936 | return result;
|
9937 | }
|
9938 |
|
9939 |
|
9940 | }),
|
9941 |
|
9942 | (function(module, __webpack_exports__, __webpack_require__) {
|
9943 |
|
9944 | "use strict";
|
9945 | __webpack_exports__["a"] = tap;
|
9946 |
|
9947 |
|
9948 |
|
9949 | function tap(obj, interceptor) {
|
9950 | interceptor(obj);
|
9951 | return obj;
|
9952 | }
|
9953 |
|
9954 |
|
9955 | }),
|
9956 |
|
9957 | (function(module, __webpack_exports__, __webpack_require__) {
|
9958 |
|
9959 | "use strict";
|
9960 | __webpack_exports__["a"] = has;
|
9961 | var __WEBPACK_IMPORTED_MODULE_0__has_js__ = __webpack_require__(40);
|
9962 | var __WEBPACK_IMPORTED_MODULE_1__toPath_js__ = __webpack_require__(81);
|
9963 |
|
9964 |
|
9965 |
|
9966 |
|
9967 |
|
9968 |
|
9969 | function has(obj, path) {
|
9970 | path = Object(__WEBPACK_IMPORTED_MODULE_1__toPath_js__["a" ])(path);
|
9971 | var length = path.length;
|
9972 | for (var i = 0; i < length; i++) {
|
9973 | var key = path[i];
|
9974 | if (!Object(__WEBPACK_IMPORTED_MODULE_0__has_js__["a" ])(obj, key)) return false;
|
9975 | obj = obj[key];
|
9976 | }
|
9977 | return !!length;
|
9978 | }
|
9979 |
|
9980 |
|
9981 | }),
|
9982 |
|
9983 | (function(module, __webpack_exports__, __webpack_require__) {
|
9984 |
|
9985 | "use strict";
|
9986 | __webpack_exports__["a"] = mapObject;
|
9987 | var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(20);
|
9988 | var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(15);
|
9989 |
|
9990 |
|
9991 |
|
9992 |
|
9993 |
|
9994 | function mapObject(obj, iteratee, context) {
|
9995 | iteratee = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" ])(iteratee, context);
|
9996 | var _keys = Object(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" ])(obj),
|
9997 | length = _keys.length,
|
9998 | results = {};
|
9999 | for (var index = 0; index < length; index++) {
|
10000 | var currentKey = _keys[index];
|
10001 | results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
|
10002 | }
|
10003 | return results;
|
10004 | }
|
10005 |
|
10006 |
|
10007 | }),
|
10008 |
|
10009 | (function(module, __webpack_exports__, __webpack_require__) {
|
10010 |
|
10011 | "use strict";
|
10012 | __webpack_exports__["a"] = propertyOf;
|
10013 | var __WEBPACK_IMPORTED_MODULE_0__noop_js__ = __webpack_require__(192);
|
10014 | var __WEBPACK_IMPORTED_MODULE_1__get_js__ = __webpack_require__(188);
|
10015 |
|
10016 |
|
10017 |
|
10018 |
|
10019 | function propertyOf(obj) {
|
10020 | if (obj == null) return __WEBPACK_IMPORTED_MODULE_0__noop_js__["a" ];
|
10021 | return function(path) {
|
10022 | return Object(__WEBPACK_IMPORTED_MODULE_1__get_js__["a" ])(obj, path);
|
10023 | };
|
10024 | }
|
10025 |
|
10026 |
|
10027 | }),
|
10028 |
|
10029 | (function(module, __webpack_exports__, __webpack_require__) {
|
10030 |
|
10031 | "use strict";
|
10032 | __webpack_exports__["a"] = times;
|
10033 | var __WEBPACK_IMPORTED_MODULE_0__optimizeCb_js__ = __webpack_require__(82);
|
10034 |
|
10035 |
|
10036 |
|
10037 | function times(n, iteratee, context) {
|
10038 | var accum = Array(Math.max(0, n));
|
10039 | iteratee = Object(__WEBPACK_IMPORTED_MODULE_0__optimizeCb_js__["a" ])(iteratee, context, 1);
|
10040 | for (var i = 0; i < n; i++) accum[i] = iteratee(i);
|
10041 | return accum;
|
10042 | }
|
10043 |
|
10044 |
|
10045 | }),
|
10046 |
|
10047 | (function(module, __webpack_exports__, __webpack_require__) {
|
10048 |
|
10049 | "use strict";
|
10050 | var __WEBPACK_IMPORTED_MODULE_0__createEscaper_js__ = __webpack_require__(194);
|
10051 | var __WEBPACK_IMPORTED_MODULE_1__escapeMap_js__ = __webpack_require__(195);
|
10052 |
|
10053 |
|
10054 |
|
10055 |
|
10056 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createEscaper_js__["a" ])(__WEBPACK_IMPORTED_MODULE_1__escapeMap_js__["a" ]));
|
10057 |
|
10058 |
|
10059 | }),
|
10060 |
|
10061 | (function(module, __webpack_exports__, __webpack_require__) {
|
10062 |
|
10063 | "use strict";
|
10064 | var __WEBPACK_IMPORTED_MODULE_0__createEscaper_js__ = __webpack_require__(194);
|
10065 | var __WEBPACK_IMPORTED_MODULE_1__unescapeMap_js__ = __webpack_require__(315);
|
10066 |
|
10067 |
|
10068 |
|
10069 |
|
10070 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createEscaper_js__["a" ])(__WEBPACK_IMPORTED_MODULE_1__unescapeMap_js__["a" ]));
|
10071 |
|
10072 |
|
10073 | }),
|
10074 |
|
10075 | (function(module, __webpack_exports__, __webpack_require__) {
|
10076 |
|
10077 | "use strict";
|
10078 | var __WEBPACK_IMPORTED_MODULE_0__invert_js__ = __webpack_require__(182);
|
10079 | var __WEBPACK_IMPORTED_MODULE_1__escapeMap_js__ = __webpack_require__(195);
|
10080 |
|
10081 |
|
10082 |
|
10083 |
|
10084 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__invert_js__["a" ])(__WEBPACK_IMPORTED_MODULE_1__escapeMap_js__["a" ]));
|
10085 |
|
10086 |
|
10087 | }),
|
10088 |
|
10089 | (function(module, __webpack_exports__, __webpack_require__) {
|
10090 |
|
10091 | "use strict";
|
10092 | __webpack_exports__["a"] = template;
|
10093 | var __WEBPACK_IMPORTED_MODULE_0__defaults_js__ = __webpack_require__(185);
|
10094 | var __WEBPACK_IMPORTED_MODULE_1__underscore_js__ = __webpack_require__(24);
|
10095 | var __WEBPACK_IMPORTED_MODULE_2__templateSettings_js__ = __webpack_require__(196);
|
10096 |
|
10097 |
|
10098 |
|
10099 |
|
10100 |
|
10101 |
|
10102 |
|
10103 | var noMatch = /(.)^/;
|
10104 |
|
10105 |
|
10106 |
|
10107 | var escapes = {
|
10108 | "'": "'",
|
10109 | '\\': '\\',
|
10110 | '\r': 'r',
|
10111 | '\n': 'n',
|
10112 | '\u2028': 'u2028',
|
10113 | '\u2029': 'u2029'
|
10114 | };
|
10115 |
|
10116 | var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
|
10117 |
|
10118 | function escapeChar(match) {
|
10119 | return '\\' + escapes[match];
|
10120 | }
|
10121 |
|
10122 | var bareIdentifier = /^\s*(\w|\$)+\s*$/;
|
10123 |
|
10124 |
|
10125 |
|
10126 |
|
10127 |
|
10128 | function template(text, settings, oldSettings) {
|
10129 | if (!settings && oldSettings) settings = oldSettings;
|
10130 | settings = Object(__WEBPACK_IMPORTED_MODULE_0__defaults_js__["a" ])({}, settings, __WEBPACK_IMPORTED_MODULE_1__underscore_js__["a" ].templateSettings);
|
10131 |
|
10132 |
|
10133 | var matcher = RegExp([
|
10134 | (settings.escape || noMatch).source,
|
10135 | (settings.interpolate || noMatch).source,
|
10136 | (settings.evaluate || noMatch).source
|
10137 | ].join('|') + '|$', 'g');
|
10138 |
|
10139 |
|
10140 | var index = 0;
|
10141 | var source = "__p+='";
|
10142 | text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
|
10143 | source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
|
10144 | index = offset + match.length;
|
10145 |
|
10146 | if (escape) {
|
10147 | source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
|
10148 | } else if (interpolate) {
|
10149 | source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
|
10150 | } else if (evaluate) {
|
10151 | source += "';\n" + evaluate + "\n__p+='";
|
10152 | }
|
10153 |
|
10154 |
|
10155 | return match;
|
10156 | });
|
10157 | source += "';\n";
|
10158 |
|
10159 | var argument = settings.variable;
|
10160 | if (argument) {
|
10161 | if (!bareIdentifier.test(argument)) throw new Error(argument);
|
10162 | } else {
|
10163 |
|
10164 | source = 'with(obj||{}){\n' + source + '}\n';
|
10165 | argument = 'obj';
|
10166 | }
|
10167 |
|
10168 | source = "var __t,__p='',__j=Array.prototype.join," +
|
10169 | "print=function(){__p+=__j.call(arguments,'');};\n" +
|
10170 | source + 'return __p;\n';
|
10171 |
|
10172 | var render;
|
10173 | try {
|
10174 | render = new Function(argument, '_', source);
|
10175 | } catch (e) {
|
10176 | e.source = source;
|
10177 | throw e;
|
10178 | }
|
10179 |
|
10180 | var template = function(data) {
|
10181 | return render.call(this, data, __WEBPACK_IMPORTED_MODULE_1__underscore_js__["a" ]);
|
10182 | };
|
10183 |
|
10184 |
|
10185 | template.source = 'function(' + argument + '){\n' + source + '}';
|
10186 |
|
10187 | return template;
|
10188 | }
|
10189 |
|
10190 |
|
10191 | }),
|
10192 |
|
10193 | (function(module, __webpack_exports__, __webpack_require__) {
|
10194 |
|
10195 | "use strict";
|
10196 | __webpack_exports__["a"] = result;
|
10197 | var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(27);
|
10198 | var __WEBPACK_IMPORTED_MODULE_1__toPath_js__ = __webpack_require__(81);
|
10199 |
|
10200 |
|
10201 |
|
10202 |
|
10203 |
|
10204 |
|
10205 | function result(obj, path, fallback) {
|
10206 | path = Object(__WEBPACK_IMPORTED_MODULE_1__toPath_js__["a" ])(path);
|
10207 | var length = path.length;
|
10208 | if (!length) {
|
10209 | return Object(__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" ])(fallback) ? fallback.call(obj) : fallback;
|
10210 | }
|
10211 | for (var i = 0; i < length; i++) {
|
10212 | var prop = obj == null ? void 0 : obj[path[i]];
|
10213 | if (prop === void 0) {
|
10214 | prop = fallback;
|
10215 | i = length;
|
10216 | }
|
10217 | obj = Object(__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" ])(prop) ? prop.call(obj) : prop;
|
10218 | }
|
10219 | return obj;
|
10220 | }
|
10221 |
|
10222 |
|
10223 | }),
|
10224 |
|
10225 | (function(module, __webpack_exports__, __webpack_require__) {
|
10226 |
|
10227 | "use strict";
|
10228 | __webpack_exports__["a"] = uniqueId;
|
10229 |
|
10230 |
|
10231 | var idCounter = 0;
|
10232 | function uniqueId(prefix) {
|
10233 | var id = ++idCounter + '';
|
10234 | return prefix ? prefix + id : id;
|
10235 | }
|
10236 |
|
10237 |
|
10238 | }),
|
10239 |
|
10240 | (function(module, __webpack_exports__, __webpack_require__) {
|
10241 |
|
10242 | "use strict";
|
10243 | __webpack_exports__["a"] = chain;
|
10244 | var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(24);
|
10245 |
|
10246 |
|
10247 |
|
10248 | function chain(obj) {
|
10249 | var instance = Object(__WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" ])(obj);
|
10250 | instance._chain = true;
|
10251 | return instance;
|
10252 | }
|
10253 |
|
10254 |
|
10255 | }),
|
10256 |
|
10257 | (function(module, __webpack_exports__, __webpack_require__) {
|
10258 |
|
10259 | "use strict";
|
10260 | var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(23);
|
10261 | var __WEBPACK_IMPORTED_MODULE_1__flatten_js__ = __webpack_require__(63);
|
10262 | var __WEBPACK_IMPORTED_MODULE_2__bind_js__ = __webpack_require__(198);
|
10263 |
|
10264 |
|
10265 |
|
10266 |
|
10267 |
|
10268 |
|
10269 |
|
10270 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" ])(function(obj, keys) {
|
10271 | keys = Object(__WEBPACK_IMPORTED_MODULE_1__flatten_js__["a" ])(keys, false, false);
|
10272 | var index = keys.length;
|
10273 | if (index < 1) throw new Error('bindAll must be passed function names');
|
10274 | while (index--) {
|
10275 | var key = keys[index];
|
10276 | obj[key] = Object(__WEBPACK_IMPORTED_MODULE_2__bind_js__["a" ])(obj[key], obj);
|
10277 | }
|
10278 | return obj;
|
10279 | }));
|
10280 |
|
10281 |
|
10282 | }),
|
10283 |
|
10284 | (function(module, __webpack_exports__, __webpack_require__) {
|
10285 |
|
10286 | "use strict";
|
10287 | __webpack_exports__["a"] = memoize;
|
10288 | var __WEBPACK_IMPORTED_MODULE_0__has_js__ = __webpack_require__(40);
|
10289 |
|
10290 |
|
10291 |
|
10292 | function memoize(func, hasher) {
|
10293 | var memoize = function(key) {
|
10294 | var cache = memoize.cache;
|
10295 | var address = '' + (hasher ? hasher.apply(this, arguments) : key);
|
10296 | if (!Object(__WEBPACK_IMPORTED_MODULE_0__has_js__["a" ])(cache, address)) cache[address] = func.apply(this, arguments);
|
10297 | return cache[address];
|
10298 | };
|
10299 | memoize.cache = {};
|
10300 | return memoize;
|
10301 | }
|
10302 |
|
10303 |
|
10304 | }),
|
10305 |
|
10306 | (function(module, __webpack_exports__, __webpack_require__) {
|
10307 |
|
10308 | "use strict";
|
10309 | var __WEBPACK_IMPORTED_MODULE_0__partial_js__ = __webpack_require__(104);
|
10310 | var __WEBPACK_IMPORTED_MODULE_1__delay_js__ = __webpack_require__(199);
|
10311 | var __WEBPACK_IMPORTED_MODULE_2__underscore_js__ = __webpack_require__(24);
|
10312 |
|
10313 |
|
10314 |
|
10315 |
|
10316 |
|
10317 |
|
10318 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__partial_js__["a" ])(__WEBPACK_IMPORTED_MODULE_1__delay_js__["a" ], __WEBPACK_IMPORTED_MODULE_2__underscore_js__["a" ], 1));
|
10319 |
|
10320 |
|
10321 | }),
|
10322 |
|
10323 | (function(module, __webpack_exports__, __webpack_require__) {
|
10324 |
|
10325 | "use strict";
|
10326 | __webpack_exports__["a"] = throttle;
|
10327 | var __WEBPACK_IMPORTED_MODULE_0__now_js__ = __webpack_require__(137);
|
10328 |
|
10329 |
|
10330 |
|
10331 |
|
10332 |
|
10333 |
|
10334 |
|
10335 | function throttle(func, wait, options) {
|
10336 | var timeout, context, args, result;
|
10337 | var previous = 0;
|
10338 | if (!options) options = {};
|
10339 |
|
10340 | var later = function() {
|
10341 | previous = options.leading === false ? 0 : Object(__WEBPACK_IMPORTED_MODULE_0__now_js__["a" ])();
|
10342 | timeout = null;
|
10343 | result = func.apply(context, args);
|
10344 | if (!timeout) context = args = null;
|
10345 | };
|
10346 |
|
10347 | var throttled = function() {
|
10348 | var _now = Object(__WEBPACK_IMPORTED_MODULE_0__now_js__["a" ])();
|
10349 | if (!previous && options.leading === false) previous = _now;
|
10350 | var remaining = wait - (_now - previous);
|
10351 | context = this;
|
10352 | args = arguments;
|
10353 | if (remaining <= 0 || remaining > wait) {
|
10354 | if (timeout) {
|
10355 | clearTimeout(timeout);
|
10356 | timeout = null;
|
10357 | }
|
10358 | previous = _now;
|
10359 | result = func.apply(context, args);
|
10360 | if (!timeout) context = args = null;
|
10361 | } else if (!timeout && options.trailing !== false) {
|
10362 | timeout = setTimeout(later, remaining);
|
10363 | }
|
10364 | return result;
|
10365 | };
|
10366 |
|
10367 | throttled.cancel = function() {
|
10368 | clearTimeout(timeout);
|
10369 | previous = 0;
|
10370 | timeout = context = args = null;
|
10371 | };
|
10372 |
|
10373 | return throttled;
|
10374 | }
|
10375 |
|
10376 |
|
10377 | }),
|
10378 |
|
10379 | (function(module, __webpack_exports__, __webpack_require__) {
|
10380 |
|
10381 | "use strict";
|
10382 | __webpack_exports__["a"] = debounce;
|
10383 | var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(23);
|
10384 | var __WEBPACK_IMPORTED_MODULE_1__now_js__ = __webpack_require__(137);
|
10385 |
|
10386 |
|
10387 |
|
10388 |
|
10389 |
|
10390 |
|
10391 |
|
10392 | function debounce(func, wait, immediate) {
|
10393 | var timeout, previous, args, result, context;
|
10394 |
|
10395 | var later = function() {
|
10396 | var passed = Object(__WEBPACK_IMPORTED_MODULE_1__now_js__["a" ])() - previous;
|
10397 | if (wait > passed) {
|
10398 | timeout = setTimeout(later, wait - passed);
|
10399 | } else {
|
10400 | timeout = null;
|
10401 | if (!immediate) result = func.apply(context, args);
|
10402 |
|
10403 | if (!timeout) args = context = null;
|
10404 | }
|
10405 | };
|
10406 |
|
10407 | var debounced = Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" ])(function(_args) {
|
10408 | context = this;
|
10409 | args = _args;
|
10410 | previous = Object(__WEBPACK_IMPORTED_MODULE_1__now_js__["a" ])();
|
10411 | if (!timeout) {
|
10412 | timeout = setTimeout(later, wait);
|
10413 | if (immediate) result = func.apply(context, args);
|
10414 | }
|
10415 | return result;
|
10416 | });
|
10417 |
|
10418 | debounced.cancel = function() {
|
10419 | clearTimeout(timeout);
|
10420 | timeout = args = context = null;
|
10421 | };
|
10422 |
|
10423 | return debounced;
|
10424 | }
|
10425 |
|
10426 |
|
10427 | }),
|
10428 |
|
10429 | (function(module, __webpack_exports__, __webpack_require__) {
|
10430 |
|
10431 | "use strict";
|
10432 | __webpack_exports__["a"] = wrap;
|
10433 | var __WEBPACK_IMPORTED_MODULE_0__partial_js__ = __webpack_require__(104);
|
10434 |
|
10435 |
|
10436 |
|
10437 |
|
10438 |
|
10439 | function wrap(func, wrapper) {
|
10440 | return Object(__WEBPACK_IMPORTED_MODULE_0__partial_js__["a" ])(wrapper, func);
|
10441 | }
|
10442 |
|
10443 |
|
10444 | }),
|
10445 |
|
10446 | (function(module, __webpack_exports__, __webpack_require__) {
|
10447 |
|
10448 | "use strict";
|
10449 | __webpack_exports__["a"] = compose;
|
10450 |
|
10451 |
|
10452 | function compose() {
|
10453 | var args = arguments;
|
10454 | var start = args.length - 1;
|
10455 | return function() {
|
10456 | var i = start;
|
10457 | var result = args[start].apply(this, arguments);
|
10458 | while (i--) result = args[i].call(this, result);
|
10459 | return result;
|
10460 | };
|
10461 | }
|
10462 |
|
10463 |
|
10464 | }),
|
10465 |
|
10466 | (function(module, __webpack_exports__, __webpack_require__) {
|
10467 |
|
10468 | "use strict";
|
10469 | __webpack_exports__["a"] = after;
|
10470 |
|
10471 | function after(times, func) {
|
10472 | return function() {
|
10473 | if (--times < 1) {
|
10474 | return func.apply(this, arguments);
|
10475 | }
|
10476 | };
|
10477 | }
|
10478 |
|
10479 |
|
10480 | }),
|
10481 |
|
10482 | (function(module, __webpack_exports__, __webpack_require__) {
|
10483 |
|
10484 | "use strict";
|
10485 | var __WEBPACK_IMPORTED_MODULE_0__partial_js__ = __webpack_require__(104);
|
10486 | var __WEBPACK_IMPORTED_MODULE_1__before_js__ = __webpack_require__(200);
|
10487 |
|
10488 |
|
10489 |
|
10490 |
|
10491 |
|
10492 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__partial_js__["a" ])(__WEBPACK_IMPORTED_MODULE_1__before_js__["a" ], 2));
|
10493 |
|
10494 |
|
10495 | }),
|
10496 |
|
10497 | (function(module, __webpack_exports__, __webpack_require__) {
|
10498 |
|
10499 | "use strict";
|
10500 | var __WEBPACK_IMPORTED_MODULE_0__findLastIndex_js__ = __webpack_require__(203);
|
10501 | var __WEBPACK_IMPORTED_MODULE_1__createIndexFinder_js__ = __webpack_require__(206);
|
10502 |
|
10503 |
|
10504 |
|
10505 |
|
10506 |
|
10507 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__createIndexFinder_js__["a" ])(-1, __WEBPACK_IMPORTED_MODULE_0__findLastIndex_js__["a" ]));
|
10508 |
|
10509 |
|
10510 | }),
|
10511 |
|
10512 | (function(module, __webpack_exports__, __webpack_require__) {
|
10513 |
|
10514 | "use strict";
|
10515 | __webpack_exports__["a"] = findWhere;
|
10516 | var __WEBPACK_IMPORTED_MODULE_0__find_js__ = __webpack_require__(207);
|
10517 | var __WEBPACK_IMPORTED_MODULE_1__matcher_js__ = __webpack_require__(103);
|
10518 |
|
10519 |
|
10520 |
|
10521 |
|
10522 |
|
10523 | function findWhere(obj, attrs) {
|
10524 | return Object(__WEBPACK_IMPORTED_MODULE_0__find_js__["a" ])(obj, Object(__WEBPACK_IMPORTED_MODULE_1__matcher_js__["a" ])(attrs));
|
10525 | }
|
10526 |
|
10527 |
|
10528 | }),
|
10529 |
|
10530 | (function(module, __webpack_exports__, __webpack_require__) {
|
10531 |
|
10532 | "use strict";
|
10533 | var __WEBPACK_IMPORTED_MODULE_0__createReduce_js__ = __webpack_require__(208);
|
10534 |
|
10535 |
|
10536 |
|
10537 |
|
10538 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createReduce_js__["a" ])(1));
|
10539 |
|
10540 |
|
10541 | }),
|
10542 |
|
10543 | (function(module, __webpack_exports__, __webpack_require__) {
|
10544 |
|
10545 | "use strict";
|
10546 | var __WEBPACK_IMPORTED_MODULE_0__createReduce_js__ = __webpack_require__(208);
|
10547 |
|
10548 |
|
10549 |
|
10550 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createReduce_js__["a" ])(-1));
|
10551 |
|
10552 |
|
10553 | }),
|
10554 |
|
10555 | (function(module, __webpack_exports__, __webpack_require__) {
|
10556 |
|
10557 | "use strict";
|
10558 | __webpack_exports__["a"] = reject;
|
10559 | var __WEBPACK_IMPORTED_MODULE_0__filter_js__ = __webpack_require__(83);
|
10560 | var __WEBPACK_IMPORTED_MODULE_1__negate_js__ = __webpack_require__(138);
|
10561 | var __WEBPACK_IMPORTED_MODULE_2__cb_js__ = __webpack_require__(20);
|
10562 |
|
10563 |
|
10564 |
|
10565 |
|
10566 |
|
10567 | function reject(obj, predicate, context) {
|
10568 | return Object(__WEBPACK_IMPORTED_MODULE_0__filter_js__["a" ])(obj, Object(__WEBPACK_IMPORTED_MODULE_1__negate_js__["a" ])(Object(__WEBPACK_IMPORTED_MODULE_2__cb_js__["a" ])(predicate)), context);
|
10569 | }
|
10570 |
|
10571 |
|
10572 | }),
|
10573 |
|
10574 | (function(module, __webpack_exports__, __webpack_require__) {
|
10575 |
|
10576 | "use strict";
|
10577 | __webpack_exports__["a"] = every;
|
10578 | var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(20);
|
10579 | var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(25);
|
10580 | var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(15);
|
10581 |
|
10582 |
|
10583 |
|
10584 |
|
10585 |
|
10586 | function every(obj, predicate, context) {
|
10587 | predicate = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" ])(predicate, context);
|
10588 | var _keys = !Object(__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" ])(obj) && Object(__WEBPACK_IMPORTED_MODULE_2__keys_js__["a" ])(obj),
|
10589 | length = (_keys || obj).length;
|
10590 | for (var index = 0; index < length; index++) {
|
10591 | var currentKey = _keys ? _keys[index] : index;
|
10592 | if (!predicate(obj[currentKey], currentKey, obj)) return false;
|
10593 | }
|
10594 | return true;
|
10595 | }
|
10596 |
|
10597 |
|
10598 | }),
|
10599 |
|
10600 | (function(module, __webpack_exports__, __webpack_require__) {
|
10601 |
|
10602 | "use strict";
|
10603 | __webpack_exports__["a"] = some;
|
10604 | var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(20);
|
10605 | var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(25);
|
10606 | var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(15);
|
10607 |
|
10608 |
|
10609 |
|
10610 |
|
10611 |
|
10612 | function some(obj, predicate, context) {
|
10613 | predicate = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" ])(predicate, context);
|
10614 | var _keys = !Object(__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" ])(obj) && Object(__WEBPACK_IMPORTED_MODULE_2__keys_js__["a" ])(obj),
|
10615 | length = (_keys || obj).length;
|
10616 | for (var index = 0; index < length; index++) {
|
10617 | var currentKey = _keys ? _keys[index] : index;
|
10618 | if (predicate(obj[currentKey], currentKey, obj)) return true;
|
10619 | }
|
10620 | return false;
|
10621 | }
|
10622 |
|
10623 |
|
10624 | }),
|
10625 |
|
10626 | (function(module, __webpack_exports__, __webpack_require__) {
|
10627 |
|
10628 | "use strict";
|
10629 | var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(23);
|
10630 | var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(27);
|
10631 | var __WEBPACK_IMPORTED_MODULE_2__map_js__ = __webpack_require__(64);
|
10632 | var __WEBPACK_IMPORTED_MODULE_3__deepGet_js__ = __webpack_require__(134);
|
10633 | var __WEBPACK_IMPORTED_MODULE_4__toPath_js__ = __webpack_require__(81);
|
10634 |
|
10635 |
|
10636 |
|
10637 |
|
10638 |
|
10639 |
|
10640 |
|
10641 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" ])(function(obj, path, args) {
|
10642 | var contextPath, func;
|
10643 | if (Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" ])(path)) {
|
10644 | func = path;
|
10645 | } else {
|
10646 | path = Object(__WEBPACK_IMPORTED_MODULE_4__toPath_js__["a" ])(path);
|
10647 | contextPath = path.slice(0, -1);
|
10648 | path = path[path.length - 1];
|
10649 | }
|
10650 | return Object(__WEBPACK_IMPORTED_MODULE_2__map_js__["a" ])(obj, function(context) {
|
10651 | var method = func;
|
10652 | if (!method) {
|
10653 | if (contextPath && contextPath.length) {
|
10654 | context = Object(__WEBPACK_IMPORTED_MODULE_3__deepGet_js__["a" ])(context, contextPath);
|
10655 | }
|
10656 | if (context == null) return void 0;
|
10657 | method = context[path];
|
10658 | }
|
10659 | return method == null ? method : method.apply(context, args);
|
10660 | });
|
10661 | }));
|
10662 |
|
10663 |
|
10664 | }),
|
10665 |
|
10666 | (function(module, __webpack_exports__, __webpack_require__) {
|
10667 |
|
10668 | "use strict";
|
10669 | __webpack_exports__["a"] = where;
|
10670 | var __WEBPACK_IMPORTED_MODULE_0__filter_js__ = __webpack_require__(83);
|
10671 | var __WEBPACK_IMPORTED_MODULE_1__matcher_js__ = __webpack_require__(103);
|
10672 |
|
10673 |
|
10674 |
|
10675 |
|
10676 |
|
10677 | function where(obj, attrs) {
|
10678 | return Object(__WEBPACK_IMPORTED_MODULE_0__filter_js__["a" ])(obj, Object(__WEBPACK_IMPORTED_MODULE_1__matcher_js__["a" ])(attrs));
|
10679 | }
|
10680 |
|
10681 |
|
10682 | }),
|
10683 |
|
10684 | (function(module, __webpack_exports__, __webpack_require__) {
|
10685 |
|
10686 | "use strict";
|
10687 | __webpack_exports__["a"] = min;
|
10688 | var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(25);
|
10689 | var __WEBPACK_IMPORTED_MODULE_1__values_js__ = __webpack_require__(62);
|
10690 | var __WEBPACK_IMPORTED_MODULE_2__cb_js__ = __webpack_require__(20);
|
10691 | var __WEBPACK_IMPORTED_MODULE_3__each_js__ = __webpack_require__(54);
|
10692 |
|
10693 |
|
10694 |
|
10695 |
|
10696 |
|
10697 |
|
10698 | function min(obj, iteratee, context) {
|
10699 | var result = Infinity, lastComputed = Infinity,
|
10700 | value, computed;
|
10701 | if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
|
10702 | obj = Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" ])(obj) ? obj : Object(__WEBPACK_IMPORTED_MODULE_1__values_js__["a" ])(obj);
|
10703 | for (var i = 0, length = obj.length; i < length; i++) {
|
10704 | value = obj[i];
|
10705 | if (value != null && value < result) {
|
10706 | result = value;
|
10707 | }
|
10708 | }
|
10709 | } else {
|
10710 | iteratee = Object(__WEBPACK_IMPORTED_MODULE_2__cb_js__["a" ])(iteratee, context);
|
10711 | Object(__WEBPACK_IMPORTED_MODULE_3__each_js__["a" ])(obj, function(v, index, list) {
|
10712 | computed = iteratee(v, index, list);
|
10713 | if (computed < lastComputed || computed === Infinity && result === Infinity) {
|
10714 | result = v;
|
10715 | lastComputed = computed;
|
10716 | }
|
10717 | });
|
10718 | }
|
10719 | return result;
|
10720 | }
|
10721 |
|
10722 |
|
10723 | }),
|
10724 |
|
10725 | (function(module, __webpack_exports__, __webpack_require__) {
|
10726 |
|
10727 | "use strict";
|
10728 | __webpack_exports__["a"] = shuffle;
|
10729 | var __WEBPACK_IMPORTED_MODULE_0__sample_js__ = __webpack_require__(210);
|
10730 |
|
10731 |
|
10732 |
|
10733 | function shuffle(obj) {
|
10734 | return Object(__WEBPACK_IMPORTED_MODULE_0__sample_js__["a" ])(obj, Infinity);
|
10735 | }
|
10736 |
|
10737 |
|
10738 | }),
|
10739 |
|
10740 | (function(module, __webpack_exports__, __webpack_require__) {
|
10741 |
|
10742 | "use strict";
|
10743 | __webpack_exports__["a"] = sortBy;
|
10744 | var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(20);
|
10745 | var __WEBPACK_IMPORTED_MODULE_1__pluck_js__ = __webpack_require__(140);
|
10746 | var __WEBPACK_IMPORTED_MODULE_2__map_js__ = __webpack_require__(64);
|
10747 |
|
10748 |
|
10749 |
|
10750 |
|
10751 |
|
10752 | function sortBy(obj, iteratee, context) {
|
10753 | var index = 0;
|
10754 | iteratee = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" ])(iteratee, context);
|
10755 | return Object(__WEBPACK_IMPORTED_MODULE_1__pluck_js__["a" ])(Object(__WEBPACK_IMPORTED_MODULE_2__map_js__["a" ])(obj, function(value, key, list) {
|
10756 | return {
|
10757 | value: value,
|
10758 | index: index++,
|
10759 | criteria: iteratee(value, key, list)
|
10760 | };
|
10761 | }).sort(function(left, right) {
|
10762 | var a = left.criteria;
|
10763 | var b = right.criteria;
|
10764 | if (a !== b) {
|
10765 | if (a > b || a === void 0) return 1;
|
10766 | if (a < b || b === void 0) return -1;
|
10767 | }
|
10768 | return left.index - right.index;
|
10769 | }), 'value');
|
10770 | }
|
10771 |
|
10772 |
|
10773 | }),
|
10774 |
|
10775 | (function(module, __webpack_exports__, __webpack_require__) {
|
10776 |
|
10777 | "use strict";
|
10778 | var __WEBPACK_IMPORTED_MODULE_0__group_js__ = __webpack_require__(105);
|
10779 | var __WEBPACK_IMPORTED_MODULE_1__has_js__ = __webpack_require__(40);
|
10780 |
|
10781 |
|
10782 |
|
10783 |
|
10784 |
|
10785 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__group_js__["a" ])(function(result, value, key) {
|
10786 | if (Object(__WEBPACK_IMPORTED_MODULE_1__has_js__["a" ])(result, key)) result[key].push(value); else result[key] = [value];
|
10787 | }));
|
10788 |
|
10789 |
|
10790 | }),
|
10791 |
|
10792 | (function(module, __webpack_exports__, __webpack_require__) {
|
10793 |
|
10794 | "use strict";
|
10795 | var __WEBPACK_IMPORTED_MODULE_0__group_js__ = __webpack_require__(105);
|
10796 |
|
10797 |
|
10798 |
|
10799 |
|
10800 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__group_js__["a" ])(function(result, value, key) {
|
10801 | result[key] = value;
|
10802 | }));
|
10803 |
|
10804 |
|
10805 | }),
|
10806 |
|
10807 | (function(module, __webpack_exports__, __webpack_require__) {
|
10808 |
|
10809 | "use strict";
|
10810 | var __WEBPACK_IMPORTED_MODULE_0__group_js__ = __webpack_require__(105);
|
10811 | var __WEBPACK_IMPORTED_MODULE_1__has_js__ = __webpack_require__(40);
|
10812 |
|
10813 |
|
10814 |
|
10815 |
|
10816 |
|
10817 |
|
10818 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__group_js__["a" ])(function(result, value, key) {
|
10819 | if (Object(__WEBPACK_IMPORTED_MODULE_1__has_js__["a" ])(result, key)) result[key]++; else result[key] = 1;
|
10820 | }));
|
10821 |
|
10822 |
|
10823 | }),
|
10824 |
|
10825 | (function(module, __webpack_exports__, __webpack_require__) {
|
10826 |
|
10827 | "use strict";
|
10828 | var __WEBPACK_IMPORTED_MODULE_0__group_js__ = __webpack_require__(105);
|
10829 |
|
10830 |
|
10831 |
|
10832 |
|
10833 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__group_js__["a" ])(function(result, value, pass) {
|
10834 | result[pass ? 0 : 1].push(value);
|
10835 | }, true));
|
10836 |
|
10837 |
|
10838 | }),
|
10839 |
|
10840 | (function(module, __webpack_exports__, __webpack_require__) {
|
10841 |
|
10842 | "use strict";
|
10843 | __webpack_exports__["a"] = toArray;
|
10844 | var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(53);
|
10845 | var __WEBPACK_IMPORTED_MODULE_1__setup_js__ = __webpack_require__(5);
|
10846 | var __WEBPACK_IMPORTED_MODULE_2__isString_js__ = __webpack_require__(127);
|
10847 | var __WEBPACK_IMPORTED_MODULE_3__isArrayLike_js__ = __webpack_require__(25);
|
10848 | var __WEBPACK_IMPORTED_MODULE_4__map_js__ = __webpack_require__(64);
|
10849 | var __WEBPACK_IMPORTED_MODULE_5__identity_js__ = __webpack_require__(135);
|
10850 | var __WEBPACK_IMPORTED_MODULE_6__values_js__ = __webpack_require__(62);
|
10851 |
|
10852 |
|
10853 |
|
10854 |
|
10855 |
|
10856 |
|
10857 |
|
10858 |
|
10859 |
|
10860 | var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
|
10861 | function toArray(obj) {
|
10862 | if (!obj) return [];
|
10863 | if (Object(__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" ])(obj)) return __WEBPACK_IMPORTED_MODULE_1__setup_js__["q" ].call(obj);
|
10864 | if (Object(__WEBPACK_IMPORTED_MODULE_2__isString_js__["a" ])(obj)) {
|
10865 |
|
10866 | return obj.match(reStrSymbol);
|
10867 | }
|
10868 | if (Object(__WEBPACK_IMPORTED_MODULE_3__isArrayLike_js__["a" ])(obj)) return Object(__WEBPACK_IMPORTED_MODULE_4__map_js__["a" ])(obj, __WEBPACK_IMPORTED_MODULE_5__identity_js__["a" ]);
|
10869 | return Object(__WEBPACK_IMPORTED_MODULE_6__values_js__["a" ])(obj);
|
10870 | }
|
10871 |
|
10872 |
|
10873 | }),
|
10874 |
|
10875 | (function(module, __webpack_exports__, __webpack_require__) {
|
10876 |
|
10877 | "use strict";
|
10878 | __webpack_exports__["a"] = size;
|
10879 | var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(25);
|
10880 | var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(15);
|
10881 |
|
10882 |
|
10883 |
|
10884 |
|
10885 | function size(obj) {
|
10886 | if (obj == null) return 0;
|
10887 | return Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" ])(obj) ? obj.length : Object(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" ])(obj).length;
|
10888 | }
|
10889 |
|
10890 |
|
10891 | }),
|
10892 |
|
10893 | (function(module, __webpack_exports__, __webpack_require__) {
|
10894 |
|
10895 | "use strict";
|
10896 | __webpack_exports__["a"] = keyInObj;
|
10897 |
|
10898 |
|
10899 | function keyInObj(value, key, obj) {
|
10900 | return key in obj;
|
10901 | }
|
10902 |
|
10903 |
|
10904 | }),
|
10905 |
|
10906 | (function(module, __webpack_exports__, __webpack_require__) {
|
10907 |
|
10908 | "use strict";
|
10909 | var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(23);
|
10910 | var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(27);
|
10911 | var __WEBPACK_IMPORTED_MODULE_2__negate_js__ = __webpack_require__(138);
|
10912 | var __WEBPACK_IMPORTED_MODULE_3__map_js__ = __webpack_require__(64);
|
10913 | var __WEBPACK_IMPORTED_MODULE_4__flatten_js__ = __webpack_require__(63);
|
10914 | var __WEBPACK_IMPORTED_MODULE_5__contains_js__ = __webpack_require__(84);
|
10915 | var __WEBPACK_IMPORTED_MODULE_6__pick_js__ = __webpack_require__(211);
|
10916 |
|
10917 |
|
10918 |
|
10919 |
|
10920 |
|
10921 |
|
10922 |
|
10923 |
|
10924 |
|
10925 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" ])(function(obj, keys) {
|
10926 | var iteratee = keys[0], context;
|
10927 | if (Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" ])(iteratee)) {
|
10928 | iteratee = Object(__WEBPACK_IMPORTED_MODULE_2__negate_js__["a" ])(iteratee);
|
10929 | if (keys.length > 1) context = keys[1];
|
10930 | } else {
|
10931 | keys = Object(__WEBPACK_IMPORTED_MODULE_3__map_js__["a" ])(Object(__WEBPACK_IMPORTED_MODULE_4__flatten_js__["a" ])(keys, false, false), String);
|
10932 | iteratee = function(value, key) {
|
10933 | return !Object(__WEBPACK_IMPORTED_MODULE_5__contains_js__["a" ])(keys, key);
|
10934 | };
|
10935 | }
|
10936 | return Object(__WEBPACK_IMPORTED_MODULE_6__pick_js__["a" ])(obj, iteratee, context);
|
10937 | }));
|
10938 |
|
10939 |
|
10940 | }),
|
10941 |
|
10942 | (function(module, __webpack_exports__, __webpack_require__) {
|
10943 |
|
10944 | "use strict";
|
10945 | __webpack_exports__["a"] = first;
|
10946 | var __WEBPACK_IMPORTED_MODULE_0__initial_js__ = __webpack_require__(212);
|
10947 |
|
10948 |
|
10949 |
|
10950 |
|
10951 | function first(array, n, guard) {
|
10952 | if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
|
10953 | if (n == null || guard) return array[0];
|
10954 | return Object(__WEBPACK_IMPORTED_MODULE_0__initial_js__["a" ])(array, array.length - n);
|
10955 | }
|
10956 |
|
10957 |
|
10958 | }),
|
10959 |
|
10960 | (function(module, __webpack_exports__, __webpack_require__) {
|
10961 |
|
10962 | "use strict";
|
10963 | __webpack_exports__["a"] = last;
|
10964 | var __WEBPACK_IMPORTED_MODULE_0__rest_js__ = __webpack_require__(213);
|
10965 |
|
10966 |
|
10967 |
|
10968 |
|
10969 | function last(array, n, guard) {
|
10970 | if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
|
10971 | if (n == null || guard) return array[array.length - 1];
|
10972 | return Object(__WEBPACK_IMPORTED_MODULE_0__rest_js__["a" ])(array, Math.max(0, array.length - n));
|
10973 | }
|
10974 |
|
10975 |
|
10976 | }),
|
10977 |
|
10978 | (function(module, __webpack_exports__, __webpack_require__) {
|
10979 |
|
10980 | "use strict";
|
10981 | __webpack_exports__["a"] = compact;
|
10982 | var __WEBPACK_IMPORTED_MODULE_0__filter_js__ = __webpack_require__(83);
|
10983 |
|
10984 |
|
10985 |
|
10986 | function compact(array) {
|
10987 | return Object(__WEBPACK_IMPORTED_MODULE_0__filter_js__["a" ])(array, Boolean);
|
10988 | }
|
10989 |
|
10990 |
|
10991 | }),
|
10992 |
|
10993 | (function(module, __webpack_exports__, __webpack_require__) {
|
10994 |
|
10995 | "use strict";
|
10996 | __webpack_exports__["a"] = flatten;
|
10997 | var __WEBPACK_IMPORTED_MODULE_0__flatten_js__ = __webpack_require__(63);
|
10998 |
|
10999 |
|
11000 |
|
11001 |
|
11002 | function flatten(array, depth) {
|
11003 | return Object(__WEBPACK_IMPORTED_MODULE_0__flatten_js__["a" ])(array, depth, false);
|
11004 | }
|
11005 |
|
11006 |
|
11007 | }),
|
11008 |
|
11009 | (function(module, __webpack_exports__, __webpack_require__) {
|
11010 |
|
11011 | "use strict";
|
11012 | var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(23);
|
11013 | var __WEBPACK_IMPORTED_MODULE_1__difference_js__ = __webpack_require__(214);
|
11014 |
|
11015 |
|
11016 |
|
11017 |
|
11018 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" ])(function(array, otherArrays) {
|
11019 | return Object(__WEBPACK_IMPORTED_MODULE_1__difference_js__["a" ])(array, otherArrays);
|
11020 | }));
|
11021 |
|
11022 |
|
11023 | }),
|
11024 |
|
11025 | (function(module, __webpack_exports__, __webpack_require__) {
|
11026 |
|
11027 | "use strict";
|
11028 | var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(23);
|
11029 | var __WEBPACK_IMPORTED_MODULE_1__uniq_js__ = __webpack_require__(215);
|
11030 | var __WEBPACK_IMPORTED_MODULE_2__flatten_js__ = __webpack_require__(63);
|
11031 |
|
11032 |
|
11033 |
|
11034 |
|
11035 |
|
11036 |
|
11037 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" ])(function(arrays) {
|
11038 | return Object(__WEBPACK_IMPORTED_MODULE_1__uniq_js__["a" ])(Object(__WEBPACK_IMPORTED_MODULE_2__flatten_js__["a" ])(arrays, true, true));
|
11039 | }));
|
11040 |
|
11041 |
|
11042 | }),
|
11043 |
|
11044 | (function(module, __webpack_exports__, __webpack_require__) {
|
11045 |
|
11046 | "use strict";
|
11047 | __webpack_exports__["a"] = intersection;
|
11048 | var __WEBPACK_IMPORTED_MODULE_0__getLength_js__ = __webpack_require__(28);
|
11049 | var __WEBPACK_IMPORTED_MODULE_1__contains_js__ = __webpack_require__(84);
|
11050 |
|
11051 |
|
11052 |
|
11053 |
|
11054 |
|
11055 | function intersection(array) {
|
11056 | var result = [];
|
11057 | var argsLength = arguments.length;
|
11058 | for (var i = 0, length = Object(__WEBPACK_IMPORTED_MODULE_0__getLength_js__["a" ])(array); i < length; i++) {
|
11059 | var item = array[i];
|
11060 | if (Object(__WEBPACK_IMPORTED_MODULE_1__contains_js__["a" ])(result, item)) continue;
|
11061 | var j;
|
11062 | for (j = 1; j < argsLength; j++) {
|
11063 | if (!Object(__WEBPACK_IMPORTED_MODULE_1__contains_js__["a" ])(arguments[j], item)) break;
|
11064 | }
|
11065 | if (j === argsLength) result.push(item);
|
11066 | }
|
11067 | return result;
|
11068 | }
|
11069 |
|
11070 |
|
11071 | }),
|
11072 |
|
11073 | (function(module, __webpack_exports__, __webpack_require__) {
|
11074 |
|
11075 | "use strict";
|
11076 | var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(23);
|
11077 | var __WEBPACK_IMPORTED_MODULE_1__unzip_js__ = __webpack_require__(216);
|
11078 |
|
11079 |
|
11080 |
|
11081 |
|
11082 |
|
11083 | __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" ])(__WEBPACK_IMPORTED_MODULE_1__unzip_js__["a" ]));
|
11084 |
|
11085 |
|
11086 | }),
|
11087 |
|
11088 | (function(module, __webpack_exports__, __webpack_require__) {
|
11089 |
|
11090 | "use strict";
|
11091 | __webpack_exports__["a"] = object;
|
11092 | var __WEBPACK_IMPORTED_MODULE_0__getLength_js__ = __webpack_require__(28);
|
11093 |
|
11094 |
|
11095 |
|
11096 |
|
11097 |
|
11098 | function object(list, values) {
|
11099 | var result = {};
|
11100 | for (var i = 0, length = Object(__WEBPACK_IMPORTED_MODULE_0__getLength_js__["a" ])(list); i < length; i++) {
|
11101 | if (values) {
|
11102 | result[list[i]] = values[i];
|
11103 | } else {
|
11104 | result[list[i][0]] = list[i][1];
|
11105 | }
|
11106 | }
|
11107 | return result;
|
11108 | }
|
11109 |
|
11110 |
|
11111 | }),
|
11112 |
|
11113 | (function(module, __webpack_exports__, __webpack_require__) {
|
11114 |
|
11115 | "use strict";
|
11116 | __webpack_exports__["a"] = range;
|
11117 |
|
11118 |
|
11119 |
|
11120 | function range(start, stop, step) {
|
11121 | if (stop == null) {
|
11122 | stop = start || 0;
|
11123 | start = 0;
|
11124 | }
|
11125 | if (!step) {
|
11126 | step = stop < start ? -1 : 1;
|
11127 | }
|
11128 |
|
11129 | var length = Math.max(Math.ceil((stop - start) / step), 0);
|
11130 | var range = Array(length);
|
11131 |
|
11132 | for (var idx = 0; idx < length; idx++, start += step) {
|
11133 | range[idx] = start;
|
11134 | }
|
11135 |
|
11136 | return range;
|
11137 | }
|
11138 |
|
11139 |
|
11140 | }),
|
11141 |
|
11142 | (function(module, __webpack_exports__, __webpack_require__) {
|
11143 |
|
11144 | "use strict";
|
11145 | __webpack_exports__["a"] = chunk;
|
11146 | var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(5);
|
11147 |
|
11148 |
|
11149 |
|
11150 |
|
11151 | function chunk(array, count) {
|
11152 | if (count == null || count < 1) return [];
|
11153 | var result = [];
|
11154 | var i = 0, length = array.length;
|
11155 | while (i < length) {
|
11156 | result.push(__WEBPACK_IMPORTED_MODULE_0__setup_js__["q" ].call(array, i, i += count));
|
11157 | }
|
11158 | return result;
|
11159 | }
|
11160 |
|
11161 |
|
11162 | }),
|
11163 |
|
11164 | (function(module, __webpack_exports__, __webpack_require__) {
|
11165 |
|
11166 | "use strict";
|
11167 | __webpack_exports__["a"] = mixin;
|
11168 | var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(24);
|
11169 | var __WEBPACK_IMPORTED_MODULE_1__each_js__ = __webpack_require__(54);
|
11170 | var __WEBPACK_IMPORTED_MODULE_2__functions_js__ = __webpack_require__(183);
|
11171 | var __WEBPACK_IMPORTED_MODULE_3__setup_js__ = __webpack_require__(5);
|
11172 | var __WEBPACK_IMPORTED_MODULE_4__chainResult_js__ = __webpack_require__(217);
|
11173 |
|
11174 |
|
11175 |
|
11176 |
|
11177 |
|
11178 |
|
11179 |
|
11180 | function mixin(obj) {
|
11181 | Object(__WEBPACK_IMPORTED_MODULE_1__each_js__["a" ])(Object(__WEBPACK_IMPORTED_MODULE_2__functions_js__["a" ])(obj), function(name) {
|
11182 | var func = __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" ][name] = obj[name];
|
11183 | __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" ].prototype[name] = function() {
|
11184 | var args = [this._wrapped];
|
11185 | __WEBPACK_IMPORTED_MODULE_3__setup_js__["o" ].apply(args, arguments);
|
11186 | return Object(__WEBPACK_IMPORTED_MODULE_4__chainResult_js__["a" ])(this, func.apply(__WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" ], args));
|
11187 | };
|
11188 | });
|
11189 | return __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" ];
|
11190 | }
|
11191 |
|
11192 |
|
11193 | }),
|
11194 |
|
11195 | (function(module, __webpack_exports__, __webpack_require__) {
|
11196 |
|
11197 | "use strict";
|
11198 | var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(24);
|
11199 | var __WEBPACK_IMPORTED_MODULE_1__each_js__ = __webpack_require__(54);
|
11200 | var __WEBPACK_IMPORTED_MODULE_2__setup_js__ = __webpack_require__(5);
|
11201 | var __WEBPACK_IMPORTED_MODULE_3__chainResult_js__ = __webpack_require__(217);
|
11202 |
|
11203 |
|
11204 |
|
11205 |
|
11206 |
|
11207 |
|
11208 | Object(__WEBPACK_IMPORTED_MODULE_1__each_js__["a" ])(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
|
11209 | var method = __WEBPACK_IMPORTED_MODULE_2__setup_js__["a" ][name];
|
11210 | __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" ].prototype[name] = function() {
|
11211 | var obj = this._wrapped;
|
11212 | if (obj != null) {
|
11213 | method.apply(obj, arguments);
|
11214 | if ((name === 'shift' || name === 'splice') && obj.length === 0) {
|
11215 | delete obj[0];
|
11216 | }
|
11217 | }
|
11218 | return Object(__WEBPACK_IMPORTED_MODULE_3__chainResult_js__["a" ])(this, obj);
|
11219 | };
|
11220 | });
|
11221 |
|
11222 |
|
11223 | Object(__WEBPACK_IMPORTED_MODULE_1__each_js__["a" ])(['concat', 'join', 'slice'], function(name) {
|
11224 | var method = __WEBPACK_IMPORTED_MODULE_2__setup_js__["a" ][name];
|
11225 | __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" ].prototype[name] = function() {
|
11226 | var obj = this._wrapped;
|
11227 | if (obj != null) obj = method.apply(obj, arguments);
|
11228 | return Object(__WEBPACK_IMPORTED_MODULE_3__chainResult_js__["a" ])(this, obj);
|
11229 | };
|
11230 | });
|
11231 |
|
11232 | __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" ]);
|
11233 |
|
11234 |
|
11235 | }),
|
11236 |
|
11237 | (function(module, exports, __webpack_require__) {
|
11238 |
|
11239 | var parent = __webpack_require__(363);
|
11240 |
|
11241 | module.exports = parent;
|
11242 |
|
11243 |
|
11244 | }),
|
11245 |
|
11246 | (function(module, exports, __webpack_require__) {
|
11247 |
|
11248 | var isPrototypeOf = __webpack_require__(21);
|
11249 | var method = __webpack_require__(364);
|
11250 |
|
11251 | var ArrayPrototype = Array.prototype;
|
11252 |
|
11253 | module.exports = function (it) {
|
11254 | var own = it.concat;
|
11255 | return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.concat) ? method : own;
|
11256 | };
|
11257 |
|
11258 |
|
11259 | }),
|
11260 |
|
11261 | (function(module, exports, __webpack_require__) {
|
11262 |
|
11263 | __webpack_require__(218);
|
11264 | var entryVirtual = __webpack_require__(41);
|
11265 |
|
11266 | module.exports = entryVirtual('Array').concat;
|
11267 |
|
11268 |
|
11269 | }),
|
11270 |
|
11271 | (function(module, exports) {
|
11272 |
|
11273 | var $TypeError = TypeError;
|
11274 | var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
11275 |
|
11276 | module.exports = function (it) {
|
11277 | if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
|
11278 | return it;
|
11279 | };
|
11280 |
|
11281 |
|
11282 | }),
|
11283 |
|
11284 | (function(module, exports, __webpack_require__) {
|
11285 |
|
11286 | var isArray = __webpack_require__(85);
|
11287 | var isConstructor = __webpack_require__(101);
|
11288 | var isObject = __webpack_require__(11);
|
11289 | var wellKnownSymbol = __webpack_require__(9);
|
11290 |
|
11291 | var SPECIES = wellKnownSymbol('species');
|
11292 | var $Array = Array;
|
11293 |
|
11294 |
|
11295 |
|
11296 | module.exports = function (originalArray) {
|
11297 | var C;
|
11298 | if (isArray(originalArray)) {
|
11299 | C = originalArray.constructor;
|
11300 |
|
11301 | if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
|
11302 | else if (isObject(C)) {
|
11303 | C = C[SPECIES];
|
11304 | if (C === null) C = undefined;
|
11305 | }
|
11306 | } return C === undefined ? $Array : C;
|
11307 | };
|
11308 |
|
11309 |
|
11310 | }),
|
11311 |
|
11312 | (function(module, exports, __webpack_require__) {
|
11313 |
|
11314 | var parent = __webpack_require__(368);
|
11315 |
|
11316 | module.exports = parent;
|
11317 |
|
11318 |
|
11319 | }),
|
11320 |
|
11321 | (function(module, exports, __webpack_require__) {
|
11322 |
|
11323 | var isPrototypeOf = __webpack_require__(21);
|
11324 | var method = __webpack_require__(369);
|
11325 |
|
11326 | var ArrayPrototype = Array.prototype;
|
11327 |
|
11328 | module.exports = function (it) {
|
11329 | var own = it.map;
|
11330 | return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.map) ? method : own;
|
11331 | };
|
11332 |
|
11333 |
|
11334 | }),
|
11335 |
|
11336 | (function(module, exports, __webpack_require__) {
|
11337 |
|
11338 | __webpack_require__(370);
|
11339 | var entryVirtual = __webpack_require__(41);
|
11340 |
|
11341 | module.exports = entryVirtual('Array').map;
|
11342 |
|
11343 |
|
11344 | }),
|
11345 |
|
11346 | (function(module, exports, __webpack_require__) {
|
11347 |
|
11348 | "use strict";
|
11349 |
|
11350 | var $ = __webpack_require__(0);
|
11351 | var $map = __webpack_require__(66).map;
|
11352 | var arrayMethodHasSpeciesSupport = __webpack_require__(107);
|
11353 |
|
11354 | var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
|
11355 |
|
11356 |
|
11357 |
|
11358 |
|
11359 | $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
11360 | map: function map(callbackfn /* , thisArg */) {
|
11361 | return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
11362 | }
|
11363 | });
|
11364 |
|
11365 |
|
11366 | }),
|
11367 |
|
11368 | (function(module, exports, __webpack_require__) {
|
11369 |
|
11370 | var parent = __webpack_require__(372);
|
11371 |
|
11372 | module.exports = parent;
|
11373 |
|
11374 |
|
11375 | }),
|
11376 |
|
11377 | (function(module, exports, __webpack_require__) {
|
11378 |
|
11379 | __webpack_require__(373);
|
11380 | var path = __webpack_require__(10);
|
11381 |
|
11382 | module.exports = path.Object.keys;
|
11383 |
|
11384 |
|
11385 | }),
|
11386 |
|
11387 | (function(module, exports, __webpack_require__) {
|
11388 |
|
11389 | var $ = __webpack_require__(0);
|
11390 | var toObject = __webpack_require__(34);
|
11391 | var nativeKeys = __webpack_require__(98);
|
11392 | var fails = __webpack_require__(3);
|
11393 |
|
11394 | var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
|
11395 |
|
11396 |
|
11397 |
|
11398 | $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
11399 | keys: function keys(it) {
|
11400 | return nativeKeys(toObject(it));
|
11401 | }
|
11402 | });
|
11403 |
|
11404 |
|
11405 | }),
|
11406 |
|
11407 | (function(module, exports, __webpack_require__) {
|
11408 |
|
11409 | var parent = __webpack_require__(375);
|
11410 |
|
11411 | module.exports = parent;
|
11412 |
|
11413 |
|
11414 | }),
|
11415 |
|
11416 | (function(module, exports, __webpack_require__) {
|
11417 |
|
11418 | __webpack_require__(220);
|
11419 | var path = __webpack_require__(10);
|
11420 | var apply = __webpack_require__(69);
|
11421 |
|
11422 |
|
11423 | if (!path.JSON) path.JSON = { stringify: JSON.stringify };
|
11424 |
|
11425 |
|
11426 | module.exports = function stringify(it, replacer, space) {
|
11427 | return apply(path.JSON.stringify, null, arguments);
|
11428 | };
|
11429 |
|
11430 |
|
11431 | }),
|
11432 |
|
11433 | (function(module, exports, __webpack_require__) {
|
11434 |
|
11435 | var parent = __webpack_require__(377);
|
11436 |
|
11437 | module.exports = parent;
|
11438 |
|
11439 |
|
11440 | }),
|
11441 |
|
11442 | (function(module, exports, __webpack_require__) {
|
11443 |
|
11444 | var isPrototypeOf = __webpack_require__(21);
|
11445 | var method = __webpack_require__(378);
|
11446 |
|
11447 | var ArrayPrototype = Array.prototype;
|
11448 |
|
11449 | module.exports = function (it) {
|
11450 | var own = it.indexOf;
|
11451 | return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.indexOf) ? method : own;
|
11452 | };
|
11453 |
|
11454 |
|
11455 | }),
|
11456 |
|
11457 | (function(module, exports, __webpack_require__) {
|
11458 |
|
11459 | __webpack_require__(379);
|
11460 | var entryVirtual = __webpack_require__(41);
|
11461 |
|
11462 | module.exports = entryVirtual('Array').indexOf;
|
11463 |
|
11464 |
|
11465 | }),
|
11466 |
|
11467 | (function(module, exports, __webpack_require__) {
|
11468 |
|
11469 | "use strict";
|
11470 |
|
11471 |
|
11472 | var $ = __webpack_require__(0);
|
11473 | var uncurryThis = __webpack_require__(4);
|
11474 | var $IndexOf = __webpack_require__(153).indexOf;
|
11475 | var arrayMethodIsStrict = __webpack_require__(380);
|
11476 |
|
11477 | var un$IndexOf = uncurryThis([].indexOf);
|
11478 |
|
11479 | var NEGATIVE_ZERO = !!un$IndexOf && 1 / un$IndexOf([1], 1, -0) < 0;
|
11480 | var STRICT_METHOD = arrayMethodIsStrict('indexOf');
|
11481 |
|
11482 |
|
11483 |
|
11484 | $({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
|
11485 | indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
|
11486 | var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
|
11487 | return NEGATIVE_ZERO
|
11488 |
|
11489 | ? un$IndexOf(this, searchElement, fromIndex) || 0
|
11490 | : $IndexOf(this, searchElement, fromIndex);
|
11491 | }
|
11492 | });
|
11493 |
|
11494 |
|
11495 | }),
|
11496 |
|
11497 | (function(module, exports, __webpack_require__) {
|
11498 |
|
11499 | "use strict";
|
11500 |
|
11501 | var fails = __webpack_require__(3);
|
11502 |
|
11503 | module.exports = function (METHOD_NAME, argument) {
|
11504 | var method = [][METHOD_NAME];
|
11505 | return !!method && fails(function () {
|
11506 |
|
11507 | method.call(null, argument || function () { return 1; }, 1);
|
11508 | });
|
11509 | };
|
11510 |
|
11511 |
|
11512 | }),
|
11513 |
|
11514 | (function(module, exports, __webpack_require__) {
|
11515 |
|
11516 | __webpack_require__(51);
|
11517 | var classof = __webpack_require__(59);
|
11518 | var hasOwn = __webpack_require__(14);
|
11519 | var isPrototypeOf = __webpack_require__(21);
|
11520 | var method = __webpack_require__(382);
|
11521 |
|
11522 | var ArrayPrototype = Array.prototype;
|
11523 |
|
11524 | var DOMIterables = {
|
11525 | DOMTokenList: true,
|
11526 | NodeList: true
|
11527 | };
|
11528 |
|
11529 | module.exports = function (it) {
|
11530 | var own = it.keys;
|
11531 | return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.keys)
|
11532 | || hasOwn(DOMIterables, classof(it)) ? method : own;
|
11533 | };
|
11534 |
|
11535 |
|
11536 | }),
|
11537 |
|
11538 | (function(module, exports, __webpack_require__) {
|
11539 |
|
11540 | var parent = __webpack_require__(383);
|
11541 |
|
11542 | module.exports = parent;
|
11543 |
|
11544 |
|
11545 | }),
|
11546 |
|
11547 | (function(module, exports, __webpack_require__) {
|
11548 |
|
11549 | __webpack_require__(48);
|
11550 | __webpack_require__(60);
|
11551 | var entryVirtual = __webpack_require__(41);
|
11552 |
|
11553 | module.exports = entryVirtual('Array').keys;
|
11554 |
|
11555 |
|
11556 | }),
|
11557 |
|
11558 | (function(module, exports) {
|
11559 |
|
11560 |
|
11561 |
|
11562 |
|
11563 |
|
11564 |
|
11565 |
|
11566 |
|
11567 | var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
|
11568 | (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
|
11569 |
|
11570 | if (getRandomValues) {
|
11571 |
|
11572 | var rnds8 = new Uint8Array(16);
|
11573 |
|
11574 | module.exports = function whatwgRNG() {
|
11575 | getRandomValues(rnds8);
|
11576 | return rnds8;
|
11577 | };
|
11578 | } else {
|
11579 |
|
11580 |
|
11581 |
|
11582 |
|
11583 | var rnds = new Array(16);
|
11584 |
|
11585 | module.exports = function mathRNG() {
|
11586 | for (var i = 0, r; i < 16; i++) {
|
11587 | if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
|
11588 | rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
|
11589 | }
|
11590 |
|
11591 | return rnds;
|
11592 | };
|
11593 | }
|
11594 |
|
11595 |
|
11596 | }),
|
11597 |
|
11598 | (function(module, exports) {
|
11599 |
|
11600 |
|
11601 |
|
11602 |
|
11603 |
|
11604 | var byteToHex = [];
|
11605 | for (var i = 0; i < 256; ++i) {
|
11606 | byteToHex[i] = (i + 0x100).toString(16).substr(1);
|
11607 | }
|
11608 |
|
11609 | function bytesToUuid(buf, offset) {
|
11610 | var i = offset || 0;
|
11611 | var bth = byteToHex;
|
11612 |
|
11613 | return ([bth[buf[i++]], bth[buf[i++]],
|
11614 | bth[buf[i++]], bth[buf[i++]], '-',
|
11615 | bth[buf[i++]], bth[buf[i++]], '-',
|
11616 | bth[buf[i++]], bth[buf[i++]], '-',
|
11617 | bth[buf[i++]], bth[buf[i++]], '-',
|
11618 | bth[buf[i++]], bth[buf[i++]],
|
11619 | bth[buf[i++]], bth[buf[i++]],
|
11620 | bth[buf[i++]], bth[buf[i++]]]).join('');
|
11621 | }
|
11622 |
|
11623 | module.exports = bytesToUuid;
|
11624 |
|
11625 |
|
11626 | }),
|
11627 |
|
11628 | (function(module, exports, __webpack_require__) {
|
11629 |
|
11630 | "use strict";
|
11631 |
|
11632 |
|
11633 |
|
11634 |
|
11635 |
|
11636 |
|
11637 | function setup(env) {
|
11638 | createDebug.debug = createDebug;
|
11639 | createDebug.default = createDebug;
|
11640 | createDebug.coerce = coerce;
|
11641 | createDebug.disable = disable;
|
11642 | createDebug.enable = enable;
|
11643 | createDebug.enabled = enabled;
|
11644 | createDebug.humanize = __webpack_require__(387);
|
11645 | Object.keys(env).forEach(function (key) {
|
11646 | createDebug[key] = env[key];
|
11647 | });
|
11648 | |
11649 |
|
11650 |
|
11651 |
|
11652 | createDebug.instances = [];
|
11653 | |
11654 |
|
11655 |
|
11656 |
|
11657 | createDebug.names = [];
|
11658 | createDebug.skips = [];
|
11659 | |
11660 |
|
11661 |
|
11662 |
|
11663 |
|
11664 |
|
11665 | createDebug.formatters = {};
|
11666 | |
11667 |
|
11668 |
|
11669 |
|
11670 |
|
11671 |
|
11672 |
|
11673 | function selectColor(namespace) {
|
11674 | var hash = 0;
|
11675 |
|
11676 | for (var i = 0; i < namespace.length; i++) {
|
11677 | hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
11678 | hash |= 0;
|
11679 | }
|
11680 |
|
11681 | return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
11682 | }
|
11683 |
|
11684 | createDebug.selectColor = selectColor;
|
11685 | |
11686 |
|
11687 |
|
11688 |
|
11689 |
|
11690 |
|
11691 |
|
11692 |
|
11693 | function createDebug(namespace) {
|
11694 | var prevTime;
|
11695 |
|
11696 | function debug() {
|
11697 |
|
11698 | if (!debug.enabled) {
|
11699 | return;
|
11700 | }
|
11701 |
|
11702 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
11703 | args[_key] = arguments[_key];
|
11704 | }
|
11705 |
|
11706 | var self = debug;
|
11707 |
|
11708 | var curr = Number(new Date());
|
11709 | var ms = curr - (prevTime || curr);
|
11710 | self.diff = ms;
|
11711 | self.prev = prevTime;
|
11712 | self.curr = curr;
|
11713 | prevTime = curr;
|
11714 | args[0] = createDebug.coerce(args[0]);
|
11715 |
|
11716 | if (typeof args[0] !== 'string') {
|
11717 |
|
11718 | args.unshift('%O');
|
11719 | }
|
11720 |
|
11721 |
|
11722 | var index = 0;
|
11723 | args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
|
11724 |
|
11725 | if (match === '%%') {
|
11726 | return match;
|
11727 | }
|
11728 |
|
11729 | index++;
|
11730 | var formatter = createDebug.formatters[format];
|
11731 |
|
11732 | if (typeof formatter === 'function') {
|
11733 | var val = args[index];
|
11734 | match = formatter.call(self, val);
|
11735 |
|
11736 | args.splice(index, 1);
|
11737 | index--;
|
11738 | }
|
11739 |
|
11740 | return match;
|
11741 | });
|
11742 |
|
11743 | createDebug.formatArgs.call(self, args);
|
11744 | var logFn = self.log || createDebug.log;
|
11745 | logFn.apply(self, args);
|
11746 | }
|
11747 |
|
11748 | debug.namespace = namespace;
|
11749 | debug.enabled = createDebug.enabled(namespace);
|
11750 | debug.useColors = createDebug.useColors();
|
11751 | debug.color = selectColor(namespace);
|
11752 | debug.destroy = destroy;
|
11753 | debug.extend = extend;
|
11754 |
|
11755 |
|
11756 |
|
11757 | if (typeof createDebug.init === 'function') {
|
11758 | createDebug.init(debug);
|
11759 | }
|
11760 |
|
11761 | createDebug.instances.push(debug);
|
11762 | return debug;
|
11763 | }
|
11764 |
|
11765 | function destroy() {
|
11766 | var index = createDebug.instances.indexOf(this);
|
11767 |
|
11768 | if (index !== -1) {
|
11769 | createDebug.instances.splice(index, 1);
|
11770 | return true;
|
11771 | }
|
11772 |
|
11773 | return false;
|
11774 | }
|
11775 |
|
11776 | function extend(namespace, delimiter) {
|
11777 | return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
11778 | }
|
11779 | |
11780 |
|
11781 |
|
11782 |
|
11783 |
|
11784 |
|
11785 |
|
11786 |
|
11787 |
|
11788 | function enable(namespaces) {
|
11789 | createDebug.save(namespaces);
|
11790 | createDebug.names = [];
|
11791 | createDebug.skips = [];
|
11792 | var i;
|
11793 | var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
11794 | var len = split.length;
|
11795 |
|
11796 | for (i = 0; i < len; i++) {
|
11797 | if (!split[i]) {
|
11798 |
|
11799 | continue;
|
11800 | }
|
11801 |
|
11802 | namespaces = split[i].replace(/\*/g, '.*?');
|
11803 |
|
11804 | if (namespaces[0] === '-') {
|
11805 | createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
|
11806 | } else {
|
11807 | createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
11808 | }
|
11809 | }
|
11810 |
|
11811 | for (i = 0; i < createDebug.instances.length; i++) {
|
11812 | var instance = createDebug.instances[i];
|
11813 | instance.enabled = createDebug.enabled(instance.namespace);
|
11814 | }
|
11815 | }
|
11816 | |
11817 |
|
11818 |
|
11819 |
|
11820 |
|
11821 |
|
11822 |
|
11823 | function disable() {
|
11824 | createDebug.enable('');
|
11825 | }
|
11826 | |
11827 |
|
11828 |
|
11829 |
|
11830 |
|
11831 |
|
11832 |
|
11833 |
|
11834 |
|
11835 | function enabled(name) {
|
11836 | if (name[name.length - 1] === '*') {
|
11837 | return true;
|
11838 | }
|
11839 |
|
11840 | var i;
|
11841 | var len;
|
11842 |
|
11843 | for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
11844 | if (createDebug.skips[i].test(name)) {
|
11845 | return false;
|
11846 | }
|
11847 | }
|
11848 |
|
11849 | for (i = 0, len = createDebug.names.length; i < len; i++) {
|
11850 | if (createDebug.names[i].test(name)) {
|
11851 | return true;
|
11852 | }
|
11853 | }
|
11854 |
|
11855 | return false;
|
11856 | }
|
11857 | |
11858 |
|
11859 |
|
11860 |
|
11861 |
|
11862 |
|
11863 |
|
11864 |
|
11865 |
|
11866 | function coerce(val) {
|
11867 | if (val instanceof Error) {
|
11868 | return val.stack || val.message;
|
11869 | }
|
11870 |
|
11871 | return val;
|
11872 | }
|
11873 |
|
11874 | createDebug.enable(createDebug.load());
|
11875 | return createDebug;
|
11876 | }
|
11877 |
|
11878 | module.exports = setup;
|
11879 |
|
11880 |
|
11881 |
|
11882 | }),
|
11883 |
|
11884 | (function(module, exports) {
|
11885 |
|
11886 |
|
11887 |
|
11888 |
|
11889 |
|
11890 | var s = 1000;
|
11891 | var m = s * 60;
|
11892 | var h = m * 60;
|
11893 | var d = h * 24;
|
11894 | var w = d * 7;
|
11895 | var y = d * 365.25;
|
11896 |
|
11897 |
|
11898 |
|
11899 |
|
11900 |
|
11901 |
|
11902 |
|
11903 |
|
11904 |
|
11905 |
|
11906 |
|
11907 |
|
11908 |
|
11909 |
|
11910 |
|
11911 | module.exports = function(val, options) {
|
11912 | options = options || {};
|
11913 | var type = typeof val;
|
11914 | if (type === 'string' && val.length > 0) {
|
11915 | return parse(val);
|
11916 | } else if (type === 'number' && isFinite(val)) {
|
11917 | return options.long ? fmtLong(val) : fmtShort(val);
|
11918 | }
|
11919 | throw new Error(
|
11920 | 'val is not a non-empty string or a valid number. val=' +
|
11921 | JSON.stringify(val)
|
11922 | );
|
11923 | };
|
11924 |
|
11925 |
|
11926 |
|
11927 |
|
11928 |
|
11929 |
|
11930 |
|
11931 |
|
11932 |
|
11933 | function parse(str) {
|
11934 | str = String(str);
|
11935 | if (str.length > 100) {
|
11936 | return;
|
11937 | }
|
11938 | var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
11939 | str
|
11940 | );
|
11941 | if (!match) {
|
11942 | return;
|
11943 | }
|
11944 | var n = parseFloat(match[1]);
|
11945 | var type = (match[2] || 'ms').toLowerCase();
|
11946 | switch (type) {
|
11947 | case 'years':
|
11948 | case 'year':
|
11949 | case 'yrs':
|
11950 | case 'yr':
|
11951 | case 'y':
|
11952 | return n * y;
|
11953 | case 'weeks':
|
11954 | case 'week':
|
11955 | case 'w':
|
11956 | return n * w;
|
11957 | case 'days':
|
11958 | case 'day':
|
11959 | case 'd':
|
11960 | return n * d;
|
11961 | case 'hours':
|
11962 | case 'hour':
|
11963 | case 'hrs':
|
11964 | case 'hr':
|
11965 | case 'h':
|
11966 | return n * h;
|
11967 | case 'minutes':
|
11968 | case 'minute':
|
11969 | case 'mins':
|
11970 | case 'min':
|
11971 | case 'm':
|
11972 | return n * m;
|
11973 | case 'seconds':
|
11974 | case 'second':
|
11975 | case 'secs':
|
11976 | case 'sec':
|
11977 | case 's':
|
11978 | return n * s;
|
11979 | case 'milliseconds':
|
11980 | case 'millisecond':
|
11981 | case 'msecs':
|
11982 | case 'msec':
|
11983 | case 'ms':
|
11984 | return n;
|
11985 | default:
|
11986 | return undefined;
|
11987 | }
|
11988 | }
|
11989 |
|
11990 |
|
11991 |
|
11992 |
|
11993 |
|
11994 |
|
11995 |
|
11996 |
|
11997 |
|
11998 | function fmtShort(ms) {
|
11999 | var msAbs = Math.abs(ms);
|
12000 | if (msAbs >= d) {
|
12001 | return Math.round(ms / d) + 'd';
|
12002 | }
|
12003 | if (msAbs >= h) {
|
12004 | return Math.round(ms / h) + 'h';
|
12005 | }
|
12006 | if (msAbs >= m) {
|
12007 | return Math.round(ms / m) + 'm';
|
12008 | }
|
12009 | if (msAbs >= s) {
|
12010 | return Math.round(ms / s) + 's';
|
12011 | }
|
12012 | return ms + 'ms';
|
12013 | }
|
12014 |
|
12015 |
|
12016 |
|
12017 |
|
12018 |
|
12019 |
|
12020 |
|
12021 |
|
12022 |
|
12023 | function fmtLong(ms) {
|
12024 | var msAbs = Math.abs(ms);
|
12025 | if (msAbs >= d) {
|
12026 | return plural(ms, msAbs, d, 'day');
|
12027 | }
|
12028 | if (msAbs >= h) {
|
12029 | return plural(ms, msAbs, h, 'hour');
|
12030 | }
|
12031 | if (msAbs >= m) {
|
12032 | return plural(ms, msAbs, m, 'minute');
|
12033 | }
|
12034 | if (msAbs >= s) {
|
12035 | return plural(ms, msAbs, s, 'second');
|
12036 | }
|
12037 | return ms + ' ms';
|
12038 | }
|
12039 |
|
12040 |
|
12041 |
|
12042 |
|
12043 |
|
12044 | function plural(ms, msAbs, n, name) {
|
12045 | var isPlural = msAbs >= n * 1.5;
|
12046 | return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
12047 | }
|
12048 |
|
12049 |
|
12050 | }),
|
12051 |
|
12052 | (function(module, exports, __webpack_require__) {
|
12053 |
|
12054 | __webpack_require__(389);
|
12055 | var path = __webpack_require__(10);
|
12056 |
|
12057 | module.exports = path.Object.getPrototypeOf;
|
12058 |
|
12059 |
|
12060 | }),
|
12061 |
|
12062 | (function(module, exports, __webpack_require__) {
|
12063 |
|
12064 | var $ = __webpack_require__(0);
|
12065 | var fails = __webpack_require__(3);
|
12066 | var toObject = __webpack_require__(34);
|
12067 | var nativeGetPrototypeOf = __webpack_require__(93);
|
12068 | var CORRECT_PROTOTYPE_GETTER = __webpack_require__(151);
|
12069 |
|
12070 | var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });
|
12071 |
|
12072 |
|
12073 |
|
12074 | $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {
|
12075 | getPrototypeOf: function getPrototypeOf(it) {
|
12076 | return nativeGetPrototypeOf(toObject(it));
|
12077 | }
|
12078 | });
|
12079 |
|
12080 |
|
12081 |
|
12082 | }),
|
12083 |
|
12084 | (function(module, exports, __webpack_require__) {
|
12085 |
|
12086 | __webpack_require__(391);
|
12087 | var path = __webpack_require__(10);
|
12088 |
|
12089 | module.exports = path.Object.setPrototypeOf;
|
12090 |
|
12091 |
|
12092 | }),
|
12093 |
|
12094 | (function(module, exports, __webpack_require__) {
|
12095 |
|
12096 | var $ = __webpack_require__(0);
|
12097 | var setPrototypeOf = __webpack_require__(95);
|
12098 |
|
12099 |
|
12100 |
|
12101 | $({ target: 'Object', stat: true }, {
|
12102 | setPrototypeOf: setPrototypeOf
|
12103 | });
|
12104 |
|
12105 |
|
12106 | }),
|
12107 |
|
12108 | (function(module, exports, __webpack_require__) {
|
12109 |
|
12110 | "use strict";
|
12111 |
|
12112 |
|
12113 | var _interopRequireDefault = __webpack_require__(1);
|
12114 |
|
12115 | var _slice = _interopRequireDefault(__webpack_require__(87));
|
12116 |
|
12117 | var _concat = _interopRequireDefault(__webpack_require__(30));
|
12118 |
|
12119 | var _defineProperty = _interopRequireDefault(__webpack_require__(143));
|
12120 |
|
12121 | var AV = __webpack_require__(65);
|
12122 |
|
12123 | var AppRouter = __webpack_require__(398);
|
12124 |
|
12125 | var _require = __webpack_require__(29),
|
12126 | isNullOrUndefined = _require.isNullOrUndefined;
|
12127 |
|
12128 | var _require2 = __webpack_require__(2),
|
12129 | extend = _require2.extend,
|
12130 | isObject = _require2.isObject,
|
12131 | isEmpty = _require2.isEmpty;
|
12132 |
|
12133 | var isCNApp = function isCNApp(appId) {
|
12134 | return (0, _slice.default)(appId).call(appId, -9) !== '-MdYXbMMI';
|
12135 | };
|
12136 |
|
12137 | var fillServerURLs = function fillServerURLs(url) {
|
12138 | return {
|
12139 | push: url,
|
12140 | stats: url,
|
12141 | engine: url,
|
12142 | api: url,
|
12143 | rtm: url
|
12144 | };
|
12145 | };
|
12146 |
|
12147 | function getDefaultServerURLs(appId) {
|
12148 | var _context, _context2, _context3, _context4, _context5;
|
12149 |
|
12150 | if (isCNApp(appId)) {
|
12151 | return {};
|
12152 | }
|
12153 |
|
12154 | var id = (0, _slice.default)(appId).call(appId, 0, 8).toLowerCase();
|
12155 | var domain = 'lncldglobal.com';
|
12156 | return {
|
12157 | push: (0, _concat.default)(_context = "https://".concat(id, ".push.")).call(_context, domain),
|
12158 | stats: (0, _concat.default)(_context2 = "https://".concat(id, ".stats.")).call(_context2, domain),
|
12159 | engine: (0, _concat.default)(_context3 = "https://".concat(id, ".engine.")).call(_context3, domain),
|
12160 | api: (0, _concat.default)(_context4 = "https://".concat(id, ".api.")).call(_context4, domain),
|
12161 | rtm: (0, _concat.default)(_context5 = "https://".concat(id, ".rtm.")).call(_context5, domain)
|
12162 | };
|
12163 | }
|
12164 |
|
12165 | var _disableAppRouter = false;
|
12166 | var _initialized = false;
|
12167 |
|
12168 |
|
12169 |
|
12170 |
|
12171 |
|
12172 |
|
12173 |
|
12174 |
|
12175 |
|
12176 |
|
12177 |
|
12178 |
|
12179 |
|
12180 |
|
12181 |
|
12182 |
|
12183 |
|
12184 |
|
12185 |
|
12186 |
|
12187 |
|
12188 |
|
12189 |
|
12190 | AV.init = function init(options) {
|
12191 | if (!isObject(options)) {
|
12192 | return AV.init({
|
12193 | appId: options,
|
12194 | appKey: arguments.length <= 1 ? undefined : arguments[1],
|
12195 | masterKey: arguments.length <= 2 ? undefined : arguments[2]
|
12196 | });
|
12197 | }
|
12198 |
|
12199 | var appId = options.appId,
|
12200 | appKey = options.appKey,
|
12201 | masterKey = options.masterKey,
|
12202 | hookKey = options.hookKey,
|
12203 | serverURL = options.serverURL,
|
12204 | _options$serverURLs = options.serverURLs,
|
12205 | serverURLs = _options$serverURLs === void 0 ? serverURL : _options$serverURLs,
|
12206 | disableCurrentUser = options.disableCurrentUser,
|
12207 | production = options.production,
|
12208 | realtime = options.realtime;
|
12209 | if (_initialized) console.warn('Initializing LeanCloud Storage SDK which has already been initialized. Reinitializing the SDK might cause problems like unexpected cross-app data writing and invalid relations.');
|
12210 | if (!appId) throw new TypeError('appId must be a string');
|
12211 | if (!appKey) throw new TypeError('appKey must be a string');
|
12212 | if ("Weapp" !== 'NODE_JS' && masterKey) console.warn('MasterKey is not supposed to be used at client side.');
|
12213 |
|
12214 | if (isCNApp(appId)) {
|
12215 | if (!serverURLs && isEmpty(AV._config.serverURLs)) {
|
12216 | throw new TypeError("serverURL option is required for apps from CN region");
|
12217 | }
|
12218 | }
|
12219 |
|
12220 | if (appId !== AV._config.applicationId) {
|
12221 |
|
12222 | AV._config.masterKey = masterKey;
|
12223 | AV._config.hookKey = hookKey;
|
12224 | } else {
|
12225 | if (masterKey) AV._config.masterKey = masterKey;
|
12226 | if (hookKey) AV._config.hookKey = hookKey;
|
12227 | }
|
12228 |
|
12229 | AV._config.applicationId = appId;
|
12230 | AV._config.applicationKey = appKey;
|
12231 |
|
12232 | if (!isNullOrUndefined(production)) {
|
12233 | AV.setProduction(production);
|
12234 | }
|
12235 |
|
12236 | if (typeof disableCurrentUser !== 'undefined') AV._config.disableCurrentUser = disableCurrentUser;
|
12237 | var disableAppRouter = _disableAppRouter || typeof serverURLs !== 'undefined';
|
12238 |
|
12239 | if (!disableAppRouter) {
|
12240 | AV._appRouter = new AppRouter(AV);
|
12241 | }
|
12242 |
|
12243 | AV._setServerURLs(extend({}, getDefaultServerURLs(appId), AV._config.serverURLs, typeof serverURLs === 'string' ? fillServerURLs(serverURLs) : serverURLs), disableAppRouter);
|
12244 |
|
12245 | if (realtime) {
|
12246 | AV._config.realtime = realtime;
|
12247 | } else if (AV._sharedConfig.liveQueryRealtime) {
|
12248 | var _AV$_config$serverURL = AV._config.serverURLs,
|
12249 | api = _AV$_config$serverURL.api,
|
12250 | rtm = _AV$_config$serverURL.rtm;
|
12251 | AV._config.realtime = new AV._sharedConfig.liveQueryRealtime({
|
12252 | appId: appId,
|
12253 | appKey: appKey,
|
12254 | server: {
|
12255 | api: api,
|
12256 | RTMRouter: rtm
|
12257 | }
|
12258 | });
|
12259 | }
|
12260 |
|
12261 | _initialized = true;
|
12262 | };
|
12263 |
|
12264 |
|
12265 | if (false) {
|
12266 | AV.Cloud = AV.Cloud || {};
|
12267 | |
12268 |
|
12269 |
|
12270 |
|
12271 |
|
12272 |
|
12273 |
|
12274 |
|
12275 | AV.Cloud.useMasterKey = function () {
|
12276 | AV._config.useMasterKey = true;
|
12277 | };
|
12278 | }
|
12279 |
|
12280 |
|
12281 |
|
12282 |
|
12283 |
|
12284 |
|
12285 |
|
12286 |
|
12287 | AV.setProduction = function (production) {
|
12288 | if (!isNullOrUndefined(production)) {
|
12289 | AV._config.production = production ? 1 : 0;
|
12290 | } else {
|
12291 |
|
12292 | AV._config.production = null;
|
12293 | }
|
12294 | };
|
12295 |
|
12296 | AV._setServerURLs = function (urls) {
|
12297 | var disableAppRouter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
12298 |
|
12299 | if (typeof urls !== 'string') {
|
12300 | extend(AV._config.serverURLs, urls);
|
12301 | } else {
|
12302 | AV._config.serverURLs = fillServerURLs(urls);
|
12303 | }
|
12304 |
|
12305 | if (disableAppRouter) {
|
12306 | if (AV._appRouter) {
|
12307 | AV._appRouter.disable();
|
12308 | } else {
|
12309 | _disableAppRouter = true;
|
12310 | }
|
12311 | }
|
12312 | };
|
12313 |
|
12314 |
|
12315 |
|
12316 |
|
12317 |
|
12318 |
|
12319 |
|
12320 |
|
12321 |
|
12322 | AV.setServerURL = function (urls) {
|
12323 | return AV._setServerURLs(urls);
|
12324 | };
|
12325 |
|
12326 | AV.setServerURLs = AV.setServerURL;
|
12327 |
|
12328 | AV.keepErrorRawMessage = function (value) {
|
12329 | AV._sharedConfig.keepErrorRawMessage = value;
|
12330 | };
|
12331 |
|
12332 |
|
12333 |
|
12334 |
|
12335 |
|
12336 |
|
12337 |
|
12338 |
|
12339 |
|
12340 | AV.setRequestTimeout = function (ms) {
|
12341 | AV._config.requestTimeout = ms;
|
12342 | };
|
12343 |
|
12344 |
|
12345 | AV.initialize = AV.init;
|
12346 |
|
12347 | var defineConfig = function defineConfig(property) {
|
12348 | return (0, _defineProperty.default)(AV, property, {
|
12349 | get: function get() {
|
12350 | return AV._config[property];
|
12351 | },
|
12352 | set: function set(value) {
|
12353 | AV._config[property] = value;
|
12354 | }
|
12355 | });
|
12356 | };
|
12357 |
|
12358 | ['applicationId', 'applicationKey', 'masterKey', 'hookKey'].forEach(defineConfig);
|
12359 |
|
12360 | }),
|
12361 |
|
12362 | (function(module, exports, __webpack_require__) {
|
12363 |
|
12364 | var isPrototypeOf = __webpack_require__(21);
|
12365 | var method = __webpack_require__(394);
|
12366 |
|
12367 | var ArrayPrototype = Array.prototype;
|
12368 |
|
12369 | module.exports = function (it) {
|
12370 | var own = it.slice;
|
12371 | return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.slice) ? method : own;
|
12372 | };
|
12373 |
|
12374 |
|
12375 | }),
|
12376 |
|
12377 | (function(module, exports, __webpack_require__) {
|
12378 |
|
12379 | __webpack_require__(395);
|
12380 | var entryVirtual = __webpack_require__(41);
|
12381 |
|
12382 | module.exports = entryVirtual('Array').slice;
|
12383 |
|
12384 |
|
12385 | }),
|
12386 |
|
12387 | (function(module, exports, __webpack_require__) {
|
12388 |
|
12389 | "use strict";
|
12390 |
|
12391 | var $ = __webpack_require__(0);
|
12392 | var isArray = __webpack_require__(85);
|
12393 | var isConstructor = __webpack_require__(101);
|
12394 | var isObject = __webpack_require__(11);
|
12395 | var toAbsoluteIndex = __webpack_require__(119);
|
12396 | var lengthOfArrayLike = __webpack_require__(46);
|
12397 | var toIndexedObject = __webpack_require__(33);
|
12398 | var createProperty = __webpack_require__(106);
|
12399 | var wellKnownSymbol = __webpack_require__(9);
|
12400 | var arrayMethodHasSpeciesSupport = __webpack_require__(107);
|
12401 | var un$Slice = __webpack_require__(102);
|
12402 |
|
12403 | var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
|
12404 |
|
12405 | var SPECIES = wellKnownSymbol('species');
|
12406 | var $Array = Array;
|
12407 | var max = Math.max;
|
12408 |
|
12409 |
|
12410 |
|
12411 |
|
12412 | $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
12413 | slice: function slice(start, end) {
|
12414 | var O = toIndexedObject(this);
|
12415 | var length = lengthOfArrayLike(O);
|
12416 | var k = toAbsoluteIndex(start, length);
|
12417 | var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
12418 |
|
12419 | var Constructor, result, n;
|
12420 | if (isArray(O)) {
|
12421 | Constructor = O.constructor;
|
12422 |
|
12423 | if (isConstructor(Constructor) && (Constructor === $Array || isArray(Constructor.prototype))) {
|
12424 | Constructor = undefined;
|
12425 | } else if (isObject(Constructor)) {
|
12426 | Constructor = Constructor[SPECIES];
|
12427 | if (Constructor === null) Constructor = undefined;
|
12428 | }
|
12429 | if (Constructor === $Array || Constructor === undefined) {
|
12430 | return un$Slice(O, k, fin);
|
12431 | }
|
12432 | }
|
12433 | result = new (Constructor === undefined ? $Array : Constructor)(max(fin - k, 0));
|
12434 | for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
|
12435 | result.length = n;
|
12436 | return result;
|
12437 | }
|
12438 | });
|
12439 |
|
12440 |
|
12441 | }),
|
12442 |
|
12443 | (function(module, exports, __webpack_require__) {
|
12444 |
|
12445 | __webpack_require__(397);
|
12446 | var path = __webpack_require__(10);
|
12447 |
|
12448 | var Object = path.Object;
|
12449 |
|
12450 | var defineProperty = module.exports = function defineProperty(it, key, desc) {
|
12451 | return Object.defineProperty(it, key, desc);
|
12452 | };
|
12453 |
|
12454 | if (Object.defineProperty.sham) defineProperty.sham = true;
|
12455 |
|
12456 |
|
12457 | }),
|
12458 |
|
12459 | (function(module, exports, __webpack_require__) {
|
12460 |
|
12461 | var $ = __webpack_require__(0);
|
12462 | var DESCRIPTORS = __webpack_require__(16);
|
12463 | var defineProperty = __webpack_require__(22).f;
|
12464 |
|
12465 |
|
12466 |
|
12467 |
|
12468 | $({ target: 'Object', stat: true, forced: Object.defineProperty !== defineProperty, sham: !DESCRIPTORS }, {
|
12469 | defineProperty: defineProperty
|
12470 | });
|
12471 |
|
12472 |
|
12473 | }),
|
12474 |
|
12475 | (function(module, exports, __webpack_require__) {
|
12476 |
|
12477 | "use strict";
|
12478 |
|
12479 |
|
12480 | var ajax = __webpack_require__(108);
|
12481 |
|
12482 | var Cache = __webpack_require__(226);
|
12483 |
|
12484 | function AppRouter(AV) {
|
12485 | var _this = this;
|
12486 |
|
12487 | this.AV = AV;
|
12488 | this.lockedUntil = 0;
|
12489 | Cache.getAsync('serverURLs').then(function (data) {
|
12490 | if (_this.disabled) return;
|
12491 | if (!data) return _this.lock(0);
|
12492 | var serverURLs = data.serverURLs,
|
12493 | lockedUntil = data.lockedUntil;
|
12494 |
|
12495 | _this.AV._setServerURLs(serverURLs, false);
|
12496 |
|
12497 | _this.lockedUntil = lockedUntil;
|
12498 | }).catch(function () {
|
12499 | return _this.lock(0);
|
12500 | });
|
12501 | }
|
12502 |
|
12503 | AppRouter.prototype.disable = function disable() {
|
12504 | this.disabled = true;
|
12505 | };
|
12506 |
|
12507 | AppRouter.prototype.lock = function lock(ttl) {
|
12508 | this.lockedUntil = Date.now() + ttl;
|
12509 | };
|
12510 |
|
12511 | AppRouter.prototype.refresh = function refresh() {
|
12512 | var _this2 = this;
|
12513 |
|
12514 | if (this.disabled) return;
|
12515 | if (Date.now() < this.lockedUntil) return;
|
12516 | this.lock(10);
|
12517 | var url = 'https://app-router.com/2/route';
|
12518 | return ajax({
|
12519 | method: 'get',
|
12520 | url: url,
|
12521 | query: {
|
12522 | appId: this.AV.applicationId
|
12523 | }
|
12524 | }).then(function (servers) {
|
12525 | if (_this2.disabled) return;
|
12526 | var ttl = servers.ttl;
|
12527 | if (!ttl) throw new Error('missing ttl');
|
12528 | ttl = ttl * 1000;
|
12529 | var protocal = 'https://';
|
12530 | var serverURLs = {
|
12531 | push: protocal + servers.push_server,
|
12532 | stats: protocal + servers.stats_server,
|
12533 | engine: protocal + servers.engine_server,
|
12534 | api: protocal + servers.api_server
|
12535 | };
|
12536 |
|
12537 | _this2.AV._setServerURLs(serverURLs, false);
|
12538 |
|
12539 | _this2.lock(ttl);
|
12540 |
|
12541 | return Cache.setAsync('serverURLs', {
|
12542 | serverURLs: serverURLs,
|
12543 | lockedUntil: _this2.lockedUntil
|
12544 | }, ttl);
|
12545 | }).catch(function (error) {
|
12546 |
|
12547 | console.warn("refresh server URLs failed: ".concat(error.message));
|
12548 |
|
12549 | _this2.lock(600);
|
12550 | });
|
12551 | };
|
12552 |
|
12553 | module.exports = AppRouter;
|
12554 |
|
12555 | }),
|
12556 |
|
12557 | (function(module, exports, __webpack_require__) {
|
12558 |
|
12559 | module.exports = __webpack_require__(400);
|
12560 |
|
12561 |
|
12562 | }),
|
12563 |
|
12564 | (function(module, exports, __webpack_require__) {
|
12565 |
|
12566 | var parent = __webpack_require__(401);
|
12567 | __webpack_require__(424);
|
12568 | __webpack_require__(425);
|
12569 | __webpack_require__(426);
|
12570 | __webpack_require__(427);
|
12571 | __webpack_require__(428);
|
12572 |
|
12573 | __webpack_require__(429);
|
12574 | __webpack_require__(430);
|
12575 | __webpack_require__(431);
|
12576 |
|
12577 | module.exports = parent;
|
12578 |
|
12579 |
|
12580 | }),
|
12581 |
|
12582 | (function(module, exports, __webpack_require__) {
|
12583 |
|
12584 | var parent = __webpack_require__(232);
|
12585 |
|
12586 | module.exports = parent;
|
12587 |
|
12588 |
|
12589 | }),
|
12590 |
|
12591 | (function(module, exports, __webpack_require__) {
|
12592 |
|
12593 | __webpack_require__(218);
|
12594 | __webpack_require__(60);
|
12595 | __webpack_require__(233);
|
12596 | __webpack_require__(408);
|
12597 | __webpack_require__(409);
|
12598 | __webpack_require__(410);
|
12599 | __webpack_require__(411);
|
12600 | __webpack_require__(237);
|
12601 | __webpack_require__(412);
|
12602 | __webpack_require__(413);
|
12603 | __webpack_require__(414);
|
12604 | __webpack_require__(415);
|
12605 | __webpack_require__(416);
|
12606 | __webpack_require__(417);
|
12607 | __webpack_require__(418);
|
12608 | __webpack_require__(419);
|
12609 | __webpack_require__(420);
|
12610 | __webpack_require__(421);
|
12611 | __webpack_require__(422);
|
12612 | __webpack_require__(423);
|
12613 | var path = __webpack_require__(10);
|
12614 |
|
12615 | module.exports = path.Symbol;
|
12616 |
|
12617 |
|
12618 | }),
|
12619 |
|
12620 | (function(module, exports, __webpack_require__) {
|
12621 |
|
12622 | "use strict";
|
12623 |
|
12624 | var $ = __webpack_require__(0);
|
12625 | var global = __webpack_require__(6);
|
12626 | var call = __webpack_require__(13);
|
12627 | var uncurryThis = __webpack_require__(4);
|
12628 | var IS_PURE = __webpack_require__(32);
|
12629 | var DESCRIPTORS = __webpack_require__(16);
|
12630 | var NATIVE_SYMBOL = __webpack_require__(57);
|
12631 | var fails = __webpack_require__(3);
|
12632 | var hasOwn = __webpack_require__(14);
|
12633 | var isPrototypeOf = __webpack_require__(21);
|
12634 | var anObject = __webpack_require__(19);
|
12635 | var toIndexedObject = __webpack_require__(33);
|
12636 | var toPropertyKey = __webpack_require__(88);
|
12637 | var $toString = __webpack_require__(75);
|
12638 | var createPropertyDescriptor = __webpack_require__(44);
|
12639 | var nativeObjectCreate = __webpack_require__(47);
|
12640 | var objectKeys = __webpack_require__(98);
|
12641 | var getOwnPropertyNamesModule = __webpack_require__(96);
|
12642 | var getOwnPropertyNamesExternal = __webpack_require__(234);
|
12643 | var getOwnPropertySymbolsModule = __webpack_require__(97);
|
12644 | var getOwnPropertyDescriptorModule = __webpack_require__(71);
|
12645 | var definePropertyModule = __webpack_require__(22);
|
12646 | var definePropertiesModule = __webpack_require__(154);
|
12647 | var propertyIsEnumerableModule = __webpack_require__(113);
|
12648 | var defineBuiltIn = __webpack_require__(39);
|
12649 | var shared = __webpack_require__(73);
|
12650 | var sharedKey = __webpack_require__(94);
|
12651 | var hiddenKeys = __webpack_require__(74);
|
12652 | var uid = __webpack_require__(92);
|
12653 | var wellKnownSymbol = __webpack_require__(9);
|
12654 | var wrappedWellKnownSymbolModule = __webpack_require__(144);
|
12655 | var defineWellKnownSymbol = __webpack_require__(8);
|
12656 | var defineSymbolToPrimitive = __webpack_require__(235);
|
12657 | var setToStringTag = __webpack_require__(49);
|
12658 | var InternalStateModule = __webpack_require__(38);
|
12659 | var $forEach = __webpack_require__(66).forEach;
|
12660 |
|
12661 | var HIDDEN = sharedKey('hidden');
|
12662 | var SYMBOL = 'Symbol';
|
12663 | var PROTOTYPE = 'prototype';
|
12664 |
|
12665 | var setInternalState = InternalStateModule.set;
|
12666 | var getInternalState = InternalStateModule.getterFor(SYMBOL);
|
12667 |
|
12668 | var ObjectPrototype = Object[PROTOTYPE];
|
12669 | var $Symbol = global.Symbol;
|
12670 | var SymbolPrototype = $Symbol && $Symbol[PROTOTYPE];
|
12671 | var TypeError = global.TypeError;
|
12672 | var QObject = global.QObject;
|
12673 | var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
12674 | var nativeDefineProperty = definePropertyModule.f;
|
12675 | var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
|
12676 | var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
|
12677 | var push = uncurryThis([].push);
|
12678 |
|
12679 | var AllSymbols = shared('symbols');
|
12680 | var ObjectPrototypeSymbols = shared('op-symbols');
|
12681 | var WellKnownSymbolsStore = shared('wks');
|
12682 |
|
12683 |
|
12684 | var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
|
12685 |
|
12686 |
|
12687 | var setSymbolDescriptor = DESCRIPTORS && fails(function () {
|
12688 | return nativeObjectCreate(nativeDefineProperty({}, 'a', {
|
12689 | get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
|
12690 | })).a != 7;
|
12691 | }) ? function (O, P, Attributes) {
|
12692 | var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
|
12693 | if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
|
12694 | nativeDefineProperty(O, P, Attributes);
|
12695 | if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
|
12696 | nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
|
12697 | }
|
12698 | } : nativeDefineProperty;
|
12699 |
|
12700 | var wrap = function (tag, description) {
|
12701 | var symbol = AllSymbols[tag] = nativeObjectCreate(SymbolPrototype);
|
12702 | setInternalState(symbol, {
|
12703 | type: SYMBOL,
|
12704 | tag: tag,
|
12705 | description: description
|
12706 | });
|
12707 | if (!DESCRIPTORS) symbol.description = description;
|
12708 | return symbol;
|
12709 | };
|
12710 |
|
12711 | var $defineProperty = function defineProperty(O, P, Attributes) {
|
12712 | if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
|
12713 | anObject(O);
|
12714 | var key = toPropertyKey(P);
|
12715 | anObject(Attributes);
|
12716 | if (hasOwn(AllSymbols, key)) {
|
12717 | if (!Attributes.enumerable) {
|
12718 | if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
|
12719 | O[HIDDEN][key] = true;
|
12720 | } else {
|
12721 | if (hasOwn(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
|
12722 | Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
|
12723 | } return setSymbolDescriptor(O, key, Attributes);
|
12724 | } return nativeDefineProperty(O, key, Attributes);
|
12725 | };
|
12726 |
|
12727 | var $defineProperties = function defineProperties(O, Properties) {
|
12728 | anObject(O);
|
12729 | var properties = toIndexedObject(Properties);
|
12730 | var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
|
12731 | $forEach(keys, function (key) {
|
12732 | if (!DESCRIPTORS || call($propertyIsEnumerable, properties, key)) $defineProperty(O, key, properties[key]);
|
12733 | });
|
12734 | return O;
|
12735 | };
|
12736 |
|
12737 | var $create = function create(O, Properties) {
|
12738 | return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
|
12739 | };
|
12740 |
|
12741 | var $propertyIsEnumerable = function propertyIsEnumerable(V) {
|
12742 | var P = toPropertyKey(V);
|
12743 | var enumerable = call(nativePropertyIsEnumerable, this, P);
|
12744 | if (this === ObjectPrototype && hasOwn(AllSymbols, P) && !hasOwn(ObjectPrototypeSymbols, P)) return false;
|
12745 | return enumerable || !hasOwn(this, P) || !hasOwn(AllSymbols, P) || hasOwn(this, HIDDEN) && this[HIDDEN][P]
|
12746 | ? enumerable : true;
|
12747 | };
|
12748 |
|
12749 | var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
|
12750 | var it = toIndexedObject(O);
|
12751 | var key = toPropertyKey(P);
|
12752 | if (it === ObjectPrototype && hasOwn(AllSymbols, key) && !hasOwn(ObjectPrototypeSymbols, key)) return;
|
12753 | var descriptor = nativeGetOwnPropertyDescriptor(it, key);
|
12754 | if (descriptor && hasOwn(AllSymbols, key) && !(hasOwn(it, HIDDEN) && it[HIDDEN][key])) {
|
12755 | descriptor.enumerable = true;
|
12756 | }
|
12757 | return descriptor;
|
12758 | };
|
12759 |
|
12760 | var $getOwnPropertyNames = function getOwnPropertyNames(O) {
|
12761 | var names = nativeGetOwnPropertyNames(toIndexedObject(O));
|
12762 | var result = [];
|
12763 | $forEach(names, function (key) {
|
12764 | if (!hasOwn(AllSymbols, key) && !hasOwn(hiddenKeys, key)) push(result, key);
|
12765 | });
|
12766 | return result;
|
12767 | };
|
12768 |
|
12769 | var $getOwnPropertySymbols = function (O) {
|
12770 | var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
|
12771 | var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
|
12772 | var result = [];
|
12773 | $forEach(names, function (key) {
|
12774 | if (hasOwn(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwn(ObjectPrototype, key))) {
|
12775 | push(result, AllSymbols[key]);
|
12776 | }
|
12777 | });
|
12778 | return result;
|
12779 | };
|
12780 |
|
12781 |
|
12782 |
|
12783 | if (!NATIVE_SYMBOL) {
|
12784 | $Symbol = function Symbol() {
|
12785 | if (isPrototypeOf(SymbolPrototype, this)) throw TypeError('Symbol is not a constructor');
|
12786 | var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]);
|
12787 | var tag = uid(description);
|
12788 | var setter = function (value) {
|
12789 | if (this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value);
|
12790 | if (hasOwn(this, HIDDEN) && hasOwn(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
|
12791 | setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
|
12792 | };
|
12793 | if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
|
12794 | return wrap(tag, description);
|
12795 | };
|
12796 |
|
12797 | SymbolPrototype = $Symbol[PROTOTYPE];
|
12798 |
|
12799 | defineBuiltIn(SymbolPrototype, 'toString', function toString() {
|
12800 | return getInternalState(this).tag;
|
12801 | });
|
12802 |
|
12803 | defineBuiltIn($Symbol, 'withoutSetter', function (description) {
|
12804 | return wrap(uid(description), description);
|
12805 | });
|
12806 |
|
12807 | propertyIsEnumerableModule.f = $propertyIsEnumerable;
|
12808 | definePropertyModule.f = $defineProperty;
|
12809 | definePropertiesModule.f = $defineProperties;
|
12810 | getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
|
12811 | getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
|
12812 | getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;
|
12813 |
|
12814 | wrappedWellKnownSymbolModule.f = function (name) {
|
12815 | return wrap(wellKnownSymbol(name), name);
|
12816 | };
|
12817 |
|
12818 | if (DESCRIPTORS) {
|
12819 |
|
12820 | nativeDefineProperty(SymbolPrototype, 'description', {
|
12821 | configurable: true,
|
12822 | get: function description() {
|
12823 | return getInternalState(this).description;
|
12824 | }
|
12825 | });
|
12826 | if (!IS_PURE) {
|
12827 | defineBuiltIn(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
|
12828 | }
|
12829 | }
|
12830 | }
|
12831 |
|
12832 | $({ global: true, constructor: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
|
12833 | Symbol: $Symbol
|
12834 | });
|
12835 |
|
12836 | $forEach(objectKeys(WellKnownSymbolsStore), function (name) {
|
12837 | defineWellKnownSymbol(name);
|
12838 | });
|
12839 |
|
12840 | $({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
|
12841 | useSetter: function () { USE_SETTER = true; },
|
12842 | useSimple: function () { USE_SETTER = false; }
|
12843 | });
|
12844 |
|
12845 | $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
|
12846 |
|
12847 |
|
12848 | create: $create,
|
12849 |
|
12850 |
|
12851 | defineProperty: $defineProperty,
|
12852 |
|
12853 |
|
12854 | defineProperties: $defineProperties,
|
12855 |
|
12856 |
|
12857 | getOwnPropertyDescriptor: $getOwnPropertyDescriptor
|
12858 | });
|
12859 |
|
12860 | $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
|
12861 |
|
12862 |
|
12863 | getOwnPropertyNames: $getOwnPropertyNames
|
12864 | });
|
12865 |
|
12866 |
|
12867 |
|
12868 | defineSymbolToPrimitive();
|
12869 |
|
12870 |
|
12871 |
|
12872 | setToStringTag($Symbol, SYMBOL);
|
12873 |
|
12874 | hiddenKeys[HIDDEN] = true;
|
12875 |
|
12876 |
|
12877 | }),
|
12878 |
|
12879 | (function(module, exports, __webpack_require__) {
|
12880 |
|
12881 | var toAbsoluteIndex = __webpack_require__(119);
|
12882 | var lengthOfArrayLike = __webpack_require__(46);
|
12883 | var createProperty = __webpack_require__(106);
|
12884 |
|
12885 | var $Array = Array;
|
12886 | var max = Math.max;
|
12887 |
|
12888 | module.exports = function (O, start, end) {
|
12889 | var length = lengthOfArrayLike(O);
|
12890 | var k = toAbsoluteIndex(start, length);
|
12891 | var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
12892 | var result = $Array(max(fin - k, 0));
|
12893 | for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
|
12894 | result.length = n;
|
12895 | return result;
|
12896 | };
|
12897 |
|
12898 |
|
12899 | }),
|
12900 |
|
12901 | (function(module, exports, __webpack_require__) {
|
12902 |
|
12903 | var $ = __webpack_require__(0);
|
12904 | var getBuiltIn = __webpack_require__(18);
|
12905 | var hasOwn = __webpack_require__(14);
|
12906 | var toString = __webpack_require__(75);
|
12907 | var shared = __webpack_require__(73);
|
12908 | var NATIVE_SYMBOL_REGISTRY = __webpack_require__(236);
|
12909 |
|
12910 | var StringToSymbolRegistry = shared('string-to-symbol-registry');
|
12911 | var SymbolToStringRegistry = shared('symbol-to-string-registry');
|
12912 |
|
12913 |
|
12914 |
|
12915 | $({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, {
|
12916 | 'for': function (key) {
|
12917 | var string = toString(key);
|
12918 | if (hasOwn(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
|
12919 | var symbol = getBuiltIn('Symbol')(string);
|
12920 | StringToSymbolRegistry[string] = symbol;
|
12921 | SymbolToStringRegistry[symbol] = string;
|
12922 | return symbol;
|
12923 | }
|
12924 | });
|
12925 |
|
12926 |
|
12927 | }),
|
12928 |
|
12929 | (function(module, exports, __webpack_require__) {
|
12930 |
|
12931 | var $ = __webpack_require__(0);
|
12932 | var hasOwn = __webpack_require__(14);
|
12933 | var isSymbol = __webpack_require__(89);
|
12934 | var tryToString = __webpack_require__(72);
|
12935 | var shared = __webpack_require__(73);
|
12936 | var NATIVE_SYMBOL_REGISTRY = __webpack_require__(236);
|
12937 |
|
12938 | var SymbolToStringRegistry = shared('symbol-to-string-registry');
|
12939 |
|
12940 |
|
12941 |
|
12942 | $({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, {
|
12943 | keyFor: function keyFor(sym) {
|
12944 | if (!isSymbol(sym)) throw TypeError(tryToString(sym) + ' is not a symbol');
|
12945 | if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
|
12946 | }
|
12947 | });
|
12948 |
|
12949 |
|
12950 | }),
|
12951 |
|
12952 | (function(module, exports, __webpack_require__) {
|
12953 |
|
12954 | var $ = __webpack_require__(0);
|
12955 | var NATIVE_SYMBOL = __webpack_require__(57);
|
12956 | var fails = __webpack_require__(3);
|
12957 | var getOwnPropertySymbolsModule = __webpack_require__(97);
|
12958 | var toObject = __webpack_require__(34);
|
12959 |
|
12960 |
|
12961 |
|
12962 | var FORCED = !NATIVE_SYMBOL || fails(function () { getOwnPropertySymbolsModule.f(1); });
|
12963 |
|
12964 |
|
12965 |
|
12966 | $({ target: 'Object', stat: true, forced: FORCED }, {
|
12967 | getOwnPropertySymbols: function getOwnPropertySymbols(it) {
|
12968 | var $getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
12969 | return $getOwnPropertySymbols ? $getOwnPropertySymbols(toObject(it)) : [];
|
12970 | }
|
12971 | });
|
12972 |
|
12973 |
|
12974 | }),
|
12975 |
|
12976 | (function(module, exports, __webpack_require__) {
|
12977 |
|
12978 | var defineWellKnownSymbol = __webpack_require__(8);
|
12979 |
|
12980 |
|
12981 |
|
12982 | defineWellKnownSymbol('asyncIterator');
|
12983 |
|
12984 |
|
12985 | }),
|
12986 |
|
12987 | (function(module, exports) {
|
12988 |
|
12989 |
|
12990 |
|
12991 |
|
12992 | }),
|
12993 |
|
12994 | (function(module, exports, __webpack_require__) {
|
12995 |
|
12996 | var defineWellKnownSymbol = __webpack_require__(8);
|
12997 |
|
12998 |
|
12999 |
|
13000 | defineWellKnownSymbol('hasInstance');
|
13001 |
|
13002 |
|
13003 | }),
|
13004 |
|
13005 | (function(module, exports, __webpack_require__) {
|
13006 |
|
13007 | var defineWellKnownSymbol = __webpack_require__(8);
|
13008 |
|
13009 |
|
13010 |
|
13011 | defineWellKnownSymbol('isConcatSpreadable');
|
13012 |
|
13013 |
|
13014 | }),
|
13015 |
|
13016 | (function(module, exports, __webpack_require__) {
|
13017 |
|
13018 | var defineWellKnownSymbol = __webpack_require__(8);
|
13019 |
|
13020 |
|
13021 |
|
13022 | defineWellKnownSymbol('match');
|
13023 |
|
13024 |
|
13025 | }),
|
13026 |
|
13027 | (function(module, exports, __webpack_require__) {
|
13028 |
|
13029 | var defineWellKnownSymbol = __webpack_require__(8);
|
13030 |
|
13031 |
|
13032 |
|
13033 | defineWellKnownSymbol('matchAll');
|
13034 |
|
13035 |
|
13036 | }),
|
13037 |
|
13038 | (function(module, exports, __webpack_require__) {
|
13039 |
|
13040 | var defineWellKnownSymbol = __webpack_require__(8);
|
13041 |
|
13042 |
|
13043 |
|
13044 | defineWellKnownSymbol('replace');
|
13045 |
|
13046 |
|
13047 | }),
|
13048 |
|
13049 | (function(module, exports, __webpack_require__) {
|
13050 |
|
13051 | var defineWellKnownSymbol = __webpack_require__(8);
|
13052 |
|
13053 |
|
13054 |
|
13055 | defineWellKnownSymbol('search');
|
13056 |
|
13057 |
|
13058 | }),
|
13059 |
|
13060 | (function(module, exports, __webpack_require__) {
|
13061 |
|
13062 | var defineWellKnownSymbol = __webpack_require__(8);
|
13063 |
|
13064 |
|
13065 |
|
13066 | defineWellKnownSymbol('species');
|
13067 |
|
13068 |
|
13069 | }),
|
13070 |
|
13071 | (function(module, exports, __webpack_require__) {
|
13072 |
|
13073 | var defineWellKnownSymbol = __webpack_require__(8);
|
13074 |
|
13075 |
|
13076 |
|
13077 | defineWellKnownSymbol('split');
|
13078 |
|
13079 |
|
13080 | }),
|
13081 |
|
13082 | (function(module, exports, __webpack_require__) {
|
13083 |
|
13084 | var defineWellKnownSymbol = __webpack_require__(8);
|
13085 | var defineSymbolToPrimitive = __webpack_require__(235);
|
13086 |
|
13087 |
|
13088 |
|
13089 | defineWellKnownSymbol('toPrimitive');
|
13090 |
|
13091 |
|
13092 |
|
13093 | defineSymbolToPrimitive();
|
13094 |
|
13095 |
|
13096 | }),
|
13097 |
|
13098 | (function(module, exports, __webpack_require__) {
|
13099 |
|
13100 | var getBuiltIn = __webpack_require__(18);
|
13101 | var defineWellKnownSymbol = __webpack_require__(8);
|
13102 | var setToStringTag = __webpack_require__(49);
|
13103 |
|
13104 |
|
13105 |
|
13106 | defineWellKnownSymbol('toStringTag');
|
13107 |
|
13108 |
|
13109 |
|
13110 | setToStringTag(getBuiltIn('Symbol'), 'Symbol');
|
13111 |
|
13112 |
|
13113 | }),
|
13114 |
|
13115 | (function(module, exports, __webpack_require__) {
|
13116 |
|
13117 | var defineWellKnownSymbol = __webpack_require__(8);
|
13118 |
|
13119 |
|
13120 |
|
13121 | defineWellKnownSymbol('unscopables');
|
13122 |
|
13123 |
|
13124 | }),
|
13125 |
|
13126 | (function(module, exports, __webpack_require__) {
|
13127 |
|
13128 | var global = __webpack_require__(6);
|
13129 | var setToStringTag = __webpack_require__(49);
|
13130 |
|
13131 |
|
13132 |
|
13133 | setToStringTag(global.JSON, 'JSON', true);
|
13134 |
|
13135 |
|
13136 | }),
|
13137 |
|
13138 | (function(module, exports) {
|
13139 |
|
13140 |
|
13141 |
|
13142 |
|
13143 | }),
|
13144 |
|
13145 | (function(module, exports) {
|
13146 |
|
13147 |
|
13148 |
|
13149 |
|
13150 | }),
|
13151 |
|
13152 | (function(module, exports, __webpack_require__) {
|
13153 |
|
13154 | var defineWellKnownSymbol = __webpack_require__(8);
|
13155 |
|
13156 |
|
13157 |
|
13158 | defineWellKnownSymbol('asyncDispose');
|
13159 |
|
13160 |
|
13161 | }),
|
13162 |
|
13163 | (function(module, exports, __webpack_require__) {
|
13164 |
|
13165 | var defineWellKnownSymbol = __webpack_require__(8);
|
13166 |
|
13167 |
|
13168 |
|
13169 | defineWellKnownSymbol('dispose');
|
13170 |
|
13171 |
|
13172 | }),
|
13173 |
|
13174 | (function(module, exports, __webpack_require__) {
|
13175 |
|
13176 | var defineWellKnownSymbol = __webpack_require__(8);
|
13177 |
|
13178 |
|
13179 |
|
13180 | defineWellKnownSymbol('matcher');
|
13181 |
|
13182 |
|
13183 | }),
|
13184 |
|
13185 | (function(module, exports, __webpack_require__) {
|
13186 |
|
13187 | var defineWellKnownSymbol = __webpack_require__(8);
|
13188 |
|
13189 |
|
13190 |
|
13191 | defineWellKnownSymbol('metadataKey');
|
13192 |
|
13193 |
|
13194 | }),
|
13195 |
|
13196 | (function(module, exports, __webpack_require__) {
|
13197 |
|
13198 | var defineWellKnownSymbol = __webpack_require__(8);
|
13199 |
|
13200 |
|
13201 |
|
13202 | defineWellKnownSymbol('observable');
|
13203 |
|
13204 |
|
13205 | }),
|
13206 |
|
13207 | (function(module, exports, __webpack_require__) {
|
13208 |
|
13209 |
|
13210 | var defineWellKnownSymbol = __webpack_require__(8);
|
13211 |
|
13212 |
|
13213 |
|
13214 | defineWellKnownSymbol('metadata');
|
13215 |
|
13216 |
|
13217 | }),
|
13218 |
|
13219 | (function(module, exports, __webpack_require__) {
|
13220 |
|
13221 |
|
13222 | var defineWellKnownSymbol = __webpack_require__(8);
|
13223 |
|
13224 |
|
13225 |
|
13226 | defineWellKnownSymbol('patternMatch');
|
13227 |
|
13228 |
|
13229 | }),
|
13230 |
|
13231 | (function(module, exports, __webpack_require__) {
|
13232 |
|
13233 |
|
13234 | var defineWellKnownSymbol = __webpack_require__(8);
|
13235 |
|
13236 | defineWellKnownSymbol('replaceAll');
|
13237 |
|
13238 |
|
13239 | }),
|
13240 |
|
13241 | (function(module, exports, __webpack_require__) {
|
13242 |
|
13243 | module.exports = __webpack_require__(433);
|
13244 |
|
13245 | }),
|
13246 |
|
13247 | (function(module, exports, __webpack_require__) {
|
13248 |
|
13249 | module.exports = __webpack_require__(434);
|
13250 |
|
13251 |
|
13252 | }),
|
13253 |
|
13254 | (function(module, exports, __webpack_require__) {
|
13255 |
|
13256 | var parent = __webpack_require__(435);
|
13257 |
|
13258 | module.exports = parent;
|
13259 |
|
13260 |
|
13261 | }),
|
13262 |
|
13263 | (function(module, exports, __webpack_require__) {
|
13264 |
|
13265 | var parent = __webpack_require__(238);
|
13266 |
|
13267 | module.exports = parent;
|
13268 |
|
13269 |
|
13270 | }),
|
13271 |
|
13272 | (function(module, exports, __webpack_require__) {
|
13273 |
|
13274 | __webpack_require__(48);
|
13275 | __webpack_require__(60);
|
13276 | __webpack_require__(78);
|
13277 | __webpack_require__(237);
|
13278 | var WrappedWellKnownSymbolModule = __webpack_require__(144);
|
13279 |
|
13280 | module.exports = WrappedWellKnownSymbolModule.f('iterator');
|
13281 |
|
13282 |
|
13283 | }),
|
13284 |
|
13285 | (function(module, exports, __webpack_require__) {
|
13286 |
|
13287 | module.exports = __webpack_require__(438);
|
13288 |
|
13289 | }),
|
13290 |
|
13291 | (function(module, exports, __webpack_require__) {
|
13292 |
|
13293 | var parent = __webpack_require__(439);
|
13294 |
|
13295 | module.exports = parent;
|
13296 |
|
13297 |
|
13298 | }),
|
13299 |
|
13300 | (function(module, exports, __webpack_require__) {
|
13301 |
|
13302 | var isPrototypeOf = __webpack_require__(21);
|
13303 | var method = __webpack_require__(440);
|
13304 |
|
13305 | var ArrayPrototype = Array.prototype;
|
13306 |
|
13307 | module.exports = function (it) {
|
13308 | var own = it.filter;
|
13309 | return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.filter) ? method : own;
|
13310 | };
|
13311 |
|
13312 |
|
13313 | }),
|
13314 |
|
13315 | (function(module, exports, __webpack_require__) {
|
13316 |
|
13317 | __webpack_require__(441);
|
13318 | var entryVirtual = __webpack_require__(41);
|
13319 |
|
13320 | module.exports = entryVirtual('Array').filter;
|
13321 |
|
13322 |
|
13323 | }),
|
13324 |
|
13325 | (function(module, exports, __webpack_require__) {
|
13326 |
|
13327 | "use strict";
|
13328 |
|
13329 | var $ = __webpack_require__(0);
|
13330 | var $filter = __webpack_require__(66).filter;
|
13331 | var arrayMethodHasSpeciesSupport = __webpack_require__(107);
|
13332 |
|
13333 | var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
|
13334 |
|
13335 |
|
13336 |
|
13337 |
|
13338 | $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
13339 | filter: function filter(callbackfn /* , thisArg */) {
|
13340 | return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
13341 | }
|
13342 | });
|
13343 |
|
13344 |
|
13345 | }),
|
13346 |
|
13347 | (function(module, exports, __webpack_require__) {
|
13348 |
|
13349 | "use strict";
|
13350 |
|
13351 |
|
13352 |
|
13353 |
|
13354 |
|
13355 |
|
13356 |
|
13357 | var TimeoutError;
|
13358 |
|
13359 |
|
13360 |
|
13361 |
|
13362 |
|
13363 |
|
13364 |
|
13365 |
|
13366 |
|
13367 |
|
13368 | var timeout = module.exports.timeout = function(promise, timeoutMillis) {
|
13369 | var error = new TimeoutError(),
|
13370 | timeout;
|
13371 |
|
13372 | return Promise.race([
|
13373 | promise,
|
13374 | new Promise(function(resolve, reject) {
|
13375 | timeout = setTimeout(function() {
|
13376 | reject(error);
|
13377 | }, timeoutMillis);
|
13378 | }),
|
13379 | ]).then(function(v) {
|
13380 | clearTimeout(timeout);
|
13381 | return v;
|
13382 | }, function(err) {
|
13383 | clearTimeout(timeout);
|
13384 | throw err;
|
13385 | });
|
13386 | };
|
13387 |
|
13388 |
|
13389 |
|
13390 |
|
13391 | TimeoutError = module.exports.TimeoutError = function() {
|
13392 | Error.call(this)
|
13393 | this.stack = Error().stack
|
13394 | this.message = 'Timeout';
|
13395 | };
|
13396 |
|
13397 | TimeoutError.prototype = Object.create(Error.prototype);
|
13398 | TimeoutError.prototype.name = "TimeoutError";
|
13399 |
|
13400 |
|
13401 | }),
|
13402 |
|
13403 | (function(module, exports, __webpack_require__) {
|
13404 |
|
13405 | "use strict";
|
13406 |
|
13407 |
|
13408 | var _interopRequireDefault = __webpack_require__(1);
|
13409 |
|
13410 | var _slice = _interopRequireDefault(__webpack_require__(87));
|
13411 |
|
13412 | var _keys = _interopRequireDefault(__webpack_require__(55));
|
13413 |
|
13414 | var _concat = _interopRequireDefault(__webpack_require__(30));
|
13415 |
|
13416 | var _ = __webpack_require__(2);
|
13417 |
|
13418 | module.exports = function (AV) {
|
13419 | var eventSplitter = /\s+/;
|
13420 | var slice = (0, _slice.default)(Array.prototype);
|
13421 | |
13422 |
|
13423 |
|
13424 |
|
13425 |
|
13426 |
|
13427 |
|
13428 |
|
13429 |
|
13430 |
|
13431 |
|
13432 |
|
13433 |
|
13434 |
|
13435 |
|
13436 |
|
13437 |
|
13438 |
|
13439 |
|
13440 |
|
13441 |
|
13442 | AV.Events = {
|
13443 | |
13444 |
|
13445 |
|
13446 |
|
13447 | on: function on(events, callback, context) {
|
13448 | var calls, event, node, tail, list;
|
13449 |
|
13450 | if (!callback) {
|
13451 | return this;
|
13452 | }
|
13453 |
|
13454 | events = events.split(eventSplitter);
|
13455 | calls = this._callbacks || (this._callbacks = {});
|
13456 |
|
13457 |
|
13458 |
|
13459 | event = events.shift();
|
13460 |
|
13461 | while (event) {
|
13462 | list = calls[event];
|
13463 | node = list ? list.tail : {};
|
13464 | node.next = tail = {};
|
13465 | node.context = context;
|
13466 | node.callback = callback;
|
13467 | calls[event] = {
|
13468 | tail: tail,
|
13469 | next: list ? list.next : node
|
13470 | };
|
13471 | event = events.shift();
|
13472 | }
|
13473 |
|
13474 | return this;
|
13475 | },
|
13476 |
|
13477 | |
13478 |
|
13479 |
|
13480 |
|
13481 |
|
13482 | off: function off(events, callback, context) {
|
13483 | var event, calls, node, tail, cb, ctx;
|
13484 |
|
13485 | if (!(calls = this._callbacks)) {
|
13486 | return;
|
13487 | }
|
13488 |
|
13489 | if (!(events || callback || context)) {
|
13490 | delete this._callbacks;
|
13491 | return this;
|
13492 | }
|
13493 |
|
13494 |
|
13495 |
|
13496 | events = events ? events.split(eventSplitter) : (0, _keys.default)(_).call(_, calls);
|
13497 | event = events.shift();
|
13498 |
|
13499 | while (event) {
|
13500 | node = calls[event];
|
13501 | delete calls[event];
|
13502 |
|
13503 | if (!node || !(callback || context)) {
|
13504 | continue;
|
13505 | }
|
13506 |
|
13507 |
|
13508 | tail = node.tail;
|
13509 | node = node.next;
|
13510 |
|
13511 | while (node !== tail) {
|
13512 | cb = node.callback;
|
13513 | ctx = node.context;
|
13514 |
|
13515 | if (callback && cb !== callback || context && ctx !== context) {
|
13516 | this.on(event, cb, ctx);
|
13517 | }
|
13518 |
|
13519 | node = node.next;
|
13520 | }
|
13521 |
|
13522 | event = events.shift();
|
13523 | }
|
13524 |
|
13525 | return this;
|
13526 | },
|
13527 |
|
13528 | |
13529 |
|
13530 |
|
13531 |
|
13532 |
|
13533 |
|
13534 | trigger: function trigger(events) {
|
13535 | var event, node, calls, tail, args, all, rest;
|
13536 |
|
13537 | if (!(calls = this._callbacks)) {
|
13538 | return this;
|
13539 | }
|
13540 |
|
13541 | all = calls.all;
|
13542 | events = events.split(eventSplitter);
|
13543 | rest = slice.call(arguments, 1);
|
13544 |
|
13545 |
|
13546 | event = events.shift();
|
13547 |
|
13548 | while (event) {
|
13549 | node = calls[event];
|
13550 |
|
13551 | if (node) {
|
13552 | tail = node.tail;
|
13553 |
|
13554 | while ((node = node.next) !== tail) {
|
13555 | node.callback.apply(node.context || this, rest);
|
13556 | }
|
13557 | }
|
13558 |
|
13559 | node = all;
|
13560 |
|
13561 | if (node) {
|
13562 | var _context;
|
13563 |
|
13564 | tail = node.tail;
|
13565 | args = (0, _concat.default)(_context = [event]).call(_context, rest);
|
13566 |
|
13567 | while ((node = node.next) !== tail) {
|
13568 | node.callback.apply(node.context || this, args);
|
13569 | }
|
13570 | }
|
13571 |
|
13572 | event = events.shift();
|
13573 | }
|
13574 |
|
13575 | return this;
|
13576 | }
|
13577 | };
|
13578 | |
13579 |
|
13580 |
|
13581 |
|
13582 | AV.Events.bind = AV.Events.on;
|
13583 | |
13584 |
|
13585 |
|
13586 |
|
13587 | AV.Events.unbind = AV.Events.off;
|
13588 | };
|
13589 |
|
13590 | }),
|
13591 |
|
13592 | (function(module, exports, __webpack_require__) {
|
13593 |
|
13594 | "use strict";
|
13595 |
|
13596 |
|
13597 | var _interopRequireDefault = __webpack_require__(1);
|
13598 |
|
13599 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
13600 |
|
13601 | var _ = __webpack_require__(2);
|
13602 |
|
13603 |
|
13604 |
|
13605 | module.exports = function (AV) {
|
13606 | |
13607 |
|
13608 |
|
13609 |
|
13610 |
|
13611 |
|
13612 |
|
13613 |
|
13614 |
|
13615 |
|
13616 |
|
13617 |
|
13618 |
|
13619 |
|
13620 |
|
13621 |
|
13622 |
|
13623 |
|
13624 |
|
13625 |
|
13626 |
|
13627 |
|
13628 | AV.GeoPoint = function (arg1, arg2) {
|
13629 | if (_.isArray(arg1)) {
|
13630 | AV.GeoPoint._validate(arg1[0], arg1[1]);
|
13631 |
|
13632 | this.latitude = arg1[0];
|
13633 | this.longitude = arg1[1];
|
13634 | } else if (_.isObject(arg1)) {
|
13635 | AV.GeoPoint._validate(arg1.latitude, arg1.longitude);
|
13636 |
|
13637 | this.latitude = arg1.latitude;
|
13638 | this.longitude = arg1.longitude;
|
13639 | } else if (_.isNumber(arg1) && _.isNumber(arg2)) {
|
13640 | AV.GeoPoint._validate(arg1, arg2);
|
13641 |
|
13642 | this.latitude = arg1;
|
13643 | this.longitude = arg2;
|
13644 | } else {
|
13645 | this.latitude = 0;
|
13646 | this.longitude = 0;
|
13647 | }
|
13648 |
|
13649 |
|
13650 |
|
13651 | var self = this;
|
13652 |
|
13653 | if (this.__defineGetter__ && this.__defineSetter__) {
|
13654 |
|
13655 |
|
13656 | this._latitude = this.latitude;
|
13657 | this._longitude = this.longitude;
|
13658 |
|
13659 | this.__defineGetter__('latitude', function () {
|
13660 | return self._latitude;
|
13661 | });
|
13662 |
|
13663 | this.__defineGetter__('longitude', function () {
|
13664 | return self._longitude;
|
13665 | });
|
13666 |
|
13667 | this.__defineSetter__('latitude', function (val) {
|
13668 | AV.GeoPoint._validate(val, self.longitude);
|
13669 |
|
13670 | self._latitude = val;
|
13671 | });
|
13672 |
|
13673 | this.__defineSetter__('longitude', function (val) {
|
13674 | AV.GeoPoint._validate(self.latitude, val);
|
13675 |
|
13676 | self._longitude = val;
|
13677 | });
|
13678 | }
|
13679 | };
|
13680 | |
13681 |
|
13682 |
|
13683 |
|
13684 |
|
13685 |
|
13686 |
|
13687 |
|
13688 | |
13689 |
|
13690 |
|
13691 |
|
13692 |
|
13693 |
|
13694 | AV.GeoPoint._validate = function (latitude, longitude) {
|
13695 | if (latitude < -90.0) {
|
13696 | throw new Error('AV.GeoPoint latitude ' + latitude + ' < -90.0.');
|
13697 | }
|
13698 |
|
13699 | if (latitude > 90.0) {
|
13700 | throw new Error('AV.GeoPoint latitude ' + latitude + ' > 90.0.');
|
13701 | }
|
13702 |
|
13703 | if (longitude < -180.0) {
|
13704 | throw new Error('AV.GeoPoint longitude ' + longitude + ' < -180.0.');
|
13705 | }
|
13706 |
|
13707 | if (longitude > 180.0) {
|
13708 | throw new Error('AV.GeoPoint longitude ' + longitude + ' > 180.0.');
|
13709 | }
|
13710 | };
|
13711 | |
13712 |
|
13713 |
|
13714 |
|
13715 |
|
13716 |
|
13717 | AV.GeoPoint.current = function () {
|
13718 | return new _promise.default(function (resolve, reject) {
|
13719 | navigator.geolocation.getCurrentPosition(function (location) {
|
13720 | resolve(new AV.GeoPoint({
|
13721 | latitude: location.coords.latitude,
|
13722 | longitude: location.coords.longitude
|
13723 | }));
|
13724 | }, reject);
|
13725 | });
|
13726 | };
|
13727 |
|
13728 | _.extend(AV.GeoPoint.prototype,
|
13729 |
|
13730 | {
|
13731 | |
13732 |
|
13733 |
|
13734 |
|
13735 | toJSON: function toJSON() {
|
13736 | AV.GeoPoint._validate(this.latitude, this.longitude);
|
13737 |
|
13738 | return {
|
13739 | __type: 'GeoPoint',
|
13740 | latitude: this.latitude,
|
13741 | longitude: this.longitude
|
13742 | };
|
13743 | },
|
13744 |
|
13745 | |
13746 |
|
13747 |
|
13748 |
|
13749 |
|
13750 | radiansTo: function radiansTo(point) {
|
13751 | var d2r = Math.PI / 180.0;
|
13752 | var lat1rad = this.latitude * d2r;
|
13753 | var long1rad = this.longitude * d2r;
|
13754 | var lat2rad = point.latitude * d2r;
|
13755 | var long2rad = point.longitude * d2r;
|
13756 | var deltaLat = lat1rad - lat2rad;
|
13757 | var deltaLong = long1rad - long2rad;
|
13758 | var sinDeltaLatDiv2 = Math.sin(deltaLat / 2);
|
13759 | var sinDeltaLongDiv2 = Math.sin(deltaLong / 2);
|
13760 |
|
13761 | var a = sinDeltaLatDiv2 * sinDeltaLatDiv2 + Math.cos(lat1rad) * Math.cos(lat2rad) * sinDeltaLongDiv2 * sinDeltaLongDiv2;
|
13762 | a = Math.min(1.0, a);
|
13763 | return 2 * Math.asin(Math.sqrt(a));
|
13764 | },
|
13765 |
|
13766 | |
13767 |
|
13768 |
|
13769 |
|
13770 |
|
13771 | kilometersTo: function kilometersTo(point) {
|
13772 | return this.radiansTo(point) * 6371.0;
|
13773 | },
|
13774 |
|
13775 | |
13776 |
|
13777 |
|
13778 |
|
13779 |
|
13780 | milesTo: function milesTo(point) {
|
13781 | return this.radiansTo(point) * 3958.8;
|
13782 | }
|
13783 | });
|
13784 | };
|
13785 |
|
13786 | }),
|
13787 |
|
13788 | (function(module, exports, __webpack_require__) {
|
13789 |
|
13790 | "use strict";
|
13791 |
|
13792 |
|
13793 | var _ = __webpack_require__(2);
|
13794 |
|
13795 | module.exports = function (AV) {
|
13796 | var PUBLIC_KEY = '*';
|
13797 | |
13798 |
|
13799 |
|
13800 |
|
13801 |
|
13802 |
|
13803 |
|
13804 |
|
13805 |
|
13806 |
|
13807 |
|
13808 |
|
13809 |
|
13810 |
|
13811 |
|
13812 | AV.ACL = function (arg1) {
|
13813 | var self = this;
|
13814 | self.permissionsById = {};
|
13815 |
|
13816 | if (_.isObject(arg1)) {
|
13817 | if (arg1 instanceof AV.User) {
|
13818 | self.setReadAccess(arg1, true);
|
13819 | self.setWriteAccess(arg1, true);
|
13820 | } else {
|
13821 | if (_.isFunction(arg1)) {
|
13822 | throw new Error('AV.ACL() called with a function. Did you forget ()?');
|
13823 | }
|
13824 |
|
13825 | AV._objectEach(arg1, function (accessList, userId) {
|
13826 | if (!_.isString(userId)) {
|
13827 | throw new Error('Tried to create an ACL with an invalid userId.');
|
13828 | }
|
13829 |
|
13830 | self.permissionsById[userId] = {};
|
13831 |
|
13832 | AV._objectEach(accessList, function (allowed, permission) {
|
13833 | if (permission !== 'read' && permission !== 'write') {
|
13834 | throw new Error('Tried to create an ACL with an invalid permission type.');
|
13835 | }
|
13836 |
|
13837 | if (!_.isBoolean(allowed)) {
|
13838 | throw new Error('Tried to create an ACL with an invalid permission value.');
|
13839 | }
|
13840 |
|
13841 | self.permissionsById[userId][permission] = allowed;
|
13842 | });
|
13843 | });
|
13844 | }
|
13845 | }
|
13846 | };
|
13847 | |
13848 |
|
13849 |
|
13850 |
|
13851 |
|
13852 |
|
13853 | AV.ACL.prototype.toJSON = function () {
|
13854 | return _.clone(this.permissionsById);
|
13855 | };
|
13856 |
|
13857 | AV.ACL.prototype._setAccess = function (accessType, userId, allowed) {
|
13858 | if (userId instanceof AV.User) {
|
13859 | userId = userId.id;
|
13860 | } else if (userId instanceof AV.Role) {
|
13861 | userId = 'role:' + userId.getName();
|
13862 | }
|
13863 |
|
13864 | if (!_.isString(userId)) {
|
13865 | throw new Error('userId must be a string.');
|
13866 | }
|
13867 |
|
13868 | if (!_.isBoolean(allowed)) {
|
13869 | throw new Error('allowed must be either true or false.');
|
13870 | }
|
13871 |
|
13872 | var permissions = this.permissionsById[userId];
|
13873 |
|
13874 | if (!permissions) {
|
13875 | if (!allowed) {
|
13876 |
|
13877 | return;
|
13878 | } else {
|
13879 | permissions = {};
|
13880 | this.permissionsById[userId] = permissions;
|
13881 | }
|
13882 | }
|
13883 |
|
13884 | if (allowed) {
|
13885 | this.permissionsById[userId][accessType] = true;
|
13886 | } else {
|
13887 | delete permissions[accessType];
|
13888 |
|
13889 | if (_.isEmpty(permissions)) {
|
13890 | delete this.permissionsById[userId];
|
13891 | }
|
13892 | }
|
13893 | };
|
13894 |
|
13895 | AV.ACL.prototype._getAccess = function (accessType, userId) {
|
13896 | if (userId instanceof AV.User) {
|
13897 | userId = userId.id;
|
13898 | } else if (userId instanceof AV.Role) {
|
13899 | userId = 'role:' + userId.getName();
|
13900 | }
|
13901 |
|
13902 | var permissions = this.permissionsById[userId];
|
13903 |
|
13904 | if (!permissions) {
|
13905 | return false;
|
13906 | }
|
13907 |
|
13908 | return permissions[accessType] ? true : false;
|
13909 | };
|
13910 | |
13911 |
|
13912 |
|
13913 |
|
13914 |
|
13915 |
|
13916 |
|
13917 | AV.ACL.prototype.setReadAccess = function (userId, allowed) {
|
13918 | this._setAccess('read', userId, allowed);
|
13919 | };
|
13920 | |
13921 |
|
13922 |
|
13923 |
|
13924 |
|
13925 |
|
13926 |
|
13927 |
|
13928 |
|
13929 |
|
13930 | AV.ACL.prototype.getReadAccess = function (userId) {
|
13931 | return this._getAccess('read', userId);
|
13932 | };
|
13933 | |
13934 |
|
13935 |
|
13936 |
|
13937 |
|
13938 |
|
13939 |
|
13940 | AV.ACL.prototype.setWriteAccess = function (userId, allowed) {
|
13941 | this._setAccess('write', userId, allowed);
|
13942 | };
|
13943 | |
13944 |
|
13945 |
|
13946 |
|
13947 |
|
13948 |
|
13949 |
|
13950 |
|
13951 |
|
13952 |
|
13953 | AV.ACL.prototype.getWriteAccess = function (userId) {
|
13954 | return this._getAccess('write', userId);
|
13955 | };
|
13956 | |
13957 |
|
13958 |
|
13959 |
|
13960 |
|
13961 |
|
13962 | AV.ACL.prototype.setPublicReadAccess = function (allowed) {
|
13963 | this.setReadAccess(PUBLIC_KEY, allowed);
|
13964 | };
|
13965 | |
13966 |
|
13967 |
|
13968 |
|
13969 |
|
13970 |
|
13971 | AV.ACL.prototype.getPublicReadAccess = function () {
|
13972 | return this.getReadAccess(PUBLIC_KEY);
|
13973 | };
|
13974 | |
13975 |
|
13976 |
|
13977 |
|
13978 |
|
13979 |
|
13980 | AV.ACL.prototype.setPublicWriteAccess = function (allowed) {
|
13981 | this.setWriteAccess(PUBLIC_KEY, allowed);
|
13982 | };
|
13983 | |
13984 |
|
13985 |
|
13986 |
|
13987 |
|
13988 |
|
13989 | AV.ACL.prototype.getPublicWriteAccess = function () {
|
13990 | return this.getWriteAccess(PUBLIC_KEY);
|
13991 | };
|
13992 | |
13993 |
|
13994 |
|
13995 |
|
13996 |
|
13997 |
|
13998 |
|
13999 |
|
14000 |
|
14001 |
|
14002 |
|
14003 | AV.ACL.prototype.getRoleReadAccess = function (role) {
|
14004 | if (role instanceof AV.Role) {
|
14005 |
|
14006 | role = role.getName();
|
14007 | }
|
14008 |
|
14009 | if (_.isString(role)) {
|
14010 | return this.getReadAccess('role:' + role);
|
14011 | }
|
14012 |
|
14013 | throw new Error('role must be a AV.Role or a String');
|
14014 | };
|
14015 | |
14016 |
|
14017 |
|
14018 |
|
14019 |
|
14020 |
|
14021 |
|
14022 |
|
14023 |
|
14024 |
|
14025 |
|
14026 | AV.ACL.prototype.getRoleWriteAccess = function (role) {
|
14027 | if (role instanceof AV.Role) {
|
14028 |
|
14029 | role = role.getName();
|
14030 | }
|
14031 |
|
14032 | if (_.isString(role)) {
|
14033 | return this.getWriteAccess('role:' + role);
|
14034 | }
|
14035 |
|
14036 | throw new Error('role must be a AV.Role or a String');
|
14037 | };
|
14038 | |
14039 |
|
14040 |
|
14041 |
|
14042 |
|
14043 |
|
14044 |
|
14045 |
|
14046 |
|
14047 |
|
14048 | AV.ACL.prototype.setRoleReadAccess = function (role, allowed) {
|
14049 | if (role instanceof AV.Role) {
|
14050 |
|
14051 | role = role.getName();
|
14052 | }
|
14053 |
|
14054 | if (_.isString(role)) {
|
14055 | this.setReadAccess('role:' + role, allowed);
|
14056 | return;
|
14057 | }
|
14058 |
|
14059 | throw new Error('role must be a AV.Role or a String');
|
14060 | };
|
14061 | |
14062 |
|
14063 |
|
14064 |
|
14065 |
|
14066 |
|
14067 |
|
14068 |
|
14069 |
|
14070 |
|
14071 | AV.ACL.prototype.setRoleWriteAccess = function (role, allowed) {
|
14072 | if (role instanceof AV.Role) {
|
14073 |
|
14074 | role = role.getName();
|
14075 | }
|
14076 |
|
14077 | if (_.isString(role)) {
|
14078 | this.setWriteAccess('role:' + role, allowed);
|
14079 | return;
|
14080 | }
|
14081 |
|
14082 | throw new Error('role must be a AV.Role or a String');
|
14083 | };
|
14084 | };
|
14085 |
|
14086 | }),
|
14087 |
|
14088 | (function(module, exports, __webpack_require__) {
|
14089 |
|
14090 | "use strict";
|
14091 |
|
14092 |
|
14093 | var _interopRequireDefault = __webpack_require__(1);
|
14094 |
|
14095 | var _concat = _interopRequireDefault(__webpack_require__(30));
|
14096 |
|
14097 | var _find = _interopRequireDefault(__webpack_require__(110));
|
14098 |
|
14099 | var _indexOf = _interopRequireDefault(__webpack_require__(86));
|
14100 |
|
14101 | var _map = _interopRequireDefault(__webpack_require__(42));
|
14102 |
|
14103 | var _ = __webpack_require__(2);
|
14104 |
|
14105 | module.exports = function (AV) {
|
14106 | |
14107 |
|
14108 |
|
14109 |
|
14110 |
|
14111 |
|
14112 |
|
14113 |
|
14114 |
|
14115 |
|
14116 |
|
14117 |
|
14118 |
|
14119 | AV.Op = function () {
|
14120 | this._initialize.apply(this, arguments);
|
14121 | };
|
14122 |
|
14123 | _.extend(AV.Op.prototype,
|
14124 |
|
14125 | {
|
14126 | _initialize: function _initialize() {}
|
14127 | });
|
14128 |
|
14129 | _.extend(AV.Op, {
|
14130 | |
14131 |
|
14132 |
|
14133 |
|
14134 | _extend: AV._extend,
|
14135 |
|
14136 | _opDecoderMap: {},
|
14137 |
|
14138 | |
14139 |
|
14140 |
|
14141 |
|
14142 |
|
14143 | _registerDecoder: function _registerDecoder(opName, decoder) {
|
14144 | AV.Op._opDecoderMap[opName] = decoder;
|
14145 | },
|
14146 |
|
14147 | |
14148 |
|
14149 |
|
14150 |
|
14151 | _decode: function _decode(json) {
|
14152 | var decoder = AV.Op._opDecoderMap[json.__op];
|
14153 |
|
14154 | if (decoder) {
|
14155 | return decoder(json);
|
14156 | } else {
|
14157 | return undefined;
|
14158 | }
|
14159 | }
|
14160 | });
|
14161 | |
14162 |
|
14163 |
|
14164 |
|
14165 |
|
14166 | AV.Op._registerDecoder('Batch', function (json) {
|
14167 | var op = null;
|
14168 |
|
14169 | AV._arrayEach(json.ops, function (nextOp) {
|
14170 | nextOp = AV.Op._decode(nextOp);
|
14171 | op = nextOp._mergeWithPrevious(op);
|
14172 | });
|
14173 |
|
14174 | return op;
|
14175 | });
|
14176 | |
14177 |
|
14178 |
|
14179 |
|
14180 |
|
14181 |
|
14182 |
|
14183 |
|
14184 |
|
14185 | AV.Op.Set = AV.Op._extend(
|
14186 |
|
14187 | {
|
14188 | _initialize: function _initialize(value) {
|
14189 | this._value = value;
|
14190 | },
|
14191 |
|
14192 | |
14193 |
|
14194 |
|
14195 | value: function value() {
|
14196 | return this._value;
|
14197 | },
|
14198 |
|
14199 | |
14200 |
|
14201 |
|
14202 |
|
14203 | toJSON: function toJSON() {
|
14204 | return AV._encode(this.value());
|
14205 | },
|
14206 | _mergeWithPrevious: function _mergeWithPrevious(previous) {
|
14207 | return this;
|
14208 | },
|
14209 | _estimate: function _estimate(oldValue) {
|
14210 | return this.value();
|
14211 | }
|
14212 | });
|
14213 | |
14214 |
|
14215 |
|
14216 |
|
14217 |
|
14218 |
|
14219 | AV.Op._UNSET = {};
|
14220 | |
14221 |
|
14222 |
|
14223 |
|
14224 |
|
14225 |
|
14226 |
|
14227 | AV.Op.Unset = AV.Op._extend(
|
14228 |
|
14229 | {
|
14230 | |
14231 |
|
14232 |
|
14233 |
|
14234 | toJSON: function toJSON() {
|
14235 | return {
|
14236 | __op: 'Delete'
|
14237 | };
|
14238 | },
|
14239 | _mergeWithPrevious: function _mergeWithPrevious(previous) {
|
14240 | return this;
|
14241 | },
|
14242 | _estimate: function _estimate(oldValue) {
|
14243 | return AV.Op._UNSET;
|
14244 | }
|
14245 | });
|
14246 |
|
14247 | AV.Op._registerDecoder('Delete', function (json) {
|
14248 | return new AV.Op.Unset();
|
14249 | });
|
14250 | |
14251 |
|
14252 |
|
14253 |
|
14254 |
|
14255 |
|
14256 |
|
14257 |
|
14258 | AV.Op.Increment = AV.Op._extend(
|
14259 |
|
14260 | {
|
14261 | _initialize: function _initialize(amount) {
|
14262 | this._amount = amount;
|
14263 | },
|
14264 |
|
14265 | |
14266 |
|
14267 |
|
14268 |
|
14269 | amount: function amount() {
|
14270 | return this._amount;
|
14271 | },
|
14272 |
|
14273 | |
14274 |
|
14275 |
|
14276 |
|
14277 | toJSON: function toJSON() {
|
14278 | return {
|
14279 | __op: 'Increment',
|
14280 | amount: this._amount
|
14281 | };
|
14282 | },
|
14283 | _mergeWithPrevious: function _mergeWithPrevious(previous) {
|
14284 | if (!previous) {
|
14285 | return this;
|
14286 | } else if (previous instanceof AV.Op.Unset) {
|
14287 | return new AV.Op.Set(this.amount());
|
14288 | } else if (previous instanceof AV.Op.Set) {
|
14289 | return new AV.Op.Set(previous.value() + this.amount());
|
14290 | } else if (previous instanceof AV.Op.Increment) {
|
14291 | return new AV.Op.Increment(this.amount() + previous.amount());
|
14292 | } else {
|
14293 | throw new Error('Op is invalid after previous op.');
|
14294 | }
|
14295 | },
|
14296 | _estimate: function _estimate(oldValue) {
|
14297 | if (!oldValue) {
|
14298 | return this.amount();
|
14299 | }
|
14300 |
|
14301 | return oldValue + this.amount();
|
14302 | }
|
14303 | });
|
14304 |
|
14305 | AV.Op._registerDecoder('Increment', function (json) {
|
14306 | return new AV.Op.Increment(json.amount);
|
14307 | });
|
14308 | |
14309 |
|
14310 |
|
14311 |
|
14312 |
|
14313 |
|
14314 |
|
14315 |
|
14316 | AV.Op.BitAnd = AV.Op._extend(
|
14317 |
|
14318 | {
|
14319 | _initialize: function _initialize(value) {
|
14320 | this._value = value;
|
14321 | },
|
14322 | value: function value() {
|
14323 | return this._value;
|
14324 | },
|
14325 |
|
14326 | |
14327 |
|
14328 |
|
14329 |
|
14330 | toJSON: function toJSON() {
|
14331 | return {
|
14332 | __op: 'BitAnd',
|
14333 | value: this.value()
|
14334 | };
|
14335 | },
|
14336 | _mergeWithPrevious: function _mergeWithPrevious(previous) {
|
14337 | if (!previous) {
|
14338 | return this;
|
14339 | } else if (previous instanceof AV.Op.Unset) {
|
14340 | return new AV.Op.Set(0);
|
14341 | } else if (previous instanceof AV.Op.Set) {
|
14342 | return new AV.Op.Set(previous.value() & this.value());
|
14343 | } else {
|
14344 | throw new Error('Op is invalid after previous op.');
|
14345 | }
|
14346 | },
|
14347 | _estimate: function _estimate(oldValue) {
|
14348 | return oldValue & this.value();
|
14349 | }
|
14350 | });
|
14351 |
|
14352 | AV.Op._registerDecoder('BitAnd', function (json) {
|
14353 | return new AV.Op.BitAnd(json.value);
|
14354 | });
|
14355 | |
14356 |
|
14357 |
|
14358 |
|
14359 |
|
14360 |
|
14361 |
|
14362 |
|
14363 | AV.Op.BitOr = AV.Op._extend(
|
14364 |
|
14365 | {
|
14366 | _initialize: function _initialize(value) {
|
14367 | this._value = value;
|
14368 | },
|
14369 | value: function value() {
|
14370 | return this._value;
|
14371 | },
|
14372 |
|
14373 | |
14374 |
|
14375 |
|
14376 |
|
14377 | toJSON: function toJSON() {
|
14378 | return {
|
14379 | __op: 'BitOr',
|
14380 | value: this.value()
|
14381 | };
|
14382 | },
|
14383 | _mergeWithPrevious: function _mergeWithPrevious(previous) {
|
14384 | if (!previous) {
|
14385 | return this;
|
14386 | } else if (previous instanceof AV.Op.Unset) {
|
14387 | return new AV.Op.Set(this.value());
|
14388 | } else if (previous instanceof AV.Op.Set) {
|
14389 | return new AV.Op.Set(previous.value() | this.value());
|
14390 | } else {
|
14391 | throw new Error('Op is invalid after previous op.');
|
14392 | }
|
14393 | },
|
14394 | _estimate: function _estimate(oldValue) {
|
14395 | return oldValue | this.value();
|
14396 | }
|
14397 | });
|
14398 |
|
14399 | AV.Op._registerDecoder('BitOr', function (json) {
|
14400 | return new AV.Op.BitOr(json.value);
|
14401 | });
|
14402 | |
14403 |
|
14404 |
|
14405 |
|
14406 |
|
14407 |
|
14408 |
|
14409 |
|
14410 | AV.Op.BitXor = AV.Op._extend(
|
14411 |
|
14412 | {
|
14413 | _initialize: function _initialize(value) {
|
14414 | this._value = value;
|
14415 | },
|
14416 | value: function value() {
|
14417 | return this._value;
|
14418 | },
|
14419 |
|
14420 | |
14421 |
|
14422 |
|
14423 |
|
14424 | toJSON: function toJSON() {
|
14425 | return {
|
14426 | __op: 'BitXor',
|
14427 | value: this.value()
|
14428 | };
|
14429 | },
|
14430 | _mergeWithPrevious: function _mergeWithPrevious(previous) {
|
14431 | if (!previous) {
|
14432 | return this;
|
14433 | } else if (previous instanceof AV.Op.Unset) {
|
14434 | return new AV.Op.Set(this.value());
|
14435 | } else if (previous instanceof AV.Op.Set) {
|
14436 | return new AV.Op.Set(previous.value() ^ this.value());
|
14437 | } else {
|
14438 | throw new Error('Op is invalid after previous op.');
|
14439 | }
|
14440 | },
|
14441 | _estimate: function _estimate(oldValue) {
|
14442 | return oldValue ^ this.value();
|
14443 | }
|
14444 | });
|
14445 |
|
14446 | AV.Op._registerDecoder('BitXor', function (json) {
|
14447 | return new AV.Op.BitXor(json.value);
|
14448 | });
|
14449 | |
14450 |
|
14451 |
|
14452 |
|
14453 |
|
14454 |
|
14455 |
|
14456 |
|
14457 | AV.Op.Add = AV.Op._extend(
|
14458 |
|
14459 | {
|
14460 | _initialize: function _initialize(objects) {
|
14461 | this._objects = objects;
|
14462 | },
|
14463 |
|
14464 | |
14465 |
|
14466 |
|
14467 |
|
14468 | objects: function objects() {
|
14469 | return this._objects;
|
14470 | },
|
14471 |
|
14472 | |
14473 |
|
14474 |
|
14475 |
|
14476 | toJSON: function toJSON() {
|
14477 | return {
|
14478 | __op: 'Add',
|
14479 | objects: AV._encode(this.objects())
|
14480 | };
|
14481 | },
|
14482 | _mergeWithPrevious: function _mergeWithPrevious(previous) {
|
14483 | if (!previous) {
|
14484 | return this;
|
14485 | } else if (previous instanceof AV.Op.Unset) {
|
14486 | return new AV.Op.Set(this.objects());
|
14487 | } else if (previous instanceof AV.Op.Set) {
|
14488 | return new AV.Op.Set(this._estimate(previous.value()));
|
14489 | } else if (previous instanceof AV.Op.Add) {
|
14490 | var _context;
|
14491 |
|
14492 | return new AV.Op.Add((0, _concat.default)(_context = previous.objects()).call(_context, this.objects()));
|
14493 | } else {
|
14494 | throw new Error('Op is invalid after previous op.');
|
14495 | }
|
14496 | },
|
14497 | _estimate: function _estimate(oldValue) {
|
14498 | if (!oldValue) {
|
14499 | return _.clone(this.objects());
|
14500 | } else {
|
14501 | return (0, _concat.default)(oldValue).call(oldValue, this.objects());
|
14502 | }
|
14503 | }
|
14504 | });
|
14505 |
|
14506 | AV.Op._registerDecoder('Add', function (json) {
|
14507 | return new AV.Op.Add(AV._decode(json.objects));
|
14508 | });
|
14509 | |
14510 |
|
14511 |
|
14512 |
|
14513 |
|
14514 |
|
14515 |
|
14516 |
|
14517 |
|
14518 | AV.Op.AddUnique = AV.Op._extend(
|
14519 |
|
14520 | {
|
14521 | _initialize: function _initialize(objects) {
|
14522 | this._objects = _.uniq(objects);
|
14523 | },
|
14524 |
|
14525 | |
14526 |
|
14527 |
|
14528 |
|
14529 | objects: function objects() {
|
14530 | return this._objects;
|
14531 | },
|
14532 |
|
14533 | |
14534 |
|
14535 |
|
14536 |
|
14537 | toJSON: function toJSON() {
|
14538 | return {
|
14539 | __op: 'AddUnique',
|
14540 | objects: AV._encode(this.objects())
|
14541 | };
|
14542 | },
|
14543 | _mergeWithPrevious: function _mergeWithPrevious(previous) {
|
14544 | if (!previous) {
|
14545 | return this;
|
14546 | } else if (previous instanceof AV.Op.Unset) {
|
14547 | return new AV.Op.Set(this.objects());
|
14548 | } else if (previous instanceof AV.Op.Set) {
|
14549 | return new AV.Op.Set(this._estimate(previous.value()));
|
14550 | } else if (previous instanceof AV.Op.AddUnique) {
|
14551 | return new AV.Op.AddUnique(this._estimate(previous.objects()));
|
14552 | } else {
|
14553 | throw new Error('Op is invalid after previous op.');
|
14554 | }
|
14555 | },
|
14556 | _estimate: function _estimate(oldValue) {
|
14557 | if (!oldValue) {
|
14558 | return _.clone(this.objects());
|
14559 | } else {
|
14560 |
|
14561 |
|
14562 |
|
14563 | var newValue = _.clone(oldValue);
|
14564 |
|
14565 | AV._arrayEach(this.objects(), function (obj) {
|
14566 | if (obj instanceof AV.Object && obj.id) {
|
14567 | var matchingObj = (0, _find.default)(_).call(_, newValue, function (anObj) {
|
14568 | return anObj instanceof AV.Object && anObj.id === obj.id;
|
14569 | });
|
14570 |
|
14571 | if (!matchingObj) {
|
14572 | newValue.push(obj);
|
14573 | } else {
|
14574 | var index = (0, _indexOf.default)(_).call(_, newValue, matchingObj);
|
14575 | newValue[index] = obj;
|
14576 | }
|
14577 | } else if (!_.contains(newValue, obj)) {
|
14578 | newValue.push(obj);
|
14579 | }
|
14580 | });
|
14581 |
|
14582 | return newValue;
|
14583 | }
|
14584 | }
|
14585 | });
|
14586 |
|
14587 | AV.Op._registerDecoder('AddUnique', function (json) {
|
14588 | return new AV.Op.AddUnique(AV._decode(json.objects));
|
14589 | });
|
14590 | |
14591 |
|
14592 |
|
14593 |
|
14594 |
|
14595 |
|
14596 |
|
14597 |
|
14598 | AV.Op.Remove = AV.Op._extend(
|
14599 |
|
14600 | {
|
14601 | _initialize: function _initialize(objects) {
|
14602 | this._objects = _.uniq(objects);
|
14603 | },
|
14604 |
|
14605 | |
14606 |
|
14607 |
|
14608 |
|
14609 | objects: function objects() {
|
14610 | return this._objects;
|
14611 | },
|
14612 |
|
14613 | |
14614 |
|
14615 |
|
14616 |
|
14617 | toJSON: function toJSON() {
|
14618 | return {
|
14619 | __op: 'Remove',
|
14620 | objects: AV._encode(this.objects())
|
14621 | };
|
14622 | },
|
14623 | _mergeWithPrevious: function _mergeWithPrevious(previous) {
|
14624 | if (!previous) {
|
14625 | return this;
|
14626 | } else if (previous instanceof AV.Op.Unset) {
|
14627 | return previous;
|
14628 | } else if (previous instanceof AV.Op.Set) {
|
14629 | return new AV.Op.Set(this._estimate(previous.value()));
|
14630 | } else if (previous instanceof AV.Op.Remove) {
|
14631 | return new AV.Op.Remove(_.union(previous.objects(), this.objects()));
|
14632 | } else {
|
14633 | throw new Error('Op is invalid after previous op.');
|
14634 | }
|
14635 | },
|
14636 | _estimate: function _estimate(oldValue) {
|
14637 | if (!oldValue) {
|
14638 | return [];
|
14639 | } else {
|
14640 | var newValue = _.difference(oldValue, this.objects());
|
14641 |
|
14642 |
|
14643 | AV._arrayEach(this.objects(), function (obj) {
|
14644 | if (obj instanceof AV.Object && obj.id) {
|
14645 | newValue = _.reject(newValue, function (other) {
|
14646 | return other instanceof AV.Object && other.id === obj.id;
|
14647 | });
|
14648 | }
|
14649 | });
|
14650 |
|
14651 | return newValue;
|
14652 | }
|
14653 | }
|
14654 | });
|
14655 |
|
14656 | AV.Op._registerDecoder('Remove', function (json) {
|
14657 | return new AV.Op.Remove(AV._decode(json.objects));
|
14658 | });
|
14659 | |
14660 |
|
14661 |
|
14662 |
|
14663 |
|
14664 |
|
14665 |
|
14666 |
|
14667 |
|
14668 | AV.Op.Relation = AV.Op._extend(
|
14669 |
|
14670 | {
|
14671 | _initialize: function _initialize(adds, removes) {
|
14672 | this._targetClassName = null;
|
14673 | var self = this;
|
14674 |
|
14675 | var pointerToId = function pointerToId(object) {
|
14676 | if (object instanceof AV.Object) {
|
14677 | if (!object.id) {
|
14678 | throw new Error("You can't add an unsaved AV.Object to a relation.");
|
14679 | }
|
14680 |
|
14681 | if (!self._targetClassName) {
|
14682 | self._targetClassName = object.className;
|
14683 | }
|
14684 |
|
14685 | if (self._targetClassName !== object.className) {
|
14686 | throw new Error('Tried to create a AV.Relation with 2 different types: ' + self._targetClassName + ' and ' + object.className + '.');
|
14687 | }
|
14688 |
|
14689 | return object.id;
|
14690 | }
|
14691 |
|
14692 | return object;
|
14693 | };
|
14694 |
|
14695 | this.relationsToAdd = _.uniq((0, _map.default)(_).call(_, adds, pointerToId));
|
14696 | this.relationsToRemove = _.uniq((0, _map.default)(_).call(_, removes, pointerToId));
|
14697 | },
|
14698 |
|
14699 | |
14700 |
|
14701 |
|
14702 |
|
14703 |
|
14704 | added: function added() {
|
14705 | var self = this;
|
14706 | return (0, _map.default)(_).call(_, this.relationsToAdd, function (objectId) {
|
14707 | var object = AV.Object._create(self._targetClassName);
|
14708 |
|
14709 | object.id = objectId;
|
14710 | return object;
|
14711 | });
|
14712 | },
|
14713 |
|
14714 | |
14715 |
|
14716 |
|
14717 |
|
14718 |
|
14719 | removed: function removed() {
|
14720 | var self = this;
|
14721 | return (0, _map.default)(_).call(_, this.relationsToRemove, function (objectId) {
|
14722 | var object = AV.Object._create(self._targetClassName);
|
14723 |
|
14724 | object.id = objectId;
|
14725 | return object;
|
14726 | });
|
14727 | },
|
14728 |
|
14729 | |
14730 |
|
14731 |
|
14732 |
|
14733 | toJSON: function toJSON() {
|
14734 | var adds = null;
|
14735 | var removes = null;
|
14736 | var self = this;
|
14737 |
|
14738 | var idToPointer = function idToPointer(id) {
|
14739 | return {
|
14740 | __type: 'Pointer',
|
14741 | className: self._targetClassName,
|
14742 | objectId: id
|
14743 | };
|
14744 | };
|
14745 |
|
14746 | var pointers = null;
|
14747 |
|
14748 | if (this.relationsToAdd.length > 0) {
|
14749 | pointers = (0, _map.default)(_).call(_, this.relationsToAdd, idToPointer);
|
14750 | adds = {
|
14751 | __op: 'AddRelation',
|
14752 | objects: pointers
|
14753 | };
|
14754 | }
|
14755 |
|
14756 | if (this.relationsToRemove.length > 0) {
|
14757 | pointers = (0, _map.default)(_).call(_, this.relationsToRemove, idToPointer);
|
14758 | removes = {
|
14759 | __op: 'RemoveRelation',
|
14760 | objects: pointers
|
14761 | };
|
14762 | }
|
14763 |
|
14764 | if (adds && removes) {
|
14765 | return {
|
14766 | __op: 'Batch',
|
14767 | ops: [adds, removes]
|
14768 | };
|
14769 | }
|
14770 |
|
14771 | return adds || removes || {};
|
14772 | },
|
14773 | _mergeWithPrevious: function _mergeWithPrevious(previous) {
|
14774 | if (!previous) {
|
14775 | return this;
|
14776 | } else if (previous instanceof AV.Op.Unset) {
|
14777 | throw new Error("You can't modify a relation after deleting it.");
|
14778 | } else if (previous instanceof AV.Op.Relation) {
|
14779 | if (previous._targetClassName && previous._targetClassName !== this._targetClassName) {
|
14780 | throw new Error('Related object must be of class ' + previous._targetClassName + ', but ' + this._targetClassName + ' was passed in.');
|
14781 | }
|
14782 |
|
14783 | var newAdd = _.union(_.difference(previous.relationsToAdd, this.relationsToRemove), this.relationsToAdd);
|
14784 |
|
14785 | var newRemove = _.union(_.difference(previous.relationsToRemove, this.relationsToAdd), this.relationsToRemove);
|
14786 |
|
14787 | var newRelation = new AV.Op.Relation(newAdd, newRemove);
|
14788 | newRelation._targetClassName = this._targetClassName;
|
14789 | return newRelation;
|
14790 | } else {
|
14791 | throw new Error('Op is invalid after previous op.');
|
14792 | }
|
14793 | },
|
14794 | _estimate: function _estimate(oldValue, object, key) {
|
14795 | if (!oldValue) {
|
14796 | var relation = new AV.Relation(object, key);
|
14797 | relation.targetClassName = this._targetClassName;
|
14798 | } else if (oldValue instanceof AV.Relation) {
|
14799 | if (this._targetClassName) {
|
14800 | if (oldValue.targetClassName) {
|
14801 | if (oldValue.targetClassName !== this._targetClassName) {
|
14802 | throw new Error('Related object must be a ' + oldValue.targetClassName + ', but a ' + this._targetClassName + ' was passed in.');
|
14803 | }
|
14804 | } else {
|
14805 | oldValue.targetClassName = this._targetClassName;
|
14806 | }
|
14807 | }
|
14808 |
|
14809 | return oldValue;
|
14810 | } else {
|
14811 | throw new Error('Op is invalid after previous op.');
|
14812 | }
|
14813 | }
|
14814 | });
|
14815 |
|
14816 | AV.Op._registerDecoder('AddRelation', function (json) {
|
14817 | return new AV.Op.Relation(AV._decode(json.objects), []);
|
14818 | });
|
14819 |
|
14820 | AV.Op._registerDecoder('RemoveRelation', function (json) {
|
14821 | return new AV.Op.Relation([], AV._decode(json.objects));
|
14822 | });
|
14823 | };
|
14824 |
|
14825 | }),
|
14826 |
|
14827 | (function(module, exports, __webpack_require__) {
|
14828 |
|
14829 | var parent = __webpack_require__(448);
|
14830 |
|
14831 | module.exports = parent;
|
14832 |
|
14833 |
|
14834 | }),
|
14835 |
|
14836 | (function(module, exports, __webpack_require__) {
|
14837 |
|
14838 | var isPrototypeOf = __webpack_require__(21);
|
14839 | var method = __webpack_require__(449);
|
14840 |
|
14841 | var ArrayPrototype = Array.prototype;
|
14842 |
|
14843 | module.exports = function (it) {
|
14844 | var own = it.find;
|
14845 | return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.find) ? method : own;
|
14846 | };
|
14847 |
|
14848 |
|
14849 | }),
|
14850 |
|
14851 | (function(module, exports, __webpack_require__) {
|
14852 |
|
14853 | __webpack_require__(450);
|
14854 | var entryVirtual = __webpack_require__(41);
|
14855 |
|
14856 | module.exports = entryVirtual('Array').find;
|
14857 |
|
14858 |
|
14859 | }),
|
14860 |
|
14861 | (function(module, exports, __webpack_require__) {
|
14862 |
|
14863 | "use strict";
|
14864 |
|
14865 | var $ = __webpack_require__(0);
|
14866 | var $find = __webpack_require__(66).find;
|
14867 | var addToUnscopables = __webpack_require__(159);
|
14868 |
|
14869 | var FIND = 'find';
|
14870 | var SKIPS_HOLES = true;
|
14871 |
|
14872 |
|
14873 | if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
|
14874 |
|
14875 |
|
14876 |
|
14877 | $({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
|
14878 | find: function find(callbackfn /* , that = undefined */) {
|
14879 | return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
14880 | }
|
14881 | });
|
14882 |
|
14883 |
|
14884 | addToUnscopables(FIND);
|
14885 |
|
14886 |
|
14887 | }),
|
14888 |
|
14889 | (function(module, exports, __webpack_require__) {
|
14890 |
|
14891 | "use strict";
|
14892 |
|
14893 |
|
14894 | var _ = __webpack_require__(2);
|
14895 |
|
14896 | module.exports = function (AV) {
|
14897 | |
14898 |
|
14899 |
|
14900 |
|
14901 |
|
14902 |
|
14903 |
|
14904 |
|
14905 |
|
14906 |
|
14907 |
|
14908 |
|
14909 |
|
14910 |
|
14911 |
|
14912 | AV.Relation = function (parent, key) {
|
14913 | if (!_.isString(key)) {
|
14914 | throw new TypeError('key must be a string');
|
14915 | }
|
14916 |
|
14917 | this.parent = parent;
|
14918 | this.key = key;
|
14919 | this.targetClassName = null;
|
14920 | };
|
14921 | |
14922 |
|
14923 |
|
14924 |
|
14925 |
|
14926 |
|
14927 |
|
14928 |
|
14929 |
|
14930 | AV.Relation.reverseQuery = function (parentClass, relationKey, child) {
|
14931 | var query = new AV.Query(parentClass);
|
14932 | query.equalTo(relationKey, child._toPointer());
|
14933 | return query;
|
14934 | };
|
14935 |
|
14936 | _.extend(AV.Relation.prototype,
|
14937 |
|
14938 | {
|
14939 | |
14940 |
|
14941 |
|
14942 |
|
14943 | _ensureParentAndKey: function _ensureParentAndKey(parent, key) {
|
14944 | this.parent = this.parent || parent;
|
14945 | this.key = this.key || key;
|
14946 |
|
14947 | if (this.parent !== parent) {
|
14948 | throw new Error('Internal Error. Relation retrieved from two different Objects.');
|
14949 | }
|
14950 |
|
14951 | if (this.key !== key) {
|
14952 | throw new Error('Internal Error. Relation retrieved from two different keys.');
|
14953 | }
|
14954 | },
|
14955 |
|
14956 | |
14957 |
|
14958 |
|
14959 |
|
14960 | add: function add(objects) {
|
14961 | if (!_.isArray(objects)) {
|
14962 | objects = [objects];
|
14963 | }
|
14964 |
|
14965 | var change = new AV.Op.Relation(objects, []);
|
14966 | this.parent.set(this.key, change);
|
14967 | this.targetClassName = change._targetClassName;
|
14968 | },
|
14969 |
|
14970 | |
14971 |
|
14972 |
|
14973 |
|
14974 | remove: function remove(objects) {
|
14975 | if (!_.isArray(objects)) {
|
14976 | objects = [objects];
|
14977 | }
|
14978 |
|
14979 | var change = new AV.Op.Relation([], objects);
|
14980 | this.parent.set(this.key, change);
|
14981 | this.targetClassName = change._targetClassName;
|
14982 | },
|
14983 |
|
14984 | |
14985 |
|
14986 |
|
14987 |
|
14988 | toJSON: function toJSON() {
|
14989 | return {
|
14990 | __type: 'Relation',
|
14991 | className: this.targetClassName
|
14992 | };
|
14993 | },
|
14994 |
|
14995 | |
14996 |
|
14997 |
|
14998 |
|
14999 |
|
15000 | query: function query() {
|
15001 | var targetClass;
|
15002 | var query;
|
15003 |
|
15004 | if (!this.targetClassName) {
|
15005 | targetClass = AV.Object._getSubclass(this.parent.className);
|
15006 | query = new AV.Query(targetClass);
|
15007 | query._defaultParams.redirectClassNameForKey = this.key;
|
15008 | } else {
|
15009 | targetClass = AV.Object._getSubclass(this.targetClassName);
|
15010 | query = new AV.Query(targetClass);
|
15011 | }
|
15012 |
|
15013 | query._addCondition('$relatedTo', 'object', this.parent._toPointer());
|
15014 |
|
15015 | query._addCondition('$relatedTo', 'key', this.key);
|
15016 |
|
15017 | return query;
|
15018 | }
|
15019 | });
|
15020 | };
|
15021 |
|
15022 | }),
|
15023 |
|
15024 | (function(module, exports, __webpack_require__) {
|
15025 |
|
15026 | "use strict";
|
15027 |
|
15028 |
|
15029 | var _interopRequireDefault = __webpack_require__(1);
|
15030 |
|
15031 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
15032 |
|
15033 | var _ = __webpack_require__(2);
|
15034 |
|
15035 | var cos = __webpack_require__(453);
|
15036 |
|
15037 | var qiniu = __webpack_require__(454);
|
15038 |
|
15039 | var s3 = __webpack_require__(501);
|
15040 |
|
15041 | var AVError = __webpack_require__(43);
|
15042 |
|
15043 | var _require = __webpack_require__(26),
|
15044 | request = _require.request,
|
15045 | AVRequest = _require._request;
|
15046 |
|
15047 | var _require2 = __webpack_require__(29),
|
15048 | tap = _require2.tap,
|
15049 | transformFetchOptions = _require2.transformFetchOptions;
|
15050 |
|
15051 | var debug = __webpack_require__(67)('leancloud:file');
|
15052 |
|
15053 | var parseBase64 = __webpack_require__(505);
|
15054 |
|
15055 | module.exports = function (AV) {
|
15056 |
|
15057 |
|
15058 | var extname = function extname(path) {
|
15059 | if (!_.isString(path)) return '';
|
15060 | return path.match(/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/)[4];
|
15061 | };
|
15062 |
|
15063 | var b64Digit = function b64Digit(number) {
|
15064 | if (number < 26) {
|
15065 | return String.fromCharCode(65 + number);
|
15066 | }
|
15067 |
|
15068 | if (number < 52) {
|
15069 | return String.fromCharCode(97 + (number - 26));
|
15070 | }
|
15071 |
|
15072 | if (number < 62) {
|
15073 | return String.fromCharCode(48 + (number - 52));
|
15074 | }
|
15075 |
|
15076 | if (number === 62) {
|
15077 | return '+';
|
15078 | }
|
15079 |
|
15080 | if (number === 63) {
|
15081 | return '/';
|
15082 | }
|
15083 |
|
15084 | throw new Error('Tried to encode large digit ' + number + ' in base64.');
|
15085 | };
|
15086 |
|
15087 | var encodeBase64 = function encodeBase64(array) {
|
15088 | var chunks = [];
|
15089 | chunks.length = Math.ceil(array.length / 3);
|
15090 |
|
15091 | _.times(chunks.length, function (i) {
|
15092 | var b1 = array[i * 3];
|
15093 | var b2 = array[i * 3 + 1] || 0;
|
15094 | var b3 = array[i * 3 + 2] || 0;
|
15095 | var has2 = i * 3 + 1 < array.length;
|
15096 | var has3 = i * 3 + 2 < array.length;
|
15097 | chunks[i] = [b64Digit(b1 >> 2 & 0x3f), b64Digit(b1 << 4 & 0x30 | b2 >> 4 & 0x0f), has2 ? b64Digit(b2 << 2 & 0x3c | b3 >> 6 & 0x03) : '=', has3 ? b64Digit(b3 & 0x3f) : '='].join('');
|
15098 | });
|
15099 |
|
15100 | return chunks.join('');
|
15101 | };
|
15102 | |
15103 |
|
15104 |
|
15105 |
|
15106 |
|
15107 |
|
15108 |
|
15109 |
|
15110 |
|
15111 |
|
15112 |
|
15113 |
|
15114 |
|
15115 |
|
15116 |
|
15117 |
|
15118 |
|
15119 |
|
15120 |
|
15121 |
|
15122 |
|
15123 |
|
15124 |
|
15125 |
|
15126 |
|
15127 |
|
15128 |
|
15129 |
|
15130 |
|
15131 |
|
15132 |
|
15133 |
|
15134 |
|
15135 |
|
15136 | AV.File = function (name, data, mimeType) {
|
15137 | this.attributes = {
|
15138 | name: name,
|
15139 | url: '',
|
15140 | metaData: {},
|
15141 |
|
15142 | base64: ''
|
15143 | };
|
15144 |
|
15145 | if (_.isString(data)) {
|
15146 | throw new TypeError('Creating an AV.File from a String is not yet supported.');
|
15147 | }
|
15148 |
|
15149 | if (_.isArray(data)) {
|
15150 | this.attributes.metaData.size = data.length;
|
15151 | data = {
|
15152 | base64: encodeBase64(data)
|
15153 | };
|
15154 | }
|
15155 |
|
15156 | this._extName = '';
|
15157 | this._data = data;
|
15158 | this._uploadHeaders = {};
|
15159 |
|
15160 | if (data && data.blob && typeof data.blob.uri === 'string') {
|
15161 | this._extName = extname(data.blob.uri);
|
15162 | }
|
15163 |
|
15164 | if (typeof Blob !== 'undefined' && data instanceof Blob) {
|
15165 | if (data.size) {
|
15166 | this.attributes.metaData.size = data.size;
|
15167 | }
|
15168 |
|
15169 | if (data.name) {
|
15170 | this._extName = extname(data.name);
|
15171 | }
|
15172 | }
|
15173 |
|
15174 | var owner;
|
15175 |
|
15176 | if (data && data.owner) {
|
15177 | owner = data.owner;
|
15178 | } else if (!AV._config.disableCurrentUser) {
|
15179 | try {
|
15180 | owner = AV.User.current();
|
15181 | } catch (error) {
|
15182 | if ('SYNC_API_NOT_AVAILABLE' !== error.code) {
|
15183 | throw error;
|
15184 | }
|
15185 | }
|
15186 | }
|
15187 |
|
15188 | this.attributes.metaData.owner = owner ? owner.id : 'unknown';
|
15189 | this.set('mime_type', mimeType);
|
15190 | };
|
15191 | |
15192 |
|
15193 |
|
15194 |
|
15195 |
|
15196 |
|
15197 |
|
15198 |
|
15199 |
|
15200 |
|
15201 |
|
15202 |
|
15203 | AV.File.withURL = function (name, url, metaData, type) {
|
15204 | if (!name || !url) {
|
15205 | throw new Error('Please provide file name and url');
|
15206 | }
|
15207 |
|
15208 | var file = new AV.File(name, null, type);
|
15209 |
|
15210 | if (metaData) {
|
15211 | for (var prop in metaData) {
|
15212 | if (!file.attributes.metaData[prop]) file.attributes.metaData[prop] = metaData[prop];
|
15213 | }
|
15214 | }
|
15215 |
|
15216 | file.attributes.url = url;
|
15217 |
|
15218 | file.attributes.metaData.__source = 'external';
|
15219 | file.attributes.metaData.size = 0;
|
15220 | return file;
|
15221 | };
|
15222 | |
15223 |
|
15224 |
|
15225 |
|
15226 |
|
15227 |
|
15228 |
|
15229 | AV.File.createWithoutData = function (objectId) {
|
15230 | if (!objectId) {
|
15231 | throw new TypeError('The objectId must be provided');
|
15232 | }
|
15233 |
|
15234 | var file = new AV.File();
|
15235 | file.id = objectId;
|
15236 | return file;
|
15237 | };
|
15238 | |
15239 |
|
15240 |
|
15241 |
|
15242 |
|
15243 |
|
15244 |
|
15245 |
|
15246 | AV.File.censor = function (objectId) {
|
15247 | if (!AV._config.masterKey) {
|
15248 | throw new Error('Cannot censor a file without masterKey');
|
15249 | }
|
15250 |
|
15251 | return request({
|
15252 | method: 'POST',
|
15253 | path: "/files/".concat(objectId, "/censor"),
|
15254 | authOptions: {
|
15255 | useMasterKey: true
|
15256 | }
|
15257 | }).then(function (res) {
|
15258 | return res.censorResult;
|
15259 | });
|
15260 | };
|
15261 |
|
15262 | _.extend(AV.File.prototype,
|
15263 |
|
15264 | {
|
15265 | className: '_File',
|
15266 | _toFullJSON: function _toFullJSON(seenObjects) {
|
15267 | var _this = this;
|
15268 |
|
15269 | var full = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
15270 |
|
15271 | var json = _.clone(this.attributes);
|
15272 |
|
15273 | AV._objectEach(json, function (val, key) {
|
15274 | json[key] = AV._encode(val, seenObjects, undefined, full);
|
15275 | });
|
15276 |
|
15277 | AV._objectEach(this._operations, function (val, key) {
|
15278 | json[key] = val;
|
15279 | });
|
15280 |
|
15281 | if (_.has(this, 'id')) {
|
15282 | json.objectId = this.id;
|
15283 | }
|
15284 |
|
15285 | ['createdAt', 'updatedAt'].forEach(function (key) {
|
15286 | if (_.has(_this, key)) {
|
15287 | var val = _this[key];
|
15288 | json[key] = _.isDate(val) ? val.toJSON() : val;
|
15289 | }
|
15290 | });
|
15291 |
|
15292 | if (full) {
|
15293 | json.__type = 'File';
|
15294 | }
|
15295 |
|
15296 | return json;
|
15297 | },
|
15298 |
|
15299 | |
15300 |
|
15301 |
|
15302 |
|
15303 |
|
15304 |
|
15305 | toFullJSON: function toFullJSON() {
|
15306 | var seenObjects = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
15307 | return this._toFullJSON(seenObjects);
|
15308 | },
|
15309 |
|
15310 | |
15311 |
|
15312 |
|
15313 |
|
15314 | toJSON: function toJSON(key, holder) {
|
15315 | var seenObjects = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [this];
|
15316 | return this._toFullJSON(seenObjects, false);
|
15317 | },
|
15318 |
|
15319 | |
15320 |
|
15321 |
|
15322 |
|
15323 | _toPointer: function _toPointer() {
|
15324 | return {
|
15325 | __type: 'Pointer',
|
15326 | className: this.className,
|
15327 | objectId: this.id
|
15328 | };
|
15329 | },
|
15330 |
|
15331 | |
15332 |
|
15333 |
|
15334 |
|
15335 | getACL: function getACL() {
|
15336 | return this._acl;
|
15337 | },
|
15338 |
|
15339 | |
15340 |
|
15341 |
|
15342 |
|
15343 | setACL: function setACL(acl) {
|
15344 | if (!(acl instanceof AV.ACL)) {
|
15345 | return new AVError(AVError.OTHER_CAUSE, 'ACL must be a AV.ACL.');
|
15346 | }
|
15347 |
|
15348 | this._acl = acl;
|
15349 | return this;
|
15350 | },
|
15351 |
|
15352 | |
15353 |
|
15354 |
|
15355 |
|
15356 |
|
15357 | name: function name() {
|
15358 | return this.get('name');
|
15359 | },
|
15360 |
|
15361 | |
15362 |
|
15363 |
|
15364 |
|
15365 |
|
15366 | url: function url() {
|
15367 | return this.get('url');
|
15368 | },
|
15369 |
|
15370 | |
15371 |
|
15372 |
|
15373 |
|
15374 |
|
15375 | get: function get(attrName) {
|
15376 | switch (attrName) {
|
15377 | case 'objectId':
|
15378 | return this.id;
|
15379 |
|
15380 | case 'url':
|
15381 | case 'name':
|
15382 | case 'mime_type':
|
15383 | case 'metaData':
|
15384 | case 'createdAt':
|
15385 | case 'updatedAt':
|
15386 | return this.attributes[attrName];
|
15387 |
|
15388 | default:
|
15389 | return this.attributes.metaData[attrName];
|
15390 | }
|
15391 | },
|
15392 |
|
15393 | |
15394 |
|
15395 |
|
15396 |
|
15397 |
|
15398 |
|
15399 |
|
15400 | set: function set() {
|
15401 | var _this2 = this;
|
15402 |
|
15403 | var set = function set(attrName, value) {
|
15404 | switch (attrName) {
|
15405 | case 'name':
|
15406 | case 'url':
|
15407 | case 'mime_type':
|
15408 | case 'base64':
|
15409 | case 'metaData':
|
15410 | _this2.attributes[attrName] = value;
|
15411 | break;
|
15412 |
|
15413 | default:
|
15414 |
|
15415 | _this2.attributes.metaData[attrName] = value;
|
15416 | break;
|
15417 | }
|
15418 | };
|
15419 |
|
15420 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
15421 | args[_key] = arguments[_key];
|
15422 | }
|
15423 |
|
15424 | switch (args.length) {
|
15425 | case 1:
|
15426 |
|
15427 | for (var k in args[0]) {
|
15428 | set(k, args[0][k]);
|
15429 | }
|
15430 |
|
15431 | break;
|
15432 |
|
15433 | case 2:
|
15434 | set(args[0], args[1]);
|
15435 | break;
|
15436 | }
|
15437 |
|
15438 | return this;
|
15439 | },
|
15440 |
|
15441 | /**
|
15442 | * Set a header for the upload request.
|
15443 | * For more infomation, go to https://url.leanapp.cn/avfile-upload-headers
|
15444 | *
|
15445 | * @param {String} key header key
|
15446 | * @param {String} value header value
|
15447 | * @return {AV.File} this
|
15448 | */
|
15449 | setUploadHeader: function setUploadHeader(key, value) {
|
15450 | this._uploadHeaders[key] = value;
|
15451 | return this;
|
15452 | },
|
15453 |
|
15454 | |
15455 |
|
15456 |
|
15457 |
|
15458 |
|
15459 |
|
15460 |
|
15461 |
|
15462 |
|
15463 |
|
15464 |
|
15465 |
|
15466 | metaData: function metaData(attr, value) {
|
15467 | if (attr && value) {
|
15468 | this.attributes.metaData[attr] = value;
|
15469 | return this;
|
15470 | } else if (attr && !value) {
|
15471 | return this.attributes.metaData[attr];
|
15472 | } else {
|
15473 | return this.attributes.metaData;
|
15474 | }
|
15475 | },
|
15476 |
|
15477 | |
15478 |
|
15479 |
|
15480 |
|
15481 |
|
15482 |
|
15483 |
|
15484 |
|
15485 |
|
15486 | thumbnailURL: function thumbnailURL(width, height) {
|
15487 | var quality = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;
|
15488 | var scaleToFit = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
15489 | var fmt = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'png';
|
15490 | var url = this.attributes.url;
|
15491 |
|
15492 | if (!url) {
|
15493 | throw new Error('Invalid url.');
|
15494 | }
|
15495 |
|
15496 | if (!width || !height || width <= 0 || height <= 0) {
|
15497 | throw new Error('Invalid width or height value.');
|
15498 | }
|
15499 |
|
15500 | if (quality <= 0 || quality > 100) {
|
15501 | throw new Error('Invalid quality value.');
|
15502 | }
|
15503 |
|
15504 | var mode = scaleToFit ? 2 : 1;
|
15505 | return url + '?imageView/' + mode + '/w/' + width + '/h/' + height + '/q/' + quality + '/format/' + fmt;
|
15506 | },
|
15507 |
|
15508 | |
15509 |
|
15510 |
|
15511 |
|
15512 | size: function size() {
|
15513 | return this.metaData().size;
|
15514 | },
|
15515 |
|
15516 | |
15517 |
|
15518 |
|
15519 |
|
15520 | ownerId: function ownerId() {
|
15521 | return this.metaData().owner;
|
15522 | },
|
15523 |
|
15524 | |
15525 |
|
15526 |
|
15527 |
|
15528 |
|
15529 |
|
15530 | destroy: function destroy(options) {
|
15531 | if (!this.id) {
|
15532 | return _promise.default.reject(new Error('The file id does not eixst.'));
|
15533 | }
|
15534 |
|
15535 | var request = AVRequest('files', null, this.id, 'DELETE', null, options);
|
15536 | return request;
|
15537 | },
|
15538 |
|
15539 | |
15540 |
|
15541 |
|
15542 |
|
15543 |
|
15544 |
|
15545 | _fileToken: function _fileToken(type, authOptions) {
|
15546 | var name = this.attributes.name;
|
15547 | var extName = extname(name);
|
15548 |
|
15549 | if (!extName && this._extName) {
|
15550 | name += this._extName;
|
15551 | extName = this._extName;
|
15552 | }
|
15553 |
|
15554 | var data = {
|
15555 | name: name,
|
15556 | keep_file_name: authOptions.keepFileName,
|
15557 | key: authOptions.key,
|
15558 | ACL: this._acl,
|
15559 | mime_type: type,
|
15560 | metaData: this.attributes.metaData
|
15561 | };
|
15562 | return AVRequest('fileTokens', null, null, 'POST', data, authOptions);
|
15563 | },
|
15564 |
|
15565 | |
15566 |
|
15567 |
|
15568 |
|
15569 |
|
15570 | |
15571 |
|
15572 |
|
15573 |
|
15574 |
|
15575 |
|
15576 |
|
15577 |
|
15578 | save: function save() {
|
15579 | var _this3 = this;
|
15580 |
|
15581 | var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
15582 |
|
15583 | if (this.id) {
|
15584 | throw new Error('File is already saved.');
|
15585 | }
|
15586 |
|
15587 | if (!this._previousSave) {
|
15588 | if (this._data) {
|
15589 | var mimeType = this.get('mime_type');
|
15590 | this._previousSave = this._fileToken(mimeType, options).then(function (uploadInfo) {
|
15591 | if (uploadInfo.mime_type) {
|
15592 | mimeType = uploadInfo.mime_type;
|
15593 |
|
15594 | _this3.set('mime_type', mimeType);
|
15595 | }
|
15596 |
|
15597 | _this3._token = uploadInfo.token;
|
15598 | return _promise.default.resolve().then(function () {
|
15599 | var data = _this3._data;
|
15600 |
|
15601 | if (data && data.base64) {
|
15602 | return parseBase64(data.base64, mimeType);
|
15603 | }
|
15604 |
|
15605 | if (data && data.blob) {
|
15606 | if (!data.blob.type && mimeType) {
|
15607 | data.blob.type = mimeType;
|
15608 | }
|
15609 |
|
15610 | if (!data.blob.name) {
|
15611 | data.blob.name = _this3.get('name');
|
15612 | }
|
15613 |
|
15614 | return data.blob;
|
15615 | }
|
15616 |
|
15617 | if (typeof Blob !== 'undefined' && data instanceof Blob) {
|
15618 | return data;
|
15619 | }
|
15620 |
|
15621 | throw new TypeError('malformed file data');
|
15622 | }).then(function (data) {
|
15623 | var _options = _.extend({}, options);
|
15624 |
|
15625 |
|
15626 | if (options.onprogress) {
|
15627 | _options.onprogress = function (event) {
|
15628 | if (event.direction === 'download') return;
|
15629 | return options.onprogress(event);
|
15630 | };
|
15631 | }
|
15632 |
|
15633 | switch (uploadInfo.provider) {
|
15634 | case 's3':
|
15635 | return s3(uploadInfo, data, _this3, _options);
|
15636 |
|
15637 | case 'qcloud':
|
15638 | return cos(uploadInfo, data, _this3, _options);
|
15639 |
|
15640 | case 'qiniu':
|
15641 | default:
|
15642 | return qiniu(uploadInfo, data, _this3, _options);
|
15643 | }
|
15644 | }).then(tap(function () {
|
15645 | return _this3._callback(true);
|
15646 | }), function (error) {
|
15647 | _this3._callback(false);
|
15648 |
|
15649 | throw error;
|
15650 | });
|
15651 | });
|
15652 | } else if (this.attributes.url && this.attributes.metaData.__source === 'external') {
|
15653 |
|
15654 | var data = {
|
15655 | name: this.attributes.name,
|
15656 | ACL: this._acl,
|
15657 | metaData: this.attributes.metaData,
|
15658 | mime_type: this.mimeType,
|
15659 | url: this.attributes.url
|
15660 | };
|
15661 | this._previousSave = AVRequest('files', null, null, 'post', data, options).then(function (response) {
|
15662 | _this3.id = response.objectId;
|
15663 | return _this3;
|
15664 | });
|
15665 | }
|
15666 | }
|
15667 |
|
15668 | return this._previousSave;
|
15669 | },
|
15670 | _callback: function _callback(success) {
|
15671 | AVRequest('fileCallback', null, null, 'post', {
|
15672 | token: this._token,
|
15673 | result: success
|
15674 | }).catch(debug);
|
15675 | delete this._token;
|
15676 | delete this._data;
|
15677 | },
|
15678 |
|
15679 | |
15680 |
|
15681 |
|
15682 |
|
15683 |
|
15684 |
|
15685 |
|
15686 |
|
15687 |
|
15688 | fetch: function fetch(fetchOptions, options) {
|
15689 | if (!this.id) {
|
15690 | throw new Error('Cannot fetch unsaved file');
|
15691 | }
|
15692 |
|
15693 | var request = AVRequest('files', null, this.id, 'GET', transformFetchOptions(fetchOptions), options);
|
15694 | return request.then(this._finishFetch.bind(this));
|
15695 | },
|
15696 | _finishFetch: function _finishFetch(response) {
|
15697 | var value = AV.Object.prototype.parse(response);
|
15698 | value.attributes = {
|
15699 | name: value.name,
|
15700 | url: value.url,
|
15701 | mime_type: value.mime_type,
|
15702 | bucket: value.bucket
|
15703 | };
|
15704 | value.attributes.metaData = value.metaData || {};
|
15705 | value.id = value.objectId;
|
15706 |
|
15707 | delete value.objectId;
|
15708 | delete value.metaData;
|
15709 | delete value.url;
|
15710 | delete value.name;
|
15711 | delete value.mime_type;
|
15712 | delete value.bucket;
|
15713 |
|
15714 | _.extend(this, value);
|
15715 |
|
15716 | return this;
|
15717 | },
|
15718 |
|
15719 | |
15720 |
|
15721 |
|
15722 |
|
15723 |
|
15724 | censor: function censor() {
|
15725 | if (!this.id) {
|
15726 | throw new Error('Cannot censor an unsaved file');
|
15727 | }
|
15728 |
|
15729 | return AV.File.censor(this.id);
|
15730 | }
|
15731 | });
|
15732 | };
|
15733 |
|
15734 | }),
|
15735 |
|
15736 | (function(module, exports, __webpack_require__) {
|
15737 |
|
15738 | "use strict";
|
15739 |
|
15740 |
|
15741 | var _require = __webpack_require__(68),
|
15742 | getAdapter = _require.getAdapter;
|
15743 |
|
15744 | var debug = __webpack_require__(67)('cos');
|
15745 |
|
15746 | module.exports = function (uploadInfo, data, file) {
|
15747 | var saveOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
15748 | var url = uploadInfo.upload_url + '?sign=' + encodeURIComponent(uploadInfo.token);
|
15749 | var fileFormData = {
|
15750 | field: 'fileContent',
|
15751 | data: data,
|
15752 | name: file.attributes.name
|
15753 | };
|
15754 | var options = {
|
15755 | headers: file._uploadHeaders,
|
15756 | data: {
|
15757 | op: 'upload'
|
15758 | },
|
15759 | onprogress: saveOptions.onprogress
|
15760 | };
|
15761 | debug('url: %s, file: %o, options: %o', url, fileFormData, options);
|
15762 | var upload = getAdapter('upload');
|
15763 | return upload(url, fileFormData, options).then(function (response) {
|
15764 | debug(response.status, response.data);
|
15765 |
|
15766 | if (response.ok === false) {
|
15767 | var error = new Error(response.status);
|
15768 | error.response = response;
|
15769 | throw error;
|
15770 | }
|
15771 |
|
15772 | file.attributes.url = uploadInfo.url;
|
15773 | file._bucket = uploadInfo.bucket;
|
15774 | file.id = uploadInfo.objectId;
|
15775 | return file;
|
15776 | }, function (error) {
|
15777 | var response = error.response;
|
15778 |
|
15779 | if (response) {
|
15780 | debug(response.status, response.data);
|
15781 | error.statusCode = response.status;
|
15782 | error.response = response.data;
|
15783 | }
|
15784 |
|
15785 | throw error;
|
15786 | });
|
15787 | };
|
15788 |
|
15789 | }),
|
15790 |
|
15791 | (function(module, exports, __webpack_require__) {
|
15792 |
|
15793 | "use strict";
|
15794 |
|
15795 |
|
15796 | var _sliceInstanceProperty2 = __webpack_require__(87);
|
15797 |
|
15798 | var _Array$from = __webpack_require__(455);
|
15799 |
|
15800 | var _Symbol = __webpack_require__(240);
|
15801 |
|
15802 | var _getIteratorMethod = __webpack_require__(241);
|
15803 |
|
15804 | var _Reflect$construct = __webpack_require__(465);
|
15805 |
|
15806 | var _interopRequireDefault = __webpack_require__(1);
|
15807 |
|
15808 | var _inherits2 = _interopRequireDefault(__webpack_require__(469));
|
15809 |
|
15810 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(491));
|
15811 |
|
15812 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(493));
|
15813 |
|
15814 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(498));
|
15815 |
|
15816 | var _createClass2 = _interopRequireDefault(__webpack_require__(499));
|
15817 |
|
15818 | var _stringify = _interopRequireDefault(__webpack_require__(36));
|
15819 |
|
15820 | var _concat = _interopRequireDefault(__webpack_require__(30));
|
15821 |
|
15822 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
15823 |
|
15824 | var _slice = _interopRequireDefault(__webpack_require__(87));
|
15825 |
|
15826 | function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
15827 |
|
15828 | function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
15829 |
|
15830 | function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
15831 |
|
15832 | function _unsupportedIterableToArray(o, minLen) { var _context8; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty2(_context8 = Object.prototype.toString.call(o)).call(_context8, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
15833 |
|
15834 | function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
15835 |
|
15836 | var _require = __webpack_require__(68),
|
15837 | getAdapter = _require.getAdapter;
|
15838 |
|
15839 | var debug = __webpack_require__(67)('leancloud:qiniu');
|
15840 |
|
15841 | var ajax = __webpack_require__(108);
|
15842 |
|
15843 | var btoa = __webpack_require__(500);
|
15844 |
|
15845 | var SHARD_THRESHOLD = 1024 * 1024 * 64;
|
15846 | var CHUNK_SIZE = 1024 * 1024 * 16;
|
15847 |
|
15848 | function upload(uploadInfo, data, file) {
|
15849 | var saveOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
15850 |
|
15851 | var uptoken = uploadInfo.token;
|
15852 | var url = uploadInfo.upload_url || 'https://upload.qiniup.com';
|
15853 | var fileFormData = {
|
15854 | field: 'file',
|
15855 | data: data,
|
15856 | name: file.attributes.name
|
15857 | };
|
15858 | var options = {
|
15859 | headers: file._uploadHeaders,
|
15860 | data: {
|
15861 | name: file.attributes.name,
|
15862 | key: uploadInfo.key,
|
15863 | token: uptoken
|
15864 | },
|
15865 | onprogress: saveOptions.onprogress
|
15866 | };
|
15867 | debug('url: %s, file: %o, options: %o', url, fileFormData, options);
|
15868 | var upload = getAdapter('upload');
|
15869 | return upload(url, fileFormData, options).then(function (response) {
|
15870 | debug(response.status, response.data);
|
15871 |
|
15872 | if (response.ok === false) {
|
15873 | var message = response.status;
|
15874 |
|
15875 | if (response.data) {
|
15876 | if (response.data.error) {
|
15877 | message = response.data.error;
|
15878 | } else {
|
15879 | message = (0, _stringify.default)(response.data);
|
15880 | }
|
15881 | }
|
15882 |
|
15883 | var error = new Error(message);
|
15884 | error.response = response;
|
15885 | throw error;
|
15886 | }
|
15887 |
|
15888 | file.attributes.url = uploadInfo.url;
|
15889 | file._bucket = uploadInfo.bucket;
|
15890 | file.id = uploadInfo.objectId;
|
15891 | return file;
|
15892 | }, function (error) {
|
15893 | var response = error.response;
|
15894 |
|
15895 | if (response) {
|
15896 | debug(response.status, response.data);
|
15897 | error.statusCode = response.status;
|
15898 | error.response = response.data;
|
15899 | }
|
15900 |
|
15901 | throw error;
|
15902 | });
|
15903 | }
|
15904 |
|
15905 | function urlSafeBase64(string) {
|
15906 | var base64 = btoa(unescape(encodeURIComponent(string)));
|
15907 | var result = '';
|
15908 |
|
15909 | var _iterator = _createForOfIteratorHelper(base64),
|
15910 | _step;
|
15911 |
|
15912 | try {
|
15913 | for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
15914 | var ch = _step.value;
|
15915 |
|
15916 | switch (ch) {
|
15917 | case '+':
|
15918 | result += '-';
|
15919 | break;
|
15920 |
|
15921 | case '/':
|
15922 | result += '_';
|
15923 | break;
|
15924 |
|
15925 | default:
|
15926 | result += ch;
|
15927 | }
|
15928 | }
|
15929 | } catch (err) {
|
15930 | _iterator.e(err);
|
15931 | } finally {
|
15932 | _iterator.f();
|
15933 | }
|
15934 |
|
15935 | return result;
|
15936 | }
|
15937 |
|
15938 | var ShardUploader = function () {
|
15939 | function ShardUploader(uploadInfo, data, file, saveOptions) {
|
15940 | var _context,
|
15941 | _context2,
|
15942 | _this = this;
|
15943 |
|
15944 | (0, _classCallCheck2.default)(this, ShardUploader);
|
15945 | this.uploadInfo = uploadInfo;
|
15946 | this.data = data;
|
15947 | this.file = file;
|
15948 | this.size = undefined;
|
15949 | this.offset = 0;
|
15950 | this.uploadedChunks = 0;
|
15951 | var key = urlSafeBase64(uploadInfo.key);
|
15952 | var uploadURL = uploadInfo.upload_url || 'https://upload.qiniup.com';
|
15953 | this.baseURL = (0, _concat.default)(_context = (0, _concat.default)(_context2 = "".concat(uploadURL, "/buckets/")).call(_context2, uploadInfo.bucket, "/objects/")).call(_context, key, "/uploads");
|
15954 | this.upToken = 'UpToken ' + uploadInfo.token;
|
15955 | this.uploaded = 0;
|
15956 |
|
15957 | if (saveOptions && saveOptions.onprogress) {
|
15958 | this.onProgress = function (_ref) {
|
15959 | var loaded = _ref.loaded;
|
15960 | loaded += _this.uploadedChunks * CHUNK_SIZE;
|
15961 |
|
15962 | if (loaded <= _this.uploaded) {
|
15963 | return;
|
15964 | }
|
15965 |
|
15966 | if (_this.size) {
|
15967 | saveOptions.onprogress({
|
15968 | loaded: loaded,
|
15969 | total: _this.size,
|
15970 | percent: loaded / _this.size * 100
|
15971 | });
|
15972 | } else {
|
15973 | saveOptions.onprogress({
|
15974 | loaded: loaded
|
15975 | });
|
15976 | }
|
15977 |
|
15978 | _this.uploaded = loaded;
|
15979 | };
|
15980 | }
|
15981 | }
|
15982 | |
15983 |
|
15984 |
|
15985 |
|
15986 |
|
15987 | (0, _createClass2.default)(ShardUploader, [{
|
15988 | key: "getUploadId",
|
15989 | value: function getUploadId() {
|
15990 | return ajax({
|
15991 | method: 'POST',
|
15992 | url: this.baseURL,
|
15993 | headers: {
|
15994 | Authorization: this.upToken
|
15995 | }
|
15996 | }).then(function (res) {
|
15997 | return res.uploadId;
|
15998 | });
|
15999 | }
|
16000 | }, {
|
16001 | key: "getChunk",
|
16002 | value: function getChunk() {
|
16003 | throw new Error('Not implemented');
|
16004 | }
|
16005 | |
16006 |
|
16007 |
|
16008 |
|
16009 |
|
16010 |
|
16011 |
|
16012 | }, {
|
16013 | key: "uploadPart",
|
16014 | value: function uploadPart(uploadId, partNumber, data) {
|
16015 | var _context3, _context4;
|
16016 |
|
16017 | return ajax({
|
16018 | method: 'PUT',
|
16019 | url: (0, _concat.default)(_context3 = (0, _concat.default)(_context4 = "".concat(this.baseURL, "/")).call(_context4, uploadId, "/")).call(_context3, partNumber),
|
16020 | headers: {
|
16021 | Authorization: this.upToken
|
16022 | },
|
16023 | data: data,
|
16024 | onprogress: this.onProgress
|
16025 | }).then(function (_ref2) {
|
16026 | var etag = _ref2.etag;
|
16027 | return {
|
16028 | partNumber: partNumber,
|
16029 | etag: etag
|
16030 | };
|
16031 | });
|
16032 | }
|
16033 | }, {
|
16034 | key: "stopUpload",
|
16035 | value: function stopUpload(uploadId) {
|
16036 | var _context5;
|
16037 |
|
16038 | return ajax({
|
16039 | method: 'DELETE',
|
16040 | url: (0, _concat.default)(_context5 = "".concat(this.baseURL, "/")).call(_context5, uploadId),
|
16041 | headers: {
|
16042 | Authorization: this.upToken
|
16043 | }
|
16044 | });
|
16045 | }
|
16046 | }, {
|
16047 | key: "upload",
|
16048 | value: function upload() {
|
16049 | var _this2 = this;
|
16050 |
|
16051 | var parts = [];
|
16052 | return this.getUploadId().then(function (uploadId) {
|
16053 | var uploadPart = function uploadPart() {
|
16054 | return _promise.default.resolve(_this2.getChunk()).then(function (chunk) {
|
16055 | if (!chunk) {
|
16056 | return;
|
16057 | }
|
16058 |
|
16059 | var partNumber = parts.length + 1;
|
16060 | return _this2.uploadPart(uploadId, partNumber, chunk).then(function (part) {
|
16061 | parts.push(part);
|
16062 | _this2.uploadedChunks++;
|
16063 | return uploadPart();
|
16064 | });
|
16065 | }).catch(function (error) {
|
16066 | return _this2.stopUpload(uploadId).then(function () {
|
16067 | return _promise.default.reject(error);
|
16068 | });
|
16069 | });
|
16070 | };
|
16071 |
|
16072 | return uploadPart().then(function () {
|
16073 | var _context6;
|
16074 |
|
16075 | return ajax({
|
16076 | method: 'POST',
|
16077 | url: (0, _concat.default)(_context6 = "".concat(_this2.baseURL, "/")).call(_context6, uploadId),
|
16078 | headers: {
|
16079 | Authorization: _this2.upToken
|
16080 | },
|
16081 | data: {
|
16082 | parts: parts,
|
16083 | fname: _this2.file.attributes.name,
|
16084 | mimeType: _this2.file.attributes.mime_type
|
16085 | }
|
16086 | });
|
16087 | });
|
16088 | }).then(function () {
|
16089 | _this2.file.attributes.url = _this2.uploadInfo.url;
|
16090 | _this2.file._bucket = _this2.uploadInfo.bucket;
|
16091 | _this2.file.id = _this2.uploadInfo.objectId;
|
16092 | return _this2.file;
|
16093 | });
|
16094 | }
|
16095 | }]);
|
16096 | return ShardUploader;
|
16097 | }();
|
16098 |
|
16099 | var BlobUploader = function (_ShardUploader) {
|
16100 | (0, _inherits2.default)(BlobUploader, _ShardUploader);
|
16101 |
|
16102 | var _super = _createSuper(BlobUploader);
|
16103 |
|
16104 | function BlobUploader(uploadInfo, data, file, saveOptions) {
|
16105 | var _this3;
|
16106 |
|
16107 | (0, _classCallCheck2.default)(this, BlobUploader);
|
16108 | _this3 = _super.call(this, uploadInfo, data, file, saveOptions);
|
16109 | _this3.size = data.size;
|
16110 | return _this3;
|
16111 | }
|
16112 | |
16113 |
|
16114 |
|
16115 |
|
16116 |
|
16117 | (0, _createClass2.default)(BlobUploader, [{
|
16118 | key: "getChunk",
|
16119 | value: function getChunk() {
|
16120 | var _context7;
|
16121 |
|
16122 | if (this.offset >= this.size) {
|
16123 | return null;
|
16124 | }
|
16125 |
|
16126 | var chunk = (0, _slice.default)(_context7 = this.data).call(_context7, this.offset, this.offset + CHUNK_SIZE);
|
16127 | this.offset += chunk.size;
|
16128 | return chunk;
|
16129 | }
|
16130 | }]);
|
16131 | return BlobUploader;
|
16132 | }(ShardUploader);
|
16133 |
|
16134 | function isBlob(data) {
|
16135 | return typeof Blob !== 'undefined' && data instanceof Blob;
|
16136 | }
|
16137 |
|
16138 | module.exports = function (uploadInfo, data, file) {
|
16139 | var saveOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
16140 |
|
16141 | if (isBlob(data) && data.size >= SHARD_THRESHOLD) {
|
16142 | return new BlobUploader(uploadInfo, data, file, saveOptions).upload();
|
16143 | }
|
16144 |
|
16145 | return upload(uploadInfo, data, file, saveOptions);
|
16146 | };
|
16147 |
|
16148 | }),
|
16149 |
|
16150 | (function(module, exports, __webpack_require__) {
|
16151 |
|
16152 | module.exports = __webpack_require__(239);
|
16153 |
|
16154 | }),
|
16155 |
|
16156 | (function(module, exports, __webpack_require__) {
|
16157 |
|
16158 | __webpack_require__(78);
|
16159 | __webpack_require__(457);
|
16160 | var path = __webpack_require__(10);
|
16161 |
|
16162 | module.exports = path.Array.from;
|
16163 |
|
16164 |
|
16165 | }),
|
16166 |
|
16167 | (function(module, exports, __webpack_require__) {
|
16168 |
|
16169 | var $ = __webpack_require__(0);
|
16170 | var from = __webpack_require__(458);
|
16171 | var checkCorrectnessOfIteration = __webpack_require__(168);
|
16172 |
|
16173 | var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
|
16174 |
|
16175 | Array.from(iterable);
|
16176 | });
|
16177 |
|
16178 |
|
16179 |
|
16180 | $({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
|
16181 | from: from
|
16182 | });
|
16183 |
|
16184 |
|
16185 | }),
|
16186 |
|
16187 | (function(module, exports, __webpack_require__) {
|
16188 |
|
16189 | "use strict";
|
16190 |
|
16191 | var bind = __webpack_require__(45);
|
16192 | var call = __webpack_require__(13);
|
16193 | var toObject = __webpack_require__(34);
|
16194 | var callWithSafeIterationClosing = __webpack_require__(459);
|
16195 | var isArrayIteratorMethod = __webpack_require__(156);
|
16196 | var isConstructor = __webpack_require__(101);
|
16197 | var lengthOfArrayLike = __webpack_require__(46);
|
16198 | var createProperty = __webpack_require__(106);
|
16199 | var getIterator = __webpack_require__(157);
|
16200 | var getIteratorMethod = __webpack_require__(99);
|
16201 |
|
16202 | var $Array = Array;
|
16203 |
|
16204 |
|
16205 |
|
16206 | module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
|
16207 | var O = toObject(arrayLike);
|
16208 | var IS_CONSTRUCTOR = isConstructor(this);
|
16209 | var argumentsLength = arguments.length;
|
16210 | var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
|
16211 | var mapping = mapfn !== undefined;
|
16212 | if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined);
|
16213 | var iteratorMethod = getIteratorMethod(O);
|
16214 | var index = 0;
|
16215 | var length, result, step, iterator, next, value;
|
16216 |
|
16217 | if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) {
|
16218 | iterator = getIterator(O, iteratorMethod);
|
16219 | next = iterator.next;
|
16220 | result = IS_CONSTRUCTOR ? new this() : [];
|
16221 | for (;!(step = call(next, iterator)).done; index++) {
|
16222 | value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
|
16223 | createProperty(result, index, value);
|
16224 | }
|
16225 | } else {
|
16226 | length = lengthOfArrayLike(O);
|
16227 | result = IS_CONSTRUCTOR ? new this(length) : $Array(length);
|
16228 | for (;length > index; index++) {
|
16229 | value = mapping ? mapfn(O[index], index) : O[index];
|
16230 | createProperty(result, index, value);
|
16231 | }
|
16232 | }
|
16233 | result.length = index;
|
16234 | return result;
|
16235 | };
|
16236 |
|
16237 |
|
16238 | }),
|
16239 |
|
16240 | (function(module, exports, __webpack_require__) {
|
16241 |
|
16242 | var anObject = __webpack_require__(19);
|
16243 | var iteratorClose = __webpack_require__(158);
|
16244 |
|
16245 |
|
16246 | module.exports = function (iterator, fn, value, ENTRIES) {
|
16247 | try {
|
16248 | return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
|
16249 | } catch (error) {
|
16250 | iteratorClose(iterator, 'throw', error);
|
16251 | }
|
16252 | };
|
16253 |
|
16254 |
|
16255 | }),
|
16256 |
|
16257 | (function(module, exports, __webpack_require__) {
|
16258 |
|
16259 | module.exports = __webpack_require__(461);
|
16260 |
|
16261 |
|
16262 | }),
|
16263 |
|
16264 | (function(module, exports, __webpack_require__) {
|
16265 |
|
16266 | var parent = __webpack_require__(462);
|
16267 |
|
16268 | module.exports = parent;
|
16269 |
|
16270 |
|
16271 | }),
|
16272 |
|
16273 | (function(module, exports, __webpack_require__) {
|
16274 |
|
16275 | var parent = __webpack_require__(463);
|
16276 |
|
16277 | module.exports = parent;
|
16278 |
|
16279 |
|
16280 | }),
|
16281 |
|
16282 | (function(module, exports, __webpack_require__) {
|
16283 |
|
16284 | var parent = __webpack_require__(464);
|
16285 | __webpack_require__(51);
|
16286 |
|
16287 | module.exports = parent;
|
16288 |
|
16289 |
|
16290 | }),
|
16291 |
|
16292 | (function(module, exports, __webpack_require__) {
|
16293 |
|
16294 | __webpack_require__(48);
|
16295 | __webpack_require__(78);
|
16296 | var getIteratorMethod = __webpack_require__(99);
|
16297 |
|
16298 | module.exports = getIteratorMethod;
|
16299 |
|
16300 |
|
16301 | }),
|
16302 |
|
16303 | (function(module, exports, __webpack_require__) {
|
16304 |
|
16305 | module.exports = __webpack_require__(466);
|
16306 |
|
16307 | }),
|
16308 |
|
16309 | (function(module, exports, __webpack_require__) {
|
16310 |
|
16311 | var parent = __webpack_require__(467);
|
16312 |
|
16313 | module.exports = parent;
|
16314 |
|
16315 |
|
16316 | }),
|
16317 |
|
16318 | (function(module, exports, __webpack_require__) {
|
16319 |
|
16320 | __webpack_require__(468);
|
16321 | var path = __webpack_require__(10);
|
16322 |
|
16323 | module.exports = path.Reflect.construct;
|
16324 |
|
16325 |
|
16326 | }),
|
16327 |
|
16328 | (function(module, exports, __webpack_require__) {
|
16329 |
|
16330 | var $ = __webpack_require__(0);
|
16331 | var getBuiltIn = __webpack_require__(18);
|
16332 | var apply = __webpack_require__(69);
|
16333 | var bind = __webpack_require__(242);
|
16334 | var aConstructor = __webpack_require__(164);
|
16335 | var anObject = __webpack_require__(19);
|
16336 | var isObject = __webpack_require__(11);
|
16337 | var create = __webpack_require__(47);
|
16338 | var fails = __webpack_require__(3);
|
16339 |
|
16340 | var nativeConstruct = getBuiltIn('Reflect', 'construct');
|
16341 | var ObjectPrototype = Object.prototype;
|
16342 | var push = [].push;
|
16343 |
|
16344 |
|
16345 |
|
16346 |
|
16347 |
|
16348 | var NEW_TARGET_BUG = fails(function () {
|
16349 | function F() { }
|
16350 | return !(nativeConstruct(function () { }, [], F) instanceof F);
|
16351 | });
|
16352 |
|
16353 | var ARGS_BUG = !fails(function () {
|
16354 | nativeConstruct(function () { });
|
16355 | });
|
16356 |
|
16357 | var FORCED = NEW_TARGET_BUG || ARGS_BUG;
|
16358 |
|
16359 | $({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
|
16360 | construct: function construct(Target, args /* , newTarget */) {
|
16361 | aConstructor(Target);
|
16362 | anObject(args);
|
16363 | var newTarget = arguments.length < 3 ? Target : aConstructor(arguments[2]);
|
16364 | if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
|
16365 | if (Target == newTarget) {
|
16366 |
|
16367 | switch (args.length) {
|
16368 | case 0: return new Target();
|
16369 | case 1: return new Target(args[0]);
|
16370 | case 2: return new Target(args[0], args[1]);
|
16371 | case 3: return new Target(args[0], args[1], args[2]);
|
16372 | case 4: return new Target(args[0], args[1], args[2], args[3]);
|
16373 | }
|
16374 |
|
16375 | var $args = [null];
|
16376 | apply(push, $args, args);
|
16377 | return new (apply(bind, Target, $args))();
|
16378 | }
|
16379 |
|
16380 | var proto = newTarget.prototype;
|
16381 | var instance = create(isObject(proto) ? proto : ObjectPrototype);
|
16382 | var result = apply(Target, instance, args);
|
16383 | return isObject(result) ? result : instance;
|
16384 | }
|
16385 | });
|
16386 |
|
16387 |
|
16388 | }),
|
16389 |
|
16390 | (function(module, exports, __webpack_require__) {
|
16391 |
|
16392 | var _Object$create = __webpack_require__(470);
|
16393 |
|
16394 | var _Object$defineProperty = __webpack_require__(145);
|
16395 |
|
16396 | var setPrototypeOf = __webpack_require__(480);
|
16397 |
|
16398 | function _inherits(subClass, superClass) {
|
16399 | if (typeof superClass !== "function" && superClass !== null) {
|
16400 | throw new TypeError("Super expression must either be null or a function");
|
16401 | }
|
16402 |
|
16403 | subClass.prototype = _Object$create(superClass && superClass.prototype, {
|
16404 | constructor: {
|
16405 | value: subClass,
|
16406 | writable: true,
|
16407 | configurable: true
|
16408 | }
|
16409 | });
|
16410 |
|
16411 | _Object$defineProperty(subClass, "prototype", {
|
16412 | writable: false
|
16413 | });
|
16414 |
|
16415 | if (superClass) setPrototypeOf(subClass, superClass);
|
16416 | }
|
16417 |
|
16418 | module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
16419 |
|
16420 | }),
|
16421 |
|
16422 | (function(module, exports, __webpack_require__) {
|
16423 |
|
16424 | module.exports = __webpack_require__(471);
|
16425 |
|
16426 | }),
|
16427 |
|
16428 | (function(module, exports, __webpack_require__) {
|
16429 |
|
16430 | module.exports = __webpack_require__(472);
|
16431 |
|
16432 |
|
16433 | }),
|
16434 |
|
16435 | (function(module, exports, __webpack_require__) {
|
16436 |
|
16437 | var parent = __webpack_require__(473);
|
16438 |
|
16439 | module.exports = parent;
|
16440 |
|
16441 |
|
16442 | }),
|
16443 |
|
16444 | (function(module, exports, __webpack_require__) {
|
16445 |
|
16446 | var parent = __webpack_require__(474);
|
16447 |
|
16448 | module.exports = parent;
|
16449 |
|
16450 |
|
16451 | }),
|
16452 |
|
16453 | (function(module, exports, __webpack_require__) {
|
16454 |
|
16455 | var parent = __webpack_require__(475);
|
16456 |
|
16457 | module.exports = parent;
|
16458 |
|
16459 |
|
16460 | }),
|
16461 |
|
16462 | (function(module, exports, __webpack_require__) {
|
16463 |
|
16464 | __webpack_require__(476);
|
16465 | var path = __webpack_require__(10);
|
16466 |
|
16467 | var Object = path.Object;
|
16468 |
|
16469 | module.exports = function create(P, D) {
|
16470 | return Object.create(P, D);
|
16471 | };
|
16472 |
|
16473 |
|
16474 | }),
|
16475 |
|
16476 | (function(module, exports, __webpack_require__) {
|
16477 |
|
16478 |
|
16479 | var $ = __webpack_require__(0);
|
16480 | var DESCRIPTORS = __webpack_require__(16);
|
16481 | var create = __webpack_require__(47);
|
16482 |
|
16483 |
|
16484 |
|
16485 | $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
|
16486 | create: create
|
16487 | });
|
16488 |
|
16489 |
|
16490 | }),
|
16491 |
|
16492 | (function(module, exports, __webpack_require__) {
|
16493 |
|
16494 | module.exports = __webpack_require__(478);
|
16495 |
|
16496 |
|
16497 | }),
|
16498 |
|
16499 | (function(module, exports, __webpack_require__) {
|
16500 |
|
16501 | var parent = __webpack_require__(479);
|
16502 |
|
16503 | module.exports = parent;
|
16504 |
|
16505 |
|
16506 | }),
|
16507 |
|
16508 | (function(module, exports, __webpack_require__) {
|
16509 |
|
16510 | var parent = __webpack_require__(230);
|
16511 |
|
16512 | module.exports = parent;
|
16513 |
|
16514 |
|
16515 | }),
|
16516 |
|
16517 | (function(module, exports, __webpack_require__) {
|
16518 |
|
16519 | var _Object$setPrototypeOf = __webpack_require__(243);
|
16520 |
|
16521 | var _bindInstanceProperty = __webpack_require__(244);
|
16522 |
|
16523 | function _setPrototypeOf(o, p) {
|
16524 | var _context;
|
16525 |
|
16526 | module.exports = _setPrototypeOf = _Object$setPrototypeOf ? _bindInstanceProperty(_context = _Object$setPrototypeOf).call(_context) : function _setPrototypeOf(o, p) {
|
16527 | o.__proto__ = p;
|
16528 | return o;
|
16529 | }, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
16530 | return _setPrototypeOf(o, p);
|
16531 | }
|
16532 |
|
16533 | module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
16534 |
|
16535 | }),
|
16536 |
|
16537 | (function(module, exports, __webpack_require__) {
|
16538 |
|
16539 | module.exports = __webpack_require__(482);
|
16540 |
|
16541 |
|
16542 | }),
|
16543 |
|
16544 | (function(module, exports, __webpack_require__) {
|
16545 |
|
16546 | var parent = __webpack_require__(483);
|
16547 |
|
16548 | module.exports = parent;
|
16549 |
|
16550 |
|
16551 | }),
|
16552 |
|
16553 | (function(module, exports, __webpack_require__) {
|
16554 |
|
16555 | var parent = __webpack_require__(228);
|
16556 |
|
16557 | module.exports = parent;
|
16558 |
|
16559 |
|
16560 | }),
|
16561 |
|
16562 | (function(module, exports, __webpack_require__) {
|
16563 |
|
16564 | module.exports = __webpack_require__(485);
|
16565 |
|
16566 |
|
16567 | }),
|
16568 |
|
16569 | (function(module, exports, __webpack_require__) {
|
16570 |
|
16571 | var parent = __webpack_require__(486);
|
16572 |
|
16573 | module.exports = parent;
|
16574 |
|
16575 |
|
16576 | }),
|
16577 |
|
16578 | (function(module, exports, __webpack_require__) {
|
16579 |
|
16580 | var parent = __webpack_require__(487);
|
16581 |
|
16582 | module.exports = parent;
|
16583 |
|
16584 |
|
16585 | }),
|
16586 |
|
16587 | (function(module, exports, __webpack_require__) {
|
16588 |
|
16589 | var parent = __webpack_require__(488);
|
16590 |
|
16591 | module.exports = parent;
|
16592 |
|
16593 |
|
16594 | }),
|
16595 |
|
16596 | (function(module, exports, __webpack_require__) {
|
16597 |
|
16598 | var isPrototypeOf = __webpack_require__(21);
|
16599 | var method = __webpack_require__(489);
|
16600 |
|
16601 | var FunctionPrototype = Function.prototype;
|
16602 |
|
16603 | module.exports = function (it) {
|
16604 | var own = it.bind;
|
16605 | return it === FunctionPrototype || (isPrototypeOf(FunctionPrototype, it) && own === FunctionPrototype.bind) ? method : own;
|
16606 | };
|
16607 |
|
16608 |
|
16609 | }),
|
16610 |
|
16611 | (function(module, exports, __webpack_require__) {
|
16612 |
|
16613 | __webpack_require__(490);
|
16614 | var entryVirtual = __webpack_require__(41);
|
16615 |
|
16616 | module.exports = entryVirtual('Function').bind;
|
16617 |
|
16618 |
|
16619 | }),
|
16620 |
|
16621 | (function(module, exports, __webpack_require__) {
|
16622 |
|
16623 |
|
16624 | var $ = __webpack_require__(0);
|
16625 | var bind = __webpack_require__(242);
|
16626 |
|
16627 |
|
16628 |
|
16629 | $({ target: 'Function', proto: true, forced: Function.bind !== bind }, {
|
16630 | bind: bind
|
16631 | });
|
16632 |
|
16633 |
|
16634 | }),
|
16635 |
|
16636 | (function(module, exports, __webpack_require__) {
|
16637 |
|
16638 | var _typeof = __webpack_require__(109)["default"];
|
16639 |
|
16640 | var assertThisInitialized = __webpack_require__(492);
|
16641 |
|
16642 | function _possibleConstructorReturn(self, call) {
|
16643 | if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
16644 | return call;
|
16645 | } else if (call !== void 0) {
|
16646 | throw new TypeError("Derived constructors may only return object or undefined");
|
16647 | }
|
16648 |
|
16649 | return assertThisInitialized(self);
|
16650 | }
|
16651 |
|
16652 | module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
16653 |
|
16654 | }),
|
16655 |
|
16656 | (function(module, exports) {
|
16657 |
|
16658 | function _assertThisInitialized(self) {
|
16659 | if (self === void 0) {
|
16660 | throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
16661 | }
|
16662 |
|
16663 | return self;
|
16664 | }
|
16665 |
|
16666 | module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
16667 |
|
16668 | }),
|
16669 |
|
16670 | (function(module, exports, __webpack_require__) {
|
16671 |
|
16672 | var _Object$setPrototypeOf = __webpack_require__(243);
|
16673 |
|
16674 | var _bindInstanceProperty = __webpack_require__(244);
|
16675 |
|
16676 | var _Object$getPrototypeOf = __webpack_require__(494);
|
16677 |
|
16678 | function _getPrototypeOf(o) {
|
16679 | var _context;
|
16680 |
|
16681 | module.exports = _getPrototypeOf = _Object$setPrototypeOf ? _bindInstanceProperty(_context = _Object$getPrototypeOf).call(_context) : function _getPrototypeOf(o) {
|
16682 | return o.__proto__ || _Object$getPrototypeOf(o);
|
16683 | }, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
16684 | return _getPrototypeOf(o);
|
16685 | }
|
16686 |
|
16687 | module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
16688 |
|
16689 | }),
|
16690 |
|
16691 | (function(module, exports, __webpack_require__) {
|
16692 |
|
16693 | module.exports = __webpack_require__(495);
|
16694 |
|
16695 | }),
|
16696 |
|
16697 | (function(module, exports, __webpack_require__) {
|
16698 |
|
16699 | module.exports = __webpack_require__(496);
|
16700 |
|
16701 |
|
16702 | }),
|
16703 |
|
16704 | (function(module, exports, __webpack_require__) {
|
16705 |
|
16706 | var parent = __webpack_require__(497);
|
16707 |
|
16708 | module.exports = parent;
|
16709 |
|
16710 |
|
16711 | }),
|
16712 |
|
16713 | (function(module, exports, __webpack_require__) {
|
16714 |
|
16715 | var parent = __webpack_require__(222);
|
16716 |
|
16717 | module.exports = parent;
|
16718 |
|
16719 |
|
16720 | }),
|
16721 |
|
16722 | (function(module, exports) {
|
16723 |
|
16724 | function _classCallCheck(instance, Constructor) {
|
16725 | if (!(instance instanceof Constructor)) {
|
16726 | throw new TypeError("Cannot call a class as a function");
|
16727 | }
|
16728 | }
|
16729 |
|
16730 | module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
16731 |
|
16732 | }),
|
16733 |
|
16734 | (function(module, exports, __webpack_require__) {
|
16735 |
|
16736 | var _Object$defineProperty = __webpack_require__(145);
|
16737 |
|
16738 | function _defineProperties(target, props) {
|
16739 | for (var i = 0; i < props.length; i++) {
|
16740 | var descriptor = props[i];
|
16741 | descriptor.enumerable = descriptor.enumerable || false;
|
16742 | descriptor.configurable = true;
|
16743 | if ("value" in descriptor) descriptor.writable = true;
|
16744 |
|
16745 | _Object$defineProperty(target, descriptor.key, descriptor);
|
16746 | }
|
16747 | }
|
16748 |
|
16749 | function _createClass(Constructor, protoProps, staticProps) {
|
16750 | if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
16751 | if (staticProps) _defineProperties(Constructor, staticProps);
|
16752 |
|
16753 | _Object$defineProperty(Constructor, "prototype", {
|
16754 | writable: false
|
16755 | });
|
16756 |
|
16757 | return Constructor;
|
16758 | }
|
16759 |
|
16760 | module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
16761 |
|
16762 | }),
|
16763 |
|
16764 | (function(module, exports, __webpack_require__) {
|
16765 |
|
16766 | "use strict";
|
16767 |
|
16768 |
|
16769 | var _interopRequireDefault = __webpack_require__(1);
|
16770 |
|
16771 | var _slice = _interopRequireDefault(__webpack_require__(87));
|
16772 |
|
16773 |
|
16774 | var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
16775 |
|
16776 | module.exports = function (string) {
|
16777 | var result = '';
|
16778 |
|
16779 | for (var i = 0; i < string.length;) {
|
16780 | var a = string.charCodeAt(i++);
|
16781 | var b = string.charCodeAt(i++);
|
16782 | var c = string.charCodeAt(i++);
|
16783 |
|
16784 | if (a > 255 || b > 255 || c > 255) {
|
16785 | throw new TypeError('Failed to encode base64: The string to be encoded contains characters outside of the Latin1 range.');
|
16786 | }
|
16787 |
|
16788 | var bitmap = a << 16 | b << 8 | c;
|
16789 | result += b64.charAt(bitmap >> 18 & 63) + b64.charAt(bitmap >> 12 & 63) + b64.charAt(bitmap >> 6 & 63) + b64.charAt(bitmap & 63);
|
16790 | }
|
16791 |
|
16792 |
|
16793 | var rest = string.length % 3;
|
16794 |
|
16795 | return rest ? (0, _slice.default)(result).call(result, 0, rest - 3) + '==='.substring(rest) : result;
|
16796 | };
|
16797 |
|
16798 | }),
|
16799 |
|
16800 | (function(module, exports, __webpack_require__) {
|
16801 |
|
16802 | "use strict";
|
16803 |
|
16804 |
|
16805 | var _ = __webpack_require__(2);
|
16806 |
|
16807 | var ajax = __webpack_require__(108);
|
16808 |
|
16809 | module.exports = function upload(uploadInfo, data, file) {
|
16810 | var saveOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
16811 | return ajax({
|
16812 | url: uploadInfo.upload_url,
|
16813 | method: 'PUT',
|
16814 | data: data,
|
16815 | headers: _.extend({
|
16816 | 'Content-Type': file.get('mime_type'),
|
16817 | 'Cache-Control': 'public, max-age=31536000'
|
16818 | }, file._uploadHeaders),
|
16819 | onprogress: saveOptions.onprogress
|
16820 | }).then(function () {
|
16821 | file.attributes.url = uploadInfo.url;
|
16822 | file._bucket = uploadInfo.bucket;
|
16823 | file.id = uploadInfo.objectId;
|
16824 | return file;
|
16825 | });
|
16826 | };
|
16827 |
|
16828 | }),
|
16829 |
|
16830 | (function(module, exports, __webpack_require__) {
|
16831 |
|
16832 | (function(){
|
16833 | var crypt = __webpack_require__(503),
|
16834 | utf8 = __webpack_require__(245).utf8,
|
16835 | isBuffer = __webpack_require__(504),
|
16836 | bin = __webpack_require__(245).bin,
|
16837 |
|
16838 |
|
16839 | md5 = function (message, options) {
|
16840 |
|
16841 | if (message.constructor == String)
|
16842 | if (options && options.encoding === 'binary')
|
16843 | message = bin.stringToBytes(message);
|
16844 | else
|
16845 | message = utf8.stringToBytes(message);
|
16846 | else if (isBuffer(message))
|
16847 | message = Array.prototype.slice.call(message, 0);
|
16848 | else if (!Array.isArray(message))
|
16849 | message = message.toString();
|
16850 |
|
16851 |
|
16852 | var m = crypt.bytesToWords(message),
|
16853 | l = message.length * 8,
|
16854 | a = 1732584193,
|
16855 | b = -271733879,
|
16856 | c = -1732584194,
|
16857 | d = 271733878;
|
16858 |
|
16859 |
|
16860 | for (var i = 0; i < m.length; i++) {
|
16861 | m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |
|
16862 | ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;
|
16863 | }
|
16864 |
|
16865 |
|
16866 | m[l >>> 5] |= 0x80 << (l % 32);
|
16867 | m[(((l + 64) >>> 9) << 4) + 14] = l;
|
16868 |
|
16869 |
|
16870 | var FF = md5._ff,
|
16871 | GG = md5._gg,
|
16872 | HH = md5._hh,
|
16873 | II = md5._ii;
|
16874 |
|
16875 | for (var i = 0; i < m.length; i += 16) {
|
16876 |
|
16877 | var aa = a,
|
16878 | bb = b,
|
16879 | cc = c,
|
16880 | dd = d;
|
16881 |
|
16882 | a = FF(a, b, c, d, m[i+ 0], 7, -680876936);
|
16883 | d = FF(d, a, b, c, m[i+ 1], 12, -389564586);
|
16884 | c = FF(c, d, a, b, m[i+ 2], 17, 606105819);
|
16885 | b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);
|
16886 | a = FF(a, b, c, d, m[i+ 4], 7, -176418897);
|
16887 | d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);
|
16888 | c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);
|
16889 | b = FF(b, c, d, a, m[i+ 7], 22, -45705983);
|
16890 | a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);
|
16891 | d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);
|
16892 | c = FF(c, d, a, b, m[i+10], 17, -42063);
|
16893 | b = FF(b, c, d, a, m[i+11], 22, -1990404162);
|
16894 | a = FF(a, b, c, d, m[i+12], 7, 1804603682);
|
16895 | d = FF(d, a, b, c, m[i+13], 12, -40341101);
|
16896 | c = FF(c, d, a, b, m[i+14], 17, -1502002290);
|
16897 | b = FF(b, c, d, a, m[i+15], 22, 1236535329);
|
16898 |
|
16899 | a = GG(a, b, c, d, m[i+ 1], 5, -165796510);
|
16900 | d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);
|
16901 | c = GG(c, d, a, b, m[i+11], 14, 643717713);
|
16902 | b = GG(b, c, d, a, m[i+ 0], 20, -373897302);
|
16903 | a = GG(a, b, c, d, m[i+ 5], 5, -701558691);
|
16904 | d = GG(d, a, b, c, m[i+10], 9, 38016083);
|
16905 | c = GG(c, d, a, b, m[i+15], 14, -660478335);
|
16906 | b = GG(b, c, d, a, m[i+ 4], 20, -405537848);
|
16907 | a = GG(a, b, c, d, m[i+ 9], 5, 568446438);
|
16908 | d = GG(d, a, b, c, m[i+14], 9, -1019803690);
|
16909 | c = GG(c, d, a, b, m[i+ 3], 14, -187363961);
|
16910 | b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);
|
16911 | a = GG(a, b, c, d, m[i+13], 5, -1444681467);
|
16912 | d = GG(d, a, b, c, m[i+ 2], 9, -51403784);
|
16913 | c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);
|
16914 | b = GG(b, c, d, a, m[i+12], 20, -1926607734);
|
16915 |
|
16916 | a = HH(a, b, c, d, m[i+ 5], 4, -378558);
|
16917 | d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);
|
16918 | c = HH(c, d, a, b, m[i+11], 16, 1839030562);
|
16919 | b = HH(b, c, d, a, m[i+14], 23, -35309556);
|
16920 | a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);
|
16921 | d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);
|
16922 | c = HH(c, d, a, b, m[i+ 7], 16, -155497632);
|
16923 | b = HH(b, c, d, a, m[i+10], 23, -1094730640);
|
16924 | a = HH(a, b, c, d, m[i+13], 4, 681279174);
|
16925 | d = HH(d, a, b, c, m[i+ 0], 11, -358537222);
|
16926 | c = HH(c, d, a, b, m[i+ 3], 16, -722521979);
|
16927 | b = HH(b, c, d, a, m[i+ 6], 23, 76029189);
|
16928 | a = HH(a, b, c, d, m[i+ 9], 4, -640364487);
|
16929 | d = HH(d, a, b, c, m[i+12], 11, -421815835);
|
16930 | c = HH(c, d, a, b, m[i+15], 16, 530742520);
|
16931 | b = HH(b, c, d, a, m[i+ 2], 23, -995338651);
|
16932 |
|
16933 | a = II(a, b, c, d, m[i+ 0], 6, -198630844);
|
16934 | d = II(d, a, b, c, m[i+ 7], 10, 1126891415);
|
16935 | c = II(c, d, a, b, m[i+14], 15, -1416354905);
|
16936 | b = II(b, c, d, a, m[i+ 5], 21, -57434055);
|
16937 | a = II(a, b, c, d, m[i+12], 6, 1700485571);
|
16938 | d = II(d, a, b, c, m[i+ 3], 10, -1894986606);
|
16939 | c = II(c, d, a, b, m[i+10], 15, -1051523);
|
16940 | b = II(b, c, d, a, m[i+ 1], 21, -2054922799);
|
16941 | a = II(a, b, c, d, m[i+ 8], 6, 1873313359);
|
16942 | d = II(d, a, b, c, m[i+15], 10, -30611744);
|
16943 | c = II(c, d, a, b, m[i+ 6], 15, -1560198380);
|
16944 | b = II(b, c, d, a, m[i+13], 21, 1309151649);
|
16945 | a = II(a, b, c, d, m[i+ 4], 6, -145523070);
|
16946 | d = II(d, a, b, c, m[i+11], 10, -1120210379);
|
16947 | c = II(c, d, a, b, m[i+ 2], 15, 718787259);
|
16948 | b = II(b, c, d, a, m[i+ 9], 21, -343485551);
|
16949 |
|
16950 | a = (a + aa) >>> 0;
|
16951 | b = (b + bb) >>> 0;
|
16952 | c = (c + cc) >>> 0;
|
16953 | d = (d + dd) >>> 0;
|
16954 | }
|
16955 |
|
16956 | return crypt.endian([a, b, c, d]);
|
16957 | };
|
16958 |
|
16959 |
|
16960 | md5._ff = function (a, b, c, d, x, s, t) {
|
16961 | var n = a + (b & c | ~b & d) + (x >>> 0) + t;
|
16962 | return ((n << s) | (n >>> (32 - s))) + b;
|
16963 | };
|
16964 | md5._gg = function (a, b, c, d, x, s, t) {
|
16965 | var n = a + (b & d | c & ~d) + (x >>> 0) + t;
|
16966 | return ((n << s) | (n >>> (32 - s))) + b;
|
16967 | };
|
16968 | md5._hh = function (a, b, c, d, x, s, t) {
|
16969 | var n = a + (b ^ c ^ d) + (x >>> 0) + t;
|
16970 | return ((n << s) | (n >>> (32 - s))) + b;
|
16971 | };
|
16972 | md5._ii = function (a, b, c, d, x, s, t) {
|
16973 | var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
|
16974 | return ((n << s) | (n >>> (32 - s))) + b;
|
16975 | };
|
16976 |
|
16977 |
|
16978 | md5._blocksize = 16;
|
16979 | md5._digestsize = 16;
|
16980 |
|
16981 | module.exports = function (message, options) {
|
16982 | if (message === undefined || message === null)
|
16983 | throw new Error('Illegal argument ' + message);
|
16984 |
|
16985 | var digestbytes = crypt.wordsToBytes(md5(message, options));
|
16986 | return options && options.asBytes ? digestbytes :
|
16987 | options && options.asString ? bin.bytesToString(digestbytes) :
|
16988 | crypt.bytesToHex(digestbytes);
|
16989 | };
|
16990 |
|
16991 | })();
|
16992 |
|
16993 |
|
16994 | }),
|
16995 |
|
16996 | (function(module, exports) {
|
16997 |
|
16998 | (function() {
|
16999 | var base64map
|
17000 | = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
|
17001 |
|
17002 | crypt = {
|
17003 |
|
17004 | rotl: function(n, b) {
|
17005 | return (n << b) | (n >>> (32 - b));
|
17006 | },
|
17007 |
|
17008 |
|
17009 | rotr: function(n, b) {
|
17010 | return (n << (32 - b)) | (n >>> b);
|
17011 | },
|
17012 |
|
17013 |
|
17014 | endian: function(n) {
|
17015 |
|
17016 | if (n.constructor == Number) {
|
17017 | return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;
|
17018 | }
|
17019 |
|
17020 |
|
17021 | for (var i = 0; i < n.length; i++)
|
17022 | n[i] = crypt.endian(n[i]);
|
17023 | return n;
|
17024 | },
|
17025 |
|
17026 |
|
17027 | randomBytes: function(n) {
|
17028 | for (var bytes = []; n > 0; n--)
|
17029 | bytes.push(Math.floor(Math.random() * 256));
|
17030 | return bytes;
|
17031 | },
|
17032 |
|
17033 |
|
17034 | bytesToWords: function(bytes) {
|
17035 | for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)
|
17036 | words[b >>> 5] |= bytes[i] << (24 - b % 32);
|
17037 | return words;
|
17038 | },
|
17039 |
|
17040 |
|
17041 | wordsToBytes: function(words) {
|
17042 | for (var bytes = [], b = 0; b < words.length * 32; b += 8)
|
17043 | bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
|
17044 | return bytes;
|
17045 | },
|
17046 |
|
17047 |
|
17048 | bytesToHex: function(bytes) {
|
17049 | for (var hex = [], i = 0; i < bytes.length; i++) {
|
17050 | hex.push((bytes[i] >>> 4).toString(16));
|
17051 | hex.push((bytes[i] & 0xF).toString(16));
|
17052 | }
|
17053 | return hex.join('');
|
17054 | },
|
17055 |
|
17056 |
|
17057 | hexToBytes: function(hex) {
|
17058 | for (var bytes = [], c = 0; c < hex.length; c += 2)
|
17059 | bytes.push(parseInt(hex.substr(c, 2), 16));
|
17060 | return bytes;
|
17061 | },
|
17062 |
|
17063 |
|
17064 | bytesToBase64: function(bytes) {
|
17065 | for (var base64 = [], i = 0; i < bytes.length; i += 3) {
|
17066 | var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
|
17067 | for (var j = 0; j < 4; j++)
|
17068 | if (i * 8 + j * 6 <= bytes.length * 8)
|
17069 | base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));
|
17070 | else
|
17071 | base64.push('=');
|
17072 | }
|
17073 | return base64.join('');
|
17074 | },
|
17075 |
|
17076 |
|
17077 | base64ToBytes: function(base64) {
|
17078 |
|
17079 | base64 = base64.replace(/[^A-Z0-9+\/]/ig, '');
|
17080 |
|
17081 | for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
|
17082 | imod4 = ++i % 4) {
|
17083 | if (imod4 == 0) continue;
|
17084 | bytes.push(((base64map.indexOf(base64.charAt(i - 1))
|
17085 | & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))
|
17086 | | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
|
17087 | }
|
17088 | return bytes;
|
17089 | }
|
17090 | };
|
17091 |
|
17092 | module.exports = crypt;
|
17093 | })();
|
17094 |
|
17095 |
|
17096 | }),
|
17097 |
|
17098 | (function(module, exports) {
|
17099 |
|
17100 |
|
17101 |
|
17102 |
|
17103 |
|
17104 |
|
17105 |
|
17106 |
|
17107 |
|
17108 |
|
17109 | module.exports = function (obj) {
|
17110 | return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
|
17111 | }
|
17112 |
|
17113 | function isBuffer (obj) {
|
17114 | return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
|
17115 | }
|
17116 |
|
17117 |
|
17118 | function isSlowBuffer (obj) {
|
17119 | return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
|
17120 | }
|
17121 |
|
17122 |
|
17123 | }),
|
17124 |
|
17125 | (function(module, exports, __webpack_require__) {
|
17126 |
|
17127 | "use strict";
|
17128 |
|
17129 |
|
17130 | var _interopRequireDefault = __webpack_require__(1);
|
17131 |
|
17132 | var _indexOf = _interopRequireDefault(__webpack_require__(86));
|
17133 |
|
17134 | var dataURItoBlob = function dataURItoBlob(dataURI, type) {
|
17135 | var _context;
|
17136 |
|
17137 | var byteString;
|
17138 |
|
17139 | if ((0, _indexOf.default)(dataURI).call(dataURI, 'base64') < 0) {
|
17140 | byteString = atob(dataURI);
|
17141 | } else if ((0, _indexOf.default)(_context = dataURI.split(',')[0]).call(_context, 'base64') >= 0) {
|
17142 | type = type || dataURI.split(',')[0].split(':')[1].split(';')[0];
|
17143 | byteString = atob(dataURI.split(',')[1]);
|
17144 | } else {
|
17145 | byteString = unescape(dataURI.split(',')[1]);
|
17146 | }
|
17147 |
|
17148 | var ia = new Uint8Array(byteString.length);
|
17149 |
|
17150 | for (var i = 0; i < byteString.length; i++) {
|
17151 | ia[i] = byteString.charCodeAt(i);
|
17152 | }
|
17153 |
|
17154 | return new Blob([ia], {
|
17155 | type: type
|
17156 | });
|
17157 | };
|
17158 |
|
17159 | module.exports = dataURItoBlob;
|
17160 |
|
17161 | }),
|
17162 |
|
17163 | (function(module, exports, __webpack_require__) {
|
17164 |
|
17165 | "use strict";
|
17166 |
|
17167 |
|
17168 | var _interopRequireDefault = __webpack_require__(1);
|
17169 |
|
17170 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(507));
|
17171 |
|
17172 | var _map = _interopRequireDefault(__webpack_require__(42));
|
17173 |
|
17174 | var _indexOf = _interopRequireDefault(__webpack_require__(86));
|
17175 |
|
17176 | var _find = _interopRequireDefault(__webpack_require__(110));
|
17177 |
|
17178 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
17179 |
|
17180 | var _concat = _interopRequireDefault(__webpack_require__(30));
|
17181 |
|
17182 | var _keys2 = _interopRequireDefault(__webpack_require__(55));
|
17183 |
|
17184 | var _stringify = _interopRequireDefault(__webpack_require__(36));
|
17185 |
|
17186 | var _defineProperty = _interopRequireDefault(__webpack_require__(143));
|
17187 |
|
17188 | var _getOwnPropertyDescriptor = _interopRequireDefault(__webpack_require__(246));
|
17189 |
|
17190 | var _ = __webpack_require__(2);
|
17191 |
|
17192 | var AVError = __webpack_require__(43);
|
17193 |
|
17194 | var _require = __webpack_require__(26),
|
17195 | _request = _require._request;
|
17196 |
|
17197 | var _require2 = __webpack_require__(29),
|
17198 | isNullOrUndefined = _require2.isNullOrUndefined,
|
17199 | ensureArray = _require2.ensureArray,
|
17200 | transformFetchOptions = _require2.transformFetchOptions,
|
17201 | setValue = _require2.setValue,
|
17202 | findValue = _require2.findValue,
|
17203 | isPlainObject = _require2.isPlainObject,
|
17204 | continueWhile = _require2.continueWhile;
|
17205 |
|
17206 | var recursiveToPointer = function recursiveToPointer(value) {
|
17207 | if (_.isArray(value)) return (0, _map.default)(value).call(value, recursiveToPointer);
|
17208 | if (isPlainObject(value)) return _.mapObject(value, recursiveToPointer);
|
17209 | if (_.isObject(value) && value._toPointer) return value._toPointer();
|
17210 | return value;
|
17211 | };
|
17212 |
|
17213 | var RESERVED_KEYS = ['objectId', 'createdAt', 'updatedAt'];
|
17214 |
|
17215 | var checkReservedKey = function checkReservedKey(key) {
|
17216 | if ((0, _indexOf.default)(RESERVED_KEYS).call(RESERVED_KEYS, key) !== -1) {
|
17217 | throw new Error("key[".concat(key, "] is reserved"));
|
17218 | }
|
17219 | };
|
17220 |
|
17221 | var handleBatchResults = function handleBatchResults(results) {
|
17222 | var firstError = (0, _find.default)(_).call(_, results, function (result) {
|
17223 | return result instanceof Error;
|
17224 | });
|
17225 |
|
17226 | if (!firstError) {
|
17227 | return results;
|
17228 | }
|
17229 |
|
17230 | var error = new AVError(firstError.code, firstError.message);
|
17231 | error.results = results;
|
17232 | throw error;
|
17233 | };
|
17234 |
|
17235 |
|
17236 |
|
17237 | function getValue(object, prop) {
|
17238 | if (!(object && object[prop])) {
|
17239 | return null;
|
17240 | }
|
17241 |
|
17242 | return _.isFunction(object[prop]) ? object[prop]() : object[prop];
|
17243 | }
|
17244 |
|
17245 |
|
17246 |
|
17247 | module.exports = function (AV) {
|
17248 | |
17249 |
|
17250 |
|
17251 |
|
17252 |
|
17253 |
|
17254 |
|
17255 |
|
17256 |
|
17257 |
|
17258 |
|
17259 |
|
17260 |
|
17261 |
|
17262 |
|
17263 |
|
17264 |
|
17265 |
|
17266 |
|
17267 |
|
17268 |
|
17269 |
|
17270 |
|
17271 |
|
17272 |
|
17273 |
|
17274 |
|
17275 | AV.Object = function (attributes, options) {
|
17276 |
|
17277 | if (_.isString(attributes)) {
|
17278 | return AV.Object._create.apply(this, arguments);
|
17279 | }
|
17280 |
|
17281 | attributes = attributes || {};
|
17282 |
|
17283 | if (options && options.parse) {
|
17284 | attributes = this.parse(attributes);
|
17285 | attributes = this._mergeMagicFields(attributes);
|
17286 | }
|
17287 |
|
17288 | var defaults = getValue(this, 'defaults');
|
17289 |
|
17290 | if (defaults) {
|
17291 | attributes = _.extend({}, defaults, attributes);
|
17292 | }
|
17293 |
|
17294 | if (options && options.collection) {
|
17295 | this.collection = options.collection;
|
17296 | }
|
17297 |
|
17298 | this._serverData = {};
|
17299 |
|
17300 | this._opSetQueue = [{}];
|
17301 |
|
17302 | this._flags = {};
|
17303 | this.attributes = {};
|
17304 |
|
17305 | this._hashedJSON = {};
|
17306 |
|
17307 | this._escapedAttributes = {};
|
17308 | this.cid = _.uniqueId('c');
|
17309 | this.changed = {};
|
17310 | this._silent = {};
|
17311 | this._pending = {};
|
17312 | this.set(attributes, {
|
17313 | silent: true
|
17314 | });
|
17315 | this.changed = {};
|
17316 | this._silent = {};
|
17317 | this._pending = {};
|
17318 | this._hasData = true;
|
17319 | this._previousAttributes = _.clone(this.attributes);
|
17320 | this.initialize.apply(this, arguments);
|
17321 | };
|
17322 | |
17323 |
|
17324 |
|
17325 |
|
17326 |
|
17327 | |
17328 |
|
17329 |
|
17330 |
|
17331 |
|
17332 |
|
17333 |
|
17334 |
|
17335 |
|
17336 |
|
17337 |
|
17338 |
|
17339 |
|
17340 |
|
17341 |
|
17342 | AV.Object.saveAll = function (list, options) {
|
17343 | return AV.Object._deepSaveAsync(list, null, options);
|
17344 | };
|
17345 | |
17346 |
|
17347 |
|
17348 |
|
17349 |
|
17350 |
|
17351 |
|
17352 |
|
17353 |
|
17354 | AV.Object.fetchAll = function (objects, options) {
|
17355 | return _promise.default.resolve().then(function () {
|
17356 | return _request('batch', null, null, 'POST', {
|
17357 | requests: (0, _map.default)(_).call(_, objects, function (object) {
|
17358 | var _context;
|
17359 |
|
17360 | if (!object.className) throw new Error('object must have className to fetch');
|
17361 | if (!object.id) throw new Error('object must have id to fetch');
|
17362 | if (object.dirty()) throw new Error('object is modified but not saved');
|
17363 | return {
|
17364 | method: 'GET',
|
17365 | path: (0, _concat.default)(_context = "/1.1/classes/".concat(object.className, "/")).call(_context, object.id)
|
17366 | };
|
17367 | })
|
17368 | }, options);
|
17369 | }).then(function (response) {
|
17370 | var results = (0, _map.default)(_).call(_, objects, function (object, i) {
|
17371 | if (response[i].success) {
|
17372 | var fetchedAttrs = object.parse(response[i].success);
|
17373 |
|
17374 | object._cleanupUnsetKeys(fetchedAttrs);
|
17375 |
|
17376 | object._finishFetch(fetchedAttrs);
|
17377 |
|
17378 | return object;
|
17379 | }
|
17380 |
|
17381 | if (response[i].success === null) {
|
17382 | return new AVError(AVError.OBJECT_NOT_FOUND, 'Object not found.');
|
17383 | }
|
17384 |
|
17385 | return new AVError(response[i].error.code, response[i].error.error);
|
17386 | });
|
17387 | return handleBatchResults(results);
|
17388 | });
|
17389 | };
|
17390 |
|
17391 |
|
17392 | _.extend(AV.Object.prototype, AV.Events,
|
17393 |
|
17394 | {
|
17395 | _fetchWhenSave: false,
|
17396 |
|
17397 | |
17398 |
|
17399 |
|
17400 |
|
17401 | initialize: function initialize() {},
|
17402 |
|
17403 | |
17404 |
|
17405 |
|
17406 |
|
17407 |
|
17408 |
|
17409 |
|
17410 |
|
17411 | fetchWhenSave: function fetchWhenSave(enable) {
|
17412 | console.warn('AV.Object#fetchWhenSave is deprecated, use AV.Object#save with options.fetchWhenSave instead.');
|
17413 |
|
17414 | if (!_.isBoolean(enable)) {
|
17415 | throw new Error('Expect boolean value for fetchWhenSave');
|
17416 | }
|
17417 |
|
17418 | this._fetchWhenSave = enable;
|
17419 | },
|
17420 |
|
17421 | |
17422 |
|
17423 |
|
17424 |
|
17425 | getObjectId: function getObjectId() {
|
17426 | return this.id;
|
17427 | },
|
17428 |
|
17429 | |
17430 |
|
17431 |
|
17432 |
|
17433 | getCreatedAt: function getCreatedAt() {
|
17434 | return this.createdAt;
|
17435 | },
|
17436 |
|
17437 | |
17438 |
|
17439 |
|
17440 |
|
17441 | getUpdatedAt: function getUpdatedAt() {
|
17442 | return this.updatedAt;
|
17443 | },
|
17444 |
|
17445 | |
17446 |
|
17447 |
|
17448 |
|
17449 | toJSON: function toJSON(key, holder) {
|
17450 | var seenObjects = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
17451 | return this._toFullJSON(seenObjects, false);
|
17452 | },
|
17453 |
|
17454 | |
17455 |
|
17456 |
|
17457 |
|
17458 |
|
17459 |
|
17460 | toFullJSON: function toFullJSON() {
|
17461 | var seenObjects = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
17462 | return this._toFullJSON(seenObjects);
|
17463 | },
|
17464 | _toFullJSON: function _toFullJSON(seenObjects) {
|
17465 | var _this = this;
|
17466 |
|
17467 | var full = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
17468 |
|
17469 | var json = _.clone(this.attributes);
|
17470 |
|
17471 | if (_.isArray(seenObjects)) {
|
17472 | var newSeenObjects = (0, _concat.default)(seenObjects).call(seenObjects, this);
|
17473 | }
|
17474 |
|
17475 | AV._objectEach(json, function (val, key) {
|
17476 | json[key] = AV._encode(val, newSeenObjects, undefined, full);
|
17477 | });
|
17478 |
|
17479 | AV._objectEach(this._operations, function (val, key) {
|
17480 | json[key] = val;
|
17481 | });
|
17482 |
|
17483 | if (_.has(this, 'id')) {
|
17484 | json.objectId = this.id;
|
17485 | }
|
17486 |
|
17487 | ['createdAt', 'updatedAt'].forEach(function (key) {
|
17488 | if (_.has(_this, key)) {
|
17489 | var val = _this[key];
|
17490 | json[key] = _.isDate(val) ? val.toJSON() : val;
|
17491 | }
|
17492 | });
|
17493 |
|
17494 | if (full) {
|
17495 | json.__type = 'Object';
|
17496 | if (_.isArray(seenObjects) && seenObjects.length) json.__type = 'Pointer';
|
17497 | json.className = this.className;
|
17498 | }
|
17499 |
|
17500 | return json;
|
17501 | },
|
17502 |
|
17503 | |
17504 |
|
17505 |
|
17506 |
|
17507 |
|
17508 | _refreshCache: function _refreshCache() {
|
17509 | var self = this;
|
17510 |
|
17511 | if (self._refreshingCache) {
|
17512 | return;
|
17513 | }
|
17514 |
|
17515 | self._refreshingCache = true;
|
17516 |
|
17517 | AV._objectEach(this.attributes, function (value, key) {
|
17518 | if (value instanceof AV.Object) {
|
17519 | value._refreshCache();
|
17520 | } else if (_.isObject(value)) {
|
17521 | if (self._resetCacheForKey(key)) {
|
17522 | self.set(key, new AV.Op.Set(value), {
|
17523 | silent: true
|
17524 | });
|
17525 | }
|
17526 | }
|
17527 | });
|
17528 |
|
17529 | delete self._refreshingCache;
|
17530 | },
|
17531 |
|
17532 | |
17533 |
|
17534 |
|
17535 |
|
17536 |
|
17537 |
|
17538 |
|
17539 | dirty: function dirty(attr) {
|
17540 | this._refreshCache();
|
17541 |
|
17542 | var currentChanges = _.last(this._opSetQueue);
|
17543 |
|
17544 | if (attr) {
|
17545 | return currentChanges[attr] ? true : false;
|
17546 | }
|
17547 |
|
17548 | if (!this.id) {
|
17549 | return true;
|
17550 | }
|
17551 |
|
17552 | if ((0, _keys2.default)(_).call(_, currentChanges).length > 0) {
|
17553 | return true;
|
17554 | }
|
17555 |
|
17556 | return false;
|
17557 | },
|
17558 |
|
17559 | |
17560 |
|
17561 |
|
17562 |
|
17563 | dirtyKeys: function dirtyKeys() {
|
17564 | this._refreshCache();
|
17565 |
|
17566 | var currentChanges = _.last(this._opSetQueue);
|
17567 |
|
17568 | return (0, _keys2.default)(_).call(_, currentChanges);
|
17569 | },
|
17570 |
|
17571 | |
17572 |
|
17573 |
|
17574 |
|
17575 | _toPointer: function _toPointer() {
|
17576 |
|
17577 |
|
17578 |
|
17579 | return {
|
17580 | __type: 'Pointer',
|
17581 | className: this.className,
|
17582 | objectId: this.id
|
17583 | };
|
17584 | },
|
17585 |
|
17586 | |
17587 |
|
17588 |
|
17589 |
|
17590 | get: function get(attr) {
|
17591 | switch (attr) {
|
17592 | case 'objectId':
|
17593 | return this.id;
|
17594 |
|
17595 | case 'createdAt':
|
17596 | case 'updatedAt':
|
17597 | return this[attr];
|
17598 |
|
17599 | default:
|
17600 | return this.attributes[attr];
|
17601 | }
|
17602 | },
|
17603 |
|
17604 | |
17605 |
|
17606 |
|
17607 |
|
17608 |
|
17609 | relation: function relation(attr) {
|
17610 | var value = this.get(attr);
|
17611 |
|
17612 | if (value) {
|
17613 | if (!(value instanceof AV.Relation)) {
|
17614 | throw new Error('Called relation() on non-relation field ' + attr);
|
17615 | }
|
17616 |
|
17617 | value._ensureParentAndKey(this, attr);
|
17618 |
|
17619 | return value;
|
17620 | } else {
|
17621 | return new AV.Relation(this, attr);
|
17622 | }
|
17623 | },
|
17624 |
|
17625 | |
17626 |
|
17627 |
|
17628 | escape: function escape(attr) {
|
17629 | var html = this._escapedAttributes[attr];
|
17630 |
|
17631 | if (html) {
|
17632 | return html;
|
17633 | }
|
17634 |
|
17635 | var val = this.attributes[attr];
|
17636 | var escaped;
|
17637 |
|
17638 | if (isNullOrUndefined(val)) {
|
17639 | escaped = '';
|
17640 | } else {
|
17641 | escaped = _.escape(val.toString());
|
17642 | }
|
17643 |
|
17644 | this._escapedAttributes[attr] = escaped;
|
17645 | return escaped;
|
17646 | },
|
17647 |
|
17648 | |
17649 |
|
17650 |
|
17651 |
|
17652 |
|
17653 |
|
17654 | has: function has(attr) {
|
17655 | return !isNullOrUndefined(this.attributes[attr]);
|
17656 | },
|
17657 |
|
17658 | |
17659 |
|
17660 |
|
17661 |
|
17662 |
|
17663 |
|
17664 | _mergeMagicFields: function _mergeMagicFields(attrs) {
|
17665 |
|
17666 | var model = this;
|
17667 | var specialFields = ['objectId', 'createdAt', 'updatedAt'];
|
17668 |
|
17669 | AV._arrayEach(specialFields, function (attr) {
|
17670 | if (attrs[attr]) {
|
17671 | if (attr === 'objectId') {
|
17672 | model.id = attrs[attr];
|
17673 | } else if ((attr === 'createdAt' || attr === 'updatedAt') && !_.isDate(attrs[attr])) {
|
17674 | model[attr] = AV._parseDate(attrs[attr]);
|
17675 | } else {
|
17676 | model[attr] = attrs[attr];
|
17677 | }
|
17678 |
|
17679 | delete attrs[attr];
|
17680 | }
|
17681 | });
|
17682 |
|
17683 | return attrs;
|
17684 | },
|
17685 |
|
17686 | |
17687 |
|
17688 |
|
17689 |
|
17690 | _startSave: function _startSave() {
|
17691 | this._opSetQueue.push({});
|
17692 | },
|
17693 |
|
17694 | |
17695 |
|
17696 |
|
17697 |
|
17698 |
|
17699 |
|
17700 |
|
17701 |
|
17702 |
|
17703 |
|
17704 |
|
17705 |
|
17706 |
|
17707 | _cancelSave: function _cancelSave() {
|
17708 | var failedChanges = _.first(this._opSetQueue);
|
17709 |
|
17710 | this._opSetQueue = _.rest(this._opSetQueue);
|
17711 |
|
17712 | var nextChanges = _.first(this._opSetQueue);
|
17713 |
|
17714 | AV._objectEach(failedChanges, function (op, key) {
|
17715 | var op1 = failedChanges[key];
|
17716 | var op2 = nextChanges[key];
|
17717 |
|
17718 | if (op1 && op2) {
|
17719 | nextChanges[key] = op2._mergeWithPrevious(op1);
|
17720 | } else if (op1) {
|
17721 | nextChanges[key] = op1;
|
17722 | }
|
17723 | });
|
17724 |
|
17725 | this._saving = this._saving - 1;
|
17726 | },
|
17727 |
|
17728 | |
17729 |
|
17730 |
|
17731 |
|
17732 |
|
17733 |
|
17734 | _finishSave: function _finishSave(serverData) {
|
17735 | var _context2;
|
17736 |
|
17737 |
|
17738 |
|
17739 |
|
17740 |
|
17741 | var fetchedObjects = {};
|
17742 |
|
17743 | AV._traverse(this.attributes, function (object) {
|
17744 | if (object instanceof AV.Object && object.id && object._hasData) {
|
17745 | fetchedObjects[object.id] = object;
|
17746 | }
|
17747 | });
|
17748 |
|
17749 | var savedChanges = _.first(this._opSetQueue);
|
17750 |
|
17751 | this._opSetQueue = _.rest(this._opSetQueue);
|
17752 |
|
17753 | this._applyOpSet(savedChanges, this._serverData);
|
17754 |
|
17755 | this._mergeMagicFields(serverData);
|
17756 |
|
17757 | var self = this;
|
17758 |
|
17759 | AV._objectEach(serverData, function (value, key) {
|
17760 | self._serverData[key] = AV._decode(value, key);
|
17761 |
|
17762 |
|
17763 | var fetched = AV._traverse(self._serverData[key], function (object) {
|
17764 | if (object instanceof AV.Object && fetchedObjects[object.id]) {
|
17765 | return fetchedObjects[object.id];
|
17766 | }
|
17767 | });
|
17768 |
|
17769 | if (fetched) {
|
17770 | self._serverData[key] = fetched;
|
17771 | }
|
17772 | });
|
17773 |
|
17774 | this._rebuildAllEstimatedData();
|
17775 |
|
17776 | var opSetQueue = (0, _map.default)(_context2 = this._opSetQueue).call(_context2, _.clone);
|
17777 |
|
17778 | this._refreshCache();
|
17779 |
|
17780 | this._opSetQueue = opSetQueue;
|
17781 | this._saving = this._saving - 1;
|
17782 | },
|
17783 |
|
17784 | |
17785 |
|
17786 |
|
17787 |
|
17788 |
|
17789 | _finishFetch: function _finishFetch(serverData, hasData) {
|
17790 |
|
17791 | this._opSetQueue = [{}];
|
17792 |
|
17793 | this._mergeMagicFields(serverData);
|
17794 |
|
17795 | var self = this;
|
17796 |
|
17797 | AV._objectEach(serverData, function (value, key) {
|
17798 | self._serverData[key] = AV._decode(value, key);
|
17799 | });
|
17800 |
|
17801 |
|
17802 | this._rebuildAllEstimatedData();
|
17803 |
|
17804 |
|
17805 | this._refreshCache();
|
17806 |
|
17807 | this._opSetQueue = [{}];
|
17808 | this._hasData = hasData;
|
17809 | },
|
17810 |
|
17811 | |
17812 |
|
17813 |
|
17814 |
|
17815 | _applyOpSet: function _applyOpSet(opSet, target) {
|
17816 | var self = this;
|
17817 |
|
17818 | AV._objectEach(opSet, function (change, key) {
|
17819 | var _findValue = findValue(target, key),
|
17820 | _findValue2 = (0, _slicedToArray2.default)(_findValue, 3),
|
17821 | value = _findValue2[0],
|
17822 | actualTarget = _findValue2[1],
|
17823 | actualKey = _findValue2[2];
|
17824 |
|
17825 | setValue(target, key, change._estimate(value, self, key));
|
17826 |
|
17827 | if (actualTarget && actualTarget[actualKey] === AV.Op._UNSET) {
|
17828 | delete actualTarget[actualKey];
|
17829 | }
|
17830 | });
|
17831 | },
|
17832 |
|
17833 | |
17834 |
|
17835 |
|
17836 |
|
17837 |
|
17838 | _resetCacheForKey: function _resetCacheForKey(key) {
|
17839 | var value = this.attributes[key];
|
17840 |
|
17841 | if (_.isObject(value) && !(value instanceof AV.Object) && !(value instanceof AV.File)) {
|
17842 | var json = (0, _stringify.default)(recursiveToPointer(value));
|
17843 |
|
17844 | if (this._hashedJSON[key] !== json) {
|
17845 | var wasSet = !!this._hashedJSON[key];
|
17846 | this._hashedJSON[key] = json;
|
17847 | return wasSet;
|
17848 | }
|
17849 | }
|
17850 |
|
17851 | return false;
|
17852 | },
|
17853 |
|
17854 | |
17855 |
|
17856 |
|
17857 |
|
17858 |
|
17859 |
|
17860 | _rebuildEstimatedDataForKey: function _rebuildEstimatedDataForKey(key) {
|
17861 | var self = this;
|
17862 | delete this.attributes[key];
|
17863 |
|
17864 | if (this._serverData[key]) {
|
17865 | this.attributes[key] = this._serverData[key];
|
17866 | }
|
17867 |
|
17868 | AV._arrayEach(this._opSetQueue, function (opSet) {
|
17869 | var op = opSet[key];
|
17870 |
|
17871 | if (op) {
|
17872 | var _findValue3 = findValue(self.attributes, key),
|
17873 | _findValue4 = (0, _slicedToArray2.default)(_findValue3, 4),
|
17874 | value = _findValue4[0],
|
17875 | actualTarget = _findValue4[1],
|
17876 | actualKey = _findValue4[2],
|
17877 | firstKey = _findValue4[3];
|
17878 |
|
17879 | setValue(self.attributes, key, op._estimate(value, self, key));
|
17880 |
|
17881 | if (actualTarget && actualTarget[actualKey] === AV.Op._UNSET) {
|
17882 | delete actualTarget[actualKey];
|
17883 | }
|
17884 |
|
17885 | self._resetCacheForKey(firstKey);
|
17886 | }
|
17887 | });
|
17888 | },
|
17889 |
|
17890 | |
17891 |
|
17892 |
|
17893 |
|
17894 |
|
17895 |
|
17896 | _rebuildAllEstimatedData: function _rebuildAllEstimatedData() {
|
17897 | var self = this;
|
17898 |
|
17899 | var previousAttributes = _.clone(this.attributes);
|
17900 |
|
17901 | this.attributes = _.clone(this._serverData);
|
17902 |
|
17903 | AV._arrayEach(this._opSetQueue, function (opSet) {
|
17904 | self._applyOpSet(opSet, self.attributes);
|
17905 |
|
17906 | AV._objectEach(opSet, function (op, key) {
|
17907 | self._resetCacheForKey(key);
|
17908 | });
|
17909 | });
|
17910 |
|
17911 |
|
17912 | AV._objectEach(previousAttributes, function (oldValue, key) {
|
17913 | if (self.attributes[key] !== oldValue) {
|
17914 | self.trigger('change:' + key, self, self.attributes[key], {});
|
17915 | }
|
17916 | });
|
17917 |
|
17918 | AV._objectEach(this.attributes, function (newValue, key) {
|
17919 | if (!_.has(previousAttributes, key)) {
|
17920 | self.trigger('change:' + key, self, newValue, {});
|
17921 | }
|
17922 | });
|
17923 | },
|
17924 |
|
17925 | |
17926 |
|
17927 |
|
17928 |
|
17929 |
|
17930 |
|
17931 |
|
17932 |
|
17933 |
|
17934 |
|
17935 |
|
17936 |
|
17937 |
|
17938 |
|
17939 |
|
17940 |
|
17941 |
|
17942 |
|
17943 |
|
17944 |
|
17945 |
|
17946 |
|
17947 |
|
17948 |
|
17949 | set: function set(key, value, options) {
|
17950 | var attrs;
|
17951 |
|
17952 | if (_.isObject(key) || isNullOrUndefined(key)) {
|
17953 | attrs = _.mapObject(key, function (v, k) {
|
17954 | checkReservedKey(k);
|
17955 | return AV._decode(v, k);
|
17956 | });
|
17957 | options = value;
|
17958 | } else {
|
17959 | attrs = {};
|
17960 | checkReservedKey(key);
|
17961 | attrs[key] = AV._decode(value, key);
|
17962 | }
|
17963 |
|
17964 |
|
17965 | options = options || {};
|
17966 |
|
17967 | if (!attrs) {
|
17968 | return this;
|
17969 | }
|
17970 |
|
17971 | if (attrs instanceof AV.Object) {
|
17972 | attrs = attrs.attributes;
|
17973 | }
|
17974 |
|
17975 |
|
17976 | if (options.unset) {
|
17977 | AV._objectEach(attrs, function (unused_value, key) {
|
17978 | attrs[key] = new AV.Op.Unset();
|
17979 | });
|
17980 | }
|
17981 |
|
17982 |
|
17983 | var dataToValidate = _.clone(attrs);
|
17984 |
|
17985 | var self = this;
|
17986 |
|
17987 | AV._objectEach(dataToValidate, function (value, key) {
|
17988 | if (value instanceof AV.Op) {
|
17989 | dataToValidate[key] = value._estimate(self.attributes[key], self, key);
|
17990 |
|
17991 | if (dataToValidate[key] === AV.Op._UNSET) {
|
17992 | delete dataToValidate[key];
|
17993 | }
|
17994 | }
|
17995 | });
|
17996 |
|
17997 |
|
17998 | this._validate(attrs, options);
|
17999 |
|
18000 | options.changes = {};
|
18001 | var escaped = this._escapedAttributes;
|
18002 |
|
18003 | AV._arrayEach((0, _keys2.default)(_).call(_, attrs), function (attr) {
|
18004 | var val = attrs[attr];
|
18005 |
|
18006 |
|
18007 |
|
18008 | if (val instanceof AV.Relation) {
|
18009 | val.parent = self;
|
18010 | }
|
18011 |
|
18012 | if (!(val instanceof AV.Op)) {
|
18013 | val = new AV.Op.Set(val);
|
18014 | }
|
18015 |
|
18016 |
|
18017 | var isRealChange = true;
|
18018 |
|
18019 | if (val instanceof AV.Op.Set && _.isEqual(self.attributes[attr], val.value)) {
|
18020 | isRealChange = false;
|
18021 | }
|
18022 |
|
18023 | if (isRealChange) {
|
18024 | delete escaped[attr];
|
18025 |
|
18026 | if (options.silent) {
|
18027 | self._silent[attr] = true;
|
18028 | } else {
|
18029 | options.changes[attr] = true;
|
18030 | }
|
18031 | }
|
18032 |
|
18033 | var currentChanges = _.last(self._opSetQueue);
|
18034 |
|
18035 | currentChanges[attr] = val._mergeWithPrevious(currentChanges[attr]);
|
18036 |
|
18037 | self._rebuildEstimatedDataForKey(attr);
|
18038 |
|
18039 | if (isRealChange) {
|
18040 | self.changed[attr] = self.attributes[attr];
|
18041 |
|
18042 | if (!options.silent) {
|
18043 | self._pending[attr] = true;
|
18044 | }
|
18045 | } else {
|
18046 | delete self.changed[attr];
|
18047 | delete self._pending[attr];
|
18048 | }
|
18049 | });
|
18050 |
|
18051 | if (!options.silent) {
|
18052 | this.change(options);
|
18053 | }
|
18054 |
|
18055 | return this;
|
18056 | },
|
18057 |
|
18058 | |
18059 |
|
18060 |
|
18061 |
|
18062 |
|
18063 |
|
18064 | unset: function unset(attr, options) {
|
18065 | options = options || {};
|
18066 | options.unset = true;
|
18067 | return this.set(attr, null, options);
|
18068 | },
|
18069 |
|
18070 | |
18071 |
|
18072 |
|
18073 |
|
18074 |
|
18075 |
|
18076 |
|
18077 | increment: function increment(attr, amount) {
|
18078 | if (_.isUndefined(amount) || _.isNull(amount)) {
|
18079 | amount = 1;
|
18080 | }
|
18081 |
|
18082 | return this.set(attr, new AV.Op.Increment(amount));
|
18083 | },
|
18084 |
|
18085 | |
18086 |
|
18087 |
|
18088 |
|
18089 |
|
18090 |
|
18091 | add: function add(attr, item) {
|
18092 | return this.set(attr, new AV.Op.Add(ensureArray(item)));
|
18093 | },
|
18094 |
|
18095 | |
18096 |
|
18097 |
|
18098 |
|
18099 |
|
18100 |
|
18101 |
|
18102 |
|
18103 | addUnique: function addUnique(attr, item) {
|
18104 | return this.set(attr, new AV.Op.AddUnique(ensureArray(item)));
|
18105 | },
|
18106 |
|
18107 | |
18108 |
|
18109 |
|
18110 |
|
18111 |
|
18112 |
|
18113 |
|
18114 | remove: function remove(attr, item) {
|
18115 | return this.set(attr, new AV.Op.Remove(ensureArray(item)));
|
18116 | },
|
18117 |
|
18118 | |
18119 |
|
18120 |
|
18121 |
|
18122 |
|
18123 |
|
18124 |
|
18125 | bitAnd: function bitAnd(attr, value) {
|
18126 | return this.set(attr, new AV.Op.BitAnd(value));
|
18127 | },
|
18128 |
|
18129 | |
18130 |
|
18131 |
|
18132 |
|
18133 |
|
18134 |
|
18135 |
|
18136 | bitOr: function bitOr(attr, value) {
|
18137 | return this.set(attr, new AV.Op.BitOr(value));
|
18138 | },
|
18139 |
|
18140 | |
18141 |
|
18142 |
|
18143 |
|
18144 |
|
18145 |
|
18146 |
|
18147 | bitXor: function bitXor(attr, value) {
|
18148 | return this.set(attr, new AV.Op.BitXor(value));
|
18149 | },
|
18150 |
|
18151 | |
18152 |
|
18153 |
|
18154 |
|
18155 |
|
18156 |
|
18157 |
|
18158 |
|
18159 |
|
18160 | op: function op(attr) {
|
18161 | return _.last(this._opSetQueue)[attr];
|
18162 | },
|
18163 |
|
18164 | |
18165 |
|
18166 |
|
18167 |
|
18168 | clear: function clear(options) {
|
18169 | options = options || {};
|
18170 | options.unset = true;
|
18171 |
|
18172 | var keysToClear = _.extend(this.attributes, this._operations);
|
18173 |
|
18174 | return this.set(keysToClear, options);
|
18175 | },
|
18176 |
|
18177 | |
18178 |
|
18179 |
|
18180 |
|
18181 | revert: function revert(keys) {
|
18182 | var lastOp = _.last(this._opSetQueue);
|
18183 |
|
18184 | var _keys = ensureArray(keys || (0, _keys2.default)(_).call(_, lastOp));
|
18185 |
|
18186 | _keys.forEach(function (key) {
|
18187 | delete lastOp[key];
|
18188 | });
|
18189 |
|
18190 | this._rebuildAllEstimatedData();
|
18191 |
|
18192 | return this;
|
18193 | },
|
18194 |
|
18195 | |
18196 |
|
18197 |
|
18198 |
|
18199 |
|
18200 | _getSaveJSON: function _getSaveJSON() {
|
18201 | var json = _.clone(_.first(this._opSetQueue));
|
18202 |
|
18203 | AV._objectEach(json, function (op, key) {
|
18204 | json[key] = op.toJSON();
|
18205 | });
|
18206 |
|
18207 | return json;
|
18208 | },
|
18209 |
|
18210 | |
18211 |
|
18212 |
|
18213 |
|
18214 | _canBeSerialized: function _canBeSerialized() {
|
18215 | return AV.Object._canBeSerializedAsValue(this.attributes);
|
18216 | },
|
18217 |
|
18218 | |
18219 |
|
18220 |
|
18221 |
|
18222 |
|
18223 |
|
18224 |
|
18225 |
|
18226 |
|
18227 |
|
18228 | fetch: function fetch() {
|
18229 | var fetchOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
18230 | var options = arguments.length > 1 ? arguments[1] : undefined;
|
18231 |
|
18232 | if (!this.id) {
|
18233 | throw new Error('Cannot fetch unsaved object');
|
18234 | }
|
18235 |
|
18236 | var self = this;
|
18237 |
|
18238 | var request = _request('classes', this.className, this.id, 'GET', transformFetchOptions(fetchOptions), options);
|
18239 |
|
18240 | return request.then(function (response) {
|
18241 | var fetchedAttrs = self.parse(response);
|
18242 |
|
18243 | self._cleanupUnsetKeys(fetchedAttrs, (0, _keys2.default)(fetchOptions) ? ensureArray((0, _keys2.default)(fetchOptions)).join(',').split(',') : undefined);
|
18244 |
|
18245 | self._finishFetch(fetchedAttrs, true);
|
18246 |
|
18247 | return self;
|
18248 | });
|
18249 | },
|
18250 | _cleanupUnsetKeys: function _cleanupUnsetKeys(fetchedAttrs) {
|
18251 | var _this2 = this;
|
18252 |
|
18253 | var fetchedKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (0, _keys2.default)(_).call(_, this._serverData);
|
18254 |
|
18255 | _.forEach(fetchedKeys, function (key) {
|
18256 | if (fetchedAttrs[key] === undefined) delete _this2._serverData[key];
|
18257 | });
|
18258 | },
|
18259 |
|
18260 | |
18261 |
|
18262 |
|
18263 |
|
18264 |
|
18265 |
|
18266 |
|
18267 |
|
18268 |
|
18269 |
|
18270 |
|
18271 |
|
18272 |
|
18273 |
|
18274 |
|
18275 |
|
18276 |
|
18277 |
|
18278 |
|
18279 |
|
18280 |
|
18281 |
|
18282 |
|
18283 |
|
18284 |
|
18285 |
|
18286 |
|
18287 |
|
18288 |
|
18289 | save: function save(arg1, arg2, arg3) {
|
18290 | var attrs, current, options;
|
18291 |
|
18292 | if (_.isObject(arg1) || isNullOrUndefined(arg1)) {
|
18293 | attrs = arg1;
|
18294 | options = arg2;
|
18295 | } else {
|
18296 | attrs = {};
|
18297 | attrs[arg1] = arg2;
|
18298 | options = arg3;
|
18299 | }
|
18300 |
|
18301 | options = _.clone(options) || {};
|
18302 |
|
18303 | if (options.wait) {
|
18304 | current = _.clone(this.attributes);
|
18305 | }
|
18306 |
|
18307 | var setOptions = _.clone(options) || {};
|
18308 |
|
18309 | if (setOptions.wait) {
|
18310 | setOptions.silent = true;
|
18311 | }
|
18312 |
|
18313 | if (attrs) {
|
18314 | this.set(attrs, setOptions);
|
18315 | }
|
18316 |
|
18317 | var model = this;
|
18318 | var unsavedChildren = [];
|
18319 | var unsavedFiles = [];
|
18320 |
|
18321 | AV.Object._findUnsavedChildren(model, unsavedChildren, unsavedFiles);
|
18322 |
|
18323 | if (unsavedChildren.length + unsavedFiles.length > 1) {
|
18324 | return AV.Object._deepSaveAsync(this, model, options);
|
18325 | }
|
18326 |
|
18327 | this._startSave();
|
18328 |
|
18329 | this._saving = (this._saving || 0) + 1;
|
18330 | this._allPreviousSaves = this._allPreviousSaves || _promise.default.resolve();
|
18331 | this._allPreviousSaves = this._allPreviousSaves.catch(function (e) {}).then(function () {
|
18332 | var method = model.id ? 'PUT' : 'POST';
|
18333 |
|
18334 | var json = model._getSaveJSON();
|
18335 |
|
18336 | var query = {};
|
18337 |
|
18338 | if (model._fetchWhenSave || options.fetchWhenSave) {
|
18339 | query['new'] = 'true';
|
18340 | }
|
18341 |
|
18342 |
|
18343 | if (options._failOnNotExist) {
|
18344 | query.failOnNotExist = 'true';
|
18345 | }
|
18346 |
|
18347 | if (options.query) {
|
18348 | var queryParams;
|
18349 |
|
18350 | if (typeof options.query._getParams === 'function') {
|
18351 | queryParams = options.query._getParams();
|
18352 |
|
18353 | if (queryParams) {
|
18354 | query.where = queryParams.where;
|
18355 | }
|
18356 | }
|
18357 |
|
18358 | if (!query.where) {
|
18359 | var error = new Error('options.query is not an AV.Query');
|
18360 | throw error;
|
18361 | }
|
18362 | }
|
18363 |
|
18364 | _.extend(json, model._flags);
|
18365 |
|
18366 | var route = 'classes';
|
18367 | var className = model.className;
|
18368 |
|
18369 | if (model.className === '_User' && !model.id) {
|
18370 |
|
18371 | route = 'users';
|
18372 | className = null;
|
18373 | }
|
18374 |
|
18375 |
|
18376 | var makeRequest = options._makeRequest || _request;
|
18377 | var requestPromise = makeRequest(route, className, model.id, method, json, options, query);
|
18378 | requestPromise = requestPromise.then(function (resp) {
|
18379 | var serverAttrs = model.parse(resp);
|
18380 |
|
18381 | if (options.wait) {
|
18382 | serverAttrs = _.extend(attrs || {}, serverAttrs);
|
18383 | }
|
18384 |
|
18385 | model._finishSave(serverAttrs);
|
18386 |
|
18387 | if (options.wait) {
|
18388 | model.set(current, setOptions);
|
18389 | }
|
18390 |
|
18391 | return model;
|
18392 | }, function (error) {
|
18393 | model._cancelSave();
|
18394 |
|
18395 | throw error;
|
18396 | });
|
18397 | return requestPromise;
|
18398 | });
|
18399 | return this._allPreviousSaves;
|
18400 | },
|
18401 |
|
18402 | |
18403 |
|
18404 |
|
18405 |
|
18406 |
|
18407 |
|
18408 |
|
18409 |
|
18410 |
|
18411 |
|
18412 | destroy: function destroy(options) {
|
18413 | options = options || {};
|
18414 | var model = this;
|
18415 |
|
18416 | var triggerDestroy = function triggerDestroy() {
|
18417 | model.trigger('destroy', model, model.collection, options);
|
18418 | };
|
18419 |
|
18420 | if (!this.id) {
|
18421 | return triggerDestroy();
|
18422 | }
|
18423 |
|
18424 | if (!options.wait) {
|
18425 | triggerDestroy();
|
18426 | }
|
18427 |
|
18428 | var request = _request('classes', this.className, this.id, 'DELETE', this._flags, options);
|
18429 |
|
18430 | return request.then(function () {
|
18431 | if (options.wait) {
|
18432 | triggerDestroy();
|
18433 | }
|
18434 |
|
18435 | return model;
|
18436 | });
|
18437 | },
|
18438 |
|
18439 | |
18440 |
|
18441 |
|
18442 |
|
18443 | parse: function parse(resp) {
|
18444 | var output = _.clone(resp);
|
18445 |
|
18446 | ['createdAt', 'updatedAt'].forEach(function (key) {
|
18447 | if (output[key]) {
|
18448 | output[key] = AV._parseDate(output[key]);
|
18449 | }
|
18450 | });
|
18451 |
|
18452 | if (output.createdAt && !output.updatedAt) {
|
18453 | output.updatedAt = output.createdAt;
|
18454 | }
|
18455 |
|
18456 | return output;
|
18457 | },
|
18458 |
|
18459 | |
18460 |
|
18461 |
|
18462 |
|
18463 | clone: function clone() {
|
18464 | return new this.constructor(this.attributes);
|
18465 | },
|
18466 |
|
18467 | |
18468 |
|
18469 |
|
18470 |
|
18471 | isNew: function isNew() {
|
18472 | return !this.id;
|
18473 | },
|
18474 |
|
18475 | |
18476 |
|
18477 |
|
18478 |
|
18479 |
|
18480 | change: function change(options) {
|
18481 | options = options || {};
|
18482 | var changing = this._changing;
|
18483 | this._changing = true;
|
18484 |
|
18485 | var self = this;
|
18486 |
|
18487 | AV._objectEach(this._silent, function (attr) {
|
18488 | self._pending[attr] = true;
|
18489 | });
|
18490 |
|
18491 |
|
18492 | var changes = _.extend({}, options.changes, this._silent);
|
18493 |
|
18494 | this._silent = {};
|
18495 |
|
18496 | AV._objectEach(changes, function (unused_value, attr) {
|
18497 | self.trigger('change:' + attr, self, self.get(attr), options);
|
18498 | });
|
18499 |
|
18500 | if (changing) {
|
18501 | return this;
|
18502 | }
|
18503 |
|
18504 |
|
18505 | var deleteChanged = function deleteChanged(value, attr) {
|
18506 | if (!self._pending[attr] && !self._silent[attr]) {
|
18507 | delete self.changed[attr];
|
18508 | }
|
18509 | };
|
18510 |
|
18511 |
|
18512 | while (!_.isEmpty(this._pending)) {
|
18513 | this._pending = {};
|
18514 | this.trigger('change', this, options);
|
18515 |
|
18516 | AV._objectEach(this.changed, deleteChanged);
|
18517 |
|
18518 | self._previousAttributes = _.clone(this.attributes);
|
18519 | }
|
18520 |
|
18521 | this._changing = false;
|
18522 | return this;
|
18523 | },
|
18524 |
|
18525 | |
18526 |
|
18527 |
|
18528 |
|
18529 |
|
18530 | previous: function previous(attr) {
|
18531 | if (!arguments.length || !this._previousAttributes) {
|
18532 | return null;
|
18533 | }
|
18534 |
|
18535 | return this._previousAttributes[attr];
|
18536 | },
|
18537 |
|
18538 | |
18539 |
|
18540 |
|
18541 |
|
18542 |
|
18543 | previousAttributes: function previousAttributes() {
|
18544 | return _.clone(this._previousAttributes);
|
18545 | },
|
18546 |
|
18547 | |
18548 |
|
18549 |
|
18550 |
|
18551 |
|
18552 | isValid: function isValid() {
|
18553 | try {
|
18554 | this.validate(this.attributes);
|
18555 | } catch (error) {
|
18556 | return false;
|
18557 | }
|
18558 |
|
18559 | return true;
|
18560 | },
|
18561 |
|
18562 | |
18563 |
|
18564 |
|
18565 |
|
18566 |
|
18567 |
|
18568 |
|
18569 |
|
18570 |
|
18571 |
|
18572 | validate: function validate(attrs) {
|
18573 | if (_.has(attrs, 'ACL') && !(attrs.ACL instanceof AV.ACL)) {
|
18574 | throw new AVError(AVError.OTHER_CAUSE, 'ACL must be a AV.ACL.');
|
18575 | }
|
18576 | },
|
18577 |
|
18578 | |
18579 |
|
18580 |
|
18581 |
|
18582 |
|
18583 |
|
18584 | _validate: function _validate(attrs, options) {
|
18585 | if (options.silent || !this.validate) {
|
18586 | return;
|
18587 | }
|
18588 |
|
18589 | attrs = _.extend({}, this.attributes, attrs);
|
18590 | this.validate(attrs);
|
18591 | },
|
18592 |
|
18593 | |
18594 |
|
18595 |
|
18596 |
|
18597 |
|
18598 | getACL: function getACL() {
|
18599 | return this.get('ACL');
|
18600 | },
|
18601 |
|
18602 | |
18603 |
|
18604 |
|
18605 |
|
18606 |
|
18607 |
|
18608 |
|
18609 |
|
18610 | setACL: function setACL(acl, options) {
|
18611 | return this.set('ACL', acl, options);
|
18612 | },
|
18613 | disableBeforeHook: function disableBeforeHook() {
|
18614 | this.ignoreHook('beforeSave');
|
18615 | this.ignoreHook('beforeUpdate');
|
18616 | this.ignoreHook('beforeDelete');
|
18617 | },
|
18618 | disableAfterHook: function disableAfterHook() {
|
18619 | this.ignoreHook('afterSave');
|
18620 | this.ignoreHook('afterUpdate');
|
18621 | this.ignoreHook('afterDelete');
|
18622 | },
|
18623 | ignoreHook: function ignoreHook(hookName) {
|
18624 | if (!_.contains(['beforeSave', 'afterSave', 'beforeUpdate', 'afterUpdate', 'beforeDelete', 'afterDelete'], hookName)) {
|
18625 | throw new Error('Unsupported hookName: ' + hookName);
|
18626 | }
|
18627 |
|
18628 | if (!AV.hookKey) {
|
18629 | throw new Error('ignoreHook required hookKey');
|
18630 | }
|
18631 |
|
18632 | if (!this._flags.__ignore_hooks) {
|
18633 | this._flags.__ignore_hooks = [];
|
18634 | }
|
18635 |
|
18636 | this._flags.__ignore_hooks.push(hookName);
|
18637 | }
|
18638 | });
|
18639 | |
18640 |
|
18641 |
|
18642 |
|
18643 |
|
18644 |
|
18645 |
|
18646 |
|
18647 |
|
18648 | AV.Object.createWithoutData = function (klass, id, hasData) {
|
18649 | var _klass;
|
18650 |
|
18651 | if (_.isString(klass)) {
|
18652 | _klass = AV.Object._getSubclass(klass);
|
18653 | } else if (klass.prototype && klass.prototype instanceof AV.Object) {
|
18654 | _klass = klass;
|
18655 | } else {
|
18656 | throw new Error('class must be a string or a subclass of AV.Object.');
|
18657 | }
|
18658 |
|
18659 | if (!id) {
|
18660 | throw new TypeError('The objectId must be provided');
|
18661 | }
|
18662 |
|
18663 | var object = new _klass();
|
18664 | object.id = id;
|
18665 | object._hasData = hasData;
|
18666 | return object;
|
18667 | };
|
18668 | |
18669 |
|
18670 |
|
18671 |
|
18672 |
|
18673 |
|
18674 |
|
18675 |
|
18676 |
|
18677 | AV.Object.destroyAll = function (objects) {
|
18678 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
18679 |
|
18680 | if (!objects || objects.length === 0) {
|
18681 | return _promise.default.resolve();
|
18682 | }
|
18683 |
|
18684 | var objectsByClassNameAndFlags = _.groupBy(objects, function (object) {
|
18685 | return (0, _stringify.default)({
|
18686 | className: object.className,
|
18687 | flags: object._flags
|
18688 | });
|
18689 | });
|
18690 |
|
18691 | var body = {
|
18692 | requests: (0, _map.default)(_).call(_, objectsByClassNameAndFlags, function (objects) {
|
18693 | var _context3;
|
18694 |
|
18695 | var ids = (0, _map.default)(_).call(_, objects, 'id').join(',');
|
18696 | return {
|
18697 | method: 'DELETE',
|
18698 | path: (0, _concat.default)(_context3 = "/1.1/classes/".concat(objects[0].className, "/")).call(_context3, ids),
|
18699 | body: objects[0]._flags
|
18700 | };
|
18701 | })
|
18702 | };
|
18703 | return _request('batch', null, null, 'POST', body, options).then(function (response) {
|
18704 | var firstError = (0, _find.default)(_).call(_, response, function (result) {
|
18705 | return !result.success;
|
18706 | });
|
18707 | if (firstError) throw new AVError(firstError.error.code, firstError.error.error);
|
18708 | return undefined;
|
18709 | });
|
18710 | };
|
18711 | |
18712 |
|
18713 |
|
18714 |
|
18715 |
|
18716 |
|
18717 |
|
18718 | AV.Object._getSubclass = function (className) {
|
18719 | if (!_.isString(className)) {
|
18720 | throw new Error('AV.Object._getSubclass requires a string argument.');
|
18721 | }
|
18722 |
|
18723 | var ObjectClass = AV.Object._classMap[className];
|
18724 |
|
18725 | if (!ObjectClass) {
|
18726 | ObjectClass = AV.Object.extend(className);
|
18727 | AV.Object._classMap[className] = ObjectClass;
|
18728 | }
|
18729 |
|
18730 | return ObjectClass;
|
18731 | };
|
18732 | |
18733 |
|
18734 |
|
18735 |
|
18736 |
|
18737 |
|
18738 | AV.Object._create = function (className, attributes, options) {
|
18739 | var ObjectClass = AV.Object._getSubclass(className);
|
18740 |
|
18741 | return new ObjectClass(attributes, options);
|
18742 | };
|
18743 |
|
18744 |
|
18745 |
|
18746 | AV.Object._classMap = {};
|
18747 | AV.Object._extend = AV._extend;
|
18748 | |
18749 |
|
18750 |
|
18751 |
|
18752 |
|
18753 |
|
18754 |
|
18755 |
|
18756 |
|
18757 |
|
18758 |
|
18759 |
|
18760 |
|
18761 |
|
18762 |
|
18763 | AV.Object['new'] = function (attributes, options) {
|
18764 | return new AV.Object(attributes, options);
|
18765 | };
|
18766 | |
18767 |
|
18768 |
|
18769 |
|
18770 |
|
18771 |
|
18772 |
|
18773 |
|
18774 |
|
18775 |
|
18776 |
|
18777 |
|
18778 |
|
18779 |
|
18780 |
|
18781 |
|
18782 |
|
18783 |
|
18784 |
|
18785 |
|
18786 |
|
18787 |
|
18788 |
|
18789 |
|
18790 | AV.Object.extend = function (className, protoProps, classProps) {
|
18791 |
|
18792 | if (!_.isString(className)) {
|
18793 | if (className && _.has(className, 'className')) {
|
18794 | return AV.Object.extend(className.className, className, protoProps);
|
18795 | } else {
|
18796 | throw new Error("AV.Object.extend's first argument should be the className.");
|
18797 | }
|
18798 | }
|
18799 |
|
18800 |
|
18801 | if (className === 'User') {
|
18802 | className = '_User';
|
18803 | }
|
18804 |
|
18805 | var NewClassObject = null;
|
18806 |
|
18807 | if (_.has(AV.Object._classMap, className)) {
|
18808 | var OldClassObject = AV.Object._classMap[className];
|
18809 |
|
18810 |
|
18811 |
|
18812 | if (protoProps || classProps) {
|
18813 | NewClassObject = OldClassObject._extend(protoProps, classProps);
|
18814 | } else {
|
18815 | return OldClassObject;
|
18816 | }
|
18817 | } else {
|
18818 | protoProps = protoProps || {};
|
18819 | protoProps._className = className;
|
18820 | NewClassObject = this._extend(protoProps, classProps);
|
18821 | }
|
18822 |
|
18823 |
|
18824 | NewClassObject.extend = function (arg0) {
|
18825 | var _context4;
|
18826 |
|
18827 | if (_.isString(arg0) || arg0 && _.has(arg0, 'className')) {
|
18828 | return AV.Object.extend.apply(NewClassObject, arguments);
|
18829 | }
|
18830 |
|
18831 | var newArguments = (0, _concat.default)(_context4 = [className]).call(_context4, _.toArray(arguments));
|
18832 | return AV.Object.extend.apply(NewClassObject, newArguments);
|
18833 | };
|
18834 |
|
18835 |
|
18836 | (0, _defineProperty.default)(NewClassObject, 'query', (0, _getOwnPropertyDescriptor.default)(AV.Object, 'query'));
|
18837 |
|
18838 | NewClassObject['new'] = function (attributes, options) {
|
18839 | return new NewClassObject(attributes, options);
|
18840 | };
|
18841 |
|
18842 | AV.Object._classMap[className] = NewClassObject;
|
18843 | return NewClassObject;
|
18844 | };
|
18845 |
|
18846 |
|
18847 | (0, _defineProperty.default)(AV.Object.prototype, 'className', {
|
18848 | get: function get() {
|
18849 | var className = this._className || this.constructor._LCClassName || this.constructor.name;
|
18850 |
|
18851 | if (className === 'User') {
|
18852 | return '_User';
|
18853 | }
|
18854 |
|
18855 | return className;
|
18856 | }
|
18857 | });
|
18858 | |
18859 |
|
18860 |
|
18861 |
|
18862 |
|
18863 |
|
18864 |
|
18865 |
|
18866 |
|
18867 |
|
18868 |
|
18869 | AV.Object.register = function (klass, name) {
|
18870 | if (!(klass.prototype instanceof AV.Object)) {
|
18871 | throw new Error('registered class is not a subclass of AV.Object');
|
18872 | }
|
18873 |
|
18874 | var className = name || klass.name;
|
18875 |
|
18876 | if (!className.length) {
|
18877 | throw new Error('registered class must be named');
|
18878 | }
|
18879 |
|
18880 | if (name) {
|
18881 | klass._LCClassName = name;
|
18882 | }
|
18883 |
|
18884 | AV.Object._classMap[className] = klass;
|
18885 | };
|
18886 | |
18887 |
|
18888 |
|
18889 |
|
18890 |
|
18891 |
|
18892 |
|
18893 |
|
18894 |
|
18895 |
|
18896 |
|
18897 |
|
18898 |
|
18899 | (0, _defineProperty.default)(AV.Object, 'query', {
|
18900 | get: function get() {
|
18901 | return new AV.Query(this.prototype.className);
|
18902 | }
|
18903 | });
|
18904 |
|
18905 | AV.Object._findUnsavedChildren = function (objects, children, files) {
|
18906 | AV._traverse(objects, function (object) {
|
18907 | if (object instanceof AV.Object) {
|
18908 | if (object.dirty()) {
|
18909 | children.push(object);
|
18910 | }
|
18911 |
|
18912 | return;
|
18913 | }
|
18914 |
|
18915 | if (object instanceof AV.File) {
|
18916 | if (!object.id) {
|
18917 | files.push(object);
|
18918 | }
|
18919 |
|
18920 | return;
|
18921 | }
|
18922 | });
|
18923 | };
|
18924 |
|
18925 | AV.Object._canBeSerializedAsValue = function (object) {
|
18926 | var canBeSerializedAsValue = true;
|
18927 |
|
18928 | if (object instanceof AV.Object || object instanceof AV.File) {
|
18929 | canBeSerializedAsValue = !!object.id;
|
18930 | } else if (_.isArray(object)) {
|
18931 | AV._arrayEach(object, function (child) {
|
18932 | if (!AV.Object._canBeSerializedAsValue(child)) {
|
18933 | canBeSerializedAsValue = false;
|
18934 | }
|
18935 | });
|
18936 | } else if (_.isObject(object)) {
|
18937 | AV._objectEach(object, function (child) {
|
18938 | if (!AV.Object._canBeSerializedAsValue(child)) {
|
18939 | canBeSerializedAsValue = false;
|
18940 | }
|
18941 | });
|
18942 | }
|
18943 |
|
18944 | return canBeSerializedAsValue;
|
18945 | };
|
18946 |
|
18947 | AV.Object._deepSaveAsync = function (object, model, options) {
|
18948 | var unsavedChildren = [];
|
18949 | var unsavedFiles = [];
|
18950 |
|
18951 | AV.Object._findUnsavedChildren(object, unsavedChildren, unsavedFiles);
|
18952 |
|
18953 | unsavedFiles = _.uniq(unsavedFiles);
|
18954 |
|
18955 | var promise = _promise.default.resolve();
|
18956 |
|
18957 | _.each(unsavedFiles, function (file) {
|
18958 | promise = promise.then(function () {
|
18959 | return file.save();
|
18960 | });
|
18961 | });
|
18962 |
|
18963 | var objects = _.uniq(unsavedChildren);
|
18964 |
|
18965 | var remaining = _.uniq(objects);
|
18966 |
|
18967 | return promise.then(function () {
|
18968 | return continueWhile(function () {
|
18969 | return remaining.length > 0;
|
18970 | }, function () {
|
18971 |
|
18972 | var batch = [];
|
18973 | var newRemaining = [];
|
18974 |
|
18975 | AV._arrayEach(remaining, function (object) {
|
18976 | if (object._canBeSerialized()) {
|
18977 | batch.push(object);
|
18978 | } else {
|
18979 | newRemaining.push(object);
|
18980 | }
|
18981 | });
|
18982 |
|
18983 | remaining = newRemaining;
|
18984 |
|
18985 | if (batch.length === 0) {
|
18986 | return _promise.default.reject(new AVError(AVError.OTHER_CAUSE, 'Tried to save a batch with a cycle.'));
|
18987 | }
|
18988 |
|
18989 |
|
18990 | var readyToStart = _promise.default.resolve((0, _map.default)(_).call(_, batch, function (object) {
|
18991 | return object._allPreviousSaves || _promise.default.resolve();
|
18992 | }));
|
18993 |
|
18994 |
|
18995 | var bathSavePromise = readyToStart.then(function () {
|
18996 | return _request('batch', null, null, 'POST', {
|
18997 | requests: (0, _map.default)(_).call(_, batch, function (object) {
|
18998 | var method = object.id ? 'PUT' : 'POST';
|
18999 |
|
19000 | var json = object._getSaveJSON();
|
19001 |
|
19002 | _.extend(json, object._flags);
|
19003 |
|
19004 | var route = 'classes';
|
19005 | var className = object.className;
|
19006 | var path = "/".concat(route, "/").concat(className);
|
19007 |
|
19008 | if (object.className === '_User' && !object.id) {
|
19009 |
|
19010 | path = '/users';
|
19011 | }
|
19012 |
|
19013 | var path = "/1.1".concat(path);
|
19014 |
|
19015 | if (object.id) {
|
19016 | path = path + '/' + object.id;
|
19017 | }
|
19018 |
|
19019 | object._startSave();
|
19020 |
|
19021 | return {
|
19022 | method: method,
|
19023 | path: path,
|
19024 | body: json,
|
19025 | params: options && options.fetchWhenSave ? {
|
19026 | fetchWhenSave: true
|
19027 | } : undefined
|
19028 | };
|
19029 | })
|
19030 | }, options).then(function (response) {
|
19031 | var results = (0, _map.default)(_).call(_, batch, function (object, i) {
|
19032 | if (response[i].success) {
|
19033 | object._finishSave(object.parse(response[i].success));
|
19034 |
|
19035 | return object;
|
19036 | }
|
19037 |
|
19038 | object._cancelSave();
|
19039 |
|
19040 | return new AVError(response[i].error.code, response[i].error.error);
|
19041 | });
|
19042 | return handleBatchResults(results);
|
19043 | });
|
19044 | });
|
19045 |
|
19046 | AV._arrayEach(batch, function (object) {
|
19047 | object._allPreviousSaves = bathSavePromise;
|
19048 | });
|
19049 |
|
19050 | return bathSavePromise;
|
19051 | });
|
19052 | }).then(function () {
|
19053 | return object;
|
19054 | });
|
19055 | };
|
19056 | };
|
19057 |
|
19058 | }),
|
19059 |
|
19060 | (function(module, exports, __webpack_require__) {
|
19061 |
|
19062 | var arrayWithHoles = __webpack_require__(508);
|
19063 |
|
19064 | var iterableToArrayLimit = __webpack_require__(516);
|
19065 |
|
19066 | var unsupportedIterableToArray = __webpack_require__(517);
|
19067 |
|
19068 | var nonIterableRest = __webpack_require__(527);
|
19069 |
|
19070 | function _slicedToArray(arr, i) {
|
19071 | return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
|
19072 | }
|
19073 |
|
19074 | module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
19075 |
|
19076 | }),
|
19077 |
|
19078 | (function(module, exports, __webpack_require__) {
|
19079 |
|
19080 | var _Array$isArray = __webpack_require__(509);
|
19081 |
|
19082 | function _arrayWithHoles(arr) {
|
19083 | if (_Array$isArray(arr)) return arr;
|
19084 | }
|
19085 |
|
19086 | module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
19087 |
|
19088 | }),
|
19089 |
|
19090 | (function(module, exports, __webpack_require__) {
|
19091 |
|
19092 | module.exports = __webpack_require__(510);
|
19093 |
|
19094 | }),
|
19095 |
|
19096 | (function(module, exports, __webpack_require__) {
|
19097 |
|
19098 | module.exports = __webpack_require__(511);
|
19099 |
|
19100 |
|
19101 | }),
|
19102 |
|
19103 | (function(module, exports, __webpack_require__) {
|
19104 |
|
19105 | var parent = __webpack_require__(512);
|
19106 |
|
19107 | module.exports = parent;
|
19108 |
|
19109 |
|
19110 | }),
|
19111 |
|
19112 | (function(module, exports, __webpack_require__) {
|
19113 |
|
19114 | var parent = __webpack_require__(513);
|
19115 |
|
19116 | module.exports = parent;
|
19117 |
|
19118 |
|
19119 | }),
|
19120 |
|
19121 | (function(module, exports, __webpack_require__) {
|
19122 |
|
19123 | var parent = __webpack_require__(514);
|
19124 |
|
19125 | module.exports = parent;
|
19126 |
|
19127 |
|
19128 | }),
|
19129 |
|
19130 | (function(module, exports, __webpack_require__) {
|
19131 |
|
19132 | __webpack_require__(515);
|
19133 | var path = __webpack_require__(10);
|
19134 |
|
19135 | module.exports = path.Array.isArray;
|
19136 |
|
19137 |
|
19138 | }),
|
19139 |
|
19140 | (function(module, exports, __webpack_require__) {
|
19141 |
|
19142 | var $ = __webpack_require__(0);
|
19143 | var isArray = __webpack_require__(85);
|
19144 |
|
19145 |
|
19146 |
|
19147 | $({ target: 'Array', stat: true }, {
|
19148 | isArray: isArray
|
19149 | });
|
19150 |
|
19151 |
|
19152 | }),
|
19153 |
|
19154 | (function(module, exports, __webpack_require__) {
|
19155 |
|
19156 | var _Symbol = __webpack_require__(231);
|
19157 |
|
19158 | var _getIteratorMethod = __webpack_require__(241);
|
19159 |
|
19160 | function _iterableToArrayLimit(arr, i) {
|
19161 | var _i = arr == null ? null : typeof _Symbol !== "undefined" && _getIteratorMethod(arr) || arr["@@iterator"];
|
19162 |
|
19163 | if (_i == null) return;
|
19164 | var _arr = [];
|
19165 | var _n = true;
|
19166 | var _d = false;
|
19167 |
|
19168 | var _s, _e;
|
19169 |
|
19170 | try {
|
19171 | for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
19172 | _arr.push(_s.value);
|
19173 |
|
19174 | if (i && _arr.length === i) break;
|
19175 | }
|
19176 | } catch (err) {
|
19177 | _d = true;
|
19178 | _e = err;
|
19179 | } finally {
|
19180 | try {
|
19181 | if (!_n && _i["return"] != null) _i["return"]();
|
19182 | } finally {
|
19183 | if (_d) throw _e;
|
19184 | }
|
19185 | }
|
19186 |
|
19187 | return _arr;
|
19188 | }
|
19189 |
|
19190 | module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
19191 |
|
19192 | }),
|
19193 |
|
19194 | (function(module, exports, __webpack_require__) {
|
19195 |
|
19196 | var _sliceInstanceProperty = __webpack_require__(518);
|
19197 |
|
19198 | var _Array$from = __webpack_require__(522);
|
19199 |
|
19200 | var arrayLikeToArray = __webpack_require__(526);
|
19201 |
|
19202 | function _unsupportedIterableToArray(o, minLen) {
|
19203 | var _context;
|
19204 |
|
19205 | if (!o) return;
|
19206 | if (typeof o === "string") return arrayLikeToArray(o, minLen);
|
19207 |
|
19208 | var n = _sliceInstanceProperty(_context = Object.prototype.toString.call(o)).call(_context, 8, -1);
|
19209 |
|
19210 | if (n === "Object" && o.constructor) n = o.constructor.name;
|
19211 | if (n === "Map" || n === "Set") return _Array$from(o);
|
19212 | if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
|
19213 | }
|
19214 |
|
19215 | module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
19216 |
|
19217 | }),
|
19218 |
|
19219 | (function(module, exports, __webpack_require__) {
|
19220 |
|
19221 | module.exports = __webpack_require__(519);
|
19222 |
|
19223 | }),
|
19224 |
|
19225 | (function(module, exports, __webpack_require__) {
|
19226 |
|
19227 | module.exports = __webpack_require__(520);
|
19228 |
|
19229 |
|
19230 | }),
|
19231 |
|
19232 | (function(module, exports, __webpack_require__) {
|
19233 |
|
19234 | var parent = __webpack_require__(521);
|
19235 |
|
19236 | module.exports = parent;
|
19237 |
|
19238 |
|
19239 | }),
|
19240 |
|
19241 | (function(module, exports, __webpack_require__) {
|
19242 |
|
19243 | var parent = __webpack_require__(229);
|
19244 |
|
19245 | module.exports = parent;
|
19246 |
|
19247 |
|
19248 | }),
|
19249 |
|
19250 | (function(module, exports, __webpack_require__) {
|
19251 |
|
19252 | module.exports = __webpack_require__(523);
|
19253 |
|
19254 | }),
|
19255 |
|
19256 | (function(module, exports, __webpack_require__) {
|
19257 |
|
19258 | module.exports = __webpack_require__(524);
|
19259 |
|
19260 |
|
19261 | }),
|
19262 |
|
19263 | (function(module, exports, __webpack_require__) {
|
19264 |
|
19265 | var parent = __webpack_require__(525);
|
19266 |
|
19267 | module.exports = parent;
|
19268 |
|
19269 |
|
19270 | }),
|
19271 |
|
19272 | (function(module, exports, __webpack_require__) {
|
19273 |
|
19274 | var parent = __webpack_require__(239);
|
19275 |
|
19276 | module.exports = parent;
|
19277 |
|
19278 |
|
19279 | }),
|
19280 |
|
19281 | (function(module, exports) {
|
19282 |
|
19283 | function _arrayLikeToArray(arr, len) {
|
19284 | if (len == null || len > arr.length) len = arr.length;
|
19285 |
|
19286 | for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
19287 | arr2[i] = arr[i];
|
19288 | }
|
19289 |
|
19290 | return arr2;
|
19291 | }
|
19292 |
|
19293 | module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
19294 |
|
19295 | }),
|
19296 |
|
19297 | (function(module, exports) {
|
19298 |
|
19299 | function _nonIterableRest() {
|
19300 | throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
19301 | }
|
19302 |
|
19303 | module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
19304 |
|
19305 | }),
|
19306 |
|
19307 | (function(module, exports, __webpack_require__) {
|
19308 |
|
19309 | var parent = __webpack_require__(529);
|
19310 |
|
19311 | module.exports = parent;
|
19312 |
|
19313 |
|
19314 | }),
|
19315 |
|
19316 | (function(module, exports, __webpack_require__) {
|
19317 |
|
19318 | __webpack_require__(530);
|
19319 | var path = __webpack_require__(10);
|
19320 |
|
19321 | var Object = path.Object;
|
19322 |
|
19323 | var getOwnPropertyDescriptor = module.exports = function getOwnPropertyDescriptor(it, key) {
|
19324 | return Object.getOwnPropertyDescriptor(it, key);
|
19325 | };
|
19326 |
|
19327 | if (Object.getOwnPropertyDescriptor.sham) getOwnPropertyDescriptor.sham = true;
|
19328 |
|
19329 |
|
19330 | }),
|
19331 |
|
19332 | (function(module, exports, __webpack_require__) {
|
19333 |
|
19334 | var $ = __webpack_require__(0);
|
19335 | var fails = __webpack_require__(3);
|
19336 | var toIndexedObject = __webpack_require__(33);
|
19337 | var nativeGetOwnPropertyDescriptor = __webpack_require__(71).f;
|
19338 | var DESCRIPTORS = __webpack_require__(16);
|
19339 |
|
19340 | var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });
|
19341 | var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;
|
19342 |
|
19343 |
|
19344 |
|
19345 | $({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
|
19346 | getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
|
19347 | return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
|
19348 | }
|
19349 | });
|
19350 |
|
19351 |
|
19352 | }),
|
19353 |
|
19354 | (function(module, exports, __webpack_require__) {
|
19355 |
|
19356 | "use strict";
|
19357 |
|
19358 |
|
19359 | var _ = __webpack_require__(2);
|
19360 |
|
19361 | var AVError = __webpack_require__(43);
|
19362 |
|
19363 | module.exports = function (AV) {
|
19364 | AV.Role = AV.Object.extend('_Role',
|
19365 |
|
19366 | {
|
19367 |
|
19368 |
|
19369 | |
19370 |
|
19371 |
|
19372 |
|
19373 |
|
19374 |
|
19375 |
|
19376 |
|
19377 |
|
19378 |
|
19379 |
|
19380 |
|
19381 |
|
19382 |
|
19383 |
|
19384 | constructor: function constructor(name, acl) {
|
19385 | if (_.isString(name)) {
|
19386 | AV.Object.prototype.constructor.call(this, null, null);
|
19387 | this.setName(name);
|
19388 | } else {
|
19389 | AV.Object.prototype.constructor.call(this, name, acl);
|
19390 | }
|
19391 |
|
19392 | if (acl) {
|
19393 | if (!(acl instanceof AV.ACL)) {
|
19394 | throw new TypeError('acl must be an instance of AV.ACL');
|
19395 | } else {
|
19396 | this.setACL(acl);
|
19397 | }
|
19398 | }
|
19399 | },
|
19400 |
|
19401 | |
19402 |
|
19403 |
|
19404 |
|
19405 |
|
19406 | getName: function getName() {
|
19407 | return this.get('name');
|
19408 | },
|
19409 |
|
19410 | |
19411 |
|
19412 |
|
19413 |
|
19414 |
|
19415 |
|
19416 |
|
19417 |
|
19418 |
|
19419 |
|
19420 |
|
19421 |
|
19422 |
|
19423 |
|
19424 | setName: function setName(name, options) {
|
19425 | return this.set('name', name, options);
|
19426 | },
|
19427 |
|
19428 | |
19429 |
|
19430 |
|
19431 |
|
19432 |
|
19433 |
|
19434 |
|
19435 |
|
19436 |
|
19437 |
|
19438 |
|
19439 | getUsers: function getUsers() {
|
19440 | return this.relation('users');
|
19441 | },
|
19442 |
|
19443 | |
19444 |
|
19445 |
|
19446 |
|
19447 |
|
19448 |
|
19449 |
|
19450 |
|
19451 |
|
19452 |
|
19453 |
|
19454 | getRoles: function getRoles() {
|
19455 | return this.relation('roles');
|
19456 | },
|
19457 |
|
19458 | |
19459 |
|
19460 |
|
19461 | validate: function validate(attrs, options) {
|
19462 | if ('name' in attrs && attrs.name !== this.getName()) {
|
19463 | var newName = attrs.name;
|
19464 |
|
19465 | if (this.id && this.id !== attrs.objectId) {
|
19466 |
|
19467 |
|
19468 |
|
19469 | return new AVError(AVError.OTHER_CAUSE, "A role's name can only be set before it has been saved.");
|
19470 | }
|
19471 |
|
19472 | if (!_.isString(newName)) {
|
19473 | return new AVError(AVError.OTHER_CAUSE, "A role's name must be a String.");
|
19474 | }
|
19475 |
|
19476 | if (!/^[0-9a-zA-Z\-_ ]+$/.test(newName)) {
|
19477 | return new AVError(AVError.OTHER_CAUSE, "A role's name can only contain alphanumeric characters, _," + ' -, and spaces.');
|
19478 | }
|
19479 | }
|
19480 |
|
19481 | if (AV.Object.prototype.validate) {
|
19482 | return AV.Object.prototype.validate.call(this, attrs, options);
|
19483 | }
|
19484 |
|
19485 | return false;
|
19486 | }
|
19487 | });
|
19488 | };
|
19489 |
|
19490 | }),
|
19491 |
|
19492 | (function(module, exports, __webpack_require__) {
|
19493 |
|
19494 | "use strict";
|
19495 |
|
19496 |
|
19497 | var _interopRequireDefault = __webpack_require__(1);
|
19498 |
|
19499 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(533));
|
19500 |
|
19501 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
19502 |
|
19503 | var _map = _interopRequireDefault(__webpack_require__(42));
|
19504 |
|
19505 | var _find = _interopRequireDefault(__webpack_require__(110));
|
19506 |
|
19507 | var _stringify = _interopRequireDefault(__webpack_require__(36));
|
19508 |
|
19509 | var _ = __webpack_require__(2);
|
19510 |
|
19511 | var uuid = __webpack_require__(221);
|
19512 |
|
19513 | var AVError = __webpack_require__(43);
|
19514 |
|
19515 | var _require = __webpack_require__(26),
|
19516 | AVRequest = _require._request,
|
19517 | request = _require.request;
|
19518 |
|
19519 | var _require2 = __webpack_require__(68),
|
19520 | getAdapter = _require2.getAdapter;
|
19521 |
|
19522 | var PLATFORM_ANONYMOUS = 'anonymous';
|
19523 | var PLATFORM_QQAPP = 'lc_qqapp';
|
19524 |
|
19525 | var mergeUnionDataIntoAuthData = function mergeUnionDataIntoAuthData() {
|
19526 | var defaultUnionIdPlatform = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'weixin';
|
19527 | return function (authData, unionId) {
|
19528 | var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
19529 | _ref$unionIdPlatform = _ref.unionIdPlatform,
|
19530 | unionIdPlatform = _ref$unionIdPlatform === void 0 ? defaultUnionIdPlatform : _ref$unionIdPlatform,
|
19531 | _ref$asMainAccount = _ref.asMainAccount,
|
19532 | asMainAccount = _ref$asMainAccount === void 0 ? false : _ref$asMainAccount;
|
19533 |
|
19534 | if (typeof unionId !== 'string') throw new AVError(AVError.OTHER_CAUSE, 'unionId is not a string');
|
19535 | if (typeof unionIdPlatform !== 'string') throw new AVError(AVError.OTHER_CAUSE, 'unionIdPlatform is not a string');
|
19536 | return _.extend({}, authData, {
|
19537 | platform: unionIdPlatform,
|
19538 | unionid: unionId,
|
19539 | main_account: Boolean(asMainAccount)
|
19540 | });
|
19541 | };
|
19542 | };
|
19543 |
|
19544 | module.exports = function (AV) {
|
19545 | |
19546 |
|
19547 |
|
19548 |
|
19549 |
|
19550 |
|
19551 |
|
19552 |
|
19553 |
|
19554 | AV.User = AV.Object.extend('_User',
|
19555 |
|
19556 | {
|
19557 |
|
19558 | _isCurrentUser: false,
|
19559 |
|
19560 |
|
19561 | |
19562 |
|
19563 |
|
19564 |
|
19565 | _mergeMagicFields: function _mergeMagicFields(attrs) {
|
19566 | if (attrs.sessionToken) {
|
19567 | this._sessionToken = attrs.sessionToken;
|
19568 | delete attrs.sessionToken;
|
19569 | }
|
19570 |
|
19571 | return AV.User.__super__._mergeMagicFields.call(this, attrs);
|
19572 | },
|
19573 |
|
19574 | |
19575 |
|
19576 |
|
19577 |
|
19578 |
|
19579 | _cleanupAuthData: function _cleanupAuthData() {
|
19580 | if (!this.isCurrent()) {
|
19581 | return;
|
19582 | }
|
19583 |
|
19584 | var authData = this.get('authData');
|
19585 |
|
19586 | if (!authData) {
|
19587 | return;
|
19588 | }
|
19589 |
|
19590 | AV._objectEach(this.get('authData'), function (value, key) {
|
19591 | if (!authData[key]) {
|
19592 | delete authData[key];
|
19593 | }
|
19594 | });
|
19595 | },
|
19596 |
|
19597 | |
19598 |
|
19599 |
|
19600 |
|
19601 | _synchronizeAllAuthData: function _synchronizeAllAuthData() {
|
19602 | var authData = this.get('authData');
|
19603 |
|
19604 | if (!authData) {
|
19605 | return;
|
19606 | }
|
19607 |
|
19608 | var self = this;
|
19609 |
|
19610 | AV._objectEach(this.get('authData'), function (value, key) {
|
19611 | self._synchronizeAuthData(key);
|
19612 | });
|
19613 | },
|
19614 |
|
19615 | |
19616 |
|
19617 |
|
19618 |
|
19619 |
|
19620 | _synchronizeAuthData: function _synchronizeAuthData(provider) {
|
19621 | if (!this.isCurrent()) {
|
19622 | return;
|
19623 | }
|
19624 |
|
19625 | var authType;
|
19626 |
|
19627 | if (_.isString(provider)) {
|
19628 | authType = provider;
|
19629 | provider = AV.User._authProviders[authType];
|
19630 | } else {
|
19631 | authType = provider.getAuthType();
|
19632 | }
|
19633 |
|
19634 | var authData = this.get('authData');
|
19635 |
|
19636 | if (!authData || !provider) {
|
19637 | return;
|
19638 | }
|
19639 |
|
19640 | var success = provider.restoreAuthentication(authData[authType]);
|
19641 |
|
19642 | if (!success) {
|
19643 | this.dissociateAuthData(provider);
|
19644 | }
|
19645 | },
|
19646 | _handleSaveResult: function _handleSaveResult(makeCurrent) {
|
19647 |
|
19648 | if (makeCurrent && !AV._config.disableCurrentUser) {
|
19649 | this._isCurrentUser = true;
|
19650 | }
|
19651 |
|
19652 | this._cleanupAuthData();
|
19653 |
|
19654 | this._synchronizeAllAuthData();
|
19655 |
|
19656 |
|
19657 | delete this._serverData.password;
|
19658 |
|
19659 | this._rebuildEstimatedDataForKey('password');
|
19660 |
|
19661 | this._refreshCache();
|
19662 |
|
19663 | if ((makeCurrent || this.isCurrent()) && !AV._config.disableCurrentUser) {
|
19664 |
|
19665 |
|
19666 |
|
19667 | return _promise.default.resolve(AV.User._saveCurrentUser(this));
|
19668 | } else {
|
19669 | return _promise.default.resolve();
|
19670 | }
|
19671 | },
|
19672 |
|
19673 | |
19674 |
|
19675 |
|
19676 |
|
19677 |
|
19678 | _linkWith: function _linkWith(provider, data) {
|
19679 | var _this = this;
|
19680 |
|
19681 | var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
19682 | _ref2$failOnNotExist = _ref2.failOnNotExist,
|
19683 | failOnNotExist = _ref2$failOnNotExist === void 0 ? false : _ref2$failOnNotExist;
|
19684 |
|
19685 | var authType;
|
19686 |
|
19687 | if (_.isString(provider)) {
|
19688 | authType = provider;
|
19689 | provider = AV.User._authProviders[provider];
|
19690 | } else {
|
19691 | authType = provider.getAuthType();
|
19692 | }
|
19693 |
|
19694 | if (data) {
|
19695 | return this.save({
|
19696 | authData: (0, _defineProperty2.default)({}, authType, data)
|
19697 | }, {
|
19698 | fetchWhenSave: !!this.get('authData'),
|
19699 | _failOnNotExist: failOnNotExist
|
19700 | }).then(function (model) {
|
19701 | return model._handleSaveResult(true).then(function () {
|
19702 | return model;
|
19703 | });
|
19704 | });
|
19705 | } else {
|
19706 | return provider.authenticate().then(function (result) {
|
19707 | return _this._linkWith(provider, result);
|
19708 | });
|
19709 | }
|
19710 | },
|
19711 |
|
19712 | |
19713 |
|
19714 |
|
19715 |
|
19716 |
|
19717 |
|
19718 |
|
19719 |
|
19720 |
|
19721 |
|
19722 |
|
19723 |
|
19724 |
|
19725 |
|
19726 |
|
19727 |
|
19728 | associateWithAuthData: function associateWithAuthData(authData, platform) {
|
19729 | return this._linkWith(platform, authData);
|
19730 | },
|
19731 |
|
19732 | |
19733 |
|
19734 |
|
19735 |
|
19736 |
|
19737 |
|
19738 |
|
19739 |
|
19740 |
|
19741 |
|
19742 |
|
19743 |
|
19744 |
|
19745 |
|
19746 |
|
19747 |
|
19748 |
|
19749 |
|
19750 |
|
19751 |
|
19752 |
|
19753 |
|
19754 |
|
19755 | associateWithAuthDataAndUnionId: function associateWithAuthDataAndUnionId(authData, platform, unionId, unionOptions) {
|
19756 | return this._linkWith(platform, mergeUnionDataIntoAuthData()(authData, unionId, unionOptions));
|
19757 | },
|
19758 |
|
19759 | |
19760 |
|
19761 |
|
19762 |
|
19763 |
|
19764 |
|
19765 |
|
19766 |
|
19767 | associateWithMiniApp: function associateWithMiniApp(authInfo, option) {
|
19768 | var _this2 = this;
|
19769 |
|
19770 | if (authInfo === undefined) {
|
19771 | var getAuthInfo = getAdapter('getAuthInfo');
|
19772 | return getAuthInfo().then(function (authInfo) {
|
19773 | return _this2._linkWith(authInfo.provider, authInfo.authData, option);
|
19774 | });
|
19775 | }
|
19776 |
|
19777 | return this._linkWith(authInfo.provider, authInfo.authData, option);
|
19778 | },
|
19779 |
|
19780 | |
19781 |
|
19782 |
|
19783 |
|
19784 |
|
19785 |
|
19786 |
|
19787 |
|
19788 |
|
19789 |
|
19790 |
|
19791 |
|
19792 | associateWithQQApp: function associateWithQQApp() {
|
19793 | var _this3 = this;
|
19794 |
|
19795 | var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
19796 | _ref3$preferUnionId = _ref3.preferUnionId,
|
19797 | preferUnionId = _ref3$preferUnionId === void 0 ? false : _ref3$preferUnionId,
|
19798 | _ref3$unionIdPlatform = _ref3.unionIdPlatform,
|
19799 | unionIdPlatform = _ref3$unionIdPlatform === void 0 ? 'qq' : _ref3$unionIdPlatform,
|
19800 | _ref3$asMainAccount = _ref3.asMainAccount,
|
19801 | asMainAccount = _ref3$asMainAccount === void 0 ? true : _ref3$asMainAccount;
|
19802 |
|
19803 | var getAuthInfo = getAdapter('getAuthInfo');
|
19804 | return getAuthInfo({
|
19805 | preferUnionId: preferUnionId,
|
19806 | asMainAccount: asMainAccount,
|
19807 | platform: unionIdPlatform
|
19808 | }).then(function (authInfo) {
|
19809 | authInfo.provider = PLATFORM_QQAPP;
|
19810 | return _this3.associateWithMiniApp(authInfo);
|
19811 | });
|
19812 | },
|
19813 |
|
19814 | |
19815 |
|
19816 |
|
19817 |
|
19818 |
|
19819 |
|
19820 |
|
19821 |
|
19822 |
|
19823 |
|
19824 |
|
19825 |
|
19826 | associateWithWeapp: function associateWithWeapp() {
|
19827 | var _this4 = this;
|
19828 |
|
19829 | var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
19830 | _ref4$preferUnionId = _ref4.preferUnionId,
|
19831 | preferUnionId = _ref4$preferUnionId === void 0 ? false : _ref4$preferUnionId,
|
19832 | _ref4$unionIdPlatform = _ref4.unionIdPlatform,
|
19833 | unionIdPlatform = _ref4$unionIdPlatform === void 0 ? 'weixin' : _ref4$unionIdPlatform,
|
19834 | _ref4$asMainAccount = _ref4.asMainAccount,
|
19835 | asMainAccount = _ref4$asMainAccount === void 0 ? true : _ref4$asMainAccount;
|
19836 |
|
19837 | var getAuthInfo = getAdapter('getAuthInfo');
|
19838 | return getAuthInfo({
|
19839 | preferUnionId: preferUnionId,
|
19840 | asMainAccount: asMainAccount,
|
19841 | platform: unionIdPlatform
|
19842 | }).then(function (authInfo) {
|
19843 | return _this4.associateWithMiniApp(authInfo);
|
19844 | });
|
19845 | },
|
19846 |
|
19847 | |
19848 |
|
19849 |
|
19850 |
|
19851 | linkWithWeapp: function linkWithWeapp(options) {
|
19852 | console.warn('DEPRECATED: User#linkWithWeapp 已废弃,请使用 User#associateWithWeapp 代替');
|
19853 | return this.associateWithWeapp(options);
|
19854 | },
|
19855 |
|
19856 | |
19857 |
|
19858 |
|
19859 |
|
19860 |
|
19861 |
|
19862 |
|
19863 |
|
19864 |
|
19865 |
|
19866 |
|
19867 |
|
19868 | associateWithQQAppWithUnionId: function associateWithQQAppWithUnionId(unionId) {
|
19869 | var _this5 = this;
|
19870 |
|
19871 | var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
19872 | _ref5$unionIdPlatform = _ref5.unionIdPlatform,
|
19873 | unionIdPlatform = _ref5$unionIdPlatform === void 0 ? 'qq' : _ref5$unionIdPlatform,
|
19874 | _ref5$asMainAccount = _ref5.asMainAccount,
|
19875 | asMainAccount = _ref5$asMainAccount === void 0 ? false : _ref5$asMainAccount;
|
19876 |
|
19877 | var getAuthInfo = getAdapter('getAuthInfo');
|
19878 | return getAuthInfo({
|
19879 | platform: unionIdPlatform
|
19880 | }).then(function (authInfo) {
|
19881 | authInfo = AV.User.mergeUnionId(authInfo, unionId, {
|
19882 | asMainAccount: asMainAccount
|
19883 | });
|
19884 | authInfo.provider = PLATFORM_QQAPP;
|
19885 | return _this5.associateWithMiniApp(authInfo);
|
19886 | });
|
19887 | },
|
19888 |
|
19889 | |
19890 |
|
19891 |
|
19892 |
|
19893 |
|
19894 |
|
19895 |
|
19896 |
|
19897 |
|
19898 |
|
19899 |
|
19900 |
|
19901 | associateWithWeappWithUnionId: function associateWithWeappWithUnionId(unionId) {
|
19902 | var _this6 = this;
|
19903 |
|
19904 | var _ref6 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
19905 | _ref6$unionIdPlatform = _ref6.unionIdPlatform,
|
19906 | unionIdPlatform = _ref6$unionIdPlatform === void 0 ? 'weixin' : _ref6$unionIdPlatform,
|
19907 | _ref6$asMainAccount = _ref6.asMainAccount,
|
19908 | asMainAccount = _ref6$asMainAccount === void 0 ? false : _ref6$asMainAccount;
|
19909 |
|
19910 | var getAuthInfo = getAdapter('getAuthInfo');
|
19911 | return getAuthInfo({
|
19912 | platform: unionIdPlatform
|
19913 | }).then(function (authInfo) {
|
19914 | authInfo = AV.User.mergeUnionId(authInfo, unionId, {
|
19915 | asMainAccount: asMainAccount
|
19916 | });
|
19917 | return _this6.associateWithMiniApp(authInfo);
|
19918 | });
|
19919 | },
|
19920 |
|
19921 | |
19922 |
|
19923 |
|
19924 |
|
19925 |
|
19926 |
|
19927 | dissociateAuthData: function dissociateAuthData(provider) {
|
19928 | this.unset("authData.".concat(provider));
|
19929 | return this.save().then(function (model) {
|
19930 | return model._handleSaveResult(true).then(function () {
|
19931 | return model;
|
19932 | });
|
19933 | });
|
19934 | },
|
19935 |
|
19936 | |
19937 |
|
19938 |
|
19939 |
|
19940 | _unlinkFrom: function _unlinkFrom(provider) {
|
19941 | console.warn('DEPRECATED: User#_unlinkFrom 已废弃,请使用 User#dissociateAuthData 代替');
|
19942 | return this.dissociateAuthData(provider);
|
19943 | },
|
19944 |
|
19945 | |
19946 |
|
19947 |
|
19948 |
|
19949 | _isLinked: function _isLinked(provider) {
|
19950 | var authType;
|
19951 |
|
19952 | if (_.isString(provider)) {
|
19953 | authType = provider;
|
19954 | } else {
|
19955 | authType = provider.getAuthType();
|
19956 | }
|
19957 |
|
19958 | var authData = this.get('authData') || {};
|
19959 | return !!authData[authType];
|
19960 | },
|
19961 |
|
19962 | |
19963 |
|
19964 |
|
19965 |
|
19966 |
|
19967 | isAnonymous: function isAnonymous() {
|
19968 | return this._isLinked(PLATFORM_ANONYMOUS);
|
19969 | },
|
19970 | logOut: function logOut() {
|
19971 | this._logOutWithAll();
|
19972 |
|
19973 | this._isCurrentUser = false;
|
19974 | },
|
19975 |
|
19976 | |
19977 |
|
19978 |
|
19979 |
|
19980 | _logOutWithAll: function _logOutWithAll() {
|
19981 | var authData = this.get('authData');
|
19982 |
|
19983 | if (!authData) {
|
19984 | return;
|
19985 | }
|
19986 |
|
19987 | var self = this;
|
19988 |
|
19989 | AV._objectEach(this.get('authData'), function (value, key) {
|
19990 | self._logOutWith(key);
|
19991 | });
|
19992 | },
|
19993 |
|
19994 | |
19995 |
|
19996 |
|
19997 |
|
19998 |
|
19999 | _logOutWith: function _logOutWith(provider) {
|
20000 | if (!this.isCurrent()) {
|
20001 | return;
|
20002 | }
|
20003 |
|
20004 | if (_.isString(provider)) {
|
20005 | provider = AV.User._authProviders[provider];
|
20006 | }
|
20007 |
|
20008 | if (provider && provider.deauthenticate) {
|
20009 | provider.deauthenticate();
|
20010 | }
|
20011 | },
|
20012 |
|
20013 | |
20014 |
|
20015 |
|
20016 |
|
20017 |
|
20018 |
|
20019 |
|
20020 |
|
20021 |
|
20022 |
|
20023 |
|
20024 |
|
20025 |
|
20026 |
|
20027 | signUp: function signUp(attrs, options) {
|
20028 | var error;
|
20029 | var username = attrs && attrs.username || this.get('username');
|
20030 |
|
20031 | if (!username || username === '') {
|
20032 | error = new AVError(AVError.OTHER_CAUSE, 'Cannot sign up user with an empty name.');
|
20033 | throw error;
|
20034 | }
|
20035 |
|
20036 | var password = attrs && attrs.password || this.get('password');
|
20037 |
|
20038 | if (!password || password === '') {
|
20039 | error = new AVError(AVError.OTHER_CAUSE, 'Cannot sign up user with an empty password.');
|
20040 | throw error;
|
20041 | }
|
20042 |
|
20043 | return this.save(attrs, options).then(function (model) {
|
20044 | if (model.isAnonymous()) {
|
20045 | model.unset("authData.".concat(PLATFORM_ANONYMOUS));
|
20046 | model._opSetQueue = [{}];
|
20047 | }
|
20048 |
|
20049 | return model._handleSaveResult(true).then(function () {
|
20050 | return model;
|
20051 | });
|
20052 | });
|
20053 | },
|
20054 |
|
20055 | |
20056 |
|
20057 |
|
20058 |
|
20059 |
|
20060 |
|
20061 |
|
20062 |
|
20063 |
|
20064 |
|
20065 |
|
20066 |
|
20067 |
|
20068 |
|
20069 |
|
20070 |
|
20071 | signUpOrlogInWithMobilePhone: function signUpOrlogInWithMobilePhone(attrs) {
|
20072 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
20073 | var error;
|
20074 | var mobilePhoneNumber = attrs && attrs.mobilePhoneNumber || this.get('mobilePhoneNumber');
|
20075 |
|
20076 | if (!mobilePhoneNumber || mobilePhoneNumber === '') {
|
20077 | error = new AVError(AVError.OTHER_CAUSE, 'Cannot sign up or login user by mobilePhoneNumber ' + 'with an empty mobilePhoneNumber.');
|
20078 | throw error;
|
20079 | }
|
20080 |
|
20081 | var smsCode = attrs && attrs.smsCode || this.get('smsCode');
|
20082 |
|
20083 | if (!smsCode || smsCode === '') {
|
20084 | error = new AVError(AVError.OTHER_CAUSE, 'Cannot sign up or login user by mobilePhoneNumber ' + 'with an empty smsCode.');
|
20085 | throw error;
|
20086 | }
|
20087 |
|
20088 | options._makeRequest = function (route, className, id, method, json) {
|
20089 | return AVRequest('usersByMobilePhone', null, null, 'POST', json);
|
20090 | };
|
20091 |
|
20092 | return this.save(attrs, options).then(function (model) {
|
20093 | delete model.attributes.smsCode;
|
20094 | delete model._serverData.smsCode;
|
20095 | return model._handleSaveResult(true).then(function () {
|
20096 | return model;
|
20097 | });
|
20098 | });
|
20099 | },
|
20100 |
|
20101 | |
20102 |
|
20103 |
|
20104 |
|
20105 | loginWithAuthData: function loginWithAuthData(authData, platform, options) {
|
20106 | return this._linkWith(platform, authData, options);
|
20107 | },
|
20108 |
|
20109 | |
20110 |
|
20111 |
|
20112 |
|
20113 | loginWithAuthDataAndUnionId: function loginWithAuthDataAndUnionId(authData, platform, unionId, unionLoginOptions) {
|
20114 | return this.loginWithAuthData(mergeUnionDataIntoAuthData()(authData, unionId, unionLoginOptions), platform, unionLoginOptions);
|
20115 | },
|
20116 |
|
20117 | |
20118 |
|
20119 |
|
20120 |
|
20121 |
|
20122 |
|
20123 |
|
20124 |
|
20125 |
|
20126 |
|
20127 |
|
20128 | loginWithWeapp: function loginWithWeapp() {
|
20129 | var _this7 = this;
|
20130 |
|
20131 | var _ref7 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
20132 | _ref7$preferUnionId = _ref7.preferUnionId,
|
20133 | preferUnionId = _ref7$preferUnionId === void 0 ? false : _ref7$preferUnionId,
|
20134 | _ref7$unionIdPlatform = _ref7.unionIdPlatform,
|
20135 | unionIdPlatform = _ref7$unionIdPlatform === void 0 ? 'weixin' : _ref7$unionIdPlatform,
|
20136 | _ref7$asMainAccount = _ref7.asMainAccount,
|
20137 | asMainAccount = _ref7$asMainAccount === void 0 ? true : _ref7$asMainAccount,
|
20138 | _ref7$failOnNotExist = _ref7.failOnNotExist,
|
20139 | failOnNotExist = _ref7$failOnNotExist === void 0 ? false : _ref7$failOnNotExist;
|
20140 |
|
20141 | var getAuthInfo = getAdapter('getAuthInfo');
|
20142 | return getAuthInfo({
|
20143 | preferUnionId: preferUnionId,
|
20144 | asMainAccount: asMainAccount,
|
20145 | platform: unionIdPlatform
|
20146 | }).then(function (authInfo) {
|
20147 | return _this7.loginWithMiniApp(authInfo, {
|
20148 | failOnNotExist: failOnNotExist
|
20149 | });
|
20150 | });
|
20151 | },
|
20152 |
|
20153 | |
20154 |
|
20155 |
|
20156 |
|
20157 |
|
20158 | loginWithWeappWithUnionId: function loginWithWeappWithUnionId(unionId) {
|
20159 | var _this8 = this;
|
20160 |
|
20161 | var _ref8 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
20162 | _ref8$unionIdPlatform = _ref8.unionIdPlatform,
|
20163 | unionIdPlatform = _ref8$unionIdPlatform === void 0 ? 'weixin' : _ref8$unionIdPlatform,
|
20164 | _ref8$asMainAccount = _ref8.asMainAccount,
|
20165 | asMainAccount = _ref8$asMainAccount === void 0 ? false : _ref8$asMainAccount,
|
20166 | _ref8$failOnNotExist = _ref8.failOnNotExist,
|
20167 | failOnNotExist = _ref8$failOnNotExist === void 0 ? false : _ref8$failOnNotExist;
|
20168 |
|
20169 | var getAuthInfo = getAdapter('getAuthInfo');
|
20170 | return getAuthInfo({
|
20171 | platform: unionIdPlatform
|
20172 | }).then(function (authInfo) {
|
20173 | authInfo = AV.User.mergeUnionId(authInfo, unionId, {
|
20174 | asMainAccount: asMainAccount
|
20175 | });
|
20176 | return _this8.loginWithMiniApp(authInfo, {
|
20177 | failOnNotExist: failOnNotExist
|
20178 | });
|
20179 | });
|
20180 | },
|
20181 |
|
20182 | |
20183 |
|
20184 |
|
20185 |
|
20186 |
|
20187 |
|
20188 |
|
20189 |
|
20190 |
|
20191 |
|
20192 | loginWithQQApp: function loginWithQQApp() {
|
20193 | var _this9 = this;
|
20194 |
|
20195 | var _ref9 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
20196 | _ref9$preferUnionId = _ref9.preferUnionId,
|
20197 | preferUnionId = _ref9$preferUnionId === void 0 ? false : _ref9$preferUnionId,
|
20198 | _ref9$unionIdPlatform = _ref9.unionIdPlatform,
|
20199 | unionIdPlatform = _ref9$unionIdPlatform === void 0 ? 'qq' : _ref9$unionIdPlatform,
|
20200 | _ref9$asMainAccount = _ref9.asMainAccount,
|
20201 | asMainAccount = _ref9$asMainAccount === void 0 ? true : _ref9$asMainAccount,
|
20202 | _ref9$failOnNotExist = _ref9.failOnNotExist,
|
20203 | failOnNotExist = _ref9$failOnNotExist === void 0 ? false : _ref9$failOnNotExist;
|
20204 |
|
20205 | var getAuthInfo = getAdapter('getAuthInfo');
|
20206 | return getAuthInfo({
|
20207 | preferUnionId: preferUnionId,
|
20208 | asMainAccount: asMainAccount,
|
20209 | platform: unionIdPlatform
|
20210 | }).then(function (authInfo) {
|
20211 | authInfo.provider = PLATFORM_QQAPP;
|
20212 | return _this9.loginWithMiniApp(authInfo, {
|
20213 | failOnNotExist: failOnNotExist
|
20214 | });
|
20215 | });
|
20216 | },
|
20217 |
|
20218 | |
20219 |
|
20220 |
|
20221 |
|
20222 |
|
20223 | loginWithQQAppWithUnionId: function loginWithQQAppWithUnionId(unionId) {
|
20224 | var _this10 = this;
|
20225 |
|
20226 | var _ref10 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
20227 | _ref10$unionIdPlatfor = _ref10.unionIdPlatform,
|
20228 | unionIdPlatform = _ref10$unionIdPlatfor === void 0 ? 'qq' : _ref10$unionIdPlatfor,
|
20229 | _ref10$asMainAccount = _ref10.asMainAccount,
|
20230 | asMainAccount = _ref10$asMainAccount === void 0 ? false : _ref10$asMainAccount,
|
20231 | _ref10$failOnNotExist = _ref10.failOnNotExist,
|
20232 | failOnNotExist = _ref10$failOnNotExist === void 0 ? false : _ref10$failOnNotExist;
|
20233 |
|
20234 | var getAuthInfo = getAdapter('getAuthInfo');
|
20235 | return getAuthInfo({
|
20236 | platform: unionIdPlatform
|
20237 | }).then(function (authInfo) {
|
20238 | authInfo = AV.User.mergeUnionId(authInfo, unionId, {
|
20239 | asMainAccount: asMainAccount
|
20240 | });
|
20241 | authInfo.provider = PLATFORM_QQAPP;
|
20242 | return _this10.loginWithMiniApp(authInfo, {
|
20243 | failOnNotExist: failOnNotExist
|
20244 | });
|
20245 | });
|
20246 | },
|
20247 |
|
20248 | |
20249 |
|
20250 |
|
20251 |
|
20252 | loginWithMiniApp: function loginWithMiniApp(authInfo, option) {
|
20253 | var _this11 = this;
|
20254 |
|
20255 | if (authInfo === undefined) {
|
20256 | var getAuthInfo = getAdapter('getAuthInfo');
|
20257 | return getAuthInfo().then(function (authInfo) {
|
20258 | return _this11.loginWithAuthData(authInfo.authData, authInfo.provider, option);
|
20259 | });
|
20260 | }
|
20261 |
|
20262 | return this.loginWithAuthData(authInfo.authData, authInfo.provider, option);
|
20263 | },
|
20264 |
|
20265 | |
20266 |
|
20267 |
|
20268 |
|
20269 |
|
20270 |
|
20271 |
|
20272 |
|
20273 |
|
20274 |
|
20275 |
|
20276 | logIn: function logIn() {
|
20277 | var model = this;
|
20278 | var request = AVRequest('login', null, null, 'POST', this.toJSON());
|
20279 | return request.then(function (resp) {
|
20280 | var serverAttrs = model.parse(resp);
|
20281 |
|
20282 | model._finishFetch(serverAttrs);
|
20283 |
|
20284 | return model._handleSaveResult(true).then(function () {
|
20285 | if (!serverAttrs.smsCode) delete model.attributes['smsCode'];
|
20286 | return model;
|
20287 | });
|
20288 | });
|
20289 | },
|
20290 |
|
20291 | |
20292 |
|
20293 |
|
20294 | save: function save(arg1, arg2, arg3) {
|
20295 | var attrs, options;
|
20296 |
|
20297 | if (_.isObject(arg1) || _.isNull(arg1) || _.isUndefined(arg1)) {
|
20298 | attrs = arg1;
|
20299 | options = arg2;
|
20300 | } else {
|
20301 | attrs = {};
|
20302 | attrs[arg1] = arg2;
|
20303 | options = arg3;
|
20304 | }
|
20305 |
|
20306 | options = options || {};
|
20307 | return AV.Object.prototype.save.call(this, attrs, options).then(function (model) {
|
20308 | return model._handleSaveResult(false).then(function () {
|
20309 | return model;
|
20310 | });
|
20311 | });
|
20312 | },
|
20313 |
|
20314 | |
20315 |
|
20316 |
|
20317 |
|
20318 |
|
20319 |
|
20320 |
|
20321 |
|
20322 |
|
20323 | follow: function follow(options, authOptions) {
|
20324 | if (!this.id) {
|
20325 | throw new Error('Please signin.');
|
20326 | }
|
20327 |
|
20328 | var user;
|
20329 | var attributes;
|
20330 |
|
20331 | if (options.user) {
|
20332 | user = options.user;
|
20333 | attributes = options.attributes;
|
20334 | } else {
|
20335 | user = options;
|
20336 | }
|
20337 |
|
20338 | var userObjectId = _.isString(user) ? user : user.id;
|
20339 |
|
20340 | if (!userObjectId) {
|
20341 | throw new Error('Invalid target user.');
|
20342 | }
|
20343 |
|
20344 | var route = 'users/' + this.id + '/friendship/' + userObjectId;
|
20345 | var request = AVRequest(route, null, null, 'POST', AV._encode(attributes), authOptions);
|
20346 | return request;
|
20347 | },
|
20348 |
|
20349 | |
20350 |
|
20351 |
|
20352 |
|
20353 |
|
20354 |
|
20355 |
|
20356 | unfollow: function unfollow(options, authOptions) {
|
20357 | if (!this.id) {
|
20358 | throw new Error('Please signin.');
|
20359 | }
|
20360 |
|
20361 | var user;
|
20362 |
|
20363 | if (options.user) {
|
20364 | user = options.user;
|
20365 | } else {
|
20366 | user = options;
|
20367 | }
|
20368 |
|
20369 | var userObjectId = _.isString(user) ? user : user.id;
|
20370 |
|
20371 | if (!userObjectId) {
|
20372 | throw new Error('Invalid target user.');
|
20373 | }
|
20374 |
|
20375 | var route = 'users/' + this.id + '/friendship/' + userObjectId;
|
20376 | var request = AVRequest(route, null, null, 'DELETE', null, authOptions);
|
20377 | return request;
|
20378 | },
|
20379 |
|
20380 | |
20381 |
|
20382 |
|
20383 |
|
20384 |
|
20385 |
|
20386 |
|
20387 |
|
20388 | getFollowersAndFollowees: function getFollowersAndFollowees(options, authOptions) {
|
20389 | if (!this.id) {
|
20390 | throw new Error('Please signin.');
|
20391 | }
|
20392 |
|
20393 | return request({
|
20394 | method: 'GET',
|
20395 | path: "/users/".concat(this.id, "/followersAndFollowees"),
|
20396 | query: {
|
20397 | skip: options && options.skip,
|
20398 | limit: options && options.limit,
|
20399 | include: 'follower,followee',
|
20400 | keys: 'follower,followee'
|
20401 | },
|
20402 | authOptions: authOptions
|
20403 | }).then(function (_ref11) {
|
20404 | var followers = _ref11.followers,
|
20405 | followees = _ref11.followees;
|
20406 | return {
|
20407 | followers: (0, _map.default)(followers).call(followers, function (_ref12) {
|
20408 | var follower = _ref12.follower;
|
20409 | return AV._decode(follower);
|
20410 | }),
|
20411 | followees: (0, _map.default)(followees).call(followees, function (_ref13) {
|
20412 | var followee = _ref13.followee;
|
20413 | return AV._decode(followee);
|
20414 | })
|
20415 | };
|
20416 | });
|
20417 | },
|
20418 |
|
20419 | |
20420 |
|
20421 |
|
20422 |
|
20423 |
|
20424 | followerQuery: function followerQuery() {
|
20425 | return AV.User.followerQuery(this.id);
|
20426 | },
|
20427 |
|
20428 | |
20429 |
|
20430 |
|
20431 |
|
20432 |
|
20433 | followeeQuery: function followeeQuery() {
|
20434 | return AV.User.followeeQuery(this.id);
|
20435 | },
|
20436 |
|
20437 | |
20438 |
|
20439 |
|
20440 | fetch: function fetch(fetchOptions, options) {
|
20441 | return AV.Object.prototype.fetch.call(this, fetchOptions, options).then(function (model) {
|
20442 | return model._handleSaveResult(false).then(function () {
|
20443 | return model;
|
20444 | });
|
20445 | });
|
20446 | },
|
20447 |
|
20448 | |
20449 |
|
20450 |
|
20451 |
|
20452 |
|
20453 |
|
20454 | updatePassword: function updatePassword(oldPassword, newPassword, options) {
|
20455 | var _this12 = this;
|
20456 |
|
20457 | var route = 'users/' + this.id + '/updatePassword';
|
20458 | var params = {
|
20459 | old_password: oldPassword,
|
20460 | new_password: newPassword
|
20461 | };
|
20462 | var request = AVRequest(route, null, null, 'PUT', params, options);
|
20463 | return request.then(function (resp) {
|
20464 | _this12._finishFetch(_this12.parse(resp));
|
20465 |
|
20466 | return _this12._handleSaveResult(true).then(function () {
|
20467 | return resp;
|
20468 | });
|
20469 | });
|
20470 | },
|
20471 |
|
20472 | |
20473 |
|
20474 |
|
20475 |
|
20476 | isCurrent: function isCurrent() {
|
20477 | return this._isCurrentUser;
|
20478 | },
|
20479 |
|
20480 | |
20481 |
|
20482 |
|
20483 |
|
20484 |
|
20485 | getUsername: function getUsername() {
|
20486 | return this.get('username');
|
20487 | },
|
20488 |
|
20489 | |
20490 |
|
20491 |
|
20492 |
|
20493 |
|
20494 | getMobilePhoneNumber: function getMobilePhoneNumber() {
|
20495 | return this.get('mobilePhoneNumber');
|
20496 | },
|
20497 |
|
20498 | |
20499 |
|
20500 |
|
20501 |
|
20502 |
|
20503 |
|
20504 | setMobilePhoneNumber: function setMobilePhoneNumber(phone, options) {
|
20505 | return this.set('mobilePhoneNumber', phone, options);
|
20506 | },
|
20507 |
|
20508 | |
20509 |
|
20510 |
|
20511 |
|
20512 |
|
20513 |
|
20514 | setUsername: function setUsername(username, options) {
|
20515 | return this.set('username', username, options);
|
20516 | },
|
20517 |
|
20518 | |
20519 |
|
20520 |
|
20521 |
|
20522 |
|
20523 |
|
20524 | setPassword: function setPassword(password, options) {
|
20525 | return this.set('password', password, options);
|
20526 | },
|
20527 |
|
20528 | |
20529 |
|
20530 |
|
20531 |
|
20532 |
|
20533 | getEmail: function getEmail() {
|
20534 | return this.get('email');
|
20535 | },
|
20536 |
|
20537 | |
20538 |
|
20539 |
|
20540 |
|
20541 |
|
20542 |
|
20543 |
|
20544 | setEmail: function setEmail(email, options) {
|
20545 | return this.set('email', email, options);
|
20546 | },
|
20547 |
|
20548 | |
20549 |
|
20550 |
|
20551 |
|
20552 |
|
20553 |
|
20554 | authenticated: function authenticated() {
|
20555 | console.warn('DEPRECATED: 如果要判断当前用户的登录状态是否有效,请使用 currentUser.isAuthenticated().then(),如果要判断该用户是否是当前登录用户,请使用 user.id === currentUser.id。');
|
20556 | return !!this._sessionToken && !AV._config.disableCurrentUser && AV.User.current() && AV.User.current().id === this.id;
|
20557 | },
|
20558 |
|
20559 | |
20560 |
|
20561 |
|
20562 |
|
20563 |
|
20564 |
|
20565 | isAuthenticated: function isAuthenticated() {
|
20566 | var _this13 = this;
|
20567 |
|
20568 | return _promise.default.resolve().then(function () {
|
20569 | return !!_this13._sessionToken && AV.User._fetchUserBySessionToken(_this13._sessionToken).then(function () {
|
20570 | return true;
|
20571 | }, function (error) {
|
20572 | if (error.code === 211) {
|
20573 | return false;
|
20574 | }
|
20575 |
|
20576 | throw error;
|
20577 | });
|
20578 | });
|
20579 | },
|
20580 |
|
20581 | |
20582 |
|
20583 |
|
20584 |
|
20585 | getSessionToken: function getSessionToken() {
|
20586 | return this._sessionToken;
|
20587 | },
|
20588 |
|
20589 | |
20590 |
|
20591 |
|
20592 |
|
20593 |
|
20594 |
|
20595 | refreshSessionToken: function refreshSessionToken(options) {
|
20596 | var _this14 = this;
|
20597 |
|
20598 | return AVRequest("users/".concat(this.id, "/refreshSessionToken"), null, null, 'PUT', null, options).then(function (response) {
|
20599 | _this14._finishFetch(response);
|
20600 |
|
20601 | return _this14._handleSaveResult(true).then(function () {
|
20602 | return _this14;
|
20603 | });
|
20604 | });
|
20605 | },
|
20606 |
|
20607 | |
20608 |
|
20609 |
|
20610 |
|
20611 |
|
20612 |
|
20613 | getRoles: function getRoles(options) {
|
20614 | var _context;
|
20615 |
|
20616 | return (0, _find.default)(_context = AV.Relation.reverseQuery('_Role', 'users', this)).call(_context, options);
|
20617 | }
|
20618 | },
|
20619 |
|
20620 | {
|
20621 |
|
20622 |
|
20623 | _currentUser: null,
|
20624 |
|
20625 |
|
20626 |
|
20627 | _currentUserMatchesDisk: false,
|
20628 |
|
20629 | _CURRENT_USER_KEY: 'currentUser',
|
20630 |
|
20631 | _authProviders: {},
|
20632 |
|
20633 |
|
20634 | |
20635 |
|
20636 |
|
20637 |
|
20638 |
|
20639 |
|
20640 |
|
20641 |
|
20642 |
|
20643 |
|
20644 |
|
20645 |
|
20646 |
|
20647 |
|
20648 | signUp: function signUp(username, password, attrs, options) {
|
20649 | attrs = attrs || {};
|
20650 | attrs.username = username;
|
20651 | attrs.password = password;
|
20652 |
|
20653 | var user = AV.Object._create('_User');
|
20654 |
|
20655 | return user.signUp(attrs, options);
|
20656 | },
|
20657 |
|
20658 | |
20659 |
|
20660 |
|
20661 |
|
20662 |
|
20663 |
|
20664 |
|
20665 |
|
20666 |
|
20667 |
|
20668 |
|
20669 | logIn: function logIn(username, password) {
|
20670 | var user = AV.Object._create('_User');
|
20671 |
|
20672 | user._finishFetch({
|
20673 | username: username,
|
20674 | password: password
|
20675 | });
|
20676 |
|
20677 | return user.logIn();
|
20678 | },
|
20679 |
|
20680 | |
20681 |
|
20682 |
|
20683 |
|
20684 |
|
20685 |
|
20686 |
|
20687 |
|
20688 |
|
20689 | become: function become(sessionToken) {
|
20690 | return this._fetchUserBySessionToken(sessionToken).then(function (user) {
|
20691 | return user._handleSaveResult(true).then(function () {
|
20692 | return user;
|
20693 | });
|
20694 | });
|
20695 | },
|
20696 | _fetchUserBySessionToken: function _fetchUserBySessionToken(sessionToken) {
|
20697 | if (sessionToken === undefined) {
|
20698 | return _promise.default.reject(new Error('The sessionToken cannot be undefined'));
|
20699 | }
|
20700 |
|
20701 | var user = AV.Object._create('_User');
|
20702 |
|
20703 | return request({
|
20704 | method: 'GET',
|
20705 | path: '/users/me',
|
20706 | authOptions: {
|
20707 | sessionToken: sessionToken
|
20708 | }
|
20709 | }).then(function (resp) {
|
20710 | var serverAttrs = user.parse(resp);
|
20711 |
|
20712 | user._finishFetch(serverAttrs);
|
20713 |
|
20714 | return user;
|
20715 | });
|
20716 | },
|
20717 |
|
20718 | |
20719 |
|
20720 |
|
20721 |
|
20722 |
|
20723 |
|
20724 |
|
20725 |
|
20726 |
|
20727 |
|
20728 |
|
20729 |
|
20730 | logInWithMobilePhoneSmsCode: function logInWithMobilePhoneSmsCode(mobilePhone, smsCode) {
|
20731 | var user = AV.Object._create('_User');
|
20732 |
|
20733 | user._finishFetch({
|
20734 | mobilePhoneNumber: mobilePhone,
|
20735 | smsCode: smsCode
|
20736 | });
|
20737 |
|
20738 | return user.logIn();
|
20739 | },
|
20740 |
|
20741 | |
20742 |
|
20743 |
|
20744 |
|
20745 |
|
20746 |
|
20747 |
|
20748 |
|
20749 |
|
20750 |
|
20751 |
|
20752 |
|
20753 |
|
20754 |
|
20755 | signUpOrlogInWithMobilePhone: function signUpOrlogInWithMobilePhone(mobilePhoneNumber, smsCode, attrs, options) {
|
20756 | attrs = attrs || {};
|
20757 | attrs.mobilePhoneNumber = mobilePhoneNumber;
|
20758 | attrs.smsCode = smsCode;
|
20759 |
|
20760 | var user = AV.Object._create('_User');
|
20761 |
|
20762 | return user.signUpOrlogInWithMobilePhone(attrs, options);
|
20763 | },
|
20764 |
|
20765 | |
20766 |
|
20767 |
|
20768 |
|
20769 |
|
20770 |
|
20771 |
|
20772 |
|
20773 |
|
20774 |
|
20775 |
|
20776 | logInWithMobilePhone: function logInWithMobilePhone(mobilePhone, password) {
|
20777 | var user = AV.Object._create('_User');
|
20778 |
|
20779 | user._finishFetch({
|
20780 | mobilePhoneNumber: mobilePhone,
|
20781 | password: password
|
20782 | });
|
20783 |
|
20784 | return user.logIn();
|
20785 | },
|
20786 |
|
20787 | |
20788 |
|
20789 |
|
20790 |
|
20791 |
|
20792 |
|
20793 |
|
20794 |
|
20795 |
|
20796 | loginWithEmail: function loginWithEmail(email, password) {
|
20797 | var user = AV.Object._create('_User');
|
20798 |
|
20799 | user._finishFetch({
|
20800 | email: email,
|
20801 | password: password
|
20802 | });
|
20803 |
|
20804 | return user.logIn();
|
20805 | },
|
20806 |
|
20807 | |
20808 |
|
20809 |
|
20810 |
|
20811 |
|
20812 |
|
20813 |
|
20814 |
|
20815 |
|
20816 |
|
20817 |
|
20818 |
|
20819 |
|
20820 |
|
20821 |
|
20822 |
|
20823 |
|
20824 |
|
20825 |
|
20826 |
|
20827 |
|
20828 |
|
20829 |
|
20830 | loginWithAuthData: function loginWithAuthData(authData, platform, options) {
|
20831 | return AV.User._logInWith(platform, authData, options);
|
20832 | },
|
20833 |
|
20834 | |
20835 |
|
20836 |
|
20837 | signUpOrlogInWithAuthData: function signUpOrlogInWithAuthData() {
|
20838 | console.warn('DEPRECATED: User.signUpOrlogInWithAuthData 已废弃,请使用 User#loginWithAuthData 代替');
|
20839 | return this.loginWithAuthData.apply(this, arguments);
|
20840 | },
|
20841 |
|
20842 | |
20843 |
|
20844 |
|
20845 |
|
20846 |
|
20847 |
|
20848 |
|
20849 |
|
20850 |
|
20851 |
|
20852 |
|
20853 |
|
20854 |
|
20855 |
|
20856 |
|
20857 |
|
20858 |
|
20859 |
|
20860 |
|
20861 |
|
20862 |
|
20863 |
|
20864 |
|
20865 |
|
20866 | loginWithAuthDataAndUnionId: function loginWithAuthDataAndUnionId(authData, platform, unionId, unionLoginOptions) {
|
20867 | return this.loginWithAuthData(mergeUnionDataIntoAuthData()(authData, unionId, unionLoginOptions), platform, unionLoginOptions);
|
20868 | },
|
20869 |
|
20870 | |
20871 |
|
20872 |
|
20873 |
|
20874 | signUpOrlogInWithAuthDataAndUnionId: function signUpOrlogInWithAuthDataAndUnionId() {
|
20875 | console.warn('DEPRECATED: User.signUpOrlogInWithAuthDataAndUnionId 已废弃,请使用 User#loginWithAuthDataAndUnionId 代替');
|
20876 | return this.loginWithAuthDataAndUnionId.apply(this, arguments);
|
20877 | },
|
20878 |
|
20879 | |
20880 |
|
20881 |
|
20882 |
|
20883 |
|
20884 |
|
20885 |
|
20886 |
|
20887 | mergeUnionId: function mergeUnionId(authInfo, unionId) {
|
20888 | var _ref14 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
20889 | _ref14$asMainAccount = _ref14.asMainAccount,
|
20890 | asMainAccount = _ref14$asMainAccount === void 0 ? false : _ref14$asMainAccount;
|
20891 |
|
20892 | authInfo = JSON.parse((0, _stringify.default)(authInfo));
|
20893 | var _authInfo = authInfo,
|
20894 | authData = _authInfo.authData,
|
20895 | platform = _authInfo.platform;
|
20896 | authData.platform = platform;
|
20897 | authData.main_account = asMainAccount;
|
20898 | authData.unionid = unionId;
|
20899 | return authInfo;
|
20900 | },
|
20901 |
|
20902 | |
20903 |
|
20904 |
|
20905 |
|
20906 |
|
20907 |
|
20908 |
|
20909 |
|
20910 |
|
20911 |
|
20912 |
|
20913 |
|
20914 |
|
20915 | loginWithWeapp: function loginWithWeapp() {
|
20916 | var _this15 = this;
|
20917 |
|
20918 | var _ref15 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
20919 | _ref15$preferUnionId = _ref15.preferUnionId,
|
20920 | preferUnionId = _ref15$preferUnionId === void 0 ? false : _ref15$preferUnionId,
|
20921 | _ref15$unionIdPlatfor = _ref15.unionIdPlatform,
|
20922 | unionIdPlatform = _ref15$unionIdPlatfor === void 0 ? 'weixin' : _ref15$unionIdPlatfor,
|
20923 | _ref15$asMainAccount = _ref15.asMainAccount,
|
20924 | asMainAccount = _ref15$asMainAccount === void 0 ? true : _ref15$asMainAccount,
|
20925 | _ref15$failOnNotExist = _ref15.failOnNotExist,
|
20926 | failOnNotExist = _ref15$failOnNotExist === void 0 ? false : _ref15$failOnNotExist;
|
20927 |
|
20928 | var getAuthInfo = getAdapter('getAuthInfo');
|
20929 | return getAuthInfo({
|
20930 | preferUnionId: preferUnionId,
|
20931 | asMainAccount: asMainAccount,
|
20932 | platform: unionIdPlatform
|
20933 | }).then(function (authInfo) {
|
20934 | return _this15.loginWithMiniApp(authInfo, {
|
20935 | failOnNotExist: failOnNotExist
|
20936 | });
|
20937 | });
|
20938 | },
|
20939 |
|
20940 | |
20941 |
|
20942 |
|
20943 |
|
20944 |
|
20945 |
|
20946 |
|
20947 |
|
20948 |
|
20949 |
|
20950 |
|
20951 | loginWithWeappWithUnionId: function loginWithWeappWithUnionId(unionId) {
|
20952 | var _this16 = this;
|
20953 |
|
20954 | var _ref16 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
20955 | _ref16$unionIdPlatfor = _ref16.unionIdPlatform,
|
20956 | unionIdPlatform = _ref16$unionIdPlatfor === void 0 ? 'weixin' : _ref16$unionIdPlatfor,
|
20957 | _ref16$asMainAccount = _ref16.asMainAccount,
|
20958 | asMainAccount = _ref16$asMainAccount === void 0 ? false : _ref16$asMainAccount,
|
20959 | _ref16$failOnNotExist = _ref16.failOnNotExist,
|
20960 | failOnNotExist = _ref16$failOnNotExist === void 0 ? false : _ref16$failOnNotExist;
|
20961 |
|
20962 | var getAuthInfo = getAdapter('getAuthInfo');
|
20963 | return getAuthInfo({
|
20964 | platform: unionIdPlatform
|
20965 | }).then(function (authInfo) {
|
20966 | authInfo = AV.User.mergeUnionId(authInfo, unionId, {
|
20967 | asMainAccount: asMainAccount
|
20968 | });
|
20969 | return _this16.loginWithMiniApp(authInfo, {
|
20970 | failOnNotExist: failOnNotExist
|
20971 | });
|
20972 | });
|
20973 | },
|
20974 |
|
20975 | |
20976 |
|
20977 |
|
20978 |
|
20979 |
|
20980 |
|
20981 |
|
20982 |
|
20983 |
|
20984 |
|
20985 |
|
20986 |
|
20987 |
|
20988 | loginWithQQApp: function loginWithQQApp() {
|
20989 | var _this17 = this;
|
20990 |
|
20991 | var _ref17 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
20992 | _ref17$preferUnionId = _ref17.preferUnionId,
|
20993 | preferUnionId = _ref17$preferUnionId === void 0 ? false : _ref17$preferUnionId,
|
20994 | _ref17$unionIdPlatfor = _ref17.unionIdPlatform,
|
20995 | unionIdPlatform = _ref17$unionIdPlatfor === void 0 ? 'qq' : _ref17$unionIdPlatfor,
|
20996 | _ref17$asMainAccount = _ref17.asMainAccount,
|
20997 | asMainAccount = _ref17$asMainAccount === void 0 ? true : _ref17$asMainAccount,
|
20998 | _ref17$failOnNotExist = _ref17.failOnNotExist,
|
20999 | failOnNotExist = _ref17$failOnNotExist === void 0 ? false : _ref17$failOnNotExist;
|
21000 |
|
21001 | var getAuthInfo = getAdapter('getAuthInfo');
|
21002 | return getAuthInfo({
|
21003 | preferUnionId: preferUnionId,
|
21004 | asMainAccount: asMainAccount,
|
21005 | platform: unionIdPlatform
|
21006 | }).then(function (authInfo) {
|
21007 | authInfo.provider = PLATFORM_QQAPP;
|
21008 | return _this17.loginWithMiniApp(authInfo, {
|
21009 | failOnNotExist: failOnNotExist
|
21010 | });
|
21011 | });
|
21012 | },
|
21013 |
|
21014 | |
21015 |
|
21016 |
|
21017 |
|
21018 |
|
21019 |
|
21020 |
|
21021 |
|
21022 |
|
21023 |
|
21024 |
|
21025 |
|
21026 | loginWithQQAppWithUnionId: function loginWithQQAppWithUnionId(unionId) {
|
21027 | var _this18 = this;
|
21028 |
|
21029 | var _ref18 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
21030 | _ref18$unionIdPlatfor = _ref18.unionIdPlatform,
|
21031 | unionIdPlatform = _ref18$unionIdPlatfor === void 0 ? 'qq' : _ref18$unionIdPlatfor,
|
21032 | _ref18$asMainAccount = _ref18.asMainAccount,
|
21033 | asMainAccount = _ref18$asMainAccount === void 0 ? false : _ref18$asMainAccount,
|
21034 | _ref18$failOnNotExist = _ref18.failOnNotExist,
|
21035 | failOnNotExist = _ref18$failOnNotExist === void 0 ? false : _ref18$failOnNotExist;
|
21036 |
|
21037 | var getAuthInfo = getAdapter('getAuthInfo');
|
21038 | return getAuthInfo({
|
21039 | platform: unionIdPlatform
|
21040 | }).then(function (authInfo) {
|
21041 | authInfo = AV.User.mergeUnionId(authInfo, unionId, {
|
21042 | asMainAccount: asMainAccount
|
21043 | });
|
21044 | authInfo.provider = PLATFORM_QQAPP;
|
21045 | return _this18.loginWithMiniApp(authInfo, {
|
21046 | failOnNotExist: failOnNotExist
|
21047 | });
|
21048 | });
|
21049 | },
|
21050 |
|
21051 | |
21052 |
|
21053 |
|
21054 |
|
21055 |
|
21056 |
|
21057 | loginWithMiniApp: function loginWithMiniApp(authInfo, option) {
|
21058 | var _this19 = this;
|
21059 |
|
21060 | if (authInfo === undefined) {
|
21061 | var getAuthInfo = getAdapter('getAuthInfo');
|
21062 | return getAuthInfo().then(function (authInfo) {
|
21063 | return _this19.loginWithAuthData(authInfo.authData, authInfo.provider, option);
|
21064 | });
|
21065 | }
|
21066 |
|
21067 | return this.loginWithAuthData(authInfo.authData, authInfo.provider, option);
|
21068 | },
|
21069 |
|
21070 | |
21071 |
|
21072 |
|
21073 | _genId: function _genId() {
|
21074 | return uuid();
|
21075 | },
|
21076 |
|
21077 | |
21078 |
|
21079 |
|
21080 |
|
21081 |
|
21082 |
|
21083 | loginAnonymously: function loginAnonymously() {
|
21084 | return this.loginWithAuthData({
|
21085 | id: AV.User._genId()
|
21086 | }, 'anonymous');
|
21087 | },
|
21088 | associateWithAuthData: function associateWithAuthData(userObj, platform, authData) {
|
21089 | console.warn('DEPRECATED: User.associateWithAuthData 已废弃,请使用 User#associateWithAuthData 代替');
|
21090 | return userObj._linkWith(platform, authData);
|
21091 | },
|
21092 |
|
21093 | |
21094 |
|
21095 |
|
21096 |
|
21097 |
|
21098 |
|
21099 | logOut: function logOut() {
|
21100 | if (AV._config.disableCurrentUser) {
|
21101 | console.warn('AV.User.current() was disabled in multi-user environment, call logOut() from user object instead https://leancloud.cn/docs/leanengine-node-sdk-upgrade-1.html');
|
21102 | return _promise.default.resolve(null);
|
21103 | }
|
21104 |
|
21105 | if (AV.User._currentUser !== null) {
|
21106 | AV.User._currentUser._logOutWithAll();
|
21107 |
|
21108 | AV.User._currentUser._isCurrentUser = false;
|
21109 | }
|
21110 |
|
21111 | AV.User._currentUserMatchesDisk = true;
|
21112 | AV.User._currentUser = null;
|
21113 | return AV.localStorage.removeItemAsync(AV._getAVPath(AV.User._CURRENT_USER_KEY)).then(function () {
|
21114 | return AV._refreshSubscriptionId();
|
21115 | });
|
21116 | },
|
21117 |
|
21118 | |
21119 |
|
21120 |
|
21121 |
|
21122 |
|
21123 |
|
21124 | followerQuery: function followerQuery(userObjectId) {
|
21125 | if (!userObjectId || !_.isString(userObjectId)) {
|
21126 | throw new Error('Invalid user object id.');
|
21127 | }
|
21128 |
|
21129 | var query = new AV.FriendShipQuery('_Follower');
|
21130 | query._friendshipTag = 'follower';
|
21131 | query.equalTo('user', AV.Object.createWithoutData('_User', userObjectId));
|
21132 | return query;
|
21133 | },
|
21134 |
|
21135 | |
21136 |
|
21137 |
|
21138 |
|
21139 |
|
21140 |
|
21141 | followeeQuery: function followeeQuery(userObjectId) {
|
21142 | if (!userObjectId || !_.isString(userObjectId)) {
|
21143 | throw new Error('Invalid user object id.');
|
21144 | }
|
21145 |
|
21146 | var query = new AV.FriendShipQuery('_Followee');
|
21147 | query._friendshipTag = 'followee';
|
21148 | query.equalTo('user', AV.Object.createWithoutData('_User', userObjectId));
|
21149 | return query;
|
21150 | },
|
21151 |
|
21152 | |
21153 |
|
21154 |
|
21155 |
|
21156 |
|
21157 |
|
21158 |
|
21159 |
|
21160 |
|
21161 | requestPasswordReset: function requestPasswordReset(email) {
|
21162 | var json = {
|
21163 | email: email
|
21164 | };
|
21165 | var request = AVRequest('requestPasswordReset', null, null, 'POST', json);
|
21166 | return request;
|
21167 | },
|
21168 |
|
21169 | |
21170 |
|
21171 |
|
21172 |
|
21173 |
|
21174 |
|
21175 |
|
21176 |
|
21177 |
|
21178 | requestEmailVerify: function requestEmailVerify(email) {
|
21179 | var json = {
|
21180 | email: email
|
21181 | };
|
21182 | var request = AVRequest('requestEmailVerify', null, null, 'POST', json);
|
21183 | return request;
|
21184 | },
|
21185 |
|
21186 | |
21187 |
|
21188 |
|
21189 |
|
21190 |
|
21191 |
|
21192 |
|
21193 |
|
21194 |
|
21195 |
|
21196 | requestMobilePhoneVerify: function requestMobilePhoneVerify(mobilePhoneNumber) {
|
21197 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
21198 | var data = {
|
21199 | mobilePhoneNumber: mobilePhoneNumber
|
21200 | };
|
21201 |
|
21202 | if (options.validateToken) {
|
21203 | data.validate_token = options.validateToken;
|
21204 | }
|
21205 |
|
21206 | var request = AVRequest('requestMobilePhoneVerify', null, null, 'POST', data, options);
|
21207 | return request;
|
21208 | },
|
21209 |
|
21210 | |
21211 |
|
21212 |
|
21213 |
|
21214 |
|
21215 |
|
21216 |
|
21217 |
|
21218 |
|
21219 |
|
21220 | requestPasswordResetBySmsCode: function requestPasswordResetBySmsCode(mobilePhoneNumber) {
|
21221 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
21222 | var data = {
|
21223 | mobilePhoneNumber: mobilePhoneNumber
|
21224 | };
|
21225 |
|
21226 | if (options.validateToken) {
|
21227 | data.validate_token = options.validateToken;
|
21228 | }
|
21229 |
|
21230 | var request = AVRequest('requestPasswordResetBySmsCode', null, null, 'POST', data, options);
|
21231 | return request;
|
21232 | },
|
21233 |
|
21234 | |
21235 |
|
21236 |
|
21237 |
|
21238 |
|
21239 |
|
21240 |
|
21241 |
|
21242 |
|
21243 |
|
21244 | requestChangePhoneNumber: function requestChangePhoneNumber(mobilePhoneNumber, ttl, options) {
|
21245 | var data = {
|
21246 | mobilePhoneNumber: mobilePhoneNumber
|
21247 | };
|
21248 |
|
21249 | if (ttl) {
|
21250 | data.ttl = options.ttl;
|
21251 | }
|
21252 |
|
21253 | if (options && options.validateToken) {
|
21254 | data.validate_token = options.validateToken;
|
21255 | }
|
21256 |
|
21257 | return AVRequest('requestChangePhoneNumber', null, null, 'POST', data, options);
|
21258 | },
|
21259 |
|
21260 | |
21261 |
|
21262 |
|
21263 |
|
21264 |
|
21265 |
|
21266 |
|
21267 |
|
21268 | changePhoneNumber: function changePhoneNumber(mobilePhoneNumber, code) {
|
21269 | var data = {
|
21270 | mobilePhoneNumber: mobilePhoneNumber,
|
21271 | code: code
|
21272 | };
|
21273 | return AVRequest('changePhoneNumber', null, null, 'POST', data);
|
21274 | },
|
21275 |
|
21276 | |
21277 |
|
21278 |
|
21279 |
|
21280 |
|
21281 |
|
21282 |
|
21283 |
|
21284 | resetPasswordBySmsCode: function resetPasswordBySmsCode(code, password) {
|
21285 | var json = {
|
21286 | password: password
|
21287 | };
|
21288 | var request = AVRequest('resetPasswordBySmsCode', null, code, 'PUT', json);
|
21289 | return request;
|
21290 | },
|
21291 |
|
21292 | |
21293 |
|
21294 |
|
21295 |
|
21296 |
|
21297 |
|
21298 |
|
21299 | verifyMobilePhone: function verifyMobilePhone(code) {
|
21300 | var request = AVRequest('verifyMobilePhone', null, code, 'POST', null);
|
21301 | return request;
|
21302 | },
|
21303 |
|
21304 | |
21305 |
|
21306 |
|
21307 |
|
21308 |
|
21309 |
|
21310 |
|
21311 |
|
21312 |
|
21313 |
|
21314 | requestLoginSmsCode: function requestLoginSmsCode(mobilePhoneNumber) {
|
21315 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
21316 | var data = {
|
21317 | mobilePhoneNumber: mobilePhoneNumber
|
21318 | };
|
21319 |
|
21320 | if (options.validateToken) {
|
21321 | data.validate_token = options.validateToken;
|
21322 | }
|
21323 |
|
21324 | var request = AVRequest('requestLoginSmsCode', null, null, 'POST', data, options);
|
21325 | return request;
|
21326 | },
|
21327 |
|
21328 | |
21329 |
|
21330 |
|
21331 |
|
21332 |
|
21333 | currentAsync: function currentAsync() {
|
21334 | if (AV._config.disableCurrentUser) {
|
21335 | console.warn('AV.User.currentAsync() was disabled in multi-user environment, access user from request instead https://leancloud.cn/docs/leanengine-node-sdk-upgrade-1.html');
|
21336 | return _promise.default.resolve(null);
|
21337 | }
|
21338 |
|
21339 | if (AV.User._currentUser) {
|
21340 | return _promise.default.resolve(AV.User._currentUser);
|
21341 | }
|
21342 |
|
21343 | if (AV.User._currentUserMatchesDisk) {
|
21344 | return _promise.default.resolve(AV.User._currentUser);
|
21345 | }
|
21346 |
|
21347 | return AV.localStorage.getItemAsync(AV._getAVPath(AV.User._CURRENT_USER_KEY)).then(function (userData) {
|
21348 | if (!userData) {
|
21349 | return null;
|
21350 | }
|
21351 |
|
21352 |
|
21353 | AV.User._currentUserMatchesDisk = true;
|
21354 | AV.User._currentUser = AV.Object._create('_User');
|
21355 | AV.User._currentUser._isCurrentUser = true;
|
21356 | var json = JSON.parse(userData);
|
21357 | AV.User._currentUser.id = json._id;
|
21358 | delete json._id;
|
21359 | AV.User._currentUser._sessionToken = json._sessionToken;
|
21360 | delete json._sessionToken;
|
21361 |
|
21362 | AV.User._currentUser._finishFetch(json);
|
21363 |
|
21364 |
|
21365 | AV.User._currentUser._synchronizeAllAuthData();
|
21366 |
|
21367 | AV.User._currentUser._refreshCache();
|
21368 |
|
21369 | AV.User._currentUser._opSetQueue = [{}];
|
21370 | return AV.User._currentUser;
|
21371 | });
|
21372 | },
|
21373 |
|
21374 | |
21375 |
|
21376 |
|
21377 |
|
21378 |
|
21379 | current: function current() {
|
21380 | if (AV._config.disableCurrentUser) {
|
21381 | console.warn('AV.User.current() was disabled in multi-user environment, access user from request instead https://leancloud.cn/docs/leanengine-node-sdk-upgrade-1.html');
|
21382 | return null;
|
21383 | }
|
21384 |
|
21385 | if (AV.localStorage.async) {
|
21386 | var error = new Error('Synchronous API User.current() is not available in this runtime. Use User.currentAsync() instead.');
|
21387 | error.code = 'SYNC_API_NOT_AVAILABLE';
|
21388 | throw error;
|
21389 | }
|
21390 |
|
21391 | if (AV.User._currentUser) {
|
21392 | return AV.User._currentUser;
|
21393 | }
|
21394 |
|
21395 | if (AV.User._currentUserMatchesDisk) {
|
21396 | return AV.User._currentUser;
|
21397 | }
|
21398 |
|
21399 |
|
21400 | AV.User._currentUserMatchesDisk = true;
|
21401 | var userData = AV.localStorage.getItem(AV._getAVPath(AV.User._CURRENT_USER_KEY));
|
21402 |
|
21403 | if (!userData) {
|
21404 | return null;
|
21405 | }
|
21406 |
|
21407 | AV.User._currentUser = AV.Object._create('_User');
|
21408 | AV.User._currentUser._isCurrentUser = true;
|
21409 | var json = JSON.parse(userData);
|
21410 | AV.User._currentUser.id = json._id;
|
21411 | delete json._id;
|
21412 | AV.User._currentUser._sessionToken = json._sessionToken;
|
21413 | delete json._sessionToken;
|
21414 |
|
21415 | AV.User._currentUser._finishFetch(json);
|
21416 |
|
21417 |
|
21418 | AV.User._currentUser._synchronizeAllAuthData();
|
21419 |
|
21420 | AV.User._currentUser._refreshCache();
|
21421 |
|
21422 | AV.User._currentUser._opSetQueue = [{}];
|
21423 | return AV.User._currentUser;
|
21424 | },
|
21425 |
|
21426 | |
21427 |
|
21428 |
|
21429 |
|
21430 | _saveCurrentUser: function _saveCurrentUser(user) {
|
21431 | var promise;
|
21432 |
|
21433 | if (AV.User._currentUser !== user) {
|
21434 | promise = AV.User.logOut();
|
21435 | } else {
|
21436 | promise = _promise.default.resolve();
|
21437 | }
|
21438 |
|
21439 | return promise.then(function () {
|
21440 | user._isCurrentUser = true;
|
21441 | AV.User._currentUser = user;
|
21442 |
|
21443 | var json = user._toFullJSON();
|
21444 |
|
21445 | json._id = user.id;
|
21446 | json._sessionToken = user._sessionToken;
|
21447 | return AV.localStorage.setItemAsync(AV._getAVPath(AV.User._CURRENT_USER_KEY), (0, _stringify.default)(json)).then(function () {
|
21448 | AV.User._currentUserMatchesDisk = true;
|
21449 | return AV._refreshSubscriptionId();
|
21450 | });
|
21451 | });
|
21452 | },
|
21453 | _registerAuthenticationProvider: function _registerAuthenticationProvider(provider) {
|
21454 | AV.User._authProviders[provider.getAuthType()] = provider;
|
21455 |
|
21456 | if (!AV._config.disableCurrentUser && AV.User.current()) {
|
21457 | AV.User.current()._synchronizeAuthData(provider.getAuthType());
|
21458 | }
|
21459 | },
|
21460 | _logInWith: function _logInWith(provider, authData, options) {
|
21461 | var user = AV.Object._create('_User');
|
21462 |
|
21463 | return user._linkWith(provider, authData, options);
|
21464 | }
|
21465 | });
|
21466 | };
|
21467 |
|
21468 | }),
|
21469 |
|
21470 | (function(module, exports, __webpack_require__) {
|
21471 |
|
21472 | var _Object$defineProperty = __webpack_require__(145);
|
21473 |
|
21474 | function _defineProperty(obj, key, value) {
|
21475 | if (key in obj) {
|
21476 | _Object$defineProperty(obj, key, {
|
21477 | value: value,
|
21478 | enumerable: true,
|
21479 | configurable: true,
|
21480 | writable: true
|
21481 | });
|
21482 | } else {
|
21483 | obj[key] = value;
|
21484 | }
|
21485 |
|
21486 | return obj;
|
21487 | }
|
21488 |
|
21489 | module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
21490 |
|
21491 | }),
|
21492 |
|
21493 | (function(module, exports, __webpack_require__) {
|
21494 |
|
21495 | "use strict";
|
21496 |
|
21497 |
|
21498 | var _interopRequireDefault = __webpack_require__(1);
|
21499 |
|
21500 | var _map = _interopRequireDefault(__webpack_require__(42));
|
21501 |
|
21502 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
21503 |
|
21504 | var _keys = _interopRequireDefault(__webpack_require__(55));
|
21505 |
|
21506 | var _stringify = _interopRequireDefault(__webpack_require__(36));
|
21507 |
|
21508 | var _find = _interopRequireDefault(__webpack_require__(110));
|
21509 |
|
21510 | var _concat = _interopRequireDefault(__webpack_require__(30));
|
21511 |
|
21512 | var _ = __webpack_require__(2);
|
21513 |
|
21514 | var debug = __webpack_require__(67)('leancloud:query');
|
21515 |
|
21516 | var AVError = __webpack_require__(43);
|
21517 |
|
21518 | var _require = __webpack_require__(26),
|
21519 | _request = _require._request,
|
21520 | request = _require.request;
|
21521 |
|
21522 | var _require2 = __webpack_require__(29),
|
21523 | ensureArray = _require2.ensureArray,
|
21524 | transformFetchOptions = _require2.transformFetchOptions,
|
21525 | continueWhile = _require2.continueWhile;
|
21526 |
|
21527 | var requires = function requires(value, message) {
|
21528 | if (value === undefined) {
|
21529 | throw new Error(message);
|
21530 | }
|
21531 | };
|
21532 |
|
21533 |
|
21534 | module.exports = function (AV) {
|
21535 | |
21536 |
|
21537 |
|
21538 |
|
21539 |
|
21540 |
|
21541 |
|
21542 |
|
21543 |
|
21544 |
|
21545 |
|
21546 |
|
21547 |
|
21548 |
|
21549 |
|
21550 |
|
21551 |
|
21552 |
|
21553 |
|
21554 |
|
21555 |
|
21556 |
|
21557 |
|
21558 |
|
21559 |
|
21560 |
|
21561 |
|
21562 |
|
21563 |
|
21564 |
|
21565 |
|
21566 |
|
21567 |
|
21568 |
|
21569 |
|
21570 |
|
21571 |
|
21572 |
|
21573 |
|
21574 |
|
21575 |
|
21576 |
|
21577 |
|
21578 | AV.Query = function (objectClass) {
|
21579 | if (_.isString(objectClass)) {
|
21580 | objectClass = AV.Object._getSubclass(objectClass);
|
21581 | }
|
21582 |
|
21583 | this.objectClass = objectClass;
|
21584 | this.className = objectClass.prototype.className;
|
21585 | this._where = {};
|
21586 | this._include = [];
|
21587 | this._select = [];
|
21588 | this._limit = -1;
|
21589 |
|
21590 | this._skip = 0;
|
21591 | this._defaultParams = {};
|
21592 | };
|
21593 | |
21594 |
|
21595 |
|
21596 |
|
21597 |
|
21598 |
|
21599 |
|
21600 |
|
21601 |
|
21602 |
|
21603 |
|
21604 |
|
21605 | AV.Query.or = function () {
|
21606 | var queries = _.toArray(arguments);
|
21607 |
|
21608 | var className = null;
|
21609 |
|
21610 | AV._arrayEach(queries, function (q) {
|
21611 | if (_.isNull(className)) {
|
21612 | className = q.className;
|
21613 | }
|
21614 |
|
21615 | if (className !== q.className) {
|
21616 | throw new Error('All queries must be for the same class');
|
21617 | }
|
21618 | });
|
21619 |
|
21620 | var query = new AV.Query(className);
|
21621 |
|
21622 | query._orQuery(queries);
|
21623 |
|
21624 | return query;
|
21625 | };
|
21626 | |
21627 |
|
21628 |
|
21629 |
|
21630 |
|
21631 |
|
21632 |
|
21633 |
|
21634 |
|
21635 |
|
21636 |
|
21637 |
|
21638 | AV.Query.and = function () {
|
21639 | var queries = _.toArray(arguments);
|
21640 |
|
21641 | var className = null;
|
21642 |
|
21643 | AV._arrayEach(queries, function (q) {
|
21644 | if (_.isNull(className)) {
|
21645 | className = q.className;
|
21646 | }
|
21647 |
|
21648 | if (className !== q.className) {
|
21649 | throw new Error('All queries must be for the same class');
|
21650 | }
|
21651 | });
|
21652 |
|
21653 | var query = new AV.Query(className);
|
21654 |
|
21655 | query._andQuery(queries);
|
21656 |
|
21657 | return query;
|
21658 | };
|
21659 | |
21660 |
|
21661 |
|
21662 |
|
21663 |
|
21664 |
|
21665 |
|
21666 |
|
21667 |
|
21668 |
|
21669 |
|
21670 |
|
21671 | AV.Query.doCloudQuery = function (cql, pvalues, options) {
|
21672 | var params = {
|
21673 | cql: cql
|
21674 | };
|
21675 |
|
21676 | if (_.isArray(pvalues)) {
|
21677 | params.pvalues = pvalues;
|
21678 | } else {
|
21679 | options = pvalues;
|
21680 | }
|
21681 |
|
21682 | var request = _request('cloudQuery', null, null, 'GET', params, options);
|
21683 |
|
21684 | return request.then(function (response) {
|
21685 |
|
21686 | var query = new AV.Query(response.className);
|
21687 | var results = (0, _map.default)(_).call(_, response.results, function (json) {
|
21688 | var obj = query._newObject(response);
|
21689 |
|
21690 | if (obj._finishFetch) {
|
21691 | obj._finishFetch(query._processResult(json), true);
|
21692 | }
|
21693 |
|
21694 | return obj;
|
21695 | });
|
21696 | return {
|
21697 | results: results,
|
21698 | count: response.count,
|
21699 | className: response.className
|
21700 | };
|
21701 | });
|
21702 | };
|
21703 | |
21704 |
|
21705 |
|
21706 |
|
21707 |
|
21708 |
|
21709 |
|
21710 |
|
21711 |
|
21712 | AV.Query.fromJSON = function (_ref) {
|
21713 | var className = _ref.className,
|
21714 | where = _ref.where,
|
21715 | include = _ref.include,
|
21716 | select = _ref.select,
|
21717 | includeACL = _ref.includeACL,
|
21718 | limit = _ref.limit,
|
21719 | skip = _ref.skip,
|
21720 | order = _ref.order;
|
21721 |
|
21722 | if (typeof className !== 'string') {
|
21723 | throw new TypeError('Invalid Query JSON, className must be a String.');
|
21724 | }
|
21725 |
|
21726 | var query = new AV.Query(className);
|
21727 |
|
21728 | _.extend(query, {
|
21729 | _where: where,
|
21730 | _include: include,
|
21731 | _select: select,
|
21732 | _includeACL: includeACL,
|
21733 | _limit: limit,
|
21734 | _skip: skip,
|
21735 | _order: order
|
21736 | });
|
21737 |
|
21738 | return query;
|
21739 | };
|
21740 |
|
21741 | AV.Query._extend = AV._extend;
|
21742 |
|
21743 | _.extend(AV.Query.prototype,
|
21744 |
|
21745 | {
|
21746 |
|
21747 | _processResult: function _processResult(obj) {
|
21748 | return obj;
|
21749 | },
|
21750 |
|
21751 | |
21752 |
|
21753 |
|
21754 |
|
21755 |
|
21756 |
|
21757 |
|
21758 |
|
21759 | get: function get(objectId, options) {
|
21760 | if (!_.isString(objectId)) {
|
21761 | throw new Error('objectId must be a string');
|
21762 | }
|
21763 |
|
21764 | if (objectId === '') {
|
21765 | return _promise.default.reject(new AVError(AVError.OBJECT_NOT_FOUND, 'Object not found.'));
|
21766 | }
|
21767 |
|
21768 | var obj = this._newObject();
|
21769 |
|
21770 | obj.id = objectId;
|
21771 |
|
21772 | var queryJSON = this._getParams();
|
21773 |
|
21774 | var fetchOptions = {};
|
21775 | if ((0, _keys.default)(queryJSON)) fetchOptions.keys = (0, _keys.default)(queryJSON);
|
21776 | if (queryJSON.include) fetchOptions.include = queryJSON.include;
|
21777 | if (queryJSON.includeACL) fetchOptions.includeACL = queryJSON.includeACL;
|
21778 | return _request('classes', this.className, objectId, 'GET', transformFetchOptions(fetchOptions), options).then(function (response) {
|
21779 | if (_.isEmpty(response)) throw new AVError(AVError.OBJECT_NOT_FOUND, 'Object not found.');
|
21780 |
|
21781 | obj._finishFetch(obj.parse(response), true);
|
21782 |
|
21783 | return obj;
|
21784 | });
|
21785 | },
|
21786 |
|
21787 | |
21788 |
|
21789 |
|
21790 |
|
21791 | toJSON: function toJSON() {
|
21792 | var className = this.className,
|
21793 | where = this._where,
|
21794 | include = this._include,
|
21795 | select = this._select,
|
21796 | includeACL = this._includeACL,
|
21797 | limit = this._limit,
|
21798 | skip = this._skip,
|
21799 | order = this._order;
|
21800 | return {
|
21801 | className: className,
|
21802 | where: where,
|
21803 | include: include,
|
21804 | select: select,
|
21805 | includeACL: includeACL,
|
21806 | limit: limit,
|
21807 | skip: skip,
|
21808 | order: order
|
21809 | };
|
21810 | },
|
21811 | _getParams: function _getParams() {
|
21812 | var params = _.extend({}, this._defaultParams, {
|
21813 | where: this._where
|
21814 | });
|
21815 |
|
21816 | if (this._include.length > 0) {
|
21817 | params.include = this._include.join(',');
|
21818 | }
|
21819 |
|
21820 | if (this._select.length > 0) {
|
21821 | params.keys = this._select.join(',');
|
21822 | }
|
21823 |
|
21824 | if (this._includeACL !== undefined) {
|
21825 | params.returnACL = this._includeACL;
|
21826 | }
|
21827 |
|
21828 | if (this._limit >= 0) {
|
21829 | params.limit = this._limit;
|
21830 | }
|
21831 |
|
21832 | if (this._skip > 0) {
|
21833 | params.skip = this._skip;
|
21834 | }
|
21835 |
|
21836 | if (this._order !== undefined) {
|
21837 | params.order = this._order;
|
21838 | }
|
21839 |
|
21840 | return params;
|
21841 | },
|
21842 | _newObject: function _newObject(response) {
|
21843 | var obj;
|
21844 |
|
21845 | if (response && response.className) {
|
21846 | obj = new AV.Object(response.className);
|
21847 | } else {
|
21848 | obj = new this.objectClass();
|
21849 | }
|
21850 |
|
21851 | return obj;
|
21852 | },
|
21853 | _createRequest: function _createRequest() {
|
21854 | var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._getParams();
|
21855 | var options = arguments.length > 1 ? arguments[1] : undefined;
|
21856 | var path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "/classes/".concat(this.className);
|
21857 |
|
21858 | if (encodeURIComponent((0, _stringify.default)(params)).length > 2000) {
|
21859 | var body = {
|
21860 | requests: [{
|
21861 | method: 'GET',
|
21862 | path: "/1.1".concat(path),
|
21863 | params: params
|
21864 | }]
|
21865 | };
|
21866 | return request({
|
21867 | path: '/batch',
|
21868 | method: 'POST',
|
21869 | data: body,
|
21870 | authOptions: options
|
21871 | }).then(function (response) {
|
21872 | var result = response[0];
|
21873 |
|
21874 | if (result.success) {
|
21875 | return result.success;
|
21876 | }
|
21877 |
|
21878 | var error = new AVError(result.error.code, result.error.error || 'Unknown batch error');
|
21879 | throw error;
|
21880 | });
|
21881 | }
|
21882 |
|
21883 | return request({
|
21884 | method: 'GET',
|
21885 | path: path,
|
21886 | query: params,
|
21887 | authOptions: options
|
21888 | });
|
21889 | },
|
21890 | _parseResponse: function _parseResponse(response) {
|
21891 | var _this = this;
|
21892 |
|
21893 | return (0, _map.default)(_).call(_, response.results, function (json) {
|
21894 | var obj = _this._newObject(response);
|
21895 |
|
21896 | if (obj._finishFetch) {
|
21897 | obj._finishFetch(_this._processResult(json), true);
|
21898 | }
|
21899 |
|
21900 | return obj;
|
21901 | });
|
21902 | },
|
21903 |
|
21904 | |
21905 |
|
21906 |
|
21907 |
|
21908 |
|
21909 |
|
21910 |
|
21911 | find: function find(options) {
|
21912 | var request = this._createRequest(undefined, options);
|
21913 |
|
21914 | return request.then(this._parseResponse.bind(this));
|
21915 | },
|
21916 |
|
21917 | |
21918 |
|
21919 |
|
21920 |
|
21921 |
|
21922 |
|
21923 |
|
21924 | findAndCount: function findAndCount(options) {
|
21925 | var _this2 = this;
|
21926 |
|
21927 | var params = this._getParams();
|
21928 |
|
21929 | params.count = 1;
|
21930 |
|
21931 | var request = this._createRequest(params, options);
|
21932 |
|
21933 | return request.then(function (response) {
|
21934 | return [_this2._parseResponse(response), response.count];
|
21935 | });
|
21936 | },
|
21937 |
|
21938 | |
21939 |
|
21940 |
|
21941 |
|
21942 |
|
21943 |
|
21944 |
|
21945 |
|
21946 |
|
21947 |
|
21948 |
|
21949 |
|
21950 |
|
21951 |
|
21952 |
|
21953 |
|
21954 |
|
21955 |
|
21956 | scan: function scan() {
|
21957 | var _this3 = this;
|
21958 |
|
21959 | var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
21960 | orderedBy = _ref2.orderedBy,
|
21961 | batchSize = _ref2.batchSize;
|
21962 |
|
21963 | var authOptions = arguments.length > 1 ? arguments[1] : undefined;
|
21964 |
|
21965 | var condition = this._getParams();
|
21966 |
|
21967 | debug('scan %O', condition);
|
21968 |
|
21969 | if (condition.order) {
|
21970 | console.warn('The order of the query is ignored for Query#scan. Checkout the orderedBy option of Query#scan.');
|
21971 | delete condition.order;
|
21972 | }
|
21973 |
|
21974 | if (condition.skip) {
|
21975 | console.warn('The skip option of the query is ignored for Query#scan.');
|
21976 | delete condition.skip;
|
21977 | }
|
21978 |
|
21979 | if (condition.limit) {
|
21980 | console.warn('The limit option of the query is ignored for Query#scan.');
|
21981 | delete condition.limit;
|
21982 | }
|
21983 |
|
21984 | if (orderedBy) condition.scan_key = orderedBy;
|
21985 | if (batchSize) condition.limit = batchSize;
|
21986 | var cursor;
|
21987 | var remainResults = [];
|
21988 | return {
|
21989 | next: function next() {
|
21990 | if (remainResults.length) {
|
21991 | return _promise.default.resolve({
|
21992 | done: false,
|
21993 | value: remainResults.shift()
|
21994 | });
|
21995 | }
|
21996 |
|
21997 | if (cursor === null) {
|
21998 | return _promise.default.resolve({
|
21999 | done: true
|
22000 | });
|
22001 | }
|
22002 |
|
22003 | return _request('scan/classes', _this3.className, null, 'GET', cursor ? _.extend({}, condition, {
|
22004 | cursor: cursor
|
22005 | }) : condition, authOptions).then(function (response) {
|
22006 | cursor = response.cursor;
|
22007 |
|
22008 | if (response.results.length) {
|
22009 | var results = _this3._parseResponse(response);
|
22010 |
|
22011 | results.forEach(function (result) {
|
22012 | return remainResults.push(result);
|
22013 | });
|
22014 | }
|
22015 |
|
22016 | if (cursor === null && remainResults.length === 0) {
|
22017 | return {
|
22018 | done: true
|
22019 | };
|
22020 | }
|
22021 |
|
22022 | return {
|
22023 | done: false,
|
22024 | value: remainResults.shift()
|
22025 | };
|
22026 | });
|
22027 | }
|
22028 | };
|
22029 | },
|
22030 |
|
22031 | |
22032 |
|
22033 |
|
22034 |
|
22035 |
|
22036 |
|
22037 | destroyAll: function destroyAll(options) {
|
22038 | var self = this;
|
22039 | return (0, _find.default)(self).call(self, options).then(function (objects) {
|
22040 | return AV.Object.destroyAll(objects, options);
|
22041 | });
|
22042 | },
|
22043 |
|
22044 | |
22045 |
|
22046 |
|
22047 |
|
22048 |
|
22049 |
|
22050 |
|
22051 | count: function count(options) {
|
22052 | var params = this._getParams();
|
22053 |
|
22054 | params.limit = 0;
|
22055 | params.count = 1;
|
22056 |
|
22057 | var request = this._createRequest(params, options);
|
22058 |
|
22059 | return request.then(function (response) {
|
22060 | return response.count;
|
22061 | });
|
22062 | },
|
22063 |
|
22064 | |
22065 |
|
22066 |
|
22067 |
|
22068 |
|
22069 |
|
22070 |
|
22071 | first: function first(options) {
|
22072 | var self = this;
|
22073 |
|
22074 | var params = this._getParams();
|
22075 |
|
22076 | params.limit = 1;
|
22077 |
|
22078 | var request = this._createRequest(params, options);
|
22079 |
|
22080 | return request.then(function (response) {
|
22081 | return (0, _map.default)(_).call(_, response.results, function (json) {
|
22082 | var obj = self._newObject();
|
22083 |
|
22084 | if (obj._finishFetch) {
|
22085 | obj._finishFetch(self._processResult(json), true);
|
22086 | }
|
22087 |
|
22088 | return obj;
|
22089 | })[0];
|
22090 | });
|
22091 | },
|
22092 |
|
22093 | |
22094 |
|
22095 |
|
22096 |
|
22097 |
|
22098 |
|
22099 |
|
22100 | skip: function skip(n) {
|
22101 | requires(n, 'undefined is not a valid skip value');
|
22102 | this._skip = n;
|
22103 | return this;
|
22104 | },
|
22105 |
|
22106 | |
22107 |
|
22108 |
|
22109 |
|
22110 |
|
22111 |
|
22112 | limit: function limit(n) {
|
22113 | requires(n, 'undefined is not a valid limit value');
|
22114 | this._limit = n;
|
22115 | return this;
|
22116 | },
|
22117 |
|
22118 | |
22119 |
|
22120 |
|
22121 |
|
22122 |
|
22123 |
|
22124 |
|
22125 | equalTo: function equalTo(key, value) {
|
22126 | requires(key, 'undefined is not a valid key');
|
22127 | requires(value, 'undefined is not a valid value');
|
22128 | this._where[key] = AV._encode(value);
|
22129 | return this;
|
22130 | },
|
22131 |
|
22132 | |
22133 |
|
22134 |
|
22135 |
|
22136 | _addCondition: function _addCondition(key, condition, value) {
|
22137 | requires(key, 'undefined is not a valid condition key');
|
22138 | requires(condition, 'undefined is not a valid condition');
|
22139 | requires(value, 'undefined is not a valid condition value');
|
22140 |
|
22141 | if (!this._where[key]) {
|
22142 | this._where[key] = {};
|
22143 | }
|
22144 |
|
22145 | this._where[key][condition] = AV._encode(value);
|
22146 | return this;
|
22147 | },
|
22148 |
|
22149 | |
22150 |
|
22151 |
|
22152 |
|
22153 |
|
22154 |
|
22155 |
|
22156 | sizeEqualTo: function sizeEqualTo(key, value) {
|
22157 | this._addCondition(key, '$size', value);
|
22158 |
|
22159 | return this;
|
22160 | },
|
22161 |
|
22162 | |
22163 |
|
22164 |
|
22165 |
|
22166 |
|
22167 |
|
22168 |
|
22169 | notEqualTo: function notEqualTo(key, value) {
|
22170 | this._addCondition(key, '$ne', value);
|
22171 |
|
22172 | return this;
|
22173 | },
|
22174 |
|
22175 | |
22176 |
|
22177 |
|
22178 |
|
22179 |
|
22180 |
|
22181 |
|
22182 | lessThan: function lessThan(key, value) {
|
22183 | this._addCondition(key, '$lt', value);
|
22184 |
|
22185 | return this;
|
22186 | },
|
22187 |
|
22188 | |
22189 |
|
22190 |
|
22191 |
|
22192 |
|
22193 |
|
22194 |
|
22195 | greaterThan: function greaterThan(key, value) {
|
22196 | this._addCondition(key, '$gt', value);
|
22197 |
|
22198 | return this;
|
22199 | },
|
22200 |
|
22201 | |
22202 |
|
22203 |
|
22204 |
|
22205 |
|
22206 |
|
22207 |
|
22208 | lessThanOrEqualTo: function lessThanOrEqualTo(key, value) {
|
22209 | this._addCondition(key, '$lte', value);
|
22210 |
|
22211 | return this;
|
22212 | },
|
22213 |
|
22214 | |
22215 |
|
22216 |
|
22217 |
|
22218 |
|
22219 |
|
22220 |
|
22221 | greaterThanOrEqualTo: function greaterThanOrEqualTo(key, value) {
|
22222 | this._addCondition(key, '$gte', value);
|
22223 |
|
22224 | return this;
|
22225 | },
|
22226 |
|
22227 | |
22228 |
|
22229 |
|
22230 |
|
22231 |
|
22232 |
|
22233 |
|
22234 | containedIn: function containedIn(key, values) {
|
22235 | this._addCondition(key, '$in', values);
|
22236 |
|
22237 | return this;
|
22238 | },
|
22239 |
|
22240 | |
22241 |
|
22242 |
|
22243 |
|
22244 |
|
22245 |
|
22246 |
|
22247 | notContainedIn: function notContainedIn(key, values) {
|
22248 | this._addCondition(key, '$nin', values);
|
22249 |
|
22250 | return this;
|
22251 | },
|
22252 |
|
22253 | |
22254 |
|
22255 |
|
22256 |
|
22257 |
|
22258 |
|
22259 |
|
22260 | containsAll: function containsAll(key, values) {
|
22261 | this._addCondition(key, '$all', values);
|
22262 |
|
22263 | return this;
|
22264 | },
|
22265 |
|
22266 | |
22267 |
|
22268 |
|
22269 |
|
22270 |
|
22271 | exists: function exists(key) {
|
22272 | this._addCondition(key, '$exists', true);
|
22273 |
|
22274 | return this;
|
22275 | },
|
22276 |
|
22277 | |
22278 |
|
22279 |
|
22280 |
|
22281 |
|
22282 | doesNotExist: function doesNotExist(key) {
|
22283 | this._addCondition(key, '$exists', false);
|
22284 |
|
22285 | return this;
|
22286 | },
|
22287 |
|
22288 | |
22289 |
|
22290 |
|
22291 |
|
22292 |
|
22293 |
|
22294 |
|
22295 |
|
22296 | matches: function matches(key, regex, modifiers) {
|
22297 | this._addCondition(key, '$regex', regex);
|
22298 |
|
22299 | if (!modifiers) {
|
22300 | modifiers = '';
|
22301 | }
|
22302 |
|
22303 |
|
22304 |
|
22305 |
|
22306 | if (regex.ignoreCase) {
|
22307 | modifiers += 'i';
|
22308 | }
|
22309 |
|
22310 | if (regex.multiline) {
|
22311 | modifiers += 'm';
|
22312 | }
|
22313 |
|
22314 | if (modifiers && modifiers.length) {
|
22315 | this._addCondition(key, '$options', modifiers);
|
22316 | }
|
22317 |
|
22318 | return this;
|
22319 | },
|
22320 |
|
22321 | |
22322 |
|
22323 |
|
22324 |
|
22325 |
|
22326 |
|
22327 |
|
22328 |
|
22329 | matchesQuery: function matchesQuery(key, query) {
|
22330 | var queryJSON = query._getParams();
|
22331 |
|
22332 | queryJSON.className = query.className;
|
22333 |
|
22334 | this._addCondition(key, '$inQuery', queryJSON);
|
22335 |
|
22336 | return this;
|
22337 | },
|
22338 |
|
22339 | |
22340 |
|
22341 |
|
22342 |
|
22343 |
|
22344 |
|
22345 |
|
22346 |
|
22347 | doesNotMatchQuery: function doesNotMatchQuery(key, query) {
|
22348 | var queryJSON = query._getParams();
|
22349 |
|
22350 | queryJSON.className = query.className;
|
22351 |
|
22352 | this._addCondition(key, '$notInQuery', queryJSON);
|
22353 |
|
22354 | return this;
|
22355 | },
|
22356 |
|
22357 | |
22358 |
|
22359 |
|
22360 |
|
22361 |
|
22362 |
|
22363 |
|
22364 |
|
22365 |
|
22366 |
|
22367 | matchesKeyInQuery: function matchesKeyInQuery(key, queryKey, query) {
|
22368 | var queryJSON = query._getParams();
|
22369 |
|
22370 | queryJSON.className = query.className;
|
22371 |
|
22372 | this._addCondition(key, '$select', {
|
22373 | key: queryKey,
|
22374 | query: queryJSON
|
22375 | });
|
22376 |
|
22377 | return this;
|
22378 | },
|
22379 |
|
22380 | |
22381 |
|
22382 |
|
22383 |
|
22384 |
|
22385 |
|
22386 |
|
22387 |
|
22388 |
|
22389 |
|
22390 | doesNotMatchKeyInQuery: function doesNotMatchKeyInQuery(key, queryKey, query) {
|
22391 | var queryJSON = query._getParams();
|
22392 |
|
22393 | queryJSON.className = query.className;
|
22394 |
|
22395 | this._addCondition(key, '$dontSelect', {
|
22396 | key: queryKey,
|
22397 | query: queryJSON
|
22398 | });
|
22399 |
|
22400 | return this;
|
22401 | },
|
22402 |
|
22403 | |
22404 |
|
22405 |
|
22406 |
|
22407 |
|
22408 |
|
22409 | _orQuery: function _orQuery(queries) {
|
22410 | var queryJSON = (0, _map.default)(_).call(_, queries, function (q) {
|
22411 | return q._getParams().where;
|
22412 | });
|
22413 | this._where.$or = queryJSON;
|
22414 | return this;
|
22415 | },
|
22416 |
|
22417 | |
22418 |
|
22419 |
|
22420 |
|
22421 |
|
22422 |
|
22423 | _andQuery: function _andQuery(queries) {
|
22424 | var queryJSON = (0, _map.default)(_).call(_, queries, function (q) {
|
22425 | return q._getParams().where;
|
22426 | });
|
22427 | this._where.$and = queryJSON;
|
22428 | return this;
|
22429 | },
|
22430 |
|
22431 | |
22432 |
|
22433 |
|
22434 |
|
22435 |
|
22436 |
|
22437 | _quote: function _quote(s) {
|
22438 | return '\\Q' + s.replace('\\E', '\\E\\\\E\\Q') + '\\E';
|
22439 | },
|
22440 |
|
22441 | |
22442 |
|
22443 |
|
22444 |
|
22445 |
|
22446 |
|
22447 |
|
22448 | contains: function contains(key, value) {
|
22449 | this._addCondition(key, '$regex', this._quote(value));
|
22450 |
|
22451 | return this;
|
22452 | },
|
22453 |
|
22454 | |
22455 |
|
22456 |
|
22457 |
|
22458 |
|
22459 |
|
22460 |
|
22461 |
|
22462 | startsWith: function startsWith(key, value) {
|
22463 | this._addCondition(key, '$regex', '^' + this._quote(value));
|
22464 |
|
22465 | return this;
|
22466 | },
|
22467 |
|
22468 | |
22469 |
|
22470 |
|
22471 |
|
22472 |
|
22473 |
|
22474 |
|
22475 | endsWith: function endsWith(key, value) {
|
22476 | this._addCondition(key, '$regex', this._quote(value) + '$');
|
22477 |
|
22478 | return this;
|
22479 | },
|
22480 |
|
22481 | |
22482 |
|
22483 |
|
22484 |
|
22485 |
|
22486 |
|
22487 | ascending: function ascending(key) {
|
22488 | requires(key, 'undefined is not a valid key');
|
22489 | this._order = key;
|
22490 | return this;
|
22491 | },
|
22492 |
|
22493 | |
22494 |
|
22495 |
|
22496 |
|
22497 |
|
22498 |
|
22499 |
|
22500 | addAscending: function addAscending(key) {
|
22501 | requires(key, 'undefined is not a valid key');
|
22502 | if (this._order) this._order += ',' + key;else this._order = key;
|
22503 | return this;
|
22504 | },
|
22505 |
|
22506 | |
22507 |
|
22508 |
|
22509 |
|
22510 |
|
22511 |
|
22512 | descending: function descending(key) {
|
22513 | requires(key, 'undefined is not a valid key');
|
22514 | this._order = '-' + key;
|
22515 | return this;
|
22516 | },
|
22517 |
|
22518 | |
22519 |
|
22520 |
|
22521 |
|
22522 |
|
22523 |
|
22524 |
|
22525 | addDescending: function addDescending(key) {
|
22526 | requires(key, 'undefined is not a valid key');
|
22527 | if (this._order) this._order += ',-' + key;else this._order = '-' + key;
|
22528 | return this;
|
22529 | },
|
22530 |
|
22531 | |
22532 |
|
22533 |
|
22534 |
|
22535 |
|
22536 |
|
22537 |
|
22538 | near: function near(key, point) {
|
22539 | if (!(point instanceof AV.GeoPoint)) {
|
22540 |
|
22541 | point = new AV.GeoPoint(point);
|
22542 | }
|
22543 |
|
22544 | this._addCondition(key, '$nearSphere', point);
|
22545 |
|
22546 | return this;
|
22547 | },
|
22548 |
|
22549 | |
22550 |
|
22551 |
|
22552 |
|
22553 |
|
22554 |
|
22555 |
|
22556 |
|
22557 | withinRadians: function withinRadians(key, point, distance) {
|
22558 | this.near(key, point);
|
22559 |
|
22560 | this._addCondition(key, '$maxDistance', distance);
|
22561 |
|
22562 | return this;
|
22563 | },
|
22564 |
|
22565 | |
22566 |
|
22567 |
|
22568 |
|
22569 |
|
22570 |
|
22571 |
|
22572 |
|
22573 |
|
22574 |
|
22575 | withinMiles: function withinMiles(key, point, distance) {
|
22576 | return this.withinRadians(key, point, distance / 3958.8);
|
22577 | },
|
22578 |
|
22579 | |
22580 |
|
22581 |
|
22582 |
|
22583 |
|
22584 |
|
22585 |
|
22586 |
|
22587 |
|
22588 |
|
22589 | withinKilometers: function withinKilometers(key, point, distance) {
|
22590 | return this.withinRadians(key, point, distance / 6371.0);
|
22591 | },
|
22592 |
|
22593 | |
22594 |
|
22595 |
|
22596 |
|
22597 |
|
22598 |
|
22599 |
|
22600 |
|
22601 |
|
22602 |
|
22603 |
|
22604 | withinGeoBox: function withinGeoBox(key, southwest, northeast) {
|
22605 | if (!(southwest instanceof AV.GeoPoint)) {
|
22606 | southwest = new AV.GeoPoint(southwest);
|
22607 | }
|
22608 |
|
22609 | if (!(northeast instanceof AV.GeoPoint)) {
|
22610 | northeast = new AV.GeoPoint(northeast);
|
22611 | }
|
22612 |
|
22613 | this._addCondition(key, '$within', {
|
22614 | $box: [southwest, northeast]
|
22615 | });
|
22616 |
|
22617 | return this;
|
22618 | },
|
22619 |
|
22620 | |
22621 |
|
22622 |
|
22623 |
|
22624 |
|
22625 |
|
22626 | include: function include(keys) {
|
22627 | var _this4 = this;
|
22628 |
|
22629 | requires(keys, 'undefined is not a valid key');
|
22630 |
|
22631 | _.forEach(arguments, function (keys) {
|
22632 | var _context;
|
22633 |
|
22634 | _this4._include = (0, _concat.default)(_context = _this4._include).call(_context, ensureArray(keys));
|
22635 | });
|
22636 |
|
22637 | return this;
|
22638 | },
|
22639 |
|
22640 | |
22641 |
|
22642 |
|
22643 |
|
22644 |
|
22645 | includeACL: function includeACL() {
|
22646 | var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
22647 | this._includeACL = value;
|
22648 | return this;
|
22649 | },
|
22650 |
|
22651 | |
22652 |
|
22653 |
|
22654 |
|
22655 |
|
22656 |
|
22657 |
|
22658 | select: function select(keys) {
|
22659 | var _this5 = this;
|
22660 |
|
22661 | requires(keys, 'undefined is not a valid key');
|
22662 |
|
22663 | _.forEach(arguments, function (keys) {
|
22664 | var _context2;
|
22665 |
|
22666 | _this5._select = (0, _concat.default)(_context2 = _this5._select).call(_context2, ensureArray(keys));
|
22667 | });
|
22668 |
|
22669 | return this;
|
22670 | },
|
22671 |
|
22672 | |
22673 |
|
22674 |
|
22675 |
|
22676 |
|
22677 |
|
22678 |
|
22679 |
|
22680 |
|
22681 |
|
22682 |
|
22683 |
|
22684 | each: function each(callback) {
|
22685 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
22686 |
|
22687 | if (this._order || this._skip || this._limit >= 0) {
|
22688 | var error = new Error('Cannot iterate on a query with sort, skip, or limit.');
|
22689 | return _promise.default.reject(error);
|
22690 | }
|
22691 |
|
22692 | var query = new AV.Query(this.objectClass);
|
22693 |
|
22694 |
|
22695 | query._limit = options.batchSize || 100;
|
22696 | query._where = _.clone(this._where);
|
22697 | query._include = _.clone(this._include);
|
22698 | query.ascending('objectId');
|
22699 | var finished = false;
|
22700 | return continueWhile(function () {
|
22701 | return !finished;
|
22702 | }, function () {
|
22703 | return (0, _find.default)(query).call(query, options).then(function (results) {
|
22704 | var callbacksDone = _promise.default.resolve();
|
22705 |
|
22706 | _.each(results, function (result) {
|
22707 | callbacksDone = callbacksDone.then(function () {
|
22708 | return callback(result);
|
22709 | });
|
22710 | });
|
22711 |
|
22712 | return callbacksDone.then(function () {
|
22713 | if (results.length >= query._limit) {
|
22714 | query.greaterThan('objectId', results[results.length - 1].id);
|
22715 | } else {
|
22716 | finished = true;
|
22717 | }
|
22718 | });
|
22719 | });
|
22720 | });
|
22721 | },
|
22722 |
|
22723 | |
22724 |
|
22725 |
|
22726 |
|
22727 |
|
22728 |
|
22729 |
|
22730 |
|
22731 | subscribe: function subscribe(options) {
|
22732 | return AV.LiveQuery.init(this, options);
|
22733 | }
|
22734 | });
|
22735 |
|
22736 | AV.FriendShipQuery = AV.Query._extend({
|
22737 | _newObject: function _newObject() {
|
22738 | var UserClass = AV.Object._getSubclass('_User');
|
22739 |
|
22740 | return new UserClass();
|
22741 | },
|
22742 | _processResult: function _processResult(json) {
|
22743 | if (json && json[this._friendshipTag]) {
|
22744 | var user = json[this._friendshipTag];
|
22745 |
|
22746 | if (user.__type === 'Pointer' && user.className === '_User') {
|
22747 | delete user.__type;
|
22748 | delete user.className;
|
22749 | }
|
22750 |
|
22751 | return user;
|
22752 | } else {
|
22753 | return null;
|
22754 | }
|
22755 | }
|
22756 | });
|
22757 | };
|
22758 |
|
22759 | }),
|
22760 |
|
22761 | (function(module, exports, __webpack_require__) {
|
22762 |
|
22763 | "use strict";
|
22764 |
|
22765 |
|
22766 | var _interopRequireDefault = __webpack_require__(1);
|
22767 |
|
22768 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
22769 |
|
22770 | var _keys = _interopRequireDefault(__webpack_require__(55));
|
22771 |
|
22772 | var _ = __webpack_require__(2);
|
22773 |
|
22774 | var EventEmitter = __webpack_require__(224);
|
22775 |
|
22776 | var _require = __webpack_require__(29),
|
22777 | inherits = _require.inherits;
|
22778 |
|
22779 | var _require2 = __webpack_require__(26),
|
22780 | request = _require2.request;
|
22781 |
|
22782 | var subscribe = function subscribe(queryJSON, subscriptionId) {
|
22783 | return request({
|
22784 | method: 'POST',
|
22785 | path: '/LiveQuery/subscribe',
|
22786 | data: {
|
22787 | query: queryJSON,
|
22788 | id: subscriptionId
|
22789 | }
|
22790 | });
|
22791 | };
|
22792 |
|
22793 | module.exports = function (AV) {
|
22794 | var requireRealtime = function requireRealtime() {
|
22795 | if (!AV._config.realtime) {
|
22796 | throw new Error('LiveQuery not supported. Please use the LiveQuery bundle. https://url.leanapp.cn/enable-live-query');
|
22797 | }
|
22798 | };
|
22799 | |
22800 |
|
22801 |
|
22802 |
|
22803 |
|
22804 |
|
22805 |
|
22806 | AV.LiveQuery = inherits(EventEmitter,
|
22807 |
|
22808 | {
|
22809 | constructor: function constructor(id, client, queryJSON, subscriptionId) {
|
22810 | var _this = this;
|
22811 |
|
22812 | EventEmitter.apply(this);
|
22813 | this.id = id;
|
22814 | this._client = client;
|
22815 |
|
22816 | this._client.register(this);
|
22817 |
|
22818 | this._queryJSON = queryJSON;
|
22819 | this._subscriptionId = subscriptionId;
|
22820 | this._onMessage = this._dispatch.bind(this);
|
22821 |
|
22822 | this._onReconnect = function () {
|
22823 | subscribe(_this._queryJSON, _this._subscriptionId).catch(function (error) {
|
22824 | return console.error("LiveQuery resubscribe error: ".concat(error.message));
|
22825 | });
|
22826 | };
|
22827 |
|
22828 | client.on('message', this._onMessage);
|
22829 | client.on('reconnect', this._onReconnect);
|
22830 | },
|
22831 | _dispatch: function _dispatch(message) {
|
22832 | var _this2 = this;
|
22833 |
|
22834 | message.forEach(function (_ref) {
|
22835 | var op = _ref.op,
|
22836 | object = _ref.object,
|
22837 | queryId = _ref.query_id,
|
22838 | updatedKeys = _ref.updatedKeys;
|
22839 | if (queryId !== _this2.id) return;
|
22840 | var target = AV.parseJSON(_.extend({
|
22841 | __type: object.className === '_File' ? 'File' : 'Object'
|
22842 | }, object));
|
22843 |
|
22844 | if (updatedKeys) {
|
22845 | |
22846 |
|
22847 |
|
22848 |
|
22849 |
|
22850 |
|
22851 |
|
22852 | |
22853 |
|
22854 |
|
22855 |
|
22856 |
|
22857 |
|
22858 |
|
22859 | |
22860 |
|
22861 |
|
22862 |
|
22863 |
|
22864 |
|
22865 | _this2.emit(op, target, updatedKeys);
|
22866 | } else {
|
22867 | |
22868 |
|
22869 |
|
22870 |
|
22871 |
|
22872 |
|
22873 | |
22874 |
|
22875 |
|
22876 |
|
22877 |
|
22878 | _this2.emit(op, target);
|
22879 | }
|
22880 | });
|
22881 | },
|
22882 |
|
22883 | |
22884 |
|
22885 |
|
22886 |
|
22887 |
|
22888 | unsubscribe: function unsubscribe() {
|
22889 | var client = this._client;
|
22890 | client.off('message', this._onMessage);
|
22891 | client.off('reconnect', this._onReconnect);
|
22892 | client.deregister(this);
|
22893 | return request({
|
22894 | method: 'POST',
|
22895 | path: '/LiveQuery/unsubscribe',
|
22896 | data: {
|
22897 | id: client.id,
|
22898 | query_id: this.id
|
22899 | }
|
22900 | });
|
22901 | }
|
22902 | },
|
22903 |
|
22904 | {
|
22905 | init: function init(query) {
|
22906 | var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
22907 | _ref2$subscriptionId = _ref2.subscriptionId,
|
22908 | userDefinedSubscriptionId = _ref2$subscriptionId === void 0 ? AV._getSubscriptionId() : _ref2$subscriptionId;
|
22909 |
|
22910 | requireRealtime();
|
22911 | if (!(query instanceof AV.Query)) throw new TypeError('LiveQuery must be inited with a Query');
|
22912 | return _promise.default.resolve(userDefinedSubscriptionId).then(function (subscriptionId) {
|
22913 | return AV._config.realtime.createLiveQueryClient(subscriptionId).then(function (liveQueryClient) {
|
22914 | var _query$_getParams = query._getParams(),
|
22915 | where = _query$_getParams.where,
|
22916 | keys = (0, _keys.default)(_query$_getParams),
|
22917 | returnACL = _query$_getParams.returnACL;
|
22918 |
|
22919 | var queryJSON = {
|
22920 | where: where,
|
22921 | keys: keys,
|
22922 | returnACL: returnACL,
|
22923 | className: query.className
|
22924 | };
|
22925 | var promise = subscribe(queryJSON, subscriptionId).then(function (_ref3) {
|
22926 | var queryId = _ref3.query_id;
|
22927 | return new AV.LiveQuery(queryId, liveQueryClient, queryJSON, subscriptionId);
|
22928 | }).finally(function () {
|
22929 | liveQueryClient.deregister(promise);
|
22930 | });
|
22931 | liveQueryClient.register(promise);
|
22932 | return promise;
|
22933 | });
|
22934 | });
|
22935 | },
|
22936 |
|
22937 | |
22938 |
|
22939 |
|
22940 |
|
22941 |
|
22942 | pause: function pause() {
|
22943 | requireRealtime();
|
22944 | return AV._config.realtime.pause();
|
22945 | },
|
22946 |
|
22947 | |
22948 |
|
22949 |
|
22950 |
|
22951 |
|
22952 | resume: function resume() {
|
22953 | requireRealtime();
|
22954 | return AV._config.realtime.resume();
|
22955 | }
|
22956 | });
|
22957 | };
|
22958 |
|
22959 | }),
|
22960 |
|
22961 | (function(module, exports, __webpack_require__) {
|
22962 |
|
22963 | "use strict";
|
22964 |
|
22965 |
|
22966 | var _ = __webpack_require__(2);
|
22967 |
|
22968 | var _require = __webpack_require__(29),
|
22969 | tap = _require.tap;
|
22970 |
|
22971 | module.exports = function (AV) {
|
22972 | |
22973 |
|
22974 |
|
22975 |
|
22976 |
|
22977 |
|
22978 |
|
22979 |
|
22980 |
|
22981 |
|
22982 |
|
22983 |
|
22984 |
|
22985 |
|
22986 | AV.Captcha = function Captcha(options, authOptions) {
|
22987 | this._options = options;
|
22988 | this._authOptions = authOptions;
|
22989 | |
22990 |
|
22991 |
|
22992 |
|
22993 |
|
22994 | this.url = undefined;
|
22995 | |
22996 |
|
22997 |
|
22998 |
|
22999 |
|
23000 | this.captchaToken = undefined;
|
23001 | |
23002 |
|
23003 |
|
23004 |
|
23005 |
|
23006 | this.validateToken = undefined;
|
23007 | };
|
23008 | |
23009 |
|
23010 |
|
23011 |
|
23012 |
|
23013 |
|
23014 | AV.Captcha.prototype.refresh = function refresh() {
|
23015 | var _this = this;
|
23016 |
|
23017 | return AV.Cloud._requestCaptcha(this._options, this._authOptions).then(function (_ref) {
|
23018 | var captchaToken = _ref.captchaToken,
|
23019 | url = _ref.url;
|
23020 |
|
23021 | _.extend(_this, {
|
23022 | captchaToken: captchaToken,
|
23023 | url: url
|
23024 | });
|
23025 |
|
23026 | return url;
|
23027 | });
|
23028 | };
|
23029 | |
23030 |
|
23031 |
|
23032 |
|
23033 |
|
23034 |
|
23035 |
|
23036 | AV.Captcha.prototype.verify = function verify(code) {
|
23037 | var _this2 = this;
|
23038 |
|
23039 | return AV.Cloud.verifyCaptcha(code, this.captchaToken).then(tap(function (validateToken) {
|
23040 | return _this2.validateToken = validateToken;
|
23041 | }));
|
23042 | };
|
23043 |
|
23044 | if (false) {
|
23045 | |
23046 |
|
23047 |
|
23048 |
|
23049 |
|
23050 |
|
23051 |
|
23052 |
|
23053 |
|
23054 |
|
23055 | AV.Captcha.prototype.bind = function bind(_ref2, _ref3) {
|
23056 | var _this3 = this;
|
23057 |
|
23058 | var textInput = _ref2.textInput,
|
23059 | image = _ref2.image,
|
23060 | verifyButton = _ref2.verifyButton;
|
23061 | var success = _ref3.success,
|
23062 | error = _ref3.error;
|
23063 |
|
23064 | if (typeof textInput === 'string') {
|
23065 | textInput = document.getElementById(textInput);
|
23066 | if (!textInput) throw new Error("textInput with id ".concat(textInput, " not found"));
|
23067 | }
|
23068 |
|
23069 | if (typeof image === 'string') {
|
23070 | image = document.getElementById(image);
|
23071 | if (!image) throw new Error("image with id ".concat(image, " not found"));
|
23072 | }
|
23073 |
|
23074 | if (typeof verifyButton === 'string') {
|
23075 | verifyButton = document.getElementById(verifyButton);
|
23076 | if (!verifyButton) throw new Error("verifyButton with id ".concat(verifyButton, " not found"));
|
23077 | }
|
23078 |
|
23079 | this.__refresh = function () {
|
23080 | return _this3.refresh().then(function (url) {
|
23081 | image.src = url;
|
23082 |
|
23083 | if (textInput) {
|
23084 | textInput.value = '';
|
23085 | textInput.focus();
|
23086 | }
|
23087 | }).catch(function (err) {
|
23088 | return console.warn("refresh captcha fail: ".concat(err.message));
|
23089 | });
|
23090 | };
|
23091 |
|
23092 | if (image) {
|
23093 | this.__image = image;
|
23094 | image.src = this.url;
|
23095 | image.addEventListener('click', this.__refresh);
|
23096 | }
|
23097 |
|
23098 | this.__verify = function () {
|
23099 | var code = textInput.value;
|
23100 |
|
23101 | _this3.verify(code).catch(function (err) {
|
23102 | _this3.__refresh();
|
23103 |
|
23104 | throw err;
|
23105 | }).then(success, error).catch(function (err) {
|
23106 | return console.warn("verify captcha fail: ".concat(err.message));
|
23107 | });
|
23108 | };
|
23109 |
|
23110 | if (textInput && verifyButton) {
|
23111 | this.__verifyButton = verifyButton;
|
23112 | verifyButton.addEventListener('click', this.__verify);
|
23113 | }
|
23114 | };
|
23115 | |
23116 |
|
23117 |
|
23118 |
|
23119 |
|
23120 | AV.Captcha.prototype.unbind = function unbind() {
|
23121 | if (this.__image) this.__image.removeEventListener('click', this.__refresh);
|
23122 | if (this.__verifyButton) this.__verifyButton.removeEventListener('click', this.__verify);
|
23123 | };
|
23124 | }
|
23125 | |
23126 |
|
23127 |
|
23128 |
|
23129 |
|
23130 |
|
23131 |
|
23132 |
|
23133 |
|
23134 |
|
23135 |
|
23136 | AV.Captcha.request = function (options, authOptions) {
|
23137 | var captcha = new AV.Captcha(options, authOptions);
|
23138 | return captcha.refresh().then(function () {
|
23139 | return captcha;
|
23140 | });
|
23141 | };
|
23142 | };
|
23143 |
|
23144 | }),
|
23145 |
|
23146 | (function(module, exports, __webpack_require__) {
|
23147 |
|
23148 | "use strict";
|
23149 |
|
23150 |
|
23151 | var _interopRequireDefault = __webpack_require__(1);
|
23152 |
|
23153 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
23154 |
|
23155 | var _ = __webpack_require__(2);
|
23156 |
|
23157 | var _require = __webpack_require__(26),
|
23158 | _request = _require._request,
|
23159 | request = _require.request;
|
23160 |
|
23161 | module.exports = function (AV) {
|
23162 | |
23163 |
|
23164 |
|
23165 |
|
23166 |
|
23167 |
|
23168 |
|
23169 |
|
23170 |
|
23171 | AV.Cloud = AV.Cloud || {};
|
23172 |
|
23173 | _.extend(AV.Cloud,
|
23174 |
|
23175 | {
|
23176 | |
23177 |
|
23178 |
|
23179 |
|
23180 |
|
23181 |
|
23182 |
|
23183 |
|
23184 | run: function run(name, data, options) {
|
23185 | return request({
|
23186 | service: 'engine',
|
23187 | method: 'POST',
|
23188 | path: "/functions/".concat(name),
|
23189 | data: AV._encode(data, null, true),
|
23190 | authOptions: options
|
23191 | }).then(function (resp) {
|
23192 | return AV._decode(resp).result;
|
23193 | });
|
23194 | },
|
23195 |
|
23196 | |
23197 |
|
23198 |
|
23199 |
|
23200 |
|
23201 |
|
23202 |
|
23203 |
|
23204 | rpc: function rpc(name, data, options) {
|
23205 | if (_.isArray(data)) {
|
23206 | return _promise.default.reject(new Error("Can't pass Array as the param of rpc function in JavaScript SDK."));
|
23207 | }
|
23208 |
|
23209 | return request({
|
23210 | service: 'engine',
|
23211 | method: 'POST',
|
23212 | path: "/call/".concat(name),
|
23213 | data: AV._encodeObjectOrArray(data),
|
23214 | authOptions: options
|
23215 | }).then(function (resp) {
|
23216 | return AV._decode(resp).result;
|
23217 | });
|
23218 | },
|
23219 |
|
23220 | |
23221 |
|
23222 |
|
23223 |
|
23224 |
|
23225 |
|
23226 | getServerDate: function getServerDate() {
|
23227 | return _request('date', null, null, 'GET').then(function (resp) {
|
23228 | return AV._decode(resp);
|
23229 | });
|
23230 | },
|
23231 |
|
23232 | |
23233 |
|
23234 |
|
23235 |
|
23236 |
|
23237 |
|
23238 |
|
23239 |
|
23240 |
|
23241 |
|
23242 |
|
23243 | requestSmsCode: function requestSmsCode(data) {
|
23244 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
23245 |
|
23246 | if (_.isString(data)) {
|
23247 | data = {
|
23248 | mobilePhoneNumber: data
|
23249 | };
|
23250 | }
|
23251 |
|
23252 | if (!data.mobilePhoneNumber) {
|
23253 | throw new Error('Missing mobilePhoneNumber.');
|
23254 | }
|
23255 |
|
23256 | if (options.validateToken) {
|
23257 | data = _.extend({}, data, {
|
23258 | validate_token: options.validateToken
|
23259 | });
|
23260 | }
|
23261 |
|
23262 | return _request('requestSmsCode', null, null, 'POST', data, options);
|
23263 | },
|
23264 |
|
23265 | |
23266 |
|
23267 |
|
23268 |
|
23269 |
|
23270 |
|
23271 |
|
23272 | verifySmsCode: function verifySmsCode(code, phone) {
|
23273 | if (!code) throw new Error('Missing sms code.');
|
23274 | var params = {};
|
23275 |
|
23276 | if (_.isString(phone)) {
|
23277 | params['mobilePhoneNumber'] = phone;
|
23278 | }
|
23279 |
|
23280 | return _request('verifySmsCode', code, null, 'POST', params);
|
23281 | },
|
23282 | _requestCaptcha: function _requestCaptcha(options, authOptions) {
|
23283 | return _request('requestCaptcha', null, null, 'GET', options, authOptions).then(function (_ref) {
|
23284 | var url = _ref.captcha_url,
|
23285 | captchaToken = _ref.captcha_token;
|
23286 | return {
|
23287 | captchaToken: captchaToken,
|
23288 | url: url
|
23289 | };
|
23290 | });
|
23291 | },
|
23292 |
|
23293 | |
23294 |
|
23295 |
|
23296 | requestCaptcha: AV.Captcha.request,
|
23297 |
|
23298 | |
23299 |
|
23300 |
|
23301 |
|
23302 |
|
23303 |
|
23304 |
|
23305 | verifyCaptcha: function verifyCaptcha(code, captchaToken) {
|
23306 | return _request('verifyCaptcha', null, null, 'POST', {
|
23307 | captcha_code: code,
|
23308 | captcha_token: captchaToken
|
23309 | }).then(function (_ref2) {
|
23310 | var validateToken = _ref2.validate_token;
|
23311 | return validateToken;
|
23312 | });
|
23313 | }
|
23314 | });
|
23315 | };
|
23316 |
|
23317 | }),
|
23318 |
|
23319 | (function(module, exports, __webpack_require__) {
|
23320 |
|
23321 | "use strict";
|
23322 |
|
23323 |
|
23324 | var request = __webpack_require__(26).request;
|
23325 |
|
23326 | module.exports = function (AV) {
|
23327 | AV.Installation = AV.Object.extend('_Installation');
|
23328 | |
23329 |
|
23330 |
|
23331 |
|
23332 | AV.Push = AV.Push || {};
|
23333 | |
23334 |
|
23335 |
|
23336 |
|
23337 |
|
23338 |
|
23339 |
|
23340 |
|
23341 |
|
23342 |
|
23343 |
|
23344 |
|
23345 |
|
23346 |
|
23347 |
|
23348 |
|
23349 |
|
23350 |
|
23351 |
|
23352 | AV.Push.send = function (data, options) {
|
23353 | if (data.where) {
|
23354 | data.where = data.where._getParams().where;
|
23355 | }
|
23356 |
|
23357 | if (data.where && data.cql) {
|
23358 | throw new Error("Both where and cql can't be set");
|
23359 | }
|
23360 |
|
23361 | if (data.push_time) {
|
23362 | data.push_time = data.push_time.toJSON();
|
23363 | }
|
23364 |
|
23365 | if (data.expiration_time) {
|
23366 | data.expiration_time = data.expiration_time.toJSON();
|
23367 | }
|
23368 |
|
23369 | if (data.expiration_time && data.expiration_interval) {
|
23370 | throw new Error("Both expiration_time and expiration_interval can't be set");
|
23371 | }
|
23372 |
|
23373 | return request({
|
23374 | service: 'push',
|
23375 | method: 'POST',
|
23376 | path: '/push',
|
23377 | data: data,
|
23378 | authOptions: options
|
23379 | });
|
23380 | };
|
23381 | };
|
23382 |
|
23383 | }),
|
23384 |
|
23385 | (function(module, exports, __webpack_require__) {
|
23386 |
|
23387 | "use strict";
|
23388 |
|
23389 |
|
23390 | var _interopRequireDefault = __webpack_require__(1);
|
23391 |
|
23392 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
23393 |
|
23394 | var _typeof2 = _interopRequireDefault(__webpack_require__(109));
|
23395 |
|
23396 | var _ = __webpack_require__(2);
|
23397 |
|
23398 | var AVRequest = __webpack_require__(26)._request;
|
23399 |
|
23400 | var _require = __webpack_require__(29),
|
23401 | getSessionToken = _require.getSessionToken;
|
23402 |
|
23403 | module.exports = function (AV) {
|
23404 | var getUser = function getUser() {
|
23405 | var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
23406 | var sessionToken = getSessionToken(options);
|
23407 |
|
23408 | if (sessionToken) {
|
23409 | return AV.User._fetchUserBySessionToken(getSessionToken(options));
|
23410 | }
|
23411 |
|
23412 | return AV.User.currentAsync();
|
23413 | };
|
23414 |
|
23415 | var getUserPointer = function getUserPointer(options) {
|
23416 | return getUser(options).then(function (currUser) {
|
23417 | return AV.Object.createWithoutData('_User', currUser.id)._toPointer();
|
23418 | });
|
23419 | };
|
23420 | |
23421 |
|
23422 |
|
23423 |
|
23424 |
|
23425 |
|
23426 | AV.Status = function (imageUrl, message) {
|
23427 | this.data = {};
|
23428 | this.inboxType = 'default';
|
23429 | this.query = null;
|
23430 |
|
23431 | if (imageUrl && (0, _typeof2.default)(imageUrl) === 'object') {
|
23432 | this.data = imageUrl;
|
23433 | } else {
|
23434 | if (imageUrl) {
|
23435 | this.data.image = imageUrl;
|
23436 | }
|
23437 |
|
23438 | if (message) {
|
23439 | this.data.message = message;
|
23440 | }
|
23441 | }
|
23442 |
|
23443 | return this;
|
23444 | };
|
23445 |
|
23446 | _.extend(AV.Status.prototype,
|
23447 |
|
23448 | {
|
23449 | |
23450 |
|
23451 |
|
23452 |
|
23453 | get: function get(attr) {
|
23454 | return this.data[attr];
|
23455 | },
|
23456 |
|
23457 | |
23458 |
|
23459 |
|
23460 |
|
23461 |
|
23462 | set: function set(key, value) {
|
23463 | this.data[key] = value;
|
23464 | return this;
|
23465 | },
|
23466 |
|
23467 | |
23468 |
|
23469 |
|
23470 |
|
23471 |
|
23472 |
|
23473 | destroy: function destroy(options) {
|
23474 | if (!this.id) return _promise.default.reject(new Error('The status id is not exists.'));
|
23475 | var request = AVRequest('statuses', null, this.id, 'DELETE', options);
|
23476 | return request;
|
23477 | },
|
23478 |
|
23479 | |
23480 |
|
23481 |
|
23482 |
|
23483 | toObject: function toObject() {
|
23484 | if (!this.id) return null;
|
23485 | return AV.Object.createWithoutData('_Status', this.id);
|
23486 | },
|
23487 | _getDataJSON: function _getDataJSON() {
|
23488 | var json = _.clone(this.data);
|
23489 |
|
23490 | return AV._encode(json);
|
23491 | },
|
23492 |
|
23493 | |
23494 |
|
23495 |
|
23496 |
|
23497 |
|
23498 |
|
23499 |
|
23500 |
|
23501 |
|
23502 |
|
23503 |
|
23504 |
|
23505 |
|
23506 |
|
23507 |
|
23508 |
|
23509 |
|
23510 |
|
23511 | send: function send() {
|
23512 | var _this = this;
|
23513 |
|
23514 | var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
23515 |
|
23516 | if (!getSessionToken(options) && !AV.User.current()) {
|
23517 | throw new Error('Please signin an user.');
|
23518 | }
|
23519 |
|
23520 | if (!this.query) {
|
23521 | return AV.Status.sendStatusToFollowers(this, options);
|
23522 | }
|
23523 |
|
23524 | return getUserPointer(options).then(function (currUser) {
|
23525 | var query = _this.query._getParams();
|
23526 |
|
23527 | query.className = _this.query.className;
|
23528 | var data = {};
|
23529 | data.query = query;
|
23530 | _this.data = _this.data || {};
|
23531 | _this.data.source = _this.data.source || currUser;
|
23532 | data.data = _this._getDataJSON();
|
23533 | data.inboxType = _this.inboxType || 'default';
|
23534 | return AVRequest('statuses', null, null, 'POST', data, options);
|
23535 | }).then(function (response) {
|
23536 | _this.id = response.objectId;
|
23537 | _this.createdAt = AV._parseDate(response.createdAt);
|
23538 | return _this;
|
23539 | });
|
23540 | },
|
23541 | _finishFetch: function _finishFetch(serverData) {
|
23542 | this.id = serverData.objectId;
|
23543 | this.createdAt = AV._parseDate(serverData.createdAt);
|
23544 | this.updatedAt = AV._parseDate(serverData.updatedAt);
|
23545 | this.messageId = serverData.messageId;
|
23546 | delete serverData.messageId;
|
23547 | delete serverData.objectId;
|
23548 | delete serverData.createdAt;
|
23549 | delete serverData.updatedAt;
|
23550 | this.data = AV._decode(serverData);
|
23551 | }
|
23552 | });
|
23553 | |
23554 |
|
23555 |
|
23556 |
|
23557 |
|
23558 |
|
23559 |
|
23560 |
|
23561 |
|
23562 |
|
23563 |
|
23564 |
|
23565 |
|
23566 |
|
23567 |
|
23568 |
|
23569 |
|
23570 |
|
23571 | AV.Status.sendStatusToFollowers = function (status) {
|
23572 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
23573 |
|
23574 | if (!getSessionToken(options) && !AV.User.current()) {
|
23575 | throw new Error('Please signin an user.');
|
23576 | }
|
23577 |
|
23578 | return getUserPointer(options).then(function (currUser) {
|
23579 | var query = {};
|
23580 | query.className = '_Follower';
|
23581 | query.keys = 'follower';
|
23582 | query.where = {
|
23583 | user: currUser
|
23584 | };
|
23585 | var data = {};
|
23586 | data.query = query;
|
23587 | status.data = status.data || {};
|
23588 | status.data.source = status.data.source || currUser;
|
23589 | data.data = status._getDataJSON();
|
23590 | data.inboxType = status.inboxType || 'default';
|
23591 | var request = AVRequest('statuses', null, null, 'POST', data, options);
|
23592 | return request.then(function (response) {
|
23593 | status.id = response.objectId;
|
23594 | status.createdAt = AV._parseDate(response.createdAt);
|
23595 | return status;
|
23596 | });
|
23597 | });
|
23598 | };
|
23599 | |
23600 |
|
23601 |
|
23602 |
|
23603 |
|
23604 |
|
23605 |
|
23606 |
|
23607 |
|
23608 |
|
23609 |
|
23610 |
|
23611 |
|
23612 |
|
23613 |
|
23614 |
|
23615 |
|
23616 |
|
23617 |
|
23618 |
|
23619 | AV.Status.sendPrivateStatus = function (status, target) {
|
23620 | var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
23621 |
|
23622 | if (!getSessionToken(options) && !AV.User.current()) {
|
23623 | throw new Error('Please signin an user.');
|
23624 | }
|
23625 |
|
23626 | if (!target) {
|
23627 | throw new Error('Invalid target user.');
|
23628 | }
|
23629 |
|
23630 | var userObjectId = _.isString(target) ? target : target.id;
|
23631 |
|
23632 | if (!userObjectId) {
|
23633 | throw new Error('Invalid target user.');
|
23634 | }
|
23635 |
|
23636 | return getUserPointer(options).then(function (currUser) {
|
23637 | var query = {};
|
23638 | query.className = '_User';
|
23639 | query.where = {
|
23640 | objectId: userObjectId
|
23641 | };
|
23642 | var data = {};
|
23643 | data.query = query;
|
23644 | status.data = status.data || {};
|
23645 | status.data.source = status.data.source || currUser;
|
23646 | data.data = status._getDataJSON();
|
23647 | data.inboxType = 'private';
|
23648 | status.inboxType = 'private';
|
23649 | var request = AVRequest('statuses', null, null, 'POST', data, options);
|
23650 | return request.then(function (response) {
|
23651 | status.id = response.objectId;
|
23652 | status.createdAt = AV._parseDate(response.createdAt);
|
23653 | return status;
|
23654 | });
|
23655 | });
|
23656 | };
|
23657 | |
23658 |
|
23659 |
|
23660 |
|
23661 |
|
23662 |
|
23663 |
|
23664 |
|
23665 |
|
23666 |
|
23667 |
|
23668 |
|
23669 |
|
23670 |
|
23671 |
|
23672 |
|
23673 | AV.Status.countUnreadStatuses = function (owner) {
|
23674 | var inboxType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
|
23675 | var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
23676 | if (!_.isString(inboxType)) options = inboxType;
|
23677 |
|
23678 | if (!getSessionToken(options) && owner == null && !AV.User.current()) {
|
23679 | throw new Error('Please signin an user or pass the owner objectId.');
|
23680 | }
|
23681 |
|
23682 | return _promise.default.resolve(owner || getUser(options)).then(function (owner) {
|
23683 | var params = {};
|
23684 | params.inboxType = AV._encode(inboxType);
|
23685 | params.owner = AV._encode(owner);
|
23686 | return AVRequest('subscribe/statuses/count', null, null, 'GET', params, options);
|
23687 | });
|
23688 | };
|
23689 | |
23690 |
|
23691 |
|
23692 |
|
23693 |
|
23694 |
|
23695 |
|
23696 |
|
23697 |
|
23698 |
|
23699 |
|
23700 |
|
23701 |
|
23702 |
|
23703 |
|
23704 |
|
23705 | AV.Status.resetUnreadCount = function (owner) {
|
23706 | var inboxType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
|
23707 | var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
23708 | if (!_.isString(inboxType)) options = inboxType;
|
23709 |
|
23710 | if (!getSessionToken(options) && owner == null && !AV.User.current()) {
|
23711 | throw new Error('Please signin an user or pass the owner objectId.');
|
23712 | }
|
23713 |
|
23714 | return _promise.default.resolve(owner || getUser(options)).then(function (owner) {
|
23715 | var params = {};
|
23716 | params.inboxType = AV._encode(inboxType);
|
23717 | params.owner = AV._encode(owner);
|
23718 | return AVRequest('subscribe/statuses/resetUnreadCount', null, null, 'POST', params, options);
|
23719 | });
|
23720 | };
|
23721 | |
23722 |
|
23723 |
|
23724 |
|
23725 |
|
23726 |
|
23727 |
|
23728 |
|
23729 |
|
23730 |
|
23731 |
|
23732 |
|
23733 |
|
23734 |
|
23735 | AV.Status.statusQuery = function (source) {
|
23736 | var query = new AV.Query('_Status');
|
23737 |
|
23738 | if (source) {
|
23739 | query.equalTo('source', source);
|
23740 | }
|
23741 |
|
23742 | return query;
|
23743 | };
|
23744 | |
23745 |
|
23746 |
|
23747 |
|
23748 |
|
23749 |
|
23750 | AV.InboxQuery = AV.Query._extend(
|
23751 |
|
23752 | {
|
23753 | _objectClass: AV.Status,
|
23754 | _sinceId: 0,
|
23755 | _maxId: 0,
|
23756 | _inboxType: 'default',
|
23757 | _owner: null,
|
23758 | _newObject: function _newObject() {
|
23759 | return new AV.Status();
|
23760 | },
|
23761 | _createRequest: function _createRequest(params, options) {
|
23762 | return AV.InboxQuery.__super__._createRequest.call(this, params, options, '/subscribe/statuses');
|
23763 | },
|
23764 |
|
23765 | |
23766 |
|
23767 |
|
23768 |
|
23769 |
|
23770 |
|
23771 |
|
23772 | sinceId: function sinceId(id) {
|
23773 | this._sinceId = id;
|
23774 | return this;
|
23775 | },
|
23776 |
|
23777 | |
23778 |
|
23779 |
|
23780 |
|
23781 |
|
23782 |
|
23783 |
|
23784 | maxId: function maxId(id) {
|
23785 | this._maxId = id;
|
23786 | return this;
|
23787 | },
|
23788 |
|
23789 | |
23790 |
|
23791 |
|
23792 |
|
23793 |
|
23794 | owner: function owner(_owner) {
|
23795 | this._owner = _owner;
|
23796 | return this;
|
23797 | },
|
23798 |
|
23799 | |
23800 |
|
23801 |
|
23802 |
|
23803 |
|
23804 | inboxType: function inboxType(type) {
|
23805 | this._inboxType = type;
|
23806 | return this;
|
23807 | },
|
23808 | _getParams: function _getParams() {
|
23809 | var params = AV.InboxQuery.__super__._getParams.call(this);
|
23810 |
|
23811 | params.owner = AV._encode(this._owner);
|
23812 | params.inboxType = AV._encode(this._inboxType);
|
23813 | params.sinceId = AV._encode(this._sinceId);
|
23814 | params.maxId = AV._encode(this._maxId);
|
23815 | return params;
|
23816 | }
|
23817 | });
|
23818 | |
23819 |
|
23820 |
|
23821 |
|
23822 |
|
23823 |
|
23824 |
|
23825 |
|
23826 |
|
23827 |
|
23828 |
|
23829 |
|
23830 |
|
23831 |
|
23832 |
|
23833 |
|
23834 |
|
23835 | AV.Status.inboxQuery = function (owner, inboxType) {
|
23836 | var query = new AV.InboxQuery(AV.Status);
|
23837 |
|
23838 | if (owner) {
|
23839 | query._owner = owner;
|
23840 | }
|
23841 |
|
23842 | if (inboxType) {
|
23843 | query._inboxType = inboxType;
|
23844 | }
|
23845 |
|
23846 | return query;
|
23847 | };
|
23848 | };
|
23849 |
|
23850 | }),
|
23851 |
|
23852 | (function(module, exports, __webpack_require__) {
|
23853 |
|
23854 | "use strict";
|
23855 |
|
23856 |
|
23857 | var _interopRequireDefault = __webpack_require__(1);
|
23858 |
|
23859 | var _stringify = _interopRequireDefault(__webpack_require__(36));
|
23860 |
|
23861 | var _map = _interopRequireDefault(__webpack_require__(42));
|
23862 |
|
23863 | var _ = __webpack_require__(2);
|
23864 |
|
23865 | var AVRequest = __webpack_require__(26)._request;
|
23866 |
|
23867 | module.exports = function (AV) {
|
23868 | |
23869 |
|
23870 |
|
23871 |
|
23872 |
|
23873 |
|
23874 |
|
23875 |
|
23876 |
|
23877 |
|
23878 |
|
23879 | AV.SearchSortBuilder = function () {
|
23880 | this._sortFields = [];
|
23881 | };
|
23882 |
|
23883 | _.extend(AV.SearchSortBuilder.prototype,
|
23884 |
|
23885 | {
|
23886 | _addField: function _addField(key, order, mode, missing) {
|
23887 | var field = {};
|
23888 | field[key] = {
|
23889 | order: order || 'asc',
|
23890 | mode: mode || 'avg',
|
23891 | missing: '_' + (missing || 'last')
|
23892 | };
|
23893 |
|
23894 | this._sortFields.push(field);
|
23895 |
|
23896 | return this;
|
23897 | },
|
23898 |
|
23899 | |
23900 |
|
23901 |
|
23902 |
|
23903 |
|
23904 |
|
23905 |
|
23906 |
|
23907 |
|
23908 |
|
23909 | ascending: function ascending(key, mode, missing) {
|
23910 | return this._addField(key, 'asc', mode, missing);
|
23911 | },
|
23912 |
|
23913 | |
23914 |
|
23915 |
|
23916 |
|
23917 |
|
23918 |
|
23919 |
|
23920 |
|
23921 |
|
23922 |
|
23923 | descending: function descending(key, mode, missing) {
|
23924 | return this._addField(key, 'desc', mode, missing);
|
23925 | },
|
23926 |
|
23927 | |
23928 |
|
23929 |
|
23930 |
|
23931 |
|
23932 |
|
23933 |
|
23934 |
|
23935 | whereNear: function whereNear(key, point, options) {
|
23936 | options = options || {};
|
23937 | var field = {};
|
23938 | var geo = {
|
23939 | lat: point.latitude,
|
23940 | lon: point.longitude
|
23941 | };
|
23942 | var m = {
|
23943 | order: options.order || 'asc',
|
23944 | mode: options.mode || 'avg',
|
23945 | unit: options.unit || 'km'
|
23946 | };
|
23947 | m[key] = geo;
|
23948 | field['_geo_distance'] = m;
|
23949 |
|
23950 | this._sortFields.push(field);
|
23951 |
|
23952 | return this;
|
23953 | },
|
23954 |
|
23955 | |
23956 |
|
23957 |
|
23958 |
|
23959 | build: function build() {
|
23960 | return (0, _stringify.default)(AV._encode(this._sortFields));
|
23961 | }
|
23962 | });
|
23963 | |
23964 |
|
23965 |
|
23966 |
|
23967 |
|
23968 |
|
23969 |
|
23970 |
|
23971 |
|
23972 |
|
23973 |
|
23974 |
|
23975 |
|
23976 |
|
23977 |
|
23978 |
|
23979 |
|
23980 | AV.SearchQuery = AV.Query._extend(
|
23981 |
|
23982 | {
|
23983 | _sid: null,
|
23984 | _hits: 0,
|
23985 | _queryString: null,
|
23986 | _highlights: null,
|
23987 | _sortBuilder: null,
|
23988 | _clazz: null,
|
23989 | constructor: function constructor(className) {
|
23990 | if (className) {
|
23991 | this._clazz = className;
|
23992 | } else {
|
23993 | className = '__INVALID_CLASS';
|
23994 | }
|
23995 |
|
23996 | AV.Query.call(this, className);
|
23997 | },
|
23998 | _createRequest: function _createRequest(params, options) {
|
23999 | return AVRequest('search/select', null, null, 'GET', params || this._getParams(), options);
|
24000 | },
|
24001 |
|
24002 | |
24003 |
|
24004 |
|
24005 |
|
24006 |
|
24007 | sid: function sid(_sid) {
|
24008 | this._sid = _sid;
|
24009 | return this;
|
24010 | },
|
24011 |
|
24012 | |
24013 |
|
24014 |
|
24015 |
|
24016 |
|
24017 | queryString: function queryString(q) {
|
24018 | this._queryString = q;
|
24019 | return this;
|
24020 | },
|
24021 |
|
24022 | |
24023 |
|
24024 |
|
24025 |
|
24026 |
|
24027 |
|
24028 |
|
24029 |
|
24030 |
|
24031 |
|
24032 | highlights: function highlights(_highlights) {
|
24033 | var objects;
|
24034 |
|
24035 | if (_highlights && _.isString(_highlights)) {
|
24036 | objects = _.toArray(arguments);
|
24037 | } else {
|
24038 | objects = _highlights;
|
24039 | }
|
24040 |
|
24041 | this._highlights = objects;
|
24042 | return this;
|
24043 | },
|
24044 |
|
24045 | |
24046 |
|
24047 |
|
24048 |
|
24049 |
|
24050 |
|
24051 |
|
24052 | sortBy: function sortBy(builder) {
|
24053 | this._sortBuilder = builder;
|
24054 | return this;
|
24055 | },
|
24056 |
|
24057 | |
24058 |
|
24059 |
|
24060 |
|
24061 | hits: function hits() {
|
24062 | if (!this._hits) {
|
24063 | this._hits = 0;
|
24064 | }
|
24065 |
|
24066 | return this._hits;
|
24067 | },
|
24068 | _processResult: function _processResult(json) {
|
24069 | delete json['className'];
|
24070 | delete json['_app_url'];
|
24071 | delete json['_deeplink'];
|
24072 | return json;
|
24073 | },
|
24074 |
|
24075 | |
24076 |
|
24077 |
|
24078 |
|
24079 |
|
24080 |
|
24081 | hasMore: function hasMore() {
|
24082 | return !this._hitEnd;
|
24083 | },
|
24084 |
|
24085 | |
24086 |
|
24087 |
|
24088 |
|
24089 | reset: function reset() {
|
24090 | this._hitEnd = false;
|
24091 | this._sid = null;
|
24092 | this._hits = 0;
|
24093 | },
|
24094 |
|
24095 | |
24096 |
|
24097 |
|
24098 |
|
24099 |
|
24100 |
|
24101 |
|
24102 |
|
24103 |
|
24104 |
|
24105 | find: function find(options) {
|
24106 | var self = this;
|
24107 |
|
24108 | var request = this._createRequest(undefined, options);
|
24109 |
|
24110 | return request.then(function (response) {
|
24111 |
|
24112 | if (response.sid) {
|
24113 | self._oldSid = self._sid;
|
24114 | self._sid = response.sid;
|
24115 | } else {
|
24116 | self._sid = null;
|
24117 | self._hitEnd = true;
|
24118 | }
|
24119 |
|
24120 | self._hits = response.hits || 0;
|
24121 | return (0, _map.default)(_).call(_, response.results, function (json) {
|
24122 | if (json.className) {
|
24123 | response.className = json.className;
|
24124 | }
|
24125 |
|
24126 | var obj = self._newObject(response);
|
24127 |
|
24128 | obj.appURL = json['_app_url'];
|
24129 |
|
24130 | obj._finishFetch(self._processResult(json), true);
|
24131 |
|
24132 | return obj;
|
24133 | });
|
24134 | });
|
24135 | },
|
24136 | _getParams: function _getParams() {
|
24137 | var params = AV.SearchQuery.__super__._getParams.call(this);
|
24138 |
|
24139 | delete params.where;
|
24140 |
|
24141 | if (this._clazz) {
|
24142 | params.clazz = this.className;
|
24143 | }
|
24144 |
|
24145 | if (this._sid) {
|
24146 | params.sid = this._sid;
|
24147 | }
|
24148 |
|
24149 | if (!this._queryString) {
|
24150 | throw new Error('Please set query string.');
|
24151 | } else {
|
24152 | params.q = this._queryString;
|
24153 | }
|
24154 |
|
24155 | if (this._highlights) {
|
24156 | params.highlights = this._highlights.join(',');
|
24157 | }
|
24158 |
|
24159 | if (this._sortBuilder && params.order) {
|
24160 | throw new Error('sort and order can not be set at same time.');
|
24161 | }
|
24162 |
|
24163 | if (this._sortBuilder) {
|
24164 | params.sort = this._sortBuilder.build();
|
24165 | }
|
24166 |
|
24167 | return params;
|
24168 | }
|
24169 | });
|
24170 | };
|
24171 |
|
24172 |
|
24173 |
|
24174 |
|
24175 |
|
24176 |
|
24177 |
|
24178 |
|
24179 |
|
24180 |
|
24181 |
|
24182 |
|
24183 |
|
24184 |
|
24185 |
|
24186 |
|
24187 |
|
24188 |
|
24189 |
|
24190 |
|
24191 |
|
24192 |
|
24193 |
|
24194 |
|
24195 |
|
24196 |
|
24197 |
|
24198 |
|
24199 |
|
24200 |
|
24201 |
|
24202 |
|
24203 |
|
24204 |
|
24205 |
|
24206 |
|
24207 |
|
24208 |
|
24209 |
|
24210 |
|
24211 |
|
24212 |
|
24213 |
|
24214 |
|
24215 |
|
24216 |
|
24217 |
|
24218 |
|
24219 |
|
24220 |
|
24221 |
|
24222 |
|
24223 |
|
24224 |
|
24225 |
|
24226 |
|
24227 |
|
24228 |
|
24229 |
|
24230 | }),
|
24231 |
|
24232 | (function(module, exports, __webpack_require__) {
|
24233 |
|
24234 | "use strict";
|
24235 |
|
24236 |
|
24237 | var _interopRequireDefault = __webpack_require__(1);
|
24238 |
|
24239 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
24240 |
|
24241 | var _ = __webpack_require__(2);
|
24242 |
|
24243 | var AVError = __webpack_require__(43);
|
24244 |
|
24245 | var _require = __webpack_require__(26),
|
24246 | request = _require.request;
|
24247 |
|
24248 | module.exports = function (AV) {
|
24249 | |
24250 |
|
24251 |
|
24252 |
|
24253 |
|
24254 |
|
24255 |
|
24256 |
|
24257 | AV.Insight = AV.Insight || {};
|
24258 |
|
24259 | _.extend(AV.Insight,
|
24260 |
|
24261 | {
|
24262 | |
24263 |
|
24264 |
|
24265 |
|
24266 |
|
24267 |
|
24268 |
|
24269 |
|
24270 |
|
24271 |
|
24272 |
|
24273 |
|
24274 |
|
24275 |
|
24276 |
|
24277 |
|
24278 | startJob: function startJob(jobConfig, options) {
|
24279 | if (!jobConfig || !jobConfig.sql) {
|
24280 | throw new Error('Please provide the sql to run the job.');
|
24281 | }
|
24282 |
|
24283 | var data = {
|
24284 | jobConfig: jobConfig,
|
24285 | appId: AV.applicationId
|
24286 | };
|
24287 | return request({
|
24288 | path: '/bigquery/jobs',
|
24289 | method: 'POST',
|
24290 | data: AV._encode(data, null, true),
|
24291 | authOptions: options,
|
24292 | signKey: false
|
24293 | }).then(function (resp) {
|
24294 | return AV._decode(resp).id;
|
24295 | });
|
24296 | },
|
24297 |
|
24298 | |
24299 |
|
24300 |
|
24301 |
|
24302 |
|
24303 |
|
24304 |
|
24305 |
|
24306 |
|
24307 |
|
24308 | on: function on(event, cb) {}
|
24309 | });
|
24310 | |
24311 |
|
24312 |
|
24313 |
|
24314 |
|
24315 |
|
24316 |
|
24317 |
|
24318 | AV.Insight.JobQuery = function (id, className) {
|
24319 | if (!id) {
|
24320 | throw new Error('Please provide the job id.');
|
24321 | }
|
24322 |
|
24323 | this.id = id;
|
24324 | this.className = className;
|
24325 | this._skip = 0;
|
24326 | this._limit = 100;
|
24327 | };
|
24328 |
|
24329 | _.extend(AV.Insight.JobQuery.prototype,
|
24330 |
|
24331 | {
|
24332 | |
24333 |
|
24334 |
|
24335 |
|
24336 |
|
24337 |
|
24338 |
|
24339 | skip: function skip(n) {
|
24340 | this._skip = n;
|
24341 | return this;
|
24342 | },
|
24343 |
|
24344 | |
24345 |
|
24346 |
|
24347 |
|
24348 |
|
24349 |
|
24350 | limit: function limit(n) {
|
24351 | this._limit = n;
|
24352 | return this;
|
24353 | },
|
24354 |
|
24355 | |
24356 |
|
24357 |
|
24358 |
|
24359 |
|
24360 |
|
24361 |
|
24362 |
|
24363 |
|
24364 |
|
24365 | find: function find(options) {
|
24366 | var params = {
|
24367 | skip: this._skip,
|
24368 | limit: this._limit
|
24369 | };
|
24370 | return request({
|
24371 | path: "/bigquery/jobs/".concat(this.id),
|
24372 | method: 'GET',
|
24373 | query: params,
|
24374 | authOptions: options,
|
24375 | signKey: false
|
24376 | }).then(function (response) {
|
24377 | if (response.error) {
|
24378 | return _promise.default.reject(new AVError(response.code, response.error));
|
24379 | }
|
24380 |
|
24381 | return _promise.default.resolve(response);
|
24382 | });
|
24383 | }
|
24384 | });
|
24385 | };
|
24386 |
|
24387 | }),
|
24388 |
|
24389 | (function(module, exports, __webpack_require__) {
|
24390 |
|
24391 | "use strict";
|
24392 |
|
24393 |
|
24394 | var _interopRequireDefault = __webpack_require__(1);
|
24395 |
|
24396 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
24397 |
|
24398 | var _ = __webpack_require__(2);
|
24399 |
|
24400 | var _require = __webpack_require__(26),
|
24401 | LCRequest = _require.request;
|
24402 |
|
24403 | var _require2 = __webpack_require__(29),
|
24404 | getSessionToken = _require2.getSessionToken;
|
24405 |
|
24406 | module.exports = function (AV) {
|
24407 | var getUserWithSessionToken = function getUserWithSessionToken(authOptions) {
|
24408 | if (authOptions.user) {
|
24409 | if (!authOptions.user._sessionToken) {
|
24410 | throw new Error('authOptions.user is not signed in.');
|
24411 | }
|
24412 |
|
24413 | return _promise.default.resolve(authOptions.user);
|
24414 | }
|
24415 |
|
24416 | if (authOptions.sessionToken) {
|
24417 | return AV.User._fetchUserBySessionToken(authOptions.sessionToken);
|
24418 | }
|
24419 |
|
24420 | return AV.User.currentAsync();
|
24421 | };
|
24422 |
|
24423 | var getSessionTokenAsync = function getSessionTokenAsync(authOptions) {
|
24424 | var sessionToken = getSessionToken(authOptions);
|
24425 |
|
24426 | if (sessionToken) {
|
24427 | return _promise.default.resolve(sessionToken);
|
24428 | }
|
24429 |
|
24430 | return AV.User.currentAsync().then(function (user) {
|
24431 | if (user) {
|
24432 | return user.getSessionToken();
|
24433 | }
|
24434 | });
|
24435 | };
|
24436 | |
24437 |
|
24438 |
|
24439 |
|
24440 |
|
24441 |
|
24442 | AV.Friendship = {
|
24443 | |
24444 |
|
24445 |
|
24446 |
|
24447 |
|
24448 |
|
24449 |
|
24450 |
|
24451 |
|
24452 | request: function request(options) {
|
24453 | var authOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
24454 | var friend;
|
24455 | var attributes;
|
24456 |
|
24457 | if (options.friend) {
|
24458 | friend = options.friend;
|
24459 | attributes = options.attributes;
|
24460 | } else {
|
24461 | friend = options;
|
24462 | }
|
24463 |
|
24464 | var friendObj = _.isString(friend) ? AV.Object.createWithoutData('_User', friend) : friend;
|
24465 | return getUserWithSessionToken(authOptions).then(function (userObj) {
|
24466 | if (!userObj) {
|
24467 | throw new Error('Please signin an user.');
|
24468 | }
|
24469 |
|
24470 | return LCRequest({
|
24471 | method: 'POST',
|
24472 | path: '/users/friendshipRequests',
|
24473 | data: {
|
24474 | user: userObj._toPointer(),
|
24475 | friend: friendObj._toPointer(),
|
24476 | friendship: attributes
|
24477 | },
|
24478 | authOptions: authOptions
|
24479 | });
|
24480 | });
|
24481 | },
|
24482 |
|
24483 | |
24484 |
|
24485 |
|
24486 |
|
24487 |
|
24488 |
|
24489 |
|
24490 |
|
24491 |
|
24492 | acceptRequest: function acceptRequest(options) {
|
24493 | var authOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
24494 | var request;
|
24495 | var attributes;
|
24496 |
|
24497 | if (options.request) {
|
24498 | request = options.request;
|
24499 | attributes = options.attributes;
|
24500 | } else {
|
24501 | request = options;
|
24502 | }
|
24503 |
|
24504 | var requestId = _.isString(request) ? request : request.id;
|
24505 | return getSessionTokenAsync(authOptions).then(function (sessionToken) {
|
24506 | if (!sessionToken) {
|
24507 | throw new Error('Please signin an user.');
|
24508 | }
|
24509 |
|
24510 | return LCRequest({
|
24511 | method: 'PUT',
|
24512 | path: '/users/friendshipRequests/' + requestId + '/accept',
|
24513 | data: {
|
24514 | friendship: AV._encode(attributes)
|
24515 | },
|
24516 | authOptions: authOptions
|
24517 | });
|
24518 | });
|
24519 | },
|
24520 |
|
24521 | |
24522 |
|
24523 |
|
24524 |
|
24525 |
|
24526 |
|
24527 | declineRequest: function declineRequest(request) {
|
24528 | var authOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
24529 | var requestId = _.isString(request) ? request : request.id;
|
24530 | return getSessionTokenAsync(authOptions).then(function (sessionToken) {
|
24531 | if (!sessionToken) {
|
24532 | throw new Error('Please signin an user.');
|
24533 | }
|
24534 |
|
24535 | return LCRequest({
|
24536 | method: 'PUT',
|
24537 | path: '/users/friendshipRequests/' + requestId + '/decline',
|
24538 | authOptions: authOptions
|
24539 | });
|
24540 | });
|
24541 | }
|
24542 | };
|
24543 | };
|
24544 |
|
24545 | }),
|
24546 |
|
24547 | (function(module, exports, __webpack_require__) {
|
24548 |
|
24549 | "use strict";
|
24550 |
|
24551 |
|
24552 | var _interopRequireDefault = __webpack_require__(1);
|
24553 |
|
24554 | var _stringify = _interopRequireDefault(__webpack_require__(36));
|
24555 |
|
24556 | var _ = __webpack_require__(2);
|
24557 |
|
24558 | var _require = __webpack_require__(26),
|
24559 | _request = _require._request;
|
24560 |
|
24561 | var AV = __webpack_require__(65);
|
24562 |
|
24563 | var serializeMessage = function serializeMessage(message) {
|
24564 | if (typeof message === 'string') {
|
24565 | return message;
|
24566 | }
|
24567 |
|
24568 | if (typeof message.getPayload === 'function') {
|
24569 | return (0, _stringify.default)(message.getPayload());
|
24570 | }
|
24571 |
|
24572 | return (0, _stringify.default)(message);
|
24573 | };
|
24574 |
|
24575 |
|
24576 |
|
24577 |
|
24578 |
|
24579 |
|
24580 |
|
24581 |
|
24582 |
|
24583 |
|
24584 |
|
24585 |
|
24586 |
|
24587 |
|
24588 |
|
24589 | module.exports = AV.Object.extend('_Conversation',
|
24590 |
|
24591 | {
|
24592 | constructor: function constructor(name) {
|
24593 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
24594 | AV.Object.prototype.constructor.call(this, null, null);
|
24595 | this.set('name', name);
|
24596 |
|
24597 | if (options.isSystem !== undefined) {
|
24598 | this.set('sys', options.isSystem ? true : false);
|
24599 | }
|
24600 |
|
24601 | if (options.isTransient !== undefined) {
|
24602 | this.set('tr', options.isTransient ? true : false);
|
24603 | }
|
24604 | },
|
24605 |
|
24606 | |
24607 |
|
24608 |
|
24609 |
|
24610 |
|
24611 | getCreator: function getCreator() {
|
24612 | return this.get('c');
|
24613 | },
|
24614 |
|
24615 | |
24616 |
|
24617 |
|
24618 |
|
24619 |
|
24620 | getLastMessageAt: function getLastMessageAt() {
|
24621 | return this.get('lm');
|
24622 | },
|
24623 |
|
24624 | |
24625 |
|
24626 |
|
24627 |
|
24628 |
|
24629 | getMembers: function getMembers() {
|
24630 | return this.get('m');
|
24631 | },
|
24632 |
|
24633 | |
24634 |
|
24635 |
|
24636 |
|
24637 |
|
24638 | addMember: function addMember(member) {
|
24639 | return this.add('m', member);
|
24640 | },
|
24641 |
|
24642 | |
24643 |
|
24644 |
|
24645 |
|
24646 |
|
24647 | getMutedMembers: function getMutedMembers() {
|
24648 | return this.get('mu');
|
24649 | },
|
24650 |
|
24651 | |
24652 |
|
24653 |
|
24654 |
|
24655 |
|
24656 | getName: function getName() {
|
24657 | return this.get('name');
|
24658 | },
|
24659 |
|
24660 | |
24661 |
|
24662 |
|
24663 |
|
24664 |
|
24665 | isTransient: function isTransient() {
|
24666 | return this.get('tr');
|
24667 | },
|
24668 |
|
24669 | |
24670 |
|
24671 |
|
24672 |
|
24673 |
|
24674 | isSystem: function isSystem() {
|
24675 | return this.get('sys');
|
24676 | },
|
24677 |
|
24678 | |
24679 |
|
24680 |
|
24681 |
|
24682 |
|
24683 |
|
24684 |
|
24685 |
|
24686 |
|
24687 |
|
24688 |
|
24689 |
|
24690 |
|
24691 |
|
24692 | send: function send(fromClient, message) {
|
24693 | var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
24694 | var authOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
24695 | var data = {
|
24696 | from_peer: fromClient,
|
24697 | conv_id: this.id,
|
24698 | transient: false,
|
24699 | message: serializeMessage(message)
|
24700 | };
|
24701 |
|
24702 | if (options.toClients !== undefined) {
|
24703 | data.to_peers = options.toClients;
|
24704 | }
|
24705 |
|
24706 | if (options.transient !== undefined) {
|
24707 | data.transient = options.transient ? true : false;
|
24708 | }
|
24709 |
|
24710 | if (options.pushData !== undefined) {
|
24711 | data.push_data = options.pushData;
|
24712 | }
|
24713 |
|
24714 | return _request('rtm', 'messages', null, 'POST', data, authOptions);
|
24715 | },
|
24716 |
|
24717 | |
24718 |
|
24719 |
|
24720 |
|
24721 |
|
24722 |
|
24723 |
|
24724 |
|
24725 |
|
24726 |
|
24727 |
|
24728 |
|
24729 |
|
24730 | broadcast: function broadcast(fromClient, message) {
|
24731 | var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
24732 | var authOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
24733 | var data = {
|
24734 | from_peer: fromClient,
|
24735 | conv_id: this.id,
|
24736 | message: serializeMessage(message)
|
24737 | };
|
24738 |
|
24739 | if (options.pushData !== undefined) {
|
24740 | data.push = options.pushData;
|
24741 | }
|
24742 |
|
24743 | if (options.validTill !== undefined) {
|
24744 | var ts = options.validTill;
|
24745 |
|
24746 | if (_.isDate(ts)) {
|
24747 | ts = ts.getTime();
|
24748 | }
|
24749 |
|
24750 | options.valid_till = ts;
|
24751 | }
|
24752 |
|
24753 | return _request('rtm', 'broadcast', null, 'POST', data, authOptions);
|
24754 | }
|
24755 | });
|
24756 |
|
24757 | }),
|
24758 |
|
24759 | (function(module, exports, __webpack_require__) {
|
24760 |
|
24761 | "use strict";
|
24762 |
|
24763 |
|
24764 | var _interopRequireDefault = __webpack_require__(1);
|
24765 |
|
24766 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
24767 |
|
24768 | var _map = _interopRequireDefault(__webpack_require__(42));
|
24769 |
|
24770 | var _concat = _interopRequireDefault(__webpack_require__(30));
|
24771 |
|
24772 | var _ = __webpack_require__(2);
|
24773 |
|
24774 | var _require = __webpack_require__(26),
|
24775 | request = _require.request;
|
24776 |
|
24777 | var _require2 = __webpack_require__(29),
|
24778 | ensureArray = _require2.ensureArray,
|
24779 | parseDate = _require2.parseDate;
|
24780 |
|
24781 | var AV = __webpack_require__(65);
|
24782 |
|
24783 |
|
24784 |
|
24785 |
|
24786 |
|
24787 |
|
24788 | AV.LeaderboardVersionChangeInterval = {
|
24789 | NEVER: 'never',
|
24790 | DAY: 'day',
|
24791 | WEEK: 'week',
|
24792 | MONTH: 'month'
|
24793 | };
|
24794 |
|
24795 |
|
24796 |
|
24797 |
|
24798 |
|
24799 | AV.LeaderboardOrder = {
|
24800 | ASCENDING: 'ascending',
|
24801 | DESCENDING: 'descending'
|
24802 | };
|
24803 |
|
24804 |
|
24805 |
|
24806 |
|
24807 |
|
24808 | AV.LeaderboardUpdateStrategy = {
|
24809 |
|
24810 | BETTER: 'better',
|
24811 |
|
24812 |
|
24813 | LAST: 'last',
|
24814 |
|
24815 |
|
24816 | SUM: 'sum'
|
24817 | };
|
24818 |
|
24819 |
|
24820 |
|
24821 |
|
24822 |
|
24823 |
|
24824 |
|
24825 |
|
24826 |
|
24827 |
|
24828 |
|
24829 |
|
24830 |
|
24831 |
|
24832 |
|
24833 |
|
24834 |
|
24835 |
|
24836 |
|
24837 |
|
24838 |
|
24839 |
|
24840 | function Statistic(_ref) {
|
24841 | var name = _ref.name,
|
24842 | value = _ref.value,
|
24843 | version = _ref.version;
|
24844 |
|
24845 | |
24846 |
|
24847 |
|
24848 | this.name = name;
|
24849 | |
24850 |
|
24851 |
|
24852 |
|
24853 | this.value = value;
|
24854 | |
24855 |
|
24856 |
|
24857 |
|
24858 | this.version = version;
|
24859 | }
|
24860 |
|
24861 | var parseStatisticData = function parseStatisticData(statisticData) {
|
24862 | var _AV$_decode = AV._decode(statisticData),
|
24863 | name = _AV$_decode.statisticName,
|
24864 | value = _AV$_decode.statisticValue,
|
24865 | version = _AV$_decode.version;
|
24866 |
|
24867 | return new Statistic({
|
24868 | name: name,
|
24869 | value: value,
|
24870 | version: version
|
24871 | });
|
24872 | };
|
24873 |
|
24874 |
|
24875 |
|
24876 |
|
24877 |
|
24878 | AV.Leaderboard = function Leaderboard(statisticName) {
|
24879 | |
24880 |
|
24881 |
|
24882 | this.statisticName = statisticName;
|
24883 | |
24884 |
|
24885 |
|
24886 |
|
24887 | this.order = undefined;
|
24888 | |
24889 |
|
24890 |
|
24891 |
|
24892 | this.updateStrategy = undefined;
|
24893 | |
24894 |
|
24895 |
|
24896 |
|
24897 | this.versionChangeInterval = undefined;
|
24898 | |
24899 |
|
24900 |
|
24901 |
|
24902 | this.version = undefined;
|
24903 | |
24904 |
|
24905 |
|
24906 |
|
24907 | this.nextResetAt = undefined;
|
24908 | |
24909 |
|
24910 |
|
24911 |
|
24912 | this.createdAt = undefined;
|
24913 | };
|
24914 |
|
24915 | var Leaderboard = AV.Leaderboard;
|
24916 |
|
24917 |
|
24918 |
|
24919 |
|
24920 |
|
24921 |
|
24922 | AV.Leaderboard.createWithoutData = function (statisticName) {
|
24923 | return new Leaderboard(statisticName);
|
24924 | };
|
24925 |
|
24926 |
|
24927 |
|
24928 |
|
24929 |
|
24930 |
|
24931 |
|
24932 |
|
24933 |
|
24934 |
|
24935 |
|
24936 |
|
24937 | AV.Leaderboard.createLeaderboard = function (_ref2, authOptions) {
|
24938 | var statisticName = _ref2.statisticName,
|
24939 | order = _ref2.order,
|
24940 | versionChangeInterval = _ref2.versionChangeInterval,
|
24941 | updateStrategy = _ref2.updateStrategy;
|
24942 | return request({
|
24943 | method: 'POST',
|
24944 | path: '/leaderboard/leaderboards',
|
24945 | data: {
|
24946 | statisticName: statisticName,
|
24947 | order: order,
|
24948 | versionChangeInterval: versionChangeInterval,
|
24949 | updateStrategy: updateStrategy
|
24950 | },
|
24951 | authOptions: authOptions
|
24952 | }).then(function (data) {
|
24953 | var leaderboard = new Leaderboard(statisticName);
|
24954 | return leaderboard._finishFetch(data);
|
24955 | });
|
24956 | };
|
24957 |
|
24958 |
|
24959 |
|
24960 |
|
24961 |
|
24962 |
|
24963 |
|
24964 |
|
24965 | AV.Leaderboard.getLeaderboard = function (statisticName, authOptions) {
|
24966 | return Leaderboard.createWithoutData(statisticName).fetch(authOptions);
|
24967 | };
|
24968 |
|
24969 |
|
24970 |
|
24971 |
|
24972 |
|
24973 |
|
24974 |
|
24975 |
|
24976 |
|
24977 |
|
24978 | AV.Leaderboard.getStatistics = function (user) {
|
24979 | var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
24980 | statisticNames = _ref3.statisticNames;
|
24981 |
|
24982 | var authOptions = arguments.length > 2 ? arguments[2] : undefined;
|
24983 | return _promise.default.resolve().then(function () {
|
24984 | if (!(user && user.id)) throw new Error('user must be an AV.User');
|
24985 | return request({
|
24986 | method: 'GET',
|
24987 | path: "/leaderboard/users/".concat(user.id, "/statistics"),
|
24988 | query: {
|
24989 | statistics: statisticNames ? ensureArray(statisticNames).join(',') : undefined
|
24990 | },
|
24991 | authOptions: authOptions
|
24992 | }).then(function (_ref4) {
|
24993 | var results = _ref4.results;
|
24994 | return (0, _map.default)(results).call(results, parseStatisticData);
|
24995 | });
|
24996 | });
|
24997 | };
|
24998 |
|
24999 |
|
25000 |
|
25001 |
|
25002 |
|
25003 |
|
25004 |
|
25005 |
|
25006 |
|
25007 |
|
25008 | AV.Leaderboard.updateStatistics = function (user, statistics) {
|
25009 | var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
25010 | return _promise.default.resolve().then(function () {
|
25011 | if (!(user && user.id)) throw new Error('user must be an AV.User');
|
25012 | var data = (0, _map.default)(_).call(_, statistics, function (value, key) {
|
25013 | return {
|
25014 | statisticName: key,
|
25015 | statisticValue: value
|
25016 | };
|
25017 | });
|
25018 | var overwrite = options.overwrite;
|
25019 | return request({
|
25020 | method: 'POST',
|
25021 | path: "/leaderboard/users/".concat(user.id, "/statistics"),
|
25022 | query: {
|
25023 | overwrite: overwrite ? 1 : undefined
|
25024 | },
|
25025 | data: data,
|
25026 | authOptions: options
|
25027 | }).then(function (_ref5) {
|
25028 | var results = _ref5.results;
|
25029 | return (0, _map.default)(results).call(results, parseStatisticData);
|
25030 | });
|
25031 | });
|
25032 | };
|
25033 |
|
25034 |
|
25035 |
|
25036 |
|
25037 |
|
25038 |
|
25039 |
|
25040 |
|
25041 |
|
25042 | AV.Leaderboard.deleteStatistics = function (user, statisticNames, authOptions) {
|
25043 | return _promise.default.resolve().then(function () {
|
25044 | if (!(user && user.id)) throw new Error('user must be an AV.User');
|
25045 | return request({
|
25046 | method: 'DELETE',
|
25047 | path: "/leaderboard/users/".concat(user.id, "/statistics"),
|
25048 | query: {
|
25049 | statistics: ensureArray(statisticNames).join(',')
|
25050 | },
|
25051 | authOptions: authOptions
|
25052 | }).then(function () {
|
25053 | return undefined;
|
25054 | });
|
25055 | });
|
25056 | };
|
25057 |
|
25058 | _.extend(Leaderboard.prototype,
|
25059 |
|
25060 | {
|
25061 | _finishFetch: function _finishFetch(data) {
|
25062 | var _this = this;
|
25063 |
|
25064 | _.forEach(data, function (value, key) {
|
25065 | if (key === 'updatedAt' || key === 'objectId') return;
|
25066 |
|
25067 | if (key === 'expiredAt') {
|
25068 | key = 'nextResetAt';
|
25069 | }
|
25070 |
|
25071 | if (key === 'createdAt') {
|
25072 | value = parseDate(value);
|
25073 | }
|
25074 |
|
25075 | if (value && value.__type === 'Date') {
|
25076 | value = parseDate(value.iso);
|
25077 | }
|
25078 |
|
25079 | _this[key] = value;
|
25080 | });
|
25081 |
|
25082 | return this;
|
25083 | },
|
25084 |
|
25085 | |
25086 |
|
25087 |
|
25088 |
|
25089 |
|
25090 | fetch: function fetch(authOptions) {
|
25091 | var _this2 = this;
|
25092 |
|
25093 | return request({
|
25094 | method: 'GET',
|
25095 | path: "/leaderboard/leaderboards/".concat(this.statisticName),
|
25096 | authOptions: authOptions
|
25097 | }).then(function (data) {
|
25098 | return _this2._finishFetch(data);
|
25099 | });
|
25100 | },
|
25101 |
|
25102 | |
25103 |
|
25104 |
|
25105 |
|
25106 |
|
25107 |
|
25108 |
|
25109 | count: function count() {
|
25110 | var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
25111 | version = _ref6.version;
|
25112 |
|
25113 | var authOptions = arguments.length > 1 ? arguments[1] : undefined;
|
25114 | return request({
|
25115 | method: 'GET',
|
25116 | path: "/leaderboard/leaderboards/".concat(this.statisticName, "/ranks"),
|
25117 | query: {
|
25118 | count: 1,
|
25119 | limit: 0,
|
25120 | version: version
|
25121 | },
|
25122 | authOptions: authOptions
|
25123 | }).then(function (_ref7) {
|
25124 | var count = _ref7.count;
|
25125 | return count;
|
25126 | });
|
25127 | },
|
25128 | _getResults: function _getResults(_ref8, authOptions, userId) {
|
25129 | var _context;
|
25130 |
|
25131 | var skip = _ref8.skip,
|
25132 | limit = _ref8.limit,
|
25133 | selectUserKeys = _ref8.selectUserKeys,
|
25134 | includeUserKeys = _ref8.includeUserKeys,
|
25135 | includeStatistics = _ref8.includeStatistics,
|
25136 | version = _ref8.version;
|
25137 | return request({
|
25138 | method: 'GET',
|
25139 | path: (0, _concat.default)(_context = "/leaderboard/leaderboards/".concat(this.statisticName, "/ranks")).call(_context, userId ? "/".concat(userId) : ''),
|
25140 | query: {
|
25141 | skip: skip,
|
25142 | limit: limit,
|
25143 | selectUserKeys: _.union(ensureArray(selectUserKeys), ensureArray(includeUserKeys)).join(',') || undefined,
|
25144 | includeUser: includeUserKeys ? ensureArray(includeUserKeys).join(',') : undefined,
|
25145 | includeStatistics: includeStatistics ? ensureArray(includeStatistics).join(',') : undefined,
|
25146 | version: version
|
25147 | },
|
25148 | authOptions: authOptions
|
25149 | }).then(function (_ref9) {
|
25150 | var rankings = _ref9.results;
|
25151 | return (0, _map.default)(rankings).call(rankings, function (rankingData) {
|
25152 | var _AV$_decode2 = AV._decode(rankingData),
|
25153 | user = _AV$_decode2.user,
|
25154 | value = _AV$_decode2.statisticValue,
|
25155 | rank = _AV$_decode2.rank,
|
25156 | _AV$_decode2$statisti = _AV$_decode2.statistics,
|
25157 | statistics = _AV$_decode2$statisti === void 0 ? [] : _AV$_decode2$statisti;
|
25158 |
|
25159 | return {
|
25160 | user: user,
|
25161 | value: value,
|
25162 | rank: rank,
|
25163 | includedStatistics: (0, _map.default)(statistics).call(statistics, parseStatisticData)
|
25164 | };
|
25165 | });
|
25166 | });
|
25167 | },
|
25168 |
|
25169 | |
25170 |
|
25171 |
|
25172 |
|
25173 |
|
25174 |
|
25175 |
|
25176 |
|
25177 |
|
25178 |
|
25179 |
|
25180 |
|
25181 | getResults: function getResults() {
|
25182 | var _ref10 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
25183 | skip = _ref10.skip,
|
25184 | limit = _ref10.limit,
|
25185 | selectUserKeys = _ref10.selectUserKeys,
|
25186 | includeUserKeys = _ref10.includeUserKeys,
|
25187 | includeStatistics = _ref10.includeStatistics,
|
25188 | version = _ref10.version;
|
25189 |
|
25190 | var authOptions = arguments.length > 1 ? arguments[1] : undefined;
|
25191 | return this._getResults({
|
25192 | skip: skip,
|
25193 | limit: limit,
|
25194 | selectUserKeys: selectUserKeys,
|
25195 | includeUserKeys: includeUserKeys,
|
25196 | includeStatistics: includeStatistics,
|
25197 | version: version
|
25198 | }, authOptions);
|
25199 | },
|
25200 |
|
25201 | |
25202 |
|
25203 |
|
25204 |
|
25205 |
|
25206 |
|
25207 |
|
25208 |
|
25209 |
|
25210 |
|
25211 |
|
25212 |
|
25213 | getResultsAroundUser: function getResultsAroundUser(user) {
|
25214 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
25215 | var authOptions = arguments.length > 2 ? arguments[2] : undefined;
|
25216 |
|
25217 |
|
25218 | if (user && typeof user.id !== 'string') {
|
25219 | return this.getResultsAroundUser(undefined, user, options);
|
25220 | }
|
25221 |
|
25222 | var limit = options.limit,
|
25223 | selectUserKeys = options.selectUserKeys,
|
25224 | includeUserKeys = options.includeUserKeys,
|
25225 | includeStatistics = options.includeStatistics,
|
25226 | version = options.version;
|
25227 | return this._getResults({
|
25228 | limit: limit,
|
25229 | selectUserKeys: selectUserKeys,
|
25230 | includeUserKeys: includeUserKeys,
|
25231 | includeStatistics: includeStatistics,
|
25232 | version: version
|
25233 | }, authOptions, user ? user.id : 'self');
|
25234 | },
|
25235 | _update: function _update(data, authOptions) {
|
25236 | var _this3 = this;
|
25237 |
|
25238 | return request({
|
25239 | method: 'PUT',
|
25240 | path: "/leaderboard/leaderboards/".concat(this.statisticName),
|
25241 | data: data,
|
25242 | authOptions: authOptions
|
25243 | }).then(function (result) {
|
25244 | return _this3._finishFetch(result);
|
25245 | });
|
25246 | },
|
25247 |
|
25248 | |
25249 |
|
25250 |
|
25251 |
|
25252 |
|
25253 |
|
25254 | updateVersionChangeInterval: function updateVersionChangeInterval(versionChangeInterval, authOptions) {
|
25255 | return this._update({
|
25256 | versionChangeInterval: versionChangeInterval
|
25257 | }, authOptions);
|
25258 | },
|
25259 |
|
25260 | |
25261 |
|
25262 |
|
25263 |
|
25264 |
|
25265 |
|
25266 | updateUpdateStrategy: function updateUpdateStrategy(updateStrategy, authOptions) {
|
25267 | return this._update({
|
25268 | updateStrategy: updateStrategy
|
25269 | }, authOptions);
|
25270 | },
|
25271 |
|
25272 | |
25273 |
|
25274 |
|
25275 |
|
25276 |
|
25277 | reset: function reset(authOptions) {
|
25278 | var _this4 = this;
|
25279 |
|
25280 | return request({
|
25281 | method: 'PUT',
|
25282 | path: "/leaderboard/leaderboards/".concat(this.statisticName, "/incrementVersion"),
|
25283 | authOptions: authOptions
|
25284 | }).then(function (data) {
|
25285 | return _this4._finishFetch(data);
|
25286 | });
|
25287 | },
|
25288 |
|
25289 | |
25290 |
|
25291 |
|
25292 |
|
25293 |
|
25294 | destroy: function destroy(authOptions) {
|
25295 | return AV.request({
|
25296 | method: 'DELETE',
|
25297 | path: "/leaderboard/leaderboards/".concat(this.statisticName),
|
25298 | authOptions: authOptions
|
25299 | }).then(function () {
|
25300 | return undefined;
|
25301 | });
|
25302 | },
|
25303 |
|
25304 | |
25305 |
|
25306 |
|
25307 |
|
25308 |
|
25309 |
|
25310 |
|
25311 |
|
25312 | getArchives: function getArchives() {
|
25313 | var _this5 = this;
|
25314 |
|
25315 | var _ref11 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
25316 | skip = _ref11.skip,
|
25317 | limit = _ref11.limit;
|
25318 |
|
25319 | var authOptions = arguments.length > 1 ? arguments[1] : undefined;
|
25320 | return request({
|
25321 | method: 'GET',
|
25322 | path: "/leaderboard/leaderboards/".concat(this.statisticName, "/archives"),
|
25323 | query: {
|
25324 | skip: skip,
|
25325 | limit: limit
|
25326 | },
|
25327 | authOptions: authOptions
|
25328 | }).then(function (_ref12) {
|
25329 | var results = _ref12.results;
|
25330 | return (0, _map.default)(results).call(results, function (_ref13) {
|
25331 | var version = _ref13.version,
|
25332 | status = _ref13.status,
|
25333 | url = _ref13.url,
|
25334 | activatedAt = _ref13.activatedAt,
|
25335 | deactivatedAt = _ref13.deactivatedAt;
|
25336 | return {
|
25337 | statisticName: _this5.statisticName,
|
25338 | version: version,
|
25339 | status: status,
|
25340 | url: url,
|
25341 | activatedAt: parseDate(activatedAt.iso),
|
25342 | deactivatedAt: parseDate(deactivatedAt.iso)
|
25343 | };
|
25344 | });
|
25345 | });
|
25346 | }
|
25347 | });
|
25348 |
|
25349 | }),
|
25350 |
|
25351 | (function(module, exports, __webpack_require__) {
|
25352 |
|
25353 | "use strict";
|
25354 |
|
25355 |
|
25356 | var adapters = __webpack_require__(546);
|
25357 |
|
25358 | module.exports = function (AV) {
|
25359 | AV.setAdapters(adapters);
|
25360 | return AV;
|
25361 | };
|
25362 |
|
25363 | }),
|
25364 |
|
25365 | (function(module, exports, __webpack_require__) {
|
25366 |
|
25367 | "use strict";
|
25368 |
|
25369 |
|
25370 | var _interopRequireDefault = __webpack_require__(1);
|
25371 |
|
25372 | var _typeof2 = _interopRequireDefault(__webpack_require__(109));
|
25373 |
|
25374 | var _defineProperty = _interopRequireDefault(__webpack_require__(143));
|
25375 |
|
25376 | var _setPrototypeOf = _interopRequireDefault(__webpack_require__(227));
|
25377 |
|
25378 | var _assign2 = _interopRequireDefault(__webpack_require__(547));
|
25379 |
|
25380 | var _indexOf = _interopRequireDefault(__webpack_require__(86));
|
25381 |
|
25382 | var _getOwnPropertySymbols = _interopRequireDefault(__webpack_require__(552));
|
25383 |
|
25384 | var _promise = _interopRequireDefault(__webpack_require__(12));
|
25385 |
|
25386 | var _symbol = _interopRequireDefault(__webpack_require__(240));
|
25387 |
|
25388 | var _iterator = _interopRequireDefault(__webpack_require__(555));
|
25389 |
|
25390 | var _weakMap = _interopRequireDefault(__webpack_require__(556));
|
25391 |
|
25392 | var _keys = _interopRequireDefault(__webpack_require__(141));
|
25393 |
|
25394 | var _getOwnPropertyDescriptor = _interopRequireDefault(__webpack_require__(246));
|
25395 |
|
25396 | var _getPrototypeOf = _interopRequireDefault(__webpack_require__(142));
|
25397 |
|
25398 | var _map = _interopRequireDefault(__webpack_require__(564));
|
25399 |
|
25400 | (0, _defineProperty.default)(exports, '__esModule', {
|
25401 | value: true
|
25402 | });
|
25403 |
|
25404 |
|
25405 |
|
25406 |
|
25407 |
|
25408 |
|
25409 |
|
25410 |
|
25411 |
|
25412 |
|
25413 |
|
25414 |
|
25415 |
|
25416 |
|
25417 |
|
25418 |
|
25419 |
|
25420 | var _extendStatics$ = function extendStatics$1(d, b) {
|
25421 | _extendStatics$ = _setPrototypeOf.default || {
|
25422 | __proto__: []
|
25423 | } instanceof Array && function (d, b) {
|
25424 | d.__proto__ = b;
|
25425 | } || function (d, b) {
|
25426 | for (var p in b) {
|
25427 | if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
25428 | }
|
25429 | };
|
25430 |
|
25431 | return _extendStatics$(d, b);
|
25432 | };
|
25433 |
|
25434 | function __extends$1(d, b) {
|
25435 | if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
25436 |
|
25437 | _extendStatics$(d, b);
|
25438 |
|
25439 | function __() {
|
25440 | this.constructor = d;
|
25441 | }
|
25442 |
|
25443 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
25444 | }
|
25445 |
|
25446 | var _assign = function __assign() {
|
25447 | _assign = _assign2.default || function __assign(t) {
|
25448 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
25449 | s = arguments[i];
|
25450 |
|
25451 | for (var p in s) {
|
25452 | if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
25453 | }
|
25454 | }
|
25455 |
|
25456 | return t;
|
25457 | };
|
25458 |
|
25459 | return _assign.apply(this, arguments);
|
25460 | };
|
25461 |
|
25462 | function __rest(s, e) {
|
25463 | var t = {};
|
25464 |
|
25465 | for (var p in s) {
|
25466 | if (Object.prototype.hasOwnProperty.call(s, p) && (0, _indexOf.default)(e).call(e, p) < 0) t[p] = s[p];
|
25467 | }
|
25468 |
|
25469 | if (s != null && typeof _getOwnPropertySymbols.default === "function") for (var i = 0, p = (0, _getOwnPropertySymbols.default)(s); i < p.length; i++) {
|
25470 | if ((0, _indexOf.default)(e).call(e, p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
25471 | }
|
25472 | return t;
|
25473 | }
|
25474 |
|
25475 | function __awaiter(thisArg, _arguments, P, generator) {
|
25476 | function adopt(value) {
|
25477 | return value instanceof P ? value : new P(function (resolve) {
|
25478 | resolve(value);
|
25479 | });
|
25480 | }
|
25481 |
|
25482 | return new (P || (P = _promise.default))(function (resolve, reject) {
|
25483 | function fulfilled(value) {
|
25484 | try {
|
25485 | step(generator.next(value));
|
25486 | } catch (e) {
|
25487 | reject(e);
|
25488 | }
|
25489 | }
|
25490 |
|
25491 | function rejected(value) {
|
25492 | try {
|
25493 | step(generator["throw"](value));
|
25494 | } catch (e) {
|
25495 | reject(e);
|
25496 | }
|
25497 | }
|
25498 |
|
25499 | function step(result) {
|
25500 | result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
25501 | }
|
25502 |
|
25503 | step((generator = generator.apply(thisArg, _arguments || [])).next());
|
25504 | });
|
25505 | }
|
25506 |
|
25507 | function __generator(thisArg, body) {
|
25508 | var _ = {
|
25509 | label: 0,
|
25510 | sent: function sent() {
|
25511 | if (t[0] & 1) throw t[1];
|
25512 | return t[1];
|
25513 | },
|
25514 | trys: [],
|
25515 | ops: []
|
25516 | },
|
25517 | f,
|
25518 | y,
|
25519 | t,
|
25520 | g;
|
25521 | return g = {
|
25522 | next: verb(0),
|
25523 | "throw": verb(1),
|
25524 | "return": verb(2)
|
25525 | }, typeof _symbol.default === "function" && (g[_iterator.default] = function () {
|
25526 | return this;
|
25527 | }), g;
|
25528 |
|
25529 | function verb(n) {
|
25530 | return function (v) {
|
25531 | return step([n, v]);
|
25532 | };
|
25533 | }
|
25534 |
|
25535 | function step(op) {
|
25536 | if (f) throw new TypeError("Generator is already executing.");
|
25537 |
|
25538 | while (_) {
|
25539 | try {
|
25540 | if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
25541 | if (y = 0, t) op = [op[0] & 2, t.value];
|
25542 |
|
25543 | switch (op[0]) {
|
25544 | case 0:
|
25545 | case 1:
|
25546 | t = op;
|
25547 | break;
|
25548 |
|
25549 | case 4:
|
25550 | _.label++;
|
25551 | return {
|
25552 | value: op[1],
|
25553 | done: false
|
25554 | };
|
25555 |
|
25556 | case 5:
|
25557 | _.label++;
|
25558 | y = op[1];
|
25559 | op = [0];
|
25560 | continue;
|
25561 |
|
25562 | case 7:
|
25563 | op = _.ops.pop();
|
25564 |
|
25565 | _.trys.pop();
|
25566 |
|
25567 | continue;
|
25568 |
|
25569 | default:
|
25570 | if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
25571 | _ = 0;
|
25572 | continue;
|
25573 | }
|
25574 |
|
25575 | if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
25576 | _.label = op[1];
|
25577 | break;
|
25578 | }
|
25579 |
|
25580 | if (op[0] === 6 && _.label < t[1]) {
|
25581 | _.label = t[1];
|
25582 | t = op;
|
25583 | break;
|
25584 | }
|
25585 |
|
25586 | if (t && _.label < t[2]) {
|
25587 | _.label = t[2];
|
25588 |
|
25589 | _.ops.push(op);
|
25590 |
|
25591 | break;
|
25592 | }
|
25593 |
|
25594 | if (t[2]) _.ops.pop();
|
25595 |
|
25596 | _.trys.pop();
|
25597 |
|
25598 | continue;
|
25599 | }
|
25600 |
|
25601 | op = body.call(thisArg, _);
|
25602 | } catch (e) {
|
25603 | op = [6, e];
|
25604 | y = 0;
|
25605 | } finally {
|
25606 | f = t = 0;
|
25607 | }
|
25608 | }
|
25609 |
|
25610 | if (op[0] & 5) throw op[1];
|
25611 | return {
|
25612 | value: op[0] ? op[1] : void 0,
|
25613 | done: true
|
25614 | };
|
25615 | }
|
25616 | }
|
25617 |
|
25618 | var PROVIDER = "lc_weapp";
|
25619 | var PLATFORM = "weixin";
|
25620 |
|
25621 | function getLoginCode() {
|
25622 | return new _promise.default(function (resolve, reject) {
|
25623 | wx.login({
|
25624 | success: function success(res) {
|
25625 | return res.code ? resolve(res.code) : reject(new Error(res.errMsg));
|
25626 | },
|
25627 | fail: function fail(_a) {
|
25628 | var errMsg = _a.errMsg;
|
25629 | return reject(new Error(errMsg));
|
25630 | }
|
25631 | });
|
25632 | });
|
25633 | }
|
25634 |
|
25635 | var getAuthInfo = function getAuthInfo(_a) {
|
25636 | var _b = _a === void 0 ? {} : _a,
|
25637 | _c = _b.platform,
|
25638 | platform = _c === void 0 ? PLATFORM : _c,
|
25639 | _d = _b.preferUnionId,
|
25640 | preferUnionId = _d === void 0 ? false : _d,
|
25641 | _e = _b.asMainAccount,
|
25642 | asMainAccount = _e === void 0 ? false : _e;
|
25643 |
|
25644 | return __awaiter(this, void 0, void 0, function () {
|
25645 | var code, authData;
|
25646 | return __generator(this, function (_f) {
|
25647 | switch (_f.label) {
|
25648 | case 0:
|
25649 | return [4
|
25650 |
|
25651 | , getLoginCode()];
|
25652 |
|
25653 | case 1:
|
25654 | code = _f.sent();
|
25655 | authData = {
|
25656 | code: code
|
25657 | };
|
25658 |
|
25659 | if (preferUnionId) {
|
25660 | authData.platform = platform;
|
25661 | authData.main_account = asMainAccount;
|
25662 | }
|
25663 |
|
25664 | return [2
|
25665 |
|
25666 | , {
|
25667 | authData: authData,
|
25668 | platform: platform,
|
25669 | provider: PROVIDER
|
25670 | }];
|
25671 | }
|
25672 | });
|
25673 | });
|
25674 | };
|
25675 |
|
25676 | var storage = {
|
25677 | getItem: function getItem(key) {
|
25678 | return wx.getStorageSync(key);
|
25679 | },
|
25680 | setItem: function setItem(key, value) {
|
25681 | return wx.setStorageSync(key, value);
|
25682 | },
|
25683 | removeItem: function removeItem(key) {
|
25684 | return wx.removeStorageSync(key);
|
25685 | },
|
25686 | clear: function clear() {
|
25687 | return wx.clearStorageSync();
|
25688 | }
|
25689 | };
|
25690 |
|
25691 |
|
25692 |
|
25693 |
|
25694 |
|
25695 |
|
25696 |
|
25697 |
|
25698 |
|
25699 |
|
25700 |
|
25701 |
|
25702 |
|
25703 |
|
25704 |
|
25705 |
|
25706 |
|
25707 | var _extendStatics = function extendStatics(d, b) {
|
25708 | _extendStatics = _setPrototypeOf.default || {
|
25709 | __proto__: []
|
25710 | } instanceof Array && function (d, b) {
|
25711 | d.__proto__ = b;
|
25712 | } || function (d, b) {
|
25713 | for (var p in b) {
|
25714 | if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
25715 | }
|
25716 | };
|
25717 |
|
25718 | return _extendStatics(d, b);
|
25719 | };
|
25720 |
|
25721 | function __extends(d, b) {
|
25722 | if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
25723 |
|
25724 | _extendStatics(d, b);
|
25725 |
|
25726 | function __() {
|
25727 | this.constructor = d;
|
25728 | }
|
25729 |
|
25730 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
25731 | }
|
25732 |
|
25733 | var AbortError =
|
25734 |
|
25735 | function (_super) {
|
25736 | __extends(AbortError, _super);
|
25737 |
|
25738 | function AbortError() {
|
25739 | var _this = _super !== null && _super.apply(this, arguments) || this;
|
25740 |
|
25741 | _this.name = "AbortError";
|
25742 | return _this;
|
25743 | }
|
25744 |
|
25745 | return AbortError;
|
25746 | }(Error);
|
25747 |
|
25748 | var request = function request(url, options) {
|
25749 | if (options === void 0) {
|
25750 | options = {};
|
25751 | }
|
25752 |
|
25753 | var method = options.method,
|
25754 | data = options.data,
|
25755 | headers = options.headers,
|
25756 | signal = options.signal;
|
25757 |
|
25758 | if (signal === null || signal === void 0 ? void 0 : signal.aborted) {
|
25759 | return _promise.default.reject(new AbortError("Request aborted"));
|
25760 | }
|
25761 |
|
25762 | return new _promise.default(function (resolve, reject) {
|
25763 | var task = wx.request({
|
25764 | url: url,
|
25765 | method: method,
|
25766 | data: data,
|
25767 | header: headers,
|
25768 | complete: function complete(res) {
|
25769 | signal === null || signal === void 0 ? void 0 : signal.removeEventListener("abort", abortListener);
|
25770 |
|
25771 | if (!res.statusCode) {
|
25772 | reject(new Error(res.errMsg));
|
25773 | return;
|
25774 | }
|
25775 |
|
25776 | resolve({
|
25777 | ok: !(res.statusCode >= 400),
|
25778 | status: res.statusCode,
|
25779 | headers: res.header,
|
25780 | data: res.data
|
25781 | });
|
25782 | }
|
25783 | });
|
25784 |
|
25785 | var abortListener = function abortListener() {
|
25786 | reject(new AbortError("Request aborted"));
|
25787 | task.abort();
|
25788 | };
|
25789 |
|
25790 | signal === null || signal === void 0 ? void 0 : signal.addEventListener("abort", abortListener);
|
25791 | });
|
25792 | };
|
25793 |
|
25794 | var upload = function upload(url, file, options) {
|
25795 | if (options === void 0) {
|
25796 | options = {};
|
25797 | }
|
25798 |
|
25799 | var headers = options.headers,
|
25800 | data = options.data,
|
25801 | onprogress = options.onprogress,
|
25802 | signal = options.signal;
|
25803 |
|
25804 | if (signal === null || signal === void 0 ? void 0 : signal.aborted) {
|
25805 | return _promise.default.reject(new AbortError("Request aborted"));
|
25806 | }
|
25807 |
|
25808 | if (!(file && file.data && file.data.uri)) {
|
25809 | return _promise.default.reject(new TypeError("File data must be an object like { uri: localPath }."));
|
25810 | }
|
25811 |
|
25812 | return new _promise.default(function (resolve, reject) {
|
25813 | var task = wx.uploadFile({
|
25814 | url: url,
|
25815 | header: headers,
|
25816 | filePath: file.data.uri,
|
25817 | name: file.field,
|
25818 | formData: data,
|
25819 | success: function success(response) {
|
25820 | var status = response.statusCode,
|
25821 | data = response.data,
|
25822 | rest = __rest(response, ["statusCode", "data"]);
|
25823 |
|
25824 | resolve(_assign(_assign({}, rest), {
|
25825 | data: typeof data === "string" ? JSON.parse(data) : data,
|
25826 | status: status,
|
25827 | ok: !(status >= 400)
|
25828 | }));
|
25829 | },
|
25830 | fail: function fail(response) {
|
25831 | reject(new Error(response.errMsg));
|
25832 | },
|
25833 | complete: function complete() {
|
25834 | signal === null || signal === void 0 ? void 0 : signal.removeEventListener("abort", abortListener);
|
25835 | }
|
25836 | });
|
25837 |
|
25838 | var abortListener = function abortListener() {
|
25839 | reject(new AbortError("Request aborted"));
|
25840 | task.abort();
|
25841 | };
|
25842 |
|
25843 | signal === null || signal === void 0 ? void 0 : signal.addEventListener("abort", abortListener);
|
25844 |
|
25845 | if (onprogress) {
|
25846 | task.onProgressUpdate(function (event) {
|
25847 | return onprogress({
|
25848 | loaded: event.totalBytesSent,
|
25849 | total: event.totalBytesExpectedToSend,
|
25850 | percent: event.progress
|
25851 | });
|
25852 | });
|
25853 | }
|
25854 | });
|
25855 | };
|
25856 |
|
25857 |
|
25858 |
|
25859 |
|
25860 |
|
25861 |
|
25862 |
|
25863 |
|
25864 |
|
25865 |
|
25866 |
|
25867 |
|
25868 |
|
25869 |
|
25870 |
|
25871 |
|
25872 |
|
25873 |
|
25874 |
|
25875 |
|
25876 |
|
25877 |
|
25878 |
|
25879 |
|
25880 |
|
25881 |
|
25882 |
|
25883 | var privateData = new _weakMap.default();
|
25884 |
|
25885 |
|
25886 |
|
25887 |
|
25888 |
|
25889 |
|
25890 | var wrappers = new _weakMap.default();
|
25891 |
|
25892 |
|
25893 |
|
25894 |
|
25895 |
|
25896 |
|
25897 |
|
25898 | function pd(event) {
|
25899 | var retv = privateData.get(event);
|
25900 | console.assert(retv != null, "'this' is expected an Event object, but got", event);
|
25901 | return retv;
|
25902 | }
|
25903 |
|
25904 |
|
25905 |
|
25906 |
|
25907 |
|
25908 |
|
25909 | function setCancelFlag(data) {
|
25910 | if (data.passiveListener != null) {
|
25911 | if (typeof console !== "undefined" && typeof console.error === "function") {
|
25912 | console.error("Unable to preventDefault inside passive event listener invocation.", data.passiveListener);
|
25913 | }
|
25914 |
|
25915 | return;
|
25916 | }
|
25917 |
|
25918 | if (!data.event.cancelable) {
|
25919 | return;
|
25920 | }
|
25921 |
|
25922 | data.canceled = true;
|
25923 |
|
25924 | if (typeof data.event.preventDefault === "function") {
|
25925 | data.event.preventDefault();
|
25926 | }
|
25927 | }
|
25928 |
|
25929 |
|
25930 |
|
25931 |
|
25932 |
|
25933 |
|
25934 |
|
25935 |
|
25936 |
|
25937 |
|
25938 |
|
25939 |
|
25940 |
|
25941 | function Event(eventTarget, event) {
|
25942 | privateData.set(this, {
|
25943 | eventTarget: eventTarget,
|
25944 | event: event,
|
25945 | eventPhase: 2,
|
25946 | currentTarget: eventTarget,
|
25947 | canceled: false,
|
25948 | stopped: false,
|
25949 | immediateStopped: false,
|
25950 | passiveListener: null,
|
25951 | timeStamp: event.timeStamp || Date.now()
|
25952 | });
|
25953 |
|
25954 | (0, _defineProperty.default)(this, "isTrusted", {
|
25955 | value: false,
|
25956 | enumerable: true
|
25957 | });
|
25958 |
|
25959 | var keys = (0, _keys.default)(event);
|
25960 |
|
25961 | for (var i = 0; i < keys.length; ++i) {
|
25962 | var key = keys[i];
|
25963 |
|
25964 | if (!(key in this)) {
|
25965 | (0, _defineProperty.default)(this, key, defineRedirectDescriptor(key));
|
25966 | }
|
25967 | }
|
25968 | }
|
25969 |
|
25970 |
|
25971 | Event.prototype = {
|
25972 | |
25973 |
|
25974 |
|
25975 |
|
25976 | get type() {
|
25977 | return pd(this).event.type;
|
25978 | },
|
25979 |
|
25980 | |
25981 |
|
25982 |
|
25983 |
|
25984 | get target() {
|
25985 | return pd(this).eventTarget;
|
25986 | },
|
25987 |
|
25988 | |
25989 |
|
25990 |
|
25991 |
|
25992 | get currentTarget() {
|
25993 | return pd(this).currentTarget;
|
25994 | },
|
25995 |
|
25996 | |
25997 |
|
25998 |
|
25999 | composedPath: function composedPath() {
|
26000 | var currentTarget = pd(this).currentTarget;
|
26001 |
|
26002 | if (currentTarget == null) {
|
26003 | return [];
|
26004 | }
|
26005 |
|
26006 | return [currentTarget];
|
26007 | },
|
26008 |
|
26009 | |
26010 |
|
26011 |
|
26012 |
|
26013 | get NONE() {
|
26014 | return 0;
|
26015 | },
|
26016 |
|
26017 | |
26018 |
|
26019 |
|
26020 |
|
26021 | get CAPTURING_PHASE() {
|
26022 | return 1;
|
26023 | },
|
26024 |
|
26025 | |
26026 |
|
26027 |
|
26028 |
|
26029 | get AT_TARGET() {
|
26030 | return 2;
|
26031 | },
|
26032 |
|
26033 | |
26034 |
|
26035 |
|
26036 |
|
26037 | get BUBBLING_PHASE() {
|
26038 | return 3;
|
26039 | },
|
26040 |
|
26041 | |
26042 |
|
26043 |
|
26044 |
|
26045 | get eventPhase() {
|
26046 | return pd(this).eventPhase;
|
26047 | },
|
26048 |
|
26049 | |
26050 |
|
26051 |
|
26052 |
|
26053 | stopPropagation: function stopPropagation() {
|
26054 | var data = pd(this);
|
26055 | data.stopped = true;
|
26056 |
|
26057 | if (typeof data.event.stopPropagation === "function") {
|
26058 | data.event.stopPropagation();
|
26059 | }
|
26060 | },
|
26061 |
|
26062 | |
26063 |
|
26064 |
|
26065 |
|
26066 | stopImmediatePropagation: function stopImmediatePropagation() {
|
26067 | var data = pd(this);
|
26068 | data.stopped = true;
|
26069 | data.immediateStopped = true;
|
26070 |
|
26071 | if (typeof data.event.stopImmediatePropagation === "function") {
|
26072 | data.event.stopImmediatePropagation();
|
26073 | }
|
26074 | },
|
26075 |
|
26076 | |
26077 |
|
26078 |
|
26079 |
|
26080 | get bubbles() {
|
26081 | return Boolean(pd(this).event.bubbles);
|
26082 | },
|
26083 |
|
26084 | |
26085 |
|
26086 |
|
26087 |
|
26088 | get cancelable() {
|
26089 | return Boolean(pd(this).event.cancelable);
|
26090 | },
|
26091 |
|
26092 | |
26093 |
|
26094 |
|
26095 |
|
26096 | preventDefault: function preventDefault() {
|
26097 | setCancelFlag(pd(this));
|
26098 | },
|
26099 |
|
26100 | |
26101 |
|
26102 |
|
26103 |
|
26104 | get defaultPrevented() {
|
26105 | return pd(this).canceled;
|
26106 | },
|
26107 |
|
26108 | |
26109 |
|
26110 |
|
26111 |
|
26112 | get composed() {
|
26113 | return Boolean(pd(this).event.composed);
|
26114 | },
|
26115 |
|
26116 | |
26117 |
|
26118 |
|
26119 |
|
26120 | get timeStamp() {
|
26121 | return pd(this).timeStamp;
|
26122 | },
|
26123 |
|
26124 | |
26125 |
|
26126 |
|
26127 |
|
26128 |
|
26129 | get srcElement() {
|
26130 | return pd(this).eventTarget;
|
26131 | },
|
26132 |
|
26133 | |
26134 |
|
26135 |
|
26136 |
|
26137 |
|
26138 | get cancelBubble() {
|
26139 | return pd(this).stopped;
|
26140 | },
|
26141 |
|
26142 | set cancelBubble(value) {
|
26143 | if (!value) {
|
26144 | return;
|
26145 | }
|
26146 |
|
26147 | var data = pd(this);
|
26148 | data.stopped = true;
|
26149 |
|
26150 | if (typeof data.event.cancelBubble === "boolean") {
|
26151 | data.event.cancelBubble = true;
|
26152 | }
|
26153 | },
|
26154 |
|
26155 | |
26156 |
|
26157 |
|
26158 |
|
26159 |
|
26160 | get returnValue() {
|
26161 | return !pd(this).canceled;
|
26162 | },
|
26163 |
|
26164 | set returnValue(value) {
|
26165 | if (!value) {
|
26166 | setCancelFlag(pd(this));
|
26167 | }
|
26168 | },
|
26169 |
|
26170 | |
26171 |
|
26172 |
|
26173 |
|
26174 |
|
26175 |
|
26176 |
|
26177 | initEvent: function initEvent() {
|
26178 | }
|
26179 | };
|
26180 |
|
26181 | (0, _defineProperty.default)(Event.prototype, "constructor", {
|
26182 | value: Event,
|
26183 | configurable: true,
|
26184 | writable: true
|
26185 | });
|
26186 |
|
26187 | if (typeof window !== "undefined" && typeof window.Event !== "undefined") {
|
26188 | (0, _setPrototypeOf.default)(Event.prototype, window.Event.prototype);
|
26189 |
|
26190 | wrappers.set(window.Event.prototype, Event);
|
26191 | }
|
26192 |
|
26193 |
|
26194 |
|
26195 |
|
26196 |
|
26197 |
|
26198 |
|
26199 |
|
26200 | function defineRedirectDescriptor(key) {
|
26201 | return {
|
26202 | get: function get() {
|
26203 | return pd(this).event[key];
|
26204 | },
|
26205 | set: function set(value) {
|
26206 | pd(this).event[key] = value;
|
26207 | },
|
26208 | configurable: true,
|
26209 | enumerable: true
|
26210 | };
|
26211 | }
|
26212 |
|
26213 |
|
26214 |
|
26215 |
|
26216 |
|
26217 |
|
26218 |
|
26219 |
|
26220 | function defineCallDescriptor(key) {
|
26221 | return {
|
26222 | value: function value() {
|
26223 | var event = pd(this).event;
|
26224 | return event[key].apply(event, arguments);
|
26225 | },
|
26226 | configurable: true,
|
26227 | enumerable: true
|
26228 | };
|
26229 | }
|
26230 |
|
26231 |
|
26232 |
|
26233 |
|
26234 |
|
26235 |
|
26236 |
|
26237 |
|
26238 |
|
26239 | function defineWrapper(BaseEvent, proto) {
|
26240 | var keys = (0, _keys.default)(proto);
|
26241 |
|
26242 | if (keys.length === 0) {
|
26243 | return BaseEvent;
|
26244 | }
|
26245 |
|
26246 |
|
26247 |
|
26248 | function CustomEvent(eventTarget, event) {
|
26249 | BaseEvent.call(this, eventTarget, event);
|
26250 | }
|
26251 |
|
26252 | CustomEvent.prototype = Object.create(BaseEvent.prototype, {
|
26253 | constructor: {
|
26254 | value: CustomEvent,
|
26255 | configurable: true,
|
26256 | writable: true
|
26257 | }
|
26258 | });
|
26259 |
|
26260 | for (var i = 0; i < keys.length; ++i) {
|
26261 | var key = keys[i];
|
26262 |
|
26263 | if (!(key in BaseEvent.prototype)) {
|
26264 | var descriptor = (0, _getOwnPropertyDescriptor.default)(proto, key);
|
26265 | var isFunc = typeof descriptor.value === "function";
|
26266 | (0, _defineProperty.default)(CustomEvent.prototype, key, isFunc ? defineCallDescriptor(key) : defineRedirectDescriptor(key));
|
26267 | }
|
26268 | }
|
26269 |
|
26270 | return CustomEvent;
|
26271 | }
|
26272 |
|
26273 |
|
26274 |
|
26275 |
|
26276 |
|
26277 |
|
26278 |
|
26279 |
|
26280 | function getWrapper(proto) {
|
26281 | if (proto == null || proto === Object.prototype) {
|
26282 | return Event;
|
26283 | }
|
26284 |
|
26285 | var wrapper = wrappers.get(proto);
|
26286 |
|
26287 | if (wrapper == null) {
|
26288 | wrapper = defineWrapper(getWrapper((0, _getPrototypeOf.default)(proto)), proto);
|
26289 | wrappers.set(proto, wrapper);
|
26290 | }
|
26291 |
|
26292 | return wrapper;
|
26293 | }
|
26294 |
|
26295 |
|
26296 |
|
26297 |
|
26298 |
|
26299 |
|
26300 |
|
26301 |
|
26302 |
|
26303 | function wrapEvent(eventTarget, event) {
|
26304 | var Wrapper = getWrapper((0, _getPrototypeOf.default)(event));
|
26305 | return new Wrapper(eventTarget, event);
|
26306 | }
|
26307 |
|
26308 |
|
26309 |
|
26310 |
|
26311 |
|
26312 |
|
26313 |
|
26314 |
|
26315 | function isStopped(event) {
|
26316 | return pd(event).immediateStopped;
|
26317 | }
|
26318 |
|
26319 |
|
26320 |
|
26321 |
|
26322 |
|
26323 |
|
26324 |
|
26325 |
|
26326 |
|
26327 | function setEventPhase(event, eventPhase) {
|
26328 | pd(event).eventPhase = eventPhase;
|
26329 | }
|
26330 |
|
26331 |
|
26332 |
|
26333 |
|
26334 |
|
26335 |
|
26336 |
|
26337 |
|
26338 |
|
26339 | function setCurrentTarget(event, currentTarget) {
|
26340 | pd(event).currentTarget = currentTarget;
|
26341 | }
|
26342 |
|
26343 |
|
26344 |
|
26345 |
|
26346 |
|
26347 |
|
26348 |
|
26349 |
|
26350 |
|
26351 | function setPassiveListener(event, passiveListener) {
|
26352 | pd(event).passiveListener = passiveListener;
|
26353 | }
|
26354 |
|
26355 |
|
26356 |
|
26357 |
|
26358 |
|
26359 |
|
26360 |
|
26361 |
|
26362 |
|
26363 |
|
26364 |
|
26365 |
|
26366 |
|
26367 |
|
26368 |
|
26369 |
|
26370 | var listenersMap = new _weakMap.default();
|
26371 |
|
26372 | var CAPTURE = 1;
|
26373 | var BUBBLE = 2;
|
26374 | var ATTRIBUTE = 3;
|
26375 |
|
26376 |
|
26377 |
|
26378 |
|
26379 |
|
26380 |
|
26381 | function isObject(x) {
|
26382 | return x !== null && (0, _typeof2.default)(x) === "object";
|
26383 | }
|
26384 |
|
26385 |
|
26386 |
|
26387 |
|
26388 |
|
26389 |
|
26390 |
|
26391 |
|
26392 | function getListeners(eventTarget) {
|
26393 | var listeners = listenersMap.get(eventTarget);
|
26394 |
|
26395 | if (listeners == null) {
|
26396 | throw new TypeError("'this' is expected an EventTarget object, but got another value.");
|
26397 | }
|
26398 |
|
26399 | return listeners;
|
26400 | }
|
26401 |
|
26402 |
|
26403 |
|
26404 |
|
26405 |
|
26406 |
|
26407 |
|
26408 |
|
26409 | function defineEventAttributeDescriptor(eventName) {
|
26410 | return {
|
26411 | get: function get() {
|
26412 | var listeners = getListeners(this);
|
26413 | var node = listeners.get(eventName);
|
26414 |
|
26415 | while (node != null) {
|
26416 | if (node.listenerType === ATTRIBUTE) {
|
26417 | return node.listener;
|
26418 | }
|
26419 |
|
26420 | node = node.next;
|
26421 | }
|
26422 |
|
26423 | return null;
|
26424 | },
|
26425 | set: function set(listener) {
|
26426 | if (typeof listener !== "function" && !isObject(listener)) {
|
26427 | listener = null;
|
26428 | }
|
26429 |
|
26430 | var listeners = getListeners(this);
|
26431 |
|
26432 | var prev = null;
|
26433 | var node = listeners.get(eventName);
|
26434 |
|
26435 | while (node != null) {
|
26436 | if (node.listenerType === ATTRIBUTE) {
|
26437 |
|
26438 | if (prev !== null) {
|
26439 | prev.next = node.next;
|
26440 | } else if (node.next !== null) {
|
26441 | listeners.set(eventName, node.next);
|
26442 | } else {
|
26443 | listeners.delete(eventName);
|
26444 | }
|
26445 | } else {
|
26446 | prev = node;
|
26447 | }
|
26448 |
|
26449 | node = node.next;
|
26450 | }
|
26451 |
|
26452 |
|
26453 | if (listener !== null) {
|
26454 | var newNode = {
|
26455 | listener: listener,
|
26456 | listenerType: ATTRIBUTE,
|
26457 | passive: false,
|
26458 | once: false,
|
26459 | next: null
|
26460 | };
|
26461 |
|
26462 | if (prev === null) {
|
26463 | listeners.set(eventName, newNode);
|
26464 | } else {
|
26465 | prev.next = newNode;
|
26466 | }
|
26467 | }
|
26468 | },
|
26469 | configurable: true,
|
26470 | enumerable: true
|
26471 | };
|
26472 | }
|
26473 |
|
26474 |
|
26475 |
|
26476 |
|
26477 |
|
26478 |
|
26479 |
|
26480 |
|
26481 | function defineEventAttribute(eventTargetPrototype, eventName) {
|
26482 | (0, _defineProperty.default)(eventTargetPrototype, "on".concat(eventName), defineEventAttributeDescriptor(eventName));
|
26483 | }
|
26484 |
|
26485 |
|
26486 |
|
26487 |
|
26488 |
|
26489 |
|
26490 |
|
26491 |
|
26492 | function defineCustomEventTarget(eventNames) {
|
26493 |
|
26494 | function CustomEventTarget() {
|
26495 | EventTarget.call(this);
|
26496 | }
|
26497 |
|
26498 | CustomEventTarget.prototype = Object.create(EventTarget.prototype, {
|
26499 | constructor: {
|
26500 | value: CustomEventTarget,
|
26501 | configurable: true,
|
26502 | writable: true
|
26503 | }
|
26504 | });
|
26505 |
|
26506 | for (var i = 0; i < eventNames.length; ++i) {
|
26507 | defineEventAttribute(CustomEventTarget.prototype, eventNames[i]);
|
26508 | }
|
26509 |
|
26510 | return CustomEventTarget;
|
26511 | }
|
26512 |
|
26513 |
|
26514 |
|
26515 |
|
26516 |
|
26517 |
|
26518 |
|
26519 |
|
26520 |
|
26521 |
|
26522 |
|
26523 |
|
26524 |
|
26525 |
|
26526 |
|
26527 | function EventTarget() {
|
26528 |
|
26529 | if (this instanceof EventTarget) {
|
26530 | listenersMap.set(this, new _map.default());
|
26531 | return;
|
26532 | }
|
26533 |
|
26534 | if (arguments.length === 1 && Array.isArray(arguments[0])) {
|
26535 | return defineCustomEventTarget(arguments[0]);
|
26536 | }
|
26537 |
|
26538 | if (arguments.length > 0) {
|
26539 | var types = new Array(arguments.length);
|
26540 |
|
26541 | for (var i = 0; i < arguments.length; ++i) {
|
26542 | types[i] = arguments[i];
|
26543 | }
|
26544 |
|
26545 | return defineCustomEventTarget(types);
|
26546 | }
|
26547 |
|
26548 | throw new TypeError("Cannot call a class as a function");
|
26549 |
|
26550 | }
|
26551 |
|
26552 |
|
26553 | EventTarget.prototype = {
|
26554 | |
26555 |
|
26556 |
|
26557 |
|
26558 |
|
26559 |
|
26560 |
|
26561 | addEventListener: function addEventListener(eventName, listener, options) {
|
26562 | if (listener == null) {
|
26563 | return;
|
26564 | }
|
26565 |
|
26566 | if (typeof listener !== "function" && !isObject(listener)) {
|
26567 | throw new TypeError("'listener' should be a function or an object.");
|
26568 | }
|
26569 |
|
26570 | var listeners = getListeners(this);
|
26571 | var optionsIsObj = isObject(options);
|
26572 | var capture = optionsIsObj ? Boolean(options.capture) : Boolean(options);
|
26573 | var listenerType = capture ? CAPTURE : BUBBLE;
|
26574 | var newNode = {
|
26575 | listener: listener,
|
26576 | listenerType: listenerType,
|
26577 | passive: optionsIsObj && Boolean(options.passive),
|
26578 | once: optionsIsObj && Boolean(options.once),
|
26579 | next: null
|
26580 | };
|
26581 |
|
26582 | var node = listeners.get(eventName);
|
26583 |
|
26584 | if (node === undefined) {
|
26585 | listeners.set(eventName, newNode);
|
26586 | return;
|
26587 | }
|
26588 |
|
26589 |
|
26590 | var prev = null;
|
26591 |
|
26592 | while (node != null) {
|
26593 | if (node.listener === listener && node.listenerType === listenerType) {
|
26594 |
|
26595 | return;
|
26596 | }
|
26597 |
|
26598 | prev = node;
|
26599 | node = node.next;
|
26600 | }
|
26601 |
|
26602 |
|
26603 | prev.next = newNode;
|
26604 | },
|
26605 |
|
26606 | |
26607 |
|
26608 |
|
26609 |
|
26610 |
|
26611 |
|
26612 |
|
26613 | removeEventListener: function removeEventListener(eventName, listener, options) {
|
26614 | if (listener == null) {
|
26615 | return;
|
26616 | }
|
26617 |
|
26618 | var listeners = getListeners(this);
|
26619 | var capture = isObject(options) ? Boolean(options.capture) : Boolean(options);
|
26620 | var listenerType = capture ? CAPTURE : BUBBLE;
|
26621 | var prev = null;
|
26622 | var node = listeners.get(eventName);
|
26623 |
|
26624 | while (node != null) {
|
26625 | if (node.listener === listener && node.listenerType === listenerType) {
|
26626 | if (prev !== null) {
|
26627 | prev.next = node.next;
|
26628 | } else if (node.next !== null) {
|
26629 | listeners.set(eventName, node.next);
|
26630 | } else {
|
26631 | listeners.delete(eventName);
|
26632 | }
|
26633 |
|
26634 | return;
|
26635 | }
|
26636 |
|
26637 | prev = node;
|
26638 | node = node.next;
|
26639 | }
|
26640 | },
|
26641 |
|
26642 | |
26643 |
|
26644 |
|
26645 |
|
26646 |
|
26647 | dispatchEvent: function dispatchEvent(event) {
|
26648 | if (event == null || typeof event.type !== "string") {
|
26649 | throw new TypeError('"event.type" should be a string.');
|
26650 | }
|
26651 |
|
26652 |
|
26653 | var listeners = getListeners(this);
|
26654 | var eventName = event.type;
|
26655 | var node = listeners.get(eventName);
|
26656 |
|
26657 | if (node == null) {
|
26658 | return true;
|
26659 | }
|
26660 |
|
26661 |
|
26662 | var wrappedEvent = wrapEvent(this, event);
|
26663 |
|
26664 |
|
26665 | var prev = null;
|
26666 |
|
26667 | while (node != null) {
|
26668 |
|
26669 | if (node.once) {
|
26670 | if (prev !== null) {
|
26671 | prev.next = node.next;
|
26672 | } else if (node.next !== null) {
|
26673 | listeners.set(eventName, node.next);
|
26674 | } else {
|
26675 | listeners.delete(eventName);
|
26676 | }
|
26677 | } else {
|
26678 | prev = node;
|
26679 | }
|
26680 |
|
26681 |
|
26682 | setPassiveListener(wrappedEvent, node.passive ? node.listener : null);
|
26683 |
|
26684 | if (typeof node.listener === "function") {
|
26685 | try {
|
26686 | node.listener.call(this, wrappedEvent);
|
26687 | } catch (err) {
|
26688 | if (typeof console !== "undefined" && typeof console.error === "function") {
|
26689 | console.error(err);
|
26690 | }
|
26691 | }
|
26692 | } else if (node.listenerType !== ATTRIBUTE && typeof node.listener.handleEvent === "function") {
|
26693 | node.listener.handleEvent(wrappedEvent);
|
26694 | }
|
26695 |
|
26696 |
|
26697 | if (isStopped(wrappedEvent)) {
|
26698 | break;
|
26699 | }
|
26700 |
|
26701 | node = node.next;
|
26702 | }
|
26703 |
|
26704 | setPassiveListener(wrappedEvent, null);
|
26705 | setEventPhase(wrappedEvent, 0);
|
26706 | setCurrentTarget(wrappedEvent, null);
|
26707 | return !wrappedEvent.defaultPrevented;
|
26708 | }
|
26709 | };
|
26710 |
|
26711 | (0, _defineProperty.default)(EventTarget.prototype, "constructor", {
|
26712 | value: EventTarget,
|
26713 | configurable: true,
|
26714 | writable: true
|
26715 | });
|
26716 |
|
26717 | if (typeof window !== "undefined" && typeof window.EventTarget !== "undefined") {
|
26718 | (0, _setPrototypeOf.default)(EventTarget.prototype, window.EventTarget.prototype);
|
26719 | }
|
26720 |
|
26721 | var WS =
|
26722 |
|
26723 | function (_super) {
|
26724 | __extends$1(WS, _super);
|
26725 |
|
26726 | function WS(url, protocol) {
|
26727 | var _this = _super.call(this) || this;
|
26728 |
|
26729 | _this._readyState = WS.CLOSED;
|
26730 |
|
26731 | if (!url) {
|
26732 | throw new TypeError("Failed to construct 'WebSocket': url required");
|
26733 | }
|
26734 |
|
26735 | _this._url = url;
|
26736 | _this._protocol = protocol;
|
26737 | return _this;
|
26738 | }
|
26739 |
|
26740 | (0, _defineProperty.default)(WS.prototype, "url", {
|
26741 | get: function get() {
|
26742 | return this._url;
|
26743 | },
|
26744 | enumerable: false,
|
26745 | configurable: true
|
26746 | });
|
26747 | (0, _defineProperty.default)(WS.prototype, "protocol", {
|
26748 | get: function get() {
|
26749 | return this._protocol;
|
26750 | },
|
26751 | enumerable: false,
|
26752 | configurable: true
|
26753 | });
|
26754 | (0, _defineProperty.default)(WS.prototype, "readyState", {
|
26755 | get: function get() {
|
26756 | return this._readyState;
|
26757 | },
|
26758 | enumerable: false,
|
26759 | configurable: true
|
26760 | });
|
26761 | WS.CONNECTING = 0;
|
26762 | WS.OPEN = 1;
|
26763 | WS.CLOSING = 2;
|
26764 | WS.CLOSED = 3;
|
26765 | return WS;
|
26766 | }(EventTarget("open", "error", "message", "close"));
|
26767 |
|
26768 | var WechatWS =
|
26769 |
|
26770 | function (_super) {
|
26771 | __extends$1(WechatWS, _super);
|
26772 |
|
26773 | function WechatWS(url, protocol) {
|
26774 | var _this = _super.call(this, url, protocol) || this;
|
26775 |
|
26776 | if (protocol && !(wx.canIUse && wx.canIUse("connectSocket.object.protocols"))) {
|
26777 | throw new Error("subprotocol not supported in weapp");
|
26778 | }
|
26779 |
|
26780 | _this._readyState = WS.CONNECTING;
|
26781 |
|
26782 | var errorHandler = function errorHandler(event) {
|
26783 | _this._readyState = WS.CLOSED;
|
26784 |
|
26785 | _this.dispatchEvent({
|
26786 | type: "error",
|
26787 | message: event.errMsg
|
26788 | });
|
26789 | };
|
26790 |
|
26791 | var socketTask = wx.connectSocket({
|
26792 | url: url,
|
26793 | protocols: _this._protocol === undefined || Array.isArray(_this._protocol) ? _this._protocol : [_this._protocol],
|
26794 | fail: function fail(error) {
|
26795 | return setTimeout(function () {
|
26796 | return errorHandler(error);
|
26797 | }, 0);
|
26798 | }
|
26799 | });
|
26800 | _this._socketTask = socketTask;
|
26801 | socketTask.onOpen(function () {
|
26802 | _this._readyState = WS.OPEN;
|
26803 |
|
26804 | _this.dispatchEvent({
|
26805 | type: "open"
|
26806 | });
|
26807 | });
|
26808 | socketTask.onError(errorHandler);
|
26809 | socketTask.onMessage(function (event) {
|
26810 | var data = event.data;
|
26811 |
|
26812 | _this.dispatchEvent({
|
26813 | data: data,
|
26814 | type: "message"
|
26815 | });
|
26816 | });
|
26817 | socketTask.onClose(function (event) {
|
26818 | _this._readyState = WS.CLOSED;
|
26819 | var code = event.code,
|
26820 | reason = event.reason;
|
26821 |
|
26822 | _this.dispatchEvent({
|
26823 | code: code,
|
26824 | reason: reason,
|
26825 | type: "close"
|
26826 | });
|
26827 | });
|
26828 | return _this;
|
26829 | }
|
26830 |
|
26831 | WechatWS.prototype.close = function () {
|
26832 | if (this.readyState === WS.CLOSED) return;
|
26833 |
|
26834 | if (this.readyState === WS.CONNECTING) {
|
26835 | console.warn("close WebSocket which is connecting might not work");
|
26836 | }
|
26837 |
|
26838 | this._socketTask.close({});
|
26839 | };
|
26840 |
|
26841 | WechatWS.prototype.send = function (data) {
|
26842 | if (this.readyState !== WS.OPEN) {
|
26843 | throw new Error("INVALID_STATE_ERR");
|
26844 | }
|
26845 |
|
26846 | if (!(typeof data === "string" || data instanceof ArrayBuffer)) {
|
26847 | throw new TypeError("only String/ArrayBuffer supported");
|
26848 | }
|
26849 |
|
26850 | this._socketTask.send({
|
26851 | data: data
|
26852 | });
|
26853 | };
|
26854 |
|
26855 | return WechatWS;
|
26856 | }(WS);
|
26857 |
|
26858 | var WebSocket = WechatWS;
|
26859 | var platformInfo = {
|
26860 | name: "Weapp"
|
26861 | };
|
26862 | exports.WebSocket = WebSocket;
|
26863 | exports.getAuthInfo = getAuthInfo;
|
26864 | exports.platformInfo = platformInfo;
|
26865 | exports.request = request;
|
26866 | exports.storage = storage;
|
26867 | exports.upload = upload;
|
26868 |
|
26869 | }),
|
26870 |
|
26871 | (function(module, exports, __webpack_require__) {
|
26872 |
|
26873 | module.exports = __webpack_require__(548);
|
26874 |
|
26875 | }),
|
26876 |
|
26877 | (function(module, exports, __webpack_require__) {
|
26878 |
|
26879 | var parent = __webpack_require__(549);
|
26880 |
|
26881 | module.exports = parent;
|
26882 |
|
26883 |
|
26884 | }),
|
26885 |
|
26886 | (function(module, exports, __webpack_require__) {
|
26887 |
|
26888 | __webpack_require__(550);
|
26889 | var path = __webpack_require__(10);
|
26890 |
|
26891 | module.exports = path.Object.assign;
|
26892 |
|
26893 |
|
26894 | }),
|
26895 |
|
26896 | (function(module, exports, __webpack_require__) {
|
26897 |
|
26898 | var $ = __webpack_require__(0);
|
26899 | var assign = __webpack_require__(551);
|
26900 |
|
26901 |
|
26902 |
|
26903 |
|
26904 | $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
26905 | assign: assign
|
26906 | });
|
26907 |
|
26908 |
|
26909 | }),
|
26910 |
|
26911 | (function(module, exports, __webpack_require__) {
|
26912 |
|
26913 | "use strict";
|
26914 |
|
26915 | var DESCRIPTORS = __webpack_require__(16);
|
26916 | var uncurryThis = __webpack_require__(4);
|
26917 | var call = __webpack_require__(13);
|
26918 | var fails = __webpack_require__(3);
|
26919 | var objectKeys = __webpack_require__(98);
|
26920 | var getOwnPropertySymbolsModule = __webpack_require__(97);
|
26921 | var propertyIsEnumerableModule = __webpack_require__(113);
|
26922 | var toObject = __webpack_require__(34);
|
26923 | var IndexedObject = __webpack_require__(114);
|
26924 |
|
26925 |
|
26926 | var $assign = Object.assign;
|
26927 |
|
26928 | var defineProperty = Object.defineProperty;
|
26929 | var concat = uncurryThis([].concat);
|
26930 |
|
26931 |
|
26932 |
|
26933 | module.exports = !$assign || fails(function () {
|
26934 |
|
26935 | if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
26936 | enumerable: true,
|
26937 | get: function () {
|
26938 | defineProperty(this, 'b', {
|
26939 | value: 3,
|
26940 | enumerable: false
|
26941 | });
|
26942 | }
|
26943 | }), { b: 2 })).b !== 1) return true;
|
26944 |
|
26945 | var A = {};
|
26946 | var B = {};
|
26947 |
|
26948 | var symbol = Symbol();
|
26949 | var alphabet = 'abcdefghijklmnopqrst';
|
26950 | A[symbol] = 7;
|
26951 | alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
26952 | return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
|
26953 | }) ? function assign(target, source) {
|
26954 | var T = toObject(target);
|
26955 | var argumentsLength = arguments.length;
|
26956 | var index = 1;
|
26957 | var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
26958 | var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
26959 | while (argumentsLength > index) {
|
26960 | var S = IndexedObject(arguments[index++]);
|
26961 | var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
26962 | var length = keys.length;
|
26963 | var j = 0;
|
26964 | var key;
|
26965 | while (length > j) {
|
26966 | key = keys[j++];
|
26967 | if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
|
26968 | }
|
26969 | } return T;
|
26970 | } : $assign;
|
26971 |
|
26972 |
|
26973 | }),
|
26974 |
|
26975 | (function(module, exports, __webpack_require__) {
|
26976 |
|
26977 | module.exports = __webpack_require__(553);
|
26978 |
|
26979 | }),
|
26980 |
|
26981 | (function(module, exports, __webpack_require__) {
|
26982 |
|
26983 | var parent = __webpack_require__(554);
|
26984 |
|
26985 | module.exports = parent;
|
26986 |
|
26987 |
|
26988 | }),
|
26989 |
|
26990 | (function(module, exports, __webpack_require__) {
|
26991 |
|
26992 | __webpack_require__(233);
|
26993 | var path = __webpack_require__(10);
|
26994 |
|
26995 | module.exports = path.Object.getOwnPropertySymbols;
|
26996 |
|
26997 |
|
26998 | }),
|
26999 |
|
27000 | (function(module, exports, __webpack_require__) {
|
27001 |
|
27002 | module.exports = __webpack_require__(238);
|
27003 |
|
27004 | }),
|
27005 |
|
27006 | (function(module, exports, __webpack_require__) {
|
27007 |
|
27008 | module.exports = __webpack_require__(557);
|
27009 |
|
27010 | }),
|
27011 |
|
27012 | (function(module, exports, __webpack_require__) {
|
27013 |
|
27014 | var parent = __webpack_require__(558);
|
27015 | __webpack_require__(51);
|
27016 |
|
27017 | module.exports = parent;
|
27018 |
|
27019 |
|
27020 | }),
|
27021 |
|
27022 | (function(module, exports, __webpack_require__) {
|
27023 |
|
27024 | __webpack_require__(48);
|
27025 | __webpack_require__(60);
|
27026 | __webpack_require__(559);
|
27027 | var path = __webpack_require__(10);
|
27028 |
|
27029 | module.exports = path.WeakMap;
|
27030 |
|
27031 |
|
27032 | }),
|
27033 |
|
27034 | (function(module, exports, __webpack_require__) {
|
27035 |
|
27036 |
|
27037 | __webpack_require__(560);
|
27038 |
|
27039 |
|
27040 | }),
|
27041 |
|
27042 | (function(module, exports, __webpack_require__) {
|
27043 |
|
27044 | "use strict";
|
27045 |
|
27046 | var global = __webpack_require__(6);
|
27047 | var uncurryThis = __webpack_require__(4);
|
27048 | var defineBuiltIns = __webpack_require__(146);
|
27049 | var InternalMetadataModule = __webpack_require__(111);
|
27050 | var collection = __webpack_require__(248);
|
27051 | var collectionWeak = __webpack_require__(563);
|
27052 | var isObject = __webpack_require__(11);
|
27053 | var isExtensible = __webpack_require__(247);
|
27054 | var enforceInternalState = __webpack_require__(38).enforce;
|
27055 | var NATIVE_WEAK_MAP = __webpack_require__(160);
|
27056 |
|
27057 | var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
|
27058 | var InternalWeakMap;
|
27059 |
|
27060 | var wrapper = function (init) {
|
27061 | return function WeakMap() {
|
27062 | return init(this, arguments.length ? arguments[0] : undefined);
|
27063 | };
|
27064 | };
|
27065 |
|
27066 |
|
27067 |
|
27068 | var $WeakMap = collection('WeakMap', wrapper, collectionWeak);
|
27069 |
|
27070 |
|
27071 |
|
27072 |
|
27073 | if (NATIVE_WEAK_MAP && IS_IE11) {
|
27074 | InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);
|
27075 | InternalMetadataModule.enable();
|
27076 | var WeakMapPrototype = $WeakMap.prototype;
|
27077 | var nativeDelete = uncurryThis(WeakMapPrototype['delete']);
|
27078 | var nativeHas = uncurryThis(WeakMapPrototype.has);
|
27079 | var nativeGet = uncurryThis(WeakMapPrototype.get);
|
27080 | var nativeSet = uncurryThis(WeakMapPrototype.set);
|
27081 | defineBuiltIns(WeakMapPrototype, {
|
27082 | 'delete': function (key) {
|
27083 | if (isObject(key) && !isExtensible(key)) {
|
27084 | var state = enforceInternalState(this);
|
27085 | if (!state.frozen) state.frozen = new InternalWeakMap();
|
27086 | return nativeDelete(this, key) || state.frozen['delete'](key);
|
27087 | } return nativeDelete(this, key);
|
27088 | },
|
27089 | has: function has(key) {
|
27090 | if (isObject(key) && !isExtensible(key)) {
|
27091 | var state = enforceInternalState(this);
|
27092 | if (!state.frozen) state.frozen = new InternalWeakMap();
|
27093 | return nativeHas(this, key) || state.frozen.has(key);
|
27094 | } return nativeHas(this, key);
|
27095 | },
|
27096 | get: function get(key) {
|
27097 | if (isObject(key) && !isExtensible(key)) {
|
27098 | var state = enforceInternalState(this);
|
27099 | if (!state.frozen) state.frozen = new InternalWeakMap();
|
27100 | return nativeHas(this, key) ? nativeGet(this, key) : state.frozen.get(key);
|
27101 | } return nativeGet(this, key);
|
27102 | },
|
27103 | set: function set(key, value) {
|
27104 | if (isObject(key) && !isExtensible(key)) {
|
27105 | var state = enforceInternalState(this);
|
27106 | if (!state.frozen) state.frozen = new InternalWeakMap();
|
27107 | nativeHas(this, key) ? nativeSet(this, key, value) : state.frozen.set(key, value);
|
27108 | } else nativeSet(this, key, value);
|
27109 | return this;
|
27110 | }
|
27111 | });
|
27112 | }
|
27113 |
|
27114 |
|
27115 | }),
|
27116 |
|
27117 | (function(module, exports, __webpack_require__) {
|
27118 |
|
27119 |
|
27120 | var fails = __webpack_require__(3);
|
27121 |
|
27122 | module.exports = fails(function () {
|
27123 | if (typeof ArrayBuffer == 'function') {
|
27124 | var buffer = new ArrayBuffer(8);
|
27125 |
|
27126 | if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });
|
27127 | }
|
27128 | });
|
27129 |
|
27130 |
|
27131 | }),
|
27132 |
|
27133 | (function(module, exports, __webpack_require__) {
|
27134 |
|
27135 | var fails = __webpack_require__(3);
|
27136 |
|
27137 | module.exports = !fails(function () {
|
27138 |
|
27139 | return Object.isExtensible(Object.preventExtensions({}));
|
27140 | });
|
27141 |
|
27142 |
|
27143 | }),
|
27144 |
|
27145 | (function(module, exports, __webpack_require__) {
|
27146 |
|
27147 | "use strict";
|
27148 |
|
27149 | var uncurryThis = __webpack_require__(4);
|
27150 | var defineBuiltIns = __webpack_require__(146);
|
27151 | var getWeakData = __webpack_require__(111).getWeakData;
|
27152 | var anObject = __webpack_require__(19);
|
27153 | var isObject = __webpack_require__(11);
|
27154 | var anInstance = __webpack_require__(100);
|
27155 | var iterate = __webpack_require__(37);
|
27156 | var ArrayIterationModule = __webpack_require__(66);
|
27157 | var hasOwn = __webpack_require__(14);
|
27158 | var InternalStateModule = __webpack_require__(38);
|
27159 |
|
27160 | var setInternalState = InternalStateModule.set;
|
27161 | var internalStateGetterFor = InternalStateModule.getterFor;
|
27162 | var find = ArrayIterationModule.find;
|
27163 | var findIndex = ArrayIterationModule.findIndex;
|
27164 | var splice = uncurryThis([].splice);
|
27165 | var id = 0;
|
27166 |
|
27167 |
|
27168 | var uncaughtFrozenStore = function (store) {
|
27169 | return store.frozen || (store.frozen = new UncaughtFrozenStore());
|
27170 | };
|
27171 |
|
27172 | var UncaughtFrozenStore = function () {
|
27173 | this.entries = [];
|
27174 | };
|
27175 |
|
27176 | var findUncaughtFrozen = function (store, key) {
|
27177 | return find(store.entries, function (it) {
|
27178 | return it[0] === key;
|
27179 | });
|
27180 | };
|
27181 |
|
27182 | UncaughtFrozenStore.prototype = {
|
27183 | get: function (key) {
|
27184 | var entry = findUncaughtFrozen(this, key);
|
27185 | if (entry) return entry[1];
|
27186 | },
|
27187 | has: function (key) {
|
27188 | return !!findUncaughtFrozen(this, key);
|
27189 | },
|
27190 | set: function (key, value) {
|
27191 | var entry = findUncaughtFrozen(this, key);
|
27192 | if (entry) entry[1] = value;
|
27193 | else this.entries.push([key, value]);
|
27194 | },
|
27195 | 'delete': function (key) {
|
27196 | var index = findIndex(this.entries, function (it) {
|
27197 | return it[0] === key;
|
27198 | });
|
27199 | if (~index) splice(this.entries, index, 1);
|
27200 | return !!~index;
|
27201 | }
|
27202 | };
|
27203 |
|
27204 | module.exports = {
|
27205 | getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
|
27206 | var Constructor = wrapper(function (that, iterable) {
|
27207 | anInstance(that, Prototype);
|
27208 | setInternalState(that, {
|
27209 | type: CONSTRUCTOR_NAME,
|
27210 | id: id++,
|
27211 | frozen: undefined
|
27212 | });
|
27213 | if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
27214 | });
|
27215 |
|
27216 | var Prototype = Constructor.prototype;
|
27217 |
|
27218 | var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
27219 |
|
27220 | var define = function (that, key, value) {
|
27221 | var state = getInternalState(that);
|
27222 | var data = getWeakData(anObject(key), true);
|
27223 | if (data === true) uncaughtFrozenStore(state).set(key, value);
|
27224 | else data[state.id] = value;
|
27225 | return that;
|
27226 | };
|
27227 |
|
27228 | defineBuiltIns(Prototype, {
|
27229 |
|
27230 |
|
27231 |
|
27232 | 'delete': function (key) {
|
27233 | var state = getInternalState(this);
|
27234 | if (!isObject(key)) return false;
|
27235 | var data = getWeakData(key);
|
27236 | if (data === true) return uncaughtFrozenStore(state)['delete'](key);
|
27237 | return data && hasOwn(data, state.id) && delete data[state.id];
|
27238 | },
|
27239 |
|
27240 |
|
27241 |
|
27242 | has: function has(key) {
|
27243 | var state = getInternalState(this);
|
27244 | if (!isObject(key)) return false;
|
27245 | var data = getWeakData(key);
|
27246 | if (data === true) return uncaughtFrozenStore(state).has(key);
|
27247 | return data && hasOwn(data, state.id);
|
27248 | }
|
27249 | });
|
27250 |
|
27251 | defineBuiltIns(Prototype, IS_MAP ? {
|
27252 |
|
27253 |
|
27254 | get: function get(key) {
|
27255 | var state = getInternalState(this);
|
27256 | if (isObject(key)) {
|
27257 | var data = getWeakData(key);
|
27258 | if (data === true) return uncaughtFrozenStore(state).get(key);
|
27259 | return data ? data[state.id] : undefined;
|
27260 | }
|
27261 | },
|
27262 |
|
27263 |
|
27264 | set: function set(key, value) {
|
27265 | return define(this, key, value);
|
27266 | }
|
27267 | } : {
|
27268 |
|
27269 |
|
27270 | add: function add(value) {
|
27271 | return define(this, value, true);
|
27272 | }
|
27273 | });
|
27274 |
|
27275 | return Constructor;
|
27276 | }
|
27277 | };
|
27278 |
|
27279 |
|
27280 | }),
|
27281 |
|
27282 | (function(module, exports, __webpack_require__) {
|
27283 |
|
27284 | module.exports = __webpack_require__(565);
|
27285 |
|
27286 | }),
|
27287 |
|
27288 | (function(module, exports, __webpack_require__) {
|
27289 |
|
27290 | var parent = __webpack_require__(566);
|
27291 | __webpack_require__(51);
|
27292 |
|
27293 | module.exports = parent;
|
27294 |
|
27295 |
|
27296 | }),
|
27297 |
|
27298 | (function(module, exports, __webpack_require__) {
|
27299 |
|
27300 | __webpack_require__(48);
|
27301 | __webpack_require__(567);
|
27302 | __webpack_require__(60);
|
27303 | __webpack_require__(78);
|
27304 | var path = __webpack_require__(10);
|
27305 |
|
27306 | module.exports = path.Map;
|
27307 |
|
27308 |
|
27309 | }),
|
27310 |
|
27311 | (function(module, exports, __webpack_require__) {
|
27312 |
|
27313 |
|
27314 | __webpack_require__(568);
|
27315 |
|
27316 |
|
27317 | }),
|
27318 |
|
27319 | (function(module, exports, __webpack_require__) {
|
27320 |
|
27321 | "use strict";
|
27322 |
|
27323 | var collection = __webpack_require__(248);
|
27324 | var collectionStrong = __webpack_require__(569);
|
27325 |
|
27326 |
|
27327 |
|
27328 | collection('Map', function (init) {
|
27329 | return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
|
27330 | }, collectionStrong);
|
27331 |
|
27332 |
|
27333 | }),
|
27334 |
|
27335 | (function(module, exports, __webpack_require__) {
|
27336 |
|
27337 | "use strict";
|
27338 |
|
27339 | var defineProperty = __webpack_require__(22).f;
|
27340 | var create = __webpack_require__(47);
|
27341 | var defineBuiltIns = __webpack_require__(146);
|
27342 | var bind = __webpack_require__(45);
|
27343 | var anInstance = __webpack_require__(100);
|
27344 | var iterate = __webpack_require__(37);
|
27345 | var defineIterator = __webpack_require__(124);
|
27346 | var setSpecies = __webpack_require__(162);
|
27347 | var DESCRIPTORS = __webpack_require__(16);
|
27348 | var fastKey = __webpack_require__(111).fastKey;
|
27349 | var InternalStateModule = __webpack_require__(38);
|
27350 |
|
27351 | var setInternalState = InternalStateModule.set;
|
27352 | var internalStateGetterFor = InternalStateModule.getterFor;
|
27353 |
|
27354 | module.exports = {
|
27355 | getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
|
27356 | var Constructor = wrapper(function (that, iterable) {
|
27357 | anInstance(that, Prototype);
|
27358 | setInternalState(that, {
|
27359 | type: CONSTRUCTOR_NAME,
|
27360 | index: create(null),
|
27361 | first: undefined,
|
27362 | last: undefined,
|
27363 | size: 0
|
27364 | });
|
27365 | if (!DESCRIPTORS) that.size = 0;
|
27366 | if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
27367 | });
|
27368 |
|
27369 | var Prototype = Constructor.prototype;
|
27370 |
|
27371 | var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
27372 |
|
27373 | var define = function (that, key, value) {
|
27374 | var state = getInternalState(that);
|
27375 | var entry = getEntry(that, key);
|
27376 | var previous, index;
|
27377 |
|
27378 | if (entry) {
|
27379 | entry.value = value;
|
27380 |
|
27381 | } else {
|
27382 | state.last = entry = {
|
27383 | index: index = fastKey(key, true),
|
27384 | key: key,
|
27385 | value: value,
|
27386 | previous: previous = state.last,
|
27387 | next: undefined,
|
27388 | removed: false
|
27389 | };
|
27390 | if (!state.first) state.first = entry;
|
27391 | if (previous) previous.next = entry;
|
27392 | if (DESCRIPTORS) state.size++;
|
27393 | else that.size++;
|
27394 |
|
27395 | if (index !== 'F') state.index[index] = entry;
|
27396 | } return that;
|
27397 | };
|
27398 |
|
27399 | var getEntry = function (that, key) {
|
27400 | var state = getInternalState(that);
|
27401 |
|
27402 | var index = fastKey(key);
|
27403 | var entry;
|
27404 | if (index !== 'F') return state.index[index];
|
27405 |
|
27406 | for (entry = state.first; entry; entry = entry.next) {
|
27407 | if (entry.key == key) return entry;
|
27408 | }
|
27409 | };
|
27410 |
|
27411 | defineBuiltIns(Prototype, {
|
27412 |
|
27413 |
|
27414 |
|
27415 | clear: function clear() {
|
27416 | var that = this;
|
27417 | var state = getInternalState(that);
|
27418 | var data = state.index;
|
27419 | var entry = state.first;
|
27420 | while (entry) {
|
27421 | entry.removed = true;
|
27422 | if (entry.previous) entry.previous = entry.previous.next = undefined;
|
27423 | delete data[entry.index];
|
27424 | entry = entry.next;
|
27425 | }
|
27426 | state.first = state.last = undefined;
|
27427 | if (DESCRIPTORS) state.size = 0;
|
27428 | else that.size = 0;
|
27429 | },
|
27430 |
|
27431 |
|
27432 |
|
27433 | 'delete': function (key) {
|
27434 | var that = this;
|
27435 | var state = getInternalState(that);
|
27436 | var entry = getEntry(that, key);
|
27437 | if (entry) {
|
27438 | var next = entry.next;
|
27439 | var prev = entry.previous;
|
27440 | delete state.index[entry.index];
|
27441 | entry.removed = true;
|
27442 | if (prev) prev.next = next;
|
27443 | if (next) next.previous = prev;
|
27444 | if (state.first == entry) state.first = next;
|
27445 | if (state.last == entry) state.last = prev;
|
27446 | if (DESCRIPTORS) state.size--;
|
27447 | else that.size--;
|
27448 | } return !!entry;
|
27449 | },
|
27450 |
|
27451 |
|
27452 |
|
27453 | forEach: function forEach(callbackfn /* , that = undefined */) {
|
27454 | var state = getInternalState(this);
|
27455 | var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
27456 | var entry;
|
27457 | while (entry = entry ? entry.next : state.first) {
|
27458 | boundFunction(entry.value, entry.key, this);
|
27459 |
|
27460 | while (entry && entry.removed) entry = entry.previous;
|
27461 | }
|
27462 | },
|
27463 |
|
27464 |
|
27465 |
|
27466 | has: function has(key) {
|
27467 | return !!getEntry(this, key);
|
27468 | }
|
27469 | });
|
27470 |
|
27471 | defineBuiltIns(Prototype, IS_MAP ? {
|
27472 |
|
27473 |
|
27474 | get: function get(key) {
|
27475 | var entry = getEntry(this, key);
|
27476 | return entry && entry.value;
|
27477 | },
|
27478 |
|
27479 |
|
27480 | set: function set(key, value) {
|
27481 | return define(this, key === 0 ? 0 : key, value);
|
27482 | }
|
27483 | } : {
|
27484 |
|
27485 |
|
27486 | add: function add(value) {
|
27487 | return define(this, value = value === 0 ? 0 : value, value);
|
27488 | }
|
27489 | });
|
27490 | if (DESCRIPTORS) defineProperty(Prototype, 'size', {
|
27491 | get: function () {
|
27492 | return getInternalState(this).size;
|
27493 | }
|
27494 | });
|
27495 | return Constructor;
|
27496 | },
|
27497 | setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) {
|
27498 | var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
|
27499 | var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
27500 | var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
|
27501 |
|
27502 |
|
27503 |
|
27504 |
|
27505 |
|
27506 |
|
27507 |
|
27508 |
|
27509 |
|
27510 | defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {
|
27511 | setInternalState(this, {
|
27512 | type: ITERATOR_NAME,
|
27513 | target: iterated,
|
27514 | state: getInternalCollectionState(iterated),
|
27515 | kind: kind,
|
27516 | last: undefined
|
27517 | });
|
27518 | }, function () {
|
27519 | var state = getInternalIteratorState(this);
|
27520 | var kind = state.kind;
|
27521 | var entry = state.last;
|
27522 |
|
27523 | while (entry && entry.removed) entry = entry.previous;
|
27524 |
|
27525 | if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
|
27526 |
|
27527 | state.target = undefined;
|
27528 | return { value: undefined, done: true };
|
27529 | }
|
27530 |
|
27531 | if (kind == 'keys') return { value: entry.key, done: false };
|
27532 | if (kind == 'values') return { value: entry.value, done: false };
|
27533 | return { value: [entry.key, entry.value], done: false };
|
27534 | }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
|
27535 |
|
27536 |
|
27537 |
|
27538 |
|
27539 | setSpecies(CONSTRUCTOR_NAME);
|
27540 | }
|
27541 | };
|
27542 |
|
27543 |
|
27544 | })
|
27545 | ]);
|
27546 | });
|
27547 |
|
\ | No newline at end of file |