1 | (function(modules) {
|
2 |
|
3 | var installedModules = {};
|
4 |
|
5 |
|
6 | function __webpack_require__(moduleId) {
|
7 |
|
8 |
|
9 | if(installedModules[moduleId]) {
|
10 | return installedModules[moduleId].exports;
|
11 | }
|
12 |
|
13 | var module = installedModules[moduleId] = {
|
14 | i: moduleId,
|
15 | l: false,
|
16 | exports: {}
|
17 | };
|
18 |
|
19 |
|
20 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
|
22 |
|
23 | module.l = true;
|
24 |
|
25 |
|
26 | return module.exports;
|
27 | }
|
28 |
|
29 |
|
30 |
|
31 | __webpack_require__.m = modules;
|
32 |
|
33 |
|
34 | __webpack_require__.c = installedModules;
|
35 |
|
36 |
|
37 | __webpack_require__.d = function(exports, name, getter) {
|
38 | if(!__webpack_require__.o(exports, name)) {
|
39 | Object.defineProperty(exports, name, {
|
40 | configurable: false,
|
41 | enumerable: true,
|
42 | get: getter
|
43 | /******/ });
|
44 | /******/ }
|
45 | /******/ };
|
46 | /******/
|
47 | /******/ // getDefaultExport function for compatibility with non-harmony modules
|
48 | /******/ __webpack_require__.n = function(module) {
|
49 | var getter = module && module.__esModule ?
|
50 | function getDefault() { return module['default']; } :
|
51 | function getModuleExports() { return module; };
|
52 | __webpack_require__.d(getter, 'a', getter);
|
53 | return getter;
|
54 | };
|
55 |
|
56 |
|
57 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
58 |
|
59 |
|
60 | __webpack_require__.p = "";
|
61 |
|
62 |
|
63 | return __webpack_require__(__webpack_require__.s = 89);
|
64 | })
|
65 |
|
66 | ([
|
67 |
|
68 | (function(module, exports) {
|
69 |
|
70 |
|
71 | var process = module.exports = {};
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 | var cachedSetTimeout;
|
79 | var cachedClearTimeout;
|
80 |
|
81 | function defaultSetTimout() {
|
82 | throw new Error('setTimeout has not been defined');
|
83 | }
|
84 | function defaultClearTimeout () {
|
85 | throw new Error('clearTimeout has not been defined');
|
86 | }
|
87 | (function () {
|
88 | try {
|
89 | if (typeof setTimeout === 'function') {
|
90 | cachedSetTimeout = setTimeout;
|
91 | } else {
|
92 | cachedSetTimeout = defaultSetTimout;
|
93 | }
|
94 | } catch (e) {
|
95 | cachedSetTimeout = defaultSetTimout;
|
96 | }
|
97 | try {
|
98 | if (typeof clearTimeout === 'function') {
|
99 | cachedClearTimeout = clearTimeout;
|
100 | } else {
|
101 | cachedClearTimeout = defaultClearTimeout;
|
102 | }
|
103 | } catch (e) {
|
104 | cachedClearTimeout = defaultClearTimeout;
|
105 | }
|
106 | } ())
|
107 | function runTimeout(fun) {
|
108 | if (cachedSetTimeout === setTimeout) {
|
109 |
|
110 | return setTimeout(fun, 0);
|
111 | }
|
112 |
|
113 | if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
114 | cachedSetTimeout = setTimeout;
|
115 | return setTimeout(fun, 0);
|
116 | }
|
117 | try {
|
118 |
|
119 | return cachedSetTimeout(fun, 0);
|
120 | } catch(e){
|
121 | try {
|
122 |
|
123 | return cachedSetTimeout.call(null, fun, 0);
|
124 | } catch(e){
|
125 |
|
126 | return cachedSetTimeout.call(this, fun, 0);
|
127 | }
|
128 | }
|
129 |
|
130 |
|
131 | }
|
132 | function runClearTimeout(marker) {
|
133 | if (cachedClearTimeout === clearTimeout) {
|
134 |
|
135 | return clearTimeout(marker);
|
136 | }
|
137 |
|
138 | if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
139 | cachedClearTimeout = clearTimeout;
|
140 | return clearTimeout(marker);
|
141 | }
|
142 | try {
|
143 |
|
144 | return cachedClearTimeout(marker);
|
145 | } catch (e){
|
146 | try {
|
147 |
|
148 | return cachedClearTimeout.call(null, marker);
|
149 | } catch (e){
|
150 |
|
151 |
|
152 | return cachedClearTimeout.call(this, marker);
|
153 | }
|
154 | }
|
155 |
|
156 |
|
157 |
|
158 | }
|
159 | var queue = [];
|
160 | var draining = false;
|
161 | var currentQueue;
|
162 | var queueIndex = -1;
|
163 |
|
164 | function cleanUpNextTick() {
|
165 | if (!draining || !currentQueue) {
|
166 | return;
|
167 | }
|
168 | draining = false;
|
169 | if (currentQueue.length) {
|
170 | queue = currentQueue.concat(queue);
|
171 | } else {
|
172 | queueIndex = -1;
|
173 | }
|
174 | if (queue.length) {
|
175 | drainQueue();
|
176 | }
|
177 | }
|
178 |
|
179 | function drainQueue() {
|
180 | if (draining) {
|
181 | return;
|
182 | }
|
183 | var timeout = runTimeout(cleanUpNextTick);
|
184 | draining = true;
|
185 |
|
186 | var len = queue.length;
|
187 | while(len) {
|
188 | currentQueue = queue;
|
189 | queue = [];
|
190 | while (++queueIndex < len) {
|
191 | if (currentQueue) {
|
192 | currentQueue[queueIndex].run();
|
193 | }
|
194 | }
|
195 | queueIndex = -1;
|
196 | len = queue.length;
|
197 | }
|
198 | currentQueue = null;
|
199 | draining = false;
|
200 | runClearTimeout(timeout);
|
201 | }
|
202 |
|
203 | process.nextTick = function (fun) {
|
204 | var args = new Array(arguments.length - 1);
|
205 | if (arguments.length > 1) {
|
206 | for (var i = 1; i < arguments.length; i++) {
|
207 | args[i - 1] = arguments[i];
|
208 | }
|
209 | }
|
210 | queue.push(new Item(fun, args));
|
211 | if (queue.length === 1 && !draining) {
|
212 | runTimeout(drainQueue);
|
213 | }
|
214 | };
|
215 |
|
216 |
|
217 | function Item(fun, array) {
|
218 | this.fun = fun;
|
219 | this.array = array;
|
220 | }
|
221 | Item.prototype.run = function () {
|
222 | this.fun.apply(null, this.array);
|
223 | };
|
224 | process.title = 'browser';
|
225 | process.browser = true;
|
226 | process.env = {};
|
227 | process.argv = [];
|
228 | process.version = '';
|
229 | process.versions = {};
|
230 |
|
231 | function noop() {}
|
232 |
|
233 | process.on = noop;
|
234 | process.addListener = noop;
|
235 | process.once = noop;
|
236 | process.off = noop;
|
237 | process.removeListener = noop;
|
238 | process.removeAllListeners = noop;
|
239 | process.emit = noop;
|
240 | process.prependListener = noop;
|
241 | process.prependOnceListener = noop;
|
242 |
|
243 | process.listeners = function (name) { return [] }
|
244 |
|
245 | process.binding = function (name) {
|
246 | throw new Error('process.binding is not supported');
|
247 | };
|
248 |
|
249 | process.cwd = function () { return '/' };
|
250 | process.chdir = function (dir) {
|
251 | throw new Error('process.chdir is not supported');
|
252 | };
|
253 | process.umask = function() { return 0; };
|
254 |
|
255 |
|
256 | }),
|
257 |
|
258 | (function(module, exports, __webpack_require__) {
|
259 |
|
260 | "use strict";
|
261 | (function(process) { |
262 |
|
263 |
|
264 |
|
265 |
|
266 |
|
267 |
|
268 |
|
269 |
|
270 |
|
271 |
|
272 |
|
273 |
|
274 |
|
275 |
|
276 |
|
277 |
|
278 |
|
279 |
|
280 |
|
281 |
|
282 |
|
283 |
|
284 | var validateFormat = function validateFormat(format) {};
|
285 |
|
286 | if (process.env.NODE_ENV !== 'production') {
|
287 | validateFormat = function validateFormat(format) {
|
288 | if (format === undefined) {
|
289 | throw new Error('invariant requires an error message argument');
|
290 | }
|
291 | };
|
292 | }
|
293 |
|
294 | function invariant(condition, format, a, b, c, d, e, f) {
|
295 | validateFormat(format);
|
296 |
|
297 | if (!condition) {
|
298 | var error;
|
299 | if (format === undefined) {
|
300 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
301 | } else {
|
302 | var args = [a, b, c, d, e, f];
|
303 | var argIndex = 0;
|
304 | error = new Error(format.replace(/%s/g, function () {
|
305 | return args[argIndex++];
|
306 | }));
|
307 | error.name = 'Invariant Violation';
|
308 | }
|
309 |
|
310 | error.framesToPop = 1;
|
311 | throw error;
|
312 | }
|
313 | }
|
314 |
|
315 | module.exports = invariant;
|
316 | }.call(exports, __webpack_require__(0)))
|
317 |
|
318 | }),
|
319 |
|
320 | (function(module, exports, __webpack_require__) {
|
321 |
|
322 | "use strict";
|
323 | (function(process) { |
324 |
|
325 |
|
326 |
|
327 |
|
328 |
|
329 |
|
330 |
|
331 |
|
332 |
|
333 |
|
334 |
|
335 | var emptyFunction = __webpack_require__(8);
|
336 |
|
337 |
|
338 |
|
339 |
|
340 |
|
341 |
|
342 |
|
343 |
|
344 | var warning = emptyFunction;
|
345 |
|
346 | if (process.env.NODE_ENV !== 'production') {
|
347 | var printWarning = function printWarning(format) {
|
348 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
349 | args[_key - 1] = arguments[_key];
|
350 | }
|
351 |
|
352 | var argIndex = 0;
|
353 | var message = 'Warning: ' + format.replace(/%s/g, function () {
|
354 | return args[argIndex++];
|
355 | });
|
356 | if (typeof console !== 'undefined') {
|
357 | console.error(message);
|
358 | }
|
359 | try {
|
360 |
|
361 |
|
362 |
|
363 | throw new Error(message);
|
364 | } catch (x) {}
|
365 | };
|
366 |
|
367 | warning = function warning(condition, format) {
|
368 | if (format === undefined) {
|
369 | throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
370 | }
|
371 |
|
372 | if (format.indexOf('Failed Composite propType: ') === 0) {
|
373 | return;
|
374 | }
|
375 |
|
376 | if (!condition) {
|
377 | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
378 | args[_key2 - 2] = arguments[_key2];
|
379 | }
|
380 |
|
381 | printWarning.apply(undefined, [format].concat(args));
|
382 | }
|
383 | };
|
384 | }
|
385 |
|
386 | module.exports = warning;
|
387 | }.call(exports, __webpack_require__(0)))
|
388 |
|
389 | }),
|
390 |
|
391 | (function(module, exports, __webpack_require__) {
|
392 |
|
393 | "use strict";
|
394 |
|
395 |
|
396 |
|
397 |
|
398 |
|
399 |
|
400 |
|
401 |
|
402 |
|
403 |
|
404 |
|
405 |
|
406 |
|
407 |
|
408 |
|
409 |
|
410 |
|
411 |
|
412 |
|
413 | function reactProdInvariant(code) {
|
414 | var argCount = arguments.length - 1;
|
415 |
|
416 | var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
|
417 |
|
418 | for (var argIdx = 0; argIdx < argCount; argIdx++) {
|
419 | message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
|
420 | }
|
421 |
|
422 | message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
|
423 |
|
424 | var error = new Error(message);
|
425 | error.name = 'Invariant Violation';
|
426 | error.framesToPop = 1;
|
427 |
|
428 | throw error;
|
429 | }
|
430 |
|
431 | module.exports = reactProdInvariant;
|
432 |
|
433 | }),
|
434 |
|
435 | (function(module, exports, __webpack_require__) {
|
436 |
|
437 | "use strict";
|
438 |
|
439 |
|
440 |
|
441 |
|
442 |
|
443 |
|
444 |
|
445 |
|
446 | var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
447 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
448 | var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
449 |
|
450 | function toObject(val) {
|
451 | if (val === null || val === undefined) {
|
452 | throw new TypeError('Object.assign cannot be called with null or undefined');
|
453 | }
|
454 |
|
455 | return Object(val);
|
456 | }
|
457 |
|
458 | function shouldUseNative() {
|
459 | try {
|
460 | if (!Object.assign) {
|
461 | return false;
|
462 | }
|
463 |
|
464 |
|
465 |
|
466 |
|
467 | var test1 = new String('abc');
|
468 | test1[5] = 'de';
|
469 | if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
470 | return false;
|
471 | }
|
472 |
|
473 |
|
474 | var test2 = {};
|
475 | for (var i = 0; i < 10; i++) {
|
476 | test2['_' + String.fromCharCode(i)] = i;
|
477 | }
|
478 | var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
479 | return test2[n];
|
480 | });
|
481 | if (order2.join('') !== '0123456789') {
|
482 | return false;
|
483 | }
|
484 |
|
485 |
|
486 | var test3 = {};
|
487 | 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
488 | test3[letter] = letter;
|
489 | });
|
490 | if (Object.keys(Object.assign({}, test3)).join('') !==
|
491 | 'abcdefghijklmnopqrst') {
|
492 | return false;
|
493 | }
|
494 |
|
495 | return true;
|
496 | } catch (err) {
|
497 |
|
498 | return false;
|
499 | }
|
500 | }
|
501 |
|
502 | module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
503 | var from;
|
504 | var to = toObject(target);
|
505 | var symbols;
|
506 |
|
507 | for (var s = 1; s < arguments.length; s++) {
|
508 | from = Object(arguments[s]);
|
509 |
|
510 | for (var key in from) {
|
511 | if (hasOwnProperty.call(from, key)) {
|
512 | to[key] = from[key];
|
513 | }
|
514 | }
|
515 |
|
516 | if (getOwnPropertySymbols) {
|
517 | symbols = getOwnPropertySymbols(from);
|
518 | for (var i = 0; i < symbols.length; i++) {
|
519 | if (propIsEnumerable.call(from, symbols[i])) {
|
520 | to[symbols[i]] = from[symbols[i]];
|
521 | }
|
522 | }
|
523 | }
|
524 | }
|
525 |
|
526 | return to;
|
527 | };
|
528 |
|
529 |
|
530 | }),
|
531 |
|
532 | (function(module, exports, __webpack_require__) {
|
533 |
|
534 | "use strict";
|
535 | (function(process) { |
536 |
|
537 |
|
538 |
|
539 |
|
540 |
|
541 |
|
542 |
|
543 |
|
544 |
|
545 |
|
546 |
|
547 | var _prodInvariant = __webpack_require__(3);
|
548 |
|
549 | var DOMProperty = __webpack_require__(13);
|
550 | var ReactDOMComponentFlags = __webpack_require__(64);
|
551 |
|
552 | var invariant = __webpack_require__(1);
|
553 |
|
554 | var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
|
555 | var Flags = ReactDOMComponentFlags;
|
556 |
|
557 | var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);
|
558 |
|
559 |
|
560 |
|
561 |
|
562 | function shouldPrecacheNode(node, nodeID) {
|
563 | return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' ';
|
564 | }
|
565 |
|
566 |
|
567 |
|
568 |
|
569 |
|
570 |
|
571 |
|
572 |
|
573 | function getRenderedHostOrTextFromComponent(component) {
|
574 | var rendered;
|
575 | while (rendered = component._renderedComponent) {
|
576 | component = rendered;
|
577 | }
|
578 | return component;
|
579 | }
|
580 |
|
581 |
|
582 |
|
583 |
|
584 |
|
585 | function precacheNode(inst, node) {
|
586 | var hostInst = getRenderedHostOrTextFromComponent(inst);
|
587 | hostInst._hostNode = node;
|
588 | node[internalInstanceKey] = hostInst;
|
589 | }
|
590 |
|
591 | function uncacheNode(inst) {
|
592 | var node = inst._hostNode;
|
593 | if (node) {
|
594 | delete node[internalInstanceKey];
|
595 | inst._hostNode = null;
|
596 | }
|
597 | }
|
598 |
|
599 |
|
600 |
|
601 |
|
602 |
|
603 |
|
604 |
|
605 |
|
606 |
|
607 |
|
608 |
|
609 |
|
610 |
|
611 |
|
612 |
|
613 | function precacheChildNodes(inst, node) {
|
614 | if (inst._flags & Flags.hasCachedChildNodes) {
|
615 | return;
|
616 | }
|
617 | var children = inst._renderedChildren;
|
618 | var childNode = node.firstChild;
|
619 | outer: for (var name in children) {
|
620 | if (!children.hasOwnProperty(name)) {
|
621 | continue;
|
622 | }
|
623 | var childInst = children[name];
|
624 | var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
|
625 | if (childID === 0) {
|
626 |
|
627 | continue;
|
628 | }
|
629 |
|
630 | for (; childNode !== null; childNode = childNode.nextSibling) {
|
631 | if (shouldPrecacheNode(childNode, childID)) {
|
632 | precacheNode(childInst, childNode);
|
633 | continue outer;
|
634 | }
|
635 | }
|
636 |
|
637 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0;
|
638 | }
|
639 | inst._flags |= Flags.hasCachedChildNodes;
|
640 | }
|
641 |
|
642 |
|
643 |
|
644 |
|
645 |
|
646 | function getClosestInstanceFromNode(node) {
|
647 | if (node[internalInstanceKey]) {
|
648 | return node[internalInstanceKey];
|
649 | }
|
650 |
|
651 |
|
652 | var parents = [];
|
653 | while (!node[internalInstanceKey]) {
|
654 | parents.push(node);
|
655 | if (node.parentNode) {
|
656 | node = node.parentNode;
|
657 | } else {
|
658 |
|
659 |
|
660 | return null;
|
661 | }
|
662 | }
|
663 |
|
664 | var closest;
|
665 | var inst;
|
666 | for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {
|
667 | closest = inst;
|
668 | if (parents.length) {
|
669 | precacheChildNodes(inst, node);
|
670 | }
|
671 | }
|
672 |
|
673 | return closest;
|
674 | }
|
675 |
|
676 |
|
677 |
|
678 |
|
679 |
|
680 | function getInstanceFromNode(node) {
|
681 | var inst = getClosestInstanceFromNode(node);
|
682 | if (inst != null && inst._hostNode === node) {
|
683 | return inst;
|
684 | } else {
|
685 | return null;
|
686 | }
|
687 | }
|
688 |
|
689 |
|
690 |
|
691 |
|
692 |
|
693 | function getNodeFromInstance(inst) {
|
694 |
|
695 |
|
696 | !(inst._hostNode !== undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
|
697 |
|
698 | if (inst._hostNode) {
|
699 | return inst._hostNode;
|
700 | }
|
701 |
|
702 |
|
703 | var parents = [];
|
704 | while (!inst._hostNode) {
|
705 | parents.push(inst);
|
706 | !inst._hostParent ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0;
|
707 | inst = inst._hostParent;
|
708 | }
|
709 |
|
710 |
|
711 |
|
712 | for (; parents.length; inst = parents.pop()) {
|
713 | precacheChildNodes(inst, inst._hostNode);
|
714 | }
|
715 |
|
716 | return inst._hostNode;
|
717 | }
|
718 |
|
719 | var ReactDOMComponentTree = {
|
720 | getClosestInstanceFromNode: getClosestInstanceFromNode,
|
721 | getInstanceFromNode: getInstanceFromNode,
|
722 | getNodeFromInstance: getNodeFromInstance,
|
723 | precacheChildNodes: precacheChildNodes,
|
724 | precacheNode: precacheNode,
|
725 | uncacheNode: uncacheNode
|
726 | };
|
727 |
|
728 | module.exports = ReactDOMComponentTree;
|
729 | }.call(exports, __webpack_require__(0)))
|
730 |
|
731 | }),
|
732 |
|
733 | (function(module, exports, __webpack_require__) {
|
734 |
|
735 | "use strict";
|
736 |
|
737 |
|
738 |
|
739 |
|
740 |
|
741 |
|
742 |
|
743 |
|
744 |
|
745 |
|
746 |
|
747 |
|
748 | var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
749 |
|
750 |
|
751 |
|
752 |
|
753 |
|
754 |
|
755 |
|
756 | var ExecutionEnvironment = {
|
757 |
|
758 | canUseDOM: canUseDOM,
|
759 |
|
760 | canUseWorkers: typeof Worker !== 'undefined',
|
761 |
|
762 | canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
|
763 |
|
764 | canUseViewport: canUseDOM && !!window.screen,
|
765 |
|
766 | isInWorker: !canUseDOM
|
767 |
|
768 | };
|
769 |
|
770 | module.exports = ExecutionEnvironment;
|
771 |
|
772 | }),
|
773 |
|
774 | (function(module, exports, __webpack_require__) {
|
775 |
|
776 | "use strict";
|
777 | (function(process) { |
778 |
|
779 |
|
780 |
|
781 |
|
782 |
|
783 |
|
784 |
|
785 |
|
786 |
|
787 |
|
788 |
|
789 |
|
790 | var _prodInvariant = __webpack_require__(18);
|
791 |
|
792 | var ReactCurrentOwner = __webpack_require__(10);
|
793 |
|
794 | var invariant = __webpack_require__(1);
|
795 | var warning = __webpack_require__(2);
|
796 |
|
797 | function isNative(fn) {
|
798 |
|
799 | var funcToString = Function.prototype.toString;
|
800 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
801 | var reIsNative = RegExp('^' + funcToString
|
802 |
|
803 | .call(hasOwnProperty
|
804 |
|
805 | ).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&'
|
806 |
|
807 | ).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
|
808 | try {
|
809 | var source = funcToString.call(fn);
|
810 | return reIsNative.test(source);
|
811 | } catch (err) {
|
812 | return false;
|
813 | }
|
814 | }
|
815 |
|
816 | var canUseCollections =
|
817 |
|
818 | typeof Array.from === 'function' &&
|
819 |
|
820 | typeof Map === 'function' && isNative(Map) &&
|
821 |
|
822 | Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
|
823 |
|
824 | typeof Set === 'function' && isNative(Set) &&
|
825 |
|
826 | Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
|
827 |
|
828 | var setItem;
|
829 | var getItem;
|
830 | var removeItem;
|
831 | var getItemIDs;
|
832 | var addRoot;
|
833 | var removeRoot;
|
834 | var getRootIDs;
|
835 |
|
836 | if (canUseCollections) {
|
837 | var itemMap = new Map();
|
838 | var rootIDSet = new Set();
|
839 |
|
840 | setItem = function (id, item) {
|
841 | itemMap.set(id, item);
|
842 | };
|
843 | getItem = function (id) {
|
844 | return itemMap.get(id);
|
845 | };
|
846 | removeItem = function (id) {
|
847 | itemMap['delete'](id);
|
848 | };
|
849 | getItemIDs = function () {
|
850 | return Array.from(itemMap.keys());
|
851 | };
|
852 |
|
853 | addRoot = function (id) {
|
854 | rootIDSet.add(id);
|
855 | };
|
856 | removeRoot = function (id) {
|
857 | rootIDSet['delete'](id);
|
858 | };
|
859 | getRootIDs = function () {
|
860 | return Array.from(rootIDSet.keys());
|
861 | };
|
862 | } else {
|
863 | var itemByKey = {};
|
864 | var rootByKey = {};
|
865 |
|
866 |
|
867 |
|
868 | var getKeyFromID = function (id) {
|
869 | return '.' + id;
|
870 | };
|
871 | var getIDFromKey = function (key) {
|
872 | return parseInt(key.substr(1), 10);
|
873 | };
|
874 |
|
875 | setItem = function (id, item) {
|
876 | var key = getKeyFromID(id);
|
877 | itemByKey[key] = item;
|
878 | };
|
879 | getItem = function (id) {
|
880 | var key = getKeyFromID(id);
|
881 | return itemByKey[key];
|
882 | };
|
883 | removeItem = function (id) {
|
884 | var key = getKeyFromID(id);
|
885 | delete itemByKey[key];
|
886 | };
|
887 | getItemIDs = function () {
|
888 | return Object.keys(itemByKey).map(getIDFromKey);
|
889 | };
|
890 |
|
891 | addRoot = function (id) {
|
892 | var key = getKeyFromID(id);
|
893 | rootByKey[key] = true;
|
894 | };
|
895 | removeRoot = function (id) {
|
896 | var key = getKeyFromID(id);
|
897 | delete rootByKey[key];
|
898 | };
|
899 | getRootIDs = function () {
|
900 | return Object.keys(rootByKey).map(getIDFromKey);
|
901 | };
|
902 | }
|
903 |
|
904 | var unmountedIDs = [];
|
905 |
|
906 | function purgeDeep(id) {
|
907 | var item = getItem(id);
|
908 | if (item) {
|
909 | var childIDs = item.childIDs;
|
910 |
|
911 | removeItem(id);
|
912 | childIDs.forEach(purgeDeep);
|
913 | }
|
914 | }
|
915 |
|
916 | function describeComponentFrame(name, source, ownerName) {
|
917 | return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
|
918 | }
|
919 |
|
920 | function getDisplayName(element) {
|
921 | if (element == null) {
|
922 | return '#empty';
|
923 | } else if (typeof element === 'string' || typeof element === 'number') {
|
924 | return '#text';
|
925 | } else if (typeof element.type === 'string') {
|
926 | return element.type;
|
927 | } else {
|
928 | return element.type.displayName || element.type.name || 'Unknown';
|
929 | }
|
930 | }
|
931 |
|
932 | function describeID(id) {
|
933 | var name = ReactComponentTreeHook.getDisplayName(id);
|
934 | var element = ReactComponentTreeHook.getElement(id);
|
935 | var ownerID = ReactComponentTreeHook.getOwnerID(id);
|
936 | var ownerName;
|
937 | if (ownerID) {
|
938 | ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
|
939 | }
|
940 | process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
|
941 | return describeComponentFrame(name, element && element._source, ownerName);
|
942 | }
|
943 |
|
944 | var ReactComponentTreeHook = {
|
945 | onSetChildren: function (id, nextChildIDs) {
|
946 | var item = getItem(id);
|
947 | !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
|
948 | item.childIDs = nextChildIDs;
|
949 |
|
950 | for (var i = 0; i < nextChildIDs.length; i++) {
|
951 | var nextChildID = nextChildIDs[i];
|
952 | var nextChild = getItem(nextChildID);
|
953 | !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;
|
954 | !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;
|
955 | !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
|
956 | if (nextChild.parentID == null) {
|
957 | nextChild.parentID = id;
|
958 |
|
959 |
|
960 |
|
961 | }
|
962 | !(nextChild.parentID === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0;
|
963 | }
|
964 | },
|
965 | onBeforeMountComponent: function (id, element, parentID) {
|
966 | var item = {
|
967 | element: element,
|
968 | parentID: parentID,
|
969 | text: null,
|
970 | childIDs: [],
|
971 | isMounted: false,
|
972 | updateCount: 0
|
973 | };
|
974 | setItem(id, item);
|
975 | },
|
976 | onBeforeUpdateComponent: function (id, element) {
|
977 | var item = getItem(id);
|
978 | if (!item || !item.isMounted) {
|
979 |
|
980 |
|
981 | return;
|
982 | }
|
983 | item.element = element;
|
984 | },
|
985 | onMountComponent: function (id) {
|
986 | var item = getItem(id);
|
987 | !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
|
988 | item.isMounted = true;
|
989 | var isRoot = item.parentID === 0;
|
990 | if (isRoot) {
|
991 | addRoot(id);
|
992 | }
|
993 | },
|
994 | onUpdateComponent: function (id) {
|
995 | var item = getItem(id);
|
996 | if (!item || !item.isMounted) {
|
997 |
|
998 |
|
999 | return;
|
1000 | }
|
1001 | item.updateCount++;
|
1002 | },
|
1003 | onUnmountComponent: function (id) {
|
1004 | var item = getItem(id);
|
1005 | if (item) {
|
1006 |
|
1007 |
|
1008 |
|
1009 |
|
1010 |
|
1011 | item.isMounted = false;
|
1012 | var isRoot = item.parentID === 0;
|
1013 | if (isRoot) {
|
1014 | removeRoot(id);
|
1015 | }
|
1016 | }
|
1017 | unmountedIDs.push(id);
|
1018 | },
|
1019 | purgeUnmountedComponents: function () {
|
1020 | if (ReactComponentTreeHook._preventPurging) {
|
1021 |
|
1022 | return;
|
1023 | }
|
1024 |
|
1025 | for (var i = 0; i < unmountedIDs.length; i++) {
|
1026 | var id = unmountedIDs[i];
|
1027 | purgeDeep(id);
|
1028 | }
|
1029 | unmountedIDs.length = 0;
|
1030 | },
|
1031 | isMounted: function (id) {
|
1032 | var item = getItem(id);
|
1033 | return item ? item.isMounted : false;
|
1034 | },
|
1035 | getCurrentStackAddendum: function (topElement) {
|
1036 | var info = '';
|
1037 | if (topElement) {
|
1038 | var name = getDisplayName(topElement);
|
1039 | var owner = topElement._owner;
|
1040 | info += describeComponentFrame(name, topElement._source, owner && owner.getName());
|
1041 | }
|
1042 |
|
1043 | var currentOwner = ReactCurrentOwner.current;
|
1044 | var id = currentOwner && currentOwner._debugID;
|
1045 |
|
1046 | info += ReactComponentTreeHook.getStackAddendumByID(id);
|
1047 | return info;
|
1048 | },
|
1049 | getStackAddendumByID: function (id) {
|
1050 | var info = '';
|
1051 | while (id) {
|
1052 | info += describeID(id);
|
1053 | id = ReactComponentTreeHook.getParentID(id);
|
1054 | }
|
1055 | return info;
|
1056 | },
|
1057 | getChildIDs: function (id) {
|
1058 | var item = getItem(id);
|
1059 | return item ? item.childIDs : [];
|
1060 | },
|
1061 | getDisplayName: function (id) {
|
1062 | var element = ReactComponentTreeHook.getElement(id);
|
1063 | if (!element) {
|
1064 | return null;
|
1065 | }
|
1066 | return getDisplayName(element);
|
1067 | },
|
1068 | getElement: function (id) {
|
1069 | var item = getItem(id);
|
1070 | return item ? item.element : null;
|
1071 | },
|
1072 | getOwnerID: function (id) {
|
1073 | var element = ReactComponentTreeHook.getElement(id);
|
1074 | if (!element || !element._owner) {
|
1075 | return null;
|
1076 | }
|
1077 | return element._owner._debugID;
|
1078 | },
|
1079 | getParentID: function (id) {
|
1080 | var item = getItem(id);
|
1081 | return item ? item.parentID : null;
|
1082 | },
|
1083 | getSource: function (id) {
|
1084 | var item = getItem(id);
|
1085 | var element = item ? item.element : null;
|
1086 | var source = element != null ? element._source : null;
|
1087 | return source;
|
1088 | },
|
1089 | getText: function (id) {
|
1090 | var element = ReactComponentTreeHook.getElement(id);
|
1091 | if (typeof element === 'string') {
|
1092 | return element;
|
1093 | } else if (typeof element === 'number') {
|
1094 | return '' + element;
|
1095 | } else {
|
1096 | return null;
|
1097 | }
|
1098 | },
|
1099 | getUpdateCount: function (id) {
|
1100 | var item = getItem(id);
|
1101 | return item ? item.updateCount : 0;
|
1102 | },
|
1103 |
|
1104 |
|
1105 | getRootIDs: getRootIDs,
|
1106 | getRegisteredIDs: getItemIDs,
|
1107 |
|
1108 | pushNonStandardWarningStack: function (isCreatingElement, currentSource) {
|
1109 | if (typeof console.reactStack !== 'function') {
|
1110 | return;
|
1111 | }
|
1112 |
|
1113 | var stack = [];
|
1114 | var currentOwner = ReactCurrentOwner.current;
|
1115 | var id = currentOwner && currentOwner._debugID;
|
1116 |
|
1117 | try {
|
1118 | if (isCreatingElement) {
|
1119 | stack.push({
|
1120 | name: id ? ReactComponentTreeHook.getDisplayName(id) : null,
|
1121 | fileName: currentSource ? currentSource.fileName : null,
|
1122 | lineNumber: currentSource ? currentSource.lineNumber : null
|
1123 | });
|
1124 | }
|
1125 |
|
1126 | while (id) {
|
1127 | var element = ReactComponentTreeHook.getElement(id);
|
1128 | var parentID = ReactComponentTreeHook.getParentID(id);
|
1129 | var ownerID = ReactComponentTreeHook.getOwnerID(id);
|
1130 | var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null;
|
1131 | var source = element && element._source;
|
1132 | stack.push({
|
1133 | name: ownerName,
|
1134 | fileName: source ? source.fileName : null,
|
1135 | lineNumber: source ? source.lineNumber : null
|
1136 | });
|
1137 | id = parentID;
|
1138 | }
|
1139 | } catch (err) {
|
1140 |
|
1141 |
|
1142 | }
|
1143 |
|
1144 | console.reactStack(stack);
|
1145 | },
|
1146 | popNonStandardWarningStack: function () {
|
1147 | if (typeof console.reactStackEnd !== 'function') {
|
1148 | return;
|
1149 | }
|
1150 | console.reactStackEnd();
|
1151 | }
|
1152 | };
|
1153 |
|
1154 | module.exports = ReactComponentTreeHook;
|
1155 | }.call(exports, __webpack_require__(0)))
|
1156 |
|
1157 | }),
|
1158 |
|
1159 | (function(module, exports, __webpack_require__) {
|
1160 |
|
1161 | "use strict";
|
1162 |
|
1163 |
|
1164 |
|
1165 |
|
1166 |
|
1167 |
|
1168 |
|
1169 |
|
1170 |
|
1171 |
|
1172 |
|
1173 |
|
1174 |
|
1175 | function makeEmptyFunction(arg) {
|
1176 | return function () {
|
1177 | return arg;
|
1178 | };
|
1179 | }
|
1180 |
|
1181 |
|
1182 |
|
1183 |
|
1184 |
|
1185 |
|
1186 | var emptyFunction = function emptyFunction() {};
|
1187 |
|
1188 | emptyFunction.thatReturns = makeEmptyFunction;
|
1189 | emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
|
1190 | emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
|
1191 | emptyFunction.thatReturnsNull = makeEmptyFunction(null);
|
1192 | emptyFunction.thatReturnsThis = function () {
|
1193 | return this;
|
1194 | };
|
1195 | emptyFunction.thatReturnsArgument = function (arg) {
|
1196 | return arg;
|
1197 | };
|
1198 |
|
1199 | module.exports = emptyFunction;
|
1200 |
|
1201 | }),
|
1202 |
|
1203 | (function(module, exports, __webpack_require__) {
|
1204 |
|
1205 | "use strict";
|
1206 | (function(process) { |
1207 |
|
1208 |
|
1209 |
|
1210 |
|
1211 |
|
1212 |
|
1213 |
|
1214 |
|
1215 |
|
1216 |
|
1217 |
|
1218 |
|
1219 |
|
1220 |
|
1221 | var debugTool = null;
|
1222 |
|
1223 | if (process.env.NODE_ENV !== 'production') {
|
1224 | var ReactDebugTool = __webpack_require__(116);
|
1225 | debugTool = ReactDebugTool;
|
1226 | }
|
1227 |
|
1228 | module.exports = { debugTool: debugTool };
|
1229 | }.call(exports, __webpack_require__(0)))
|
1230 |
|
1231 | }),
|
1232 |
|
1233 | (function(module, exports, __webpack_require__) {
|
1234 |
|
1235 | "use strict";
|
1236 |
|
1237 |
|
1238 |
|
1239 |
|
1240 |
|
1241 |
|
1242 |
|
1243 |
|
1244 |
|
1245 |
|
1246 |
|
1247 |
|
1248 |
|
1249 |
|
1250 |
|
1251 |
|
1252 |
|
1253 |
|
1254 |
|
1255 | var ReactCurrentOwner = {
|
1256 | |
1257 |
|
1258 |
|
1259 |
|
1260 | current: null
|
1261 | };
|
1262 |
|
1263 | module.exports = ReactCurrentOwner;
|
1264 |
|
1265 | }),
|
1266 |
|
1267 | (function(module, exports, __webpack_require__) {
|
1268 |
|
1269 | "use strict";
|
1270 | (function(process) { |
1271 |
|
1272 |
|
1273 |
|
1274 |
|
1275 |
|
1276 |
|
1277 |
|
1278 |
|
1279 |
|
1280 |
|
1281 |
|
1282 | var _prodInvariant = __webpack_require__(3),
|
1283 | _assign = __webpack_require__(4);
|
1284 |
|
1285 | var CallbackQueue = __webpack_require__(68);
|
1286 | var PooledClass = __webpack_require__(16);
|
1287 | var ReactFeatureFlags = __webpack_require__(69);
|
1288 | var ReactReconciler = __webpack_require__(19);
|
1289 | var Transaction = __webpack_require__(29);
|
1290 |
|
1291 | var invariant = __webpack_require__(1);
|
1292 |
|
1293 | var dirtyComponents = [];
|
1294 | var updateBatchNumber = 0;
|
1295 | var asapCallbackQueue = CallbackQueue.getPooled();
|
1296 | var asapEnqueued = false;
|
1297 |
|
1298 | var batchingStrategy = null;
|
1299 |
|
1300 | function ensureInjected() {
|
1301 | !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;
|
1302 | }
|
1303 |
|
1304 | var NESTED_UPDATES = {
|
1305 | initialize: function () {
|
1306 | this.dirtyComponentsLength = dirtyComponents.length;
|
1307 | },
|
1308 | close: function () {
|
1309 | if (this.dirtyComponentsLength !== dirtyComponents.length) {
|
1310 |
|
1311 |
|
1312 |
|
1313 |
|
1314 |
|
1315 | dirtyComponents.splice(0, this.dirtyComponentsLength);
|
1316 | flushBatchedUpdates();
|
1317 | } else {
|
1318 | dirtyComponents.length = 0;
|
1319 | }
|
1320 | }
|
1321 | };
|
1322 |
|
1323 | var UPDATE_QUEUEING = {
|
1324 | initialize: function () {
|
1325 | this.callbackQueue.reset();
|
1326 | },
|
1327 | close: function () {
|
1328 | this.callbackQueue.notifyAll();
|
1329 | }
|
1330 | };
|
1331 |
|
1332 | var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
|
1333 |
|
1334 | function ReactUpdatesFlushTransaction() {
|
1335 | this.reinitializeTransaction();
|
1336 | this.dirtyComponentsLength = null;
|
1337 | this.callbackQueue = CallbackQueue.getPooled();
|
1338 | this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(
|
1339 | true);
|
1340 | }
|
1341 |
|
1342 | _assign(ReactUpdatesFlushTransaction.prototype, Transaction, {
|
1343 | getTransactionWrappers: function () {
|
1344 | return TRANSACTION_WRAPPERS;
|
1345 | },
|
1346 |
|
1347 | destructor: function () {
|
1348 | this.dirtyComponentsLength = null;
|
1349 | CallbackQueue.release(this.callbackQueue);
|
1350 | this.callbackQueue = null;
|
1351 | ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
|
1352 | this.reconcileTransaction = null;
|
1353 | },
|
1354 |
|
1355 | perform: function (method, scope, a) {
|
1356 |
|
1357 |
|
1358 | return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
|
1359 | }
|
1360 | });
|
1361 |
|
1362 | PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
|
1363 |
|
1364 | function batchedUpdates(callback, a, b, c, d, e) {
|
1365 | ensureInjected();
|
1366 | return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
|
1367 | }
|
1368 |
|
1369 |
|
1370 |
|
1371 |
|
1372 |
|
1373 |
|
1374 |
|
1375 |
|
1376 | function mountOrderComparator(c1, c2) {
|
1377 | return c1._mountOrder - c2._mountOrder;
|
1378 | }
|
1379 |
|
1380 | function runBatchedUpdates(transaction) {
|
1381 | var len = transaction.dirtyComponentsLength;
|
1382 | !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0;
|
1383 |
|
1384 |
|
1385 |
|
1386 |
|
1387 | dirtyComponents.sort(mountOrderComparator);
|
1388 |
|
1389 |
|
1390 |
|
1391 |
|
1392 |
|
1393 |
|
1394 | updateBatchNumber++;
|
1395 |
|
1396 | for (var i = 0; i < len; i++) {
|
1397 |
|
1398 |
|
1399 |
|
1400 | var component = dirtyComponents[i];
|
1401 |
|
1402 |
|
1403 |
|
1404 |
|
1405 | var callbacks = component._pendingCallbacks;
|
1406 | component._pendingCallbacks = null;
|
1407 |
|
1408 | var markerName;
|
1409 | if (ReactFeatureFlags.logTopLevelRenders) {
|
1410 | var namedComponent = component;
|
1411 |
|
1412 | if (component._currentElement.type.isReactTopLevelWrapper) {
|
1413 | namedComponent = component._renderedComponent;
|
1414 | }
|
1415 | markerName = 'React update: ' + namedComponent.getName();
|
1416 | console.time(markerName);
|
1417 | }
|
1418 |
|
1419 | ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);
|
1420 |
|
1421 | if (markerName) {
|
1422 | console.timeEnd(markerName);
|
1423 | }
|
1424 |
|
1425 | if (callbacks) {
|
1426 | for (var j = 0; j < callbacks.length; j++) {
|
1427 | transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
|
1428 | }
|
1429 | }
|
1430 | }
|
1431 | }
|
1432 |
|
1433 | var flushBatchedUpdates = function () {
|
1434 |
|
1435 |
|
1436 |
|
1437 |
|
1438 | while (dirtyComponents.length || asapEnqueued) {
|
1439 | if (dirtyComponents.length) {
|
1440 | var transaction = ReactUpdatesFlushTransaction.getPooled();
|
1441 | transaction.perform(runBatchedUpdates, null, transaction);
|
1442 | ReactUpdatesFlushTransaction.release(transaction);
|
1443 | }
|
1444 |
|
1445 | if (asapEnqueued) {
|
1446 | asapEnqueued = false;
|
1447 | var queue = asapCallbackQueue;
|
1448 | asapCallbackQueue = CallbackQueue.getPooled();
|
1449 | queue.notifyAll();
|
1450 | CallbackQueue.release(queue);
|
1451 | }
|
1452 | }
|
1453 | };
|
1454 |
|
1455 |
|
1456 |
|
1457 |
|
1458 |
|
1459 | function enqueueUpdate(component) {
|
1460 | ensureInjected();
|
1461 |
|
1462 |
|
1463 |
|
1464 |
|
1465 |
|
1466 |
|
1467 |
|
1468 | if (!batchingStrategy.isBatchingUpdates) {
|
1469 | batchingStrategy.batchedUpdates(enqueueUpdate, component);
|
1470 | return;
|
1471 | }
|
1472 |
|
1473 | dirtyComponents.push(component);
|
1474 | if (component._updateBatchNumber == null) {
|
1475 | component._updateBatchNumber = updateBatchNumber + 1;
|
1476 | }
|
1477 | }
|
1478 |
|
1479 |
|
1480 |
|
1481 |
|
1482 |
|
1483 | function asap(callback, context) {
|
1484 | !batchingStrategy.isBatchingUpdates ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0;
|
1485 | asapCallbackQueue.enqueue(callback, context);
|
1486 | asapEnqueued = true;
|
1487 | }
|
1488 |
|
1489 | var ReactUpdatesInjection = {
|
1490 | injectReconcileTransaction: function (ReconcileTransaction) {
|
1491 | !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;
|
1492 | ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
|
1493 | },
|
1494 |
|
1495 | injectBatchingStrategy: function (_batchingStrategy) {
|
1496 | !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;
|
1497 | !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;
|
1498 | !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;
|
1499 | batchingStrategy = _batchingStrategy;
|
1500 | }
|
1501 | };
|
1502 |
|
1503 | var ReactUpdates = {
|
1504 | |
1505 |
|
1506 |
|
1507 |
|
1508 |
|
1509 |
|
1510 | ReactReconcileTransaction: null,
|
1511 |
|
1512 | batchedUpdates: batchedUpdates,
|
1513 | enqueueUpdate: enqueueUpdate,
|
1514 | flushBatchedUpdates: flushBatchedUpdates,
|
1515 | injection: ReactUpdatesInjection,
|
1516 | asap: asap
|
1517 | };
|
1518 |
|
1519 | module.exports = ReactUpdates;
|
1520 | }.call(exports, __webpack_require__(0)))
|
1521 |
|
1522 | }),
|
1523 |
|
1524 | (function(module, exports, __webpack_require__) {
|
1525 |
|
1526 | "use strict";
|
1527 | (function(process) { |
1528 |
|
1529 |
|
1530 |
|
1531 |
|
1532 |
|
1533 |
|
1534 |
|
1535 |
|
1536 |
|
1537 |
|
1538 |
|
1539 | var _assign = __webpack_require__(4);
|
1540 |
|
1541 | var PooledClass = __webpack_require__(16);
|
1542 |
|
1543 | var emptyFunction = __webpack_require__(8);
|
1544 | var warning = __webpack_require__(2);
|
1545 |
|
1546 | var didWarnForAddedNewProperty = false;
|
1547 | var isProxySupported = typeof Proxy === 'function';
|
1548 |
|
1549 | var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];
|
1550 |
|
1551 |
|
1552 |
|
1553 |
|
1554 |
|
1555 | var EventInterface = {
|
1556 | type: null,
|
1557 | target: null,
|
1558 |
|
1559 | currentTarget: emptyFunction.thatReturnsNull,
|
1560 | eventPhase: null,
|
1561 | bubbles: null,
|
1562 | cancelable: null,
|
1563 | timeStamp: function (event) {
|
1564 | return event.timeStamp || Date.now();
|
1565 | },
|
1566 | defaultPrevented: null,
|
1567 | isTrusted: null
|
1568 | };
|
1569 |
|
1570 |
|
1571 |
|
1572 |
|
1573 |
|
1574 |
|
1575 |
|
1576 |
|
1577 |
|
1578 |
|
1579 |
|
1580 |
|
1581 |
|
1582 |
|
1583 |
|
1584 |
|
1585 |
|
1586 |
|
1587 |
|
1588 | function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
|
1589 | if (process.env.NODE_ENV !== 'production') {
|
1590 |
|
1591 | delete this.nativeEvent;
|
1592 | delete this.preventDefault;
|
1593 | delete this.stopPropagation;
|
1594 | }
|
1595 |
|
1596 | this.dispatchConfig = dispatchConfig;
|
1597 | this._targetInst = targetInst;
|
1598 | this.nativeEvent = nativeEvent;
|
1599 |
|
1600 | var Interface = this.constructor.Interface;
|
1601 | for (var propName in Interface) {
|
1602 | if (!Interface.hasOwnProperty(propName)) {
|
1603 | continue;
|
1604 | }
|
1605 | if (process.env.NODE_ENV !== 'production') {
|
1606 | delete this[propName];
|
1607 | }
|
1608 | var normalize = Interface[propName];
|
1609 | if (normalize) {
|
1610 | this[propName] = normalize(nativeEvent);
|
1611 | } else {
|
1612 | if (propName === 'target') {
|
1613 | this.target = nativeEventTarget;
|
1614 | } else {
|
1615 | this[propName] = nativeEvent[propName];
|
1616 | }
|
1617 | }
|
1618 | }
|
1619 |
|
1620 | var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
|
1621 | if (defaultPrevented) {
|
1622 | this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
|
1623 | } else {
|
1624 | this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
|
1625 | }
|
1626 | this.isPropagationStopped = emptyFunction.thatReturnsFalse;
|
1627 | return this;
|
1628 | }
|
1629 |
|
1630 | _assign(SyntheticEvent.prototype, {
|
1631 | preventDefault: function () {
|
1632 | this.defaultPrevented = true;
|
1633 | var event = this.nativeEvent;
|
1634 | if (!event) {
|
1635 | return;
|
1636 | }
|
1637 |
|
1638 | if (event.preventDefault) {
|
1639 | event.preventDefault();
|
1640 |
|
1641 | } else if (typeof event.returnValue !== 'unknown') {
|
1642 | event.returnValue = false;
|
1643 | }
|
1644 | this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
|
1645 | },
|
1646 |
|
1647 | stopPropagation: function () {
|
1648 | var event = this.nativeEvent;
|
1649 | if (!event) {
|
1650 | return;
|
1651 | }
|
1652 |
|
1653 | if (event.stopPropagation) {
|
1654 | event.stopPropagation();
|
1655 |
|
1656 | } else if (typeof event.cancelBubble !== 'unknown') {
|
1657 |
|
1658 |
|
1659 |
|
1660 |
|
1661 |
|
1662 | event.cancelBubble = true;
|
1663 | }
|
1664 |
|
1665 | this.isPropagationStopped = emptyFunction.thatReturnsTrue;
|
1666 | },
|
1667 |
|
1668 | |
1669 |
|
1670 |
|
1671 |
|
1672 |
|
1673 | persist: function () {
|
1674 | this.isPersistent = emptyFunction.thatReturnsTrue;
|
1675 | },
|
1676 |
|
1677 | |
1678 |
|
1679 |
|
1680 |
|
1681 |
|
1682 | isPersistent: emptyFunction.thatReturnsFalse,
|
1683 |
|
1684 | |
1685 |
|
1686 |
|
1687 | destructor: function () {
|
1688 | var Interface = this.constructor.Interface;
|
1689 | for (var propName in Interface) {
|
1690 | if (process.env.NODE_ENV !== 'production') {
|
1691 | Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
|
1692 | } else {
|
1693 | this[propName] = null;
|
1694 | }
|
1695 | }
|
1696 | for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
|
1697 | this[shouldBeReleasedProperties[i]] = null;
|
1698 | }
|
1699 | if (process.env.NODE_ENV !== 'production') {
|
1700 | Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
|
1701 | Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
|
1702 | Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
|
1703 | }
|
1704 | }
|
1705 | });
|
1706 |
|
1707 | SyntheticEvent.Interface = EventInterface;
|
1708 |
|
1709 | if (process.env.NODE_ENV !== 'production') {
|
1710 | if (isProxySupported) {
|
1711 |
|
1712 | SyntheticEvent = new Proxy(SyntheticEvent, {
|
1713 | construct: function (target, args) {
|
1714 | return this.apply(target, Object.create(target.prototype), args);
|
1715 | },
|
1716 | apply: function (constructor, that, args) {
|
1717 | return new Proxy(constructor.apply(that, args), {
|
1718 | set: function (target, prop, value) {
|
1719 | if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
|
1720 | process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
|
1721 | didWarnForAddedNewProperty = true;
|
1722 | }
|
1723 | target[prop] = value;
|
1724 | return true;
|
1725 | }
|
1726 | });
|
1727 | }
|
1728 | });
|
1729 |
|
1730 | }
|
1731 | }
|
1732 |
|
1733 |
|
1734 |
|
1735 |
|
1736 |
|
1737 |
|
1738 | SyntheticEvent.augmentClass = function (Class, Interface) {
|
1739 | var Super = this;
|
1740 |
|
1741 | var E = function () {};
|
1742 | E.prototype = Super.prototype;
|
1743 | var prototype = new E();
|
1744 |
|
1745 | _assign(prototype, Class.prototype);
|
1746 | Class.prototype = prototype;
|
1747 | Class.prototype.constructor = Class;
|
1748 |
|
1749 | Class.Interface = _assign({}, Super.Interface, Interface);
|
1750 | Class.augmentClass = Super.augmentClass;
|
1751 |
|
1752 | PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);
|
1753 | };
|
1754 |
|
1755 | PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler);
|
1756 |
|
1757 | module.exports = SyntheticEvent;
|
1758 |
|
1759 |
|
1760 |
|
1761 |
|
1762 |
|
1763 |
|
1764 |
|
1765 |
|
1766 | function getPooledWarningPropertyDefinition(propName, getVal) {
|
1767 | var isFunction = typeof getVal === 'function';
|
1768 | return {
|
1769 | configurable: true,
|
1770 | set: set,
|
1771 | get: get
|
1772 | };
|
1773 |
|
1774 | function set(val) {
|
1775 | var action = isFunction ? 'setting the method' : 'setting the property';
|
1776 | warn(action, 'This is effectively a no-op');
|
1777 | return val;
|
1778 | }
|
1779 |
|
1780 | function get() {
|
1781 | var action = isFunction ? 'accessing the method' : 'accessing the property';
|
1782 | var result = isFunction ? 'This is a no-op function' : 'This is set to null';
|
1783 | warn(action, result);
|
1784 | return getVal;
|
1785 | }
|
1786 |
|
1787 | function warn(action, result) {
|
1788 | var warningCondition = false;
|
1789 | process.env.NODE_ENV !== 'production' ? warning(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
|
1790 | }
|
1791 | }
|
1792 | }.call(exports, __webpack_require__(0)))
|
1793 |
|
1794 | }),
|
1795 |
|
1796 | (function(module, exports, __webpack_require__) {
|
1797 |
|
1798 | "use strict";
|
1799 | (function(process) { |
1800 |
|
1801 |
|
1802 |
|
1803 |
|
1804 |
|
1805 |
|
1806 |
|
1807 |
|
1808 |
|
1809 |
|
1810 |
|
1811 | var _prodInvariant = __webpack_require__(3);
|
1812 |
|
1813 | var invariant = __webpack_require__(1);
|
1814 |
|
1815 | function checkMask(value, bitmask) {
|
1816 | return (value & bitmask) === bitmask;
|
1817 | }
|
1818 |
|
1819 | var DOMPropertyInjection = {
|
1820 | |
1821 |
|
1822 |
|
1823 |
|
1824 | MUST_USE_PROPERTY: 0x1,
|
1825 | HAS_BOOLEAN_VALUE: 0x4,
|
1826 | HAS_NUMERIC_VALUE: 0x8,
|
1827 | HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
|
1828 | HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
|
1829 |
|
1830 | |
1831 |
|
1832 |
|
1833 |
|
1834 |
|
1835 |
|
1836 |
|
1837 |
|
1838 |
|
1839 |
|
1840 |
|
1841 |
|
1842 |
|
1843 |
|
1844 |
|
1845 |
|
1846 |
|
1847 |
|
1848 |
|
1849 |
|
1850 |
|
1851 |
|
1852 |
|
1853 |
|
1854 |
|
1855 |
|
1856 |
|
1857 |
|
1858 | injectDOMPropertyConfig: function (domPropertyConfig) {
|
1859 | var Injection = DOMPropertyInjection;
|
1860 | var Properties = domPropertyConfig.Properties || {};
|
1861 | var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
|
1862 | var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
|
1863 | var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
|
1864 | var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
|
1865 |
|
1866 | if (domPropertyConfig.isCustomAttribute) {
|
1867 | DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
|
1868 | }
|
1869 |
|
1870 | for (var propName in Properties) {
|
1871 | !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;
|
1872 |
|
1873 | var lowerCased = propName.toLowerCase();
|
1874 | var propConfig = Properties[propName];
|
1875 |
|
1876 | var propertyInfo = {
|
1877 | attributeName: lowerCased,
|
1878 | attributeNamespace: null,
|
1879 | propertyName: propName,
|
1880 | mutationMethod: null,
|
1881 |
|
1882 | mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
|
1883 | hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
|
1884 | hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
|
1885 | hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
|
1886 | hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
|
1887 | };
|
1888 | !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;
|
1889 |
|
1890 | if (process.env.NODE_ENV !== 'production') {
|
1891 | DOMProperty.getPossibleStandardName[lowerCased] = propName;
|
1892 | }
|
1893 |
|
1894 | if (DOMAttributeNames.hasOwnProperty(propName)) {
|
1895 | var attributeName = DOMAttributeNames[propName];
|
1896 | propertyInfo.attributeName = attributeName;
|
1897 | if (process.env.NODE_ENV !== 'production') {
|
1898 | DOMProperty.getPossibleStandardName[attributeName] = propName;
|
1899 | }
|
1900 | }
|
1901 |
|
1902 | if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
|
1903 | propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
|
1904 | }
|
1905 |
|
1906 | if (DOMPropertyNames.hasOwnProperty(propName)) {
|
1907 | propertyInfo.propertyName = DOMPropertyNames[propName];
|
1908 | }
|
1909 |
|
1910 | if (DOMMutationMethods.hasOwnProperty(propName)) {
|
1911 | propertyInfo.mutationMethod = DOMMutationMethods[propName];
|
1912 | }
|
1913 |
|
1914 | DOMProperty.properties[propName] = propertyInfo;
|
1915 | }
|
1916 | }
|
1917 | };
|
1918 |
|
1919 |
|
1920 | var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
|
1921 |
|
1922 |
|
1923 |
|
1924 |
|
1925 |
|
1926 |
|
1927 |
|
1928 |
|
1929 |
|
1930 |
|
1931 |
|
1932 |
|
1933 |
|
1934 |
|
1935 |
|
1936 | var DOMProperty = {
|
1937 | ID_ATTRIBUTE_NAME: 'data-reactid',
|
1938 | ROOT_ATTRIBUTE_NAME: 'data-reactroot',
|
1939 |
|
1940 | ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
|
1941 | ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
|
1942 |
|
1943 | |
1944 |
|
1945 |
|
1946 |
|
1947 |
|
1948 |
|
1949 |
|
1950 |
|
1951 |
|
1952 |
|
1953 |
|
1954 |
|
1955 |
|
1956 |
|
1957 |
|
1958 |
|
1959 |
|
1960 |
|
1961 |
|
1962 |
|
1963 |
|
1964 |
|
1965 |
|
1966 |
|
1967 |
|
1968 |
|
1969 |
|
1970 |
|
1971 | properties: {},
|
1972 |
|
1973 | |
1974 |
|
1975 |
|
1976 |
|
1977 |
|
1978 |
|
1979 |
|
1980 |
|
1981 |
|
1982 | getPossibleStandardName: process.env.NODE_ENV !== 'production' ? { autofocus: 'autoFocus' } : null,
|
1983 |
|
1984 | |
1985 |
|
1986 |
|
1987 | _isCustomAttributeFunctions: [],
|
1988 |
|
1989 | |
1990 |
|
1991 |
|
1992 |
|
1993 | isCustomAttribute: function (attributeName) {
|
1994 | for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
|
1995 | var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
|
1996 | if (isCustomAttributeFn(attributeName)) {
|
1997 | return true;
|
1998 | }
|
1999 | }
|
2000 | return false;
|
2001 | },
|
2002 |
|
2003 | injection: DOMPropertyInjection
|
2004 | };
|
2005 |
|
2006 | module.exports = DOMProperty;
|
2007 | }.call(exports, __webpack_require__(0)))
|
2008 |
|
2009 | }),
|
2010 |
|
2011 | (function(module, exports, __webpack_require__) {
|
2012 |
|
2013 | "use strict";
|
2014 |
|
2015 |
|
2016 | module.exports = __webpack_require__(17);
|
2017 |
|
2018 |
|
2019 | }),
|
2020 |
|
2021 | (function(module, exports, __webpack_require__) {
|
2022 |
|
2023 | "use strict";
|
2024 | (function(process) { |
2025 |
|
2026 |
|
2027 |
|
2028 |
|
2029 |
|
2030 |
|
2031 |
|
2032 |
|
2033 |
|
2034 |
|
2035 |
|
2036 | var _assign = __webpack_require__(4);
|
2037 |
|
2038 | var ReactCurrentOwner = __webpack_require__(10);
|
2039 |
|
2040 | var warning = __webpack_require__(2);
|
2041 | var canDefineProperty = __webpack_require__(26);
|
2042 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
2043 |
|
2044 | var REACT_ELEMENT_TYPE = __webpack_require__(59);
|
2045 |
|
2046 | var RESERVED_PROPS = {
|
2047 | key: true,
|
2048 | ref: true,
|
2049 | __self: true,
|
2050 | __source: true
|
2051 | };
|
2052 |
|
2053 | var specialPropKeyWarningShown, specialPropRefWarningShown;
|
2054 |
|
2055 | function hasValidRef(config) {
|
2056 | if (process.env.NODE_ENV !== 'production') {
|
2057 | if (hasOwnProperty.call(config, 'ref')) {
|
2058 | var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
|
2059 | if (getter && getter.isReactWarning) {
|
2060 | return false;
|
2061 | }
|
2062 | }
|
2063 | }
|
2064 | return config.ref !== undefined;
|
2065 | }
|
2066 |
|
2067 | function hasValidKey(config) {
|
2068 | if (process.env.NODE_ENV !== 'production') {
|
2069 | if (hasOwnProperty.call(config, 'key')) {
|
2070 | var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
2071 | if (getter && getter.isReactWarning) {
|
2072 | return false;
|
2073 | }
|
2074 | }
|
2075 | }
|
2076 | return config.key !== undefined;
|
2077 | }
|
2078 |
|
2079 | function defineKeyPropWarningGetter(props, displayName) {
|
2080 | var warnAboutAccessingKey = function () {
|
2081 | if (!specialPropKeyWarningShown) {
|
2082 | specialPropKeyWarningShown = true;
|
2083 | process.env.NODE_ENV !== 'production' ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
|
2084 | }
|
2085 | };
|
2086 | warnAboutAccessingKey.isReactWarning = true;
|
2087 | Object.defineProperty(props, 'key', {
|
2088 | get: warnAboutAccessingKey,
|
2089 | configurable: true
|
2090 | });
|
2091 | }
|
2092 |
|
2093 | function defineRefPropWarningGetter(props, displayName) {
|
2094 | var warnAboutAccessingRef = function () {
|
2095 | if (!specialPropRefWarningShown) {
|
2096 | specialPropRefWarningShown = true;
|
2097 | process.env.NODE_ENV !== 'production' ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
|
2098 | }
|
2099 | };
|
2100 | warnAboutAccessingRef.isReactWarning = true;
|
2101 | Object.defineProperty(props, 'ref', {
|
2102 | get: warnAboutAccessingRef,
|
2103 | configurable: true
|
2104 | });
|
2105 | }
|
2106 |
|
2107 | /**
|
2108 | * Factory method to create a new React element. This no longer adheres to
|
2109 | * the class pattern, so do not use new to call it. Also, no instanceof check
|
2110 | * will work. Instead test $$typeof field against Symbol.for('react.element') to check
|
2111 | * if something is a React Element.
|
2112 | *
|
2113 | * @param {*} type
|
2114 | * @param {*} key
|
2115 | * @param {string|object} ref
|
2116 | * @param {*} self A *temporary* helper to detect places where `this` is
|
2117 | * different from the `owner` when React.createElement is called, so that we
|
2118 | * can warn. We want to get rid of owner and replace string `ref`s with arrow
|
2119 | * functions, and as long as `this` and owner are the same, there will be no
|
2120 | * change in behavior.
|
2121 | * @param {*} source An annotation object (added by a transpiler or otherwise)
|
2122 | * indicating filename, line number, and/or other information.
|
2123 | * @param {*} owner
|
2124 | * @param {*} props
|
2125 | * @internal
|
2126 | */
|
2127 | var ReactElement = function (type, key, ref, self, source, owner, props) {
|
2128 | var element = {
|
2129 |
|
2130 | $$typeof: REACT_ELEMENT_TYPE,
|
2131 |
|
2132 |
|
2133 | type: type,
|
2134 | key: key,
|
2135 | ref: ref,
|
2136 | props: props,
|
2137 |
|
2138 |
|
2139 | _owner: owner
|
2140 | };
|
2141 |
|
2142 | if (process.env.NODE_ENV !== 'production') {
|
2143 |
|
2144 |
|
2145 |
|
2146 |
|
2147 | element._store = {};
|
2148 |
|
2149 |
|
2150 |
|
2151 |
|
2152 |
|
2153 | if (canDefineProperty) {
|
2154 | Object.defineProperty(element._store, 'validated', {
|
2155 | configurable: false,
|
2156 | enumerable: false,
|
2157 | writable: true,
|
2158 | value: false
|
2159 | });
|
2160 |
|
2161 | Object.defineProperty(element, '_self', {
|
2162 | configurable: false,
|
2163 | enumerable: false,
|
2164 | writable: false,
|
2165 | value: self
|
2166 | });
|
2167 |
|
2168 |
|
2169 | Object.defineProperty(element, '_source', {
|
2170 | configurable: false,
|
2171 | enumerable: false,
|
2172 | writable: false,
|
2173 | value: source
|
2174 | });
|
2175 | } else {
|
2176 | element._store.validated = false;
|
2177 | element._self = self;
|
2178 | element._source = source;
|
2179 | }
|
2180 | if (Object.freeze) {
|
2181 | Object.freeze(element.props);
|
2182 | Object.freeze(element);
|
2183 | }
|
2184 | }
|
2185 |
|
2186 | return element;
|
2187 | };
|
2188 |
|
2189 |
|
2190 |
|
2191 |
|
2192 |
|
2193 | ReactElement.createElement = function (type, config, children) {
|
2194 | var propName;
|
2195 |
|
2196 |
|
2197 | var props = {};
|
2198 |
|
2199 | var key = null;
|
2200 | var ref = null;
|
2201 | var self = null;
|
2202 | var source = null;
|
2203 |
|
2204 | if (config != null) {
|
2205 | if (hasValidRef(config)) {
|
2206 | ref = config.ref;
|
2207 | }
|
2208 | if (hasValidKey(config)) {
|
2209 | key = '' + config.key;
|
2210 | }
|
2211 |
|
2212 | self = config.__self === undefined ? null : config.__self;
|
2213 | source = config.__source === undefined ? null : config.__source;
|
2214 |
|
2215 | for (propName in config) {
|
2216 | if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
2217 | props[propName] = config[propName];
|
2218 | }
|
2219 | }
|
2220 | }
|
2221 |
|
2222 |
|
2223 |
|
2224 | var childrenLength = arguments.length - 2;
|
2225 | if (childrenLength === 1) {
|
2226 | props.children = children;
|
2227 | } else if (childrenLength > 1) {
|
2228 | var childArray = Array(childrenLength);
|
2229 | for (var i = 0; i < childrenLength; i++) {
|
2230 | childArray[i] = arguments[i + 2];
|
2231 | }
|
2232 | if (process.env.NODE_ENV !== 'production') {
|
2233 | if (Object.freeze) {
|
2234 | Object.freeze(childArray);
|
2235 | }
|
2236 | }
|
2237 | props.children = childArray;
|
2238 | }
|
2239 |
|
2240 |
|
2241 | if (type && type.defaultProps) {
|
2242 | var defaultProps = type.defaultProps;
|
2243 | for (propName in defaultProps) {
|
2244 | if (props[propName] === undefined) {
|
2245 | props[propName] = defaultProps[propName];
|
2246 | }
|
2247 | }
|
2248 | }
|
2249 | if (process.env.NODE_ENV !== 'production') {
|
2250 | if (key || ref) {
|
2251 | if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
|
2252 | var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
2253 | if (key) {
|
2254 | defineKeyPropWarningGetter(props, displayName);
|
2255 | }
|
2256 | if (ref) {
|
2257 | defineRefPropWarningGetter(props, displayName);
|
2258 | }
|
2259 | }
|
2260 | }
|
2261 | }
|
2262 | return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
2263 | };
|
2264 |
|
2265 |
|
2266 |
|
2267 |
|
2268 |
|
2269 | ReactElement.createFactory = function (type) {
|
2270 | var factory = ReactElement.createElement.bind(null, type);
|
2271 |
|
2272 |
|
2273 |
|
2274 |
|
2275 |
|
2276 | factory.type = type;
|
2277 | return factory;
|
2278 | };
|
2279 |
|
2280 | ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
|
2281 | var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
|
2282 |
|
2283 | return newElement;
|
2284 | };
|
2285 |
|
2286 |
|
2287 |
|
2288 |
|
2289 |
|
2290 | ReactElement.cloneElement = function (element, config, children) {
|
2291 | var propName;
|
2292 |
|
2293 |
|
2294 | var props = _assign({}, element.props);
|
2295 |
|
2296 |
|
2297 | var key = element.key;
|
2298 | var ref = element.ref;
|
2299 |
|
2300 | var self = element._self;
|
2301 |
|
2302 |
|
2303 |
|
2304 | var source = element._source;
|
2305 |
|
2306 |
|
2307 | var owner = element._owner;
|
2308 |
|
2309 | if (config != null) {
|
2310 | if (hasValidRef(config)) {
|
2311 |
|
2312 | ref = config.ref;
|
2313 | owner = ReactCurrentOwner.current;
|
2314 | }
|
2315 | if (hasValidKey(config)) {
|
2316 | key = '' + config.key;
|
2317 | }
|
2318 |
|
2319 |
|
2320 | var defaultProps;
|
2321 | if (element.type && element.type.defaultProps) {
|
2322 | defaultProps = element.type.defaultProps;
|
2323 | }
|
2324 | for (propName in config) {
|
2325 | if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
2326 | if (config[propName] === undefined && defaultProps !== undefined) {
|
2327 |
|
2328 | props[propName] = defaultProps[propName];
|
2329 | } else {
|
2330 | props[propName] = config[propName];
|
2331 | }
|
2332 | }
|
2333 | }
|
2334 | }
|
2335 |
|
2336 |
|
2337 |
|
2338 | var childrenLength = arguments.length - 2;
|
2339 | if (childrenLength === 1) {
|
2340 | props.children = children;
|
2341 | } else if (childrenLength > 1) {
|
2342 | var childArray = Array(childrenLength);
|
2343 | for (var i = 0; i < childrenLength; i++) {
|
2344 | childArray[i] = arguments[i + 2];
|
2345 | }
|
2346 | props.children = childArray;
|
2347 | }
|
2348 |
|
2349 | return ReactElement(element.type, key, ref, self, source, owner, props);
|
2350 | };
|
2351 |
|
2352 |
|
2353 |
|
2354 |
|
2355 |
|
2356 |
|
2357 |
|
2358 |
|
2359 | ReactElement.isValidElement = function (object) {
|
2360 | return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
2361 | };
|
2362 |
|
2363 | module.exports = ReactElement;
|
2364 | }.call(exports, __webpack_require__(0)))
|
2365 |
|
2366 | }),
|
2367 |
|
2368 | (function(module, exports, __webpack_require__) {
|
2369 |
|
2370 | "use strict";
|
2371 | (function(process) { |
2372 |
|
2373 |
|
2374 |
|
2375 |
|
2376 |
|
2377 |
|
2378 |
|
2379 |
|
2380 |
|
2381 |
|
2382 |
|
2383 |
|
2384 | var _prodInvariant = __webpack_require__(3);
|
2385 |
|
2386 | var invariant = __webpack_require__(1);
|
2387 |
|
2388 |
|
2389 |
|
2390 |
|
2391 |
|
2392 |
|
2393 |
|
2394 |
|
2395 | var oneArgumentPooler = function (copyFieldsFrom) {
|
2396 | var Klass = this;
|
2397 | if (Klass.instancePool.length) {
|
2398 | var instance = Klass.instancePool.pop();
|
2399 | Klass.call(instance, copyFieldsFrom);
|
2400 | return instance;
|
2401 | } else {
|
2402 | return new Klass(copyFieldsFrom);
|
2403 | }
|
2404 | };
|
2405 |
|
2406 | var twoArgumentPooler = function (a1, a2) {
|
2407 | var Klass = this;
|
2408 | if (Klass.instancePool.length) {
|
2409 | var instance = Klass.instancePool.pop();
|
2410 | Klass.call(instance, a1, a2);
|
2411 | return instance;
|
2412 | } else {
|
2413 | return new Klass(a1, a2);
|
2414 | }
|
2415 | };
|
2416 |
|
2417 | var threeArgumentPooler = function (a1, a2, a3) {
|
2418 | var Klass = this;
|
2419 | if (Klass.instancePool.length) {
|
2420 | var instance = Klass.instancePool.pop();
|
2421 | Klass.call(instance, a1, a2, a3);
|
2422 | return instance;
|
2423 | } else {
|
2424 | return new Klass(a1, a2, a3);
|
2425 | }
|
2426 | };
|
2427 |
|
2428 | var fourArgumentPooler = function (a1, a2, a3, a4) {
|
2429 | var Klass = this;
|
2430 | if (Klass.instancePool.length) {
|
2431 | var instance = Klass.instancePool.pop();
|
2432 | Klass.call(instance, a1, a2, a3, a4);
|
2433 | return instance;
|
2434 | } else {
|
2435 | return new Klass(a1, a2, a3, a4);
|
2436 | }
|
2437 | };
|
2438 |
|
2439 | var standardReleaser = function (instance) {
|
2440 | var Klass = this;
|
2441 | !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
|
2442 | instance.destructor();
|
2443 | if (Klass.instancePool.length < Klass.poolSize) {
|
2444 | Klass.instancePool.push(instance);
|
2445 | }
|
2446 | };
|
2447 |
|
2448 | var DEFAULT_POOL_SIZE = 10;
|
2449 | var DEFAULT_POOLER = oneArgumentPooler;
|
2450 |
|
2451 |
|
2452 |
|
2453 |
|
2454 |
|
2455 |
|
2456 |
|
2457 |
|
2458 |
|
2459 |
|
2460 | var addPoolingTo = function (CopyConstructor, pooler) {
|
2461 |
|
2462 |
|
2463 | var NewKlass = CopyConstructor;
|
2464 | NewKlass.instancePool = [];
|
2465 | NewKlass.getPooled = pooler || DEFAULT_POOLER;
|
2466 | if (!NewKlass.poolSize) {
|
2467 | NewKlass.poolSize = DEFAULT_POOL_SIZE;
|
2468 | }
|
2469 | NewKlass.release = standardReleaser;
|
2470 | return NewKlass;
|
2471 | };
|
2472 |
|
2473 | var PooledClass = {
|
2474 | addPoolingTo: addPoolingTo,
|
2475 | oneArgumentPooler: oneArgumentPooler,
|
2476 | twoArgumentPooler: twoArgumentPooler,
|
2477 | threeArgumentPooler: threeArgumentPooler,
|
2478 | fourArgumentPooler: fourArgumentPooler
|
2479 | };
|
2480 |
|
2481 | module.exports = PooledClass;
|
2482 | }.call(exports, __webpack_require__(0)))
|
2483 |
|
2484 | }),
|
2485 |
|
2486 | (function(module, exports, __webpack_require__) {
|
2487 |
|
2488 | "use strict";
|
2489 | (function(process) { |
2490 |
|
2491 |
|
2492 |
|
2493 |
|
2494 |
|
2495 |
|
2496 |
|
2497 |
|
2498 |
|
2499 |
|
2500 |
|
2501 | var _assign = __webpack_require__(4);
|
2502 |
|
2503 | var ReactBaseClasses = __webpack_require__(57);
|
2504 | var ReactChildren = __webpack_require__(91);
|
2505 | var ReactDOMFactories = __webpack_require__(95);
|
2506 | var ReactElement = __webpack_require__(15);
|
2507 | var ReactPropTypes = __webpack_require__(99);
|
2508 | var ReactVersion = __webpack_require__(101);
|
2509 |
|
2510 | var createReactClass = __webpack_require__(102);
|
2511 | var onlyChild = __webpack_require__(104);
|
2512 |
|
2513 | var createElement = ReactElement.createElement;
|
2514 | var createFactory = ReactElement.createFactory;
|
2515 | var cloneElement = ReactElement.cloneElement;
|
2516 |
|
2517 | if (process.env.NODE_ENV !== 'production') {
|
2518 | var lowPriorityWarning = __webpack_require__(36);
|
2519 | var canDefineProperty = __webpack_require__(26);
|
2520 | var ReactElementValidator = __webpack_require__(61);
|
2521 | var didWarnPropTypesDeprecated = false;
|
2522 | createElement = ReactElementValidator.createElement;
|
2523 | createFactory = ReactElementValidator.createFactory;
|
2524 | cloneElement = ReactElementValidator.cloneElement;
|
2525 | }
|
2526 |
|
2527 | var __spread = _assign;
|
2528 | var createMixin = function (mixin) {
|
2529 | return mixin;
|
2530 | };
|
2531 |
|
2532 | if (process.env.NODE_ENV !== 'production') {
|
2533 | var warnedForSpread = false;
|
2534 | var warnedForCreateMixin = false;
|
2535 | __spread = function () {
|
2536 | lowPriorityWarning(warnedForSpread, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.');
|
2537 | warnedForSpread = true;
|
2538 | return _assign.apply(null, arguments);
|
2539 | };
|
2540 |
|
2541 | createMixin = function (mixin) {
|
2542 | lowPriorityWarning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. ' + 'In React v16.0, it will be removed. ' + 'You can use this mixin directly instead. ' + 'See https://fb.me/createmixin-was-never-implemented for more info.');
|
2543 | warnedForCreateMixin = true;
|
2544 | return mixin;
|
2545 | };
|
2546 | }
|
2547 |
|
2548 | var React = {
|
2549 |
|
2550 |
|
2551 | Children: {
|
2552 | map: ReactChildren.map,
|
2553 | forEach: ReactChildren.forEach,
|
2554 | count: ReactChildren.count,
|
2555 | toArray: ReactChildren.toArray,
|
2556 | only: onlyChild
|
2557 | },
|
2558 |
|
2559 | Component: ReactBaseClasses.Component,
|
2560 | PureComponent: ReactBaseClasses.PureComponent,
|
2561 |
|
2562 | createElement: createElement,
|
2563 | cloneElement: cloneElement,
|
2564 | isValidElement: ReactElement.isValidElement,
|
2565 |
|
2566 |
|
2567 |
|
2568 | PropTypes: ReactPropTypes,
|
2569 | createClass: createReactClass,
|
2570 | createFactory: createFactory,
|
2571 | createMixin: createMixin,
|
2572 |
|
2573 |
|
2574 |
|
2575 | DOM: ReactDOMFactories,
|
2576 |
|
2577 | version: ReactVersion,
|
2578 |
|
2579 |
|
2580 | __spread: __spread
|
2581 | };
|
2582 |
|
2583 | if (process.env.NODE_ENV !== 'production') {
|
2584 | var warnedForCreateClass = false;
|
2585 | if (canDefineProperty) {
|
2586 | Object.defineProperty(React, 'PropTypes', {
|
2587 | get: function () {
|
2588 | lowPriorityWarning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated,' + ' and will be removed in React v16.0.' + ' Use the latest available v15.* prop-types package from npm instead.' + ' For info on usage, compatibility, migration and more, see ' + 'https://fb.me/prop-types-docs');
|
2589 | didWarnPropTypesDeprecated = true;
|
2590 | return ReactPropTypes;
|
2591 | }
|
2592 | });
|
2593 |
|
2594 | Object.defineProperty(React, 'createClass', {
|
2595 | get: function () {
|
2596 | lowPriorityWarning(warnedForCreateClass, 'Accessing createClass via the main React package is deprecated,' + ' and will be removed in React v16.0.' + " Use a plain JavaScript class instead. If you're not yet " + 'ready to migrate, create-react-class v15.* is available ' + 'on npm as a temporary, drop-in replacement. ' + 'For more info see https://fb.me/react-create-class');
|
2597 | warnedForCreateClass = true;
|
2598 | return createReactClass;
|
2599 | }
|
2600 | });
|
2601 | }
|
2602 |
|
2603 |
|
2604 |
|
2605 |
|
2606 | React.DOM = {};
|
2607 | var warnedForFactories = false;
|
2608 | Object.keys(ReactDOMFactories).forEach(function (factory) {
|
2609 | React.DOM[factory] = function () {
|
2610 | if (!warnedForFactories) {
|
2611 | lowPriorityWarning(false, 'Accessing factories like React.DOM.%s has been deprecated ' + 'and will be removed in v16.0+. Use the ' + 'react-dom-factories package instead. ' + ' Version 1.0 provides a drop-in replacement.' + ' For more info, see https://fb.me/react-dom-factories', factory);
|
2612 | warnedForFactories = true;
|
2613 | }
|
2614 | return ReactDOMFactories[factory].apply(ReactDOMFactories, arguments);
|
2615 | };
|
2616 | });
|
2617 | }
|
2618 |
|
2619 | module.exports = React;
|
2620 | }.call(exports, __webpack_require__(0)))
|
2621 |
|
2622 | }),
|
2623 |
|
2624 | (function(module, exports, __webpack_require__) {
|
2625 |
|
2626 | "use strict";
|
2627 |
|
2628 |
|
2629 |
|
2630 |
|
2631 |
|
2632 |
|
2633 |
|
2634 |
|
2635 |
|
2636 |
|
2637 |
|
2638 |
|
2639 |
|
2640 |
|
2641 |
|
2642 |
|
2643 |
|
2644 |
|
2645 |
|
2646 | function reactProdInvariant(code) {
|
2647 | var argCount = arguments.length - 1;
|
2648 |
|
2649 | var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
|
2650 |
|
2651 | for (var argIdx = 0; argIdx < argCount; argIdx++) {
|
2652 | message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
|
2653 | }
|
2654 |
|
2655 | message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
|
2656 |
|
2657 | var error = new Error(message);
|
2658 | error.name = 'Invariant Violation';
|
2659 | error.framesToPop = 1;
|
2660 |
|
2661 | throw error;
|
2662 | }
|
2663 |
|
2664 | module.exports = reactProdInvariant;
|
2665 |
|
2666 | }),
|
2667 |
|
2668 | (function(module, exports, __webpack_require__) {
|
2669 |
|
2670 | "use strict";
|
2671 | (function(process) { |
2672 |
|
2673 |
|
2674 |
|
2675 |
|
2676 |
|
2677 |
|
2678 |
|
2679 |
|
2680 |
|
2681 |
|
2682 |
|
2683 | var ReactRef = __webpack_require__(114);
|
2684 | var ReactInstrumentation = __webpack_require__(9);
|
2685 |
|
2686 | var warning = __webpack_require__(2);
|
2687 |
|
2688 |
|
2689 |
|
2690 |
|
2691 |
|
2692 | function attachRefs() {
|
2693 | ReactRef.attachRefs(this, this._currentElement);
|
2694 | }
|
2695 |
|
2696 | var ReactReconciler = {
|
2697 | |
2698 |
|
2699 |
|
2700 |
|
2701 |
|
2702 |
|
2703 |
|
2704 |
|
2705 |
|
2706 |
|
2707 |
|
2708 | mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID) // 0 in production and for roots
|
2709 | {
|
2710 | if (process.env.NODE_ENV !== 'production') {
|
2711 | if (internalInstance._debugID !== 0) {
|
2712 | ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
|
2713 | }
|
2714 | }
|
2715 | var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
|
2716 | if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
|
2717 | transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
|
2718 | }
|
2719 | if (process.env.NODE_ENV !== 'production') {
|
2720 | if (internalInstance._debugID !== 0) {
|
2721 | ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);
|
2722 | }
|
2723 | }
|
2724 | return markup;
|
2725 | },
|
2726 |
|
2727 | |
2728 |
|
2729 |
|
2730 |
|
2731 | getHostNode: function (internalInstance) {
|
2732 | return internalInstance.getHostNode();
|
2733 | },
|
2734 |
|
2735 | |
2736 |
|
2737 |
|
2738 |
|
2739 |
|
2740 |
|
2741 | unmountComponent: function (internalInstance, safely) {
|
2742 | if (process.env.NODE_ENV !== 'production') {
|
2743 | if (internalInstance._debugID !== 0) {
|
2744 | ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);
|
2745 | }
|
2746 | }
|
2747 | ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
|
2748 | internalInstance.unmountComponent(safely);
|
2749 | if (process.env.NODE_ENV !== 'production') {
|
2750 | if (internalInstance._debugID !== 0) {
|
2751 | ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);
|
2752 | }
|
2753 | }
|
2754 | },
|
2755 |
|
2756 | |
2757 |
|
2758 |
|
2759 |
|
2760 |
|
2761 |
|
2762 |
|
2763 |
|
2764 |
|
2765 | receiveComponent: function (internalInstance, nextElement, transaction, context) {
|
2766 | var prevElement = internalInstance._currentElement;
|
2767 |
|
2768 | if (nextElement === prevElement && context === internalInstance._context) {
|
2769 |
|
2770 |
|
2771 |
|
2772 |
|
2773 |
|
2774 |
|
2775 |
|
2776 |
|
2777 |
|
2778 |
|
2779 | return;
|
2780 | }
|
2781 |
|
2782 | if (process.env.NODE_ENV !== 'production') {
|
2783 | if (internalInstance._debugID !== 0) {
|
2784 | ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
|
2785 | }
|
2786 | }
|
2787 |
|
2788 | var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);
|
2789 |
|
2790 | if (refsChanged) {
|
2791 | ReactRef.detachRefs(internalInstance, prevElement);
|
2792 | }
|
2793 |
|
2794 | internalInstance.receiveComponent(nextElement, transaction, context);
|
2795 |
|
2796 | if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
|
2797 | transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
|
2798 | }
|
2799 |
|
2800 | if (process.env.NODE_ENV !== 'production') {
|
2801 | if (internalInstance._debugID !== 0) {
|
2802 | ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
|
2803 | }
|
2804 | }
|
2805 | },
|
2806 |
|
2807 | |
2808 |
|
2809 |
|
2810 |
|
2811 |
|
2812 |
|
2813 |
|
2814 | performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) {
|
2815 | if (internalInstance._updateBatchNumber !== updateBatchNumber) {
|
2816 |
|
2817 |
|
2818 | process.env.NODE_ENV !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0;
|
2819 | return;
|
2820 | }
|
2821 | if (process.env.NODE_ENV !== 'production') {
|
2822 | if (internalInstance._debugID !== 0) {
|
2823 | ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);
|
2824 | }
|
2825 | }
|
2826 | internalInstance.performUpdateIfNecessary(transaction);
|
2827 | if (process.env.NODE_ENV !== 'production') {
|
2828 | if (internalInstance._debugID !== 0) {
|
2829 | ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
|
2830 | }
|
2831 | }
|
2832 | }
|
2833 | };
|
2834 |
|
2835 | module.exports = ReactReconciler;
|
2836 | }.call(exports, __webpack_require__(0)))
|
2837 |
|
2838 | }),
|
2839 |
|
2840 | (function(module, exports, __webpack_require__) {
|
2841 |
|
2842 | "use strict";
|
2843 |
|
2844 |
|
2845 |
|
2846 |
|
2847 |
|
2848 |
|
2849 |
|
2850 |
|
2851 |
|
2852 |
|
2853 |
|
2854 |
|
2855 | var DOMNamespaces = __webpack_require__(44);
|
2856 | var setInnerHTML = __webpack_require__(31);
|
2857 |
|
2858 | var createMicrosoftUnsafeLocalFunction = __webpack_require__(45);
|
2859 | var setTextContent = __webpack_require__(73);
|
2860 |
|
2861 | var ELEMENT_NODE_TYPE = 1;
|
2862 | var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
|
2863 |
|
2864 |
|
2865 |
|
2866 |
|
2867 |
|
2868 |
|
2869 |
|
2870 |
|
2871 |
|
2872 |
|
2873 |
|
2874 |
|
2875 | var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
|
2876 |
|
2877 | function insertTreeChildren(tree) {
|
2878 | if (!enableLazy) {
|
2879 | return;
|
2880 | }
|
2881 | var node = tree.node;
|
2882 | var children = tree.children;
|
2883 | if (children.length) {
|
2884 | for (var i = 0; i < children.length; i++) {
|
2885 | insertTreeBefore(node, children[i], null);
|
2886 | }
|
2887 | } else if (tree.html != null) {
|
2888 | setInnerHTML(node, tree.html);
|
2889 | } else if (tree.text != null) {
|
2890 | setTextContent(node, tree.text);
|
2891 | }
|
2892 | }
|
2893 |
|
2894 | var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {
|
2895 |
|
2896 |
|
2897 |
|
2898 |
|
2899 |
|
2900 |
|
2901 | if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) {
|
2902 | insertTreeChildren(tree);
|
2903 | parentNode.insertBefore(tree.node, referenceNode);
|
2904 | } else {
|
2905 | parentNode.insertBefore(tree.node, referenceNode);
|
2906 | insertTreeChildren(tree);
|
2907 | }
|
2908 | });
|
2909 |
|
2910 | function replaceChildWithTree(oldNode, newTree) {
|
2911 | oldNode.parentNode.replaceChild(newTree.node, oldNode);
|
2912 | insertTreeChildren(newTree);
|
2913 | }
|
2914 |
|
2915 | function queueChild(parentTree, childTree) {
|
2916 | if (enableLazy) {
|
2917 | parentTree.children.push(childTree);
|
2918 | } else {
|
2919 | parentTree.node.appendChild(childTree.node);
|
2920 | }
|
2921 | }
|
2922 |
|
2923 | function queueHTML(tree, html) {
|
2924 | if (enableLazy) {
|
2925 | tree.html = html;
|
2926 | } else {
|
2927 | setInnerHTML(tree.node, html);
|
2928 | }
|
2929 | }
|
2930 |
|
2931 | function queueText(tree, text) {
|
2932 | if (enableLazy) {
|
2933 | tree.text = text;
|
2934 | } else {
|
2935 | setTextContent(tree.node, text);
|
2936 | }
|
2937 | }
|
2938 |
|
2939 | function toString() {
|
2940 | return this.node.nodeName;
|
2941 | }
|
2942 |
|
2943 | function DOMLazyTree(node) {
|
2944 | return {
|
2945 | node: node,
|
2946 | children: [],
|
2947 | html: null,
|
2948 | text: null,
|
2949 | toString: toString
|
2950 | };
|
2951 | }
|
2952 |
|
2953 | DOMLazyTree.insertTreeBefore = insertTreeBefore;
|
2954 | DOMLazyTree.replaceChildWithTree = replaceChildWithTree;
|
2955 | DOMLazyTree.queueChild = queueChild;
|
2956 | DOMLazyTree.queueHTML = queueHTML;
|
2957 | DOMLazyTree.queueText = queueText;
|
2958 |
|
2959 | module.exports = DOMLazyTree;
|
2960 |
|
2961 | }),
|
2962 |
|
2963 | (function(module, exports, __webpack_require__) {
|
2964 |
|
2965 | "use strict";
|
2966 | (function(process) { |
2967 |
|
2968 |
|
2969 |
|
2970 |
|
2971 |
|
2972 |
|
2973 |
|
2974 |
|
2975 |
|
2976 |
|
2977 |
|
2978 | var EventPluginHub = __webpack_require__(22);
|
2979 | var EventPluginUtils = __webpack_require__(38);
|
2980 |
|
2981 | var accumulateInto = __webpack_require__(65);
|
2982 | var forEachAccumulated = __webpack_require__(66);
|
2983 | var warning = __webpack_require__(2);
|
2984 |
|
2985 | var getListener = EventPluginHub.getListener;
|
2986 |
|
2987 |
|
2988 |
|
2989 |
|
2990 |
|
2991 | function listenerAtPhase(inst, event, propagationPhase) {
|
2992 | var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
|
2993 | return getListener(inst, registrationName);
|
2994 | }
|
2995 |
|
2996 |
|
2997 |
|
2998 |
|
2999 |
|
3000 |
|
3001 |
|
3002 | function accumulateDirectionalDispatches(inst, phase, event) {
|
3003 | if (process.env.NODE_ENV !== 'production') {
|
3004 | process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;
|
3005 | }
|
3006 | var listener = listenerAtPhase(inst, event, phase);
|
3007 | if (listener) {
|
3008 | event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
|
3009 | event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
|
3010 | }
|
3011 | }
|
3012 |
|
3013 |
|
3014 |
|
3015 |
|
3016 |
|
3017 |
|
3018 |
|
3019 |
|
3020 | function accumulateTwoPhaseDispatchesSingle(event) {
|
3021 | if (event && event.dispatchConfig.phasedRegistrationNames) {
|
3022 | EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
|
3023 | }
|
3024 | }
|
3025 |
|
3026 |
|
3027 |
|
3028 |
|
3029 | function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
|
3030 | if (event && event.dispatchConfig.phasedRegistrationNames) {
|
3031 | var targetInst = event._targetInst;
|
3032 | var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
|
3033 | EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
|
3034 | }
|
3035 | }
|
3036 |
|
3037 |
|
3038 |
|
3039 |
|
3040 |
|
3041 |
|
3042 | function accumulateDispatches(inst, ignoredDirection, event) {
|
3043 | if (event && event.dispatchConfig.registrationName) {
|
3044 | var registrationName = event.dispatchConfig.registrationName;
|
3045 | var listener = getListener(inst, registrationName);
|
3046 | if (listener) {
|
3047 | event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
|
3048 | event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
|
3049 | }
|
3050 | }
|
3051 | }
|
3052 |
|
3053 |
|
3054 |
|
3055 |
|
3056 |
|
3057 |
|
3058 | function accumulateDirectDispatchesSingle(event) {
|
3059 | if (event && event.dispatchConfig.registrationName) {
|
3060 | accumulateDispatches(event._targetInst, null, event);
|
3061 | }
|
3062 | }
|
3063 |
|
3064 | function accumulateTwoPhaseDispatches(events) {
|
3065 | forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
|
3066 | }
|
3067 |
|
3068 | function accumulateTwoPhaseDispatchesSkipTarget(events) {
|
3069 | forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
|
3070 | }
|
3071 |
|
3072 | function accumulateEnterLeaveDispatches(leave, enter, from, to) {
|
3073 | EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
|
3074 | }
|
3075 |
|
3076 | function accumulateDirectDispatches(events) {
|
3077 | forEachAccumulated(events, accumulateDirectDispatchesSingle);
|
3078 | }
|
3079 |
|
3080 |
|
3081 |
|
3082 |
|
3083 |
|
3084 |
|
3085 |
|
3086 |
|
3087 |
|
3088 |
|
3089 |
|
3090 |
|
3091 | var EventPropagators = {
|
3092 | accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
|
3093 | accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
|
3094 | accumulateDirectDispatches: accumulateDirectDispatches,
|
3095 | accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
|
3096 | };
|
3097 |
|
3098 | module.exports = EventPropagators;
|
3099 | }.call(exports, __webpack_require__(0)))
|
3100 |
|
3101 | }),
|
3102 |
|
3103 | (function(module, exports, __webpack_require__) {
|
3104 |
|
3105 | "use strict";
|
3106 | (function(process) { |
3107 |
|
3108 |
|
3109 |
|
3110 |
|
3111 |
|
3112 |
|
3113 |
|
3114 |
|
3115 |
|
3116 |
|
3117 |
|
3118 | var _prodInvariant = __webpack_require__(3);
|
3119 |
|
3120 | var EventPluginRegistry = __webpack_require__(28);
|
3121 | var EventPluginUtils = __webpack_require__(38);
|
3122 | var ReactErrorUtils = __webpack_require__(39);
|
3123 |
|
3124 | var accumulateInto = __webpack_require__(65);
|
3125 | var forEachAccumulated = __webpack_require__(66);
|
3126 | var invariant = __webpack_require__(1);
|
3127 |
|
3128 |
|
3129 |
|
3130 |
|
3131 | var listenerBank = {};
|
3132 |
|
3133 |
|
3134 |
|
3135 |
|
3136 |
|
3137 | var eventQueue = null;
|
3138 |
|
3139 |
|
3140 |
|
3141 |
|
3142 |
|
3143 |
|
3144 |
|
3145 |
|
3146 | var executeDispatchesAndRelease = function (event, simulated) {
|
3147 | if (event) {
|
3148 | EventPluginUtils.executeDispatchesInOrder(event, simulated);
|
3149 |
|
3150 | if (!event.isPersistent()) {
|
3151 | event.constructor.release(event);
|
3152 | }
|
3153 | }
|
3154 | };
|
3155 | var executeDispatchesAndReleaseSimulated = function (e) {
|
3156 | return executeDispatchesAndRelease(e, true);
|
3157 | };
|
3158 | var executeDispatchesAndReleaseTopLevel = function (e) {
|
3159 | return executeDispatchesAndRelease(e, false);
|
3160 | };
|
3161 |
|
3162 | var getDictionaryKey = function (inst) {
|
3163 |
|
3164 |
|
3165 | return '.' + inst._rootNodeID;
|
3166 | };
|
3167 |
|
3168 | function isInteractive(tag) {
|
3169 | return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
|
3170 | }
|
3171 |
|
3172 | function shouldPreventMouseEvent(name, type, props) {
|
3173 | switch (name) {
|
3174 | case 'onClick':
|
3175 | case 'onClickCapture':
|
3176 | case 'onDoubleClick':
|
3177 | case 'onDoubleClickCapture':
|
3178 | case 'onMouseDown':
|
3179 | case 'onMouseDownCapture':
|
3180 | case 'onMouseMove':
|
3181 | case 'onMouseMoveCapture':
|
3182 | case 'onMouseUp':
|
3183 | case 'onMouseUpCapture':
|
3184 | return !!(props.disabled && isInteractive(type));
|
3185 | default:
|
3186 | return false;
|
3187 | }
|
3188 | }
|
3189 |
|
3190 |
|
3191 |
|
3192 |
|
3193 |
|
3194 |
|
3195 |
|
3196 |
|
3197 |
|
3198 |
|
3199 |
|
3200 |
|
3201 |
|
3202 |
|
3203 |
|
3204 |
|
3205 |
|
3206 |
|
3207 |
|
3208 |
|
3209 |
|
3210 |
|
3211 |
|
3212 | var EventPluginHub = {
|
3213 | |
3214 |
|
3215 |
|
3216 | injection: {
|
3217 | |
3218 |
|
3219 |
|
3220 |
|
3221 | injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
|
3222 |
|
3223 | |
3224 |
|
3225 |
|
3226 | injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
|
3227 | },
|
3228 |
|
3229 | |
3230 |
|
3231 |
|
3232 |
|
3233 |
|
3234 |
|
3235 |
|
3236 | putListener: function (inst, registrationName, listener) {
|
3237 | !(typeof listener === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0;
|
3238 |
|
3239 | var key = getDictionaryKey(inst);
|
3240 | var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
|
3241 | bankForRegistrationName[key] = listener;
|
3242 |
|
3243 | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
|
3244 | if (PluginModule && PluginModule.didPutListener) {
|
3245 | PluginModule.didPutListener(inst, registrationName, listener);
|
3246 | }
|
3247 | },
|
3248 |
|
3249 | |
3250 |
|
3251 |
|
3252 |
|
3253 |
|
3254 | getListener: function (inst, registrationName) {
|
3255 |
|
3256 |
|
3257 | var bankForRegistrationName = listenerBank[registrationName];
|
3258 | if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) {
|
3259 | return null;
|
3260 | }
|
3261 | var key = getDictionaryKey(inst);
|
3262 | return bankForRegistrationName && bankForRegistrationName[key];
|
3263 | },
|
3264 |
|
3265 | |
3266 |
|
3267 |
|
3268 |
|
3269 |
|
3270 |
|
3271 | deleteListener: function (inst, registrationName) {
|
3272 | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
|
3273 | if (PluginModule && PluginModule.willDeleteListener) {
|
3274 | PluginModule.willDeleteListener(inst, registrationName);
|
3275 | }
|
3276 |
|
3277 | var bankForRegistrationName = listenerBank[registrationName];
|
3278 |
|
3279 | if (bankForRegistrationName) {
|
3280 | var key = getDictionaryKey(inst);
|
3281 | delete bankForRegistrationName[key];
|
3282 | }
|
3283 | },
|
3284 |
|
3285 | |
3286 |
|
3287 |
|
3288 |
|
3289 |
|
3290 | deleteAllListeners: function (inst) {
|
3291 | var key = getDictionaryKey(inst);
|
3292 | for (var registrationName in listenerBank) {
|
3293 | if (!listenerBank.hasOwnProperty(registrationName)) {
|
3294 | continue;
|
3295 | }
|
3296 |
|
3297 | if (!listenerBank[registrationName][key]) {
|
3298 | continue;
|
3299 | }
|
3300 |
|
3301 | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
|
3302 | if (PluginModule && PluginModule.willDeleteListener) {
|
3303 | PluginModule.willDeleteListener(inst, registrationName);
|
3304 | }
|
3305 |
|
3306 | delete listenerBank[registrationName][key];
|
3307 | }
|
3308 | },
|
3309 |
|
3310 | |
3311 |
|
3312 |
|
3313 |
|
3314 |
|
3315 |
|
3316 |
|
3317 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
3318 | var events;
|
3319 | var plugins = EventPluginRegistry.plugins;
|
3320 | for (var i = 0; i < plugins.length; i++) {
|
3321 |
|
3322 | var possiblePlugin = plugins[i];
|
3323 | if (possiblePlugin) {
|
3324 | var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
|
3325 | if (extractedEvents) {
|
3326 | events = accumulateInto(events, extractedEvents);
|
3327 | }
|
3328 | }
|
3329 | }
|
3330 | return events;
|
3331 | },
|
3332 |
|
3333 | |
3334 |
|
3335 |
|
3336 |
|
3337 |
|
3338 |
|
3339 |
|
3340 | enqueueEvents: function (events) {
|
3341 | if (events) {
|
3342 | eventQueue = accumulateInto(eventQueue, events);
|
3343 | }
|
3344 | },
|
3345 |
|
3346 | |
3347 |
|
3348 |
|
3349 |
|
3350 |
|
3351 | processEventQueue: function (simulated) {
|
3352 |
|
3353 |
|
3354 | var processingEventQueue = eventQueue;
|
3355 | eventQueue = null;
|
3356 | if (simulated) {
|
3357 | forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
|
3358 | } else {
|
3359 | forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
|
3360 | }
|
3361 | !!eventQueue ? process.env.NODE_ENV !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0;
|
3362 |
|
3363 | ReactErrorUtils.rethrowCaughtError();
|
3364 | },
|
3365 |
|
3366 | |
3367 |
|
3368 |
|
3369 | __purge: function () {
|
3370 | listenerBank = {};
|
3371 | },
|
3372 |
|
3373 | __getListenerBank: function () {
|
3374 | return listenerBank;
|
3375 | }
|
3376 | };
|
3377 |
|
3378 | module.exports = EventPluginHub;
|
3379 | }.call(exports, __webpack_require__(0)))
|
3380 |
|
3381 | }),
|
3382 |
|
3383 | (function(module, exports, __webpack_require__) {
|
3384 |
|
3385 | "use strict";
|
3386 |
|
3387 |
|
3388 |
|
3389 |
|
3390 |
|
3391 |
|
3392 |
|
3393 |
|
3394 |
|
3395 |
|
3396 |
|
3397 |
|
3398 | var SyntheticEvent = __webpack_require__(12);
|
3399 |
|
3400 | var getEventTarget = __webpack_require__(40);
|
3401 |
|
3402 |
|
3403 |
|
3404 |
|
3405 |
|
3406 | var UIEventInterface = {
|
3407 | view: function (event) {
|
3408 | if (event.view) {
|
3409 | return event.view;
|
3410 | }
|
3411 |
|
3412 | var target = getEventTarget(event);
|
3413 | if (target.window === target) {
|
3414 |
|
3415 | return target;
|
3416 | }
|
3417 |
|
3418 | var doc = target.ownerDocument;
|
3419 |
|
3420 | if (doc) {
|
3421 | return doc.defaultView || doc.parentWindow;
|
3422 | } else {
|
3423 | return window;
|
3424 | }
|
3425 | },
|
3426 | detail: function (event) {
|
3427 | return event.detail || 0;
|
3428 | }
|
3429 | };
|
3430 |
|
3431 |
|
3432 |
|
3433 |
|
3434 |
|
3435 |
|
3436 |
|
3437 | function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
3438 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
3439 | }
|
3440 |
|
3441 | SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);
|
3442 |
|
3443 | module.exports = SyntheticUIEvent;
|
3444 |
|
3445 | }),
|
3446 |
|
3447 | (function(module, exports, __webpack_require__) {
|
3448 |
|
3449 | "use strict";
|
3450 |
|
3451 |
|
3452 |
|
3453 |
|
3454 |
|
3455 |
|
3456 |
|
3457 |
|
3458 |
|
3459 |
|
3460 |
|
3461 |
|
3462 |
|
3463 |
|
3464 |
|
3465 |
|
3466 |
|
3467 |
|
3468 |
|
3469 |
|
3470 |
|
3471 | var ReactInstanceMap = {
|
3472 | |
3473 |
|
3474 |
|
3475 |
|
3476 |
|
3477 | remove: function (key) {
|
3478 | key._reactInternalInstance = undefined;
|
3479 | },
|
3480 |
|
3481 | get: function (key) {
|
3482 | return key._reactInternalInstance;
|
3483 | },
|
3484 |
|
3485 | has: function (key) {
|
3486 | return key._reactInternalInstance !== undefined;
|
3487 | },
|
3488 |
|
3489 | set: function (key, value) {
|
3490 | key._reactInternalInstance = value;
|
3491 | }
|
3492 | };
|
3493 |
|
3494 | module.exports = ReactInstanceMap;
|
3495 |
|
3496 | }),
|
3497 |
|
3498 | (function(module, exports, __webpack_require__) {
|
3499 |
|
3500 | (function(process) { |
3501 |
|
3502 |
|
3503 |
|
3504 |
|
3505 |
|
3506 |
|
3507 |
|
3508 |
|
3509 | if (process.env.NODE_ENV !== 'production') {
|
3510 | var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
|
3511 | Symbol.for &&
|
3512 | Symbol.for('react.element')) ||
|
3513 | 0xeac7;
|
3514 |
|
3515 | var isValidElement = function(object) {
|
3516 | return typeof object === 'object' &&
|
3517 | object !== null &&
|
3518 | object.$$typeof === REACT_ELEMENT_TYPE;
|
3519 | };
|
3520 |
|
3521 |
|
3522 |
|
3523 | var throwOnDirectAccess = true;
|
3524 | module.exports = __webpack_require__(63)(isValidElement, throwOnDirectAccess);
|
3525 | } else {
|
3526 |
|
3527 |
|
3528 | module.exports = __webpack_require__(195)();
|
3529 | }
|
3530 |
|
3531 | }.call(exports, __webpack_require__(0)))
|
3532 |
|
3533 | }),
|
3534 |
|
3535 | (function(module, exports, __webpack_require__) {
|
3536 |
|
3537 | "use strict";
|
3538 | (function(process) { |
3539 |
|
3540 |
|
3541 |
|
3542 |
|
3543 |
|
3544 |
|
3545 |
|
3546 |
|
3547 |
|
3548 |
|
3549 |
|
3550 |
|
3551 | var canDefineProperty = false;
|
3552 | if (process.env.NODE_ENV !== 'production') {
|
3553 | try {
|
3554 |
|
3555 | Object.defineProperty({}, 'x', { get: function () {} });
|
3556 | canDefineProperty = true;
|
3557 | } catch (x) {
|
3558 |
|
3559 | }
|
3560 | }
|
3561 |
|
3562 | module.exports = canDefineProperty;
|
3563 | }.call(exports, __webpack_require__(0)))
|
3564 |
|
3565 | }),
|
3566 |
|
3567 | (function(module, exports, __webpack_require__) {
|
3568 |
|
3569 | "use strict";
|
3570 | (function(process) { |
3571 |
|
3572 |
|
3573 |
|
3574 |
|
3575 |
|
3576 |
|
3577 |
|
3578 |
|
3579 |
|
3580 |
|
3581 |
|
3582 | var emptyObject = {};
|
3583 |
|
3584 | if (process.env.NODE_ENV !== 'production') {
|
3585 | Object.freeze(emptyObject);
|
3586 | }
|
3587 |
|
3588 | module.exports = emptyObject;
|
3589 | }.call(exports, __webpack_require__(0)))
|
3590 |
|
3591 | }),
|
3592 |
|
3593 | (function(module, exports, __webpack_require__) {
|
3594 |
|
3595 | "use strict";
|
3596 | (function(process) { |
3597 |
|
3598 |
|
3599 |
|
3600 |
|
3601 |
|
3602 |
|
3603 |
|
3604 |
|
3605 |
|
3606 |
|
3607 |
|
3608 |
|
3609 | var _prodInvariant = __webpack_require__(3);
|
3610 |
|
3611 | var invariant = __webpack_require__(1);
|
3612 |
|
3613 |
|
3614 |
|
3615 |
|
3616 | var eventPluginOrder = null;
|
3617 |
|
3618 |
|
3619 |
|
3620 |
|
3621 | var namesToPlugins = {};
|
3622 |
|
3623 |
|
3624 |
|
3625 |
|
3626 |
|
3627 |
|
3628 | function recomputePluginOrdering() {
|
3629 | if (!eventPluginOrder) {
|
3630 |
|
3631 | return;
|
3632 | }
|
3633 | for (var pluginName in namesToPlugins) {
|
3634 | var pluginModule = namesToPlugins[pluginName];
|
3635 | var pluginIndex = eventPluginOrder.indexOf(pluginName);
|
3636 | !(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0;
|
3637 | if (EventPluginRegistry.plugins[pluginIndex]) {
|
3638 | continue;
|
3639 | }
|
3640 | !pluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0;
|
3641 | EventPluginRegistry.plugins[pluginIndex] = pluginModule;
|
3642 | var publishedEvents = pluginModule.eventTypes;
|
3643 | for (var eventName in publishedEvents) {
|
3644 | !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0;
|
3645 | }
|
3646 | }
|
3647 | }
|
3648 |
|
3649 |
|
3650 |
|
3651 |
|
3652 |
|
3653 |
|
3654 |
|
3655 |
|
3656 |
|
3657 | function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
|
3658 | !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0;
|
3659 | EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
|
3660 |
|
3661 | var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
|
3662 | if (phasedRegistrationNames) {
|
3663 | for (var phaseName in phasedRegistrationNames) {
|
3664 | if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
|
3665 | var phasedRegistrationName = phasedRegistrationNames[phaseName];
|
3666 | publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
|
3667 | }
|
3668 | }
|
3669 | return true;
|
3670 | } else if (dispatchConfig.registrationName) {
|
3671 | publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
|
3672 | return true;
|
3673 | }
|
3674 | return false;
|
3675 | }
|
3676 |
|
3677 |
|
3678 |
|
3679 |
|
3680 |
|
3681 |
|
3682 |
|
3683 |
|
3684 |
|
3685 | function publishRegistrationName(registrationName, pluginModule, eventName) {
|
3686 | !!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0;
|
3687 | EventPluginRegistry.registrationNameModules[registrationName] = pluginModule;
|
3688 | EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
|
3689 |
|
3690 | if (process.env.NODE_ENV !== 'production') {
|
3691 | var lowerCasedName = registrationName.toLowerCase();
|
3692 | EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
|
3693 |
|
3694 | if (registrationName === 'onDoubleClick') {
|
3695 | EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
|
3696 | }
|
3697 | }
|
3698 | }
|
3699 |
|
3700 |
|
3701 |
|
3702 |
|
3703 |
|
3704 |
|
3705 | var EventPluginRegistry = {
|
3706 | |
3707 |
|
3708 |
|
3709 | plugins: [],
|
3710 |
|
3711 | |
3712 |
|
3713 |
|
3714 | eventNameDispatchConfigs: {},
|
3715 |
|
3716 | |
3717 |
|
3718 |
|
3719 | registrationNameModules: {},
|
3720 |
|
3721 | |
3722 |
|
3723 |
|
3724 | registrationNameDependencies: {},
|
3725 |
|
3726 | |
3727 |
|
3728 |
|
3729 |
|
3730 |
|
3731 |
|
3732 | possibleRegistrationNames: process.env.NODE_ENV !== 'production' ? {} : null,
|
3733 |
|
3734 |
|
3735 | |
3736 |
|
3737 |
|
3738 |
|
3739 |
|
3740 |
|
3741 |
|
3742 |
|
3743 |
|
3744 | injectEventPluginOrder: function (injectedEventPluginOrder) {
|
3745 | !!eventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0;
|
3746 |
|
3747 | eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
|
3748 | recomputePluginOrdering();
|
3749 | },
|
3750 |
|
3751 | |
3752 |
|
3753 |
|
3754 |
|
3755 |
|
3756 |
|
3757 |
|
3758 |
|
3759 |
|
3760 |
|
3761 | injectEventPluginsByName: function (injectedNamesToPlugins) {
|
3762 | var isOrderingDirty = false;
|
3763 | for (var pluginName in injectedNamesToPlugins) {
|
3764 | if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
|
3765 | continue;
|
3766 | }
|
3767 | var pluginModule = injectedNamesToPlugins[pluginName];
|
3768 | if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
|
3769 | !!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0;
|
3770 | namesToPlugins[pluginName] = pluginModule;
|
3771 | isOrderingDirty = true;
|
3772 | }
|
3773 | }
|
3774 | if (isOrderingDirty) {
|
3775 | recomputePluginOrdering();
|
3776 | }
|
3777 | },
|
3778 |
|
3779 | |
3780 |
|
3781 |
|
3782 |
|
3783 |
|
3784 |
|
3785 |
|
3786 | getPluginModuleForEvent: function (event) {
|
3787 | var dispatchConfig = event.dispatchConfig;
|
3788 | if (dispatchConfig.registrationName) {
|
3789 | return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;
|
3790 | }
|
3791 | if (dispatchConfig.phasedRegistrationNames !== undefined) {
|
3792 |
|
3793 |
|
3794 | var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
|
3795 |
|
3796 | for (var phase in phasedRegistrationNames) {
|
3797 | if (!phasedRegistrationNames.hasOwnProperty(phase)) {
|
3798 | continue;
|
3799 | }
|
3800 | var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]];
|
3801 | if (pluginModule) {
|
3802 | return pluginModule;
|
3803 | }
|
3804 | }
|
3805 | }
|
3806 | return null;
|
3807 | },
|
3808 |
|
3809 | |
3810 |
|
3811 |
|
3812 |
|
3813 | _resetEventPlugins: function () {
|
3814 | eventPluginOrder = null;
|
3815 | for (var pluginName in namesToPlugins) {
|
3816 | if (namesToPlugins.hasOwnProperty(pluginName)) {
|
3817 | delete namesToPlugins[pluginName];
|
3818 | }
|
3819 | }
|
3820 | EventPluginRegistry.plugins.length = 0;
|
3821 |
|
3822 | var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
|
3823 | for (var eventName in eventNameDispatchConfigs) {
|
3824 | if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {
|
3825 | delete eventNameDispatchConfigs[eventName];
|
3826 | }
|
3827 | }
|
3828 |
|
3829 | var registrationNameModules = EventPluginRegistry.registrationNameModules;
|
3830 | for (var registrationName in registrationNameModules) {
|
3831 | if (registrationNameModules.hasOwnProperty(registrationName)) {
|
3832 | delete registrationNameModules[registrationName];
|
3833 | }
|
3834 | }
|
3835 |
|
3836 | if (process.env.NODE_ENV !== 'production') {
|
3837 | var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;
|
3838 | for (var lowerCasedName in possibleRegistrationNames) {
|
3839 | if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {
|
3840 | delete possibleRegistrationNames[lowerCasedName];
|
3841 | }
|
3842 | }
|
3843 | }
|
3844 | }
|
3845 | };
|
3846 |
|
3847 | module.exports = EventPluginRegistry;
|
3848 | }.call(exports, __webpack_require__(0)))
|
3849 |
|
3850 | }),
|
3851 |
|
3852 | (function(module, exports, __webpack_require__) {
|
3853 |
|
3854 | "use strict";
|
3855 | (function(process) { |
3856 |
|
3857 |
|
3858 |
|
3859 |
|
3860 |
|
3861 |
|
3862 |
|
3863 |
|
3864 |
|
3865 |
|
3866 |
|
3867 |
|
3868 | var _prodInvariant = __webpack_require__(3);
|
3869 |
|
3870 | var invariant = __webpack_require__(1);
|
3871 |
|
3872 | var OBSERVED_ERROR = {};
|
3873 |
|
3874 |
|
3875 |
|
3876 |
|
3877 |
|
3878 |
|
3879 |
|
3880 |
|
3881 |
|
3882 |
|
3883 |
|
3884 |
|
3885 |
|
3886 |
|
3887 |
|
3888 |
|
3889 |
|
3890 |
|
3891 |
|
3892 |
|
3893 |
|
3894 |
|
3895 |
|
3896 |
|
3897 |
|
3898 |
|
3899 |
|
3900 |
|
3901 |
|
3902 |
|
3903 |
|
3904 |
|
3905 |
|
3906 |
|
3907 |
|
3908 |
|
3909 |
|
3910 |
|
3911 |
|
3912 |
|
3913 |
|
3914 |
|
3915 |
|
3916 |
|
3917 |
|
3918 |
|
3919 |
|
3920 |
|
3921 |
|
3922 |
|
3923 |
|
3924 |
|
3925 |
|
3926 |
|
3927 |
|
3928 |
|
3929 |
|
3930 |
|
3931 |
|
3932 |
|
3933 |
|
3934 |
|
3935 | var TransactionImpl = {
|
3936 | |
3937 |
|
3938 |
|
3939 |
|
3940 |
|
3941 |
|
3942 |
|
3943 | reinitializeTransaction: function () {
|
3944 | this.transactionWrappers = this.getTransactionWrappers();
|
3945 | if (this.wrapperInitData) {
|
3946 | this.wrapperInitData.length = 0;
|
3947 | } else {
|
3948 | this.wrapperInitData = [];
|
3949 | }
|
3950 | this._isInTransaction = false;
|
3951 | },
|
3952 |
|
3953 | _isInTransaction: false,
|
3954 |
|
3955 | |
3956 |
|
3957 |
|
3958 |
|
3959 | getTransactionWrappers: null,
|
3960 |
|
3961 | isInTransaction: function () {
|
3962 | return !!this._isInTransaction;
|
3963 | },
|
3964 |
|
3965 |
|
3966 |
|
3967 | |
3968 |
|
3969 |
|
3970 |
|
3971 |
|
3972 |
|
3973 |
|
3974 |
|
3975 |
|
3976 |
|
3977 |
|
3978 |
|
3979 |
|
3980 |
|
3981 |
|
3982 |
|
3983 |
|
3984 | perform: function (method, scope, a, b, c, d, e, f) {
|
3985 |
|
3986 | !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;
|
3987 | var errorThrown;
|
3988 | var ret;
|
3989 | try {
|
3990 | this._isInTransaction = true;
|
3991 |
|
3992 |
|
3993 |
|
3994 |
|
3995 | errorThrown = true;
|
3996 | this.initializeAll(0);
|
3997 | ret = method.call(scope, a, b, c, d, e, f);
|
3998 | errorThrown = false;
|
3999 | } finally {
|
4000 | try {
|
4001 | if (errorThrown) {
|
4002 |
|
4003 |
|
4004 | try {
|
4005 | this.closeAll(0);
|
4006 | } catch (err) {}
|
4007 | } else {
|
4008 |
|
4009 |
|
4010 | this.closeAll(0);
|
4011 | }
|
4012 | } finally {
|
4013 | this._isInTransaction = false;
|
4014 | }
|
4015 | }
|
4016 | return ret;
|
4017 | },
|
4018 |
|
4019 | initializeAll: function (startIndex) {
|
4020 | var transactionWrappers = this.transactionWrappers;
|
4021 | for (var i = startIndex; i < transactionWrappers.length; i++) {
|
4022 | var wrapper = transactionWrappers[i];
|
4023 | try {
|
4024 |
|
4025 |
|
4026 |
|
4027 |
|
4028 | this.wrapperInitData[i] = OBSERVED_ERROR;
|
4029 | this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;
|
4030 | } finally {
|
4031 | if (this.wrapperInitData[i] === OBSERVED_ERROR) {
|
4032 |
|
4033 |
|
4034 |
|
4035 | try {
|
4036 | this.initializeAll(i + 1);
|
4037 | } catch (err) {}
|
4038 | }
|
4039 | }
|
4040 | }
|
4041 | },
|
4042 |
|
4043 | |
4044 |
|
4045 |
|
4046 |
|
4047 |
|
4048 |
|
4049 | closeAll: function (startIndex) {
|
4050 | !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0;
|
4051 | var transactionWrappers = this.transactionWrappers;
|
4052 | for (var i = startIndex; i < transactionWrappers.length; i++) {
|
4053 | var wrapper = transactionWrappers[i];
|
4054 | var initData = this.wrapperInitData[i];
|
4055 | var errorThrown;
|
4056 | try {
|
4057 |
|
4058 |
|
4059 |
|
4060 |
|
4061 | errorThrown = true;
|
4062 | if (initData !== OBSERVED_ERROR && wrapper.close) {
|
4063 | wrapper.close.call(this, initData);
|
4064 | }
|
4065 | errorThrown = false;
|
4066 | } finally {
|
4067 | if (errorThrown) {
|
4068 |
|
4069 |
|
4070 |
|
4071 | try {
|
4072 | this.closeAll(i + 1);
|
4073 | } catch (e) {}
|
4074 | }
|
4075 | }
|
4076 | }
|
4077 | this.wrapperInitData.length = 0;
|
4078 | }
|
4079 | };
|
4080 |
|
4081 | module.exports = TransactionImpl;
|
4082 | }.call(exports, __webpack_require__(0)))
|
4083 |
|
4084 | }),
|
4085 |
|
4086 | (function(module, exports, __webpack_require__) {
|
4087 |
|
4088 | "use strict";
|
4089 |
|
4090 |
|
4091 |
|
4092 |
|
4093 |
|
4094 |
|
4095 |
|
4096 |
|
4097 |
|
4098 |
|
4099 |
|
4100 |
|
4101 | var SyntheticUIEvent = __webpack_require__(23);
|
4102 | var ViewportMetrics = __webpack_require__(72);
|
4103 |
|
4104 | var getEventModifierState = __webpack_require__(42);
|
4105 |
|
4106 |
|
4107 |
|
4108 |
|
4109 |
|
4110 | var MouseEventInterface = {
|
4111 | screenX: null,
|
4112 | screenY: null,
|
4113 | clientX: null,
|
4114 | clientY: null,
|
4115 | ctrlKey: null,
|
4116 | shiftKey: null,
|
4117 | altKey: null,
|
4118 | metaKey: null,
|
4119 | getModifierState: getEventModifierState,
|
4120 | button: function (event) {
|
4121 |
|
4122 |
|
4123 |
|
4124 | var button = event.button;
|
4125 | if ('which' in event) {
|
4126 | return button;
|
4127 | }
|
4128 |
|
4129 |
|
4130 |
|
4131 |
|
4132 | return button === 2 ? 2 : button === 4 ? 1 : 0;
|
4133 | },
|
4134 | buttons: null,
|
4135 | relatedTarget: function (event) {
|
4136 | return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
|
4137 | },
|
4138 |
|
4139 | pageX: function (event) {
|
4140 | return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;
|
4141 | },
|
4142 | pageY: function (event) {
|
4143 | return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;
|
4144 | }
|
4145 | };
|
4146 |
|
4147 |
|
4148 |
|
4149 |
|
4150 |
|
4151 |
|
4152 |
|
4153 | function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
4154 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
4155 | }
|
4156 |
|
4157 | SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
|
4158 |
|
4159 | module.exports = SyntheticMouseEvent;
|
4160 |
|
4161 | }),
|
4162 |
|
4163 | (function(module, exports, __webpack_require__) {
|
4164 |
|
4165 | "use strict";
|
4166 |
|
4167 |
|
4168 |
|
4169 |
|
4170 |
|
4171 |
|
4172 |
|
4173 |
|
4174 |
|
4175 |
|
4176 |
|
4177 |
|
4178 | var ExecutionEnvironment = __webpack_require__(6);
|
4179 | var DOMNamespaces = __webpack_require__(44);
|
4180 |
|
4181 | var WHITESPACE_TEST = /^[ \r\n\t\f]/;
|
4182 | var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;
|
4183 |
|
4184 | var createMicrosoftUnsafeLocalFunction = __webpack_require__(45);
|
4185 |
|
4186 |
|
4187 | var reusableSVGContainer;
|
4188 |
|
4189 |
|
4190 |
|
4191 |
|
4192 |
|
4193 |
|
4194 |
|
4195 |
|
4196 |
|
4197 | var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
|
4198 |
|
4199 |
|
4200 |
|
4201 | if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {
|
4202 | reusableSVGContainer = reusableSVGContainer || document.createElement('div');
|
4203 | reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';
|
4204 | var svgNode = reusableSVGContainer.firstChild;
|
4205 | while (svgNode.firstChild) {
|
4206 | node.appendChild(svgNode.firstChild);
|
4207 | }
|
4208 | } else {
|
4209 | node.innerHTML = html;
|
4210 | }
|
4211 | });
|
4212 |
|
4213 | if (ExecutionEnvironment.canUseDOM) {
|
4214 |
|
4215 |
|
4216 |
|
4217 |
|
4218 |
|
4219 |
|
4220 | var testElement = document.createElement('div');
|
4221 | testElement.innerHTML = ' ';
|
4222 | if (testElement.innerHTML === '') {
|
4223 | setInnerHTML = function (node, html) {
|
4224 |
|
4225 |
|
4226 |
|
4227 |
|
4228 |
|
4229 | if (node.parentNode) {
|
4230 | node.parentNode.replaceChild(node, node);
|
4231 | }
|
4232 |
|
4233 |
|
4234 |
|
4235 |
|
4236 |
|
4237 | if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) {
|
4238 |
|
4239 |
|
4240 |
|
4241 |
|
4242 |
|
4243 |
|
4244 | node.innerHTML = String.fromCharCode(0xfeff) + html;
|
4245 |
|
4246 |
|
4247 |
|
4248 | var textNode = node.firstChild;
|
4249 | if (textNode.data.length === 1) {
|
4250 | node.removeChild(textNode);
|
4251 | } else {
|
4252 | textNode.deleteData(0, 1);
|
4253 | }
|
4254 | } else {
|
4255 | node.innerHTML = html;
|
4256 | }
|
4257 | };
|
4258 | }
|
4259 | testElement = null;
|
4260 | }
|
4261 |
|
4262 | module.exports = setInnerHTML;
|
4263 |
|
4264 | }),
|
4265 |
|
4266 | (function(module, exports, __webpack_require__) {
|
4267 |
|
4268 | "use strict";
|
4269 |
|
4270 |
|
4271 |
|
4272 |
|
4273 |
|
4274 |
|
4275 |
|
4276 |
|
4277 |
|
4278 |
|
4279 |
|
4280 |
|
4281 |
|
4282 |
|
4283 |
|
4284 |
|
4285 |
|
4286 |
|
4287 |
|
4288 |
|
4289 |
|
4290 |
|
4291 |
|
4292 |
|
4293 |
|
4294 |
|
4295 |
|
4296 |
|
4297 |
|
4298 |
|
4299 |
|
4300 |
|
4301 |
|
4302 |
|
4303 |
|
4304 |
|
4305 |
|
4306 |
|
4307 |
|
4308 |
|
4309 |
|
4310 |
|
4311 |
|
4312 | var matchHtmlRegExp = /["'&<>]/;
|
4313 |
|
4314 |
|
4315 |
|
4316 |
|
4317 |
|
4318 |
|
4319 |
|
4320 |
|
4321 |
|
4322 | function escapeHtml(string) {
|
4323 | var str = '' + string;
|
4324 | var match = matchHtmlRegExp.exec(str);
|
4325 |
|
4326 | if (!match) {
|
4327 | return str;
|
4328 | }
|
4329 |
|
4330 | var escape;
|
4331 | var html = '';
|
4332 | var index = 0;
|
4333 | var lastIndex = 0;
|
4334 |
|
4335 | for (index = match.index; index < str.length; index++) {
|
4336 | switch (str.charCodeAt(index)) {
|
4337 | case 34:
|
4338 |
|
4339 | escape = '"';
|
4340 | break;
|
4341 | case 38:
|
4342 |
|
4343 | escape = '&';
|
4344 | break;
|
4345 | case 39:
|
4346 |
|
4347 | escape = ''';
|
4348 | break;
|
4349 | case 60:
|
4350 |
|
4351 | escape = '<';
|
4352 | break;
|
4353 | case 62:
|
4354 |
|
4355 | escape = '>';
|
4356 | break;
|
4357 | default:
|
4358 | continue;
|
4359 | }
|
4360 |
|
4361 | if (lastIndex !== index) {
|
4362 | html += str.substring(lastIndex, index);
|
4363 | }
|
4364 |
|
4365 | lastIndex = index + 1;
|
4366 | html += escape;
|
4367 | }
|
4368 |
|
4369 | return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
|
4370 | }
|
4371 |
|
4372 |
|
4373 |
|
4374 |
|
4375 |
|
4376 |
|
4377 |
|
4378 |
|
4379 | function escapeTextContentForBrowser(text) {
|
4380 | if (typeof text === 'boolean' || typeof text === 'number') {
|
4381 |
|
4382 |
|
4383 |
|
4384 | return '' + text;
|
4385 | }
|
4386 | return escapeHtml(text);
|
4387 | }
|
4388 |
|
4389 | module.exports = escapeTextContentForBrowser;
|
4390 |
|
4391 | }),
|
4392 |
|
4393 | (function(module, exports, __webpack_require__) {
|
4394 |
|
4395 | "use strict";
|
4396 |
|
4397 |
|
4398 |
|
4399 |
|
4400 |
|
4401 |
|
4402 |
|
4403 |
|
4404 |
|
4405 |
|
4406 |
|
4407 |
|
4408 | var _assign = __webpack_require__(4);
|
4409 |
|
4410 | var EventPluginRegistry = __webpack_require__(28);
|
4411 | var ReactEventEmitterMixin = __webpack_require__(140);
|
4412 | var ViewportMetrics = __webpack_require__(72);
|
4413 |
|
4414 | var getVendorPrefixedEventName = __webpack_require__(141);
|
4415 | var isEventSupported = __webpack_require__(41);
|
4416 |
|
4417 |
|
4418 |
|
4419 |
|
4420 |
|
4421 |
|
4422 |
|
4423 |
|
4424 |
|
4425 |
|
4426 |
|
4427 |
|
4428 |
|
4429 |
|
4430 |
|
4431 |
|
4432 |
|
4433 |
|
4434 |
|
4435 |
|
4436 |
|
4437 |
|
4438 |
|
4439 |
|
4440 |
|
4441 |
|
4442 |
|
4443 |
|
4444 |
|
4445 |
|
4446 |
|
4447 |
|
4448 |
|
4449 |
|
4450 |
|
4451 |
|
4452 |
|
4453 |
|
4454 |
|
4455 |
|
4456 |
|
4457 |
|
4458 |
|
4459 |
|
4460 |
|
4461 |
|
4462 |
|
4463 |
|
4464 |
|
4465 |
|
4466 |
|
4467 |
|
4468 |
|
4469 |
|
4470 |
|
4471 |
|
4472 | var hasEventPageXY;
|
4473 | var alreadyListeningTo = {};
|
4474 | var isMonitoringScrollValue = false;
|
4475 | var reactTopListenersCounter = 0;
|
4476 |
|
4477 |
|
4478 |
|
4479 |
|
4480 | var topEventMapping = {
|
4481 | topAbort: 'abort',
|
4482 | topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
|
4483 | topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',
|
4484 | topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',
|
4485 | topBlur: 'blur',
|
4486 | topCanPlay: 'canplay',
|
4487 | topCanPlayThrough: 'canplaythrough',
|
4488 | topChange: 'change',
|
4489 | topClick: 'click',
|
4490 | topCompositionEnd: 'compositionend',
|
4491 | topCompositionStart: 'compositionstart',
|
4492 | topCompositionUpdate: 'compositionupdate',
|
4493 | topContextMenu: 'contextmenu',
|
4494 | topCopy: 'copy',
|
4495 | topCut: 'cut',
|
4496 | topDoubleClick: 'dblclick',
|
4497 | topDrag: 'drag',
|
4498 | topDragEnd: 'dragend',
|
4499 | topDragEnter: 'dragenter',
|
4500 | topDragExit: 'dragexit',
|
4501 | topDragLeave: 'dragleave',
|
4502 | topDragOver: 'dragover',
|
4503 | topDragStart: 'dragstart',
|
4504 | topDrop: 'drop',
|
4505 | topDurationChange: 'durationchange',
|
4506 | topEmptied: 'emptied',
|
4507 | topEncrypted: 'encrypted',
|
4508 | topEnded: 'ended',
|
4509 | topError: 'error',
|
4510 | topFocus: 'focus',
|
4511 | topInput: 'input',
|
4512 | topKeyDown: 'keydown',
|
4513 | topKeyPress: 'keypress',
|
4514 | topKeyUp: 'keyup',
|
4515 | topLoadedData: 'loadeddata',
|
4516 | topLoadedMetadata: 'loadedmetadata',
|
4517 | topLoadStart: 'loadstart',
|
4518 | topMouseDown: 'mousedown',
|
4519 | topMouseMove: 'mousemove',
|
4520 | topMouseOut: 'mouseout',
|
4521 | topMouseOver: 'mouseover',
|
4522 | topMouseUp: 'mouseup',
|
4523 | topPaste: 'paste',
|
4524 | topPause: 'pause',
|
4525 | topPlay: 'play',
|
4526 | topPlaying: 'playing',
|
4527 | topProgress: 'progress',
|
4528 | topRateChange: 'ratechange',
|
4529 | topScroll: 'scroll',
|
4530 | topSeeked: 'seeked',
|
4531 | topSeeking: 'seeking',
|
4532 | topSelectionChange: 'selectionchange',
|
4533 | topStalled: 'stalled',
|
4534 | topSuspend: 'suspend',
|
4535 | topTextInput: 'textInput',
|
4536 | topTimeUpdate: 'timeupdate',
|
4537 | topTouchCancel: 'touchcancel',
|
4538 | topTouchEnd: 'touchend',
|
4539 | topTouchMove: 'touchmove',
|
4540 | topTouchStart: 'touchstart',
|
4541 | topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',
|
4542 | topVolumeChange: 'volumechange',
|
4543 | topWaiting: 'waiting',
|
4544 | topWheel: 'wheel'
|
4545 | };
|
4546 |
|
4547 |
|
4548 |
|
4549 |
|
4550 | var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);
|
4551 |
|
4552 | function getListeningForDocument(mountAt) {
|
4553 |
|
4554 |
|
4555 | if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
|
4556 | mountAt[topListenersIDKey] = reactTopListenersCounter++;
|
4557 | alreadyListeningTo[mountAt[topListenersIDKey]] = {};
|
4558 | }
|
4559 | return alreadyListeningTo[mountAt[topListenersIDKey]];
|
4560 | }
|
4561 |
|
4562 |
|
4563 |
|
4564 |
|
4565 |
|
4566 |
|
4567 |
|
4568 |
|
4569 |
|
4570 |
|
4571 |
|
4572 | var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
|
4573 | |
4574 |
|
4575 |
|
4576 | ReactEventListener: null,
|
4577 |
|
4578 | injection: {
|
4579 | |
4580 |
|
4581 |
|
4582 | injectReactEventListener: function (ReactEventListener) {
|
4583 | ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);
|
4584 | ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
|
4585 | }
|
4586 | },
|
4587 |
|
4588 | |
4589 |
|
4590 |
|
4591 |
|
4592 |
|
4593 | setEnabled: function (enabled) {
|
4594 | if (ReactBrowserEventEmitter.ReactEventListener) {
|
4595 | ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
|
4596 | }
|
4597 | },
|
4598 |
|
4599 | |
4600 |
|
4601 |
|
4602 | isEnabled: function () {
|
4603 | return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());
|
4604 | },
|
4605 |
|
4606 | |
4607 |
|
4608 |
|
4609 |
|
4610 |
|
4611 |
|
4612 |
|
4613 |
|
4614 |
|
4615 |
|
4616 |
|
4617 |
|
4618 |
|
4619 |
|
4620 |
|
4621 |
|
4622 |
|
4623 |
|
4624 |
|
4625 |
|
4626 |
|
4627 | listenTo: function (registrationName, contentDocumentHandle) {
|
4628 | var mountAt = contentDocumentHandle;
|
4629 | var isListening = getListeningForDocument(mountAt);
|
4630 | var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
|
4631 |
|
4632 | for (var i = 0; i < dependencies.length; i++) {
|
4633 | var dependency = dependencies[i];
|
4634 | if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
|
4635 | if (dependency === 'topWheel') {
|
4636 | if (isEventSupported('wheel')) {
|
4637 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt);
|
4638 | } else if (isEventSupported('mousewheel')) {
|
4639 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt);
|
4640 | } else {
|
4641 |
|
4642 |
|
4643 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
|
4644 | }
|
4645 | } else if (dependency === 'topScroll') {
|
4646 | if (isEventSupported('scroll', true)) {
|
4647 | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);
|
4648 | } else {
|
4649 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
|
4650 | }
|
4651 | } else if (dependency === 'topFocus' || dependency === 'topBlur') {
|
4652 | if (isEventSupported('focus', true)) {
|
4653 | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);
|
4654 | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);
|
4655 | } else if (isEventSupported('focusin')) {
|
4656 |
|
4657 |
|
4658 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt);
|
4659 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt);
|
4660 | }
|
4661 |
|
4662 |
|
4663 | isListening.topBlur = true;
|
4664 | isListening.topFocus = true;
|
4665 | } else if (topEventMapping.hasOwnProperty(dependency)) {
|
4666 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
|
4667 | }
|
4668 |
|
4669 | isListening[dependency] = true;
|
4670 | }
|
4671 | }
|
4672 | },
|
4673 |
|
4674 | trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
|
4675 | return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
|
4676 | },
|
4677 |
|
4678 | trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
|
4679 | return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
|
4680 | },
|
4681 |
|
4682 | |
4683 |
|
4684 |
|
4685 |
|
4686 |
|
4687 | supportsEventPageXY: function () {
|
4688 | if (!document.createEvent) {
|
4689 | return false;
|
4690 | }
|
4691 | var ev = document.createEvent('MouseEvent');
|
4692 | return ev != null && 'pageX' in ev;
|
4693 | },
|
4694 |
|
4695 | |
4696 |
|
4697 |
|
4698 |
|
4699 |
|
4700 |
|
4701 |
|
4702 |
|
4703 |
|
4704 |
|
4705 |
|
4706 | ensureScrollValueMonitoring: function () {
|
4707 | if (hasEventPageXY === undefined) {
|
4708 | hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
|
4709 | }
|
4710 | if (!hasEventPageXY && !isMonitoringScrollValue) {
|
4711 | var refresh = ViewportMetrics.refreshScrollValues;
|
4712 | ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
|
4713 | isMonitoringScrollValue = true;
|
4714 | }
|
4715 | }
|
4716 | });
|
4717 |
|
4718 | module.exports = ReactBrowserEventEmitter;
|
4719 |
|
4720 | }),
|
4721 |
|
4722 | (function(module, exports) {
|
4723 |
|
4724 |
|
4725 |
|
4726 |
|
4727 |
|
4728 |
|
4729 | module.exports = function(useSourceMap) {
|
4730 | var list = [];
|
4731 |
|
4732 |
|
4733 | list.toString = function toString() {
|
4734 | return this.map(function (item) {
|
4735 | var content = cssWithMappingToString(item, useSourceMap);
|
4736 | if(item[2]) {
|
4737 | return "@media " + item[2] + "{" + content + "}";
|
4738 | } else {
|
4739 | return content;
|
4740 | }
|
4741 | }).join("");
|
4742 | };
|
4743 |
|
4744 |
|
4745 | list.i = function(modules, mediaQuery) {
|
4746 | if(typeof modules === "string")
|
4747 | modules = [[null, modules, ""]];
|
4748 | var alreadyImportedModules = {};
|
4749 | for(var i = 0; i < this.length; i++) {
|
4750 | var id = this[i][0];
|
4751 | if(typeof id === "number")
|
4752 | alreadyImportedModules[id] = true;
|
4753 | }
|
4754 | for(i = 0; i < modules.length; i++) {
|
4755 | var item = modules[i];
|
4756 |
|
4757 |
|
4758 |
|
4759 |
|
4760 | if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
|
4761 | if(mediaQuery && !item[2]) {
|
4762 | item[2] = mediaQuery;
|
4763 | } else if(mediaQuery) {
|
4764 | item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
|
4765 | }
|
4766 | list.push(item);
|
4767 | }
|
4768 | }
|
4769 | };
|
4770 | return list;
|
4771 | };
|
4772 |
|
4773 | function cssWithMappingToString(item, useSourceMap) {
|
4774 | var content = item[1] || '';
|
4775 | var cssMapping = item[3];
|
4776 | if (!cssMapping) {
|
4777 | return content;
|
4778 | }
|
4779 |
|
4780 | if (useSourceMap && typeof btoa === 'function') {
|
4781 | var sourceMapping = toComment(cssMapping);
|
4782 | var sourceURLs = cssMapping.sources.map(function (source) {
|
4783 | return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
|
4784 | });
|
4785 |
|
4786 | return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
|
4787 | }
|
4788 |
|
4789 | return [content].join('\n');
|
4790 | }
|
4791 |
|
4792 |
|
4793 | function toComment(sourceMap) {
|
4794 |
|
4795 | var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
|
4796 | var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
|
4797 |
|
4798 | return '/*# ' + data + ' */';
|
4799 | }
|
4800 |
|
4801 |
|
4802 | }),
|
4803 |
|
4804 | (function(module, exports, __webpack_require__) {
|
4805 |
|
4806 |
|
4807 |
|
4808 |
|
4809 |
|
4810 |
|
4811 | var stylesInDom = {};
|
4812 |
|
4813 | var memoize = function (fn) {
|
4814 | var memo;
|
4815 |
|
4816 | return function () {
|
4817 | if (typeof memo === "undefined") memo = fn.apply(this, arguments);
|
4818 | return memo;
|
4819 | };
|
4820 | };
|
4821 |
|
4822 | var isOldIE = memoize(function () {
|
4823 |
|
4824 |
|
4825 |
|
4826 |
|
4827 |
|
4828 | return window && document && document.all && !window.atob;
|
4829 | });
|
4830 |
|
4831 | var getElement = (function (fn) {
|
4832 | var memo = {};
|
4833 |
|
4834 | return function(selector) {
|
4835 | if (typeof memo[selector] === "undefined") {
|
4836 | memo[selector] = fn.call(this, selector);
|
4837 | }
|
4838 |
|
4839 | return memo[selector]
|
4840 | };
|
4841 | })(function (target) {
|
4842 | return document.querySelector(target)
|
4843 | });
|
4844 |
|
4845 | var singleton = null;
|
4846 | var singletonCounter = 0;
|
4847 | var stylesInsertedAtTop = [];
|
4848 |
|
4849 | var fixUrls = __webpack_require__(198);
|
4850 |
|
4851 | module.exports = function(list, options) {
|
4852 | if (typeof DEBUG !== "undefined" && DEBUG) {
|
4853 | if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
|
4854 | }
|
4855 |
|
4856 | options = options || {};
|
4857 |
|
4858 | options.attrs = typeof options.attrs === "object" ? options.attrs : {};
|
4859 |
|
4860 |
|
4861 |
|
4862 | if (!options.singleton) options.singleton = isOldIE();
|
4863 |
|
4864 |
|
4865 | if (!options.insertInto) options.insertInto = "head";
|
4866 |
|
4867 |
|
4868 | if (!options.insertAt) options.insertAt = "bottom";
|
4869 |
|
4870 | var styles = listToStyles(list, options);
|
4871 |
|
4872 | addStylesToDom(styles, options);
|
4873 |
|
4874 | return function update (newList) {
|
4875 | var mayRemove = [];
|
4876 |
|
4877 | for (var i = 0; i < styles.length; i++) {
|
4878 | var item = styles[i];
|
4879 | var domStyle = stylesInDom[item.id];
|
4880 |
|
4881 | domStyle.refs--;
|
4882 | mayRemove.push(domStyle);
|
4883 | }
|
4884 |
|
4885 | if(newList) {
|
4886 | var newStyles = listToStyles(newList, options);
|
4887 | addStylesToDom(newStyles, options);
|
4888 | }
|
4889 |
|
4890 | for (var i = 0; i < mayRemove.length; i++) {
|
4891 | var domStyle = mayRemove[i];
|
4892 |
|
4893 | if(domStyle.refs === 0) {
|
4894 | for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
|
4895 |
|
4896 | delete stylesInDom[domStyle.id];
|
4897 | }
|
4898 | }
|
4899 | };
|
4900 | };
|
4901 |
|
4902 | function addStylesToDom (styles, options) {
|
4903 | for (var i = 0; i < styles.length; i++) {
|
4904 | var item = styles[i];
|
4905 | var domStyle = stylesInDom[item.id];
|
4906 |
|
4907 | if(domStyle) {
|
4908 | domStyle.refs++;
|
4909 |
|
4910 | for(var j = 0; j < domStyle.parts.length; j++) {
|
4911 | domStyle.parts[j](item.parts[j]);
|
4912 | }
|
4913 |
|
4914 | for(; j < item.parts.length; j++) {
|
4915 | domStyle.parts.push(addStyle(item.parts[j], options));
|
4916 | }
|
4917 | } else {
|
4918 | var parts = [];
|
4919 |
|
4920 | for(var j = 0; j < item.parts.length; j++) {
|
4921 | parts.push(addStyle(item.parts[j], options));
|
4922 | }
|
4923 |
|
4924 | stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
|
4925 | }
|
4926 | }
|
4927 | }
|
4928 |
|
4929 | function listToStyles (list, options) {
|
4930 | var styles = [];
|
4931 | var newStyles = {};
|
4932 |
|
4933 | for (var i = 0; i < list.length; i++) {
|
4934 | var item = list[i];
|
4935 | var id = options.base ? item[0] + options.base : item[0];
|
4936 | var css = item[1];
|
4937 | var media = item[2];
|
4938 | var sourceMap = item[3];
|
4939 | var part = {css: css, media: media, sourceMap: sourceMap};
|
4940 |
|
4941 | if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
|
4942 | else newStyles[id].parts.push(part);
|
4943 | }
|
4944 |
|
4945 | return styles;
|
4946 | }
|
4947 |
|
4948 | function insertStyleElement (options, style) {
|
4949 | var target = getElement(options.insertInto)
|
4950 |
|
4951 | if (!target) {
|
4952 | throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
|
4953 | }
|
4954 |
|
4955 | var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
|
4956 |
|
4957 | if (options.insertAt === "top") {
|
4958 | if (!lastStyleElementInsertedAtTop) {
|
4959 | target.insertBefore(style, target.firstChild);
|
4960 | } else if (lastStyleElementInsertedAtTop.nextSibling) {
|
4961 | target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
|
4962 | } else {
|
4963 | target.appendChild(style);
|
4964 | }
|
4965 | stylesInsertedAtTop.push(style);
|
4966 | } else if (options.insertAt === "bottom") {
|
4967 | target.appendChild(style);
|
4968 | } else {
|
4969 | throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
|
4970 | }
|
4971 | }
|
4972 |
|
4973 | function removeStyleElement (style) {
|
4974 | if (style.parentNode === null) return false;
|
4975 | style.parentNode.removeChild(style);
|
4976 |
|
4977 | var idx = stylesInsertedAtTop.indexOf(style);
|
4978 | if(idx >= 0) {
|
4979 | stylesInsertedAtTop.splice(idx, 1);
|
4980 | }
|
4981 | }
|
4982 |
|
4983 | function createStyleElement (options) {
|
4984 | var style = document.createElement("style");
|
4985 |
|
4986 | options.attrs.type = "text/css";
|
4987 |
|
4988 | addAttrs(style, options.attrs);
|
4989 | insertStyleElement(options, style);
|
4990 |
|
4991 | return style;
|
4992 | }
|
4993 |
|
4994 | function createLinkElement (options) {
|
4995 | var link = document.createElement("link");
|
4996 |
|
4997 | options.attrs.type = "text/css";
|
4998 | options.attrs.rel = "stylesheet";
|
4999 |
|
5000 | addAttrs(link, options.attrs);
|
5001 | insertStyleElement(options, link);
|
5002 |
|
5003 | return link;
|
5004 | }
|
5005 |
|
5006 | function addAttrs (el, attrs) {
|
5007 | Object.keys(attrs).forEach(function (key) {
|
5008 | el.setAttribute(key, attrs[key]);
|
5009 | });
|
5010 | }
|
5011 |
|
5012 | function addStyle (obj, options) {
|
5013 | var style, update, remove, result;
|
5014 |
|
5015 |
|
5016 | if (options.transform && obj.css) {
|
5017 | result = options.transform(obj.css);
|
5018 |
|
5019 | if (result) {
|
5020 |
|
5021 |
|
5022 | obj.css = result;
|
5023 | } else {
|
5024 |
|
5025 |
|
5026 | return function() {
|
5027 |
|
5028 | };
|
5029 | }
|
5030 | }
|
5031 |
|
5032 | if (options.singleton) {
|
5033 | var styleIndex = singletonCounter++;
|
5034 |
|
5035 | style = singleton || (singleton = createStyleElement(options));
|
5036 |
|
5037 | update = applyToSingletonTag.bind(null, style, styleIndex, false);
|
5038 | remove = applyToSingletonTag.bind(null, style, styleIndex, true);
|
5039 |
|
5040 | } else if (
|
5041 | obj.sourceMap &&
|
5042 | typeof URL === "function" &&
|
5043 | typeof URL.createObjectURL === "function" &&
|
5044 | typeof URL.revokeObjectURL === "function" &&
|
5045 | typeof Blob === "function" &&
|
5046 | typeof btoa === "function"
|
5047 | ) {
|
5048 | style = createLinkElement(options);
|
5049 | update = updateLink.bind(null, style, options);
|
5050 | remove = function () {
|
5051 | removeStyleElement(style);
|
5052 |
|
5053 | if(style.href) URL.revokeObjectURL(style.href);
|
5054 | };
|
5055 | } else {
|
5056 | style = createStyleElement(options);
|
5057 | update = applyToTag.bind(null, style);
|
5058 | remove = function () {
|
5059 | removeStyleElement(style);
|
5060 | };
|
5061 | }
|
5062 |
|
5063 | update(obj);
|
5064 |
|
5065 | return function updateStyle (newObj) {
|
5066 | if (newObj) {
|
5067 | if (
|
5068 | newObj.css === obj.css &&
|
5069 | newObj.media === obj.media &&
|
5070 | newObj.sourceMap === obj.sourceMap
|
5071 | ) {
|
5072 | return;
|
5073 | }
|
5074 |
|
5075 | update(obj = newObj);
|
5076 | } else {
|
5077 | remove();
|
5078 | }
|
5079 | };
|
5080 | }
|
5081 |
|
5082 | var replaceText = (function () {
|
5083 | var textStore = [];
|
5084 |
|
5085 | return function (index, replacement) {
|
5086 | textStore[index] = replacement;
|
5087 |
|
5088 | return textStore.filter(Boolean).join('\n');
|
5089 | };
|
5090 | })();
|
5091 |
|
5092 | function applyToSingletonTag (style, index, remove, obj) {
|
5093 | var css = remove ? "" : obj.css;
|
5094 |
|
5095 | if (style.styleSheet) {
|
5096 | style.styleSheet.cssText = replaceText(index, css);
|
5097 | } else {
|
5098 | var cssNode = document.createTextNode(css);
|
5099 | var childNodes = style.childNodes;
|
5100 |
|
5101 | if (childNodes[index]) style.removeChild(childNodes[index]);
|
5102 |
|
5103 | if (childNodes.length) {
|
5104 | style.insertBefore(cssNode, childNodes[index]);
|
5105 | } else {
|
5106 | style.appendChild(cssNode);
|
5107 | }
|
5108 | }
|
5109 | }
|
5110 |
|
5111 | function applyToTag (style, obj) {
|
5112 | var css = obj.css;
|
5113 | var media = obj.media;
|
5114 |
|
5115 | if(media) {
|
5116 | style.setAttribute("media", media)
|
5117 | }
|
5118 |
|
5119 | if(style.styleSheet) {
|
5120 | style.styleSheet.cssText = css;
|
5121 | } else {
|
5122 | while(style.firstChild) {
|
5123 | style.removeChild(style.firstChild);
|
5124 | }
|
5125 |
|
5126 | style.appendChild(document.createTextNode(css));
|
5127 | }
|
5128 | }
|
5129 |
|
5130 | function updateLink (link, options, obj) {
|
5131 | var css = obj.css;
|
5132 | var sourceMap = obj.sourceMap;
|
5133 |
|
5134 | |
5135 |
|
5136 |
|
5137 |
|
5138 |
|
5139 |
|
5140 | var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
|
5141 |
|
5142 | if (options.convertToAbsoluteUrls || autoFixUrls) {
|
5143 | css = fixUrls(css);
|
5144 | }
|
5145 |
|
5146 | if (sourceMap) {
|
5147 |
|
5148 | css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
|
5149 | }
|
5150 |
|
5151 | var blob = new Blob([css], { type: "text/css" });
|
5152 |
|
5153 | var oldSrc = link.href;
|
5154 |
|
5155 | link.href = URL.createObjectURL(blob);
|
5156 |
|
5157 | if(oldSrc) URL.revokeObjectURL(oldSrc);
|
5158 | }
|
5159 |
|
5160 |
|
5161 | }),
|
5162 |
|
5163 | (function(module, exports, __webpack_require__) {
|
5164 |
|
5165 | "use strict";
|
5166 | (function(process) { |
5167 |
|
5168 |
|
5169 |
|
5170 |
|
5171 |
|
5172 |
|
5173 |
|
5174 |
|
5175 |
|
5176 |
|
5177 |
|
5178 |
|
5179 |
|
5180 |
|
5181 |
|
5182 |
|
5183 |
|
5184 |
|
5185 |
|
5186 |
|
5187 |
|
5188 |
|
5189 |
|
5190 |
|
5191 |
|
5192 | var lowPriorityWarning = function () {};
|
5193 |
|
5194 | if (process.env.NODE_ENV !== 'production') {
|
5195 | var printWarning = function (format) {
|
5196 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
5197 | args[_key - 1] = arguments[_key];
|
5198 | }
|
5199 |
|
5200 | var argIndex = 0;
|
5201 | var message = 'Warning: ' + format.replace(/%s/g, function () {
|
5202 | return args[argIndex++];
|
5203 | });
|
5204 | if (typeof console !== 'undefined') {
|
5205 | console.warn(message);
|
5206 | }
|
5207 | try {
|
5208 |
|
5209 |
|
5210 |
|
5211 | throw new Error(message);
|
5212 | } catch (x) {}
|
5213 | };
|
5214 |
|
5215 | lowPriorityWarning = function (condition, format) {
|
5216 | if (format === undefined) {
|
5217 | throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
5218 | }
|
5219 | if (!condition) {
|
5220 | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
5221 | args[_key2 - 2] = arguments[_key2];
|
5222 | }
|
5223 |
|
5224 | printWarning.apply(undefined, [format].concat(args));
|
5225 | }
|
5226 | };
|
5227 | }
|
5228 |
|
5229 | module.exports = lowPriorityWarning;
|
5230 | }.call(exports, __webpack_require__(0)))
|
5231 |
|
5232 | }),
|
5233 |
|
5234 | (function(module, exports, __webpack_require__) {
|
5235 |
|
5236 | "use strict";
|
5237 |
|
5238 |
|
5239 |
|
5240 |
|
5241 |
|
5242 |
|
5243 |
|
5244 |
|
5245 |
|
5246 |
|
5247 |
|
5248 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
5249 |
|
5250 | module.exports = ReactPropTypesSecret;
|
5251 |
|
5252 |
|
5253 | }),
|
5254 |
|
5255 | (function(module, exports, __webpack_require__) {
|
5256 |
|
5257 | "use strict";
|
5258 | (function(process) { |
5259 |
|
5260 |
|
5261 |
|
5262 |
|
5263 |
|
5264 |
|
5265 |
|
5266 |
|
5267 |
|
5268 |
|
5269 |
|
5270 | var _prodInvariant = __webpack_require__(3);
|
5271 |
|
5272 | var ReactErrorUtils = __webpack_require__(39);
|
5273 |
|
5274 | var invariant = __webpack_require__(1);
|
5275 | var warning = __webpack_require__(2);
|
5276 |
|
5277 |
|
5278 |
|
5279 |
|
5280 |
|
5281 |
|
5282 |
|
5283 |
|
5284 |
|
5285 | var ComponentTree;
|
5286 | var TreeTraversal;
|
5287 | var injection = {
|
5288 | injectComponentTree: function (Injected) {
|
5289 | ComponentTree = Injected;
|
5290 | if (process.env.NODE_ENV !== 'production') {
|
5291 | process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
|
5292 | }
|
5293 | },
|
5294 | injectTreeTraversal: function (Injected) {
|
5295 | TreeTraversal = Injected;
|
5296 | if (process.env.NODE_ENV !== 'production') {
|
5297 | process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0;
|
5298 | }
|
5299 | }
|
5300 | };
|
5301 |
|
5302 | function isEndish(topLevelType) {
|
5303 | return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel';
|
5304 | }
|
5305 |
|
5306 | function isMoveish(topLevelType) {
|
5307 | return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove';
|
5308 | }
|
5309 | function isStartish(topLevelType) {
|
5310 | return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';
|
5311 | }
|
5312 |
|
5313 | var validateEventDispatches;
|
5314 | if (process.env.NODE_ENV !== 'production') {
|
5315 | validateEventDispatches = function (event) {
|
5316 | var dispatchListeners = event._dispatchListeners;
|
5317 | var dispatchInstances = event._dispatchInstances;
|
5318 |
|
5319 | var listenersIsArr = Array.isArray(dispatchListeners);
|
5320 | var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
|
5321 |
|
5322 | var instancesIsArr = Array.isArray(dispatchInstances);
|
5323 | var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
|
5324 |
|
5325 | process.env.NODE_ENV !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0;
|
5326 | };
|
5327 | }
|
5328 |
|
5329 |
|
5330 |
|
5331 |
|
5332 |
|
5333 |
|
5334 |
|
5335 |
|
5336 | function executeDispatch(event, simulated, listener, inst) {
|
5337 | var type = event.type || 'unknown-event';
|
5338 | event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
|
5339 | if (simulated) {
|
5340 | ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);
|
5341 | } else {
|
5342 | ReactErrorUtils.invokeGuardedCallback(type, listener, event);
|
5343 | }
|
5344 | event.currentTarget = null;
|
5345 | }
|
5346 |
|
5347 |
|
5348 |
|
5349 |
|
5350 | function executeDispatchesInOrder(event, simulated) {
|
5351 | var dispatchListeners = event._dispatchListeners;
|
5352 | var dispatchInstances = event._dispatchInstances;
|
5353 | if (process.env.NODE_ENV !== 'production') {
|
5354 | validateEventDispatches(event);
|
5355 | }
|
5356 | if (Array.isArray(dispatchListeners)) {
|
5357 | for (var i = 0; i < dispatchListeners.length; i++) {
|
5358 | if (event.isPropagationStopped()) {
|
5359 | break;
|
5360 | }
|
5361 |
|
5362 | executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
|
5363 | }
|
5364 | } else if (dispatchListeners) {
|
5365 | executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
|
5366 | }
|
5367 | event._dispatchListeners = null;
|
5368 | event._dispatchInstances = null;
|
5369 | }
|
5370 |
|
5371 |
|
5372 |
|
5373 |
|
5374 |
|
5375 |
|
5376 |
|
5377 |
|
5378 | function executeDispatchesInOrderStopAtTrueImpl(event) {
|
5379 | var dispatchListeners = event._dispatchListeners;
|
5380 | var dispatchInstances = event._dispatchInstances;
|
5381 | if (process.env.NODE_ENV !== 'production') {
|
5382 | validateEventDispatches(event);
|
5383 | }
|
5384 | if (Array.isArray(dispatchListeners)) {
|
5385 | for (var i = 0; i < dispatchListeners.length; i++) {
|
5386 | if (event.isPropagationStopped()) {
|
5387 | break;
|
5388 | }
|
5389 |
|
5390 | if (dispatchListeners[i](event, dispatchInstances[i])) {
|
5391 | return dispatchInstances[i];
|
5392 | }
|
5393 | }
|
5394 | } else if (dispatchListeners) {
|
5395 | if (dispatchListeners(event, dispatchInstances)) {
|
5396 | return dispatchInstances;
|
5397 | }
|
5398 | }
|
5399 | return null;
|
5400 | }
|
5401 |
|
5402 |
|
5403 |
|
5404 |
|
5405 | function executeDispatchesInOrderStopAtTrue(event) {
|
5406 | var ret = executeDispatchesInOrderStopAtTrueImpl(event);
|
5407 | event._dispatchInstances = null;
|
5408 | event._dispatchListeners = null;
|
5409 | return ret;
|
5410 | }
|
5411 |
|
5412 |
|
5413 |
|
5414 |
|
5415 |
|
5416 |
|
5417 |
|
5418 |
|
5419 |
|
5420 |
|
5421 | function executeDirectDispatch(event) {
|
5422 | if (process.env.NODE_ENV !== 'production') {
|
5423 | validateEventDispatches(event);
|
5424 | }
|
5425 | var dispatchListener = event._dispatchListeners;
|
5426 | var dispatchInstance = event._dispatchInstances;
|
5427 | !!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0;
|
5428 | event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
|
5429 | var res = dispatchListener ? dispatchListener(event) : null;
|
5430 | event.currentTarget = null;
|
5431 | event._dispatchListeners = null;
|
5432 | event._dispatchInstances = null;
|
5433 | return res;
|
5434 | }
|
5435 |
|
5436 |
|
5437 |
|
5438 |
|
5439 |
|
5440 | function hasDispatches(event) {
|
5441 | return !!event._dispatchListeners;
|
5442 | }
|
5443 |
|
5444 |
|
5445 |
|
5446 |
|
5447 | var EventPluginUtils = {
|
5448 | isEndish: isEndish,
|
5449 | isMoveish: isMoveish,
|
5450 | isStartish: isStartish,
|
5451 |
|
5452 | executeDirectDispatch: executeDirectDispatch,
|
5453 | executeDispatchesInOrder: executeDispatchesInOrder,
|
5454 | executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
|
5455 | hasDispatches: hasDispatches,
|
5456 |
|
5457 | getInstanceFromNode: function (node) {
|
5458 | return ComponentTree.getInstanceFromNode(node);
|
5459 | },
|
5460 | getNodeFromInstance: function (node) {
|
5461 | return ComponentTree.getNodeFromInstance(node);
|
5462 | },
|
5463 | isAncestor: function (a, b) {
|
5464 | return TreeTraversal.isAncestor(a, b);
|
5465 | },
|
5466 | getLowestCommonAncestor: function (a, b) {
|
5467 | return TreeTraversal.getLowestCommonAncestor(a, b);
|
5468 | },
|
5469 | getParentInstance: function (inst) {
|
5470 | return TreeTraversal.getParentInstance(inst);
|
5471 | },
|
5472 | traverseTwoPhase: function (target, fn, arg) {
|
5473 | return TreeTraversal.traverseTwoPhase(target, fn, arg);
|
5474 | },
|
5475 | traverseEnterLeave: function (from, to, fn, argFrom, argTo) {
|
5476 | return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);
|
5477 | },
|
5478 |
|
5479 | injection: injection
|
5480 | };
|
5481 |
|
5482 | module.exports = EventPluginUtils;
|
5483 | }.call(exports, __webpack_require__(0)))
|
5484 |
|
5485 | }),
|
5486 |
|
5487 | (function(module, exports, __webpack_require__) {
|
5488 |
|
5489 | "use strict";
|
5490 | (function(process) { |
5491 |
|
5492 |
|
5493 |
|
5494 |
|
5495 |
|
5496 |
|
5497 |
|
5498 |
|
5499 |
|
5500 |
|
5501 |
|
5502 |
|
5503 | var caughtError = null;
|
5504 |
|
5505 |
|
5506 |
|
5507 |
|
5508 |
|
5509 |
|
5510 |
|
5511 |
|
5512 |
|
5513 | function invokeGuardedCallback(name, func, a) {
|
5514 | try {
|
5515 | func(a);
|
5516 | } catch (x) {
|
5517 | if (caughtError === null) {
|
5518 | caughtError = x;
|
5519 | }
|
5520 | }
|
5521 | }
|
5522 |
|
5523 | var ReactErrorUtils = {
|
5524 | invokeGuardedCallback: invokeGuardedCallback,
|
5525 |
|
5526 | |
5527 |
|
5528 |
|
5529 |
|
5530 | invokeGuardedCallbackWithCatch: invokeGuardedCallback,
|
5531 |
|
5532 | |
5533 |
|
5534 |
|
5535 |
|
5536 | rethrowCaughtError: function () {
|
5537 | if (caughtError) {
|
5538 | var error = caughtError;
|
5539 | caughtError = null;
|
5540 | throw error;
|
5541 | }
|
5542 | }
|
5543 | };
|
5544 |
|
5545 | if (process.env.NODE_ENV !== 'production') {
|
5546 | |
5547 |
|
5548 |
|
5549 |
|
5550 | if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
|
5551 | var fakeNode = document.createElement('react');
|
5552 | ReactErrorUtils.invokeGuardedCallback = function (name, func, a) {
|
5553 | var boundFunc = func.bind(null, a);
|
5554 | var evtType = 'react-' + name;
|
5555 | fakeNode.addEventListener(evtType, boundFunc, false);
|
5556 | var evt = document.createEvent('Event');
|
5557 | evt.initEvent(evtType, false, false);
|
5558 | fakeNode.dispatchEvent(evt);
|
5559 | fakeNode.removeEventListener(evtType, boundFunc, false);
|
5560 | };
|
5561 | }
|
5562 | }
|
5563 |
|
5564 | module.exports = ReactErrorUtils;
|
5565 | }.call(exports, __webpack_require__(0)))
|
5566 |
|
5567 | }),
|
5568 |
|
5569 | (function(module, exports, __webpack_require__) {
|
5570 |
|
5571 | "use strict";
|
5572 |
|
5573 |
|
5574 |
|
5575 |
|
5576 |
|
5577 |
|
5578 |
|
5579 |
|
5580 |
|
5581 |
|
5582 |
|
5583 |
|
5584 |
|
5585 |
|
5586 |
|
5587 |
|
5588 |
|
5589 |
|
5590 |
|
5591 |
|
5592 | function getEventTarget(nativeEvent) {
|
5593 | var target = nativeEvent.target || nativeEvent.srcElement || window;
|
5594 |
|
5595 |
|
5596 | if (target.correspondingUseElement) {
|
5597 | target = target.correspondingUseElement;
|
5598 | }
|
5599 |
|
5600 |
|
5601 |
|
5602 | return target.nodeType === 3 ? target.parentNode : target;
|
5603 | }
|
5604 |
|
5605 | module.exports = getEventTarget;
|
5606 |
|
5607 | }),
|
5608 |
|
5609 | (function(module, exports, __webpack_require__) {
|
5610 |
|
5611 | "use strict";
|
5612 |
|
5613 |
|
5614 |
|
5615 |
|
5616 |
|
5617 |
|
5618 |
|
5619 |
|
5620 |
|
5621 |
|
5622 |
|
5623 |
|
5624 | var ExecutionEnvironment = __webpack_require__(6);
|
5625 |
|
5626 | var useHasFeature;
|
5627 | if (ExecutionEnvironment.canUseDOM) {
|
5628 | useHasFeature = document.implementation && document.implementation.hasFeature &&
|
5629 |
|
5630 |
|
5631 | document.implementation.hasFeature('', '') !== true;
|
5632 | }
|
5633 |
|
5634 |
|
5635 |
|
5636 |
|
5637 |
|
5638 |
|
5639 |
|
5640 |
|
5641 |
|
5642 |
|
5643 |
|
5644 |
|
5645 |
|
5646 |
|
5647 |
|
5648 | function isEventSupported(eventNameSuffix, capture) {
|
5649 | if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) {
|
5650 | return false;
|
5651 | }
|
5652 |
|
5653 | var eventName = 'on' + eventNameSuffix;
|
5654 | var isSupported = eventName in document;
|
5655 |
|
5656 | if (!isSupported) {
|
5657 | var element = document.createElement('div');
|
5658 | element.setAttribute(eventName, 'return;');
|
5659 | isSupported = typeof element[eventName] === 'function';
|
5660 | }
|
5661 |
|
5662 | if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
|
5663 |
|
5664 | isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
|
5665 | }
|
5666 |
|
5667 | return isSupported;
|
5668 | }
|
5669 |
|
5670 | module.exports = isEventSupported;
|
5671 |
|
5672 | }),
|
5673 |
|
5674 | (function(module, exports, __webpack_require__) {
|
5675 |
|
5676 | "use strict";
|
5677 |
|
5678 |
|
5679 |
|
5680 |
|
5681 |
|
5682 |
|
5683 |
|
5684 |
|
5685 |
|
5686 |
|
5687 |
|
5688 |
|
5689 |
|
5690 |
|
5691 |
|
5692 |
|
5693 |
|
5694 | var modifierKeyToProp = {
|
5695 | Alt: 'altKey',
|
5696 | Control: 'ctrlKey',
|
5697 | Meta: 'metaKey',
|
5698 | Shift: 'shiftKey'
|
5699 | };
|
5700 |
|
5701 |
|
5702 |
|
5703 |
|
5704 | function modifierStateGetter(keyArg) {
|
5705 | var syntheticEvent = this;
|
5706 | var nativeEvent = syntheticEvent.nativeEvent;
|
5707 | if (nativeEvent.getModifierState) {
|
5708 | return nativeEvent.getModifierState(keyArg);
|
5709 | }
|
5710 | var keyProp = modifierKeyToProp[keyArg];
|
5711 | return keyProp ? !!nativeEvent[keyProp] : false;
|
5712 | }
|
5713 |
|
5714 | function getEventModifierState(nativeEvent) {
|
5715 | return modifierStateGetter;
|
5716 | }
|
5717 |
|
5718 | module.exports = getEventModifierState;
|
5719 |
|
5720 | }),
|
5721 |
|
5722 | (function(module, exports, __webpack_require__) {
|
5723 |
|
5724 | "use strict";
|
5725 | (function(process) { |
5726 |
|
5727 |
|
5728 |
|
5729 |
|
5730 |
|
5731 |
|
5732 |
|
5733 |
|
5734 |
|
5735 |
|
5736 |
|
5737 | var DOMLazyTree = __webpack_require__(20);
|
5738 | var Danger = __webpack_require__(125);
|
5739 | var ReactDOMComponentTree = __webpack_require__(5);
|
5740 | var ReactInstrumentation = __webpack_require__(9);
|
5741 |
|
5742 | var createMicrosoftUnsafeLocalFunction = __webpack_require__(45);
|
5743 | var setInnerHTML = __webpack_require__(31);
|
5744 | var setTextContent = __webpack_require__(73);
|
5745 |
|
5746 | function getNodeAfter(parentNode, node) {
|
5747 |
|
5748 |
|
5749 | if (Array.isArray(node)) {
|
5750 | node = node[1];
|
5751 | }
|
5752 | return node ? node.nextSibling : parentNode.firstChild;
|
5753 | }
|
5754 |
|
5755 |
|
5756 |
|
5757 |
|
5758 |
|
5759 |
|
5760 |
|
5761 |
|
5762 |
|
5763 | var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {
|
5764 |
|
5765 |
|
5766 |
|
5767 | parentNode.insertBefore(childNode, referenceNode);
|
5768 | });
|
5769 |
|
5770 | function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
|
5771 | DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);
|
5772 | }
|
5773 |
|
5774 | function moveChild(parentNode, childNode, referenceNode) {
|
5775 | if (Array.isArray(childNode)) {
|
5776 | moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);
|
5777 | } else {
|
5778 | insertChildAt(parentNode, childNode, referenceNode);
|
5779 | }
|
5780 | }
|
5781 |
|
5782 | function removeChild(parentNode, childNode) {
|
5783 | if (Array.isArray(childNode)) {
|
5784 | var closingComment = childNode[1];
|
5785 | childNode = childNode[0];
|
5786 | removeDelimitedText(parentNode, childNode, closingComment);
|
5787 | parentNode.removeChild(closingComment);
|
5788 | }
|
5789 | parentNode.removeChild(childNode);
|
5790 | }
|
5791 |
|
5792 | function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {
|
5793 | var node = openingComment;
|
5794 | while (true) {
|
5795 | var nextNode = node.nextSibling;
|
5796 | insertChildAt(parentNode, node, referenceNode);
|
5797 | if (node === closingComment) {
|
5798 | break;
|
5799 | }
|
5800 | node = nextNode;
|
5801 | }
|
5802 | }
|
5803 |
|
5804 | function removeDelimitedText(parentNode, startNode, closingComment) {
|
5805 | while (true) {
|
5806 | var node = startNode.nextSibling;
|
5807 | if (node === closingComment) {
|
5808 |
|
5809 | break;
|
5810 | } else {
|
5811 | parentNode.removeChild(node);
|
5812 | }
|
5813 | }
|
5814 | }
|
5815 |
|
5816 | function replaceDelimitedText(openingComment, closingComment, stringText) {
|
5817 | var parentNode = openingComment.parentNode;
|
5818 | var nodeAfterComment = openingComment.nextSibling;
|
5819 | if (nodeAfterComment === closingComment) {
|
5820 |
|
5821 |
|
5822 | if (stringText) {
|
5823 | insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);
|
5824 | }
|
5825 | } else {
|
5826 | if (stringText) {
|
5827 |
|
5828 |
|
5829 | setTextContent(nodeAfterComment, stringText);
|
5830 | removeDelimitedText(parentNode, nodeAfterComment, closingComment);
|
5831 | } else {
|
5832 | removeDelimitedText(parentNode, openingComment, closingComment);
|
5833 | }
|
5834 | }
|
5835 |
|
5836 | if (process.env.NODE_ENV !== 'production') {
|
5837 | ReactInstrumentation.debugTool.onHostOperation({
|
5838 | instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID,
|
5839 | type: 'replace text',
|
5840 | payload: stringText
|
5841 | });
|
5842 | }
|
5843 | }
|
5844 |
|
5845 | var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup;
|
5846 | if (process.env.NODE_ENV !== 'production') {
|
5847 | dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) {
|
5848 | Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);
|
5849 | if (prevInstance._debugID !== 0) {
|
5850 | ReactInstrumentation.debugTool.onHostOperation({
|
5851 | instanceID: prevInstance._debugID,
|
5852 | type: 'replace with',
|
5853 | payload: markup.toString()
|
5854 | });
|
5855 | } else {
|
5856 | var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);
|
5857 | if (nextInstance._debugID !== 0) {
|
5858 | ReactInstrumentation.debugTool.onHostOperation({
|
5859 | instanceID: nextInstance._debugID,
|
5860 | type: 'mount',
|
5861 | payload: markup.toString()
|
5862 | });
|
5863 | }
|
5864 | }
|
5865 | };
|
5866 | }
|
5867 |
|
5868 |
|
5869 |
|
5870 |
|
5871 | var DOMChildrenOperations = {
|
5872 | dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
|
5873 |
|
5874 | replaceDelimitedText: replaceDelimitedText,
|
5875 |
|
5876 | |
5877 |
|
5878 |
|
5879 |
|
5880 |
|
5881 |
|
5882 |
|
5883 | processUpdates: function (parentNode, updates) {
|
5884 | if (process.env.NODE_ENV !== 'production') {
|
5885 | var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID;
|
5886 | }
|
5887 |
|
5888 | for (var k = 0; k < updates.length; k++) {
|
5889 | var update = updates[k];
|
5890 | switch (update.type) {
|
5891 | case 'INSERT_MARKUP':
|
5892 | insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));
|
5893 | if (process.env.NODE_ENV !== 'production') {
|
5894 | ReactInstrumentation.debugTool.onHostOperation({
|
5895 | instanceID: parentNodeDebugID,
|
5896 | type: 'insert child',
|
5897 | payload: {
|
5898 | toIndex: update.toIndex,
|
5899 | content: update.content.toString()
|
5900 | }
|
5901 | });
|
5902 | }
|
5903 | break;
|
5904 | case 'MOVE_EXISTING':
|
5905 | moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));
|
5906 | if (process.env.NODE_ENV !== 'production') {
|
5907 | ReactInstrumentation.debugTool.onHostOperation({
|
5908 | instanceID: parentNodeDebugID,
|
5909 | type: 'move child',
|
5910 | payload: { fromIndex: update.fromIndex, toIndex: update.toIndex }
|
5911 | });
|
5912 | }
|
5913 | break;
|
5914 | case 'SET_MARKUP':
|
5915 | setInnerHTML(parentNode, update.content);
|
5916 | if (process.env.NODE_ENV !== 'production') {
|
5917 | ReactInstrumentation.debugTool.onHostOperation({
|
5918 | instanceID: parentNodeDebugID,
|
5919 | type: 'replace children',
|
5920 | payload: update.content.toString()
|
5921 | });
|
5922 | }
|
5923 | break;
|
5924 | case 'TEXT_CONTENT':
|
5925 | setTextContent(parentNode, update.content);
|
5926 | if (process.env.NODE_ENV !== 'production') {
|
5927 | ReactInstrumentation.debugTool.onHostOperation({
|
5928 | instanceID: parentNodeDebugID,
|
5929 | type: 'replace text',
|
5930 | payload: update.content.toString()
|
5931 | });
|
5932 | }
|
5933 | break;
|
5934 | case 'REMOVE_NODE':
|
5935 | removeChild(parentNode, update.fromNode);
|
5936 | if (process.env.NODE_ENV !== 'production') {
|
5937 | ReactInstrumentation.debugTool.onHostOperation({
|
5938 | instanceID: parentNodeDebugID,
|
5939 | type: 'remove child',
|
5940 | payload: { fromIndex: update.fromIndex }
|
5941 | });
|
5942 | }
|
5943 | break;
|
5944 | }
|
5945 | }
|
5946 | }
|
5947 | };
|
5948 |
|
5949 | module.exports = DOMChildrenOperations;
|
5950 | }.call(exports, __webpack_require__(0)))
|
5951 |
|
5952 | }),
|
5953 |
|
5954 | (function(module, exports, __webpack_require__) {
|
5955 |
|
5956 | "use strict";
|
5957 |
|
5958 |
|
5959 |
|
5960 |
|
5961 |
|
5962 |
|
5963 |
|
5964 |
|
5965 |
|
5966 |
|
5967 |
|
5968 |
|
5969 | var DOMNamespaces = {
|
5970 | html: 'http://www.w3.org/1999/xhtml',
|
5971 | mathml: 'http://www.w3.org/1998/Math/MathML',
|
5972 | svg: 'http://www.w3.org/2000/svg'
|
5973 | };
|
5974 |
|
5975 | module.exports = DOMNamespaces;
|
5976 |
|
5977 | }),
|
5978 |
|
5979 | (function(module, exports, __webpack_require__) {
|
5980 |
|
5981 | "use strict";
|
5982 |
|
5983 |
|
5984 |
|
5985 |
|
5986 |
|
5987 |
|
5988 |
|
5989 |
|
5990 |
|
5991 |
|
5992 |
|
5993 |
|
5994 |
|
5995 |
|
5996 |
|
5997 |
|
5998 |
|
5999 |
|
6000 | var createMicrosoftUnsafeLocalFunction = function (func) {
|
6001 | if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
|
6002 | return function (arg0, arg1, arg2, arg3) {
|
6003 | MSApp.execUnsafeLocalFunction(function () {
|
6004 | return func(arg0, arg1, arg2, arg3);
|
6005 | });
|
6006 | };
|
6007 | } else {
|
6008 | return func;
|
6009 | }
|
6010 | };
|
6011 |
|
6012 | module.exports = createMicrosoftUnsafeLocalFunction;
|
6013 |
|
6014 | }),
|
6015 |
|
6016 | (function(module, exports, __webpack_require__) {
|
6017 |
|
6018 | "use strict";
|
6019 | (function(process) { |
6020 |
|
6021 |
|
6022 |
|
6023 |
|
6024 |
|
6025 |
|
6026 |
|
6027 |
|
6028 |
|
6029 |
|
6030 |
|
6031 | var _prodInvariant = __webpack_require__(3);
|
6032 |
|
6033 | var ReactPropTypesSecret = __webpack_require__(77);
|
6034 | var propTypesFactory = __webpack_require__(62);
|
6035 |
|
6036 | var React = __webpack_require__(17);
|
6037 | var PropTypes = propTypesFactory(React.isValidElement);
|
6038 |
|
6039 | var invariant = __webpack_require__(1);
|
6040 | var warning = __webpack_require__(2);
|
6041 |
|
6042 | var hasReadOnlyValue = {
|
6043 | button: true,
|
6044 | checkbox: true,
|
6045 | image: true,
|
6046 | hidden: true,
|
6047 | radio: true,
|
6048 | reset: true,
|
6049 | submit: true
|
6050 | };
|
6051 |
|
6052 | function _assertSingleLink(inputProps) {
|
6053 | !(inputProps.checkedLink == null || inputProps.valueLink == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don\'t want to use valueLink and vice versa.') : _prodInvariant('87') : void 0;
|
6054 | }
|
6055 | function _assertValueLink(inputProps) {
|
6056 | _assertSingleLink(inputProps);
|
6057 | !(inputProps.value == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don\'t want to use valueLink.') : _prodInvariant('88') : void 0;
|
6058 | }
|
6059 |
|
6060 | function _assertCheckedLink(inputProps) {
|
6061 | _assertSingleLink(inputProps);
|
6062 | !(inputProps.checked == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don\'t want to use checkedLink') : _prodInvariant('89') : void 0;
|
6063 | }
|
6064 |
|
6065 | var propTypes = {
|
6066 | value: function (props, propName, componentName) {
|
6067 | if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
|
6068 | return null;
|
6069 | }
|
6070 | return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
|
6071 | },
|
6072 | checked: function (props, propName, componentName) {
|
6073 | if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
|
6074 | return null;
|
6075 | }
|
6076 | return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
|
6077 | },
|
6078 | onChange: PropTypes.func
|
6079 | };
|
6080 |
|
6081 | var loggedTypeFailures = {};
|
6082 | function getDeclarationErrorAddendum(owner) {
|
6083 | if (owner) {
|
6084 | var name = owner.getName();
|
6085 | if (name) {
|
6086 | return ' Check the render method of `' + name + '`.';
|
6087 | }
|
6088 | }
|
6089 | return '';
|
6090 | }
|
6091 |
|
6092 |
|
6093 |
|
6094 |
|
6095 |
|
6096 | var LinkedValueUtils = {
|
6097 | checkPropTypes: function (tagName, props, owner) {
|
6098 | for (var propName in propTypes) {
|
6099 | if (propTypes.hasOwnProperty(propName)) {
|
6100 | var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret);
|
6101 | }
|
6102 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
6103 |
|
6104 |
|
6105 | loggedTypeFailures[error.message] = true;
|
6106 |
|
6107 | var addendum = getDeclarationErrorAddendum(owner);
|
6108 | process.env.NODE_ENV !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0;
|
6109 | }
|
6110 | }
|
6111 | },
|
6112 |
|
6113 | |
6114 |
|
6115 |
|
6116 |
|
6117 | getValue: function (inputProps) {
|
6118 | if (inputProps.valueLink) {
|
6119 | _assertValueLink(inputProps);
|
6120 | return inputProps.valueLink.value;
|
6121 | }
|
6122 | return inputProps.value;
|
6123 | },
|
6124 |
|
6125 | |
6126 |
|
6127 |
|
6128 |
|
6129 |
|
6130 | getChecked: function (inputProps) {
|
6131 | if (inputProps.checkedLink) {
|
6132 | _assertCheckedLink(inputProps);
|
6133 | return inputProps.checkedLink.value;
|
6134 | }
|
6135 | return inputProps.checked;
|
6136 | },
|
6137 |
|
6138 | |
6139 |
|
6140 |
|
6141 |
|
6142 | executeOnChange: function (inputProps, event) {
|
6143 | if (inputProps.valueLink) {
|
6144 | _assertValueLink(inputProps);
|
6145 | return inputProps.valueLink.requestChange(event.target.value);
|
6146 | } else if (inputProps.checkedLink) {
|
6147 | _assertCheckedLink(inputProps);
|
6148 | return inputProps.checkedLink.requestChange(event.target.checked);
|
6149 | } else if (inputProps.onChange) {
|
6150 | return inputProps.onChange.call(undefined, event);
|
6151 | }
|
6152 | }
|
6153 | };
|
6154 |
|
6155 | module.exports = LinkedValueUtils;
|
6156 | }.call(exports, __webpack_require__(0)))
|
6157 |
|
6158 | }),
|
6159 |
|
6160 | (function(module, exports, __webpack_require__) {
|
6161 |
|
6162 | "use strict";
|
6163 | (function(process) { |
6164 |
|
6165 |
|
6166 |
|
6167 |
|
6168 |
|
6169 |
|
6170 |
|
6171 |
|
6172 |
|
6173 |
|
6174 |
|
6175 |
|
6176 | var _prodInvariant = __webpack_require__(3);
|
6177 |
|
6178 | var invariant = __webpack_require__(1);
|
6179 |
|
6180 | var injected = false;
|
6181 |
|
6182 | var ReactComponentEnvironment = {
|
6183 | |
6184 |
|
6185 |
|
6186 |
|
6187 | replaceNodeWithMarkup: null,
|
6188 |
|
6189 | |
6190 |
|
6191 |
|
6192 |
|
6193 | processChildrenUpdates: null,
|
6194 |
|
6195 | injection: {
|
6196 | injectEnvironment: function (environment) {
|
6197 | !!injected ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0;
|
6198 | ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;
|
6199 | ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;
|
6200 | injected = true;
|
6201 | }
|
6202 | }
|
6203 | };
|
6204 |
|
6205 | module.exports = ReactComponentEnvironment;
|
6206 | }.call(exports, __webpack_require__(0)))
|
6207 |
|
6208 | }),
|
6209 |
|
6210 | (function(module, exports, __webpack_require__) {
|
6211 |
|
6212 | "use strict";
|
6213 |
|
6214 |
|
6215 |
|
6216 |
|
6217 |
|
6218 |
|
6219 |
|
6220 |
|
6221 |
|
6222 |
|
6223 |
|
6224 |
|
6225 |
|
6226 |
|
6227 |
|
6228 |
|
6229 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
6230 |
|
6231 |
|
6232 |
|
6233 |
|
6234 |
|
6235 | function is(x, y) {
|
6236 |
|
6237 | if (x === y) {
|
6238 |
|
6239 |
|
6240 |
|
6241 | return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
6242 | } else {
|
6243 |
|
6244 | return x !== x && y !== y;
|
6245 | }
|
6246 | }
|
6247 |
|
6248 |
|
6249 |
|
6250 |
|
6251 |
|
6252 |
|
6253 | function shallowEqual(objA, objB) {
|
6254 | if (is(objA, objB)) {
|
6255 | return true;
|
6256 | }
|
6257 |
|
6258 | if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
|
6259 | return false;
|
6260 | }
|
6261 |
|
6262 | var keysA = Object.keys(objA);
|
6263 | var keysB = Object.keys(objB);
|
6264 |
|
6265 | if (keysA.length !== keysB.length) {
|
6266 | return false;
|
6267 | }
|
6268 |
|
6269 |
|
6270 | for (var i = 0; i < keysA.length; i++) {
|
6271 | if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
|
6272 | return false;
|
6273 | }
|
6274 | }
|
6275 |
|
6276 | return true;
|
6277 | }
|
6278 |
|
6279 | module.exports = shallowEqual;
|
6280 |
|
6281 | }),
|
6282 |
|
6283 | (function(module, exports, __webpack_require__) {
|
6284 |
|
6285 | "use strict";
|
6286 |
|
6287 |
|
6288 |
|
6289 |
|
6290 |
|
6291 |
|
6292 |
|
6293 |
|
6294 |
|
6295 |
|
6296 |
|
6297 |
|
6298 |
|
6299 |
|
6300 |
|
6301 |
|
6302 |
|
6303 |
|
6304 |
|
6305 |
|
6306 |
|
6307 |
|
6308 |
|
6309 |
|
6310 | function shouldUpdateReactComponent(prevElement, nextElement) {
|
6311 | var prevEmpty = prevElement === null || prevElement === false;
|
6312 | var nextEmpty = nextElement === null || nextElement === false;
|
6313 | if (prevEmpty || nextEmpty) {
|
6314 | return prevEmpty === nextEmpty;
|
6315 | }
|
6316 |
|
6317 | var prevType = typeof prevElement;
|
6318 | var nextType = typeof nextElement;
|
6319 | if (prevType === 'string' || prevType === 'number') {
|
6320 | return nextType === 'string' || nextType === 'number';
|
6321 | } else {
|
6322 | return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key;
|
6323 | }
|
6324 | }
|
6325 |
|
6326 | module.exports = shouldUpdateReactComponent;
|
6327 |
|
6328 | }),
|
6329 |
|
6330 | (function(module, exports, __webpack_require__) {
|
6331 |
|
6332 | "use strict";
|
6333 |
|
6334 |
|
6335 |
|
6336 |
|
6337 |
|
6338 |
|
6339 |
|
6340 |
|
6341 |
|
6342 |
|
6343 |
|
6344 |
|
6345 |
|
6346 |
|
6347 |
|
6348 |
|
6349 |
|
6350 |
|
6351 |
|
6352 |
|
6353 | function escape(key) {
|
6354 | var escapeRegex = /[=:]/g;
|
6355 | var escaperLookup = {
|
6356 | '=': '=0',
|
6357 | ':': '=2'
|
6358 | };
|
6359 | var escapedString = ('' + key).replace(escapeRegex, function (match) {
|
6360 | return escaperLookup[match];
|
6361 | });
|
6362 |
|
6363 | return '$' + escapedString;
|
6364 | }
|
6365 |
|
6366 |
|
6367 |
|
6368 |
|
6369 |
|
6370 |
|
6371 |
|
6372 | function unescape(key) {
|
6373 | var unescapeRegex = /(=0|=2)/g;
|
6374 | var unescaperLookup = {
|
6375 | '=0': '=',
|
6376 | '=2': ':'
|
6377 | };
|
6378 | var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
|
6379 |
|
6380 | return ('' + keySubstring).replace(unescapeRegex, function (match) {
|
6381 | return unescaperLookup[match];
|
6382 | });
|
6383 | }
|
6384 |
|
6385 | var KeyEscapeUtils = {
|
6386 | escape: escape,
|
6387 | unescape: unescape
|
6388 | };
|
6389 |
|
6390 | module.exports = KeyEscapeUtils;
|
6391 |
|
6392 | }),
|
6393 |
|
6394 | (function(module, exports, __webpack_require__) {
|
6395 |
|
6396 | "use strict";
|
6397 | (function(process) { |
6398 |
|
6399 |
|
6400 |
|
6401 |
|
6402 |
|
6403 |
|
6404 |
|
6405 |
|
6406 |
|
6407 |
|
6408 |
|
6409 | var _prodInvariant = __webpack_require__(3);
|
6410 |
|
6411 | var ReactCurrentOwner = __webpack_require__(10);
|
6412 | var ReactInstanceMap = __webpack_require__(24);
|
6413 | var ReactInstrumentation = __webpack_require__(9);
|
6414 | var ReactUpdates = __webpack_require__(11);
|
6415 |
|
6416 | var invariant = __webpack_require__(1);
|
6417 | var warning = __webpack_require__(2);
|
6418 |
|
6419 | function enqueueUpdate(internalInstance) {
|
6420 | ReactUpdates.enqueueUpdate(internalInstance);
|
6421 | }
|
6422 |
|
6423 | function formatUnexpectedArgument(arg) {
|
6424 | var type = typeof arg;
|
6425 | if (type !== 'object') {
|
6426 | return type;
|
6427 | }
|
6428 | var displayName = arg.constructor && arg.constructor.name || type;
|
6429 | var keys = Object.keys(arg);
|
6430 | if (keys.length > 0 && keys.length < 20) {
|
6431 | return displayName + ' (keys: ' + keys.join(', ') + ')';
|
6432 | }
|
6433 | return displayName;
|
6434 | }
|
6435 |
|
6436 | function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
|
6437 | var internalInstance = ReactInstanceMap.get(publicInstance);
|
6438 | if (!internalInstance) {
|
6439 | if (process.env.NODE_ENV !== 'production') {
|
6440 | var ctor = publicInstance.constructor;
|
6441 |
|
6442 |
|
6443 |
|
6444 | process.env.NODE_ENV !== 'production' ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, ctor && (ctor.displayName || ctor.name) || 'ReactClass') : void 0;
|
6445 | }
|
6446 | return null;
|
6447 | }
|
6448 |
|
6449 | if (process.env.NODE_ENV !== 'production') {
|
6450 | process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + "within `render` or another component's constructor). Render methods " + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0;
|
6451 | }
|
6452 |
|
6453 | return internalInstance;
|
6454 | }
|
6455 |
|
6456 |
|
6457 |
|
6458 |
|
6459 |
|
6460 | var ReactUpdateQueue = {
|
6461 | |
6462 |
|
6463 |
|
6464 |
|
6465 |
|
6466 |
|
6467 |
|
6468 | isMounted: function (publicInstance) {
|
6469 | if (process.env.NODE_ENV !== 'production') {
|
6470 | var owner = ReactCurrentOwner.current;
|
6471 | if (owner !== null) {
|
6472 | process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;
|
6473 | owner._warnedAboutRefsInRender = true;
|
6474 | }
|
6475 | }
|
6476 | var internalInstance = ReactInstanceMap.get(publicInstance);
|
6477 | if (internalInstance) {
|
6478 |
|
6479 |
|
6480 |
|
6481 | return !!internalInstance._renderedComponent;
|
6482 | } else {
|
6483 | return false;
|
6484 | }
|
6485 | },
|
6486 |
|
6487 | |
6488 |
|
6489 |
|
6490 |
|
6491 |
|
6492 |
|
6493 |
|
6494 |
|
6495 |
|
6496 | enqueueCallback: function (publicInstance, callback, callerName) {
|
6497 | ReactUpdateQueue.validateCallback(callback, callerName);
|
6498 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);
|
6499 |
|
6500 |
|
6501 |
|
6502 |
|
6503 |
|
6504 |
|
6505 | if (!internalInstance) {
|
6506 | return null;
|
6507 | }
|
6508 |
|
6509 | if (internalInstance._pendingCallbacks) {
|
6510 | internalInstance._pendingCallbacks.push(callback);
|
6511 | } else {
|
6512 | internalInstance._pendingCallbacks = [callback];
|
6513 | }
|
6514 |
|
6515 |
|
6516 |
|
6517 |
|
6518 | enqueueUpdate(internalInstance);
|
6519 | },
|
6520 |
|
6521 | enqueueCallbackInternal: function (internalInstance, callback) {
|
6522 | if (internalInstance._pendingCallbacks) {
|
6523 | internalInstance._pendingCallbacks.push(callback);
|
6524 | } else {
|
6525 | internalInstance._pendingCallbacks = [callback];
|
6526 | }
|
6527 | enqueueUpdate(internalInstance);
|
6528 | },
|
6529 |
|
6530 | |
6531 |
|
6532 |
|
6533 |
|
6534 |
|
6535 |
|
6536 |
|
6537 |
|
6538 |
|
6539 |
|
6540 |
|
6541 |
|
6542 |
|
6543 | enqueueForceUpdate: function (publicInstance) {
|
6544 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate');
|
6545 |
|
6546 | if (!internalInstance) {
|
6547 | return;
|
6548 | }
|
6549 |
|
6550 | internalInstance._pendingForceUpdate = true;
|
6551 |
|
6552 | enqueueUpdate(internalInstance);
|
6553 | },
|
6554 |
|
6555 | |
6556 |
|
6557 |
|
6558 |
|
6559 |
|
6560 |
|
6561 |
|
6562 |
|
6563 |
|
6564 |
|
6565 |
|
6566 | enqueueReplaceState: function (publicInstance, completeState, callback) {
|
6567 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState');
|
6568 |
|
6569 | if (!internalInstance) {
|
6570 | return;
|
6571 | }
|
6572 |
|
6573 | internalInstance._pendingStateQueue = [completeState];
|
6574 | internalInstance._pendingReplaceState = true;
|
6575 |
|
6576 |
|
6577 | if (callback !== undefined && callback !== null) {
|
6578 | ReactUpdateQueue.validateCallback(callback, 'replaceState');
|
6579 | if (internalInstance._pendingCallbacks) {
|
6580 | internalInstance._pendingCallbacks.push(callback);
|
6581 | } else {
|
6582 | internalInstance._pendingCallbacks = [callback];
|
6583 | }
|
6584 | }
|
6585 |
|
6586 | enqueueUpdate(internalInstance);
|
6587 | },
|
6588 |
|
6589 | |
6590 |
|
6591 |
|
6592 |
|
6593 |
|
6594 |
|
6595 |
|
6596 |
|
6597 |
|
6598 |
|
6599 | enqueueSetState: function (publicInstance, partialState) {
|
6600 | if (process.env.NODE_ENV !== 'production') {
|
6601 | ReactInstrumentation.debugTool.onSetState();
|
6602 | process.env.NODE_ENV !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0;
|
6603 | }
|
6604 |
|
6605 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState');
|
6606 |
|
6607 | if (!internalInstance) {
|
6608 | return;
|
6609 | }
|
6610 |
|
6611 | var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []);
|
6612 | queue.push(partialState);
|
6613 |
|
6614 | enqueueUpdate(internalInstance);
|
6615 | },
|
6616 |
|
6617 | enqueueElementInternal: function (internalInstance, nextElement, nextContext) {
|
6618 | internalInstance._pendingElement = nextElement;
|
6619 |
|
6620 | internalInstance._context = nextContext;
|
6621 | enqueueUpdate(internalInstance);
|
6622 | },
|
6623 |
|
6624 | validateCallback: function (callback, callerName) {
|
6625 | !(!callback || typeof callback === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) : void 0;
|
6626 | }
|
6627 | };
|
6628 |
|
6629 | module.exports = ReactUpdateQueue;
|
6630 | }.call(exports, __webpack_require__(0)))
|
6631 |
|
6632 | }),
|
6633 |
|
6634 | (function(module, exports, __webpack_require__) {
|
6635 |
|
6636 | "use strict";
|
6637 | (function(process) { |
6638 |
|
6639 |
|
6640 |
|
6641 |
|
6642 |
|
6643 |
|
6644 |
|
6645 |
|
6646 |
|
6647 |
|
6648 |
|
6649 | var _assign = __webpack_require__(4);
|
6650 |
|
6651 | var emptyFunction = __webpack_require__(8);
|
6652 | var warning = __webpack_require__(2);
|
6653 |
|
6654 | var validateDOMNesting = emptyFunction;
|
6655 |
|
6656 | if (process.env.NODE_ENV !== 'production') {
|
6657 |
|
6658 |
|
6659 |
|
6660 |
|
6661 |
|
6662 |
|
6663 |
|
6664 |
|
6665 |
|
6666 |
|
6667 |
|
6668 |
|
6669 | var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp'];
|
6670 |
|
6671 |
|
6672 | var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template',
|
6673 |
|
6674 |
|
6675 |
|
6676 |
|
6677 | 'foreignObject', 'desc', 'title'];
|
6678 |
|
6679 |
|
6680 | var buttonScopeTags = inScopeTags.concat(['button']);
|
6681 |
|
6682 |
|
6683 | var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
|
6684 |
|
6685 | var emptyAncestorInfo = {
|
6686 | current: null,
|
6687 |
|
6688 | formTag: null,
|
6689 | aTagInScope: null,
|
6690 | buttonTagInScope: null,
|
6691 | nobrTagInScope: null,
|
6692 | pTagInButtonScope: null,
|
6693 |
|
6694 | listItemTagAutoclosing: null,
|
6695 | dlItemTagAutoclosing: null
|
6696 | };
|
6697 |
|
6698 | var updatedAncestorInfo = function (oldInfo, tag, instance) {
|
6699 | var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
|
6700 | var info = { tag: tag, instance: instance };
|
6701 |
|
6702 | if (inScopeTags.indexOf(tag) !== -1) {
|
6703 | ancestorInfo.aTagInScope = null;
|
6704 | ancestorInfo.buttonTagInScope = null;
|
6705 | ancestorInfo.nobrTagInScope = null;
|
6706 | }
|
6707 | if (buttonScopeTags.indexOf(tag) !== -1) {
|
6708 | ancestorInfo.pTagInButtonScope = null;
|
6709 | }
|
6710 |
|
6711 |
|
6712 |
|
6713 | if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
|
6714 | ancestorInfo.listItemTagAutoclosing = null;
|
6715 | ancestorInfo.dlItemTagAutoclosing = null;
|
6716 | }
|
6717 |
|
6718 | ancestorInfo.current = info;
|
6719 |
|
6720 | if (tag === 'form') {
|
6721 | ancestorInfo.formTag = info;
|
6722 | }
|
6723 | if (tag === 'a') {
|
6724 | ancestorInfo.aTagInScope = info;
|
6725 | }
|
6726 | if (tag === 'button') {
|
6727 | ancestorInfo.buttonTagInScope = info;
|
6728 | }
|
6729 | if (tag === 'nobr') {
|
6730 | ancestorInfo.nobrTagInScope = info;
|
6731 | }
|
6732 | if (tag === 'p') {
|
6733 | ancestorInfo.pTagInButtonScope = info;
|
6734 | }
|
6735 | if (tag === 'li') {
|
6736 | ancestorInfo.listItemTagAutoclosing = info;
|
6737 | }
|
6738 | if (tag === 'dd' || tag === 'dt') {
|
6739 | ancestorInfo.dlItemTagAutoclosing = info;
|
6740 | }
|
6741 |
|
6742 | return ancestorInfo;
|
6743 | };
|
6744 |
|
6745 | |
6746 |
|
6747 |
|
6748 | var isTagValidWithParent = function (tag, parentTag) {
|
6749 |
|
6750 | switch (parentTag) {
|
6751 |
|
6752 | case 'select':
|
6753 | return tag === 'option' || tag === 'optgroup' || tag === '#text';
|
6754 | case 'optgroup':
|
6755 | return tag === 'option' || tag === '#text';
|
6756 |
|
6757 |
|
6758 | case 'option':
|
6759 | return tag === '#text';
|
6760 |
|
6761 |
|
6762 |
|
6763 |
|
6764 |
|
6765 |
|
6766 | case 'tr':
|
6767 | return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
|
6768 |
|
6769 | case 'tbody':
|
6770 | case 'thead':
|
6771 | case 'tfoot':
|
6772 | return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
|
6773 |
|
6774 | case 'colgroup':
|
6775 | return tag === 'col' || tag === 'template';
|
6776 |
|
6777 | case 'table':
|
6778 | return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
|
6779 |
|
6780 | case 'head':
|
6781 | return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
|
6782 |
|
6783 | case 'html':
|
6784 | return tag === 'head' || tag === 'body';
|
6785 | case '#document':
|
6786 | return tag === 'html';
|
6787 | }
|
6788 |
|
6789 |
|
6790 |
|
6791 |
|
6792 | switch (tag) {
|
6793 | case 'h1':
|
6794 | case 'h2':
|
6795 | case 'h3':
|
6796 | case 'h4':
|
6797 | case 'h5':
|
6798 | case 'h6':
|
6799 | return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
|
6800 |
|
6801 | case 'rp':
|
6802 | case 'rt':
|
6803 | return impliedEndTags.indexOf(parentTag) === -1;
|
6804 |
|
6805 | case 'body':
|
6806 | case 'caption':
|
6807 | case 'col':
|
6808 | case 'colgroup':
|
6809 | case 'frame':
|
6810 | case 'head':
|
6811 | case 'html':
|
6812 | case 'tbody':
|
6813 | case 'td':
|
6814 | case 'tfoot':
|
6815 | case 'th':
|
6816 | case 'thead':
|
6817 | case 'tr':
|
6818 |
|
6819 |
|
6820 |
|
6821 |
|
6822 | return parentTag == null;
|
6823 | }
|
6824 |
|
6825 | return true;
|
6826 | };
|
6827 |
|
6828 | |
6829 |
|
6830 |
|
6831 | var findInvalidAncestorForTag = function (tag, ancestorInfo) {
|
6832 | switch (tag) {
|
6833 | case 'address':
|
6834 | case 'article':
|
6835 | case 'aside':
|
6836 | case 'blockquote':
|
6837 | case 'center':
|
6838 | case 'details':
|
6839 | case 'dialog':
|
6840 | case 'dir':
|
6841 | case 'div':
|
6842 | case 'dl':
|
6843 | case 'fieldset':
|
6844 | case 'figcaption':
|
6845 | case 'figure':
|
6846 | case 'footer':
|
6847 | case 'header':
|
6848 | case 'hgroup':
|
6849 | case 'main':
|
6850 | case 'menu':
|
6851 | case 'nav':
|
6852 | case 'ol':
|
6853 | case 'p':
|
6854 | case 'section':
|
6855 | case 'summary':
|
6856 | case 'ul':
|
6857 | case 'pre':
|
6858 | case 'listing':
|
6859 | case 'table':
|
6860 | case 'hr':
|
6861 | case 'xmp':
|
6862 | case 'h1':
|
6863 | case 'h2':
|
6864 | case 'h3':
|
6865 | case 'h4':
|
6866 | case 'h5':
|
6867 | case 'h6':
|
6868 | return ancestorInfo.pTagInButtonScope;
|
6869 |
|
6870 | case 'form':
|
6871 | return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
|
6872 |
|
6873 | case 'li':
|
6874 | return ancestorInfo.listItemTagAutoclosing;
|
6875 |
|
6876 | case 'dd':
|
6877 | case 'dt':
|
6878 | return ancestorInfo.dlItemTagAutoclosing;
|
6879 |
|
6880 | case 'button':
|
6881 | return ancestorInfo.buttonTagInScope;
|
6882 |
|
6883 | case 'a':
|
6884 |
|
6885 |
|
6886 | return ancestorInfo.aTagInScope;
|
6887 |
|
6888 | case 'nobr':
|
6889 | return ancestorInfo.nobrTagInScope;
|
6890 | }
|
6891 |
|
6892 | return null;
|
6893 | };
|
6894 |
|
6895 | |
6896 |
|
6897 |
|
6898 |
|
6899 | var findOwnerStack = function (instance) {
|
6900 | if (!instance) {
|
6901 | return [];
|
6902 | }
|
6903 |
|
6904 | var stack = [];
|
6905 | do {
|
6906 | stack.push(instance);
|
6907 | } while (instance = instance._currentElement._owner);
|
6908 | stack.reverse();
|
6909 | return stack;
|
6910 | };
|
6911 |
|
6912 | var didWarn = {};
|
6913 |
|
6914 | validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) {
|
6915 | ancestorInfo = ancestorInfo || emptyAncestorInfo;
|
6916 | var parentInfo = ancestorInfo.current;
|
6917 | var parentTag = parentInfo && parentInfo.tag;
|
6918 |
|
6919 | if (childText != null) {
|
6920 | process.env.NODE_ENV !== 'production' ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
|
6921 | childTag = '#text';
|
6922 | }
|
6923 |
|
6924 | var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
|
6925 | var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
|
6926 | var problematic = invalidParent || invalidAncestor;
|
6927 |
|
6928 | if (problematic) {
|
6929 | var ancestorTag = problematic.tag;
|
6930 | var ancestorInstance = problematic.instance;
|
6931 |
|
6932 | var childOwner = childInstance && childInstance._currentElement._owner;
|
6933 | var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner;
|
6934 |
|
6935 | var childOwners = findOwnerStack(childOwner);
|
6936 | var ancestorOwners = findOwnerStack(ancestorOwner);
|
6937 |
|
6938 | var minStackLen = Math.min(childOwners.length, ancestorOwners.length);
|
6939 | var i;
|
6940 |
|
6941 | var deepestCommon = -1;
|
6942 | for (i = 0; i < minStackLen; i++) {
|
6943 | if (childOwners[i] === ancestorOwners[i]) {
|
6944 | deepestCommon = i;
|
6945 | } else {
|
6946 | break;
|
6947 | }
|
6948 | }
|
6949 |
|
6950 | var UNKNOWN = '(unknown)';
|
6951 | var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) {
|
6952 | return inst.getName() || UNKNOWN;
|
6953 | });
|
6954 | var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) {
|
6955 | return inst.getName() || UNKNOWN;
|
6956 | });
|
6957 | var ownerInfo = [].concat(
|
6958 |
|
6959 |
|
6960 | deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag,
|
6961 |
|
6962 | invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > ');
|
6963 |
|
6964 | var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo;
|
6965 | if (didWarn[warnKey]) {
|
6966 | return;
|
6967 | }
|
6968 | didWarn[warnKey] = true;
|
6969 |
|
6970 | var tagDisplayName = childTag;
|
6971 | var whitespaceInfo = '';
|
6972 | if (childTag === '#text') {
|
6973 | if (/\S/.test(childText)) {
|
6974 | tagDisplayName = 'Text nodes';
|
6975 | } else {
|
6976 | tagDisplayName = 'Whitespace text nodes';
|
6977 | whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
|
6978 | }
|
6979 | } else {
|
6980 | tagDisplayName = '<' + childTag + '>';
|
6981 | }
|
6982 |
|
6983 | if (invalidParent) {
|
6984 | var info = '';
|
6985 | if (ancestorTag === 'table' && childTag === 'tr') {
|
6986 | info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
|
6987 | }
|
6988 | process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0;
|
6989 | } else {
|
6990 | process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0;
|
6991 | }
|
6992 | }
|
6993 | };
|
6994 |
|
6995 | validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo;
|
6996 |
|
6997 |
|
6998 | validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) {
|
6999 | ancestorInfo = ancestorInfo || emptyAncestorInfo;
|
7000 | var parentInfo = ancestorInfo.current;
|
7001 | var parentTag = parentInfo && parentInfo.tag;
|
7002 | return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo);
|
7003 | };
|
7004 | }
|
7005 |
|
7006 | module.exports = validateDOMNesting;
|
7007 | }.call(exports, __webpack_require__(0)))
|
7008 |
|
7009 | }),
|
7010 |
|
7011 | (function(module, exports, __webpack_require__) {
|
7012 |
|
7013 | "use strict";
|
7014 |
|
7015 |
|
7016 |
|
7017 |
|
7018 |
|
7019 |
|
7020 |
|
7021 |
|
7022 |
|
7023 |
|
7024 |
|
7025 |
|
7026 |
|
7027 |
|
7028 |
|
7029 |
|
7030 |
|
7031 |
|
7032 |
|
7033 |
|
7034 |
|
7035 |
|
7036 |
|
7037 | function getEventCharCode(nativeEvent) {
|
7038 | var charCode;
|
7039 | var keyCode = nativeEvent.keyCode;
|
7040 |
|
7041 | if ('charCode' in nativeEvent) {
|
7042 | charCode = nativeEvent.charCode;
|
7043 |
|
7044 |
|
7045 | if (charCode === 0 && keyCode === 13) {
|
7046 | charCode = 13;
|
7047 | }
|
7048 | } else {
|
7049 |
|
7050 | charCode = keyCode;
|
7051 | }
|
7052 |
|
7053 |
|
7054 |
|
7055 | if (charCode >= 32 || charCode === 13) {
|
7056 | return charCode;
|
7057 | }
|
7058 |
|
7059 | return 0;
|
7060 | }
|
7061 |
|
7062 | module.exports = getEventCharCode;
|
7063 |
|
7064 | }),
|
7065 |
|
7066 | (function(module, exports, __webpack_require__) {
|
7067 |
|
7068 | (function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__; |
7069 |
|
7070 |
|
7071 |
|
7072 |
|
7073 |
|
7074 |
|
7075 |
|
7076 | ;(function() {
|
7077 |
|
7078 |
|
7079 | var undefined;
|
7080 |
|
7081 |
|
7082 | var VERSION = '4.17.4';
|
7083 |
|
7084 |
|
7085 | var LARGE_ARRAY_SIZE = 200;
|
7086 |
|
7087 |
|
7088 | var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
|
7089 | FUNC_ERROR_TEXT = 'Expected a function';
|
7090 |
|
7091 |
|
7092 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
7093 |
|
7094 |
|
7095 | var MAX_MEMOIZE_SIZE = 500;
|
7096 |
|
7097 |
|
7098 | var PLACEHOLDER = '__lodash_placeholder__';
|
7099 |
|
7100 |
|
7101 | var CLONE_DEEP_FLAG = 1,
|
7102 | CLONE_FLAT_FLAG = 2,
|
7103 | CLONE_SYMBOLS_FLAG = 4;
|
7104 |
|
7105 |
|
7106 | var COMPARE_PARTIAL_FLAG = 1,
|
7107 | COMPARE_UNORDERED_FLAG = 2;
|
7108 |
|
7109 |
|
7110 | var WRAP_BIND_FLAG = 1,
|
7111 | WRAP_BIND_KEY_FLAG = 2,
|
7112 | WRAP_CURRY_BOUND_FLAG = 4,
|
7113 | WRAP_CURRY_FLAG = 8,
|
7114 | WRAP_CURRY_RIGHT_FLAG = 16,
|
7115 | WRAP_PARTIAL_FLAG = 32,
|
7116 | WRAP_PARTIAL_RIGHT_FLAG = 64,
|
7117 | WRAP_ARY_FLAG = 128,
|
7118 | WRAP_REARG_FLAG = 256,
|
7119 | WRAP_FLIP_FLAG = 512;
|
7120 |
|
7121 |
|
7122 | var DEFAULT_TRUNC_LENGTH = 30,
|
7123 | DEFAULT_TRUNC_OMISSION = '...';
|
7124 |
|
7125 |
|
7126 | var HOT_COUNT = 800,
|
7127 | HOT_SPAN = 16;
|
7128 |
|
7129 |
|
7130 | var LAZY_FILTER_FLAG = 1,
|
7131 | LAZY_MAP_FLAG = 2,
|
7132 | LAZY_WHILE_FLAG = 3;
|
7133 |
|
7134 |
|
7135 | var INFINITY = 1 / 0,
|
7136 | MAX_SAFE_INTEGER = 9007199254740991,
|
7137 | MAX_INTEGER = 1.7976931348623157e+308,
|
7138 | NAN = 0 / 0;
|
7139 |
|
7140 |
|
7141 | var MAX_ARRAY_LENGTH = 4294967295,
|
7142 | MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
|
7143 | HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
|
7144 |
|
7145 |
|
7146 | var wrapFlags = [
|
7147 | ['ary', WRAP_ARY_FLAG],
|
7148 | ['bind', WRAP_BIND_FLAG],
|
7149 | ['bindKey', WRAP_BIND_KEY_FLAG],
|
7150 | ['curry', WRAP_CURRY_FLAG],
|
7151 | ['curryRight', WRAP_CURRY_RIGHT_FLAG],
|
7152 | ['flip', WRAP_FLIP_FLAG],
|
7153 | ['partial', WRAP_PARTIAL_FLAG],
|
7154 | ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
|
7155 | ['rearg', WRAP_REARG_FLAG]
|
7156 | ];
|
7157 |
|
7158 |
|
7159 | var argsTag = '[object Arguments]',
|
7160 | arrayTag = '[object Array]',
|
7161 | asyncTag = '[object AsyncFunction]',
|
7162 | boolTag = '[object Boolean]',
|
7163 | dateTag = '[object Date]',
|
7164 | domExcTag = '[object DOMException]',
|
7165 | errorTag = '[object Error]',
|
7166 | funcTag = '[object Function]',
|
7167 | genTag = '[object GeneratorFunction]',
|
7168 | mapTag = '[object Map]',
|
7169 | numberTag = '[object Number]',
|
7170 | nullTag = '[object Null]',
|
7171 | objectTag = '[object Object]',
|
7172 | promiseTag = '[object Promise]',
|
7173 | proxyTag = '[object Proxy]',
|
7174 | regexpTag = '[object RegExp]',
|
7175 | setTag = '[object Set]',
|
7176 | stringTag = '[object String]',
|
7177 | symbolTag = '[object Symbol]',
|
7178 | undefinedTag = '[object Undefined]',
|
7179 | weakMapTag = '[object WeakMap]',
|
7180 | weakSetTag = '[object WeakSet]';
|
7181 |
|
7182 | var arrayBufferTag = '[object ArrayBuffer]',
|
7183 | dataViewTag = '[object DataView]',
|
7184 | float32Tag = '[object Float32Array]',
|
7185 | float64Tag = '[object Float64Array]',
|
7186 | int8Tag = '[object Int8Array]',
|
7187 | int16Tag = '[object Int16Array]',
|
7188 | int32Tag = '[object Int32Array]',
|
7189 | uint8Tag = '[object Uint8Array]',
|
7190 | uint8ClampedTag = '[object Uint8ClampedArray]',
|
7191 | uint16Tag = '[object Uint16Array]',
|
7192 | uint32Tag = '[object Uint32Array]';
|
7193 |
|
7194 |
|
7195 | var reEmptyStringLeading = /\b__p \+= '';/g,
|
7196 | reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
|
7197 | reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
|
7198 |
|
7199 |
|
7200 | var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
|
7201 | reUnescapedHtml = /[&<>"']/g,
|
7202 | reHasEscapedHtml = RegExp(reEscapedHtml.source),
|
7203 | reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
|
7204 |
|
7205 |
|
7206 | var reEscape = /<%-([\s\S]+?)%>/g,
|
7207 | reEvaluate = /<%([\s\S]+?)%>/g,
|
7208 | reInterpolate = /<%=([\s\S]+?)%>/g;
|
7209 |
|
7210 |
|
7211 | var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
7212 | reIsPlainProp = /^\w*$/,
|
7213 | reLeadingDot = /^\./,
|
7214 | rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
7215 |
|
7216 | |
7217 |
|
7218 |
|
7219 |
|
7220 | var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
|
7221 | reHasRegExpChar = RegExp(reRegExpChar.source);
|
7222 |
|
7223 |
|
7224 | var reTrim = /^\s+|\s+$/g,
|
7225 | reTrimStart = /^\s+/,
|
7226 | reTrimEnd = /\s+$/;
|
7227 |
|
7228 |
|
7229 | var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
|
7230 | reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
|
7231 | reSplitDetails = /,? & /;
|
7232 |
|
7233 |
|
7234 | var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
7235 |
|
7236 |
|
7237 | var reEscapeChar = /\\(\\)?/g;
|
7238 |
|
7239 | |
7240 |
|
7241 |
|
7242 |
|
7243 | var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
|
7244 |
|
7245 |
|
7246 | var reFlags = /\w*$/;
|
7247 |
|
7248 |
|
7249 | var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
7250 |
|
7251 |
|
7252 | var reIsBinary = /^0b[01]+$/i;
|
7253 |
|
7254 |
|
7255 | var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
7256 |
|
7257 |
|
7258 | var reIsOctal = /^0o[0-7]+$/i;
|
7259 |
|
7260 |
|
7261 | var reIsUint = /^(?:0|[1-9]\d*)$/;
|
7262 |
|
7263 |
|
7264 | var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
7265 |
|
7266 |
|
7267 | var reNoMatch = /($^)/;
|
7268 |
|
7269 |
|
7270 | var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
|
7271 |
|
7272 |
|
7273 | var rsAstralRange = '\\ud800-\\udfff',
|
7274 | rsComboMarksRange = '\\u0300-\\u036f',
|
7275 | reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
7276 | rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
7277 | rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
7278 | rsDingbatRange = '\\u2700-\\u27bf',
|
7279 | rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
7280 | rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
7281 | rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
|
7282 | rsPunctuationRange = '\\u2000-\\u206f',
|
7283 | rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
|
7284 | rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
|
7285 | rsVarRange = '\\ufe0e\\ufe0f',
|
7286 | rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
7287 |
|
7288 |
|
7289 | var rsApos = "['\u2019]",
|
7290 | rsAstral = '[' + rsAstralRange + ']',
|
7291 | rsBreak = '[' + rsBreakRange + ']',
|
7292 | rsCombo = '[' + rsComboRange + ']',
|
7293 | rsDigits = '\\d+',
|
7294 | rsDingbat = '[' + rsDingbatRange + ']',
|
7295 | rsLower = '[' + rsLowerRange + ']',
|
7296 | rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
|
7297 | rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
7298 | rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
7299 | rsNonAstral = '[^' + rsAstralRange + ']',
|
7300 | rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
7301 | rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
7302 | rsUpper = '[' + rsUpperRange + ']',
|
7303 | rsZWJ = '\\u200d';
|
7304 |
|
7305 |
|
7306 | var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
|
7307 | rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
|
7308 | rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
|
7309 | rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
|
7310 | reOptMod = rsModifier + '?',
|
7311 | rsOptVar = '[' + rsVarRange + ']?',
|
7312 | rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
7313 | rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)',
|
7314 | rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)',
|
7315 | rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
7316 | rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
|
7317 | rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
7318 |
|
7319 |
|
7320 | var reApos = RegExp(rsApos, 'g');
|
7321 |
|
7322 | |
7323 |
|
7324 |
|
7325 |
|
7326 | var reComboMark = RegExp(rsCombo, 'g');
|
7327 |
|
7328 |
|
7329 | var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
7330 |
|
7331 |
|
7332 | var reUnicodeWord = RegExp([
|
7333 | rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
7334 | rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
|
7335 | rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
|
7336 | rsUpper + '+' + rsOptContrUpper,
|
7337 | rsOrdUpper,
|
7338 | rsOrdLower,
|
7339 | rsDigits,
|
7340 | rsEmoji
|
7341 | ].join('|'), 'g');
|
7342 |
|
7343 |
|
7344 | var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
|
7345 |
|
7346 |
|
7347 | var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
7348 |
|
7349 |
|
7350 | var contextProps = [
|
7351 | 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
|
7352 | 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
|
7353 | 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
|
7354 | 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
|
7355 | '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
|
7356 | ];
|
7357 |
|
7358 |
|
7359 | var templateCounter = -1;
|
7360 |
|
7361 |
|
7362 | var typedArrayTags = {};
|
7363 | typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
7364 | typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
7365 | typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
7366 | typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
7367 | typedArrayTags[uint32Tag] = true;
|
7368 | typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
|
7369 | typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
7370 | typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
|
7371 | typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
7372 | typedArrayTags[mapTag] = typedArrayTags[numberTag] =
|
7373 | typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
|
7374 | typedArrayTags[setTag] = typedArrayTags[stringTag] =
|
7375 | typedArrayTags[weakMapTag] = false;
|
7376 |
|
7377 |
|
7378 | var cloneableTags = {};
|
7379 | cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
7380 | cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
|
7381 | cloneableTags[boolTag] = cloneableTags[dateTag] =
|
7382 | cloneableTags[float32Tag] = cloneableTags[float64Tag] =
|
7383 | cloneableTags[int8Tag] = cloneableTags[int16Tag] =
|
7384 | cloneableTags[int32Tag] = cloneableTags[mapTag] =
|
7385 | cloneableTags[numberTag] = cloneableTags[objectTag] =
|
7386 | cloneableTags[regexpTag] = cloneableTags[setTag] =
|
7387 | cloneableTags[stringTag] = cloneableTags[symbolTag] =
|
7388 | cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
|
7389 | cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
7390 | cloneableTags[errorTag] = cloneableTags[funcTag] =
|
7391 | cloneableTags[weakMapTag] = false;
|
7392 |
|
7393 |
|
7394 | var deburredLetters = {
|
7395 |
|
7396 | '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
7397 | '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
7398 | '\xc7': 'C', '\xe7': 'c',
|
7399 | '\xd0': 'D', '\xf0': 'd',
|
7400 | '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
7401 | '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
7402 | '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
7403 | '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
7404 | '\xd1': 'N', '\xf1': 'n',
|
7405 | '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
7406 | '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
7407 | '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
|
7408 | '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
|
7409 | '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
7410 | '\xc6': 'Ae', '\xe6': 'ae',
|
7411 | '\xde': 'Th', '\xfe': 'th',
|
7412 | '\xdf': 'ss',
|
7413 |
|
7414 | '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
7415 | '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
7416 | '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
7417 | '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
7418 | '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
7419 | '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
7420 | '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
7421 | '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
7422 | '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
7423 | '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
7424 | '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
7425 | '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
7426 | '\u0134': 'J', '\u0135': 'j',
|
7427 | '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
7428 | '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
7429 | '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
7430 | '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
7431 | '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
7432 | '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
7433 | '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
7434 | '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
7435 | '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
7436 | '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
7437 | '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
7438 | '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
7439 | '\u0163': 't', '\u0165': 't', '\u0167': 't',
|
7440 | '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
7441 | '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
7442 | '\u0174': 'W', '\u0175': 'w',
|
7443 | '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
7444 | '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
7445 | '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
7446 | '\u0132': 'IJ', '\u0133': 'ij',
|
7447 | '\u0152': 'Oe', '\u0153': 'oe',
|
7448 | '\u0149': "'n", '\u017f': 's'
|
7449 | };
|
7450 |
|
7451 |
|
7452 | var htmlEscapes = {
|
7453 | '&': '&',
|
7454 | '<': '<',
|
7455 | '>': '>',
|
7456 | '"': '"',
|
7457 | "'": '''
|
7458 | };
|
7459 |
|
7460 |
|
7461 | var htmlUnescapes = {
|
7462 | '&': '&',
|
7463 | '<': '<',
|
7464 | '>': '>',
|
7465 | '"': '"',
|
7466 | ''': "'"
|
7467 | };
|
7468 |
|
7469 |
|
7470 | var stringEscapes = {
|
7471 | '\\': '\\',
|
7472 | "'": "'",
|
7473 | '\n': 'n',
|
7474 | '\r': 'r',
|
7475 | '\u2028': 'u2028',
|
7476 | '\u2029': 'u2029'
|
7477 | };
|
7478 |
|
7479 |
|
7480 | var freeParseFloat = parseFloat,
|
7481 | freeParseInt = parseInt;
|
7482 |
|
7483 |
|
7484 | var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
7485 |
|
7486 |
|
7487 | var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
7488 |
|
7489 |
|
7490 | var root = freeGlobal || freeSelf || Function('return this')();
|
7491 |
|
7492 |
|
7493 | var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
7494 |
|
7495 |
|
7496 | var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
7497 |
|
7498 |
|
7499 | var moduleExports = freeModule && freeModule.exports === freeExports;
|
7500 |
|
7501 |
|
7502 | var freeProcess = moduleExports && freeGlobal.process;
|
7503 |
|
7504 |
|
7505 | var nodeUtil = (function() {
|
7506 | try {
|
7507 | return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
7508 | } catch (e) {}
|
7509 | }());
|
7510 |
|
7511 |
|
7512 | var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
|
7513 | nodeIsDate = nodeUtil && nodeUtil.isDate,
|
7514 | nodeIsMap = nodeUtil && nodeUtil.isMap,
|
7515 | nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
|
7516 | nodeIsSet = nodeUtil && nodeUtil.isSet,
|
7517 | nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
7518 |
|
7519 |
|
7520 |
|
7521 | |
7522 |
|
7523 |
|
7524 |
|
7525 |
|
7526 |
|
7527 |
|
7528 |
|
7529 | function addMapEntry(map, pair) {
|
7530 |
|
7531 | map.set(pair[0], pair[1]);
|
7532 | return map;
|
7533 | }
|
7534 |
|
7535 | |
7536 |
|
7537 |
|
7538 |
|
7539 |
|
7540 |
|
7541 |
|
7542 |
|
7543 | function addSetEntry(set, value) {
|
7544 |
|
7545 | set.add(value);
|
7546 | return set;
|
7547 | }
|
7548 |
|
7549 | /**
|
7550 | * A faster alternative to `Function#apply`, this function invokes `func`
|
7551 | * with the `this` binding of `thisArg` and the arguments of `args`.
|
7552 | *
|
7553 | * @private
|
7554 | * @param {Function} func The function to invoke.
|
7555 | * @param {*} thisArg The `this` binding of `func`.
|
7556 | * @param {Array} args The arguments to invoke `func` with.
|
7557 | * @returns {*} Returns the result of `func`.
|
7558 | */
|
7559 | function apply(func, thisArg, args) {
|
7560 | switch (args.length) {
|
7561 | case 0: return func.call(thisArg);
|
7562 | case 1: return func.call(thisArg, args[0]);
|
7563 | case 2: return func.call(thisArg, args[0], args[1]);
|
7564 | case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
7565 | }
|
7566 | return func.apply(thisArg, args);
|
7567 | }
|
7568 |
|
7569 | |
7570 |
|
7571 |
|
7572 |
|
7573 |
|
7574 |
|
7575 |
|
7576 |
|
7577 |
|
7578 |
|
7579 | function arrayAggregator(array, setter, iteratee, accumulator) {
|
7580 | var index = -1,
|
7581 | length = array == null ? 0 : array.length;
|
7582 |
|
7583 | while (++index < length) {
|
7584 | var value = array[index];
|
7585 | setter(accumulator, value, iteratee(value), array);
|
7586 | }
|
7587 | return accumulator;
|
7588 | }
|
7589 |
|
7590 | |
7591 |
|
7592 |
|
7593 |
|
7594 |
|
7595 |
|
7596 |
|
7597 |
|
7598 |
|
7599 | function arrayEach(array, iteratee) {
|
7600 | var index = -1,
|
7601 | length = array == null ? 0 : array.length;
|
7602 |
|
7603 | while (++index < length) {
|
7604 | if (iteratee(array[index], index, array) === false) {
|
7605 | break;
|
7606 | }
|
7607 | }
|
7608 | return array;
|
7609 | }
|
7610 |
|
7611 | |
7612 |
|
7613 |
|
7614 |
|
7615 |
|
7616 |
|
7617 |
|
7618 |
|
7619 |
|
7620 | function arrayEachRight(array, iteratee) {
|
7621 | var length = array == null ? 0 : array.length;
|
7622 |
|
7623 | while (length--) {
|
7624 | if (iteratee(array[length], length, array) === false) {
|
7625 | break;
|
7626 | }
|
7627 | }
|
7628 | return array;
|
7629 | }
|
7630 |
|
7631 | |
7632 |
|
7633 |
|
7634 |
|
7635 |
|
7636 |
|
7637 |
|
7638 |
|
7639 |
|
7640 |
|
7641 | function arrayEvery(array, predicate) {
|
7642 | var index = -1,
|
7643 | length = array == null ? 0 : array.length;
|
7644 |
|
7645 | while (++index < length) {
|
7646 | if (!predicate(array[index], index, array)) {
|
7647 | return false;
|
7648 | }
|
7649 | }
|
7650 | return true;
|
7651 | }
|
7652 |
|
7653 | |
7654 |
|
7655 |
|
7656 |
|
7657 |
|
7658 |
|
7659 |
|
7660 |
|
7661 |
|
7662 | function arrayFilter(array, predicate) {
|
7663 | var index = -1,
|
7664 | length = array == null ? 0 : array.length,
|
7665 | resIndex = 0,
|
7666 | result = [];
|
7667 |
|
7668 | while (++index < length) {
|
7669 | var value = array[index];
|
7670 | if (predicate(value, index, array)) {
|
7671 | result[resIndex++] = value;
|
7672 | }
|
7673 | }
|
7674 | return result;
|
7675 | }
|
7676 |
|
7677 | |
7678 |
|
7679 |
|
7680 |
|
7681 |
|
7682 |
|
7683 |
|
7684 |
|
7685 |
|
7686 | function arrayIncludes(array, value) {
|
7687 | var length = array == null ? 0 : array.length;
|
7688 | return !!length && baseIndexOf(array, value, 0) > -1;
|
7689 | }
|
7690 |
|
7691 | |
7692 |
|
7693 |
|
7694 |
|
7695 |
|
7696 |
|
7697 |
|
7698 |
|
7699 |
|
7700 | function arrayIncludesWith(array, value, comparator) {
|
7701 | var index = -1,
|
7702 | length = array == null ? 0 : array.length;
|
7703 |
|
7704 | while (++index < length) {
|
7705 | if (comparator(value, array[index])) {
|
7706 | return true;
|
7707 | }
|
7708 | }
|
7709 | return false;
|
7710 | }
|
7711 |
|
7712 | |
7713 |
|
7714 |
|
7715 |
|
7716 |
|
7717 |
|
7718 |
|
7719 |
|
7720 |
|
7721 | function arrayMap(array, iteratee) {
|
7722 | var index = -1,
|
7723 | length = array == null ? 0 : array.length,
|
7724 | result = Array(length);
|
7725 |
|
7726 | while (++index < length) {
|
7727 | result[index] = iteratee(array[index], index, array);
|
7728 | }
|
7729 | return result;
|
7730 | }
|
7731 |
|
7732 | |
7733 |
|
7734 |
|
7735 |
|
7736 |
|
7737 |
|
7738 |
|
7739 |
|
7740 | function arrayPush(array, values) {
|
7741 | var index = -1,
|
7742 | length = values.length,
|
7743 | offset = array.length;
|
7744 |
|
7745 | while (++index < length) {
|
7746 | array[offset + index] = values[index];
|
7747 | }
|
7748 | return array;
|
7749 | }
|
7750 |
|
7751 | |
7752 |
|
7753 |
|
7754 |
|
7755 |
|
7756 |
|
7757 |
|
7758 |
|
7759 |
|
7760 |
|
7761 |
|
7762 |
|
7763 | function arrayReduce(array, iteratee, accumulator, initAccum) {
|
7764 | var index = -1,
|
7765 | length = array == null ? 0 : array.length;
|
7766 |
|
7767 | if (initAccum && length) {
|
7768 | accumulator = array[++index];
|
7769 | }
|
7770 | while (++index < length) {
|
7771 | accumulator = iteratee(accumulator, array[index], index, array);
|
7772 | }
|
7773 | return accumulator;
|
7774 | }
|
7775 |
|
7776 | |
7777 |
|
7778 |
|
7779 |
|
7780 |
|
7781 |
|
7782 |
|
7783 |
|
7784 |
|
7785 |
|
7786 |
|
7787 |
|
7788 | function arrayReduceRight(array, iteratee, accumulator, initAccum) {
|
7789 | var length = array == null ? 0 : array.length;
|
7790 | if (initAccum && length) {
|
7791 | accumulator = array[--length];
|
7792 | }
|
7793 | while (length--) {
|
7794 | accumulator = iteratee(accumulator, array[length], length, array);
|
7795 | }
|
7796 | return accumulator;
|
7797 | }
|
7798 |
|
7799 | |
7800 |
|
7801 |
|
7802 |
|
7803 |
|
7804 |
|
7805 |
|
7806 |
|
7807 |
|
7808 |
|
7809 | function arraySome(array, predicate) {
|
7810 | var index = -1,
|
7811 | length = array == null ? 0 : array.length;
|
7812 |
|
7813 | while (++index < length) {
|
7814 | if (predicate(array[index], index, array)) {
|
7815 | return true;
|
7816 | }
|
7817 | }
|
7818 | return false;
|
7819 | }
|
7820 |
|
7821 | |
7822 |
|
7823 |
|
7824 |
|
7825 |
|
7826 |
|
7827 |
|
7828 | var asciiSize = baseProperty('length');
|
7829 |
|
7830 | |
7831 |
|
7832 |
|
7833 |
|
7834 |
|
7835 |
|
7836 |
|
7837 | function asciiToArray(string) {
|
7838 | return string.split('');
|
7839 | }
|
7840 |
|
7841 | |
7842 |
|
7843 |
|
7844 |
|
7845 |
|
7846 |
|
7847 |
|
7848 | function asciiWords(string) {
|
7849 | return string.match(reAsciiWord) || [];
|
7850 | }
|
7851 |
|
7852 | |
7853 |
|
7854 |
|
7855 |
|
7856 |
|
7857 |
|
7858 |
|
7859 |
|
7860 |
|
7861 |
|
7862 |
|
7863 | function baseFindKey(collection, predicate, eachFunc) {
|
7864 | var result;
|
7865 | eachFunc(collection, function(value, key, collection) {
|
7866 | if (predicate(value, key, collection)) {
|
7867 | result = key;
|
7868 | return false;
|
7869 | }
|
7870 | });
|
7871 | return result;
|
7872 | }
|
7873 |
|
7874 | |
7875 |
|
7876 |
|
7877 |
|
7878 |
|
7879 |
|
7880 |
|
7881 |
|
7882 |
|
7883 |
|
7884 |
|
7885 | function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
7886 | var length = array.length,
|
7887 | index = fromIndex + (fromRight ? 1 : -1);
|
7888 |
|
7889 | while ((fromRight ? index-- : ++index < length)) {
|
7890 | if (predicate(array[index], index, array)) {
|
7891 | return index;
|
7892 | }
|
7893 | }
|
7894 | return -1;
|
7895 | }
|
7896 |
|
7897 | |
7898 |
|
7899 |
|
7900 |
|
7901 |
|
7902 |
|
7903 |
|
7904 |
|
7905 |
|
7906 | function baseIndexOf(array, value, fromIndex) {
|
7907 | return value === value
|
7908 | ? strictIndexOf(array, value, fromIndex)
|
7909 | : baseFindIndex(array, baseIsNaN, fromIndex);
|
7910 | }
|
7911 |
|
7912 | |
7913 |
|
7914 |
|
7915 |
|
7916 |
|
7917 |
|
7918 |
|
7919 |
|
7920 |
|
7921 |
|
7922 | function baseIndexOfWith(array, value, fromIndex, comparator) {
|
7923 | var index = fromIndex - 1,
|
7924 | length = array.length;
|
7925 |
|
7926 | while (++index < length) {
|
7927 | if (comparator(array[index], value)) {
|
7928 | return index;
|
7929 | }
|
7930 | }
|
7931 | return -1;
|
7932 | }
|
7933 |
|
7934 | |
7935 |
|
7936 |
|
7937 |
|
7938 |
|
7939 |
|
7940 |
|
7941 | function baseIsNaN(value) {
|
7942 | return value !== value;
|
7943 | }
|
7944 |
|
7945 | |
7946 |
|
7947 |
|
7948 |
|
7949 |
|
7950 |
|
7951 |
|
7952 |
|
7953 |
|
7954 | function baseMean(array, iteratee) {
|
7955 | var length = array == null ? 0 : array.length;
|
7956 | return length ? (baseSum(array, iteratee) / length) : NAN;
|
7957 | }
|
7958 |
|
7959 | |
7960 |
|
7961 |
|
7962 |
|
7963 |
|
7964 |
|
7965 |
|
7966 | function baseProperty(key) {
|
7967 | return function(object) {
|
7968 | return object == null ? undefined : object[key];
|
7969 | };
|
7970 | }
|
7971 |
|
7972 | |
7973 |
|
7974 |
|
7975 |
|
7976 |
|
7977 |
|
7978 |
|
7979 | function basePropertyOf(object) {
|
7980 | return function(key) {
|
7981 | return object == null ? undefined : object[key];
|
7982 | };
|
7983 | }
|
7984 |
|
7985 | |
7986 |
|
7987 |
|
7988 |
|
7989 |
|
7990 |
|
7991 |
|
7992 |
|
7993 |
|
7994 |
|
7995 |
|
7996 |
|
7997 |
|
7998 | function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
7999 | eachFunc(collection, function(value, index, collection) {
|
8000 | accumulator = initAccum
|
8001 | ? (initAccum = false, value)
|
8002 | : iteratee(accumulator, value, index, collection);
|
8003 | });
|
8004 | return accumulator;
|
8005 | }
|
8006 |
|
8007 | |
8008 |
|
8009 |
|
8010 |
|
8011 |
|
8012 |
|
8013 |
|
8014 |
|
8015 |
|
8016 |
|
8017 | function baseSortBy(array, comparer) {
|
8018 | var length = array.length;
|
8019 |
|
8020 | array.sort(comparer);
|
8021 | while (length--) {
|
8022 | array[length] = array[length].value;
|
8023 | }
|
8024 | return array;
|
8025 | }
|
8026 |
|
8027 | |
8028 |
|
8029 |
|
8030 |
|
8031 |
|
8032 |
|
8033 |
|
8034 |
|
8035 |
|
8036 | function baseSum(array, iteratee) {
|
8037 | var result,
|
8038 | index = -1,
|
8039 | length = array.length;
|
8040 |
|
8041 | while (++index < length) {
|
8042 | var current = iteratee(array[index]);
|
8043 | if (current !== undefined) {
|
8044 | result = result === undefined ? current : (result + current);
|
8045 | }
|
8046 | }
|
8047 | return result;
|
8048 | }
|
8049 |
|
8050 | |
8051 |
|
8052 |
|
8053 |
|
8054 |
|
8055 |
|
8056 |
|
8057 |
|
8058 |
|
8059 | function baseTimes(n, iteratee) {
|
8060 | var index = -1,
|
8061 | result = Array(n);
|
8062 |
|
8063 | while (++index < n) {
|
8064 | result[index] = iteratee(index);
|
8065 | }
|
8066 | return result;
|
8067 | }
|
8068 |
|
8069 | |
8070 |
|
8071 |
|
8072 |
|
8073 |
|
8074 |
|
8075 |
|
8076 |
|
8077 |
|
8078 | function baseToPairs(object, props) {
|
8079 | return arrayMap(props, function(key) {
|
8080 | return [key, object[key]];
|
8081 | });
|
8082 | }
|
8083 |
|
8084 | |
8085 |
|
8086 |
|
8087 |
|
8088 |
|
8089 |
|
8090 |
|
8091 | function baseUnary(func) {
|
8092 | return function(value) {
|
8093 | return func(value);
|
8094 | };
|
8095 | }
|
8096 |
|
8097 | |
8098 |
|
8099 |
|
8100 |
|
8101 |
|
8102 |
|
8103 |
|
8104 |
|
8105 |
|
8106 |
|
8107 | function baseValues(object, props) {
|
8108 | return arrayMap(props, function(key) {
|
8109 | return object[key];
|
8110 | });
|
8111 | }
|
8112 |
|
8113 | |
8114 |
|
8115 |
|
8116 |
|
8117 |
|
8118 |
|
8119 |
|
8120 |
|
8121 | function cacheHas(cache, key) {
|
8122 | return cache.has(key);
|
8123 | }
|
8124 |
|
8125 | |
8126 |
|
8127 |
|
8128 |
|
8129 |
|
8130 |
|
8131 |
|
8132 |
|
8133 |
|
8134 | function charsStartIndex(strSymbols, chrSymbols) {
|
8135 | var index = -1,
|
8136 | length = strSymbols.length;
|
8137 |
|
8138 | while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
|
8139 | return index;
|
8140 | }
|
8141 |
|
8142 | |
8143 |
|
8144 |
|
8145 |
|
8146 |
|
8147 |
|
8148 |
|
8149 |
|
8150 |
|
8151 | function charsEndIndex(strSymbols, chrSymbols) {
|
8152 | var index = strSymbols.length;
|
8153 |
|
8154 | while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
|
8155 | return index;
|
8156 | }
|
8157 |
|
8158 | |
8159 |
|
8160 |
|
8161 |
|
8162 |
|
8163 |
|
8164 |
|
8165 |
|
8166 | function countHolders(array, placeholder) {
|
8167 | var length = array.length,
|
8168 | result = 0;
|
8169 |
|
8170 | while (length--) {
|
8171 | if (array[length] === placeholder) {
|
8172 | ++result;
|
8173 | }
|
8174 | }
|
8175 | return result;
|
8176 | }
|
8177 |
|
8178 | |
8179 |
|
8180 |
|
8181 |
|
8182 |
|
8183 |
|
8184 |
|
8185 |
|
8186 | var deburrLetter = basePropertyOf(deburredLetters);
|
8187 |
|
8188 | |
8189 |
|
8190 |
|
8191 |
|
8192 |
|
8193 |
|
8194 |
|
8195 | var escapeHtmlChar = basePropertyOf(htmlEscapes);
|
8196 |
|
8197 | |
8198 |
|
8199 |
|
8200 |
|
8201 |
|
8202 |
|
8203 |
|
8204 | function escapeStringChar(chr) {
|
8205 | return '\\' + stringEscapes[chr];
|
8206 | }
|
8207 |
|
8208 | |
8209 |
|
8210 |
|
8211 |
|
8212 |
|
8213 |
|
8214 |
|
8215 |
|
8216 | function getValue(object, key) {
|
8217 | return object == null ? undefined : object[key];
|
8218 | }
|
8219 |
|
8220 | |
8221 |
|
8222 |
|
8223 |
|
8224 |
|
8225 |
|
8226 |
|
8227 | function hasUnicode(string) {
|
8228 | return reHasUnicode.test(string);
|
8229 | }
|
8230 |
|
8231 | |
8232 |
|
8233 |
|
8234 |
|
8235 |
|
8236 |
|
8237 |
|
8238 | function hasUnicodeWord(string) {
|
8239 | return reHasUnicodeWord.test(string);
|
8240 | }
|
8241 |
|
8242 | |
8243 |
|
8244 |
|
8245 |
|
8246 |
|
8247 |
|
8248 |
|
8249 | function iteratorToArray(iterator) {
|
8250 | var data,
|
8251 | result = [];
|
8252 |
|
8253 | while (!(data = iterator.next()).done) {
|
8254 | result.push(data.value);
|
8255 | }
|
8256 | return result;
|
8257 | }
|
8258 |
|
8259 | |
8260 |
|
8261 |
|
8262 |
|
8263 |
|
8264 |
|
8265 |
|
8266 | function mapToArray(map) {
|
8267 | var index = -1,
|
8268 | result = Array(map.size);
|
8269 |
|
8270 | map.forEach(function(value, key) {
|
8271 | result[++index] = [key, value];
|
8272 | });
|
8273 | return result;
|
8274 | }
|
8275 |
|
8276 | |
8277 |
|
8278 |
|
8279 |
|
8280 |
|
8281 |
|
8282 |
|
8283 |
|
8284 | function overArg(func, transform) {
|
8285 | return function(arg) {
|
8286 | return func(transform(arg));
|
8287 | };
|
8288 | }
|
8289 |
|
8290 | |
8291 |
|
8292 |
|
8293 |
|
8294 |
|
8295 |
|
8296 |
|
8297 |
|
8298 |
|
8299 | function replaceHolders(array, placeholder) {
|
8300 | var index = -1,
|
8301 | length = array.length,
|
8302 | resIndex = 0,
|
8303 | result = [];
|
8304 |
|
8305 | while (++index < length) {
|
8306 | var value = array[index];
|
8307 | if (value === placeholder || value === PLACEHOLDER) {
|
8308 | array[index] = PLACEHOLDER;
|
8309 | result[resIndex++] = index;
|
8310 | }
|
8311 | }
|
8312 | return result;
|
8313 | }
|
8314 |
|
8315 | |
8316 |
|
8317 |
|
8318 |
|
8319 |
|
8320 |
|
8321 |
|
8322 | function setToArray(set) {
|
8323 | var index = -1,
|
8324 | result = Array(set.size);
|
8325 |
|
8326 | set.forEach(function(value) {
|
8327 | result[++index] = value;
|
8328 | });
|
8329 | return result;
|
8330 | }
|
8331 |
|
8332 | |
8333 |
|
8334 |
|
8335 |
|
8336 |
|
8337 |
|
8338 |
|
8339 | function setToPairs(set) {
|
8340 | var index = -1,
|
8341 | result = Array(set.size);
|
8342 |
|
8343 | set.forEach(function(value) {
|
8344 | result[++index] = [value, value];
|
8345 | });
|
8346 | return result;
|
8347 | }
|
8348 |
|
8349 | |
8350 |
|
8351 |
|
8352 |
|
8353 |
|
8354 |
|
8355 |
|
8356 |
|
8357 |
|
8358 |
|
8359 | function strictIndexOf(array, value, fromIndex) {
|
8360 | var index = fromIndex - 1,
|
8361 | length = array.length;
|
8362 |
|
8363 | while (++index < length) {
|
8364 | if (array[index] === value) {
|
8365 | return index;
|
8366 | }
|
8367 | }
|
8368 | return -1;
|
8369 | }
|
8370 |
|
8371 | |
8372 |
|
8373 |
|
8374 |
|
8375 |
|
8376 |
|
8377 |
|
8378 |
|
8379 |
|
8380 |
|
8381 | function strictLastIndexOf(array, value, fromIndex) {
|
8382 | var index = fromIndex + 1;
|
8383 | while (index--) {
|
8384 | if (array[index] === value) {
|
8385 | return index;
|
8386 | }
|
8387 | }
|
8388 | return index;
|
8389 | }
|
8390 |
|
8391 | |
8392 |
|
8393 |
|
8394 |
|
8395 |
|
8396 |
|
8397 |
|
8398 | function stringSize(string) {
|
8399 | return hasUnicode(string)
|
8400 | ? unicodeSize(string)
|
8401 | : asciiSize(string);
|
8402 | }
|
8403 |
|
8404 | |
8405 |
|
8406 |
|
8407 |
|
8408 |
|
8409 |
|
8410 |
|
8411 | function stringToArray(string) {
|
8412 | return hasUnicode(string)
|
8413 | ? unicodeToArray(string)
|
8414 | : asciiToArray(string);
|
8415 | }
|
8416 |
|
8417 | |
8418 |
|
8419 |
|
8420 |
|
8421 |
|
8422 |
|
8423 |
|
8424 | var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
|
8425 |
|
8426 | |
8427 |
|
8428 |
|
8429 |
|
8430 |
|
8431 |
|
8432 |
|
8433 | function unicodeSize(string) {
|
8434 | var result = reUnicode.lastIndex = 0;
|
8435 | while (reUnicode.test(string)) {
|
8436 | ++result;
|
8437 | }
|
8438 | return result;
|
8439 | }
|
8440 |
|
8441 | |
8442 |
|
8443 |
|
8444 |
|
8445 |
|
8446 |
|
8447 |
|
8448 | function unicodeToArray(string) {
|
8449 | return string.match(reUnicode) || [];
|
8450 | }
|
8451 |
|
8452 | |
8453 |
|
8454 |
|
8455 |
|
8456 |
|
8457 |
|
8458 |
|
8459 | function unicodeWords(string) {
|
8460 | return string.match(reUnicodeWord) || [];
|
8461 | }
|
8462 |
|
8463 |
|
8464 |
|
8465 | |
8466 |
|
8467 |
|
8468 |
|
8469 |
|
8470 |
|
8471 |
|
8472 |
|
8473 |
|
8474 |
|
8475 |
|
8476 |
|
8477 |
|
8478 |
|
8479 |
|
8480 |
|
8481 |
|
8482 |
|
8483 |
|
8484 |
|
8485 |
|
8486 |
|
8487 |
|
8488 |
|
8489 |
|
8490 |
|
8491 |
|
8492 |
|
8493 |
|
8494 | var runInContext = (function runInContext(context) {
|
8495 | context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
|
8496 |
|
8497 |
|
8498 | var Array = context.Array,
|
8499 | Date = context.Date,
|
8500 | Error = context.Error,
|
8501 | Function = context.Function,
|
8502 | Math = context.Math,
|
8503 | Object = context.Object,
|
8504 | RegExp = context.RegExp,
|
8505 | String = context.String,
|
8506 | TypeError = context.TypeError;
|
8507 |
|
8508 |
|
8509 | var arrayProto = Array.prototype,
|
8510 | funcProto = Function.prototype,
|
8511 | objectProto = Object.prototype;
|
8512 |
|
8513 |
|
8514 | var coreJsData = context['__core-js_shared__'];
|
8515 |
|
8516 |
|
8517 | var funcToString = funcProto.toString;
|
8518 |
|
8519 |
|
8520 | var hasOwnProperty = objectProto.hasOwnProperty;
|
8521 |
|
8522 |
|
8523 | var idCounter = 0;
|
8524 |
|
8525 |
|
8526 | var maskSrcKey = (function() {
|
8527 | var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
8528 | return uid ? ('Symbol(src)_1.' + uid) : '';
|
8529 | }());
|
8530 |
|
8531 | |
8532 |
|
8533 |
|
8534 |
|
8535 |
|
8536 | var nativeObjectToString = objectProto.toString;
|
8537 |
|
8538 |
|
8539 | var objectCtorString = funcToString.call(Object);
|
8540 |
|
8541 |
|
8542 | var oldDash = root._;
|
8543 |
|
8544 |
|
8545 | var reIsNative = RegExp('^' +
|
8546 | funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
8547 | .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
8548 | );
|
8549 |
|
8550 |
|
8551 | var Buffer = moduleExports ? context.Buffer : undefined,
|
8552 | Symbol = context.Symbol,
|
8553 | Uint8Array = context.Uint8Array,
|
8554 | allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
|
8555 | getPrototype = overArg(Object.getPrototypeOf, Object),
|
8556 | objectCreate = Object.create,
|
8557 | propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
8558 | splice = arrayProto.splice,
|
8559 | spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
|
8560 | symIterator = Symbol ? Symbol.iterator : undefined,
|
8561 | symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
8562 |
|
8563 | var defineProperty = (function() {
|
8564 | try {
|
8565 | var func = getNative(Object, 'defineProperty');
|
8566 | func({}, '', {});
|
8567 | return func;
|
8568 | } catch (e) {}
|
8569 | }());
|
8570 |
|
8571 |
|
8572 | var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
|
8573 | ctxNow = Date && Date.now !== root.Date.now && Date.now,
|
8574 | ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
8575 |
|
8576 |
|
8577 | var nativeCeil = Math.ceil,
|
8578 | nativeFloor = Math.floor,
|
8579 | nativeGetSymbols = Object.getOwnPropertySymbols,
|
8580 | nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
|
8581 | nativeIsFinite = context.isFinite,
|
8582 | nativeJoin = arrayProto.join,
|
8583 | nativeKeys = overArg(Object.keys, Object),
|
8584 | nativeMax = Math.max,
|
8585 | nativeMin = Math.min,
|
8586 | nativeNow = Date.now,
|
8587 | nativeParseInt = context.parseInt,
|
8588 | nativeRandom = Math.random,
|
8589 | nativeReverse = arrayProto.reverse;
|
8590 |
|
8591 |
|
8592 | var DataView = getNative(context, 'DataView'),
|
8593 | Map = getNative(context, 'Map'),
|
8594 | Promise = getNative(context, 'Promise'),
|
8595 | Set = getNative(context, 'Set'),
|
8596 | WeakMap = getNative(context, 'WeakMap'),
|
8597 | nativeCreate = getNative(Object, 'create');
|
8598 |
|
8599 |
|
8600 | var metaMap = WeakMap && new WeakMap;
|
8601 |
|
8602 |
|
8603 | var realNames = {};
|
8604 |
|
8605 |
|
8606 | var dataViewCtorString = toSource(DataView),
|
8607 | mapCtorString = toSource(Map),
|
8608 | promiseCtorString = toSource(Promise),
|
8609 | setCtorString = toSource(Set),
|
8610 | weakMapCtorString = toSource(WeakMap);
|
8611 |
|
8612 |
|
8613 | var symbolProto = Symbol ? Symbol.prototype : undefined,
|
8614 | symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
|
8615 | symbolToString = symbolProto ? symbolProto.toString : undefined;
|
8616 |
|
8617 |
|
8618 |
|
8619 | |
8620 |
|
8621 |
|
8622 |
|
8623 |
|
8624 |
|
8625 |
|
8626 |
|
8627 |
|
8628 |
|
8629 |
|
8630 |
|
8631 |
|
8632 |
|
8633 |
|
8634 |
|
8635 |
|
8636 |
|
8637 |
|
8638 |
|
8639 |
|
8640 |
|
8641 |
|
8642 |
|
8643 |
|
8644 |
|
8645 |
|
8646 |
|
8647 |
|
8648 |
|
8649 |
|
8650 |
|
8651 |
|
8652 |
|
8653 |
|
8654 |
|
8655 |
|
8656 |
|
8657 |
|
8658 |
|
8659 |
|
8660 |
|
8661 |
|
8662 |
|
8663 |
|
8664 |
|
8665 |
|
8666 |
|
8667 |
|
8668 |
|
8669 |
|
8670 |
|
8671 |
|
8672 |
|
8673 |
|
8674 |
|
8675 |
|
8676 |
|
8677 |
|
8678 |
|
8679 |
|
8680 |
|
8681 |
|
8682 |
|
8683 |
|
8684 |
|
8685 |
|
8686 |
|
8687 |
|
8688 |
|
8689 |
|
8690 |
|
8691 |
|
8692 |
|
8693 |
|
8694 |
|
8695 |
|
8696 |
|
8697 |
|
8698 |
|
8699 |
|
8700 |
|
8701 |
|
8702 |
|
8703 |
|
8704 |
|
8705 |
|
8706 |
|
8707 |
|
8708 |
|
8709 |
|
8710 |
|
8711 |
|
8712 |
|
8713 |
|
8714 |
|
8715 |
|
8716 |
|
8717 |
|
8718 |
|
8719 |
|
8720 |
|
8721 |
|
8722 |
|
8723 |
|
8724 |
|
8725 |
|
8726 |
|
8727 |
|
8728 |
|
8729 |
|
8730 |
|
8731 |
|
8732 |
|
8733 |
|
8734 |
|
8735 |
|
8736 | function lodash(value) {
|
8737 | if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
8738 | if (value instanceof LodashWrapper) {
|
8739 | return value;
|
8740 | }
|
8741 | if (hasOwnProperty.call(value, '__wrapped__')) {
|
8742 | return wrapperClone(value);
|
8743 | }
|
8744 | }
|
8745 | return new LodashWrapper(value);
|
8746 | }
|
8747 |
|
8748 | |
8749 |
|
8750 |
|
8751 |
|
8752 |
|
8753 |
|
8754 |
|
8755 |
|
8756 | var baseCreate = (function() {
|
8757 | function object() {}
|
8758 | return function(proto) {
|
8759 | if (!isObject(proto)) {
|
8760 | return {};
|
8761 | }
|
8762 | if (objectCreate) {
|
8763 | return objectCreate(proto);
|
8764 | }
|
8765 | object.prototype = proto;
|
8766 | var result = new object;
|
8767 | object.prototype = undefined;
|
8768 | return result;
|
8769 | };
|
8770 | }());
|
8771 |
|
8772 | |
8773 |
|
8774 |
|
8775 |
|
8776 |
|
8777 | function baseLodash() {
|
8778 |
|
8779 | }
|
8780 |
|
8781 | |
8782 |
|
8783 |
|
8784 |
|
8785 |
|
8786 |
|
8787 |
|
8788 | function LodashWrapper(value, chainAll) {
|
8789 | this.__wrapped__ = value;
|
8790 | this.__actions__ = [];
|
8791 | this.__chain__ = !!chainAll;
|
8792 | this.__index__ = 0;
|
8793 | this.__values__ = undefined;
|
8794 | }
|
8795 |
|
8796 | |
8797 |
|
8798 |
|
8799 |
|
8800 |
|
8801 |
|
8802 |
|
8803 |
|
8804 |
|
8805 | lodash.templateSettings = {
|
8806 |
|
8807 | |
8808 |
|
8809 |
|
8810 |
|
8811 |
|
8812 |
|
8813 | 'escape': reEscape,
|
8814 |
|
8815 | |
8816 |
|
8817 |
|
8818 |
|
8819 |
|
8820 |
|
8821 | 'evaluate': reEvaluate,
|
8822 |
|
8823 | |
8824 |
|
8825 |
|
8826 |
|
8827 |
|
8828 |
|
8829 | 'interpolate': reInterpolate,
|
8830 |
|
8831 | |
8832 |
|
8833 |
|
8834 |
|
8835 |
|
8836 |
|
8837 | 'variable': '',
|
8838 |
|
8839 | |
8840 |
|
8841 |
|
8842 |
|
8843 |
|
8844 |
|
8845 | 'imports': {
|
8846 |
|
8847 | |
8848 |
|
8849 |
|
8850 |
|
8851 |
|
8852 |
|
8853 | '_': lodash
|
8854 | }
|
8855 | };
|
8856 |
|
8857 |
|
8858 | lodash.prototype = baseLodash.prototype;
|
8859 | lodash.prototype.constructor = lodash;
|
8860 |
|
8861 | LodashWrapper.prototype = baseCreate(baseLodash.prototype);
|
8862 | LodashWrapper.prototype.constructor = LodashWrapper;
|
8863 |
|
8864 |
|
8865 |
|
8866 | |
8867 |
|
8868 |
|
8869 |
|
8870 |
|
8871 |
|
8872 |
|
8873 | function LazyWrapper(value) {
|
8874 | this.__wrapped__ = value;
|
8875 | this.__actions__ = [];
|
8876 | this.__dir__ = 1;
|
8877 | this.__filtered__ = false;
|
8878 | this.__iteratees__ = [];
|
8879 | this.__takeCount__ = MAX_ARRAY_LENGTH;
|
8880 | this.__views__ = [];
|
8881 | }
|
8882 |
|
8883 | |
8884 |
|
8885 |
|
8886 |
|
8887 |
|
8888 |
|
8889 |
|
8890 |
|
8891 | function lazyClone() {
|
8892 | var result = new LazyWrapper(this.__wrapped__);
|
8893 | result.__actions__ = copyArray(this.__actions__);
|
8894 | result.__dir__ = this.__dir__;
|
8895 | result.__filtered__ = this.__filtered__;
|
8896 | result.__iteratees__ = copyArray(this.__iteratees__);
|
8897 | result.__takeCount__ = this.__takeCount__;
|
8898 | result.__views__ = copyArray(this.__views__);
|
8899 | return result;
|
8900 | }
|
8901 |
|
8902 | |
8903 |
|
8904 |
|
8905 |
|
8906 |
|
8907 |
|
8908 |
|
8909 |
|
8910 | function lazyReverse() {
|
8911 | if (this.__filtered__) {
|
8912 | var result = new LazyWrapper(this);
|
8913 | result.__dir__ = -1;
|
8914 | result.__filtered__ = true;
|
8915 | } else {
|
8916 | result = this.clone();
|
8917 | result.__dir__ *= -1;
|
8918 | }
|
8919 | return result;
|
8920 | }
|
8921 |
|
8922 | |
8923 |
|
8924 |
|
8925 |
|
8926 |
|
8927 |
|
8928 |
|
8929 |
|
8930 | function lazyValue() {
|
8931 | var array = this.__wrapped__.value(),
|
8932 | dir = this.__dir__,
|
8933 | isArr = isArray(array),
|
8934 | isRight = dir < 0,
|
8935 | arrLength = isArr ? array.length : 0,
|
8936 | view = getView(0, arrLength, this.__views__),
|
8937 | start = view.start,
|
8938 | end = view.end,
|
8939 | length = end - start,
|
8940 | index = isRight ? end : (start - 1),
|
8941 | iteratees = this.__iteratees__,
|
8942 | iterLength = iteratees.length,
|
8943 | resIndex = 0,
|
8944 | takeCount = nativeMin(length, this.__takeCount__);
|
8945 |
|
8946 | if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
|
8947 | return baseWrapperValue(array, this.__actions__);
|
8948 | }
|
8949 | var result = [];
|
8950 |
|
8951 | outer:
|
8952 | while (length-- && resIndex < takeCount) {
|
8953 | index += dir;
|
8954 |
|
8955 | var iterIndex = -1,
|
8956 | value = array[index];
|
8957 |
|
8958 | while (++iterIndex < iterLength) {
|
8959 | var data = iteratees[iterIndex],
|
8960 | iteratee = data.iteratee,
|
8961 | type = data.type,
|
8962 | computed = iteratee(value);
|
8963 |
|
8964 | if (type == LAZY_MAP_FLAG) {
|
8965 | value = computed;
|
8966 | } else if (!computed) {
|
8967 | if (type == LAZY_FILTER_FLAG) {
|
8968 | continue outer;
|
8969 | } else {
|
8970 | break outer;
|
8971 | }
|
8972 | }
|
8973 | }
|
8974 | result[resIndex++] = value;
|
8975 | }
|
8976 | return result;
|
8977 | }
|
8978 |
|
8979 |
|
8980 | LazyWrapper.prototype = baseCreate(baseLodash.prototype);
|
8981 | LazyWrapper.prototype.constructor = LazyWrapper;
|
8982 |
|
8983 |
|
8984 |
|
8985 | |
8986 |
|
8987 |
|
8988 |
|
8989 |
|
8990 |
|
8991 |
|
8992 | function Hash(entries) {
|
8993 | var index = -1,
|
8994 | length = entries == null ? 0 : entries.length;
|
8995 |
|
8996 | this.clear();
|
8997 | while (++index < length) {
|
8998 | var entry = entries[index];
|
8999 | this.set(entry[0], entry[1]);
|
9000 | }
|
9001 | }
|
9002 |
|
9003 | |
9004 |
|
9005 |
|
9006 |
|
9007 |
|
9008 |
|
9009 |
|
9010 | function hashClear() {
|
9011 | this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
9012 | this.size = 0;
|
9013 | }
|
9014 |
|
9015 | |
9016 |
|
9017 |
|
9018 |
|
9019 |
|
9020 |
|
9021 |
|
9022 |
|
9023 |
|
9024 |
|
9025 | function hashDelete(key) {
|
9026 | var result = this.has(key) && delete this.__data__[key];
|
9027 | this.size -= result ? 1 : 0;
|
9028 | return result;
|
9029 | }
|
9030 |
|
9031 | |
9032 |
|
9033 |
|
9034 |
|
9035 |
|
9036 |
|
9037 |
|
9038 |
|
9039 |
|
9040 | function hashGet(key) {
|
9041 | var data = this.__data__;
|
9042 | if (nativeCreate) {
|
9043 | var result = data[key];
|
9044 | return result === HASH_UNDEFINED ? undefined : result;
|
9045 | }
|
9046 | return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
9047 | }
|
9048 |
|
9049 | |
9050 |
|
9051 |
|
9052 |
|
9053 |
|
9054 |
|
9055 |
|
9056 |
|
9057 |
|
9058 | function hashHas(key) {
|
9059 | var data = this.__data__;
|
9060 | return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
9061 | }
|
9062 |
|
9063 | |
9064 |
|
9065 |
|
9066 |
|
9067 |
|
9068 |
|
9069 |
|
9070 |
|
9071 |
|
9072 |
|
9073 | function hashSet(key, value) {
|
9074 | var data = this.__data__;
|
9075 | this.size += this.has(key) ? 0 : 1;
|
9076 | data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
9077 | return this;
|
9078 | }
|
9079 |
|
9080 |
|
9081 | Hash.prototype.clear = hashClear;
|
9082 | Hash.prototype['delete'] = hashDelete;
|
9083 | Hash.prototype.get = hashGet;
|
9084 | Hash.prototype.has = hashHas;
|
9085 | Hash.prototype.set = hashSet;
|
9086 |
|
9087 |
|
9088 |
|
9089 | |
9090 |
|
9091 |
|
9092 |
|
9093 |
|
9094 |
|
9095 |
|
9096 | function ListCache(entries) {
|
9097 | var index = -1,
|
9098 | length = entries == null ? 0 : entries.length;
|
9099 |
|
9100 | this.clear();
|
9101 | while (++index < length) {
|
9102 | var entry = entries[index];
|
9103 | this.set(entry[0], entry[1]);
|
9104 | }
|
9105 | }
|
9106 |
|
9107 | |
9108 |
|
9109 |
|
9110 |
|
9111 |
|
9112 |
|
9113 |
|
9114 | function listCacheClear() {
|
9115 | this.__data__ = [];
|
9116 | this.size = 0;
|
9117 | }
|
9118 |
|
9119 | |
9120 |
|
9121 |
|
9122 |
|
9123 |
|
9124 |
|
9125 |
|
9126 |
|
9127 |
|
9128 | function listCacheDelete(key) {
|
9129 | var data = this.__data__,
|
9130 | index = assocIndexOf(data, key);
|
9131 |
|
9132 | if (index < 0) {
|
9133 | return false;
|
9134 | }
|
9135 | var lastIndex = data.length - 1;
|
9136 | if (index == lastIndex) {
|
9137 | data.pop();
|
9138 | } else {
|
9139 | splice.call(data, index, 1);
|
9140 | }
|
9141 | --this.size;
|
9142 | return true;
|
9143 | }
|
9144 |
|
9145 | |
9146 |
|
9147 |
|
9148 |
|
9149 |
|
9150 |
|
9151 |
|
9152 |
|
9153 |
|
9154 | function listCacheGet(key) {
|
9155 | var data = this.__data__,
|
9156 | index = assocIndexOf(data, key);
|
9157 |
|
9158 | return index < 0 ? undefined : data[index][1];
|
9159 | }
|
9160 |
|
9161 | |
9162 |
|
9163 |
|
9164 |
|
9165 |
|
9166 |
|
9167 |
|
9168 |
|
9169 |
|
9170 | function listCacheHas(key) {
|
9171 | return assocIndexOf(this.__data__, key) > -1;
|
9172 | }
|
9173 |
|
9174 | |
9175 |
|
9176 |
|
9177 |
|
9178 |
|
9179 |
|
9180 |
|
9181 |
|
9182 |
|
9183 |
|
9184 | function listCacheSet(key, value) {
|
9185 | var data = this.__data__,
|
9186 | index = assocIndexOf(data, key);
|
9187 |
|
9188 | if (index < 0) {
|
9189 | ++this.size;
|
9190 | data.push([key, value]);
|
9191 | } else {
|
9192 | data[index][1] = value;
|
9193 | }
|
9194 | return this;
|
9195 | }
|
9196 |
|
9197 |
|
9198 | ListCache.prototype.clear = listCacheClear;
|
9199 | ListCache.prototype['delete'] = listCacheDelete;
|
9200 | ListCache.prototype.get = listCacheGet;
|
9201 | ListCache.prototype.has = listCacheHas;
|
9202 | ListCache.prototype.set = listCacheSet;
|
9203 |
|
9204 |
|
9205 |
|
9206 | |
9207 |
|
9208 |
|
9209 |
|
9210 |
|
9211 |
|
9212 |
|
9213 | function MapCache(entries) {
|
9214 | var index = -1,
|
9215 | length = entries == null ? 0 : entries.length;
|
9216 |
|
9217 | this.clear();
|
9218 | while (++index < length) {
|
9219 | var entry = entries[index];
|
9220 | this.set(entry[0], entry[1]);
|
9221 | }
|
9222 | }
|
9223 |
|
9224 | |
9225 |
|
9226 |
|
9227 |
|
9228 |
|
9229 |
|
9230 |
|
9231 | function mapCacheClear() {
|
9232 | this.size = 0;
|
9233 | this.__data__ = {
|
9234 | 'hash': new Hash,
|
9235 | 'map': new (Map || ListCache),
|
9236 | 'string': new Hash
|
9237 | };
|
9238 | }
|
9239 |
|
9240 | |
9241 |
|
9242 |
|
9243 |
|
9244 |
|
9245 |
|
9246 |
|
9247 |
|
9248 |
|
9249 | function mapCacheDelete(key) {
|
9250 | var result = getMapData(this, key)['delete'](key);
|
9251 | this.size -= result ? 1 : 0;
|
9252 | return result;
|
9253 | }
|
9254 |
|
9255 | |
9256 |
|
9257 |
|
9258 |
|
9259 |
|
9260 |
|
9261 |
|
9262 |
|
9263 |
|
9264 | function mapCacheGet(key) {
|
9265 | return getMapData(this, key).get(key);
|
9266 | }
|
9267 |
|
9268 | |
9269 |
|
9270 |
|
9271 |
|
9272 |
|
9273 |
|
9274 |
|
9275 |
|
9276 |
|
9277 | function mapCacheHas(key) {
|
9278 | return getMapData(this, key).has(key);
|
9279 | }
|
9280 |
|
9281 | |
9282 |
|
9283 |
|
9284 |
|
9285 |
|
9286 |
|
9287 |
|
9288 |
|
9289 |
|
9290 |
|
9291 | function mapCacheSet(key, value) {
|
9292 | var data = getMapData(this, key),
|
9293 | size = data.size;
|
9294 |
|
9295 | data.set(key, value);
|
9296 | this.size += data.size == size ? 0 : 1;
|
9297 | return this;
|
9298 | }
|
9299 |
|
9300 |
|
9301 | MapCache.prototype.clear = mapCacheClear;
|
9302 | MapCache.prototype['delete'] = mapCacheDelete;
|
9303 | MapCache.prototype.get = mapCacheGet;
|
9304 | MapCache.prototype.has = mapCacheHas;
|
9305 | MapCache.prototype.set = mapCacheSet;
|
9306 |
|
9307 |
|
9308 |
|
9309 | |
9310 |
|
9311 |
|
9312 |
|
9313 |
|
9314 |
|
9315 |
|
9316 |
|
9317 | function SetCache(values) {
|
9318 | var index = -1,
|
9319 | length = values == null ? 0 : values.length;
|
9320 |
|
9321 | this.__data__ = new MapCache;
|
9322 | while (++index < length) {
|
9323 | this.add(values[index]);
|
9324 | }
|
9325 | }
|
9326 |
|
9327 | |
9328 |
|
9329 |
|
9330 |
|
9331 |
|
9332 |
|
9333 |
|
9334 |
|
9335 |
|
9336 |
|
9337 | function setCacheAdd(value) {
|
9338 | this.__data__.set(value, HASH_UNDEFINED);
|
9339 | return this;
|
9340 | }
|
9341 |
|
9342 | |
9343 |
|
9344 |
|
9345 |
|
9346 |
|
9347 |
|
9348 |
|
9349 |
|
9350 |
|
9351 | function setCacheHas(value) {
|
9352 | return this.__data__.has(value);
|
9353 | }
|
9354 |
|
9355 |
|
9356 | SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
9357 | SetCache.prototype.has = setCacheHas;
|
9358 |
|
9359 |
|
9360 |
|
9361 | |
9362 |
|
9363 |
|
9364 |
|
9365 |
|
9366 |
|
9367 |
|
9368 | function Stack(entries) {
|
9369 | var data = this.__data__ = new ListCache(entries);
|
9370 | this.size = data.size;
|
9371 | }
|
9372 |
|
9373 | |
9374 |
|
9375 |
|
9376 |
|
9377 |
|
9378 |
|
9379 |
|
9380 | function stackClear() {
|
9381 | this.__data__ = new ListCache;
|
9382 | this.size = 0;
|
9383 | }
|
9384 |
|
9385 | |
9386 |
|
9387 |
|
9388 |
|
9389 |
|
9390 |
|
9391 |
|
9392 |
|
9393 |
|
9394 | function stackDelete(key) {
|
9395 | var data = this.__data__,
|
9396 | result = data['delete'](key);
|
9397 |
|
9398 | this.size = data.size;
|
9399 | return result;
|
9400 | }
|
9401 |
|
9402 | |
9403 |
|
9404 |
|
9405 |
|
9406 |
|
9407 |
|
9408 |
|
9409 |
|
9410 |
|
9411 | function stackGet(key) {
|
9412 | return this.__data__.get(key);
|
9413 | }
|
9414 |
|
9415 | |
9416 |
|
9417 |
|
9418 |
|
9419 |
|
9420 |
|
9421 |
|
9422 |
|
9423 |
|
9424 | function stackHas(key) {
|
9425 | return this.__data__.has(key);
|
9426 | }
|
9427 |
|
9428 | |
9429 |
|
9430 |
|
9431 |
|
9432 |
|
9433 |
|
9434 |
|
9435 |
|
9436 |
|
9437 |
|
9438 | function stackSet(key, value) {
|
9439 | var data = this.__data__;
|
9440 | if (data instanceof ListCache) {
|
9441 | var pairs = data.__data__;
|
9442 | if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
9443 | pairs.push([key, value]);
|
9444 | this.size = ++data.size;
|
9445 | return this;
|
9446 | }
|
9447 | data = this.__data__ = new MapCache(pairs);
|
9448 | }
|
9449 | data.set(key, value);
|
9450 | this.size = data.size;
|
9451 | return this;
|
9452 | }
|
9453 |
|
9454 |
|
9455 | Stack.prototype.clear = stackClear;
|
9456 | Stack.prototype['delete'] = stackDelete;
|
9457 | Stack.prototype.get = stackGet;
|
9458 | Stack.prototype.has = stackHas;
|
9459 | Stack.prototype.set = stackSet;
|
9460 |
|
9461 |
|
9462 |
|
9463 | |
9464 |
|
9465 |
|
9466 |
|
9467 |
|
9468 |
|
9469 |
|
9470 |
|
9471 | function arrayLikeKeys(value, inherited) {
|
9472 | var isArr = isArray(value),
|
9473 | isArg = !isArr && isArguments(value),
|
9474 | isBuff = !isArr && !isArg && isBuffer(value),
|
9475 | isType = !isArr && !isArg && !isBuff && isTypedArray(value),
|
9476 | skipIndexes = isArr || isArg || isBuff || isType,
|
9477 | result = skipIndexes ? baseTimes(value.length, String) : [],
|
9478 | length = result.length;
|
9479 |
|
9480 | for (var key in value) {
|
9481 | if ((inherited || hasOwnProperty.call(value, key)) &&
|
9482 | !(skipIndexes && (
|
9483 |
|
9484 | key == 'length' ||
|
9485 |
|
9486 | (isBuff && (key == 'offset' || key == 'parent')) ||
|
9487 |
|
9488 | (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
9489 |
|
9490 | isIndex(key, length)
|
9491 | ))) {
|
9492 | result.push(key);
|
9493 | }
|
9494 | }
|
9495 | return result;
|
9496 | }
|
9497 |
|
9498 | |
9499 |
|
9500 |
|
9501 |
|
9502 |
|
9503 |
|
9504 |
|
9505 | function arraySample(array) {
|
9506 | var length = array.length;
|
9507 | return length ? array[baseRandom(0, length - 1)] : undefined;
|
9508 | }
|
9509 |
|
9510 | |
9511 |
|
9512 |
|
9513 |
|
9514 |
|
9515 |
|
9516 |
|
9517 |
|
9518 | function arraySampleSize(array, n) {
|
9519 | return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
|
9520 | }
|
9521 |
|
9522 | |
9523 |
|
9524 |
|
9525 |
|
9526 |
|
9527 |
|
9528 |
|
9529 | function arrayShuffle(array) {
|
9530 | return shuffleSelf(copyArray(array));
|
9531 | }
|
9532 |
|
9533 | |
9534 |
|
9535 |
|
9536 |
|
9537 |
|
9538 |
|
9539 |
|
9540 |
|
9541 |
|
9542 | function assignMergeValue(object, key, value) {
|
9543 | if ((value !== undefined && !eq(object[key], value)) ||
|
9544 | (value === undefined && !(key in object))) {
|
9545 | baseAssignValue(object, key, value);
|
9546 | }
|
9547 | }
|
9548 |
|
9549 | |
9550 |
|
9551 |
|
9552 |
|
9553 |
|
9554 |
|
9555 |
|
9556 |
|
9557 |
|
9558 |
|
9559 | function assignValue(object, key, value) {
|
9560 | var objValue = object[key];
|
9561 | if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
|
9562 | (value === undefined && !(key in object))) {
|
9563 | baseAssignValue(object, key, value);
|
9564 | }
|
9565 | }
|
9566 |
|
9567 | |
9568 |
|
9569 |
|
9570 |
|
9571 |
|
9572 |
|
9573 |
|
9574 |
|
9575 | function assocIndexOf(array, key) {
|
9576 | var length = array.length;
|
9577 | while (length--) {
|
9578 | if (eq(array[length][0], key)) {
|
9579 | return length;
|
9580 | }
|
9581 | }
|
9582 | return -1;
|
9583 | }
|
9584 |
|
9585 | |
9586 |
|
9587 |
|
9588 |
|
9589 |
|
9590 |
|
9591 |
|
9592 |
|
9593 |
|
9594 |
|
9595 |
|
9596 | function baseAggregator(collection, setter, iteratee, accumulator) {
|
9597 | baseEach(collection, function(value, key, collection) {
|
9598 | setter(accumulator, value, iteratee(value), collection);
|
9599 | });
|
9600 | return accumulator;
|
9601 | }
|
9602 |
|
9603 | |
9604 |
|
9605 |
|
9606 |
|
9607 |
|
9608 |
|
9609 |
|
9610 |
|
9611 |
|
9612 | function baseAssign(object, source) {
|
9613 | return object && copyObject(source, keys(source), object);
|
9614 | }
|
9615 |
|
9616 | |
9617 |
|
9618 |
|
9619 |
|
9620 |
|
9621 |
|
9622 |
|
9623 |
|
9624 |
|
9625 | function baseAssignIn(object, source) {
|
9626 | return object && copyObject(source, keysIn(source), object);
|
9627 | }
|
9628 |
|
9629 | |
9630 |
|
9631 |
|
9632 |
|
9633 |
|
9634 |
|
9635 |
|
9636 |
|
9637 |
|
9638 | function baseAssignValue(object, key, value) {
|
9639 | if (key == '__proto__' && defineProperty) {
|
9640 | defineProperty(object, key, {
|
9641 | 'configurable': true,
|
9642 | 'enumerable': true,
|
9643 | 'value': value,
|
9644 | 'writable': true
|
9645 | });
|
9646 | } else {
|
9647 | object[key] = value;
|
9648 | }
|
9649 | }
|
9650 |
|
9651 | |
9652 |
|
9653 |
|
9654 |
|
9655 |
|
9656 |
|
9657 |
|
9658 |
|
9659 | function baseAt(object, paths) {
|
9660 | var index = -1,
|
9661 | length = paths.length,
|
9662 | result = Array(length),
|
9663 | skip = object == null;
|
9664 |
|
9665 | while (++index < length) {
|
9666 | result[index] = skip ? undefined : get(object, paths[index]);
|
9667 | }
|
9668 | return result;
|
9669 | }
|
9670 |
|
9671 | /**
|
9672 | * The base implementation of `_.clamp` which doesn't coerce arguments.
|
9673 | *
|
9674 | * @private
|
9675 | * @param {number} number The number to clamp.
|
9676 | * @param {number} [lower] The lower bound.
|
9677 | * @param {number} upper The upper bound.
|
9678 | * @returns {number} Returns the clamped number.
|
9679 | */
|
9680 | function baseClamp(number, lower, upper) {
|
9681 | if (number === number) {
|
9682 | if (upper !== undefined) {
|
9683 | number = number <= upper ? number : upper;
|
9684 | }
|
9685 | if (lower !== undefined) {
|
9686 | number = number >= lower ? number : lower;
|
9687 | }
|
9688 | }
|
9689 | return number;
|
9690 | }
|
9691 |
|
9692 | |
9693 |
|
9694 |
|
9695 |
|
9696 |
|
9697 |
|
9698 |
|
9699 |
|
9700 |
|
9701 |
|
9702 |
|
9703 |
|
9704 |
|
9705 |
|
9706 |
|
9707 |
|
9708 | function baseClone(value, bitmask, customizer, key, object, stack) {
|
9709 | var result,
|
9710 | isDeep = bitmask & CLONE_DEEP_FLAG,
|
9711 | isFlat = bitmask & CLONE_FLAT_FLAG,
|
9712 | isFull = bitmask & CLONE_SYMBOLS_FLAG;
|
9713 |
|
9714 | if (customizer) {
|
9715 | result = object ? customizer(value, key, object, stack) : customizer(value);
|
9716 | }
|
9717 | if (result !== undefined) {
|
9718 | return result;
|
9719 | }
|
9720 | if (!isObject(value)) {
|
9721 | return value;
|
9722 | }
|
9723 | var isArr = isArray(value);
|
9724 | if (isArr) {
|
9725 | result = initCloneArray(value);
|
9726 | if (!isDeep) {
|
9727 | return copyArray(value, result);
|
9728 | }
|
9729 | } else {
|
9730 | var tag = getTag(value),
|
9731 | isFunc = tag == funcTag || tag == genTag;
|
9732 |
|
9733 | if (isBuffer(value)) {
|
9734 | return cloneBuffer(value, isDeep);
|
9735 | }
|
9736 | if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
9737 | result = (isFlat || isFunc) ? {} : initCloneObject(value);
|
9738 | if (!isDeep) {
|
9739 | return isFlat
|
9740 | ? copySymbolsIn(value, baseAssignIn(result, value))
|
9741 | : copySymbols(value, baseAssign(result, value));
|
9742 | }
|
9743 | } else {
|
9744 | if (!cloneableTags[tag]) {
|
9745 | return object ? value : {};
|
9746 | }
|
9747 | result = initCloneByTag(value, tag, baseClone, isDeep);
|
9748 | }
|
9749 | }
|
9750 |
|
9751 | stack || (stack = new Stack);
|
9752 | var stacked = stack.get(value);
|
9753 | if (stacked) {
|
9754 | return stacked;
|
9755 | }
|
9756 | stack.set(value, result);
|
9757 |
|
9758 | var keysFunc = isFull
|
9759 | ? (isFlat ? getAllKeysIn : getAllKeys)
|
9760 | : (isFlat ? keysIn : keys);
|
9761 |
|
9762 | var props = isArr ? undefined : keysFunc(value);
|
9763 | arrayEach(props || value, function(subValue, key) {
|
9764 | if (props) {
|
9765 | key = subValue;
|
9766 | subValue = value[key];
|
9767 | }
|
9768 |
|
9769 | assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
9770 | });
|
9771 | return result;
|
9772 | }
|
9773 |
|
9774 | |
9775 |
|
9776 |
|
9777 |
|
9778 |
|
9779 |
|
9780 |
|
9781 | function baseConforms(source) {
|
9782 | var props = keys(source);
|
9783 | return function(object) {
|
9784 | return baseConformsTo(object, source, props);
|
9785 | };
|
9786 | }
|
9787 |
|
9788 | |
9789 |
|
9790 |
|
9791 |
|
9792 |
|
9793 |
|
9794 |
|
9795 |
|
9796 | function baseConformsTo(object, source, props) {
|
9797 | var length = props.length;
|
9798 | if (object == null) {
|
9799 | return !length;
|
9800 | }
|
9801 | object = Object(object);
|
9802 | while (length--) {
|
9803 | var key = props[length],
|
9804 | predicate = source[key],
|
9805 | value = object[key];
|
9806 |
|
9807 | if ((value === undefined && !(key in object)) || !predicate(value)) {
|
9808 | return false;
|
9809 | }
|
9810 | }
|
9811 | return true;
|
9812 | }
|
9813 |
|
9814 | |
9815 |
|
9816 |
|
9817 |
|
9818 |
|
9819 |
|
9820 |
|
9821 |
|
9822 |
|
9823 |
|
9824 | function baseDelay(func, wait, args) {
|
9825 | if (typeof func != 'function') {
|
9826 | throw new TypeError(FUNC_ERROR_TEXT);
|
9827 | }
|
9828 | return setTimeout(function() { func.apply(undefined, args); }, wait);
|
9829 | }
|
9830 |
|
9831 | |
9832 |
|
9833 |
|
9834 |
|
9835 |
|
9836 |
|
9837 |
|
9838 |
|
9839 |
|
9840 |
|
9841 |
|
9842 | function baseDifference(array, values, iteratee, comparator) {
|
9843 | var index = -1,
|
9844 | includes = arrayIncludes,
|
9845 | isCommon = true,
|
9846 | length = array.length,
|
9847 | result = [],
|
9848 | valuesLength = values.length;
|
9849 |
|
9850 | if (!length) {
|
9851 | return result;
|
9852 | }
|
9853 | if (iteratee) {
|
9854 | values = arrayMap(values, baseUnary(iteratee));
|
9855 | }
|
9856 | if (comparator) {
|
9857 | includes = arrayIncludesWith;
|
9858 | isCommon = false;
|
9859 | }
|
9860 | else if (values.length >= LARGE_ARRAY_SIZE) {
|
9861 | includes = cacheHas;
|
9862 | isCommon = false;
|
9863 | values = new SetCache(values);
|
9864 | }
|
9865 | outer:
|
9866 | while (++index < length) {
|
9867 | var value = array[index],
|
9868 | computed = iteratee == null ? value : iteratee(value);
|
9869 |
|
9870 | value = (comparator || value !== 0) ? value : 0;
|
9871 | if (isCommon && computed === computed) {
|
9872 | var valuesIndex = valuesLength;
|
9873 | while (valuesIndex--) {
|
9874 | if (values[valuesIndex] === computed) {
|
9875 | continue outer;
|
9876 | }
|
9877 | }
|
9878 | result.push(value);
|
9879 | }
|
9880 | else if (!includes(values, computed, comparator)) {
|
9881 | result.push(value);
|
9882 | }
|
9883 | }
|
9884 | return result;
|
9885 | }
|
9886 |
|
9887 | |
9888 |
|
9889 |
|
9890 |
|
9891 |
|
9892 |
|
9893 |
|
9894 |
|
9895 | var baseEach = createBaseEach(baseForOwn);
|
9896 |
|
9897 | |
9898 |
|
9899 |
|
9900 |
|
9901 |
|
9902 |
|
9903 |
|
9904 |
|
9905 | var baseEachRight = createBaseEach(baseForOwnRight, true);
|
9906 |
|
9907 | |
9908 |
|
9909 |
|
9910 |
|
9911 |
|
9912 |
|
9913 |
|
9914 |
|
9915 |
|
9916 | function baseEvery(collection, predicate) {
|
9917 | var result = true;
|
9918 | baseEach(collection, function(value, index, collection) {
|
9919 | result = !!predicate(value, index, collection);
|
9920 | return result;
|
9921 | });
|
9922 | return result;
|
9923 | }
|
9924 |
|
9925 | |
9926 |
|
9927 |
|
9928 |
|
9929 |
|
9930 |
|
9931 |
|
9932 |
|
9933 |
|
9934 |
|
9935 | function baseExtremum(array, iteratee, comparator) {
|
9936 | var index = -1,
|
9937 | length = array.length;
|
9938 |
|
9939 | while (++index < length) {
|
9940 | var value = array[index],
|
9941 | current = iteratee(value);
|
9942 |
|
9943 | if (current != null && (computed === undefined
|
9944 | ? (current === current && !isSymbol(current))
|
9945 | : comparator(current, computed)
|
9946 | )) {
|
9947 | var computed = current,
|
9948 | result = value;
|
9949 | }
|
9950 | }
|
9951 | return result;
|
9952 | }
|
9953 |
|
9954 | |
9955 |
|
9956 |
|
9957 |
|
9958 |
|
9959 |
|
9960 |
|
9961 |
|
9962 |
|
9963 |
|
9964 | function baseFill(array, value, start, end) {
|
9965 | var length = array.length;
|
9966 |
|
9967 | start = toInteger(start);
|
9968 | if (start < 0) {
|
9969 | start = -start > length ? 0 : (length + start);
|
9970 | }
|
9971 | end = (end === undefined || end > length) ? length : toInteger(end);
|
9972 | if (end < 0) {
|
9973 | end += length;
|
9974 | }
|
9975 | end = start > end ? 0 : toLength(end);
|
9976 | while (start < end) {
|
9977 | array[start++] = value;
|
9978 | }
|
9979 | return array;
|
9980 | }
|
9981 |
|
9982 | |
9983 |
|
9984 |
|
9985 |
|
9986 |
|
9987 |
|
9988 |
|
9989 |
|
9990 | function baseFilter(collection, predicate) {
|
9991 | var result = [];
|
9992 | baseEach(collection, function(value, index, collection) {
|
9993 | if (predicate(value, index, collection)) {
|
9994 | result.push(value);
|
9995 | }
|
9996 | });
|
9997 | return result;
|
9998 | }
|
9999 |
|
10000 | |
10001 |
|
10002 |
|
10003 |
|
10004 |
|
10005 |
|
10006 |
|
10007 |
|
10008 |
|
10009 |
|
10010 |
|
10011 | function baseFlatten(array, depth, predicate, isStrict, result) {
|
10012 | var index = -1,
|
10013 | length = array.length;
|
10014 |
|
10015 | predicate || (predicate = isFlattenable);
|
10016 | result || (result = []);
|
10017 |
|
10018 | while (++index < length) {
|
10019 | var value = array[index];
|
10020 | if (depth > 0 && predicate(value)) {
|
10021 | if (depth > 1) {
|
10022 |
|
10023 | baseFlatten(value, depth - 1, predicate, isStrict, result);
|
10024 | } else {
|
10025 | arrayPush(result, value);
|
10026 | }
|
10027 | } else if (!isStrict) {
|
10028 | result[result.length] = value;
|
10029 | }
|
10030 | }
|
10031 | return result;
|
10032 | }
|
10033 |
|
10034 | |
10035 |
|
10036 |
|
10037 |
|
10038 |
|
10039 |
|
10040 |
|
10041 |
|
10042 |
|
10043 |
|
10044 |
|
10045 | var baseFor = createBaseFor();
|
10046 |
|
10047 | |
10048 |
|
10049 |
|
10050 |
|
10051 |
|
10052 |
|
10053 |
|
10054 |
|
10055 |
|
10056 |
|
10057 | var baseForRight = createBaseFor(true);
|
10058 |
|
10059 | |
10060 |
|
10061 |
|
10062 |
|
10063 |
|
10064 |
|
10065 |
|
10066 |
|
10067 | function baseForOwn(object, iteratee) {
|
10068 | return object && baseFor(object, iteratee, keys);
|
10069 | }
|
10070 |
|
10071 | |
10072 |
|
10073 |
|
10074 |
|
10075 |
|
10076 |
|
10077 |
|
10078 |
|
10079 | function baseForOwnRight(object, iteratee) {
|
10080 | return object && baseForRight(object, iteratee, keys);
|
10081 | }
|
10082 |
|
10083 | |
10084 |
|
10085 |
|
10086 |
|
10087 |
|
10088 |
|
10089 |
|
10090 |
|
10091 |
|
10092 | function baseFunctions(object, props) {
|
10093 | return arrayFilter(props, function(key) {
|
10094 | return isFunction(object[key]);
|
10095 | });
|
10096 | }
|
10097 |
|
10098 | |
10099 |
|
10100 |
|
10101 |
|
10102 |
|
10103 |
|
10104 |
|
10105 |
|
10106 | function baseGet(object, path) {
|
10107 | path = castPath(path, object);
|
10108 |
|
10109 | var index = 0,
|
10110 | length = path.length;
|
10111 |
|
10112 | while (object != null && index < length) {
|
10113 | object = object[toKey(path[index++])];
|
10114 | }
|
10115 | return (index && index == length) ? object : undefined;
|
10116 | }
|
10117 |
|
10118 | |
10119 |
|
10120 |
|
10121 |
|
10122 |
|
10123 |
|
10124 |
|
10125 |
|
10126 |
|
10127 |
|
10128 |
|
10129 | function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
10130 | var result = keysFunc(object);
|
10131 | return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
10132 | }
|
10133 |
|
10134 | |
10135 |
|
10136 |
|
10137 |
|
10138 |
|
10139 |
|
10140 |
|
10141 | function baseGetTag(value) {
|
10142 | if (value == null) {
|
10143 | return value === undefined ? undefinedTag : nullTag;
|
10144 | }
|
10145 | return (symToStringTag && symToStringTag in Object(value))
|
10146 | ? getRawTag(value)
|
10147 | : objectToString(value);
|
10148 | }
|
10149 |
|
10150 | |
10151 |
|
10152 |
|
10153 |
|
10154 |
|
10155 |
|
10156 |
|
10157 |
|
10158 |
|
10159 | function baseGt(value, other) {
|
10160 | return value > other;
|
10161 | }
|
10162 |
|
10163 | |
10164 |
|
10165 |
|
10166 |
|
10167 |
|
10168 |
|
10169 |
|
10170 |
|
10171 | function baseHas(object, key) {
|
10172 | return object != null && hasOwnProperty.call(object, key);
|
10173 | }
|
10174 |
|
10175 | |
10176 |
|
10177 |
|
10178 |
|
10179 |
|
10180 |
|
10181 |
|
10182 |
|
10183 | function baseHasIn(object, key) {
|
10184 | return object != null && key in Object(object);
|
10185 | }
|
10186 |
|
10187 | |
10188 |
|
10189 |
|
10190 |
|
10191 |
|
10192 |
|
10193 |
|
10194 |
|
10195 |
|
10196 | function baseInRange(number, start, end) {
|
10197 | return number >= nativeMin(start, end) && number < nativeMax(start, end);
|
10198 | }
|
10199 |
|
10200 | |
10201 |
|
10202 |
|
10203 |
|
10204 |
|
10205 |
|
10206 |
|
10207 |
|
10208 |
|
10209 |
|
10210 | function baseIntersection(arrays, iteratee, comparator) {
|
10211 | var includes = comparator ? arrayIncludesWith : arrayIncludes,
|
10212 | length = arrays[0].length,
|
10213 | othLength = arrays.length,
|
10214 | othIndex = othLength,
|
10215 | caches = Array(othLength),
|
10216 | maxLength = Infinity,
|
10217 | result = [];
|
10218 |
|
10219 | while (othIndex--) {
|
10220 | var array = arrays[othIndex];
|
10221 | if (othIndex && iteratee) {
|
10222 | array = arrayMap(array, baseUnary(iteratee));
|
10223 | }
|
10224 | maxLength = nativeMin(array.length, maxLength);
|
10225 | caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
|
10226 | ? new SetCache(othIndex && array)
|
10227 | : undefined;
|
10228 | }
|
10229 | array = arrays[0];
|
10230 |
|
10231 | var index = -1,
|
10232 | seen = caches[0];
|
10233 |
|
10234 | outer:
|
10235 | while (++index < length && result.length < maxLength) {
|
10236 | var value = array[index],
|
10237 | computed = iteratee ? iteratee(value) : value;
|
10238 |
|
10239 | value = (comparator || value !== 0) ? value : 0;
|
10240 | if (!(seen
|
10241 | ? cacheHas(seen, computed)
|
10242 | : includes(result, computed, comparator)
|
10243 | )) {
|
10244 | othIndex = othLength;
|
10245 | while (--othIndex) {
|
10246 | var cache = caches[othIndex];
|
10247 | if (!(cache
|
10248 | ? cacheHas(cache, computed)
|
10249 | : includes(arrays[othIndex], computed, comparator))
|
10250 | ) {
|
10251 | continue outer;
|
10252 | }
|
10253 | }
|
10254 | if (seen) {
|
10255 | seen.push(computed);
|
10256 | }
|
10257 | result.push(value);
|
10258 | }
|
10259 | }
|
10260 | return result;
|
10261 | }
|
10262 |
|
10263 | |
10264 |
|
10265 |
|
10266 |
|
10267 |
|
10268 |
|
10269 |
|
10270 |
|
10271 |
|
10272 |
|
10273 |
|
10274 | function baseInverter(object, setter, iteratee, accumulator) {
|
10275 | baseForOwn(object, function(value, key, object) {
|
10276 | setter(accumulator, iteratee(value), key, object);
|
10277 | });
|
10278 | return accumulator;
|
10279 | }
|
10280 |
|
10281 | |
10282 |
|
10283 |
|
10284 |
|
10285 |
|
10286 |
|
10287 |
|
10288 |
|
10289 |
|
10290 |
|
10291 | function baseInvoke(object, path, args) {
|
10292 | path = castPath(path, object);
|
10293 | object = parent(object, path);
|
10294 | var func = object == null ? object : object[toKey(last(path))];
|
10295 | return func == null ? undefined : apply(func, object, args);
|
10296 | }
|
10297 |
|
10298 | |
10299 |
|
10300 |
|
10301 |
|
10302 |
|
10303 |
|
10304 |
|
10305 | function baseIsArguments(value) {
|
10306 | return isObjectLike(value) && baseGetTag(value) == argsTag;
|
10307 | }
|
10308 |
|
10309 | |
10310 |
|
10311 |
|
10312 |
|
10313 |
|
10314 |
|
10315 |
|
10316 | function baseIsArrayBuffer(value) {
|
10317 | return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
|
10318 | }
|
10319 |
|
10320 | |
10321 |
|
10322 |
|
10323 |
|
10324 |
|
10325 |
|
10326 |
|
10327 | function baseIsDate(value) {
|
10328 | return isObjectLike(value) && baseGetTag(value) == dateTag;
|
10329 | }
|
10330 |
|
10331 | |
10332 |
|
10333 |
|
10334 |
|
10335 |
|
10336 |
|
10337 |
|
10338 |
|
10339 |
|
10340 |
|
10341 |
|
10342 |
|
10343 |
|
10344 |
|
10345 | function baseIsEqual(value, other, bitmask, customizer, stack) {
|
10346 | if (value === other) {
|
10347 | return true;
|
10348 | }
|
10349 | if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
|
10350 | return value !== value && other !== other;
|
10351 | }
|
10352 | return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
10353 | }
|
10354 |
|
10355 | |
10356 |
|
10357 |
|
10358 |
|
10359 |
|
10360 |
|
10361 |
|
10362 |
|
10363 |
|
10364 |
|
10365 |
|
10366 |
|
10367 |
|
10368 |
|
10369 | function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
10370 | var objIsArr = isArray(object),
|
10371 | othIsArr = isArray(other),
|
10372 | objTag = objIsArr ? arrayTag : getTag(object),
|
10373 | othTag = othIsArr ? arrayTag : getTag(other);
|
10374 |
|
10375 | objTag = objTag == argsTag ? objectTag : objTag;
|
10376 | othTag = othTag == argsTag ? objectTag : othTag;
|
10377 |
|
10378 | var objIsObj = objTag == objectTag,
|
10379 | othIsObj = othTag == objectTag,
|
10380 | isSameTag = objTag == othTag;
|
10381 |
|
10382 | if (isSameTag && isBuffer(object)) {
|
10383 | if (!isBuffer(other)) {
|
10384 | return false;
|
10385 | }
|
10386 | objIsArr = true;
|
10387 | objIsObj = false;
|
10388 | }
|
10389 | if (isSameTag && !objIsObj) {
|
10390 | stack || (stack = new Stack);
|
10391 | return (objIsArr || isTypedArray(object))
|
10392 | ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
|
10393 | : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
10394 | }
|
10395 | if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
10396 | var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
10397 | othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
10398 |
|
10399 | if (objIsWrapped || othIsWrapped) {
|
10400 | var objUnwrapped = objIsWrapped ? object.value() : object,
|
10401 | othUnwrapped = othIsWrapped ? other.value() : other;
|
10402 |
|
10403 | stack || (stack = new Stack);
|
10404 | return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
10405 | }
|
10406 | }
|
10407 | if (!isSameTag) {
|
10408 | return false;
|
10409 | }
|
10410 | stack || (stack = new Stack);
|
10411 | return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
10412 | }
|
10413 |
|
10414 | |
10415 |
|
10416 |
|
10417 |
|
10418 |
|
10419 |
|
10420 |
|
10421 | function baseIsMap(value) {
|
10422 | return isObjectLike(value) && getTag(value) == mapTag;
|
10423 | }
|
10424 |
|
10425 | |
10426 |
|
10427 |
|
10428 |
|
10429 |
|
10430 |
|
10431 |
|
10432 |
|
10433 |
|
10434 |
|
10435 | function baseIsMatch(object, source, matchData, customizer) {
|
10436 | var index = matchData.length,
|
10437 | length = index,
|
10438 | noCustomizer = !customizer;
|
10439 |
|
10440 | if (object == null) {
|
10441 | return !length;
|
10442 | }
|
10443 | object = Object(object);
|
10444 | while (index--) {
|
10445 | var data = matchData[index];
|
10446 | if ((noCustomizer && data[2])
|
10447 | ? data[1] !== object[data[0]]
|
10448 | : !(data[0] in object)
|
10449 | ) {
|
10450 | return false;
|
10451 | }
|
10452 | }
|
10453 | while (++index < length) {
|
10454 | data = matchData[index];
|
10455 | var key = data[0],
|
10456 | objValue = object[key],
|
10457 | srcValue = data[1];
|
10458 |
|
10459 | if (noCustomizer && data[2]) {
|
10460 | if (objValue === undefined && !(key in object)) {
|
10461 | return false;
|
10462 | }
|
10463 | } else {
|
10464 | var stack = new Stack;
|
10465 | if (customizer) {
|
10466 | var result = customizer(objValue, srcValue, key, object, source, stack);
|
10467 | }
|
10468 | if (!(result === undefined
|
10469 | ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
|
10470 | : result
|
10471 | )) {
|
10472 | return false;
|
10473 | }
|
10474 | }
|
10475 | }
|
10476 | return true;
|
10477 | }
|
10478 |
|
10479 | |
10480 |
|
10481 |
|
10482 |
|
10483 |
|
10484 |
|
10485 |
|
10486 |
|
10487 | function baseIsNative(value) {
|
10488 | if (!isObject(value) || isMasked(value)) {
|
10489 | return false;
|
10490 | }
|
10491 | var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
10492 | return pattern.test(toSource(value));
|
10493 | }
|
10494 |
|
10495 | |
10496 |
|
10497 |
|
10498 |
|
10499 |
|
10500 |
|
10501 |
|
10502 | function baseIsRegExp(value) {
|
10503 | return isObjectLike(value) && baseGetTag(value) == regexpTag;
|
10504 | }
|
10505 |
|
10506 | |
10507 |
|
10508 |
|
10509 |
|
10510 |
|
10511 |
|
10512 |
|
10513 | function baseIsSet(value) {
|
10514 | return isObjectLike(value) && getTag(value) == setTag;
|
10515 | }
|
10516 |
|
10517 | |
10518 |
|
10519 |
|
10520 |
|
10521 |
|
10522 |
|
10523 |
|
10524 | function baseIsTypedArray(value) {
|
10525 | return isObjectLike(value) &&
|
10526 | isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
10527 | }
|
10528 |
|
10529 | |
10530 |
|
10531 |
|
10532 |
|
10533 |
|
10534 |
|
10535 |
|
10536 | function baseIteratee(value) {
|
10537 |
|
10538 |
|
10539 | if (typeof value == 'function') {
|
10540 | return value;
|
10541 | }
|
10542 | if (value == null) {
|
10543 | return identity;
|
10544 | }
|
10545 | if (typeof value == 'object') {
|
10546 | return isArray(value)
|
10547 | ? baseMatchesProperty(value[0], value[1])
|
10548 | : baseMatches(value);
|
10549 | }
|
10550 | return property(value);
|
10551 | }
|
10552 |
|
10553 | |
10554 |
|
10555 |
|
10556 |
|
10557 |
|
10558 |
|
10559 |
|
10560 | function baseKeys(object) {
|
10561 | if (!isPrototype(object)) {
|
10562 | return nativeKeys(object);
|
10563 | }
|
10564 | var result = [];
|
10565 | for (var key in Object(object)) {
|
10566 | if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
10567 | result.push(key);
|
10568 | }
|
10569 | }
|
10570 | return result;
|
10571 | }
|
10572 |
|
10573 | |
10574 |
|
10575 |
|
10576 |
|
10577 |
|
10578 |
|
10579 |
|
10580 | function baseKeysIn(object) {
|
10581 | if (!isObject(object)) {
|
10582 | return nativeKeysIn(object);
|
10583 | }
|
10584 | var isProto = isPrototype(object),
|
10585 | result = [];
|
10586 |
|
10587 | for (var key in object) {
|
10588 | if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
|
10589 | result.push(key);
|
10590 | }
|
10591 | }
|
10592 | return result;
|
10593 | }
|
10594 |
|
10595 | |
10596 |
|
10597 |
|
10598 |
|
10599 |
|
10600 |
|
10601 |
|
10602 |
|
10603 |
|
10604 | function baseLt(value, other) {
|
10605 | return value < other;
|
10606 | }
|
10607 |
|
10608 | |
10609 |
|
10610 |
|
10611 |
|
10612 |
|
10613 |
|
10614 |
|
10615 |
|
10616 | function baseMap(collection, iteratee) {
|
10617 | var index = -1,
|
10618 | result = isArrayLike(collection) ? Array(collection.length) : [];
|
10619 |
|
10620 | baseEach(collection, function(value, key, collection) {
|
10621 | result[++index] = iteratee(value, key, collection);
|
10622 | });
|
10623 | return result;
|
10624 | }
|
10625 |
|
10626 | |
10627 |
|
10628 |
|
10629 |
|
10630 |
|
10631 |
|
10632 |
|
10633 | function baseMatches(source) {
|
10634 | var matchData = getMatchData(source);
|
10635 | if (matchData.length == 1 && matchData[0][2]) {
|
10636 | return matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
10637 | }
|
10638 | return function(object) {
|
10639 | return object === source || baseIsMatch(object, source, matchData);
|
10640 | };
|
10641 | }
|
10642 |
|
10643 | |
10644 |
|
10645 |
|
10646 |
|
10647 |
|
10648 |
|
10649 |
|
10650 |
|
10651 | function baseMatchesProperty(path, srcValue) {
|
10652 | if (isKey(path) && isStrictComparable(srcValue)) {
|
10653 | return matchesStrictComparable(toKey(path), srcValue);
|
10654 | }
|
10655 | return function(object) {
|
10656 | var objValue = get(object, path);
|
10657 | return (objValue === undefined && objValue === srcValue)
|
10658 | ? hasIn(object, path)
|
10659 | : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
10660 | };
|
10661 | }
|
10662 |
|
10663 | /**
|
10664 | * The base implementation of `_.merge` without support for multiple sources.
|
10665 | *
|
10666 | * @private
|
10667 | * @param {Object} object The destination object.
|
10668 | * @param {Object} source The source object.
|
10669 | * @param {number} srcIndex The index of `source`.
|
10670 | * @param {Function} [customizer] The function to customize merged values.
|
10671 | * @param {Object} [stack] Tracks traversed source values and their merged
|
10672 | * counterparts.
|
10673 | */
|
10674 | function baseMerge(object, source, srcIndex, customizer, stack) {
|
10675 | if (object === source) {
|
10676 | return;
|
10677 | }
|
10678 | baseFor(source, function(srcValue, key) {
|
10679 | if (isObject(srcValue)) {
|
10680 | stack || (stack = new Stack);
|
10681 | baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
10682 | }
|
10683 | else {
|
10684 | var newValue = customizer
|
10685 | ? customizer(object[key], srcValue, (key + ''), object, source, stack)
|
10686 | : undefined;
|
10687 |
|
10688 | if (newValue === undefined) {
|
10689 | newValue = srcValue;
|
10690 | }
|
10691 | assignMergeValue(object, key, newValue);
|
10692 | }
|
10693 | }, keysIn);
|
10694 | }
|
10695 |
|
10696 | |
10697 |
|
10698 |
|
10699 |
|
10700 |
|
10701 |
|
10702 |
|
10703 |
|
10704 |
|
10705 |
|
10706 |
|
10707 |
|
10708 |
|
10709 |
|
10710 |
|
10711 | function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
10712 | var objValue = object[key],
|
10713 | srcValue = source[key],
|
10714 | stacked = stack.get(srcValue);
|
10715 |
|
10716 | if (stacked) {
|
10717 | assignMergeValue(object, key, stacked);
|
10718 | return;
|
10719 | }
|
10720 | var newValue = customizer
|
10721 | ? customizer(objValue, srcValue, (key + ''), object, source, stack)
|
10722 | : undefined;
|
10723 |
|
10724 | var isCommon = newValue === undefined;
|
10725 |
|
10726 | if (isCommon) {
|
10727 | var isArr = isArray(srcValue),
|
10728 | isBuff = !isArr && isBuffer(srcValue),
|
10729 | isTyped = !isArr && !isBuff && isTypedArray(srcValue);
|
10730 |
|
10731 | newValue = srcValue;
|
10732 | if (isArr || isBuff || isTyped) {
|
10733 | if (isArray(objValue)) {
|
10734 | newValue = objValue;
|
10735 | }
|
10736 | else if (isArrayLikeObject(objValue)) {
|
10737 | newValue = copyArray(objValue);
|
10738 | }
|
10739 | else if (isBuff) {
|
10740 | isCommon = false;
|
10741 | newValue = cloneBuffer(srcValue, true);
|
10742 | }
|
10743 | else if (isTyped) {
|
10744 | isCommon = false;
|
10745 | newValue = cloneTypedArray(srcValue, true);
|
10746 | }
|
10747 | else {
|
10748 | newValue = [];
|
10749 | }
|
10750 | }
|
10751 | else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
10752 | newValue = objValue;
|
10753 | if (isArguments(objValue)) {
|
10754 | newValue = toPlainObject(objValue);
|
10755 | }
|
10756 | else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
|
10757 | newValue = initCloneObject(srcValue);
|
10758 | }
|
10759 | }
|
10760 | else {
|
10761 | isCommon = false;
|
10762 | }
|
10763 | }
|
10764 | if (isCommon) {
|
10765 |
|
10766 | stack.set(srcValue, newValue);
|
10767 | mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
|
10768 | stack['delete'](srcValue);
|
10769 | }
|
10770 | assignMergeValue(object, key, newValue);
|
10771 | }
|
10772 |
|
10773 | |
10774 |
|
10775 |
|
10776 |
|
10777 |
|
10778 |
|
10779 |
|
10780 |
|
10781 | function baseNth(array, n) {
|
10782 | var length = array.length;
|
10783 | if (!length) {
|
10784 | return;
|
10785 | }
|
10786 | n += n < 0 ? length : 0;
|
10787 | return isIndex(n, length) ? array[n] : undefined;
|
10788 | }
|
10789 |
|
10790 | |
10791 |
|
10792 |
|
10793 |
|
10794 |
|
10795 |
|
10796 |
|
10797 |
|
10798 |
|
10799 | function baseOrderBy(collection, iteratees, orders) {
|
10800 | var index = -1;
|
10801 | iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
|
10802 |
|
10803 | var result = baseMap(collection, function(value, key, collection) {
|
10804 | var criteria = arrayMap(iteratees, function(iteratee) {
|
10805 | return iteratee(value);
|
10806 | });
|
10807 | return { 'criteria': criteria, 'index': ++index, 'value': value };
|
10808 | });
|
10809 |
|
10810 | return baseSortBy(result, function(object, other) {
|
10811 | return compareMultiple(object, other, orders);
|
10812 | });
|
10813 | }
|
10814 |
|
10815 | |
10816 |
|
10817 |
|
10818 |
|
10819 |
|
10820 |
|
10821 |
|
10822 |
|
10823 |
|
10824 | function basePick(object, paths) {
|
10825 | return basePickBy(object, paths, function(value, path) {
|
10826 | return hasIn(object, path);
|
10827 | });
|
10828 | }
|
10829 |
|
10830 | |
10831 |
|
10832 |
|
10833 |
|
10834 |
|
10835 |
|
10836 |
|
10837 |
|
10838 |
|
10839 | function basePickBy(object, paths, predicate) {
|
10840 | var index = -1,
|
10841 | length = paths.length,
|
10842 | result = {};
|
10843 |
|
10844 | while (++index < length) {
|
10845 | var path = paths[index],
|
10846 | value = baseGet(object, path);
|
10847 |
|
10848 | if (predicate(value, path)) {
|
10849 | baseSet(result, castPath(path, object), value);
|
10850 | }
|
10851 | }
|
10852 | return result;
|
10853 | }
|
10854 |
|
10855 | |
10856 |
|
10857 |
|
10858 |
|
10859 |
|
10860 |
|
10861 |
|
10862 | function basePropertyDeep(path) {
|
10863 | return function(object) {
|
10864 | return baseGet(object, path);
|
10865 | };
|
10866 | }
|
10867 |
|
10868 | |
10869 |
|
10870 |
|
10871 |
|
10872 |
|
10873 |
|
10874 |
|
10875 |
|
10876 |
|
10877 |
|
10878 |
|
10879 | function basePullAll(array, values, iteratee, comparator) {
|
10880 | var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
|
10881 | index = -1,
|
10882 | length = values.length,
|
10883 | seen = array;
|
10884 |
|
10885 | if (array === values) {
|
10886 | values = copyArray(values);
|
10887 | }
|
10888 | if (iteratee) {
|
10889 | seen = arrayMap(array, baseUnary(iteratee));
|
10890 | }
|
10891 | while (++index < length) {
|
10892 | var fromIndex = 0,
|
10893 | value = values[index],
|
10894 | computed = iteratee ? iteratee(value) : value;
|
10895 |
|
10896 | while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
|
10897 | if (seen !== array) {
|
10898 | splice.call(seen, fromIndex, 1);
|
10899 | }
|
10900 | splice.call(array, fromIndex, 1);
|
10901 | }
|
10902 | }
|
10903 | return array;
|
10904 | }
|
10905 |
|
10906 | |
10907 |
|
10908 |
|
10909 |
|
10910 |
|
10911 |
|
10912 |
|
10913 |
|
10914 |
|
10915 | function basePullAt(array, indexes) {
|
10916 | var length = array ? indexes.length : 0,
|
10917 | lastIndex = length - 1;
|
10918 |
|
10919 | while (length--) {
|
10920 | var index = indexes[length];
|
10921 | if (length == lastIndex || index !== previous) {
|
10922 | var previous = index;
|
10923 | if (isIndex(index)) {
|
10924 | splice.call(array, index, 1);
|
10925 | } else {
|
10926 | baseUnset(array, index);
|
10927 | }
|
10928 | }
|
10929 | }
|
10930 | return array;
|
10931 | }
|
10932 |
|
10933 | |
10934 |
|
10935 |
|
10936 |
|
10937 |
|
10938 |
|
10939 |
|
10940 |
|
10941 |
|
10942 | function baseRandom(lower, upper) {
|
10943 | return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
|
10944 | }
|
10945 |
|
10946 | |
10947 |
|
10948 |
|
10949 |
|
10950 |
|
10951 |
|
10952 |
|
10953 |
|
10954 |
|
10955 |
|
10956 |
|
10957 | function baseRange(start, end, step, fromRight) {
|
10958 | var index = -1,
|
10959 | length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
|
10960 | result = Array(length);
|
10961 |
|
10962 | while (length--) {
|
10963 | result[fromRight ? length : ++index] = start;
|
10964 | start += step;
|
10965 | }
|
10966 | return result;
|
10967 | }
|
10968 |
|
10969 | |
10970 |
|
10971 |
|
10972 |
|
10973 |
|
10974 |
|
10975 |
|
10976 |
|
10977 | function baseRepeat(string, n) {
|
10978 | var result = '';
|
10979 | if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
|
10980 | return result;
|
10981 | }
|
10982 |
|
10983 |
|
10984 | do {
|
10985 | if (n % 2) {
|
10986 | result += string;
|
10987 | }
|
10988 | n = nativeFloor(n / 2);
|
10989 | if (n) {
|
10990 | string += string;
|
10991 | }
|
10992 | } while (n);
|
10993 |
|
10994 | return result;
|
10995 | }
|
10996 |
|
10997 | |
10998 |
|
10999 |
|
11000 |
|
11001 |
|
11002 |
|
11003 |
|
11004 |
|
11005 | function baseRest(func, start) {
|
11006 | return setToString(overRest(func, start, identity), func + '');
|
11007 | }
|
11008 |
|
11009 | |
11010 |
|
11011 |
|
11012 |
|
11013 |
|
11014 |
|
11015 |
|
11016 | function baseSample(collection) {
|
11017 | return arraySample(values(collection));
|
11018 | }
|
11019 |
|
11020 | |
11021 |
|
11022 |
|
11023 |
|
11024 |
|
11025 |
|
11026 |
|
11027 |
|
11028 | function baseSampleSize(collection, n) {
|
11029 | var array = values(collection);
|
11030 | return shuffleSelf(array, baseClamp(n, 0, array.length));
|
11031 | }
|
11032 |
|
11033 | |
11034 |
|
11035 |
|
11036 |
|
11037 |
|
11038 |
|
11039 |
|
11040 |
|
11041 |
|
11042 |
|
11043 | function baseSet(object, path, value, customizer) {
|
11044 | if (!isObject(object)) {
|
11045 | return object;
|
11046 | }
|
11047 | path = castPath(path, object);
|
11048 |
|
11049 | var index = -1,
|
11050 | length = path.length,
|
11051 | lastIndex = length - 1,
|
11052 | nested = object;
|
11053 |
|
11054 | while (nested != null && ++index < length) {
|
11055 | var key = toKey(path[index]),
|
11056 | newValue = value;
|
11057 |
|
11058 | if (index != lastIndex) {
|
11059 | var objValue = nested[key];
|
11060 | newValue = customizer ? customizer(objValue, key, nested) : undefined;
|
11061 | if (newValue === undefined) {
|
11062 | newValue = isObject(objValue)
|
11063 | ? objValue
|
11064 | : (isIndex(path[index + 1]) ? [] : {});
|
11065 | }
|
11066 | }
|
11067 | assignValue(nested, key, newValue);
|
11068 | nested = nested[key];
|
11069 | }
|
11070 | return object;
|
11071 | }
|
11072 |
|
11073 | |
11074 |
|
11075 |
|
11076 |
|
11077 |
|
11078 |
|
11079 |
|
11080 |
|
11081 | var baseSetData = !metaMap ? identity : function(func, data) {
|
11082 | metaMap.set(func, data);
|
11083 | return func;
|
11084 | };
|
11085 |
|
11086 | |
11087 |
|
11088 |
|
11089 |
|
11090 |
|
11091 |
|
11092 |
|
11093 |
|
11094 | var baseSetToString = !defineProperty ? identity : function(func, string) {
|
11095 | return defineProperty(func, 'toString', {
|
11096 | 'configurable': true,
|
11097 | 'enumerable': false,
|
11098 | 'value': constant(string),
|
11099 | 'writable': true
|
11100 | });
|
11101 | };
|
11102 |
|
11103 | |
11104 |
|
11105 |
|
11106 |
|
11107 |
|
11108 |
|
11109 |
|
11110 | function baseShuffle(collection) {
|
11111 | return shuffleSelf(values(collection));
|
11112 | }
|
11113 |
|
11114 | |
11115 |
|
11116 |
|
11117 |
|
11118 |
|
11119 |
|
11120 |
|
11121 |
|
11122 |
|
11123 | function baseSlice(array, start, end) {
|
11124 | var index = -1,
|
11125 | length = array.length;
|
11126 |
|
11127 | if (start < 0) {
|
11128 | start = -start > length ? 0 : (length + start);
|
11129 | }
|
11130 | end = end > length ? length : end;
|
11131 | if (end < 0) {
|
11132 | end += length;
|
11133 | }
|
11134 | length = start > end ? 0 : ((end - start) >>> 0);
|
11135 | start >>>= 0;
|
11136 |
|
11137 | var result = Array(length);
|
11138 | while (++index < length) {
|
11139 | result[index] = array[index + start];
|
11140 | }
|
11141 | return result;
|
11142 | }
|
11143 |
|
11144 | |
11145 |
|
11146 |
|
11147 |
|
11148 |
|
11149 |
|
11150 |
|
11151 |
|
11152 |
|
11153 | function baseSome(collection, predicate) {
|
11154 | var result;
|
11155 |
|
11156 | baseEach(collection, function(value, index, collection) {
|
11157 | result = predicate(value, index, collection);
|
11158 | return !result;
|
11159 | });
|
11160 | return !!result;
|
11161 | }
|
11162 |
|
11163 | |
11164 |
|
11165 |
|
11166 |
|
11167 |
|
11168 |
|
11169 |
|
11170 |
|
11171 |
|
11172 |
|
11173 |
|
11174 |
|
11175 | function baseSortedIndex(array, value, retHighest) {
|
11176 | var low = 0,
|
11177 | high = array == null ? low : array.length;
|
11178 |
|
11179 | if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
|
11180 | while (low < high) {
|
11181 | var mid = (low + high) >>> 1,
|
11182 | computed = array[mid];
|
11183 |
|
11184 | if (computed !== null && !isSymbol(computed) &&
|
11185 | (retHighest ? (computed <= value) : (computed < value))) {
|
11186 | low = mid + 1;
|
11187 | } else {
|
11188 | high = mid;
|
11189 | }
|
11190 | }
|
11191 | return high;
|
11192 | }
|
11193 | return baseSortedIndexBy(array, value, identity, retHighest);
|
11194 | }
|
11195 |
|
11196 | |
11197 |
|
11198 |
|
11199 |
|
11200 |
|
11201 |
|
11202 |
|
11203 |
|
11204 |
|
11205 |
|
11206 |
|
11207 |
|
11208 |
|
11209 | function baseSortedIndexBy(array, value, iteratee, retHighest) {
|
11210 | value = iteratee(value);
|
11211 |
|
11212 | var low = 0,
|
11213 | high = array == null ? 0 : array.length,
|
11214 | valIsNaN = value !== value,
|
11215 | valIsNull = value === null,
|
11216 | valIsSymbol = isSymbol(value),
|
11217 | valIsUndefined = value === undefined;
|
11218 |
|
11219 | while (low < high) {
|
11220 | var mid = nativeFloor((low + high) / 2),
|
11221 | computed = iteratee(array[mid]),
|
11222 | othIsDefined = computed !== undefined,
|
11223 | othIsNull = computed === null,
|
11224 | othIsReflexive = computed === computed,
|
11225 | othIsSymbol = isSymbol(computed);
|
11226 |
|
11227 | if (valIsNaN) {
|
11228 | var setLow = retHighest || othIsReflexive;
|
11229 | } else if (valIsUndefined) {
|
11230 | setLow = othIsReflexive && (retHighest || othIsDefined);
|
11231 | } else if (valIsNull) {
|
11232 | setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
|
11233 | } else if (valIsSymbol) {
|
11234 | setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
|
11235 | } else if (othIsNull || othIsSymbol) {
|
11236 | setLow = false;
|
11237 | } else {
|
11238 | setLow = retHighest ? (computed <= value) : (computed < value);
|
11239 | }
|
11240 | if (setLow) {
|
11241 | low = mid + 1;
|
11242 | } else {
|
11243 | high = mid;
|
11244 | }
|
11245 | }
|
11246 | return nativeMin(high, MAX_ARRAY_INDEX);
|
11247 | }
|
11248 |
|
11249 | |
11250 |
|
11251 |
|
11252 |
|
11253 |
|
11254 |
|
11255 |
|
11256 |
|
11257 |
|
11258 | function baseSortedUniq(array, iteratee) {
|
11259 | var index = -1,
|
11260 | length = array.length,
|
11261 | resIndex = 0,
|
11262 | result = [];
|
11263 |
|
11264 | while (++index < length) {
|
11265 | var value = array[index],
|
11266 | computed = iteratee ? iteratee(value) : value;
|
11267 |
|
11268 | if (!index || !eq(computed, seen)) {
|
11269 | var seen = computed;
|
11270 | result[resIndex++] = value === 0 ? 0 : value;
|
11271 | }
|
11272 | }
|
11273 | return result;
|
11274 | }
|
11275 |
|
11276 | |
11277 |
|
11278 |
|
11279 |
|
11280 |
|
11281 |
|
11282 |
|
11283 |
|
11284 | function baseToNumber(value) {
|
11285 | if (typeof value == 'number') {
|
11286 | return value;
|
11287 | }
|
11288 | if (isSymbol(value)) {
|
11289 | return NAN;
|
11290 | }
|
11291 | return +value;
|
11292 | }
|
11293 |
|
11294 | |
11295 |
|
11296 |
|
11297 |
|
11298 |
|
11299 |
|
11300 |
|
11301 |
|
11302 | function baseToString(value) {
|
11303 |
|
11304 | if (typeof value == 'string') {
|
11305 | return value;
|
11306 | }
|
11307 | if (isArray(value)) {
|
11308 |
|
11309 | return arrayMap(value, baseToString) + '';
|
11310 | }
|
11311 | if (isSymbol(value)) {
|
11312 | return symbolToString ? symbolToString.call(value) : '';
|
11313 | }
|
11314 | var result = (value + '');
|
11315 | return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
11316 | }
|
11317 |
|
11318 | |
11319 |
|
11320 |
|
11321 |
|
11322 |
|
11323 |
|
11324 |
|
11325 |
|
11326 |
|
11327 | function baseUniq(array, iteratee, comparator) {
|
11328 | var index = -1,
|
11329 | includes = arrayIncludes,
|
11330 | length = array.length,
|
11331 | isCommon = true,
|
11332 | result = [],
|
11333 | seen = result;
|
11334 |
|
11335 | if (comparator) {
|
11336 | isCommon = false;
|
11337 | includes = arrayIncludesWith;
|
11338 | }
|
11339 | else if (length >= LARGE_ARRAY_SIZE) {
|
11340 | var set = iteratee ? null : createSet(array);
|
11341 | if (set) {
|
11342 | return setToArray(set);
|
11343 | }
|
11344 | isCommon = false;
|
11345 | includes = cacheHas;
|
11346 | seen = new SetCache;
|
11347 | }
|
11348 | else {
|
11349 | seen = iteratee ? [] : result;
|
11350 | }
|
11351 | outer:
|
11352 | while (++index < length) {
|
11353 | var value = array[index],
|
11354 | computed = iteratee ? iteratee(value) : value;
|
11355 |
|
11356 | value = (comparator || value !== 0) ? value : 0;
|
11357 | if (isCommon && computed === computed) {
|
11358 | var seenIndex = seen.length;
|
11359 | while (seenIndex--) {
|
11360 | if (seen[seenIndex] === computed) {
|
11361 | continue outer;
|
11362 | }
|
11363 | }
|
11364 | if (iteratee) {
|
11365 | seen.push(computed);
|
11366 | }
|
11367 | result.push(value);
|
11368 | }
|
11369 | else if (!includes(seen, computed, comparator)) {
|
11370 | if (seen !== result) {
|
11371 | seen.push(computed);
|
11372 | }
|
11373 | result.push(value);
|
11374 | }
|
11375 | }
|
11376 | return result;
|
11377 | }
|
11378 |
|
11379 | |
11380 |
|
11381 |
|
11382 |
|
11383 |
|
11384 |
|
11385 |
|
11386 |
|
11387 | function baseUnset(object, path) {
|
11388 | path = castPath(path, object);
|
11389 | object = parent(object, path);
|
11390 | return object == null || delete object[toKey(last(path))];
|
11391 | }
|
11392 |
|
11393 | |
11394 |
|
11395 |
|
11396 |
|
11397 |
|
11398 |
|
11399 |
|
11400 |
|
11401 |
|
11402 |
|
11403 | function baseUpdate(object, path, updater, customizer) {
|
11404 | return baseSet(object, path, updater(baseGet(object, path)), customizer);
|
11405 | }
|
11406 |
|
11407 | |
11408 |
|
11409 |
|
11410 |
|
11411 |
|
11412 |
|
11413 |
|
11414 |
|
11415 |
|
11416 |
|
11417 |
|
11418 | function baseWhile(array, predicate, isDrop, fromRight) {
|
11419 | var length = array.length,
|
11420 | index = fromRight ? length : -1;
|
11421 |
|
11422 | while ((fromRight ? index-- : ++index < length) &&
|
11423 | predicate(array[index], index, array)) {}
|
11424 |
|
11425 | return isDrop
|
11426 | ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
|
11427 | : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
|
11428 | }
|
11429 |
|
11430 | |
11431 |
|
11432 |
|
11433 |
|
11434 |
|
11435 |
|
11436 |
|
11437 |
|
11438 |
|
11439 |
|
11440 | function baseWrapperValue(value, actions) {
|
11441 | var result = value;
|
11442 | if (result instanceof LazyWrapper) {
|
11443 | result = result.value();
|
11444 | }
|
11445 | return arrayReduce(actions, function(result, action) {
|
11446 | return action.func.apply(action.thisArg, arrayPush([result], action.args));
|
11447 | }, result);
|
11448 | }
|
11449 |
|
11450 | |
11451 |
|
11452 |
|
11453 |
|
11454 |
|
11455 |
|
11456 |
|
11457 |
|
11458 |
|
11459 |
|
11460 | function baseXor(arrays, iteratee, comparator) {
|
11461 | var length = arrays.length;
|
11462 | if (length < 2) {
|
11463 | return length ? baseUniq(arrays[0]) : [];
|
11464 | }
|
11465 | var index = -1,
|
11466 | result = Array(length);
|
11467 |
|
11468 | while (++index < length) {
|
11469 | var array = arrays[index],
|
11470 | othIndex = -1;
|
11471 |
|
11472 | while (++othIndex < length) {
|
11473 | if (othIndex != index) {
|
11474 | result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
|
11475 | }
|
11476 | }
|
11477 | }
|
11478 | return baseUniq(baseFlatten(result, 1), iteratee, comparator);
|
11479 | }
|
11480 |
|
11481 | |
11482 |
|
11483 |
|
11484 |
|
11485 |
|
11486 |
|
11487 |
|
11488 |
|
11489 |
|
11490 | function baseZipObject(props, values, assignFunc) {
|
11491 | var index = -1,
|
11492 | length = props.length,
|
11493 | valsLength = values.length,
|
11494 | result = {};
|
11495 |
|
11496 | while (++index < length) {
|
11497 | var value = index < valsLength ? values[index] : undefined;
|
11498 | assignFunc(result, props[index], value);
|
11499 | }
|
11500 | return result;
|
11501 | }
|
11502 |
|
11503 | |
11504 |
|
11505 |
|
11506 |
|
11507 |
|
11508 |
|
11509 |
|
11510 | function castArrayLikeObject(value) {
|
11511 | return isArrayLikeObject(value) ? value : [];
|
11512 | }
|
11513 |
|
11514 | |
11515 |
|
11516 |
|
11517 |
|
11518 |
|
11519 |
|
11520 |
|
11521 | function castFunction(value) {
|
11522 | return typeof value == 'function' ? value : identity;
|
11523 | }
|
11524 |
|
11525 | |
11526 |
|
11527 |
|
11528 |
|
11529 |
|
11530 |
|
11531 |
|
11532 |
|
11533 | function castPath(value, object) {
|
11534 | if (isArray(value)) {
|
11535 | return value;
|
11536 | }
|
11537 | return isKey(value, object) ? [value] : stringToPath(toString(value));
|
11538 | }
|
11539 |
|
11540 | |
11541 |
|
11542 |
|
11543 |
|
11544 |
|
11545 |
|
11546 |
|
11547 |
|
11548 |
|
11549 | var castRest = baseRest;
|
11550 |
|
11551 | |
11552 |
|
11553 |
|
11554 |
|
11555 |
|
11556 |
|
11557 |
|
11558 |
|
11559 |
|
11560 | function castSlice(array, start, end) {
|
11561 | var length = array.length;
|
11562 | end = end === undefined ? length : end;
|
11563 | return (!start && end >= length) ? array : baseSlice(array, start, end);
|
11564 | }
|
11565 |
|
11566 | |
11567 |
|
11568 |
|
11569 |
|
11570 |
|
11571 |
|
11572 | var clearTimeout = ctxClearTimeout || function(id) {
|
11573 | return root.clearTimeout(id);
|
11574 | };
|
11575 |
|
11576 | |
11577 |
|
11578 |
|
11579 |
|
11580 |
|
11581 |
|
11582 |
|
11583 |
|
11584 | function cloneBuffer(buffer, isDeep) {
|
11585 | if (isDeep) {
|
11586 | return buffer.slice();
|
11587 | }
|
11588 | var length = buffer.length,
|
11589 | result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
11590 |
|
11591 | buffer.copy(result);
|
11592 | return result;
|
11593 | }
|
11594 |
|
11595 | |
11596 |
|
11597 |
|
11598 |
|
11599 |
|
11600 |
|
11601 |
|
11602 | function cloneArrayBuffer(arrayBuffer) {
|
11603 | var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
11604 | new Uint8Array(result).set(new Uint8Array(arrayBuffer));
|
11605 | return result;
|
11606 | }
|
11607 |
|
11608 | |
11609 |
|
11610 |
|
11611 |
|
11612 |
|
11613 |
|
11614 |
|
11615 |
|
11616 | function cloneDataView(dataView, isDeep) {
|
11617 | var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
11618 | return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
11619 | }
|
11620 |
|
11621 | |
11622 |
|
11623 |
|
11624 |
|
11625 |
|
11626 |
|
11627 |
|
11628 |
|
11629 |
|
11630 | function cloneMap(map, isDeep, cloneFunc) {
|
11631 | var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
|
11632 | return arrayReduce(array, addMapEntry, new map.constructor);
|
11633 | }
|
11634 |
|
11635 | |
11636 |
|
11637 |
|
11638 |
|
11639 |
|
11640 |
|
11641 |
|
11642 | function cloneRegExp(regexp) {
|
11643 | var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
11644 | result.lastIndex = regexp.lastIndex;
|
11645 | return result;
|
11646 | }
|
11647 |
|
11648 | |
11649 |
|
11650 |
|
11651 |
|
11652 |
|
11653 |
|
11654 |
|
11655 |
|
11656 |
|
11657 | function cloneSet(set, isDeep, cloneFunc) {
|
11658 | var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
|
11659 | return arrayReduce(array, addSetEntry, new set.constructor);
|
11660 | }
|
11661 |
|
11662 | /**
|
11663 | * Creates a clone of the `symbol` object.
|
11664 | *
|
11665 | * @private
|
11666 | * @param {Object} symbol The symbol object to clone.
|
11667 | * @returns {Object} Returns the cloned symbol object.
|
11668 | */
|
11669 | function cloneSymbol(symbol) {
|
11670 | return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
11671 | }
|
11672 |
|
11673 | |
11674 |
|
11675 |
|
11676 |
|
11677 |
|
11678 |
|
11679 |
|
11680 |
|
11681 | function cloneTypedArray(typedArray, isDeep) {
|
11682 | var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
11683 | return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
11684 | }
|
11685 |
|
11686 | |
11687 |
|
11688 |
|
11689 |
|
11690 |
|
11691 |
|
11692 |
|
11693 |
|
11694 | function compareAscending(value, other) {
|
11695 | if (value !== other) {
|
11696 | var valIsDefined = value !== undefined,
|
11697 | valIsNull = value === null,
|
11698 | valIsReflexive = value === value,
|
11699 | valIsSymbol = isSymbol(value);
|
11700 |
|
11701 | var othIsDefined = other !== undefined,
|
11702 | othIsNull = other === null,
|
11703 | othIsReflexive = other === other,
|
11704 | othIsSymbol = isSymbol(other);
|
11705 |
|
11706 | if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
|
11707 | (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
|
11708 | (valIsNull && othIsDefined && othIsReflexive) ||
|
11709 | (!valIsDefined && othIsReflexive) ||
|
11710 | !valIsReflexive) {
|
11711 | return 1;
|
11712 | }
|
11713 | if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
|
11714 | (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
|
11715 | (othIsNull && valIsDefined && valIsReflexive) ||
|
11716 | (!othIsDefined && valIsReflexive) ||
|
11717 | !othIsReflexive) {
|
11718 | return -1;
|
11719 | }
|
11720 | }
|
11721 | return 0;
|
11722 | }
|
11723 |
|
11724 | |
11725 |
|
11726 |
|
11727 |
|
11728 |
|
11729 |
|
11730 |
|
11731 |
|
11732 |
|
11733 |
|
11734 |
|
11735 |
|
11736 |
|
11737 |
|
11738 | function compareMultiple(object, other, orders) {
|
11739 | var index = -1,
|
11740 | objCriteria = object.criteria,
|
11741 | othCriteria = other.criteria,
|
11742 | length = objCriteria.length,
|
11743 | ordersLength = orders.length;
|
11744 |
|
11745 | while (++index < length) {
|
11746 | var result = compareAscending(objCriteria[index], othCriteria[index]);
|
11747 | if (result) {
|
11748 | if (index >= ordersLength) {
|
11749 | return result;
|
11750 | }
|
11751 | var order = orders[index];
|
11752 | return result * (order == 'desc' ? -1 : 1);
|
11753 | }
|
11754 | }
|
11755 |
|
11756 |
|
11757 |
|
11758 |
|
11759 |
|
11760 |
|
11761 |
|
11762 | return object.index - other.index;
|
11763 | }
|
11764 |
|
11765 | |
11766 |
|
11767 |
|
11768 |
|
11769 |
|
11770 |
|
11771 |
|
11772 |
|
11773 |
|
11774 |
|
11775 |
|
11776 | function composeArgs(args, partials, holders, isCurried) {
|
11777 | var argsIndex = -1,
|
11778 | argsLength = args.length,
|
11779 | holdersLength = holders.length,
|
11780 | leftIndex = -1,
|
11781 | leftLength = partials.length,
|
11782 | rangeLength = nativeMax(argsLength - holdersLength, 0),
|
11783 | result = Array(leftLength + rangeLength),
|
11784 | isUncurried = !isCurried;
|
11785 |
|
11786 | while (++leftIndex < leftLength) {
|
11787 | result[leftIndex] = partials[leftIndex];
|
11788 | }
|
11789 | while (++argsIndex < holdersLength) {
|
11790 | if (isUncurried || argsIndex < argsLength) {
|
11791 | result[holders[argsIndex]] = args[argsIndex];
|
11792 | }
|
11793 | }
|
11794 | while (rangeLength--) {
|
11795 | result[leftIndex++] = args[argsIndex++];
|
11796 | }
|
11797 | return result;
|
11798 | }
|
11799 |
|
11800 | |
11801 |
|
11802 |
|
11803 |
|
11804 |
|
11805 |
|
11806 |
|
11807 |
|
11808 |
|
11809 |
|
11810 |
|
11811 | function composeArgsRight(args, partials, holders, isCurried) {
|
11812 | var argsIndex = -1,
|
11813 | argsLength = args.length,
|
11814 | holdersIndex = -1,
|
11815 | holdersLength = holders.length,
|
11816 | rightIndex = -1,
|
11817 | rightLength = partials.length,
|
11818 | rangeLength = nativeMax(argsLength - holdersLength, 0),
|
11819 | result = Array(rangeLength + rightLength),
|
11820 | isUncurried = !isCurried;
|
11821 |
|
11822 | while (++argsIndex < rangeLength) {
|
11823 | result[argsIndex] = args[argsIndex];
|
11824 | }
|
11825 | var offset = argsIndex;
|
11826 | while (++rightIndex < rightLength) {
|
11827 | result[offset + rightIndex] = partials[rightIndex];
|
11828 | }
|
11829 | while (++holdersIndex < holdersLength) {
|
11830 | if (isUncurried || argsIndex < argsLength) {
|
11831 | result[offset + holders[holdersIndex]] = args[argsIndex++];
|
11832 | }
|
11833 | }
|
11834 | return result;
|
11835 | }
|
11836 |
|
11837 | |
11838 |
|
11839 |
|
11840 |
|
11841 |
|
11842 |
|
11843 |
|
11844 |
|
11845 | function copyArray(source, array) {
|
11846 | var index = -1,
|
11847 | length = source.length;
|
11848 |
|
11849 | array || (array = Array(length));
|
11850 | while (++index < length) {
|
11851 | array[index] = source[index];
|
11852 | }
|
11853 | return array;
|
11854 | }
|
11855 |
|
11856 | |
11857 |
|
11858 |
|
11859 |
|
11860 |
|
11861 |
|
11862 |
|
11863 |
|
11864 |
|
11865 |
|
11866 | function copyObject(source, props, object, customizer) {
|
11867 | var isNew = !object;
|
11868 | object || (object = {});
|
11869 |
|
11870 | var index = -1,
|
11871 | length = props.length;
|
11872 |
|
11873 | while (++index < length) {
|
11874 | var key = props[index];
|
11875 |
|
11876 | var newValue = customizer
|
11877 | ? customizer(object[key], source[key], key, object, source)
|
11878 | : undefined;
|
11879 |
|
11880 | if (newValue === undefined) {
|
11881 | newValue = source[key];
|
11882 | }
|
11883 | if (isNew) {
|
11884 | baseAssignValue(object, key, newValue);
|
11885 | } else {
|
11886 | assignValue(object, key, newValue);
|
11887 | }
|
11888 | }
|
11889 | return object;
|
11890 | }
|
11891 |
|
11892 | |
11893 |
|
11894 |
|
11895 |
|
11896 |
|
11897 |
|
11898 |
|
11899 |
|
11900 | function copySymbols(source, object) {
|
11901 | return copyObject(source, getSymbols(source), object);
|
11902 | }
|
11903 |
|
11904 | |
11905 |
|
11906 |
|
11907 |
|
11908 |
|
11909 |
|
11910 |
|
11911 |
|
11912 | function copySymbolsIn(source, object) {
|
11913 | return copyObject(source, getSymbolsIn(source), object);
|
11914 | }
|
11915 |
|
11916 | |
11917 |
|
11918 |
|
11919 |
|
11920 |
|
11921 |
|
11922 |
|
11923 |
|
11924 | function createAggregator(setter, initializer) {
|
11925 | return function(collection, iteratee) {
|
11926 | var func = isArray(collection) ? arrayAggregator : baseAggregator,
|
11927 | accumulator = initializer ? initializer() : {};
|
11928 |
|
11929 | return func(collection, setter, getIteratee(iteratee, 2), accumulator);
|
11930 | };
|
11931 | }
|
11932 |
|
11933 | |
11934 |
|
11935 |
|
11936 |
|
11937 |
|
11938 |
|
11939 |
|
11940 | function createAssigner(assigner) {
|
11941 | return baseRest(function(object, sources) {
|
11942 | var index = -1,
|
11943 | length = sources.length,
|
11944 | customizer = length > 1 ? sources[length - 1] : undefined,
|
11945 | guard = length > 2 ? sources[2] : undefined;
|
11946 |
|
11947 | customizer = (assigner.length > 3 && typeof customizer == 'function')
|
11948 | ? (length--, customizer)
|
11949 | : undefined;
|
11950 |
|
11951 | if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
11952 | customizer = length < 3 ? undefined : customizer;
|
11953 | length = 1;
|
11954 | }
|
11955 | object = Object(object);
|
11956 | while (++index < length) {
|
11957 | var source = sources[index];
|
11958 | if (source) {
|
11959 | assigner(object, source, index, customizer);
|
11960 | }
|
11961 | }
|
11962 | return object;
|
11963 | });
|
11964 | }
|
11965 |
|
11966 | |
11967 |
|
11968 |
|
11969 |
|
11970 |
|
11971 |
|
11972 |
|
11973 |
|
11974 | function createBaseEach(eachFunc, fromRight) {
|
11975 | return function(collection, iteratee) {
|
11976 | if (collection == null) {
|
11977 | return collection;
|
11978 | }
|
11979 | if (!isArrayLike(collection)) {
|
11980 | return eachFunc(collection, iteratee);
|
11981 | }
|
11982 | var length = collection.length,
|
11983 | index = fromRight ? length : -1,
|
11984 | iterable = Object(collection);
|
11985 |
|
11986 | while ((fromRight ? index-- : ++index < length)) {
|
11987 | if (iteratee(iterable[index], index, iterable) === false) {
|
11988 | break;
|
11989 | }
|
11990 | }
|
11991 | return collection;
|
11992 | };
|
11993 | }
|
11994 |
|
11995 | |
11996 |
|
11997 |
|
11998 |
|
11999 |
|
12000 |
|
12001 |
|
12002 | function createBaseFor(fromRight) {
|
12003 | return function(object, iteratee, keysFunc) {
|
12004 | var index = -1,
|
12005 | iterable = Object(object),
|
12006 | props = keysFunc(object),
|
12007 | length = props.length;
|
12008 |
|
12009 | while (length--) {
|
12010 | var key = props[fromRight ? length : ++index];
|
12011 | if (iteratee(iterable[key], key, iterable) === false) {
|
12012 | break;
|
12013 | }
|
12014 | }
|
12015 | return object;
|
12016 | };
|
12017 | }
|
12018 |
|
12019 | |
12020 |
|
12021 |
|
12022 |
|
12023 |
|
12024 |
|
12025 |
|
12026 |
|
12027 |
|
12028 |
|
12029 | function createBind(func, bitmask, thisArg) {
|
12030 | var isBind = bitmask & WRAP_BIND_FLAG,
|
12031 | Ctor = createCtor(func);
|
12032 |
|
12033 | function wrapper() {
|
12034 | var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
|
12035 | return fn.apply(isBind ? thisArg : this, arguments);
|
12036 | }
|
12037 | return wrapper;
|
12038 | }
|
12039 |
|
12040 | |
12041 |
|
12042 |
|
12043 |
|
12044 |
|
12045 |
|
12046 |
|
12047 | function createCaseFirst(methodName) {
|
12048 | return function(string) {
|
12049 | string = toString(string);
|
12050 |
|
12051 | var strSymbols = hasUnicode(string)
|
12052 | ? stringToArray(string)
|
12053 | : undefined;
|
12054 |
|
12055 | var chr = strSymbols
|
12056 | ? strSymbols[0]
|
12057 | : string.charAt(0);
|
12058 |
|
12059 | var trailing = strSymbols
|
12060 | ? castSlice(strSymbols, 1).join('')
|
12061 | : string.slice(1);
|
12062 |
|
12063 | return chr[methodName]() + trailing;
|
12064 | };
|
12065 | }
|
12066 |
|
12067 | |
12068 |
|
12069 |
|
12070 |
|
12071 |
|
12072 |
|
12073 |
|
12074 | function createCompounder(callback) {
|
12075 | return function(string) {
|
12076 | return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
|
12077 | };
|
12078 | }
|
12079 |
|
12080 | |
12081 |
|
12082 |
|
12083 |
|
12084 |
|
12085 |
|
12086 |
|
12087 |
|
12088 | function createCtor(Ctor) {
|
12089 | return function() {
|
12090 |
|
12091 |
|
12092 |
|
12093 | var args = arguments;
|
12094 | switch (args.length) {
|
12095 | case 0: return new Ctor;
|
12096 | case 1: return new Ctor(args[0]);
|
12097 | case 2: return new Ctor(args[0], args[1]);
|
12098 | case 3: return new Ctor(args[0], args[1], args[2]);
|
12099 | case 4: return new Ctor(args[0], args[1], args[2], args[3]);
|
12100 | case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
|
12101 | case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
|
12102 | case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
|
12103 | }
|
12104 | var thisBinding = baseCreate(Ctor.prototype),
|
12105 | result = Ctor.apply(thisBinding, args);
|
12106 |
|
12107 |
|
12108 |
|
12109 | return isObject(result) ? result : thisBinding;
|
12110 | };
|
12111 | }
|
12112 |
|
12113 | |
12114 |
|
12115 |
|
12116 |
|
12117 |
|
12118 |
|
12119 |
|
12120 |
|
12121 |
|
12122 | function createCurry(func, bitmask, arity) {
|
12123 | var Ctor = createCtor(func);
|
12124 |
|
12125 | function wrapper() {
|
12126 | var length = arguments.length,
|
12127 | args = Array(length),
|
12128 | index = length,
|
12129 | placeholder = getHolder(wrapper);
|
12130 |
|
12131 | while (index--) {
|
12132 | args[index] = arguments[index];
|
12133 | }
|
12134 | var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
|
12135 | ? []
|
12136 | : replaceHolders(args, placeholder);
|
12137 |
|
12138 | length -= holders.length;
|
12139 | if (length < arity) {
|
12140 | return createRecurry(
|
12141 | func, bitmask, createHybrid, wrapper.placeholder, undefined,
|
12142 | args, holders, undefined, undefined, arity - length);
|
12143 | }
|
12144 | var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
|
12145 | return apply(fn, this, args);
|
12146 | }
|
12147 | return wrapper;
|
12148 | }
|
12149 |
|
12150 | |
12151 |
|
12152 |
|
12153 |
|
12154 |
|
12155 |
|
12156 |
|
12157 | function createFind(findIndexFunc) {
|
12158 | return function(collection, predicate, fromIndex) {
|
12159 | var iterable = Object(collection);
|
12160 | if (!isArrayLike(collection)) {
|
12161 | var iteratee = getIteratee(predicate, 3);
|
12162 | collection = keys(collection);
|
12163 | predicate = function(key) { return iteratee(iterable[key], key, iterable); };
|
12164 | }
|
12165 | var index = findIndexFunc(collection, predicate, fromIndex);
|
12166 | return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
|
12167 | };
|
12168 | }
|
12169 |
|
12170 | |
12171 |
|
12172 |
|
12173 |
|
12174 |
|
12175 |
|
12176 |
|
12177 | function createFlow(fromRight) {
|
12178 | return flatRest(function(funcs) {
|
12179 | var length = funcs.length,
|
12180 | index = length,
|
12181 | prereq = LodashWrapper.prototype.thru;
|
12182 |
|
12183 | if (fromRight) {
|
12184 | funcs.reverse();
|
12185 | }
|
12186 | while (index--) {
|
12187 | var func = funcs[index];
|
12188 | if (typeof func != 'function') {
|
12189 | throw new TypeError(FUNC_ERROR_TEXT);
|
12190 | }
|
12191 | if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
|
12192 | var wrapper = new LodashWrapper([], true);
|
12193 | }
|
12194 | }
|
12195 | index = wrapper ? index : length;
|
12196 | while (++index < length) {
|
12197 | func = funcs[index];
|
12198 |
|
12199 | var funcName = getFuncName(func),
|
12200 | data = funcName == 'wrapper' ? getData(func) : undefined;
|
12201 |
|
12202 | if (data && isLaziable(data[0]) &&
|
12203 | data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
|
12204 | !data[4].length && data[9] == 1
|
12205 | ) {
|
12206 | wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
|
12207 | } else {
|
12208 | wrapper = (func.length == 1 && isLaziable(func))
|
12209 | ? wrapper[funcName]()
|
12210 | : wrapper.thru(func);
|
12211 | }
|
12212 | }
|
12213 | return function() {
|
12214 | var args = arguments,
|
12215 | value = args[0];
|
12216 |
|
12217 | if (wrapper && args.length == 1 && isArray(value)) {
|
12218 | return wrapper.plant(value).value();
|
12219 | }
|
12220 | var index = 0,
|
12221 | result = length ? funcs[index].apply(this, args) : value;
|
12222 |
|
12223 | while (++index < length) {
|
12224 | result = funcs[index].call(this, result);
|
12225 | }
|
12226 | return result;
|
12227 | };
|
12228 | });
|
12229 | }
|
12230 |
|
12231 | |
12232 |
|
12233 |
|
12234 |
|
12235 |
|
12236 |
|
12237 |
|
12238 |
|
12239 |
|
12240 |
|
12241 |
|
12242 |
|
12243 |
|
12244 |
|
12245 |
|
12246 |
|
12247 |
|
12248 |
|
12249 |
|
12250 | function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
|
12251 | var isAry = bitmask & WRAP_ARY_FLAG,
|
12252 | isBind = bitmask & WRAP_BIND_FLAG,
|
12253 | isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
|
12254 | isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
|
12255 | isFlip = bitmask & WRAP_FLIP_FLAG,
|
12256 | Ctor = isBindKey ? undefined : createCtor(func);
|
12257 |
|
12258 | function wrapper() {
|
12259 | var length = arguments.length,
|
12260 | args = Array(length),
|
12261 | index = length;
|
12262 |
|
12263 | while (index--) {
|
12264 | args[index] = arguments[index];
|
12265 | }
|
12266 | if (isCurried) {
|
12267 | var placeholder = getHolder(wrapper),
|
12268 | holdersCount = countHolders(args, placeholder);
|
12269 | }
|
12270 | if (partials) {
|
12271 | args = composeArgs(args, partials, holders, isCurried);
|
12272 | }
|
12273 | if (partialsRight) {
|
12274 | args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
|
12275 | }
|
12276 | length -= holdersCount;
|
12277 | if (isCurried && length < arity) {
|
12278 | var newHolders = replaceHolders(args, placeholder);
|
12279 | return createRecurry(
|
12280 | func, bitmask, createHybrid, wrapper.placeholder, thisArg,
|
12281 | args, newHolders, argPos, ary, arity - length
|
12282 | );
|
12283 | }
|
12284 | var thisBinding = isBind ? thisArg : this,
|
12285 | fn = isBindKey ? thisBinding[func] : func;
|
12286 |
|
12287 | length = args.length;
|
12288 | if (argPos) {
|
12289 | args = reorder(args, argPos);
|
12290 | } else if (isFlip && length > 1) {
|
12291 | args.reverse();
|
12292 | }
|
12293 | if (isAry && ary < length) {
|
12294 | args.length = ary;
|
12295 | }
|
12296 | if (this && this !== root && this instanceof wrapper) {
|
12297 | fn = Ctor || createCtor(fn);
|
12298 | }
|
12299 | return fn.apply(thisBinding, args);
|
12300 | }
|
12301 | return wrapper;
|
12302 | }
|
12303 |
|
12304 | |
12305 |
|
12306 |
|
12307 |
|
12308 |
|
12309 |
|
12310 |
|
12311 |
|
12312 | function createInverter(setter, toIteratee) {
|
12313 | return function(object, iteratee) {
|
12314 | return baseInverter(object, setter, toIteratee(iteratee), {});
|
12315 | };
|
12316 | }
|
12317 |
|
12318 | |
12319 |
|
12320 |
|
12321 |
|
12322 |
|
12323 |
|
12324 |
|
12325 |
|
12326 | function createMathOperation(operator, defaultValue) {
|
12327 | return function(value, other) {
|
12328 | var result;
|
12329 | if (value === undefined && other === undefined) {
|
12330 | return defaultValue;
|
12331 | }
|
12332 | if (value !== undefined) {
|
12333 | result = value;
|
12334 | }
|
12335 | if (other !== undefined) {
|
12336 | if (result === undefined) {
|
12337 | return other;
|
12338 | }
|
12339 | if (typeof value == 'string' || typeof other == 'string') {
|
12340 | value = baseToString(value);
|
12341 | other = baseToString(other);
|
12342 | } else {
|
12343 | value = baseToNumber(value);
|
12344 | other = baseToNumber(other);
|
12345 | }
|
12346 | result = operator(value, other);
|
12347 | }
|
12348 | return result;
|
12349 | };
|
12350 | }
|
12351 |
|
12352 | |
12353 |
|
12354 |
|
12355 |
|
12356 |
|
12357 |
|
12358 |
|
12359 | function createOver(arrayFunc) {
|
12360 | return flatRest(function(iteratees) {
|
12361 | iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
|
12362 | return baseRest(function(args) {
|
12363 | var thisArg = this;
|
12364 | return arrayFunc(iteratees, function(iteratee) {
|
12365 | return apply(iteratee, thisArg, args);
|
12366 | });
|
12367 | });
|
12368 | });
|
12369 | }
|
12370 |
|
12371 | |
12372 |
|
12373 |
|
12374 |
|
12375 |
|
12376 |
|
12377 |
|
12378 |
|
12379 |
|
12380 | function createPadding(length, chars) {
|
12381 | chars = chars === undefined ? ' ' : baseToString(chars);
|
12382 |
|
12383 | var charsLength = chars.length;
|
12384 | if (charsLength < 2) {
|
12385 | return charsLength ? baseRepeat(chars, length) : chars;
|
12386 | }
|
12387 | var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
|
12388 | return hasUnicode(chars)
|
12389 | ? castSlice(stringToArray(result), 0, length).join('')
|
12390 | : result.slice(0, length);
|
12391 | }
|
12392 |
|
12393 | |
12394 |
|
12395 |
|
12396 |
|
12397 |
|
12398 |
|
12399 |
|
12400 |
|
12401 |
|
12402 |
|
12403 |
|
12404 |
|
12405 | function createPartial(func, bitmask, thisArg, partials) {
|
12406 | var isBind = bitmask & WRAP_BIND_FLAG,
|
12407 | Ctor = createCtor(func);
|
12408 |
|
12409 | function wrapper() {
|
12410 | var argsIndex = -1,
|
12411 | argsLength = arguments.length,
|
12412 | leftIndex = -1,
|
12413 | leftLength = partials.length,
|
12414 | args = Array(leftLength + argsLength),
|
12415 | fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
|
12416 |
|
12417 | while (++leftIndex < leftLength) {
|
12418 | args[leftIndex] = partials[leftIndex];
|
12419 | }
|
12420 | while (argsLength--) {
|
12421 | args[leftIndex++] = arguments[++argsIndex];
|
12422 | }
|
12423 | return apply(fn, isBind ? thisArg : this, args);
|
12424 | }
|
12425 | return wrapper;
|
12426 | }
|
12427 |
|
12428 | |
12429 |
|
12430 |
|
12431 |
|
12432 |
|
12433 |
|
12434 |
|
12435 | function createRange(fromRight) {
|
12436 | return function(start, end, step) {
|
12437 | if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
|
12438 | end = step = undefined;
|
12439 | }
|
12440 |
|
12441 | start = toFinite(start);
|
12442 | if (end === undefined) {
|
12443 | end = start;
|
12444 | start = 0;
|
12445 | } else {
|
12446 | end = toFinite(end);
|
12447 | }
|
12448 | step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
|
12449 | return baseRange(start, end, step, fromRight);
|
12450 | };
|
12451 | }
|
12452 |
|
12453 | |
12454 |
|
12455 |
|
12456 |
|
12457 |
|
12458 |
|
12459 |
|
12460 | function createRelationalOperation(operator) {
|
12461 | return function(value, other) {
|
12462 | if (!(typeof value == 'string' && typeof other == 'string')) {
|
12463 | value = toNumber(value);
|
12464 | other = toNumber(other);
|
12465 | }
|
12466 | return operator(value, other);
|
12467 | };
|
12468 | }
|
12469 |
|
12470 | |
12471 |
|
12472 |
|
12473 |
|
12474 |
|
12475 |
|
12476 |
|
12477 |
|
12478 |
|
12479 |
|
12480 |
|
12481 |
|
12482 |
|
12483 |
|
12484 |
|
12485 |
|
12486 |
|
12487 | function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
|
12488 | var isCurry = bitmask & WRAP_CURRY_FLAG,
|
12489 | newHolders = isCurry ? holders : undefined,
|
12490 | newHoldersRight = isCurry ? undefined : holders,
|
12491 | newPartials = isCurry ? partials : undefined,
|
12492 | newPartialsRight = isCurry ? undefined : partials;
|
12493 |
|
12494 | bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
|
12495 | bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
|
12496 |
|
12497 | if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
|
12498 | bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
|
12499 | }
|
12500 | var newData = [
|
12501 | func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
|
12502 | newHoldersRight, argPos, ary, arity
|
12503 | ];
|
12504 |
|
12505 | var result = wrapFunc.apply(undefined, newData);
|
12506 | if (isLaziable(func)) {
|
12507 | setData(result, newData);
|
12508 | }
|
12509 | result.placeholder = placeholder;
|
12510 | return setWrapToString(result, func, bitmask);
|
12511 | }
|
12512 |
|
12513 | |
12514 |
|
12515 |
|
12516 |
|
12517 |
|
12518 |
|
12519 |
|
12520 | function createRound(methodName) {
|
12521 | var func = Math[methodName];
|
12522 | return function(number, precision) {
|
12523 | number = toNumber(number);
|
12524 | precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
|
12525 | if (precision) {
|
12526 |
|
12527 |
|
12528 | var pair = (toString(number) + 'e').split('e'),
|
12529 | value = func(pair[0] + 'e' + (+pair[1] + precision));
|
12530 |
|
12531 | pair = (toString(value) + 'e').split('e');
|
12532 | return +(pair[0] + 'e' + (+pair[1] - precision));
|
12533 | }
|
12534 | return func(number);
|
12535 | };
|
12536 | }
|
12537 |
|
12538 | |
12539 |
|
12540 |
|
12541 |
|
12542 |
|
12543 |
|
12544 |
|
12545 | var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
|
12546 | return new Set(values);
|
12547 | };
|
12548 |
|
12549 | |
12550 |
|
12551 |
|
12552 |
|
12553 |
|
12554 |
|
12555 |
|
12556 | function createToPairs(keysFunc) {
|
12557 | return function(object) {
|
12558 | var tag = getTag(object);
|
12559 | if (tag == mapTag) {
|
12560 | return mapToArray(object);
|
12561 | }
|
12562 | if (tag == setTag) {
|
12563 | return setToPairs(object);
|
12564 | }
|
12565 | return baseToPairs(object, keysFunc(object));
|
12566 | };
|
12567 | }
|
12568 |
|
12569 | |
12570 |
|
12571 |
|
12572 |
|
12573 |
|
12574 |
|
12575 |
|
12576 |
|
12577 |
|
12578 |
|
12579 |
|
12580 |
|
12581 |
|
12582 |
|
12583 |
|
12584 |
|
12585 |
|
12586 |
|
12587 |
|
12588 |
|
12589 |
|
12590 |
|
12591 |
|
12592 |
|
12593 |
|
12594 | function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
|
12595 | var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
|
12596 | if (!isBindKey && typeof func != 'function') {
|
12597 | throw new TypeError(FUNC_ERROR_TEXT);
|
12598 | }
|
12599 | var length = partials ? partials.length : 0;
|
12600 | if (!length) {
|
12601 | bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
|
12602 | partials = holders = undefined;
|
12603 | }
|
12604 | ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
|
12605 | arity = arity === undefined ? arity : toInteger(arity);
|
12606 | length -= holders ? holders.length : 0;
|
12607 |
|
12608 | if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
|
12609 | var partialsRight = partials,
|
12610 | holdersRight = holders;
|
12611 |
|
12612 | partials = holders = undefined;
|
12613 | }
|
12614 | var data = isBindKey ? undefined : getData(func);
|
12615 |
|
12616 | var newData = [
|
12617 | func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
|
12618 | argPos, ary, arity
|
12619 | ];
|
12620 |
|
12621 | if (data) {
|
12622 | mergeData(newData, data);
|
12623 | }
|
12624 | func = newData[0];
|
12625 | bitmask = newData[1];
|
12626 | thisArg = newData[2];
|
12627 | partials = newData[3];
|
12628 | holders = newData[4];
|
12629 | arity = newData[9] = newData[9] === undefined
|
12630 | ? (isBindKey ? 0 : func.length)
|
12631 | : nativeMax(newData[9] - length, 0);
|
12632 |
|
12633 | if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
|
12634 | bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
|
12635 | }
|
12636 | if (!bitmask || bitmask == WRAP_BIND_FLAG) {
|
12637 | var result = createBind(func, bitmask, thisArg);
|
12638 | } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
|
12639 | result = createCurry(func, bitmask, arity);
|
12640 | } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
|
12641 | result = createPartial(func, bitmask, thisArg, partials);
|
12642 | } else {
|
12643 | result = createHybrid.apply(undefined, newData);
|
12644 | }
|
12645 | var setter = data ? baseSetData : setData;
|
12646 | return setWrapToString(setter(result, newData), func, bitmask);
|
12647 | }
|
12648 |
|
12649 | |
12650 |
|
12651 |
|
12652 |
|
12653 |
|
12654 |
|
12655 |
|
12656 |
|
12657 |
|
12658 |
|
12659 |
|
12660 |
|
12661 | function customDefaultsAssignIn(objValue, srcValue, key, object) {
|
12662 | if (objValue === undefined ||
|
12663 | (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
|
12664 | return srcValue;
|
12665 | }
|
12666 | return objValue;
|
12667 | }
|
12668 |
|
12669 | |
12670 |
|
12671 |
|
12672 |
|
12673 |
|
12674 |
|
12675 |
|
12676 |
|
12677 |
|
12678 |
|
12679 |
|
12680 |
|
12681 |
|
12682 |
|
12683 | function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
|
12684 | if (isObject(objValue) && isObject(srcValue)) {
|
12685 |
|
12686 | stack.set(srcValue, objValue);
|
12687 | baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
|
12688 | stack['delete'](srcValue);
|
12689 | }
|
12690 | return objValue;
|
12691 | }
|
12692 |
|
12693 | |
12694 |
|
12695 |
|
12696 |
|
12697 |
|
12698 |
|
12699 |
|
12700 |
|
12701 |
|
12702 | function customOmitClone(value) {
|
12703 | return isPlainObject(value) ? undefined : value;
|
12704 | }
|
12705 |
|
12706 | |
12707 |
|
12708 |
|
12709 |
|
12710 |
|
12711 |
|
12712 |
|
12713 |
|
12714 |
|
12715 |
|
12716 |
|
12717 |
|
12718 |
|
12719 | function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
12720 | var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
12721 | arrLength = array.length,
|
12722 | othLength = other.length;
|
12723 |
|
12724 | if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
12725 | return false;
|
12726 | }
|
12727 |
|
12728 | var stacked = stack.get(array);
|
12729 | if (stacked && stack.get(other)) {
|
12730 | return stacked == other;
|
12731 | }
|
12732 | var index = -1,
|
12733 | result = true,
|
12734 | seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
|
12735 |
|
12736 | stack.set(array, other);
|
12737 | stack.set(other, array);
|
12738 |
|
12739 |
|
12740 | while (++index < arrLength) {
|
12741 | var arrValue = array[index],
|
12742 | othValue = other[index];
|
12743 |
|
12744 | if (customizer) {
|
12745 | var compared = isPartial
|
12746 | ? customizer(othValue, arrValue, index, other, array, stack)
|
12747 | : customizer(arrValue, othValue, index, array, other, stack);
|
12748 | }
|
12749 | if (compared !== undefined) {
|
12750 | if (compared) {
|
12751 | continue;
|
12752 | }
|
12753 | result = false;
|
12754 | break;
|
12755 | }
|
12756 |
|
12757 | if (seen) {
|
12758 | if (!arraySome(other, function(othValue, othIndex) {
|
12759 | if (!cacheHas(seen, othIndex) &&
|
12760 | (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
12761 | return seen.push(othIndex);
|
12762 | }
|
12763 | })) {
|
12764 | result = false;
|
12765 | break;
|
12766 | }
|
12767 | } else if (!(
|
12768 | arrValue === othValue ||
|
12769 | equalFunc(arrValue, othValue, bitmask, customizer, stack)
|
12770 | )) {
|
12771 | result = false;
|
12772 | break;
|
12773 | }
|
12774 | }
|
12775 | stack['delete'](array);
|
12776 | stack['delete'](other);
|
12777 | return result;
|
12778 | }
|
12779 |
|
12780 | |
12781 |
|
12782 |
|
12783 |
|
12784 |
|
12785 |
|
12786 |
|
12787 |
|
12788 |
|
12789 |
|
12790 |
|
12791 |
|
12792 |
|
12793 |
|
12794 |
|
12795 |
|
12796 |
|
12797 | function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
12798 | switch (tag) {
|
12799 | case dataViewTag:
|
12800 | if ((object.byteLength != other.byteLength) ||
|
12801 | (object.byteOffset != other.byteOffset)) {
|
12802 | return false;
|
12803 | }
|
12804 | object = object.buffer;
|
12805 | other = other.buffer;
|
12806 |
|
12807 | case arrayBufferTag:
|
12808 | if ((object.byteLength != other.byteLength) ||
|
12809 | !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
|
12810 | return false;
|
12811 | }
|
12812 | return true;
|
12813 |
|
12814 | case boolTag:
|
12815 | case dateTag:
|
12816 | case numberTag:
|
12817 |
|
12818 |
|
12819 | return eq(+object, +other);
|
12820 |
|
12821 | case errorTag:
|
12822 | return object.name == other.name && object.message == other.message;
|
12823 |
|
12824 | case regexpTag:
|
12825 | case stringTag:
|
12826 |
|
12827 |
|
12828 |
|
12829 | return object == (other + '');
|
12830 |
|
12831 | case mapTag:
|
12832 | var convert = mapToArray;
|
12833 |
|
12834 | case setTag:
|
12835 | var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
|
12836 | convert || (convert = setToArray);
|
12837 |
|
12838 | if (object.size != other.size && !isPartial) {
|
12839 | return false;
|
12840 | }
|
12841 |
|
12842 | var stacked = stack.get(object);
|
12843 | if (stacked) {
|
12844 | return stacked == other;
|
12845 | }
|
12846 | bitmask |= COMPARE_UNORDERED_FLAG;
|
12847 |
|
12848 |
|
12849 | stack.set(object, other);
|
12850 | var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
12851 | stack['delete'](object);
|
12852 | return result;
|
12853 |
|
12854 | case symbolTag:
|
12855 | if (symbolValueOf) {
|
12856 | return symbolValueOf.call(object) == symbolValueOf.call(other);
|
12857 | }
|
12858 | }
|
12859 | return false;
|
12860 | }
|
12861 |
|
12862 | |
12863 |
|
12864 |
|
12865 |
|
12866 |
|
12867 |
|
12868 |
|
12869 |
|
12870 |
|
12871 |
|
12872 |
|
12873 |
|
12874 |
|
12875 | function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
12876 | var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
12877 | objProps = getAllKeys(object),
|
12878 | objLength = objProps.length,
|
12879 | othProps = getAllKeys(other),
|
12880 | othLength = othProps.length;
|
12881 |
|
12882 | if (objLength != othLength && !isPartial) {
|
12883 | return false;
|
12884 | }
|
12885 | var index = objLength;
|
12886 | while (index--) {
|
12887 | var key = objProps[index];
|
12888 | if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
12889 | return false;
|
12890 | }
|
12891 | }
|
12892 |
|
12893 | var stacked = stack.get(object);
|
12894 | if (stacked && stack.get(other)) {
|
12895 | return stacked == other;
|
12896 | }
|
12897 | var result = true;
|
12898 | stack.set(object, other);
|
12899 | stack.set(other, object);
|
12900 |
|
12901 | var skipCtor = isPartial;
|
12902 | while (++index < objLength) {
|
12903 | key = objProps[index];
|
12904 | var objValue = object[key],
|
12905 | othValue = other[key];
|
12906 |
|
12907 | if (customizer) {
|
12908 | var compared = isPartial
|
12909 | ? customizer(othValue, objValue, key, other, object, stack)
|
12910 | : customizer(objValue, othValue, key, object, other, stack);
|
12911 | }
|
12912 |
|
12913 | if (!(compared === undefined
|
12914 | ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
|
12915 | : compared
|
12916 | )) {
|
12917 | result = false;
|
12918 | break;
|
12919 | }
|
12920 | skipCtor || (skipCtor = key == 'constructor');
|
12921 | }
|
12922 | if (result && !skipCtor) {
|
12923 | var objCtor = object.constructor,
|
12924 | othCtor = other.constructor;
|
12925 |
|
12926 |
|
12927 | if (objCtor != othCtor &&
|
12928 | ('constructor' in object && 'constructor' in other) &&
|
12929 | !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
|
12930 | typeof othCtor == 'function' && othCtor instanceof othCtor)) {
|
12931 | result = false;
|
12932 | }
|
12933 | }
|
12934 | stack['delete'](object);
|
12935 | stack['delete'](other);
|
12936 | return result;
|
12937 | }
|
12938 |
|
12939 | |
12940 |
|
12941 |
|
12942 |
|
12943 |
|
12944 |
|
12945 |
|
12946 | function flatRest(func) {
|
12947 | return setToString(overRest(func, undefined, flatten), func + '');
|
12948 | }
|
12949 |
|
12950 | |
12951 |
|
12952 |
|
12953 |
|
12954 |
|
12955 |
|
12956 |
|
12957 | function getAllKeys(object) {
|
12958 | return baseGetAllKeys(object, keys, getSymbols);
|
12959 | }
|
12960 |
|
12961 | |
12962 |
|
12963 |
|
12964 |
|
12965 |
|
12966 |
|
12967 |
|
12968 |
|
12969 | function getAllKeysIn(object) {
|
12970 | return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
12971 | }
|
12972 |
|
12973 | |
12974 |
|
12975 |
|
12976 |
|
12977 |
|
12978 |
|
12979 |
|
12980 | var getData = !metaMap ? noop : function(func) {
|
12981 | return metaMap.get(func);
|
12982 | };
|
12983 |
|
12984 | |
12985 |
|
12986 |
|
12987 |
|
12988 |
|
12989 |
|
12990 |
|
12991 | function getFuncName(func) {
|
12992 | var result = (func.name + ''),
|
12993 | array = realNames[result],
|
12994 | length = hasOwnProperty.call(realNames, result) ? array.length : 0;
|
12995 |
|
12996 | while (length--) {
|
12997 | var data = array[length],
|
12998 | otherFunc = data.func;
|
12999 | if (otherFunc == null || otherFunc == func) {
|
13000 | return data.name;
|
13001 | }
|
13002 | }
|
13003 | return result;
|
13004 | }
|
13005 |
|
13006 | |
13007 |
|
13008 |
|
13009 |
|
13010 |
|
13011 |
|
13012 |
|
13013 | function getHolder(func) {
|
13014 | var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
|
13015 | return object.placeholder;
|
13016 | }
|
13017 |
|
13018 | |
13019 |
|
13020 |
|
13021 |
|
13022 |
|
13023 |
|
13024 |
|
13025 |
|
13026 |
|
13027 |
|
13028 |
|
13029 | function getIteratee() {
|
13030 | var result = lodash.iteratee || iteratee;
|
13031 | result = result === iteratee ? baseIteratee : result;
|
13032 | return arguments.length ? result(arguments[0], arguments[1]) : result;
|
13033 | }
|
13034 |
|
13035 | |
13036 |
|
13037 |
|
13038 |
|
13039 |
|
13040 |
|
13041 |
|
13042 |
|
13043 | function getMapData(map, key) {
|
13044 | var data = map.__data__;
|
13045 | return isKeyable(key)
|
13046 | ? data[typeof key == 'string' ? 'string' : 'hash']
|
13047 | : data.map;
|
13048 | }
|
13049 |
|
13050 | |
13051 |
|
13052 |
|
13053 |
|
13054 |
|
13055 |
|
13056 |
|
13057 | function getMatchData(object) {
|
13058 | var result = keys(object),
|
13059 | length = result.length;
|
13060 |
|
13061 | while (length--) {
|
13062 | var key = result[length],
|
13063 | value = object[key];
|
13064 |
|
13065 | result[length] = [key, value, isStrictComparable(value)];
|
13066 | }
|
13067 | return result;
|
13068 | }
|
13069 |
|
13070 | |
13071 |
|
13072 |
|
13073 |
|
13074 |
|
13075 |
|
13076 |
|
13077 |
|
13078 | function getNative(object, key) {
|
13079 | var value = getValue(object, key);
|
13080 | return baseIsNative(value) ? value : undefined;
|
13081 | }
|
13082 |
|
13083 | |
13084 |
|
13085 |
|
13086 |
|
13087 |
|
13088 |
|
13089 |
|
13090 | function getRawTag(value) {
|
13091 | var isOwn = hasOwnProperty.call(value, symToStringTag),
|
13092 | tag = value[symToStringTag];
|
13093 |
|
13094 | try {
|
13095 | value[symToStringTag] = undefined;
|
13096 | var unmasked = true;
|
13097 | } catch (e) {}
|
13098 |
|
13099 | var result = nativeObjectToString.call(value);
|
13100 | if (unmasked) {
|
13101 | if (isOwn) {
|
13102 | value[symToStringTag] = tag;
|
13103 | } else {
|
13104 | delete value[symToStringTag];
|
13105 | }
|
13106 | }
|
13107 | return result;
|
13108 | }
|
13109 |
|
13110 | |
13111 |
|
13112 |
|
13113 |
|
13114 |
|
13115 |
|
13116 |
|
13117 | var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
13118 | if (object == null) {
|
13119 | return [];
|
13120 | }
|
13121 | object = Object(object);
|
13122 | return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
13123 | return propertyIsEnumerable.call(object, symbol);
|
13124 | });
|
13125 | };
|
13126 |
|
13127 | |
13128 |
|
13129 |
|
13130 |
|
13131 |
|
13132 |
|
13133 |
|
13134 | var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
13135 | var result = [];
|
13136 | while (object) {
|
13137 | arrayPush(result, getSymbols(object));
|
13138 | object = getPrototype(object);
|
13139 | }
|
13140 | return result;
|
13141 | };
|
13142 |
|
13143 | |
13144 |
|
13145 |
|
13146 |
|
13147 |
|
13148 |
|
13149 |
|
13150 | var getTag = baseGetTag;
|
13151 |
|
13152 |
|
13153 | if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
13154 | (Map && getTag(new Map) != mapTag) ||
|
13155 | (Promise && getTag(Promise.resolve()) != promiseTag) ||
|
13156 | (Set && getTag(new Set) != setTag) ||
|
13157 | (WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
13158 | getTag = function(value) {
|
13159 | var result = baseGetTag(value),
|
13160 | Ctor = result == objectTag ? value.constructor : undefined,
|
13161 | ctorString = Ctor ? toSource(Ctor) : '';
|
13162 |
|
13163 | if (ctorString) {
|
13164 | switch (ctorString) {
|
13165 | case dataViewCtorString: return dataViewTag;
|
13166 | case mapCtorString: return mapTag;
|
13167 | case promiseCtorString: return promiseTag;
|
13168 | case setCtorString: return setTag;
|
13169 | case weakMapCtorString: return weakMapTag;
|
13170 | }
|
13171 | }
|
13172 | return result;
|
13173 | };
|
13174 | }
|
13175 |
|
13176 | |
13177 |
|
13178 |
|
13179 |
|
13180 |
|
13181 |
|
13182 |
|
13183 |
|
13184 |
|
13185 |
|
13186 | function getView(start, end, transforms) {
|
13187 | var index = -1,
|
13188 | length = transforms.length;
|
13189 |
|
13190 | while (++index < length) {
|
13191 | var data = transforms[index],
|
13192 | size = data.size;
|
13193 |
|
13194 | switch (data.type) {
|
13195 | case 'drop': start += size; break;
|
13196 | case 'dropRight': end -= size; break;
|
13197 | case 'take': end = nativeMin(end, start + size); break;
|
13198 | case 'takeRight': start = nativeMax(start, end - size); break;
|
13199 | }
|
13200 | }
|
13201 | return { 'start': start, 'end': end };
|
13202 | }
|
13203 |
|
13204 | |
13205 |
|
13206 |
|
13207 |
|
13208 |
|
13209 |
|
13210 |
|
13211 | function getWrapDetails(source) {
|
13212 | var match = source.match(reWrapDetails);
|
13213 | return match ? match[1].split(reSplitDetails) : [];
|
13214 | }
|
13215 |
|
13216 | |
13217 |
|
13218 |
|
13219 |
|
13220 |
|
13221 |
|
13222 |
|
13223 |
|
13224 |
|
13225 | function hasPath(object, path, hasFunc) {
|
13226 | path = castPath(path, object);
|
13227 |
|
13228 | var index = -1,
|
13229 | length = path.length,
|
13230 | result = false;
|
13231 |
|
13232 | while (++index < length) {
|
13233 | var key = toKey(path[index]);
|
13234 | if (!(result = object != null && hasFunc(object, key))) {
|
13235 | break;
|
13236 | }
|
13237 | object = object[key];
|
13238 | }
|
13239 | if (result || ++index != length) {
|
13240 | return result;
|
13241 | }
|
13242 | length = object == null ? 0 : object.length;
|
13243 | return !!length && isLength(length) && isIndex(key, length) &&
|
13244 | (isArray(object) || isArguments(object));
|
13245 | }
|
13246 |
|
13247 | |
13248 |
|
13249 |
|
13250 |
|
13251 |
|
13252 |
|
13253 |
|
13254 | function initCloneArray(array) {
|
13255 | var length = array.length,
|
13256 | result = array.constructor(length);
|
13257 |
|
13258 |
|
13259 | if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
13260 | result.index = array.index;
|
13261 | result.input = array.input;
|
13262 | }
|
13263 | return result;
|
13264 | }
|
13265 |
|
13266 | |
13267 |
|
13268 |
|
13269 |
|
13270 |
|
13271 |
|
13272 |
|
13273 | function initCloneObject(object) {
|
13274 | return (typeof object.constructor == 'function' && !isPrototype(object))
|
13275 | ? baseCreate(getPrototype(object))
|
13276 | : {};
|
13277 | }
|
13278 |
|
13279 | |
13280 |
|
13281 |
|
13282 |
|
13283 |
|
13284 |
|
13285 |
|
13286 |
|
13287 |
|
13288 |
|
13289 |
|
13290 |
|
13291 |
|
13292 | function initCloneByTag(object, tag, cloneFunc, isDeep) {
|
13293 | var Ctor = object.constructor;
|
13294 | switch (tag) {
|
13295 | case arrayBufferTag:
|
13296 | return cloneArrayBuffer(object);
|
13297 |
|
13298 | case boolTag:
|
13299 | case dateTag:
|
13300 | return new Ctor(+object);
|
13301 |
|
13302 | case dataViewTag:
|
13303 | return cloneDataView(object, isDeep);
|
13304 |
|
13305 | case float32Tag: case float64Tag:
|
13306 | case int8Tag: case int16Tag: case int32Tag:
|
13307 | case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
|
13308 | return cloneTypedArray(object, isDeep);
|
13309 |
|
13310 | case mapTag:
|
13311 | return cloneMap(object, isDeep, cloneFunc);
|
13312 |
|
13313 | case numberTag:
|
13314 | case stringTag:
|
13315 | return new Ctor(object);
|
13316 |
|
13317 | case regexpTag:
|
13318 | return cloneRegExp(object);
|
13319 |
|
13320 | case setTag:
|
13321 | return cloneSet(object, isDeep, cloneFunc);
|
13322 |
|
13323 | case symbolTag:
|
13324 | return cloneSymbol(object);
|
13325 | }
|
13326 | }
|
13327 |
|
13328 | |
13329 |
|
13330 |
|
13331 |
|
13332 |
|
13333 |
|
13334 |
|
13335 |
|
13336 | function insertWrapDetails(source, details) {
|
13337 | var length = details.length;
|
13338 | if (!length) {
|
13339 | return source;
|
13340 | }
|
13341 | var lastIndex = length - 1;
|
13342 | details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
|
13343 | details = details.join(length > 2 ? ', ' : ' ');
|
13344 | return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
|
13345 | }
|
13346 |
|
13347 | |
13348 |
|
13349 |
|
13350 |
|
13351 |
|
13352 |
|
13353 |
|
13354 | function isFlattenable(value) {
|
13355 | return isArray(value) || isArguments(value) ||
|
13356 | !!(spreadableSymbol && value && value[spreadableSymbol]);
|
13357 | }
|
13358 |
|
13359 | |
13360 |
|
13361 |
|
13362 |
|
13363 |
|
13364 |
|
13365 |
|
13366 |
|
13367 | function isIndex(value, length) {
|
13368 | length = length == null ? MAX_SAFE_INTEGER : length;
|
13369 | return !!length &&
|
13370 | (typeof value == 'number' || reIsUint.test(value)) &&
|
13371 | (value > -1 && value % 1 == 0 && value < length);
|
13372 | }
|
13373 |
|
13374 | |
13375 |
|
13376 |
|
13377 |
|
13378 |
|
13379 |
|
13380 |
|
13381 |
|
13382 |
|
13383 |
|
13384 | function isIterateeCall(value, index, object) {
|
13385 | if (!isObject(object)) {
|
13386 | return false;
|
13387 | }
|
13388 | var type = typeof index;
|
13389 | if (type == 'number'
|
13390 | ? (isArrayLike(object) && isIndex(index, object.length))
|
13391 | : (type == 'string' && index in object)
|
13392 | ) {
|
13393 | return eq(object[index], value);
|
13394 | }
|
13395 | return false;
|
13396 | }
|
13397 |
|
13398 | |
13399 |
|
13400 |
|
13401 |
|
13402 |
|
13403 |
|
13404 |
|
13405 |
|
13406 | function isKey(value, object) {
|
13407 | if (isArray(value)) {
|
13408 | return false;
|
13409 | }
|
13410 | var type = typeof value;
|
13411 | if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
13412 | value == null || isSymbol(value)) {
|
13413 | return true;
|
13414 | }
|
13415 | return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
13416 | (object != null && value in Object(object));
|
13417 | }
|
13418 |
|
13419 | |
13420 |
|
13421 |
|
13422 |
|
13423 |
|
13424 |
|
13425 |
|
13426 | function isKeyable(value) {
|
13427 | var type = typeof value;
|
13428 | return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
13429 | ? (value !== '__proto__')
|
13430 | : (value === null);
|
13431 | }
|
13432 |
|
13433 | |
13434 |
|
13435 |
|
13436 |
|
13437 |
|
13438 |
|
13439 |
|
13440 |
|
13441 | function isLaziable(func) {
|
13442 | var funcName = getFuncName(func),
|
13443 | other = lodash[funcName];
|
13444 |
|
13445 | if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
|
13446 | return false;
|
13447 | }
|
13448 | if (func === other) {
|
13449 | return true;
|
13450 | }
|
13451 | var data = getData(other);
|
13452 | return !!data && func === data[0];
|
13453 | }
|
13454 |
|
13455 | |
13456 |
|
13457 |
|
13458 |
|
13459 |
|
13460 |
|
13461 |
|
13462 | function isMasked(func) {
|
13463 | return !!maskSrcKey && (maskSrcKey in func);
|
13464 | }
|
13465 |
|
13466 | |
13467 |
|
13468 |
|
13469 |
|
13470 |
|
13471 |
|
13472 |
|
13473 | var isMaskable = coreJsData ? isFunction : stubFalse;
|
13474 |
|
13475 | |
13476 |
|
13477 |
|
13478 |
|
13479 |
|
13480 |
|
13481 |
|
13482 | function isPrototype(value) {
|
13483 | var Ctor = value && value.constructor,
|
13484 | proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
13485 |
|
13486 | return value === proto;
|
13487 | }
|
13488 |
|
13489 | |
13490 |
|
13491 |
|
13492 |
|
13493 |
|
13494 |
|
13495 |
|
13496 |
|
13497 | function isStrictComparable(value) {
|
13498 | return value === value && !isObject(value);
|
13499 | }
|
13500 |
|
13501 | |
13502 |
|
13503 |
|
13504 |
|
13505 |
|
13506 |
|
13507 |
|
13508 |
|
13509 |
|
13510 | function matchesStrictComparable(key, srcValue) {
|
13511 | return function(object) {
|
13512 | if (object == null) {
|
13513 | return false;
|
13514 | }
|
13515 | return object[key] === srcValue &&
|
13516 | (srcValue !== undefined || (key in Object(object)));
|
13517 | };
|
13518 | }
|
13519 |
|
13520 | |
13521 |
|
13522 |
|
13523 |
|
13524 |
|
13525 |
|
13526 |
|
13527 |
|
13528 | function memoizeCapped(func) {
|
13529 | var result = memoize(func, function(key) {
|
13530 | if (cache.size === MAX_MEMOIZE_SIZE) {
|
13531 | cache.clear();
|
13532 | }
|
13533 | return key;
|
13534 | });
|
13535 |
|
13536 | var cache = result.cache;
|
13537 | return result;
|
13538 | }
|
13539 |
|
13540 | |
13541 |
|
13542 |
|
13543 |
|
13544 |
|
13545 |
|
13546 |
|
13547 |
|
13548 |
|
13549 |
|
13550 |
|
13551 |
|
13552 |
|
13553 |
|
13554 |
|
13555 |
|
13556 | function mergeData(data, source) {
|
13557 | var bitmask = data[1],
|
13558 | srcBitmask = source[1],
|
13559 | newBitmask = bitmask | srcBitmask,
|
13560 | isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
|
13561 |
|
13562 | var isCombo =
|
13563 | ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
|
13564 | ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
|
13565 | ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
|
13566 |
|
13567 |
|
13568 | if (!(isCommon || isCombo)) {
|
13569 | return data;
|
13570 | }
|
13571 |
|
13572 | if (srcBitmask & WRAP_BIND_FLAG) {
|
13573 | data[2] = source[2];
|
13574 |
|
13575 | newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
|
13576 | }
|
13577 |
|
13578 | var value = source[3];
|
13579 | if (value) {
|
13580 | var partials = data[3];
|
13581 | data[3] = partials ? composeArgs(partials, value, source[4]) : value;
|
13582 | data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
|
13583 | }
|
13584 |
|
13585 | value = source[5];
|
13586 | if (value) {
|
13587 | partials = data[5];
|
13588 | data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
|
13589 | data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
|
13590 | }
|
13591 |
|
13592 | value = source[7];
|
13593 | if (value) {
|
13594 | data[7] = value;
|
13595 | }
|
13596 |
|
13597 | if (srcBitmask & WRAP_ARY_FLAG) {
|
13598 | data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
|
13599 | }
|
13600 |
|
13601 | if (data[9] == null) {
|
13602 | data[9] = source[9];
|
13603 | }
|
13604 |
|
13605 | data[0] = source[0];
|
13606 | data[1] = newBitmask;
|
13607 |
|
13608 | return data;
|
13609 | }
|
13610 |
|
13611 | |
13612 |
|
13613 |
|
13614 |
|
13615 |
|
13616 |
|
13617 |
|
13618 |
|
13619 |
|
13620 | function nativeKeysIn(object) {
|
13621 | var result = [];
|
13622 | if (object != null) {
|
13623 | for (var key in Object(object)) {
|
13624 | result.push(key);
|
13625 | }
|
13626 | }
|
13627 | return result;
|
13628 | }
|
13629 |
|
13630 | |
13631 |
|
13632 |
|
13633 |
|
13634 |
|
13635 |
|
13636 |
|
13637 | function objectToString(value) {
|
13638 | return nativeObjectToString.call(value);
|
13639 | }
|
13640 |
|
13641 | |
13642 |
|
13643 |
|
13644 |
|
13645 |
|
13646 |
|
13647 |
|
13648 |
|
13649 |
|
13650 | function overRest(func, start, transform) {
|
13651 | start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
13652 | return function() {
|
13653 | var args = arguments,
|
13654 | index = -1,
|
13655 | length = nativeMax(args.length - start, 0),
|
13656 | array = Array(length);
|
13657 |
|
13658 | while (++index < length) {
|
13659 | array[index] = args[start + index];
|
13660 | }
|
13661 | index = -1;
|
13662 | var otherArgs = Array(start + 1);
|
13663 | while (++index < start) {
|
13664 | otherArgs[index] = args[index];
|
13665 | }
|
13666 | otherArgs[start] = transform(array);
|
13667 | return apply(func, this, otherArgs);
|
13668 | };
|
13669 | }
|
13670 |
|
13671 | |
13672 |
|
13673 |
|
13674 |
|
13675 |
|
13676 |
|
13677 |
|
13678 |
|
13679 | function parent(object, path) {
|
13680 | return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
|
13681 | }
|
13682 |
|
13683 | |
13684 |
|
13685 |
|
13686 |
|
13687 |
|
13688 |
|
13689 |
|
13690 |
|
13691 |
|
13692 |
|
13693 | function reorder(array, indexes) {
|
13694 | var arrLength = array.length,
|
13695 | length = nativeMin(indexes.length, arrLength),
|
13696 | oldArray = copyArray(array);
|
13697 |
|
13698 | while (length--) {
|
13699 | var index = indexes[length];
|
13700 | array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
|
13701 | }
|
13702 | return array;
|
13703 | }
|
13704 |
|
13705 | |
13706 |
|
13707 |
|
13708 |
|
13709 |
|
13710 |
|
13711 |
|
13712 |
|
13713 |
|
13714 |
|
13715 |
|
13716 |
|
13717 |
|
13718 |
|
13719 | var setData = shortOut(baseSetData);
|
13720 |
|
13721 | |
13722 |
|
13723 |
|
13724 |
|
13725 |
|
13726 |
|
13727 |
|
13728 |
|
13729 | var setTimeout = ctxSetTimeout || function(func, wait) {
|
13730 | return root.setTimeout(func, wait);
|
13731 | };
|
13732 |
|
13733 | |
13734 |
|
13735 |
|
13736 |
|
13737 |
|
13738 |
|
13739 |
|
13740 |
|
13741 | var setToString = shortOut(baseSetToString);
|
13742 |
|
13743 | |
13744 |
|
13745 |
|
13746 |
|
13747 |
|
13748 |
|
13749 |
|
13750 |
|
13751 |
|
13752 |
|
13753 | function setWrapToString(wrapper, reference, bitmask) {
|
13754 | var source = (reference + '');
|
13755 | return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
|
13756 | }
|
13757 |
|
13758 | |
13759 |
|
13760 |
|
13761 |
|
13762 |
|
13763 |
|
13764 |
|
13765 |
|
13766 |
|
13767 | function shortOut(func) {
|
13768 | var count = 0,
|
13769 | lastCalled = 0;
|
13770 |
|
13771 | return function() {
|
13772 | var stamp = nativeNow(),
|
13773 | remaining = HOT_SPAN - (stamp - lastCalled);
|
13774 |
|
13775 | lastCalled = stamp;
|
13776 | if (remaining > 0) {
|
13777 | if (++count >= HOT_COUNT) {
|
13778 | return arguments[0];
|
13779 | }
|
13780 | } else {
|
13781 | count = 0;
|
13782 | }
|
13783 | return func.apply(undefined, arguments);
|
13784 | };
|
13785 | }
|
13786 |
|
13787 | |
13788 |
|
13789 |
|
13790 |
|
13791 |
|
13792 |
|
13793 |
|
13794 |
|
13795 | function shuffleSelf(array, size) {
|
13796 | var index = -1,
|
13797 | length = array.length,
|
13798 | lastIndex = length - 1;
|
13799 |
|
13800 | size = size === undefined ? length : size;
|
13801 | while (++index < size) {
|
13802 | var rand = baseRandom(index, lastIndex),
|
13803 | value = array[rand];
|
13804 |
|
13805 | array[rand] = array[index];
|
13806 | array[index] = value;
|
13807 | }
|
13808 | array.length = size;
|
13809 | return array;
|
13810 | }
|
13811 |
|
13812 | |
13813 |
|
13814 |
|
13815 |
|
13816 |
|
13817 |
|
13818 |
|
13819 | var stringToPath = memoizeCapped(function(string) {
|
13820 | var result = [];
|
13821 | if (reLeadingDot.test(string)) {
|
13822 | result.push('');
|
13823 | }
|
13824 | string.replace(rePropName, function(match, number, quote, string) {
|
13825 | result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
|
13826 | });
|
13827 | return result;
|
13828 | });
|
13829 |
|
13830 | |
13831 |
|
13832 |
|
13833 |
|
13834 |
|
13835 |
|
13836 |
|
13837 | function toKey(value) {
|
13838 | if (typeof value == 'string' || isSymbol(value)) {
|
13839 | return value;
|
13840 | }
|
13841 | var result = (value + '');
|
13842 | return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
13843 | }
|
13844 |
|
13845 | |
13846 |
|
13847 |
|
13848 |
|
13849 |
|
13850 |
|
13851 |
|
13852 | function toSource(func) {
|
13853 | if (func != null) {
|
13854 | try {
|
13855 | return funcToString.call(func);
|
13856 | } catch (e) {}
|
13857 | try {
|
13858 | return (func + '');
|
13859 | } catch (e) {}
|
13860 | }
|
13861 | return '';
|
13862 | }
|
13863 |
|
13864 | |
13865 |
|
13866 |
|
13867 |
|
13868 |
|
13869 |
|
13870 |
|
13871 |
|
13872 | function updateWrapDetails(details, bitmask) {
|
13873 | arrayEach(wrapFlags, function(pair) {
|
13874 | var value = '_.' + pair[0];
|
13875 | if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
|
13876 | details.push(value);
|
13877 | }
|
13878 | });
|
13879 | return details.sort();
|
13880 | }
|
13881 |
|
13882 | |
13883 |
|
13884 |
|
13885 |
|
13886 |
|
13887 |
|
13888 |
|
13889 | function wrapperClone(wrapper) {
|
13890 | if (wrapper instanceof LazyWrapper) {
|
13891 | return wrapper.clone();
|
13892 | }
|
13893 | var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
|
13894 | result.__actions__ = copyArray(wrapper.__actions__);
|
13895 | result.__index__ = wrapper.__index__;
|
13896 | result.__values__ = wrapper.__values__;
|
13897 | return result;
|
13898 | }
|
13899 |
|
13900 |
|
13901 |
|
13902 | |
13903 |
|
13904 |
|
13905 |
|
13906 |
|
13907 |
|
13908 |
|
13909 |
|
13910 |
|
13911 |
|
13912 |
|
13913 |
|
13914 |
|
13915 |
|
13916 |
|
13917 |
|
13918 |
|
13919 |
|
13920 |
|
13921 |
|
13922 |
|
13923 | function chunk(array, size, guard) {
|
13924 | if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
|
13925 | size = 1;
|
13926 | } else {
|
13927 | size = nativeMax(toInteger(size), 0);
|
13928 | }
|
13929 | var length = array == null ? 0 : array.length;
|
13930 | if (!length || size < 1) {
|
13931 | return [];
|
13932 | }
|
13933 | var index = 0,
|
13934 | resIndex = 0,
|
13935 | result = Array(nativeCeil(length / size));
|
13936 |
|
13937 | while (index < length) {
|
13938 | result[resIndex++] = baseSlice(array, index, (index += size));
|
13939 | }
|
13940 | return result;
|
13941 | }
|
13942 |
|
13943 | |
13944 |
|
13945 |
|
13946 |
|
13947 |
|
13948 |
|
13949 |
|
13950 |
|
13951 |
|
13952 |
|
13953 |
|
13954 |
|
13955 |
|
13956 |
|
13957 |
|
13958 | function compact(array) {
|
13959 | var index = -1,
|
13960 | length = array == null ? 0 : array.length,
|
13961 | resIndex = 0,
|
13962 | result = [];
|
13963 |
|
13964 | while (++index < length) {
|
13965 | var value = array[index];
|
13966 | if (value) {
|
13967 | result[resIndex++] = value;
|
13968 | }
|
13969 | }
|
13970 | return result;
|
13971 | }
|
13972 |
|
13973 | |
13974 |
|
13975 |
|
13976 |
|
13977 |
|
13978 |
|
13979 |
|
13980 |
|
13981 |
|
13982 |
|
13983 |
|
13984 |
|
13985 |
|
13986 |
|
13987 |
|
13988 |
|
13989 |
|
13990 |
|
13991 |
|
13992 |
|
13993 |
|
13994 |
|
13995 | function concat() {
|
13996 | var length = arguments.length;
|
13997 | if (!length) {
|
13998 | return [];
|
13999 | }
|
14000 | var args = Array(length - 1),
|
14001 | array = arguments[0],
|
14002 | index = length;
|
14003 |
|
14004 | while (index--) {
|
14005 | args[index - 1] = arguments[index];
|
14006 | }
|
14007 | return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
|
14008 | }
|
14009 |
|
14010 | |
14011 |
|
14012 |
|
14013 |
|
14014 |
|
14015 |
|
14016 |
|
14017 |
|
14018 |
|
14019 |
|
14020 |
|
14021 |
|
14022 |
|
14023 |
|
14024 |
|
14025 |
|
14026 |
|
14027 |
|
14028 |
|
14029 |
|
14030 |
|
14031 | var difference = baseRest(function(array, values) {
|
14032 | return isArrayLikeObject(array)
|
14033 | ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
|
14034 | : [];
|
14035 | });
|
14036 |
|
14037 | |
14038 |
|
14039 |
|
14040 |
|
14041 |
|
14042 |
|
14043 |
|
14044 |
|
14045 |
|
14046 |
|
14047 |
|
14048 |
|
14049 |
|
14050 |
|
14051 |
|
14052 |
|
14053 |
|
14054 |
|
14055 |
|
14056 |
|
14057 |
|
14058 |
|
14059 |
|
14060 |
|
14061 |
|
14062 |
|
14063 | var differenceBy = baseRest(function(array, values) {
|
14064 | var iteratee = last(values);
|
14065 | if (isArrayLikeObject(iteratee)) {
|
14066 | iteratee = undefined;
|
14067 | }
|
14068 | return isArrayLikeObject(array)
|
14069 | ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
|
14070 | : [];
|
14071 | });
|
14072 |
|
14073 | |
14074 |
|
14075 |
|
14076 |
|
14077 |
|
14078 |
|
14079 |
|
14080 |
|
14081 |
|
14082 |
|
14083 |
|
14084 |
|
14085 |
|
14086 |
|
14087 |
|
14088 |
|
14089 |
|
14090 |
|
14091 |
|
14092 |
|
14093 |
|
14094 |
|
14095 |
|
14096 | var differenceWith = baseRest(function(array, values) {
|
14097 | var comparator = last(values);
|
14098 | if (isArrayLikeObject(comparator)) {
|
14099 | comparator = undefined;
|
14100 | }
|
14101 | return isArrayLikeObject(array)
|
14102 | ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
|
14103 | : [];
|
14104 | });
|
14105 |
|
14106 | |
14107 |
|
14108 |
|
14109 |
|
14110 |
|
14111 |
|
14112 |
|
14113 |
|
14114 |
|
14115 |
|
14116 |
|
14117 |
|
14118 |
|
14119 |
|
14120 |
|
14121 |
|
14122 |
|
14123 |
|
14124 |
|
14125 |
|
14126 |
|
14127 |
|
14128 |
|
14129 |
|
14130 |
|
14131 | function drop(array, n, guard) {
|
14132 | var length = array == null ? 0 : array.length;
|
14133 | if (!length) {
|
14134 | return [];
|
14135 | }
|
14136 | n = (guard || n === undefined) ? 1 : toInteger(n);
|
14137 | return baseSlice(array, n < 0 ? 0 : n, length);
|
14138 | }
|
14139 |
|
14140 | |
14141 |
|
14142 |
|
14143 |
|
14144 |
|
14145 |
|
14146 |
|
14147 |
|
14148 |
|
14149 |
|
14150 |
|
14151 |
|
14152 |
|
14153 |
|
14154 |
|
14155 |
|
14156 |
|
14157 |
|
14158 |
|
14159 |
|
14160 |
|
14161 |
|
14162 |
|
14163 |
|
14164 |
|
14165 | function dropRight(array, n, guard) {
|
14166 | var length = array == null ? 0 : array.length;
|
14167 | if (!length) {
|
14168 | return [];
|
14169 | }
|
14170 | n = (guard || n === undefined) ? 1 : toInteger(n);
|
14171 | n = length - n;
|
14172 | return baseSlice(array, 0, n < 0 ? 0 : n);
|
14173 | }
|
14174 |
|
14175 | |
14176 |
|
14177 |
|
14178 |
|
14179 |
|
14180 |
|
14181 |
|
14182 |
|
14183 |
|
14184 |
|
14185 |
|
14186 |
|
14187 |
|
14188 |
|
14189 |
|
14190 |
|
14191 |
|
14192 |
|
14193 |
|
14194 |
|
14195 |
|
14196 |
|
14197 |
|
14198 |
|
14199 |
|
14200 |
|
14201 |
|
14202 |
|
14203 |
|
14204 |
|
14205 |
|
14206 |
|
14207 |
|
14208 |
|
14209 |
|
14210 | function dropRightWhile(array, predicate) {
|
14211 | return (array && array.length)
|
14212 | ? baseWhile(array, getIteratee(predicate, 3), true, true)
|
14213 | : [];
|
14214 | }
|
14215 |
|
14216 | |
14217 |
|
14218 |
|
14219 |
|
14220 |
|
14221 |
|
14222 |
|
14223 |
|
14224 |
|
14225 |
|
14226 |
|
14227 |
|
14228 |
|
14229 |
|
14230 |
|
14231 |
|
14232 |
|
14233 |
|
14234 |
|
14235 |
|
14236 |
|
14237 |
|
14238 |
|
14239 |
|
14240 |
|
14241 |
|
14242 |
|
14243 |
|
14244 |
|
14245 |
|
14246 |
|
14247 |
|
14248 |
|
14249 |
|
14250 |
|
14251 | function dropWhile(array, predicate) {
|
14252 | return (array && array.length)
|
14253 | ? baseWhile(array, getIteratee(predicate, 3), true)
|
14254 | : [];
|
14255 | }
|
14256 |
|
14257 | |
14258 |
|
14259 |
|
14260 |
|
14261 |
|
14262 |
|
14263 |
|
14264 |
|
14265 |
|
14266 |
|
14267 |
|
14268 |
|
14269 |
|
14270 |
|
14271 |
|
14272 |
|
14273 |
|
14274 |
|
14275 |
|
14276 |
|
14277 |
|
14278 |
|
14279 |
|
14280 |
|
14281 |
|
14282 |
|
14283 |
|
14284 |
|
14285 |
|
14286 | function fill(array, value, start, end) {
|
14287 | var length = array == null ? 0 : array.length;
|
14288 | if (!length) {
|
14289 | return [];
|
14290 | }
|
14291 | if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
|
14292 | start = 0;
|
14293 | end = length;
|
14294 | }
|
14295 | return baseFill(array, value, start, end);
|
14296 | }
|
14297 |
|
14298 | |
14299 |
|
14300 |
|
14301 |
|
14302 |
|
14303 |
|
14304 |
|
14305 |
|
14306 |
|
14307 |
|
14308 |
|
14309 |
|
14310 |
|
14311 |
|
14312 |
|
14313 |
|
14314 |
|
14315 |
|
14316 |
|
14317 |
|
14318 |
|
14319 |
|
14320 |
|
14321 |
|
14322 |
|
14323 |
|
14324 |
|
14325 |
|
14326 |
|
14327 |
|
14328 |
|
14329 |
|
14330 |
|
14331 |
|
14332 |
|
14333 | function findIndex(array, predicate, fromIndex) {
|
14334 | var length = array == null ? 0 : array.length;
|
14335 | if (!length) {
|
14336 | return -1;
|
14337 | }
|
14338 | var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
14339 | if (index < 0) {
|
14340 | index = nativeMax(length + index, 0);
|
14341 | }
|
14342 | return baseFindIndex(array, getIteratee(predicate, 3), index);
|
14343 | }
|
14344 |
|
14345 | |
14346 |
|
14347 |
|
14348 |
|
14349 |
|
14350 |
|
14351 |
|
14352 |
|
14353 |
|
14354 |
|
14355 |
|
14356 |
|
14357 |
|
14358 |
|
14359 |
|
14360 |
|
14361 |
|
14362 |
|
14363 |
|
14364 |
|
14365 |
|
14366 |
|
14367 |
|
14368 |
|
14369 |
|
14370 |
|
14371 |
|
14372 |
|
14373 |
|
14374 |
|
14375 |
|
14376 |
|
14377 |
|
14378 |
|
14379 |
|
14380 | function findLastIndex(array, predicate, fromIndex) {
|
14381 | var length = array == null ? 0 : array.length;
|
14382 | if (!length) {
|
14383 | return -1;
|
14384 | }
|
14385 | var index = length - 1;
|
14386 | if (fromIndex !== undefined) {
|
14387 | index = toInteger(fromIndex);
|
14388 | index = fromIndex < 0
|
14389 | ? nativeMax(length + index, 0)
|
14390 | : nativeMin(index, length - 1);
|
14391 | }
|
14392 | return baseFindIndex(array, getIteratee(predicate, 3), index, true);
|
14393 | }
|
14394 |
|
14395 | |
14396 |
|
14397 |
|
14398 |
|
14399 |
|
14400 |
|
14401 |
|
14402 |
|
14403 |
|
14404 |
|
14405 |
|
14406 |
|
14407 |
|
14408 |
|
14409 | function flatten(array) {
|
14410 | var length = array == null ? 0 : array.length;
|
14411 | return length ? baseFlatten(array, 1) : [];
|
14412 | }
|
14413 |
|
14414 | |
14415 |
|
14416 |
|
14417 |
|
14418 |
|
14419 |
|
14420 |
|
14421 |
|
14422 |
|
14423 |
|
14424 |
|
14425 |
|
14426 |
|
14427 |
|
14428 | function flattenDeep(array) {
|
14429 | var length = array == null ? 0 : array.length;
|
14430 | return length ? baseFlatten(array, INFINITY) : [];
|
14431 | }
|
14432 |
|
14433 | |
14434 |
|
14435 |
|
14436 |
|
14437 |
|
14438 |
|
14439 |
|
14440 |
|
14441 |
|
14442 |
|
14443 |
|
14444 |
|
14445 |
|
14446 |
|
14447 |
|
14448 |
|
14449 |
|
14450 |
|
14451 |
|
14452 |
|
14453 | function flattenDepth(array, depth) {
|
14454 | var length = array == null ? 0 : array.length;
|
14455 | if (!length) {
|
14456 | return [];
|
14457 | }
|
14458 | depth = depth === undefined ? 1 : toInteger(depth);
|
14459 | return baseFlatten(array, depth);
|
14460 | }
|
14461 |
|
14462 | |
14463 |
|
14464 |
|
14465 |
|
14466 |
|
14467 |
|
14468 |
|
14469 |
|
14470 |
|
14471 |
|
14472 |
|
14473 |
|
14474 |
|
14475 |
|
14476 |
|
14477 | function fromPairs(pairs) {
|
14478 | var index = -1,
|
14479 | length = pairs == null ? 0 : pairs.length,
|
14480 | result = {};
|
14481 |
|
14482 | while (++index < length) {
|
14483 | var pair = pairs[index];
|
14484 | result[pair[0]] = pair[1];
|
14485 | }
|
14486 | return result;
|
14487 | }
|
14488 |
|
14489 | |
14490 |
|
14491 |
|
14492 |
|
14493 |
|
14494 |
|
14495 |
|
14496 |
|
14497 |
|
14498 |
|
14499 |
|
14500 |
|
14501 |
|
14502 |
|
14503 |
|
14504 |
|
14505 |
|
14506 |
|
14507 | function head(array) {
|
14508 | return (array && array.length) ? array[0] : undefined;
|
14509 | }
|
14510 |
|
14511 | |
14512 |
|
14513 |
|
14514 |
|
14515 |
|
14516 |
|
14517 |
|
14518 |
|
14519 |
|
14520 |
|
14521 |
|
14522 |
|
14523 |
|
14524 |
|
14525 |
|
14526 |
|
14527 |
|
14528 |
|
14529 |
|
14530 |
|
14531 |
|
14532 |
|
14533 |
|
14534 | function indexOf(array, value, fromIndex) {
|
14535 | var length = array == null ? 0 : array.length;
|
14536 | if (!length) {
|
14537 | return -1;
|
14538 | }
|
14539 | var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
14540 | if (index < 0) {
|
14541 | index = nativeMax(length + index, 0);
|
14542 | }
|
14543 | return baseIndexOf(array, value, index);
|
14544 | }
|
14545 |
|
14546 | |
14547 |
|
14548 |
|
14549 |
|
14550 |
|
14551 |
|
14552 |
|
14553 |
|
14554 |
|
14555 |
|
14556 |
|
14557 |
|
14558 |
|
14559 |
|
14560 | function initial(array) {
|
14561 | var length = array == null ? 0 : array.length;
|
14562 | return length ? baseSlice(array, 0, -1) : [];
|
14563 | }
|
14564 |
|
14565 | |
14566 |
|
14567 |
|
14568 |
|
14569 |
|
14570 |
|
14571 |
|
14572 |
|
14573 |
|
14574 |
|
14575 |
|
14576 |
|
14577 |
|
14578 |
|
14579 |
|
14580 |
|
14581 |
|
14582 | var intersection = baseRest(function(arrays) {
|
14583 | var mapped = arrayMap(arrays, castArrayLikeObject);
|
14584 | return (mapped.length && mapped[0] === arrays[0])
|
14585 | ? baseIntersection(mapped)
|
14586 | : [];
|
14587 | });
|
14588 |
|
14589 | |
14590 |
|
14591 |
|
14592 |
|
14593 |
|
14594 |
|
14595 |
|
14596 |
|
14597 |
|
14598 |
|
14599 |
|
14600 |
|
14601 |
|
14602 |
|
14603 |
|
14604 |
|
14605 |
|
14606 |
|
14607 |
|
14608 |
|
14609 |
|
14610 |
|
14611 |
|
14612 | var intersectionBy = baseRest(function(arrays) {
|
14613 | var iteratee = last(arrays),
|
14614 | mapped = arrayMap(arrays, castArrayLikeObject);
|
14615 |
|
14616 | if (iteratee === last(mapped)) {
|
14617 | iteratee = undefined;
|
14618 | } else {
|
14619 | mapped.pop();
|
14620 | }
|
14621 | return (mapped.length && mapped[0] === arrays[0])
|
14622 | ? baseIntersection(mapped, getIteratee(iteratee, 2))
|
14623 | : [];
|
14624 | });
|
14625 |
|
14626 | |
14627 |
|
14628 |
|
14629 |
|
14630 |
|
14631 |
|
14632 |
|
14633 |
|
14634 |
|
14635 |
|
14636 |
|
14637 |
|
14638 |
|
14639 |
|
14640 |
|
14641 |
|
14642 |
|
14643 |
|
14644 |
|
14645 |
|
14646 |
|
14647 | var intersectionWith = baseRest(function(arrays) {
|
14648 | var comparator = last(arrays),
|
14649 | mapped = arrayMap(arrays, castArrayLikeObject);
|
14650 |
|
14651 | comparator = typeof comparator == 'function' ? comparator : undefined;
|
14652 | if (comparator) {
|
14653 | mapped.pop();
|
14654 | }
|
14655 | return (mapped.length && mapped[0] === arrays[0])
|
14656 | ? baseIntersection(mapped, undefined, comparator)
|
14657 | : [];
|
14658 | });
|
14659 |
|
14660 | |
14661 |
|
14662 |
|
14663 |
|
14664 |
|
14665 |
|
14666 |
|
14667 |
|
14668 |
|
14669 |
|
14670 |
|
14671 |
|
14672 |
|
14673 |
|
14674 |
|
14675 | function join(array, separator) {
|
14676 | return array == null ? '' : nativeJoin.call(array, separator);
|
14677 | }
|
14678 |
|
14679 | |
14680 |
|
14681 |
|
14682 |
|
14683 |
|
14684 |
|
14685 |
|
14686 |
|
14687 |
|
14688 |
|
14689 |
|
14690 |
|
14691 |
|
14692 |
|
14693 | function last(array) {
|
14694 | var length = array == null ? 0 : array.length;
|
14695 | return length ? array[length - 1] : undefined;
|
14696 | }
|
14697 |
|
14698 | |
14699 |
|
14700 |
|
14701 |
|
14702 |
|
14703 |
|
14704 |
|
14705 |
|
14706 |
|
14707 |
|
14708 |
|
14709 |
|
14710 |
|
14711 |
|
14712 |
|
14713 |
|
14714 |
|
14715 |
|
14716 |
|
14717 |
|
14718 |
|
14719 | function lastIndexOf(array, value, fromIndex) {
|
14720 | var length = array == null ? 0 : array.length;
|
14721 | if (!length) {
|
14722 | return -1;
|
14723 | }
|
14724 | var index = length;
|
14725 | if (fromIndex !== undefined) {
|
14726 | index = toInteger(fromIndex);
|
14727 | index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
|
14728 | }
|
14729 | return value === value
|
14730 | ? strictLastIndexOf(array, value, index)
|
14731 | : baseFindIndex(array, baseIsNaN, index, true);
|
14732 | }
|
14733 |
|
14734 | |
14735 |
|
14736 |
|
14737 |
|
14738 |
|
14739 |
|
14740 |
|
14741 |
|
14742 |
|
14743 |
|
14744 |
|
14745 |
|
14746 |
|
14747 |
|
14748 |
|
14749 |
|
14750 |
|
14751 |
|
14752 |
|
14753 |
|
14754 |
|
14755 | function nth(array, n) {
|
14756 | return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
|
14757 | }
|
14758 |
|
14759 | |
14760 |
|
14761 |
|
14762 |
|
14763 |
|
14764 |
|
14765 |
|
14766 |
|
14767 |
|
14768 |
|
14769 |
|
14770 |
|
14771 |
|
14772 |
|
14773 |
|
14774 |
|
14775 |
|
14776 |
|
14777 |
|
14778 |
|
14779 |
|
14780 |
|
14781 |
|
14782 | var pull = baseRest(pullAll);
|
14783 |
|
14784 | |
14785 |
|
14786 |
|
14787 |
|
14788 |
|
14789 |
|
14790 |
|
14791 |
|
14792 |
|
14793 |
|
14794 |
|
14795 |
|
14796 |
|
14797 |
|
14798 |
|
14799 |
|
14800 |
|
14801 |
|
14802 |
|
14803 |
|
14804 | function pullAll(array, values) {
|
14805 | return (array && array.length && values && values.length)
|
14806 | ? basePullAll(array, values)
|
14807 | : array;
|
14808 | }
|
14809 |
|
14810 | |
14811 |
|
14812 |
|
14813 |
|
14814 |
|
14815 |
|
14816 |
|
14817 |
|
14818 |
|
14819 |
|
14820 |
|
14821 |
|
14822 |
|
14823 |
|
14824 |
|
14825 |
|
14826 |
|
14827 |
|
14828 |
|
14829 |
|
14830 |
|
14831 |
|
14832 |
|
14833 | function pullAllBy(array, values, iteratee) {
|
14834 | return (array && array.length && values && values.length)
|
14835 | ? basePullAll(array, values, getIteratee(iteratee, 2))
|
14836 | : array;
|
14837 | }
|
14838 |
|
14839 | |
14840 |
|
14841 |
|
14842 |
|
14843 |
|
14844 |
|
14845 |
|
14846 |
|
14847 |
|
14848 |
|
14849 |
|
14850 |
|
14851 |
|
14852 |
|
14853 |
|
14854 |
|
14855 |
|
14856 |
|
14857 |
|
14858 |
|
14859 |
|
14860 |
|
14861 |
|
14862 | function pullAllWith(array, values, comparator) {
|
14863 | return (array && array.length && values && values.length)
|
14864 | ? basePullAll(array, values, undefined, comparator)
|
14865 | : array;
|
14866 | }
|
14867 |
|
14868 | |
14869 |
|
14870 |
|
14871 |
|
14872 |
|
14873 |
|
14874 |
|
14875 |
|
14876 |
|
14877 |
|
14878 |
|
14879 |
|
14880 |
|
14881 |
|
14882 |
|
14883 |
|
14884 |
|
14885 |
|
14886 |
|
14887 |
|
14888 |
|
14889 |
|
14890 |
|
14891 |
|
14892 | var pullAt = flatRest(function(array, indexes) {
|
14893 | var length = array == null ? 0 : array.length,
|
14894 | result = baseAt(array, indexes);
|
14895 |
|
14896 | basePullAt(array, arrayMap(indexes, function(index) {
|
14897 | return isIndex(index, length) ? +index : index;
|
14898 | }).sort(compareAscending));
|
14899 |
|
14900 | return result;
|
14901 | });
|
14902 |
|
14903 | |
14904 |
|
14905 |
|
14906 |
|
14907 |
|
14908 |
|
14909 |
|
14910 |
|
14911 |
|
14912 |
|
14913 |
|
14914 |
|
14915 |
|
14916 |
|
14917 |
|
14918 |
|
14919 |
|
14920 |
|
14921 |
|
14922 |
|
14923 |
|
14924 |
|
14925 |
|
14926 |
|
14927 |
|
14928 |
|
14929 |
|
14930 |
|
14931 | function remove(array, predicate) {
|
14932 | var result = [];
|
14933 | if (!(array && array.length)) {
|
14934 | return result;
|
14935 | }
|
14936 | var index = -1,
|
14937 | indexes = [],
|
14938 | length = array.length;
|
14939 |
|
14940 | predicate = getIteratee(predicate, 3);
|
14941 | while (++index < length) {
|
14942 | var value = array[index];
|
14943 | if (predicate(value, index, array)) {
|
14944 | result.push(value);
|
14945 | indexes.push(index);
|
14946 | }
|
14947 | }
|
14948 | basePullAt(array, indexes);
|
14949 | return result;
|
14950 | }
|
14951 |
|
14952 | |
14953 |
|
14954 |
|
14955 |
|
14956 |
|
14957 |
|
14958 |
|
14959 |
|
14960 |
|
14961 |
|
14962 |
|
14963 |
|
14964 |
|
14965 |
|
14966 |
|
14967 |
|
14968 |
|
14969 |
|
14970 |
|
14971 |
|
14972 |
|
14973 |
|
14974 |
|
14975 | function reverse(array) {
|
14976 | return array == null ? array : nativeReverse.call(array);
|
14977 | }
|
14978 |
|
14979 | |
14980 |
|
14981 |
|
14982 |
|
14983 |
|
14984 |
|
14985 |
|
14986 |
|
14987 |
|
14988 |
|
14989 |
|
14990 |
|
14991 |
|
14992 |
|
14993 |
|
14994 |
|
14995 | function slice(array, start, end) {
|
14996 | var length = array == null ? 0 : array.length;
|
14997 | if (!length) {
|
14998 | return [];
|
14999 | }
|
15000 | if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
|
15001 | start = 0;
|
15002 | end = length;
|
15003 | }
|
15004 | else {
|
15005 | start = start == null ? 0 : toInteger(start);
|
15006 | end = end === undefined ? length : toInteger(end);
|
15007 | }
|
15008 | return baseSlice(array, start, end);
|
15009 | }
|
15010 |
|
15011 | |
15012 |
|
15013 |
|
15014 |
|
15015 |
|
15016 |
|
15017 |
|
15018 |
|
15019 |
|
15020 |
|
15021 |
|
15022 |
|
15023 |
|
15024 |
|
15025 |
|
15026 |
|
15027 |
|
15028 | function sortedIndex(array, value) {
|
15029 | return baseSortedIndex(array, value);
|
15030 | }
|
15031 |
|
15032 | |
15033 |
|
15034 |
|
15035 |
|
15036 |
|
15037 |
|
15038 |
|
15039 |
|
15040 |
|
15041 |
|
15042 |
|
15043 |
|
15044 |
|
15045 |
|
15046 |
|
15047 |
|
15048 |
|
15049 |
|
15050 |
|
15051 |
|
15052 |
|
15053 |
|
15054 |
|
15055 |
|
15056 |
|
15057 | function sortedIndexBy(array, value, iteratee) {
|
15058 | return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
|
15059 | }
|
15060 |
|
15061 | |
15062 |
|
15063 |
|
15064 |
|
15065 |
|
15066 |
|
15067 |
|
15068 |
|
15069 |
|
15070 |
|
15071 |
|
15072 |
|
15073 |
|
15074 |
|
15075 |
|
15076 |
|
15077 | function sortedIndexOf(array, value) {
|
15078 | var length = array == null ? 0 : array.length;
|
15079 | if (length) {
|
15080 | var index = baseSortedIndex(array, value);
|
15081 | if (index < length && eq(array[index], value)) {
|
15082 | return index;
|
15083 | }
|
15084 | }
|
15085 | return -1;
|
15086 | }
|
15087 |
|
15088 | |
15089 |
|
15090 |
|
15091 |
|
15092 |
|
15093 |
|
15094 |
|
15095 |
|
15096 |
|
15097 |
|
15098 |
|
15099 |
|
15100 |
|
15101 |
|
15102 |
|
15103 |
|
15104 |
|
15105 |
|
15106 | function sortedLastIndex(array, value) {
|
15107 | return baseSortedIndex(array, value, true);
|
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 | function sortedLastIndexBy(array, value, iteratee) {
|
15136 | return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
|
15137 | }
|
15138 |
|
15139 | |
15140 |
|
15141 |
|
15142 |
|
15143 |
|
15144 |
|
15145 |
|
15146 |
|
15147 |
|
15148 |
|
15149 |
|
15150 |
|
15151 |
|
15152 |
|
15153 |
|
15154 |
|
15155 | function sortedLastIndexOf(array, value) {
|
15156 | var length = array == null ? 0 : array.length;
|
15157 | if (length) {
|
15158 | var index = baseSortedIndex(array, value, true) - 1;
|
15159 | if (eq(array[index], value)) {
|
15160 | return index;
|
15161 | }
|
15162 | }
|
15163 | return -1;
|
15164 | }
|
15165 |
|
15166 | |
15167 |
|
15168 |
|
15169 |
|
15170 |
|
15171 |
|
15172 |
|
15173 |
|
15174 |
|
15175 |
|
15176 |
|
15177 |
|
15178 |
|
15179 |
|
15180 |
|
15181 | function sortedUniq(array) {
|
15182 | return (array && array.length)
|
15183 | ? baseSortedUniq(array)
|
15184 | : [];
|
15185 | }
|
15186 |
|
15187 | |
15188 |
|
15189 |
|
15190 |
|
15191 |
|
15192 |
|
15193 |
|
15194 |
|
15195 |
|
15196 |
|
15197 |
|
15198 |
|
15199 |
|
15200 |
|
15201 |
|
15202 |
|
15203 | function sortedUniqBy(array, iteratee) {
|
15204 | return (array && array.length)
|
15205 | ? baseSortedUniq(array, getIteratee(iteratee, 2))
|
15206 | : [];
|
15207 | }
|
15208 |
|
15209 | |
15210 |
|
15211 |
|
15212 |
|
15213 |
|
15214 |
|
15215 |
|
15216 |
|
15217 |
|
15218 |
|
15219 |
|
15220 |
|
15221 |
|
15222 |
|
15223 | function tail(array) {
|
15224 | var length = array == null ? 0 : array.length;
|
15225 | return length ? baseSlice(array, 1, length) : [];
|
15226 | }
|
15227 |
|
15228 | |
15229 |
|
15230 |
|
15231 |
|
15232 |
|
15233 |
|
15234 |
|
15235 |
|
15236 |
|
15237 |
|
15238 |
|
15239 |
|
15240 |
|
15241 |
|
15242 |
|
15243 |
|
15244 |
|
15245 |
|
15246 |
|
15247 |
|
15248 |
|
15249 |
|
15250 |
|
15251 |
|
15252 |
|
15253 | function take(array, n, guard) {
|
15254 | if (!(array && array.length)) {
|
15255 | return [];
|
15256 | }
|
15257 | n = (guard || n === undefined) ? 1 : toInteger(n);
|
15258 | return baseSlice(array, 0, n < 0 ? 0 : n);
|
15259 | }
|
15260 |
|
15261 | |
15262 |
|
15263 |
|
15264 |
|
15265 |
|
15266 |
|
15267 |
|
15268 |
|
15269 |
|
15270 |
|
15271 |
|
15272 |
|
15273 |
|
15274 |
|
15275 |
|
15276 |
|
15277 |
|
15278 |
|
15279 |
|
15280 |
|
15281 |
|
15282 |
|
15283 |
|
15284 |
|
15285 |
|
15286 | function takeRight(array, n, guard) {
|
15287 | var length = array == null ? 0 : array.length;
|
15288 | if (!length) {
|
15289 | return [];
|
15290 | }
|
15291 | n = (guard || n === undefined) ? 1 : toInteger(n);
|
15292 | n = length - n;
|
15293 | return baseSlice(array, n < 0 ? 0 : n, length);
|
15294 | }
|
15295 |
|
15296 | |
15297 |
|
15298 |
|
15299 |
|
15300 |
|
15301 |
|
15302 |
|
15303 |
|
15304 |
|
15305 |
|
15306 |
|
15307 |
|
15308 |
|
15309 |
|
15310 |
|
15311 |
|
15312 |
|
15313 |
|
15314 |
|
15315 |
|
15316 |
|
15317 |
|
15318 |
|
15319 |
|
15320 |
|
15321 |
|
15322 |
|
15323 |
|
15324 |
|
15325 |
|
15326 |
|
15327 |
|
15328 |
|
15329 |
|
15330 |
|
15331 | function takeRightWhile(array, predicate) {
|
15332 | return (array && array.length)
|
15333 | ? baseWhile(array, getIteratee(predicate, 3), false, true)
|
15334 | : [];
|
15335 | }
|
15336 |
|
15337 | |
15338 |
|
15339 |
|
15340 |
|
15341 |
|
15342 |
|
15343 |
|
15344 |
|
15345 |
|
15346 |
|
15347 |
|
15348 |
|
15349 |
|
15350 |
|
15351 |
|
15352 |
|
15353 |
|
15354 |
|
15355 |
|
15356 |
|
15357 |
|
15358 |
|
15359 |
|
15360 |
|
15361 |
|
15362 |
|
15363 |
|
15364 |
|
15365 |
|
15366 |
|
15367 |
|
15368 |
|
15369 |
|
15370 |
|
15371 |
|
15372 | function takeWhile(array, predicate) {
|
15373 | return (array && array.length)
|
15374 | ? baseWhile(array, getIteratee(predicate, 3))
|
15375 | : [];
|
15376 | }
|
15377 |
|
15378 | |
15379 |
|
15380 |
|
15381 |
|
15382 |
|
15383 |
|
15384 |
|
15385 |
|
15386 |
|
15387 |
|
15388 |
|
15389 |
|
15390 |
|
15391 |
|
15392 |
|
15393 |
|
15394 | var union = baseRest(function(arrays) {
|
15395 | return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
|
15396 | });
|
15397 |
|
15398 | |
15399 |
|
15400 |
|
15401 |
|
15402 |
|
15403 |
|
15404 |
|
15405 |
|
15406 |
|
15407 |
|
15408 |
|
15409 |
|
15410 |
|
15411 |
|
15412 |
|
15413 |
|
15414 |
|
15415 |
|
15416 |
|
15417 |
|
15418 |
|
15419 |
|
15420 |
|
15421 | var unionBy = baseRest(function(arrays) {
|
15422 | var iteratee = last(arrays);
|
15423 | if (isArrayLikeObject(iteratee)) {
|
15424 | iteratee = undefined;
|
15425 | }
|
15426 | return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
|
15427 | });
|
15428 |
|
15429 | |
15430 |
|
15431 |
|
15432 |
|
15433 |
|
15434 |
|
15435 |
|
15436 |
|
15437 |
|
15438 |
|
15439 |
|
15440 |
|
15441 |
|
15442 |
|
15443 |
|
15444 |
|
15445 |
|
15446 |
|
15447 |
|
15448 |
|
15449 |
|
15450 | var unionWith = baseRest(function(arrays) {
|
15451 | var comparator = last(arrays);
|
15452 | comparator = typeof comparator == 'function' ? comparator : undefined;
|
15453 | return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
|
15454 | });
|
15455 |
|
15456 | |
15457 |
|
15458 |
|
15459 |
|
15460 |
|
15461 |
|
15462 |
|
15463 |
|
15464 |
|
15465 |
|
15466 |
|
15467 |
|
15468 |
|
15469 |
|
15470 |
|
15471 |
|
15472 |
|
15473 |
|
15474 | function uniq(array) {
|
15475 | return (array && array.length) ? baseUniq(array) : [];
|
15476 | }
|
15477 |
|
15478 | |
15479 |
|
15480 |
|
15481 |
|
15482 |
|
15483 |
|
15484 |
|
15485 |
|
15486 |
|
15487 |
|
15488 |
|
15489 |
|
15490 |
|
15491 |
|
15492 |
|
15493 |
|
15494 |
|
15495 |
|
15496 |
|
15497 |
|
15498 |
|
15499 |
|
15500 |
|
15501 | function uniqBy(array, iteratee) {
|
15502 | return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
|
15503 | }
|
15504 |
|
15505 | |
15506 |
|
15507 |
|
15508 |
|
15509 |
|
15510 |
|
15511 |
|
15512 |
|
15513 |
|
15514 |
|
15515 |
|
15516 |
|
15517 |
|
15518 |
|
15519 |
|
15520 |
|
15521 |
|
15522 |
|
15523 |
|
15524 |
|
15525 | function uniqWith(array, comparator) {
|
15526 | comparator = typeof comparator == 'function' ? comparator : undefined;
|
15527 | return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
|
15528 | }
|
15529 |
|
15530 | |
15531 |
|
15532 |
|
15533 |
|
15534 |
|
15535 |
|
15536 |
|
15537 |
|
15538 |
|
15539 |
|
15540 |
|
15541 |
|
15542 |
|
15543 |
|
15544 |
|
15545 |
|
15546 |
|
15547 |
|
15548 |
|
15549 | function unzip(array) {
|
15550 | if (!(array && array.length)) {
|
15551 | return [];
|
15552 | }
|
15553 | var length = 0;
|
15554 | array = arrayFilter(array, function(group) {
|
15555 | if (isArrayLikeObject(group)) {
|
15556 | length = nativeMax(group.length, length);
|
15557 | return true;
|
15558 | }
|
15559 | });
|
15560 | return baseTimes(length, function(index) {
|
15561 | return arrayMap(array, baseProperty(index));
|
15562 | });
|
15563 | }
|
15564 |
|
15565 | |
15566 |
|
15567 |
|
15568 |
|
15569 |
|
15570 |
|
15571 |
|
15572 |
|
15573 |
|
15574 |
|
15575 |
|
15576 |
|
15577 |
|
15578 |
|
15579 |
|
15580 |
|
15581 |
|
15582 |
|
15583 |
|
15584 |
|
15585 |
|
15586 | function unzipWith(array, iteratee) {
|
15587 | if (!(array && array.length)) {
|
15588 | return [];
|
15589 | }
|
15590 | var result = unzip(array);
|
15591 | if (iteratee == null) {
|
15592 | return result;
|
15593 | }
|
15594 | return arrayMap(result, function(group) {
|
15595 | return apply(iteratee, undefined, group);
|
15596 | });
|
15597 | }
|
15598 |
|
15599 | |
15600 |
|
15601 |
|
15602 |
|
15603 |
|
15604 |
|
15605 |
|
15606 |
|
15607 |
|
15608 |
|
15609 |
|
15610 |
|
15611 |
|
15612 |
|
15613 |
|
15614 |
|
15615 |
|
15616 |
|
15617 |
|
15618 |
|
15619 | var without = baseRest(function(array, values) {
|
15620 | return isArrayLikeObject(array)
|
15621 | ? baseDifference(array, values)
|
15622 | : [];
|
15623 | });
|
15624 |
|
15625 | |
15626 |
|
15627 |
|
15628 |
|
15629 |
|
15630 |
|
15631 |
|
15632 |
|
15633 |
|
15634 |
|
15635 |
|
15636 |
|
15637 |
|
15638 |
|
15639 |
|
15640 |
|
15641 |
|
15642 |
|
15643 | var xor = baseRest(function(arrays) {
|
15644 | return baseXor(arrayFilter(arrays, isArrayLikeObject));
|
15645 | });
|
15646 |
|
15647 | |
15648 |
|
15649 |
|
15650 |
|
15651 |
|
15652 |
|
15653 |
|
15654 |
|
15655 |
|
15656 |
|
15657 |
|
15658 |
|
15659 |
|
15660 |
|
15661 |
|
15662 |
|
15663 |
|
15664 |
|
15665 |
|
15666 |
|
15667 |
|
15668 |
|
15669 |
|
15670 | var xorBy = baseRest(function(arrays) {
|
15671 | var iteratee = last(arrays);
|
15672 | if (isArrayLikeObject(iteratee)) {
|
15673 | iteratee = undefined;
|
15674 | }
|
15675 | return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
|
15676 | });
|
15677 |
|
15678 | |
15679 |
|
15680 |
|
15681 |
|
15682 |
|
15683 |
|
15684 |
|
15685 |
|
15686 |
|
15687 |
|
15688 |
|
15689 |
|
15690 |
|
15691 |
|
15692 |
|
15693 |
|
15694 |
|
15695 |
|
15696 |
|
15697 |
|
15698 |
|
15699 | var xorWith = baseRest(function(arrays) {
|
15700 | var comparator = last(arrays);
|
15701 | comparator = typeof comparator == 'function' ? comparator : undefined;
|
15702 | return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
|
15703 | });
|
15704 |
|
15705 | |
15706 |
|
15707 |
|
15708 |
|
15709 |
|
15710 |
|
15711 |
|
15712 |
|
15713 |
|
15714 |
|
15715 |
|
15716 |
|
15717 |
|
15718 |
|
15719 |
|
15720 |
|
15721 | var zip = baseRest(unzip);
|
15722 |
|
15723 | |
15724 |
|
15725 |
|
15726 |
|
15727 |
|
15728 |
|
15729 |
|
15730 |
|
15731 |
|
15732 |
|
15733 |
|
15734 |
|
15735 |
|
15736 |
|
15737 |
|
15738 |
|
15739 | function zipObject(props, values) {
|
15740 | return baseZipObject(props || [], values || [], assignValue);
|
15741 | }
|
15742 |
|
15743 | |
15744 |
|
15745 |
|
15746 |
|
15747 |
|
15748 |
|
15749 |
|
15750 |
|
15751 |
|
15752 |
|
15753 |
|
15754 |
|
15755 |
|
15756 |
|
15757 |
|
15758 | function zipObjectDeep(props, values) {
|
15759 | return baseZipObject(props || [], values || [], baseSet);
|
15760 | }
|
15761 |
|
15762 | |
15763 |
|
15764 |
|
15765 |
|
15766 |
|
15767 |
|
15768 |
|
15769 |
|
15770 |
|
15771 |
|
15772 |
|
15773 |
|
15774 |
|
15775 |
|
15776 |
|
15777 |
|
15778 |
|
15779 |
|
15780 |
|
15781 |
|
15782 | var zipWith = baseRest(function(arrays) {
|
15783 | var length = arrays.length,
|
15784 | iteratee = length > 1 ? arrays[length - 1] : undefined;
|
15785 |
|
15786 | iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
|
15787 | return unzipWith(arrays, iteratee);
|
15788 | });
|
15789 |
|
15790 |
|
15791 |
|
15792 | |
15793 |
|
15794 |
|
15795 |
|
15796 |
|
15797 |
|
15798 |
|
15799 |
|
15800 |
|
15801 |
|
15802 |
|
15803 |
|
15804 |
|
15805 |
|
15806 |
|
15807 |
|
15808 |
|
15809 |
|
15810 |
|
15811 |
|
15812 |
|
15813 |
|
15814 |
|
15815 |
|
15816 |
|
15817 |
|
15818 |
|
15819 |
|
15820 |
|
15821 | function chain(value) {
|
15822 | var result = lodash(value);
|
15823 | result.__chain__ = true;
|
15824 | return result;
|
15825 | }
|
15826 |
|
15827 | |
15828 |
|
15829 |
|
15830 |
|
15831 |
|
15832 |
|
15833 |
|
15834 |
|
15835 |
|
15836 |
|
15837 |
|
15838 |
|
15839 |
|
15840 |
|
15841 |
|
15842 |
|
15843 |
|
15844 |
|
15845 |
|
15846 |
|
15847 |
|
15848 |
|
15849 |
|
15850 | function tap(value, interceptor) {
|
15851 | interceptor(value);
|
15852 | return value;
|
15853 | }
|
15854 |
|
15855 | |
15856 |
|
15857 |
|
15858 |
|
15859 |
|
15860 |
|
15861 |
|
15862 |
|
15863 |
|
15864 |
|
15865 |
|
15866 |
|
15867 |
|
15868 |
|
15869 |
|
15870 |
|
15871 |
|
15872 |
|
15873 |
|
15874 |
|
15875 |
|
15876 |
|
15877 |
|
15878 | function thru(value, interceptor) {
|
15879 | return interceptor(value);
|
15880 | }
|
15881 |
|
15882 | |
15883 |
|
15884 |
|
15885 |
|
15886 |
|
15887 |
|
15888 |
|
15889 |
|
15890 |
|
15891 |
|
15892 |
|
15893 |
|
15894 |
|
15895 |
|
15896 |
|
15897 |
|
15898 | var wrapperAt = flatRest(function(paths) {
|
15899 | var length = paths.length,
|
15900 | start = length ? paths[0] : 0,
|
15901 | value = this.__wrapped__,
|
15902 | interceptor = function(object) { return baseAt(object, paths); };
|
15903 |
|
15904 | if (length > 1 || this.__actions__.length ||
|
15905 | !(value instanceof LazyWrapper) || !isIndex(start)) {
|
15906 | return this.thru(interceptor);
|
15907 | }
|
15908 | value = value.slice(start, +start + (length ? 1 : 0));
|
15909 | value.__actions__.push({
|
15910 | 'func': thru,
|
15911 | 'args': [interceptor],
|
15912 | 'thisArg': undefined
|
15913 | });
|
15914 | return new LodashWrapper(value, this.__chain__).thru(function(array) {
|
15915 | if (length && !array.length) {
|
15916 | array.push(undefined);
|
15917 | }
|
15918 | return array;
|
15919 | });
|
15920 | });
|
15921 |
|
15922 | |
15923 |
|
15924 |
|
15925 |
|
15926 |
|
15927 |
|
15928 |
|
15929 |
|
15930 |
|
15931 |
|
15932 |
|
15933 |
|
15934 |
|
15935 |
|
15936 |
|
15937 |
|
15938 |
|
15939 |
|
15940 |
|
15941 |
|
15942 |
|
15943 |
|
15944 |
|
15945 |
|
15946 |
|
15947 |
|
15948 |
|
15949 | function wrapperChain() {
|
15950 | return chain(this);
|
15951 | }
|
15952 |
|
15953 | |
15954 |
|
15955 |
|
15956 |
|
15957 |
|
15958 |
|
15959 |
|
15960 |
|
15961 |
|
15962 |
|
15963 |
|
15964 |
|
15965 |
|
15966 |
|
15967 |
|
15968 |
|
15969 |
|
15970 |
|
15971 |
|
15972 |
|
15973 |
|
15974 |
|
15975 |
|
15976 |
|
15977 |
|
15978 |
|
15979 | function wrapperCommit() {
|
15980 | return new LodashWrapper(this.value(), this.__chain__);
|
15981 | }
|
15982 |
|
15983 | |
15984 |
|
15985 |
|
15986 |
|
15987 |
|
15988 |
|
15989 |
|
15990 |
|
15991 |
|
15992 |
|
15993 |
|
15994 |
|
15995 |
|
15996 |
|
15997 |
|
15998 |
|
15999 |
|
16000 |
|
16001 |
|
16002 |
|
16003 |
|
16004 |
|
16005 | function wrapperNext() {
|
16006 | if (this.__values__ === undefined) {
|
16007 | this.__values__ = toArray(this.value());
|
16008 | }
|
16009 | var done = this.__index__ >= this.__values__.length,
|
16010 | value = done ? undefined : this.__values__[this.__index__++];
|
16011 |
|
16012 | return { 'done': done, 'value': value };
|
16013 | }
|
16014 |
|
16015 | |
16016 |
|
16017 |
|
16018 |
|
16019 |
|
16020 |
|
16021 |
|
16022 |
|
16023 |
|
16024 |
|
16025 |
|
16026 |
|
16027 |
|
16028 |
|
16029 |
|
16030 |
|
16031 |
|
16032 |
|
16033 | function wrapperToIterator() {
|
16034 | return this;
|
16035 | }
|
16036 |
|
16037 | |
16038 |
|
16039 |
|
16040 |
|
16041 |
|
16042 |
|
16043 |
|
16044 |
|
16045 |
|
16046 |
|
16047 |
|
16048 |
|
16049 |
|
16050 |
|
16051 |
|
16052 |
|
16053 |
|
16054 |
|
16055 |
|
16056 |
|
16057 |
|
16058 |
|
16059 |
|
16060 |
|
16061 | function wrapperPlant(value) {
|
16062 | var result,
|
16063 | parent = this;
|
16064 |
|
16065 | while (parent instanceof baseLodash) {
|
16066 | var clone = wrapperClone(parent);
|
16067 | clone.__index__ = 0;
|
16068 | clone.__values__ = undefined;
|
16069 | if (result) {
|
16070 | previous.__wrapped__ = clone;
|
16071 | } else {
|
16072 | result = clone;
|
16073 | }
|
16074 | var previous = clone;
|
16075 | parent = parent.__wrapped__;
|
16076 | }
|
16077 | previous.__wrapped__ = value;
|
16078 | return result;
|
16079 | }
|
16080 |
|
16081 | |
16082 |
|
16083 |
|
16084 |
|
16085 |
|
16086 |
|
16087 |
|
16088 |
|
16089 |
|
16090 |
|
16091 |
|
16092 |
|
16093 |
|
16094 |
|
16095 |
|
16096 |
|
16097 |
|
16098 |
|
16099 |
|
16100 |
|
16101 | function wrapperReverse() {
|
16102 | var value = this.__wrapped__;
|
16103 | if (value instanceof LazyWrapper) {
|
16104 | var wrapped = value;
|
16105 | if (this.__actions__.length) {
|
16106 | wrapped = new LazyWrapper(this);
|
16107 | }
|
16108 | wrapped = wrapped.reverse();
|
16109 | wrapped.__actions__.push({
|
16110 | 'func': thru,
|
16111 | 'args': [reverse],
|
16112 | 'thisArg': undefined
|
16113 | });
|
16114 | return new LodashWrapper(wrapped, this.__chain__);
|
16115 | }
|
16116 | return this.thru(reverse);
|
16117 | }
|
16118 |
|
16119 | |
16120 |
|
16121 |
|
16122 |
|
16123 |
|
16124 |
|
16125 |
|
16126 |
|
16127 |
|
16128 |
|
16129 |
|
16130 |
|
16131 |
|
16132 |
|
16133 | function wrapperValue() {
|
16134 | return baseWrapperValue(this.__wrapped__, this.__actions__);
|
16135 | }
|
16136 |
|
16137 |
|
16138 |
|
16139 | |
16140 |
|
16141 |
|
16142 |
|
16143 |
|
16144 |
|
16145 |
|
16146 |
|
16147 |
|
16148 |
|
16149 |
|
16150 |
|
16151 |
|
16152 |
|
16153 |
|
16154 |
|
16155 |
|
16156 |
|
16157 |
|
16158 |
|
16159 |
|
16160 |
|
16161 | var countBy = createAggregator(function(result, value, key) {
|
16162 | if (hasOwnProperty.call(result, key)) {
|
16163 | ++result[key];
|
16164 | } else {
|
16165 | baseAssignValue(result, key, 1);
|
16166 | }
|
16167 | });
|
16168 |
|
16169 | |
16170 |
|
16171 |
|
16172 |
|
16173 |
|
16174 |
|
16175 |
|
16176 |
|
16177 |
|
16178 |
|
16179 |
|
16180 |
|
16181 |
|
16182 |
|
16183 |
|
16184 |
|
16185 |
|
16186 |
|
16187 |
|
16188 |
|
16189 |
|
16190 |
|
16191 |
|
16192 |
|
16193 |
|
16194 |
|
16195 |
|
16196 |
|
16197 |
|
16198 |
|
16199 |
|
16200 |
|
16201 |
|
16202 |
|
16203 |
|
16204 |
|
16205 |
|
16206 |
|
16207 |
|
16208 |
|
16209 |
|
16210 | function every(collection, predicate, guard) {
|
16211 | var func = isArray(collection) ? arrayEvery : baseEvery;
|
16212 | if (guard && isIterateeCall(collection, predicate, guard)) {
|
16213 | predicate = undefined;
|
16214 | }
|
16215 | return func(collection, getIteratee(predicate, 3));
|
16216 | }
|
16217 |
|
16218 | |
16219 |
|
16220 |
|
16221 |
|
16222 |
|
16223 |
|
16224 |
|
16225 |
|
16226 |
|
16227 |
|
16228 |
|
16229 |
|
16230 |
|
16231 |
|
16232 |
|
16233 |
|
16234 |
|
16235 |
|
16236 |
|
16237 |
|
16238 |
|
16239 |
|
16240 |
|
16241 |
|
16242 |
|
16243 |
|
16244 |
|
16245 |
|
16246 |
|
16247 |
|
16248 |
|
16249 |
|
16250 |
|
16251 |
|
16252 |
|
16253 |
|
16254 |
|
16255 | function filter(collection, predicate) {
|
16256 | var func = isArray(collection) ? arrayFilter : baseFilter;
|
16257 | return func(collection, getIteratee(predicate, 3));
|
16258 | }
|
16259 |
|
16260 | |
16261 |
|
16262 |
|
16263 |
|
16264 |
|
16265 |
|
16266 |
|
16267 |
|
16268 |
|
16269 |
|
16270 |
|
16271 |
|
16272 |
|
16273 |
|
16274 |
|
16275 |
|
16276 |
|
16277 |
|
16278 |
|
16279 |
|
16280 |
|
16281 |
|
16282 |
|
16283 |
|
16284 |
|
16285 |
|
16286 |
|
16287 |
|
16288 |
|
16289 |
|
16290 |
|
16291 |
|
16292 |
|
16293 |
|
16294 |
|
16295 |
|
16296 | var find = createFind(findIndex);
|
16297 |
|
16298 | |
16299 |
|
16300 |
|
16301 |
|
16302 |
|
16303 |
|
16304 |
|
16305 |
|
16306 |
|
16307 |
|
16308 |
|
16309 |
|
16310 |
|
16311 |
|
16312 |
|
16313 |
|
16314 |
|
16315 |
|
16316 |
|
16317 | var findLast = createFind(findLastIndex);
|
16318 |
|
16319 | |
16320 |
|
16321 |
|
16322 |
|
16323 |
|
16324 |
|
16325 |
|
16326 |
|
16327 |
|
16328 |
|
16329 |
|
16330 |
|
16331 |
|
16332 |
|
16333 |
|
16334 |
|
16335 |
|
16336 |
|
16337 |
|
16338 |
|
16339 |
|
16340 | function flatMap(collection, iteratee) {
|
16341 | return baseFlatten(map(collection, iteratee), 1);
|
16342 | }
|
16343 |
|
16344 | |
16345 |
|
16346 |
|
16347 |
|
16348 |
|
16349 |
|
16350 |
|
16351 |
|
16352 |
|
16353 |
|
16354 |
|
16355 |
|
16356 |
|
16357 |
|
16358 |
|
16359 |
|
16360 |
|
16361 |
|
16362 |
|
16363 |
|
16364 | function flatMapDeep(collection, iteratee) {
|
16365 | return baseFlatten(map(collection, iteratee), INFINITY);
|
16366 | }
|
16367 |
|
16368 | |
16369 |
|
16370 |
|
16371 |
|
16372 |
|
16373 |
|
16374 |
|
16375 |
|
16376 |
|
16377 |
|
16378 |
|
16379 |
|
16380 |
|
16381 |
|
16382 |
|
16383 |
|
16384 |
|
16385 |
|
16386 |
|
16387 |
|
16388 |
|
16389 | function flatMapDepth(collection, iteratee, depth) {
|
16390 | depth = depth === undefined ? 1 : toInteger(depth);
|
16391 | return baseFlatten(map(collection, iteratee), depth);
|
16392 | }
|
16393 |
|
16394 | |
16395 |
|
16396 |
|
16397 |
|
16398 |
|
16399 |
|
16400 |
|
16401 |
|
16402 |
|
16403 |
|
16404 |
|
16405 |
|
16406 |
|
16407 |
|
16408 |
|
16409 |
|
16410 |
|
16411 |
|
16412 |
|
16413 |
|
16414 |
|
16415 |
|
16416 |
|
16417 |
|
16418 |
|
16419 |
|
16420 |
|
16421 |
|
16422 |
|
16423 |
|
16424 | function forEach(collection, iteratee) {
|
16425 | var func = isArray(collection) ? arrayEach : baseEach;
|
16426 | return func(collection, getIteratee(iteratee, 3));
|
16427 | }
|
16428 |
|
16429 | |
16430 |
|
16431 |
|
16432 |
|
16433 |
|
16434 |
|
16435 |
|
16436 |
|
16437 |
|
16438 |
|
16439 |
|
16440 |
|
16441 |
|
16442 |
|
16443 |
|
16444 |
|
16445 |
|
16446 |
|
16447 |
|
16448 |
|
16449 | function forEachRight(collection, iteratee) {
|
16450 | var func = isArray(collection) ? arrayEachRight : baseEachRight;
|
16451 | return func(collection, getIteratee(iteratee, 3));
|
16452 | }
|
16453 |
|
16454 | |
16455 |
|
16456 |
|
16457 |
|
16458 |
|
16459 |
|
16460 |
|
16461 |
|
16462 |
|
16463 |
|
16464 |
|
16465 |
|
16466 |
|
16467 |
|
16468 |
|
16469 |
|
16470 |
|
16471 |
|
16472 |
|
16473 |
|
16474 |
|
16475 |
|
16476 |
|
16477 | var groupBy = createAggregator(function(result, value, key) {
|
16478 | if (hasOwnProperty.call(result, key)) {
|
16479 | result[key].push(value);
|
16480 | } else {
|
16481 | baseAssignValue(result, key, [value]);
|
16482 | }
|
16483 | });
|
16484 |
|
16485 | |
16486 |
|
16487 |
|
16488 |
|
16489 |
|
16490 |
|
16491 |
|
16492 |
|
16493 |
|
16494 |
|
16495 |
|
16496 |
|
16497 |
|
16498 |
|
16499 |
|
16500 |
|
16501 |
|
16502 |
|
16503 |
|
16504 |
|
16505 |
|
16506 |
|
16507 |
|
16508 |
|
16509 |
|
16510 |
|
16511 |
|
16512 |
|
16513 |
|
16514 |
|
16515 | function includes(collection, value, fromIndex, guard) {
|
16516 | collection = isArrayLike(collection) ? collection : values(collection);
|
16517 | fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
|
16518 |
|
16519 | var length = collection.length;
|
16520 | if (fromIndex < 0) {
|
16521 | fromIndex = nativeMax(length + fromIndex, 0);
|
16522 | }
|
16523 | return isString(collection)
|
16524 | ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
|
16525 | : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
|
16526 | }
|
16527 |
|
16528 | |
16529 |
|
16530 |
|
16531 |
|
16532 |
|
16533 |
|
16534 |
|
16535 |
|
16536 |
|
16537 |
|
16538 |
|
16539 |
|
16540 |
|
16541 |
|
16542 |
|
16543 |
|
16544 |
|
16545 |
|
16546 |
|
16547 |
|
16548 |
|
16549 |
|
16550 |
|
16551 | var invokeMap = baseRest(function(collection, path, args) {
|
16552 | var index = -1,
|
16553 | isFunc = typeof path == 'function',
|
16554 | result = isArrayLike(collection) ? Array(collection.length) : [];
|
16555 |
|
16556 | baseEach(collection, function(value) {
|
16557 | result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
|
16558 | });
|
16559 | return result;
|
16560 | });
|
16561 |
|
16562 | |
16563 |
|
16564 |
|
16565 |
|
16566 |
|
16567 |
|
16568 |
|
16569 |
|
16570 |
|
16571 |
|
16572 |
|
16573 |
|
16574 |
|
16575 |
|
16576 |
|
16577 |
|
16578 |
|
16579 |
|
16580 |
|
16581 |
|
16582 |
|
16583 |
|
16584 |
|
16585 |
|
16586 |
|
16587 |
|
16588 |
|
16589 |
|
16590 | var keyBy = createAggregator(function(result, value, key) {
|
16591 | baseAssignValue(result, key, value);
|
16592 | });
|
16593 |
|
16594 | |
16595 |
|
16596 |
|
16597 |
|
16598 |
|
16599 |
|
16600 |
|
16601 |
|
16602 |
|
16603 |
|
16604 |
|
16605 |
|
16606 |
|
16607 |
|
16608 |
|
16609 |
|
16610 |
|
16611 |
|
16612 |
|
16613 |
|
16614 |
|
16615 |
|
16616 |
|
16617 |
|
16618 |
|
16619 |
|
16620 |
|
16621 |
|
16622 |
|
16623 |
|
16624 |
|
16625 |
|
16626 |
|
16627 |
|
16628 |
|
16629 |
|
16630 |
|
16631 |
|
16632 |
|
16633 |
|
16634 |
|
16635 |
|
16636 | function map(collection, iteratee) {
|
16637 | var func = isArray(collection) ? arrayMap : baseMap;
|
16638 | return func(collection, getIteratee(iteratee, 3));
|
16639 | }
|
16640 |
|
16641 | |
16642 |
|
16643 |
|
16644 |
|
16645 |
|
16646 |
|
16647 |
|
16648 |
|
16649 |
|
16650 |
|
16651 |
|
16652 |
|
16653 |
|
16654 |
|
16655 |
|
16656 |
|
16657 |
|
16658 |
|
16659 |
|
16660 |
|
16661 |
|
16662 |
|
16663 |
|
16664 |
|
16665 |
|
16666 |
|
16667 |
|
16668 |
|
16669 |
|
16670 | function orderBy(collection, iteratees, orders, guard) {
|
16671 | if (collection == null) {
|
16672 | return [];
|
16673 | }
|
16674 | if (!isArray(iteratees)) {
|
16675 | iteratees = iteratees == null ? [] : [iteratees];
|
16676 | }
|
16677 | orders = guard ? undefined : orders;
|
16678 | if (!isArray(orders)) {
|
16679 | orders = orders == null ? [] : [orders];
|
16680 | }
|
16681 | return baseOrderBy(collection, iteratees, orders);
|
16682 | }
|
16683 |
|
16684 | |
16685 |
|
16686 |
|
16687 |
|
16688 |
|
16689 |
|
16690 |
|
16691 |
|
16692 |
|
16693 |
|
16694 |
|
16695 |
|
16696 |
|
16697 |
|
16698 |
|
16699 |
|
16700 |
|
16701 |
|
16702 |
|
16703 |
|
16704 |
|
16705 |
|
16706 |
|
16707 |
|
16708 |
|
16709 |
|
16710 |
|
16711 |
|
16712 |
|
16713 |
|
16714 |
|
16715 |
|
16716 |
|
16717 |
|
16718 |
|
16719 |
|
16720 | var partition = createAggregator(function(result, value, key) {
|
16721 | result[key ? 0 : 1].push(value);
|
16722 | }, function() { return [[], []]; });
|
16723 |
|
16724 | |
16725 |
|
16726 |
|
16727 |
|
16728 |
|
16729 |
|
16730 |
|
16731 |
|
16732 |
|
16733 |
|
16734 |
|
16735 |
|
16736 |
|
16737 |
|
16738 |
|
16739 |
|
16740 |
|
16741 |
|
16742 |
|
16743 |
|
16744 |
|
16745 |
|
16746 |
|
16747 |
|
16748 |
|
16749 |
|
16750 |
|
16751 |
|
16752 |
|
16753 |
|
16754 |
|
16755 |
|
16756 |
|
16757 |
|
16758 |
|
16759 |
|
16760 |
|
16761 | function reduce(collection, iteratee, accumulator) {
|
16762 | var func = isArray(collection) ? arrayReduce : baseReduce,
|
16763 | initAccum = arguments.length < 3;
|
16764 |
|
16765 | return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
|
16766 | }
|
16767 |
|
16768 | |
16769 |
|
16770 |
|
16771 |
|
16772 |
|
16773 |
|
16774 |
|
16775 |
|
16776 |
|
16777 |
|
16778 |
|
16779 |
|
16780 |
|
16781 |
|
16782 |
|
16783 |
|
16784 |
|
16785 |
|
16786 |
|
16787 |
|
16788 |
|
16789 |
|
16790 | function reduceRight(collection, iteratee, accumulator) {
|
16791 | var func = isArray(collection) ? arrayReduceRight : baseReduce,
|
16792 | initAccum = arguments.length < 3;
|
16793 |
|
16794 | return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
|
16795 | }
|
16796 |
|
16797 | |
16798 |
|
16799 |
|
16800 |
|
16801 |
|
16802 |
|
16803 |
|
16804 |
|
16805 |
|
16806 |
|
16807 |
|
16808 |
|
16809 |
|
16810 |
|
16811 |
|
16812 |
|
16813 |
|
16814 |
|
16815 |
|
16816 |
|
16817 |
|
16818 |
|
16819 |
|
16820 |
|
16821 |
|
16822 |
|
16823 |
|
16824 |
|
16825 |
|
16826 |
|
16827 |
|
16828 |
|
16829 |
|
16830 |
|
16831 | function reject(collection, predicate) {
|
16832 | var func = isArray(collection) ? arrayFilter : baseFilter;
|
16833 | return func(collection, negate(getIteratee(predicate, 3)));
|
16834 | }
|
16835 |
|
16836 | |
16837 |
|
16838 |
|
16839 |
|
16840 |
|
16841 |
|
16842 |
|
16843 |
|
16844 |
|
16845 |
|
16846 |
|
16847 |
|
16848 |
|
16849 |
|
16850 | function sample(collection) {
|
16851 | var func = isArray(collection) ? arraySample : baseSample;
|
16852 | return func(collection);
|
16853 | }
|
16854 |
|
16855 | |
16856 |
|
16857 |
|
16858 |
|
16859 |
|
16860 |
|
16861 |
|
16862 |
|
16863 |
|
16864 |
|
16865 |
|
16866 |
|
16867 |
|
16868 |
|
16869 |
|
16870 |
|
16871 |
|
16872 |
|
16873 |
|
16874 |
|
16875 | function sampleSize(collection, n, guard) {
|
16876 | if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
|
16877 | n = 1;
|
16878 | } else {
|
16879 | n = toInteger(n);
|
16880 | }
|
16881 | var func = isArray(collection) ? arraySampleSize : baseSampleSize;
|
16882 | return func(collection, n);
|
16883 | }
|
16884 |
|
16885 | |
16886 |
|
16887 |
|
16888 |
|
16889 |
|
16890 |
|
16891 |
|
16892 |
|
16893 |
|
16894 |
|
16895 |
|
16896 |
|
16897 |
|
16898 |
|
16899 |
|
16900 | function shuffle(collection) {
|
16901 | var func = isArray(collection) ? arrayShuffle : baseShuffle;
|
16902 | return func(collection);
|
16903 | }
|
16904 |
|
16905 | |
16906 |
|
16907 |
|
16908 |
|
16909 |
|
16910 |
|
16911 |
|
16912 |
|
16913 |
|
16914 |
|
16915 |
|
16916 |
|
16917 |
|
16918 |
|
16919 |
|
16920 |
|
16921 |
|
16922 |
|
16923 |
|
16924 |
|
16925 |
|
16926 | function size(collection) {
|
16927 | if (collection == null) {
|
16928 | return 0;
|
16929 | }
|
16930 | if (isArrayLike(collection)) {
|
16931 | return isString(collection) ? stringSize(collection) : collection.length;
|
16932 | }
|
16933 | var tag = getTag(collection);
|
16934 | if (tag == mapTag || tag == setTag) {
|
16935 | return collection.size;
|
16936 | }
|
16937 | return baseKeys(collection).length;
|
16938 | }
|
16939 |
|
16940 | |
16941 |
|
16942 |
|
16943 |
|
16944 |
|
16945 |
|
16946 |
|
16947 |
|
16948 |
|
16949 |
|
16950 |
|
16951 |
|
16952 |
|
16953 |
|
16954 |
|
16955 |
|
16956 |
|
16957 |
|
16958 |
|
16959 |
|
16960 |
|
16961 |
|
16962 |
|
16963 |
|
16964 |
|
16965 |
|
16966 |
|
16967 |
|
16968 |
|
16969 |
|
16970 |
|
16971 |
|
16972 |
|
16973 |
|
16974 |
|
16975 |
|
16976 | function some(collection, predicate, guard) {
|
16977 | var func = isArray(collection) ? arraySome : baseSome;
|
16978 | if (guard && isIterateeCall(collection, predicate, guard)) {
|
16979 | predicate = undefined;
|
16980 | }
|
16981 | return func(collection, getIteratee(predicate, 3));
|
16982 | }
|
16983 |
|
16984 | |
16985 |
|
16986 |
|
16987 |
|
16988 |
|
16989 |
|
16990 |
|
16991 |
|
16992 |
|
16993 |
|
16994 |
|
16995 |
|
16996 |
|
16997 |
|
16998 |
|
16999 |
|
17000 |
|
17001 |
|
17002 |
|
17003 |
|
17004 |
|
17005 |
|
17006 |
|
17007 |
|
17008 |
|
17009 |
|
17010 |
|
17011 |
|
17012 |
|
17013 | var sortBy = baseRest(function(collection, iteratees) {
|
17014 | if (collection == null) {
|
17015 | return [];
|
17016 | }
|
17017 | var length = iteratees.length;
|
17018 | if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
|
17019 | iteratees = [];
|
17020 | } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
|
17021 | iteratees = [iteratees[0]];
|
17022 | }
|
17023 | return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
|
17024 | });
|
17025 |
|
17026 |
|
17027 |
|
17028 | |
17029 |
|
17030 |
|
17031 |
|
17032 |
|
17033 |
|
17034 |
|
17035 |
|
17036 |
|
17037 |
|
17038 |
|
17039 |
|
17040 |
|
17041 |
|
17042 |
|
17043 |
|
17044 | var now = ctxNow || function() {
|
17045 | return root.Date.now();
|
17046 | };
|
17047 |
|
17048 |
|
17049 |
|
17050 | |
17051 |
|
17052 |
|
17053 |
|
17054 |
|
17055 |
|
17056 |
|
17057 |
|
17058 |
|
17059 |
|
17060 |
|
17061 |
|
17062 |
|
17063 |
|
17064 |
|
17065 |
|
17066 |
|
17067 |
|
17068 |
|
17069 |
|
17070 |
|
17071 |
|
17072 |
|
17073 |
|
17074 | function after(n, func) {
|
17075 | if (typeof func != 'function') {
|
17076 | throw new TypeError(FUNC_ERROR_TEXT);
|
17077 | }
|
17078 | n = toInteger(n);
|
17079 | return function() {
|
17080 | if (--n < 1) {
|
17081 | return func.apply(this, arguments);
|
17082 | }
|
17083 | };
|
17084 | }
|
17085 |
|
17086 | |
17087 |
|
17088 |
|
17089 |
|
17090 |
|
17091 |
|
17092 |
|
17093 |
|
17094 |
|
17095 |
|
17096 |
|
17097 |
|
17098 |
|
17099 |
|
17100 |
|
17101 |
|
17102 |
|
17103 | function ary(func, n, guard) {
|
17104 | n = guard ? undefined : n;
|
17105 | n = (func && n == null) ? func.length : n;
|
17106 | return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
|
17107 | }
|
17108 |
|
17109 | |
17110 |
|
17111 |
|
17112 |
|
17113 |
|
17114 |
|
17115 |
|
17116 |
|
17117 |
|
17118 |
|
17119 |
|
17120 |
|
17121 |
|
17122 |
|
17123 |
|
17124 |
|
17125 |
|
17126 | function before(n, func) {
|
17127 | var result;
|
17128 | if (typeof func != 'function') {
|
17129 | throw new TypeError(FUNC_ERROR_TEXT);
|
17130 | }
|
17131 | n = toInteger(n);
|
17132 | return function() {
|
17133 | if (--n > 0) {
|
17134 | result = func.apply(this, arguments);
|
17135 | }
|
17136 | if (n <= 1) {
|
17137 | func = undefined;
|
17138 | }
|
17139 | return result;
|
17140 | };
|
17141 | }
|
17142 |
|
17143 | |
17144 |
|
17145 |
|
17146 |
|
17147 |
|
17148 |
|
17149 |
|
17150 |
|
17151 |
|
17152 |
|
17153 |
|
17154 |
|
17155 |
|
17156 |
|
17157 |
|
17158 |
|
17159 |
|
17160 |
|
17161 |
|
17162 |
|
17163 |
|
17164 |
|
17165 |
|
17166 |
|
17167 |
|
17168 |
|
17169 |
|
17170 |
|
17171 |
|
17172 |
|
17173 |
|
17174 |
|
17175 |
|
17176 |
|
17177 |
|
17178 | var bind = baseRest(function(func, thisArg, partials) {
|
17179 | var bitmask = WRAP_BIND_FLAG;
|
17180 | if (partials.length) {
|
17181 | var holders = replaceHolders(partials, getHolder(bind));
|
17182 | bitmask |= WRAP_PARTIAL_FLAG;
|
17183 | }
|
17184 | return createWrap(func, bitmask, thisArg, partials, holders);
|
17185 | });
|
17186 |
|
17187 | |
17188 |
|
17189 |
|
17190 |
|
17191 |
|
17192 |
|
17193 |
|
17194 |
|
17195 |
|
17196 |
|
17197 |
|
17198 |
|
17199 |
|
17200 |
|
17201 |
|
17202 |
|
17203 |
|
17204 |
|
17205 |
|
17206 |
|
17207 |
|
17208 |
|
17209 |
|
17210 |
|
17211 |
|
17212 |
|
17213 |
|
17214 |
|
17215 |
|
17216 |
|
17217 |
|
17218 |
|
17219 |
|
17220 |
|
17221 |
|
17222 |
|
17223 |
|
17224 |
|
17225 |
|
17226 |
|
17227 |
|
17228 |
|
17229 |
|
17230 |
|
17231 |
|
17232 | var bindKey = baseRest(function(object, key, partials) {
|
17233 | var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
|
17234 | if (partials.length) {
|
17235 | var holders = replaceHolders(partials, getHolder(bindKey));
|
17236 | bitmask |= WRAP_PARTIAL_FLAG;
|
17237 | }
|
17238 | return createWrap(key, bitmask, object, partials, holders);
|
17239 | });
|
17240 |
|
17241 | |
17242 |
|
17243 |
|
17244 |
|
17245 |
|
17246 |
|
17247 |
|
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 |
|
17276 |
|
17277 |
|
17278 |
|
17279 |
|
17280 |
|
17281 |
|
17282 | function curry(func, arity, guard) {
|
17283 | arity = guard ? undefined : arity;
|
17284 | var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
|
17285 | result.placeholder = curry.placeholder;
|
17286 | return result;
|
17287 | }
|
17288 |
|
17289 | |
17290 |
|
17291 |
|
17292 |
|
17293 |
|
17294 |
|
17295 |
|
17296 |
|
17297 |
|
17298 |
|
17299 |
|
17300 |
|
17301 |
|
17302 |
|
17303 |
|
17304 |
|
17305 |
|
17306 |
|
17307 |
|
17308 |
|
17309 |
|
17310 |
|
17311 |
|
17312 |
|
17313 |
|
17314 |
|
17315 |
|
17316 |
|
17317 |
|
17318 |
|
17319 |
|
17320 |
|
17321 |
|
17322 |
|
17323 |
|
17324 |
|
17325 |
|
17326 |
|
17327 | function curryRight(func, arity, guard) {
|
17328 | arity = guard ? undefined : arity;
|
17329 | var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
|
17330 | result.placeholder = curryRight.placeholder;
|
17331 | return result;
|
17332 | }
|
17333 |
|
17334 | |
17335 |
|
17336 |
|
17337 |
|
17338 |
|
17339 |
|
17340 |
|
17341 |
|
17342 |
|
17343 |
|
17344 |
|
17345 |
|
17346 |
|
17347 |
|
17348 |
|
17349 |
|
17350 |
|
17351 |
|
17352 |
|
17353 |
|
17354 |
|
17355 |
|
17356 |
|
17357 |
|
17358 |
|
17359 |
|
17360 |
|
17361 |
|
17362 |
|
17363 |
|
17364 |
|
17365 |
|
17366 |
|
17367 |
|
17368 |
|
17369 |
|
17370 |
|
17371 |
|
17372 |
|
17373 |
|
17374 |
|
17375 |
|
17376 |
|
17377 |
|
17378 |
|
17379 |
|
17380 |
|
17381 |
|
17382 |
|
17383 |
|
17384 |
|
17385 |
|
17386 |
|
17387 |
|
17388 | function debounce(func, wait, options) {
|
17389 | var lastArgs,
|
17390 | lastThis,
|
17391 | maxWait,
|
17392 | result,
|
17393 | timerId,
|
17394 | lastCallTime,
|
17395 | lastInvokeTime = 0,
|
17396 | leading = false,
|
17397 | maxing = false,
|
17398 | trailing = true;
|
17399 |
|
17400 | if (typeof func != 'function') {
|
17401 | throw new TypeError(FUNC_ERROR_TEXT);
|
17402 | }
|
17403 | wait = toNumber(wait) || 0;
|
17404 | if (isObject(options)) {
|
17405 | leading = !!options.leading;
|
17406 | maxing = 'maxWait' in options;
|
17407 | maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
17408 | trailing = 'trailing' in options ? !!options.trailing : trailing;
|
17409 | }
|
17410 |
|
17411 | function invokeFunc(time) {
|
17412 | var args = lastArgs,
|
17413 | thisArg = lastThis;
|
17414 |
|
17415 | lastArgs = lastThis = undefined;
|
17416 | lastInvokeTime = time;
|
17417 | result = func.apply(thisArg, args);
|
17418 | return result;
|
17419 | }
|
17420 |
|
17421 | function leadingEdge(time) {
|
17422 |
|
17423 | lastInvokeTime = time;
|
17424 |
|
17425 | timerId = setTimeout(timerExpired, wait);
|
17426 |
|
17427 | return leading ? invokeFunc(time) : result;
|
17428 | }
|
17429 |
|
17430 | function remainingWait(time) {
|
17431 | var timeSinceLastCall = time - lastCallTime,
|
17432 | timeSinceLastInvoke = time - lastInvokeTime,
|
17433 | result = wait - timeSinceLastCall;
|
17434 |
|
17435 | return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
|
17436 | }
|
17437 |
|
17438 | function shouldInvoke(time) {
|
17439 | var timeSinceLastCall = time - lastCallTime,
|
17440 | timeSinceLastInvoke = time - lastInvokeTime;
|
17441 |
|
17442 |
|
17443 |
|
17444 |
|
17445 | return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
17446 | (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
17447 | }
|
17448 |
|
17449 | function timerExpired() {
|
17450 | var time = now();
|
17451 | if (shouldInvoke(time)) {
|
17452 | return trailingEdge(time);
|
17453 | }
|
17454 |
|
17455 | timerId = setTimeout(timerExpired, remainingWait(time));
|
17456 | }
|
17457 |
|
17458 | function trailingEdge(time) {
|
17459 | timerId = undefined;
|
17460 |
|
17461 |
|
17462 |
|
17463 | if (trailing && lastArgs) {
|
17464 | return invokeFunc(time);
|
17465 | }
|
17466 | lastArgs = lastThis = undefined;
|
17467 | return result;
|
17468 | }
|
17469 |
|
17470 | function cancel() {
|
17471 | if (timerId !== undefined) {
|
17472 | clearTimeout(timerId);
|
17473 | }
|
17474 | lastInvokeTime = 0;
|
17475 | lastArgs = lastCallTime = lastThis = timerId = undefined;
|
17476 | }
|
17477 |
|
17478 | function flush() {
|
17479 | return timerId === undefined ? result : trailingEdge(now());
|
17480 | }
|
17481 |
|
17482 | function debounced() {
|
17483 | var time = now(),
|
17484 | isInvoking = shouldInvoke(time);
|
17485 |
|
17486 | lastArgs = arguments;
|
17487 | lastThis = this;
|
17488 | lastCallTime = time;
|
17489 |
|
17490 | if (isInvoking) {
|
17491 | if (timerId === undefined) {
|
17492 | return leadingEdge(lastCallTime);
|
17493 | }
|
17494 | if (maxing) {
|
17495 |
|
17496 | timerId = setTimeout(timerExpired, wait);
|
17497 | return invokeFunc(lastCallTime);
|
17498 | }
|
17499 | }
|
17500 | if (timerId === undefined) {
|
17501 | timerId = setTimeout(timerExpired, wait);
|
17502 | }
|
17503 | return result;
|
17504 | }
|
17505 | debounced.cancel = cancel;
|
17506 | debounced.flush = flush;
|
17507 | return debounced;
|
17508 | }
|
17509 |
|
17510 | |
17511 |
|
17512 |
|
17513 |
|
17514 |
|
17515 |
|
17516 |
|
17517 |
|
17518 |
|
17519 |
|
17520 |
|
17521 |
|
17522 |
|
17523 |
|
17524 |
|
17525 |
|
17526 |
|
17527 |
|
17528 | var defer = baseRest(function(func, args) {
|
17529 | return baseDelay(func, 1, args);
|
17530 | });
|
17531 |
|
17532 | |
17533 |
|
17534 |
|
17535 |
|
17536 |
|
17537 |
|
17538 |
|
17539 |
|
17540 |
|
17541 |
|
17542 |
|
17543 |
|
17544 |
|
17545 |
|
17546 |
|
17547 |
|
17548 |
|
17549 |
|
17550 |
|
17551 | var delay = baseRest(function(func, wait, args) {
|
17552 | return baseDelay(func, toNumber(wait) || 0, args);
|
17553 | });
|
17554 |
|
17555 | |
17556 |
|
17557 |
|
17558 |
|
17559 |
|
17560 |
|
17561 |
|
17562 |
|
17563 |
|
17564 |
|
17565 |
|
17566 |
|
17567 |
|
17568 |
|
17569 |
|
17570 |
|
17571 |
|
17572 |
|
17573 | function flip(func) {
|
17574 | return createWrap(func, WRAP_FLIP_FLAG);
|
17575 | }
|
17576 |
|
17577 | |
17578 |
|
17579 |
|
17580 |
|
17581 |
|
17582 |
|
17583 |
|
17584 |
|
17585 |
|
17586 |
|
17587 |
|
17588 |
|
17589 |
|
17590 |
|
17591 |
|
17592 |
|
17593 |
|
17594 |
|
17595 |
|
17596 |
|
17597 |
|
17598 |
|
17599 |
|
17600 |
|
17601 |
|
17602 |
|
17603 |
|
17604 |
|
17605 |
|
17606 |
|
17607 |
|
17608 |
|
17609 |
|
17610 |
|
17611 |
|
17612 |
|
17613 |
|
17614 |
|
17615 |
|
17616 |
|
17617 |
|
17618 |
|
17619 |
|
17620 |
|
17621 | function memoize(func, resolver) {
|
17622 | if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
17623 | throw new TypeError(FUNC_ERROR_TEXT);
|
17624 | }
|
17625 | var memoized = function() {
|
17626 | var args = arguments,
|
17627 | key = resolver ? resolver.apply(this, args) : args[0],
|
17628 | cache = memoized.cache;
|
17629 |
|
17630 | if (cache.has(key)) {
|
17631 | return cache.get(key);
|
17632 | }
|
17633 | var result = func.apply(this, args);
|
17634 | memoized.cache = cache.set(key, result) || cache;
|
17635 | return result;
|
17636 | };
|
17637 | memoized.cache = new (memoize.Cache || MapCache);
|
17638 | return memoized;
|
17639 | }
|
17640 |
|
17641 |
|
17642 | memoize.Cache = MapCache;
|
17643 |
|
17644 | |
17645 |
|
17646 |
|
17647 |
|
17648 |
|
17649 |
|
17650 |
|
17651 |
|
17652 |
|
17653 |
|
17654 |
|
17655 |
|
17656 |
|
17657 |
|
17658 |
|
17659 |
|
17660 |
|
17661 |
|
17662 |
|
17663 |
|
17664 | function negate(predicate) {
|
17665 | if (typeof predicate != 'function') {
|
17666 | throw new TypeError(FUNC_ERROR_TEXT);
|
17667 | }
|
17668 | return function() {
|
17669 | var args = arguments;
|
17670 | switch (args.length) {
|
17671 | case 0: return !predicate.call(this);
|
17672 | case 1: return !predicate.call(this, args[0]);
|
17673 | case 2: return !predicate.call(this, args[0], args[1]);
|
17674 | case 3: return !predicate.call(this, args[0], args[1], args[2]);
|
17675 | }
|
17676 | return !predicate.apply(this, args);
|
17677 | };
|
17678 | }
|
17679 |
|
17680 | |
17681 |
|
17682 |
|
17683 |
|
17684 |
|
17685 |
|
17686 |
|
17687 |
|
17688 |
|
17689 |
|
17690 |
|
17691 |
|
17692 |
|
17693 |
|
17694 |
|
17695 |
|
17696 |
|
17697 |
|
17698 | function once(func) {
|
17699 | return before(2, func);
|
17700 | }
|
17701 |
|
17702 | |
17703 |
|
17704 |
|
17705 |
|
17706 |
|
17707 |
|
17708 |
|
17709 |
|
17710 |
|
17711 |
|
17712 |
|
17713 |
|
17714 |
|
17715 |
|
17716 |
|
17717 |
|
17718 |
|
17719 |
|
17720 |
|
17721 |
|
17722 |
|
17723 |
|
17724 |
|
17725 |
|
17726 |
|
17727 |
|
17728 |
|
17729 |
|
17730 |
|
17731 |
|
17732 |
|
17733 | var overArgs = castRest(function(func, transforms) {
|
17734 | transforms = (transforms.length == 1 && isArray(transforms[0]))
|
17735 | ? arrayMap(transforms[0], baseUnary(getIteratee()))
|
17736 | : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
|
17737 |
|
17738 | var funcsLength = transforms.length;
|
17739 | return baseRest(function(args) {
|
17740 | var index = -1,
|
17741 | length = nativeMin(args.length, funcsLength);
|
17742 |
|
17743 | while (++index < length) {
|
17744 | args[index] = transforms[index].call(this, args[index]);
|
17745 | }
|
17746 | return apply(func, this, args);
|
17747 | });
|
17748 | });
|
17749 |
|
17750 | |
17751 |
|
17752 |
|
17753 |
|
17754 |
|
17755 |
|
17756 |
|
17757 |
|
17758 |
|
17759 |
|
17760 |
|
17761 |
|
17762 |
|
17763 |
|
17764 |
|
17765 |
|
17766 |
|
17767 |
|
17768 |
|
17769 |
|
17770 |
|
17771 |
|
17772 |
|
17773 |
|
17774 |
|
17775 |
|
17776 |
|
17777 |
|
17778 |
|
17779 |
|
17780 |
|
17781 |
|
17782 |
|
17783 | var partial = baseRest(function(func, partials) {
|
17784 | var holders = replaceHolders(partials, getHolder(partial));
|
17785 | return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
|
17786 | });
|
17787 |
|
17788 | |
17789 |
|
17790 |
|
17791 |
|
17792 |
|
17793 |
|
17794 |
|
17795 |
|
17796 |
|
17797 |
|
17798 |
|
17799 |
|
17800 |
|
17801 |
|
17802 |
|
17803 |
|
17804 |
|
17805 |
|
17806 |
|
17807 |
|
17808 |
|
17809 |
|
17810 |
|
17811 |
|
17812 |
|
17813 |
|
17814 |
|
17815 |
|
17816 |
|
17817 |
|
17818 |
|
17819 |
|
17820 | var partialRight = baseRest(function(func, partials) {
|
17821 | var holders = replaceHolders(partials, getHolder(partialRight));
|
17822 | return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
|
17823 | });
|
17824 |
|
17825 | |
17826 |
|
17827 |
|
17828 |
|
17829 |
|
17830 |
|
17831 |
|
17832 |
|
17833 |
|
17834 |
|
17835 |
|
17836 |
|
17837 |
|
17838 |
|
17839 |
|
17840 |
|
17841 |
|
17842 |
|
17843 |
|
17844 |
|
17845 |
|
17846 |
|
17847 | var rearg = flatRest(function(func, indexes) {
|
17848 | return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
|
17849 | });
|
17850 |
|
17851 | |
17852 |
|
17853 |
|
17854 |
|
17855 |
|
17856 |
|
17857 |
|
17858 |
|
17859 |
|
17860 |
|
17861 |
|
17862 |
|
17863 |
|
17864 |
|
17865 |
|
17866 |
|
17867 |
|
17868 |
|
17869 |
|
17870 |
|
17871 |
|
17872 |
|
17873 |
|
17874 |
|
17875 |
|
17876 | function rest(func, start) {
|
17877 | if (typeof func != 'function') {
|
17878 | throw new TypeError(FUNC_ERROR_TEXT);
|
17879 | }
|
17880 | start = start === undefined ? start : toInteger(start);
|
17881 | return baseRest(func, start);
|
17882 | }
|
17883 |
|
17884 | |
17885 |
|
17886 |
|
17887 |
|
17888 |
|
17889 |
|
17890 |
|
17891 |
|
17892 |
|
17893 |
|
17894 |
|
17895 |
|
17896 |
|
17897 |
|
17898 |
|
17899 |
|
17900 |
|
17901 |
|
17902 |
|
17903 |
|
17904 |
|
17905 |
|
17906 |
|
17907 |
|
17908 |
|
17909 |
|
17910 |
|
17911 |
|
17912 |
|
17913 |
|
17914 |
|
17915 |
|
17916 |
|
17917 |
|
17918 | function spread(func, start) {
|
17919 | if (typeof func != 'function') {
|
17920 | throw new TypeError(FUNC_ERROR_TEXT);
|
17921 | }
|
17922 | start = start == null ? 0 : nativeMax(toInteger(start), 0);
|
17923 | return baseRest(function(args) {
|
17924 | var array = args[start],
|
17925 | otherArgs = castSlice(args, 0, start);
|
17926 |
|
17927 | if (array) {
|
17928 | arrayPush(otherArgs, array);
|
17929 | }
|
17930 | return apply(func, this, otherArgs);
|
17931 | });
|
17932 | }
|
17933 |
|
17934 | |
17935 |
|
17936 |
|
17937 |
|
17938 |
|
17939 |
|
17940 |
|
17941 |
|
17942 |
|
17943 |
|
17944 |
|
17945 |
|
17946 |
|
17947 |
|
17948 |
|
17949 |
|
17950 |
|
17951 |
|
17952 |
|
17953 |
|
17954 |
|
17955 |
|
17956 |
|
17957 |
|
17958 |
|
17959 |
|
17960 |
|
17961 |
|
17962 |
|
17963 |
|
17964 |
|
17965 |
|
17966 |
|
17967 |
|
17968 |
|
17969 |
|
17970 |
|
17971 |
|
17972 |
|
17973 |
|
17974 |
|
17975 |
|
17976 |
|
17977 |
|
17978 | function throttle(func, wait, options) {
|
17979 | var leading = true,
|
17980 | trailing = true;
|
17981 |
|
17982 | if (typeof func != 'function') {
|
17983 | throw new TypeError(FUNC_ERROR_TEXT);
|
17984 | }
|
17985 | if (isObject(options)) {
|
17986 | leading = 'leading' in options ? !!options.leading : leading;
|
17987 | trailing = 'trailing' in options ? !!options.trailing : trailing;
|
17988 | }
|
17989 | return debounce(func, wait, {
|
17990 | 'leading': leading,
|
17991 | 'maxWait': wait,
|
17992 | 'trailing': trailing
|
17993 | });
|
17994 | }
|
17995 |
|
17996 | |
17997 |
|
17998 |
|
17999 |
|
18000 |
|
18001 |
|
18002 |
|
18003 |
|
18004 |
|
18005 |
|
18006 |
|
18007 |
|
18008 |
|
18009 |
|
18010 |
|
18011 | function unary(func) {
|
18012 | return ary(func, 1);
|
18013 | }
|
18014 |
|
18015 | |
18016 |
|
18017 |
|
18018 |
|
18019 |
|
18020 |
|
18021 |
|
18022 |
|
18023 |
|
18024 |
|
18025 |
|
18026 |
|
18027 |
|
18028 |
|
18029 |
|
18030 |
|
18031 |
|
18032 |
|
18033 |
|
18034 |
|
18035 |
|
18036 |
|
18037 | function wrap(value, wrapper) {
|
18038 | return partial(castFunction(wrapper), value);
|
18039 | }
|
18040 |
|
18041 |
|
18042 |
|
18043 | |
18044 |
|
18045 |
|
18046 |
|
18047 |
|
18048 |
|
18049 |
|
18050 |
|
18051 |
|
18052 |
|
18053 |
|
18054 |
|
18055 |
|
18056 |
|
18057 |
|
18058 |
|
18059 |
|
18060 |
|
18061 |
|
18062 |
|
18063 |
|
18064 |
|
18065 |
|
18066 |
|
18067 |
|
18068 |
|
18069 |
|
18070 |
|
18071 |
|
18072 |
|
18073 |
|
18074 |
|
18075 |
|
18076 | function castArray() {
|
18077 | if (!arguments.length) {
|
18078 | return [];
|
18079 | }
|
18080 | var value = arguments[0];
|
18081 | return isArray(value) ? value : [value];
|
18082 | }
|
18083 |
|
18084 | |
18085 |
|
18086 |
|
18087 |
|
18088 |
|
18089 |
|
18090 |
|
18091 |
|
18092 |
|
18093 |
|
18094 |
|
18095 |
|
18096 |
|
18097 |
|
18098 |
|
18099 |
|
18100 |
|
18101 |
|
18102 |
|
18103 |
|
18104 |
|
18105 |
|
18106 |
|
18107 |
|
18108 |
|
18109 |
|
18110 | function clone(value) {
|
18111 | return baseClone(value, CLONE_SYMBOLS_FLAG);
|
18112 | }
|
18113 |
|
18114 | |
18115 |
|
18116 |
|
18117 |
|
18118 |
|
18119 |
|
18120 |
|
18121 |
|
18122 |
|
18123 |
|
18124 |
|
18125 |
|
18126 |
|
18127 |
|
18128 |
|
18129 |
|
18130 |
|
18131 |
|
18132 |
|
18133 |
|
18134 |
|
18135 |
|
18136 |
|
18137 |
|
18138 |
|
18139 |
|
18140 |
|
18141 |
|
18142 |
|
18143 |
|
18144 |
|
18145 | function cloneWith(value, customizer) {
|
18146 | customizer = typeof customizer == 'function' ? customizer : undefined;
|
18147 | return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
|
18148 | }
|
18149 |
|
18150 | |
18151 |
|
18152 |
|
18153 |
|
18154 |
|
18155 |
|
18156 |
|
18157 |
|
18158 |
|
18159 |
|
18160 |
|
18161 |
|
18162 |
|
18163 |
|
18164 |
|
18165 |
|
18166 |
|
18167 |
|
18168 | function cloneDeep(value) {
|
18169 | return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
18170 | }
|
18171 |
|
18172 | |
18173 |
|
18174 |
|
18175 |
|
18176 |
|
18177 |
|
18178 |
|
18179 |
|
18180 |
|
18181 |
|
18182 |
|
18183 |
|
18184 |
|
18185 |
|
18186 |
|
18187 |
|
18188 |
|
18189 |
|
18190 |
|
18191 |
|
18192 |
|
18193 |
|
18194 |
|
18195 |
|
18196 |
|
18197 |
|
18198 |
|
18199 |
|
18200 | function cloneDeepWith(value, customizer) {
|
18201 | customizer = typeof customizer == 'function' ? customizer : undefined;
|
18202 | return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
|
18203 | }
|
18204 |
|
18205 | |
18206 |
|
18207 |
|
18208 |
|
18209 |
|
18210 |
|
18211 |
|
18212 |
|
18213 |
|
18214 |
|
18215 |
|
18216 |
|
18217 |
|
18218 |
|
18219 |
|
18220 |
|
18221 |
|
18222 |
|
18223 |
|
18224 |
|
18225 |
|
18226 |
|
18227 |
|
18228 |
|
18229 | function conformsTo(object, source) {
|
18230 | return source == null || baseConformsTo(object, source, keys(source));
|
18231 | }
|
18232 |
|
18233 | |
18234 |
|
18235 |
|
18236 |
|
18237 |
|
18238 |
|
18239 |
|
18240 |
|
18241 |
|
18242 |
|
18243 |
|
18244 |
|
18245 |
|
18246 |
|
18247 |
|
18248 |
|
18249 |
|
18250 |
|
18251 |
|
18252 |
|
18253 |
|
18254 |
|
18255 |
|
18256 |
|
18257 |
|
18258 |
|
18259 |
|
18260 |
|
18261 |
|
18262 |
|
18263 |
|
18264 |
|
18265 | function eq(value, other) {
|
18266 | return value === other || (value !== value && other !== other);
|
18267 | }
|
18268 |
|
18269 | |
18270 |
|
18271 |
|
18272 |
|
18273 |
|
18274 |
|
18275 |
|
18276 |
|
18277 |
|
18278 |
|
18279 |
|
18280 |
|
18281 |
|
18282 |
|
18283 |
|
18284 |
|
18285 |
|
18286 |
|
18287 |
|
18288 |
|
18289 |
|
18290 |
|
18291 |
|
18292 | var gt = createRelationalOperation(baseGt);
|
18293 |
|
18294 | |
18295 |
|
18296 |
|
18297 |
|
18298 |
|
18299 |
|
18300 |
|
18301 |
|
18302 |
|
18303 |
|
18304 |
|
18305 |
|
18306 |
|
18307 |
|
18308 |
|
18309 |
|
18310 |
|
18311 |
|
18312 |
|
18313 |
|
18314 |
|
18315 |
|
18316 |
|
18317 | var gte = createRelationalOperation(function(value, other) {
|
18318 | return value >= other;
|
18319 | });
|
18320 |
|
18321 | |
18322 |
|
18323 |
|
18324 |
|
18325 |
|
18326 |
|
18327 |
|
18328 |
|
18329 |
|
18330 |
|
18331 |
|
18332 |
|
18333 |
|
18334 |
|
18335 |
|
18336 |
|
18337 |
|
18338 |
|
18339 | var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
18340 | return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
|
18341 | !propertyIsEnumerable.call(value, 'callee');
|
18342 | };
|
18343 |
|
18344 | |
18345 |
|
18346 |
|
18347 |
|
18348 |
|
18349 |
|
18350 |
|
18351 |
|
18352 |
|
18353 |
|
18354 |
|
18355 |
|
18356 |
|
18357 |
|
18358 |
|
18359 |
|
18360 |
|
18361 |
|
18362 |
|
18363 |
|
18364 |
|
18365 |
|
18366 |
|
18367 | var isArray = Array.isArray;
|
18368 |
|
18369 | |
18370 |
|
18371 |
|
18372 |
|
18373 |
|
18374 |
|
18375 |
|
18376 |
|
18377 |
|
18378 |
|
18379 |
|
18380 |
|
18381 |
|
18382 |
|
18383 |
|
18384 |
|
18385 |
|
18386 | var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
|
18387 |
|
18388 | |
18389 |
|
18390 |
|
18391 |
|
18392 |
|
18393 |
|
18394 |
|
18395 |
|
18396 |
|
18397 |
|
18398 |
|
18399 |
|
18400 |
|
18401 |
|
18402 |
|
18403 |
|
18404 |
|
18405 |
|
18406 |
|
18407 |
|
18408 |
|
18409 |
|
18410 |
|
18411 |
|
18412 |
|
18413 | function isArrayLike(value) {
|
18414 | return value != null && isLength(value.length) && !isFunction(value);
|
18415 | }
|
18416 |
|
18417 | |
18418 |
|
18419 |
|
18420 |
|
18421 |
|
18422 |
|
18423 |
|
18424 |
|
18425 |
|
18426 |
|
18427 |
|
18428 |
|
18429 |
|
18430 |
|
18431 |
|
18432 |
|
18433 |
|
18434 |
|
18435 |
|
18436 |
|
18437 |
|
18438 |
|
18439 |
|
18440 |
|
18441 |
|
18442 | function isArrayLikeObject(value) {
|
18443 | return isObjectLike(value) && isArrayLike(value);
|
18444 | }
|
18445 |
|
18446 | |
18447 |
|
18448 |
|
18449 |
|
18450 |
|
18451 |
|
18452 |
|
18453 |
|
18454 |
|
18455 |
|
18456 |
|
18457 |
|
18458 |
|
18459 |
|
18460 |
|
18461 |
|
18462 |
|
18463 | function isBoolean(value) {
|
18464 | return value === true || value === false ||
|
18465 | (isObjectLike(value) && baseGetTag(value) == boolTag);
|
18466 | }
|
18467 |
|
18468 | |
18469 |
|
18470 |
|
18471 |
|
18472 |
|
18473 |
|
18474 |
|
18475 |
|
18476 |
|
18477 |
|
18478 |
|
18479 |
|
18480 |
|
18481 |
|
18482 |
|
18483 |
|
18484 |
|
18485 | var isBuffer = nativeIsBuffer || stubFalse;
|
18486 |
|
18487 | |
18488 |
|
18489 |
|
18490 |
|
18491 |
|
18492 |
|
18493 |
|
18494 |
|
18495 |
|
18496 |
|
18497 |
|
18498 |
|
18499 |
|
18500 |
|
18501 |
|
18502 |
|
18503 |
|
18504 | var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
|
18505 |
|
18506 | |
18507 |
|
18508 |
|
18509 |
|
18510 |
|
18511 |
|
18512 |
|
18513 |
|
18514 |
|
18515 |
|
18516 |
|
18517 |
|
18518 |
|
18519 |
|
18520 |
|
18521 |
|
18522 |
|
18523 | function isElement(value) {
|
18524 | return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
|
18525 | }
|
18526 |
|
18527 | |
18528 |
|
18529 |
|
18530 |
|
18531 |
|
18532 |
|
18533 |
|
18534 |
|
18535 |
|
18536 |
|
18537 |
|
18538 |
|
18539 |
|
18540 |
|
18541 |
|
18542 |
|
18543 |
|
18544 |
|
18545 |
|
18546 |
|
18547 |
|
18548 |
|
18549 |
|
18550 |
|
18551 |
|
18552 |
|
18553 |
|
18554 |
|
18555 |
|
18556 |
|
18557 |
|
18558 |
|
18559 |
|
18560 | function isEmpty(value) {
|
18561 | if (value == null) {
|
18562 | return true;
|
18563 | }
|
18564 | if (isArrayLike(value) &&
|
18565 | (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
|
18566 | isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
18567 | return !value.length;
|
18568 | }
|
18569 | var tag = getTag(value);
|
18570 | if (tag == mapTag || tag == setTag) {
|
18571 | return !value.size;
|
18572 | }
|
18573 | if (isPrototype(value)) {
|
18574 | return !baseKeys(value).length;
|
18575 | }
|
18576 | for (var key in value) {
|
18577 | if (hasOwnProperty.call(value, key)) {
|
18578 | return false;
|
18579 | }
|
18580 | }
|
18581 | return true;
|
18582 | }
|
18583 |
|
18584 | |
18585 |
|
18586 |
|
18587 |
|
18588 |
|
18589 |
|
18590 |
|
18591 |
|
18592 |
|
18593 |
|
18594 |
|
18595 |
|
18596 |
|
18597 |
|
18598 |
|
18599 |
|
18600 |
|
18601 |
|
18602 |
|
18603 |
|
18604 |
|
18605 |
|
18606 |
|
18607 |
|
18608 |
|
18609 |
|
18610 |
|
18611 |
|
18612 | function isEqual(value, other) {
|
18613 | return baseIsEqual(value, other);
|
18614 | }
|
18615 |
|
18616 | |
18617 |
|
18618 |
|
18619 |
|
18620 |
|
18621 |
|
18622 |
|
18623 |
|
18624 |
|
18625 |
|
18626 |
|
18627 |
|
18628 |
|
18629 |
|
18630 |
|
18631 |
|
18632 |
|
18633 |
|
18634 |
|
18635 |
|
18636 |
|
18637 |
|
18638 |
|
18639 |
|
18640 |
|
18641 |
|
18642 |
|
18643 |
|
18644 |
|
18645 |
|
18646 |
|
18647 |
|
18648 | function isEqualWith(value, other, customizer) {
|
18649 | customizer = typeof customizer == 'function' ? customizer : undefined;
|
18650 | var result = customizer ? customizer(value, other) : undefined;
|
18651 | return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
|
18652 | }
|
18653 |
|
18654 | |
18655 |
|
18656 |
|
18657 |
|
18658 |
|
18659 |
|
18660 |
|
18661 |
|
18662 |
|
18663 |
|
18664 |
|
18665 |
|
18666 |
|
18667 |
|
18668 |
|
18669 |
|
18670 |
|
18671 |
|
18672 | function isError(value) {
|
18673 | if (!isObjectLike(value)) {
|
18674 | return false;
|
18675 | }
|
18676 | var tag = baseGetTag(value);
|
18677 | return tag == errorTag || tag == domExcTag ||
|
18678 | (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
|
18679 | }
|
18680 |
|
18681 | |
18682 |
|
18683 |
|
18684 |
|
18685 |
|
18686 |
|
18687 |
|
18688 |
|
18689 |
|
18690 |
|
18691 |
|
18692 |
|
18693 |
|
18694 |
|
18695 |
|
18696 |
|
18697 |
|
18698 |
|
18699 |
|
18700 |
|
18701 |
|
18702 |
|
18703 |
|
18704 |
|
18705 |
|
18706 |
|
18707 | function isFinite(value) {
|
18708 | return typeof value == 'number' && nativeIsFinite(value);
|
18709 | }
|
18710 |
|
18711 | |
18712 |
|
18713 |
|
18714 |
|
18715 |
|
18716 |
|
18717 |
|
18718 |
|
18719 |
|
18720 |
|
18721 |
|
18722 |
|
18723 |
|
18724 |
|
18725 |
|
18726 |
|
18727 |
|
18728 | function isFunction(value) {
|
18729 | if (!isObject(value)) {
|
18730 | return false;
|
18731 | }
|
18732 |
|
18733 |
|
18734 | var tag = baseGetTag(value);
|
18735 | return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
18736 | }
|
18737 |
|
18738 | |
18739 |
|
18740 |
|
18741 |
|
18742 |
|
18743 |
|
18744 |
|
18745 |
|
18746 |
|
18747 |
|
18748 |
|
18749 |
|
18750 |
|
18751 |
|
18752 |
|
18753 |
|
18754 |
|
18755 |
|
18756 |
|
18757 |
|
18758 |
|
18759 |
|
18760 |
|
18761 |
|
18762 |
|
18763 |
|
18764 | function isInteger(value) {
|
18765 | return typeof value == 'number' && value == toInteger(value);
|
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 |
|
18791 |
|
18792 |
|
18793 |
|
18794 | function isLength(value) {
|
18795 | return typeof value == 'number' &&
|
18796 | value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
18797 | }
|
18798 |
|
18799 | |
18800 |
|
18801 |
|
18802 |
|
18803 |
|
18804 |
|
18805 |
|
18806 |
|
18807 |
|
18808 |
|
18809 |
|
18810 |
|
18811 |
|
18812 |
|
18813 |
|
18814 |
|
18815 |
|
18816 |
|
18817 |
|
18818 |
|
18819 |
|
18820 |
|
18821 |
|
18822 |
|
18823 |
|
18824 | function isObject(value) {
|
18825 | var type = typeof value;
|
18826 | return value != null && (type == 'object' || type == 'function');
|
18827 | }
|
18828 |
|
18829 | |
18830 |
|
18831 |
|
18832 |
|
18833 |
|
18834 |
|
18835 |
|
18836 |
|
18837 |
|
18838 |
|
18839 |
|
18840 |
|
18841 |
|
18842 |
|
18843 |
|
18844 |
|
18845 |
|
18846 |
|
18847 |
|
18848 |
|
18849 |
|
18850 |
|
18851 |
|
18852 |
|
18853 | function isObjectLike(value) {
|
18854 | return value != null && typeof value == 'object';
|
18855 | }
|
18856 |
|
18857 | |
18858 |
|
18859 |
|
18860 |
|
18861 |
|
18862 |
|
18863 |
|
18864 |
|
18865 |
|
18866 |
|
18867 |
|
18868 |
|
18869 |
|
18870 |
|
18871 |
|
18872 |
|
18873 |
|
18874 | var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
18875 |
|
18876 | |
18877 |
|
18878 |
|
18879 |
|
18880 |
|
18881 |
|
18882 |
|
18883 |
|
18884 |
|
18885 |
|
18886 |
|
18887 |
|
18888 |
|
18889 |
|
18890 |
|
18891 |
|
18892 |
|
18893 |
|
18894 |
|
18895 |
|
18896 |
|
18897 |
|
18898 |
|
18899 |
|
18900 |
|
18901 |
|
18902 |
|
18903 |
|
18904 | function isMatch(object, source) {
|
18905 | return object === source || baseIsMatch(object, source, getMatchData(source));
|
18906 | }
|
18907 |
|
18908 | |
18909 |
|
18910 |
|
18911 |
|
18912 |
|
18913 |
|
18914 |
|
18915 |
|
18916 |
|
18917 |
|
18918 |
|
18919 |
|
18920 |
|
18921 |
|
18922 |
|
18923 |
|
18924 |
|
18925 |
|
18926 |
|
18927 |
|
18928 |
|
18929 |
|
18930 |
|
18931 |
|
18932 |
|
18933 |
|
18934 |
|
18935 |
|
18936 |
|
18937 |
|
18938 |
|
18939 |
|
18940 | function isMatchWith(object, source, customizer) {
|
18941 | customizer = typeof customizer == 'function' ? customizer : undefined;
|
18942 | return baseIsMatch(object, source, getMatchData(source), customizer);
|
18943 | }
|
18944 |
|
18945 | |
18946 |
|
18947 |
|
18948 |
|
18949 |
|
18950 |
|
18951 |
|
18952 |
|
18953 |
|
18954 |
|
18955 |
|
18956 |
|
18957 |
|
18958 |
|
18959 |
|
18960 |
|
18961 |
|
18962 |
|
18963 |
|
18964 |
|
18965 |
|
18966 |
|
18967 |
|
18968 |
|
18969 |
|
18970 |
|
18971 |
|
18972 |
|
18973 | function isNaN(value) {
|
18974 |
|
18975 |
|
18976 |
|
18977 | return isNumber(value) && value != +value;
|
18978 | }
|
18979 |
|
18980 | |
18981 |
|
18982 |
|
18983 |
|
18984 |
|
18985 |
|
18986 |
|
18987 |
|
18988 |
|
18989 |
|
18990 |
|
18991 |
|
18992 |
|
18993 |
|
18994 |
|
18995 |
|
18996 |
|
18997 |
|
18998 |
|
18999 |
|
19000 |
|
19001 |
|
19002 |
|
19003 |
|
19004 |
|
19005 |
|
19006 | function isNative(value) {
|
19007 | if (isMaskable(value)) {
|
19008 | throw new Error(CORE_ERROR_TEXT);
|
19009 | }
|
19010 | return baseIsNative(value);
|
19011 | }
|
19012 |
|
19013 | |
19014 |
|
19015 |
|
19016 |
|
19017 |
|
19018 |
|
19019 |
|
19020 |
|
19021 |
|
19022 |
|
19023 |
|
19024 |
|
19025 |
|
19026 |
|
19027 |
|
19028 |
|
19029 |
|
19030 | function isNull(value) {
|
19031 | return value === null;
|
19032 | }
|
19033 |
|
19034 | |
19035 |
|
19036 |
|
19037 |
|
19038 |
|
19039 |
|
19040 |
|
19041 |
|
19042 |
|
19043 |
|
19044 |
|
19045 |
|
19046 |
|
19047 |
|
19048 |
|
19049 |
|
19050 |
|
19051 |
|
19052 |
|
19053 |
|
19054 | function isNil(value) {
|
19055 | return value == null;
|
19056 | }
|
19057 |
|
19058 | |
19059 |
|
19060 |
|
19061 |
|
19062 |
|
19063 |
|
19064 |
|
19065 |
|
19066 |
|
19067 |
|
19068 |
|
19069 |
|
19070 |
|
19071 |
|
19072 |
|
19073 |
|
19074 |
|
19075 |
|
19076 |
|
19077 |
|
19078 |
|
19079 |
|
19080 |
|
19081 |
|
19082 |
|
19083 |
|
19084 | function isNumber(value) {
|
19085 | return typeof value == 'number' ||
|
19086 | (isObjectLike(value) && baseGetTag(value) == numberTag);
|
19087 | }
|
19088 |
|
19089 | |
19090 |
|
19091 |
|
19092 |
|
19093 |
|
19094 |
|
19095 |
|
19096 |
|
19097 |
|
19098 |
|
19099 |
|
19100 |
|
19101 |
|
19102 |
|
19103 |
|
19104 |
|
19105 |
|
19106 |
|
19107 |
|
19108 |
|
19109 |
|
19110 |
|
19111 |
|
19112 |
|
19113 |
|
19114 |
|
19115 |
|
19116 |
|
19117 | function isPlainObject(value) {
|
19118 | if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
|
19119 | return false;
|
19120 | }
|
19121 | var proto = getPrototype(value);
|
19122 | if (proto === null) {
|
19123 | return true;
|
19124 | }
|
19125 | var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
19126 | return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
19127 | funcToString.call(Ctor) == objectCtorString;
|
19128 | }
|
19129 |
|
19130 | |
19131 |
|
19132 |
|
19133 |
|
19134 |
|
19135 |
|
19136 |
|
19137 |
|
19138 |
|
19139 |
|
19140 |
|
19141 |
|
19142 |
|
19143 |
|
19144 |
|
19145 |
|
19146 |
|
19147 | var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
|
19148 |
|
19149 | |
19150 |
|
19151 |
|
19152 |
|
19153 |
|
19154 |
|
19155 |
|
19156 |
|
19157 |
|
19158 |
|
19159 |
|
19160 |
|
19161 |
|
19162 |
|
19163 |
|
19164 |
|
19165 |
|
19166 |
|
19167 |
|
19168 |
|
19169 |
|
19170 |
|
19171 |
|
19172 |
|
19173 |
|
19174 |
|
19175 |
|
19176 | function isSafeInteger(value) {
|
19177 | return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
|
19178 | }
|
19179 |
|
19180 | |
19181 |
|
19182 |
|
19183 |
|
19184 |
|
19185 |
|
19186 |
|
19187 |
|
19188 |
|
19189 |
|
19190 |
|
19191 |
|
19192 |
|
19193 |
|
19194 |
|
19195 |
|
19196 |
|
19197 | var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
19198 |
|
19199 | |
19200 |
|
19201 |
|
19202 |
|
19203 |
|
19204 |
|
19205 |
|
19206 |
|
19207 |
|
19208 |
|
19209 |
|
19210 |
|
19211 |
|
19212 |
|
19213 |
|
19214 |
|
19215 |
|
19216 | function isString(value) {
|
19217 | return typeof value == 'string' ||
|
19218 | (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
|
19219 | }
|
19220 |
|
19221 | |
19222 |
|
19223 |
|
19224 |
|
19225 |
|
19226 |
|
19227 |
|
19228 |
|
19229 |
|
19230 |
|
19231 |
|
19232 |
|
19233 |
|
19234 |
|
19235 |
|
19236 |
|
19237 |
|
19238 | function isSymbol(value) {
|
19239 | return typeof value == 'symbol' ||
|
19240 | (isObjectLike(value) && baseGetTag(value) == symbolTag);
|
19241 | }
|
19242 |
|
19243 | |
19244 |
|
19245 |
|
19246 |
|
19247 |
|
19248 |
|
19249 |
|
19250 |
|
19251 |
|
19252 |
|
19253 |
|
19254 |
|
19255 |
|
19256 |
|
19257 |
|
19258 |
|
19259 |
|
19260 | var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
19261 |
|
19262 | |
19263 |
|
19264 |
|
19265 |
|
19266 |
|
19267 |
|
19268 |
|
19269 |
|
19270 |
|
19271 |
|
19272 |
|
19273 |
|
19274 |
|
19275 |
|
19276 |
|
19277 |
|
19278 |
|
19279 | function isUndefined(value) {
|
19280 | return value === undefined;
|
19281 | }
|
19282 |
|
19283 | |
19284 |
|
19285 |
|
19286 |
|
19287 |
|
19288 |
|
19289 |
|
19290 |
|
19291 |
|
19292 |
|
19293 |
|
19294 |
|
19295 |
|
19296 |
|
19297 |
|
19298 |
|
19299 |
|
19300 | function isWeakMap(value) {
|
19301 | return isObjectLike(value) && getTag(value) == weakMapTag;
|
19302 | }
|
19303 |
|
19304 | |
19305 |
|
19306 |
|
19307 |
|
19308 |
|
19309 |
|
19310 |
|
19311 |
|
19312 |
|
19313 |
|
19314 |
|
19315 |
|
19316 |
|
19317 |
|
19318 |
|
19319 |
|
19320 |
|
19321 | function isWeakSet(value) {
|
19322 | return isObjectLike(value) && baseGetTag(value) == weakSetTag;
|
19323 | }
|
19324 |
|
19325 | |
19326 |
|
19327 |
|
19328 |
|
19329 |
|
19330 |
|
19331 |
|
19332 |
|
19333 |
|
19334 |
|
19335 |
|
19336 |
|
19337 |
|
19338 |
|
19339 |
|
19340 |
|
19341 |
|
19342 |
|
19343 |
|
19344 |
|
19345 |
|
19346 |
|
19347 |
|
19348 | var lt = createRelationalOperation(baseLt);
|
19349 |
|
19350 | |
19351 |
|
19352 |
|
19353 |
|
19354 |
|
19355 |
|
19356 |
|
19357 |
|
19358 |
|
19359 |
|
19360 |
|
19361 |
|
19362 |
|
19363 |
|
19364 |
|
19365 |
|
19366 |
|
19367 |
|
19368 |
|
19369 |
|
19370 |
|
19371 |
|
19372 |
|
19373 | var lte = createRelationalOperation(function(value, other) {
|
19374 | return value <= other;
|
19375 | });
|
19376 |
|
19377 | |
19378 |
|
19379 |
|
19380 |
|
19381 |
|
19382 |
|
19383 |
|
19384 |
|
19385 |
|
19386 |
|
19387 |
|
19388 |
|
19389 |
|
19390 |
|
19391 |
|
19392 |
|
19393 |
|
19394 |
|
19395 |
|
19396 |
|
19397 |
|
19398 |
|
19399 |
|
19400 | function toArray(value) {
|
19401 | if (!value) {
|
19402 | return [];
|
19403 | }
|
19404 | if (isArrayLike(value)) {
|
19405 | return isString(value) ? stringToArray(value) : copyArray(value);
|
19406 | }
|
19407 | if (symIterator && value[symIterator]) {
|
19408 | return iteratorToArray(value[symIterator]());
|
19409 | }
|
19410 | var tag = getTag(value),
|
19411 | func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
|
19412 |
|
19413 | return func(value);
|
19414 | }
|
19415 |
|
19416 | |
19417 |
|
19418 |
|
19419 |
|
19420 |
|
19421 |
|
19422 |
|
19423 |
|
19424 |
|
19425 |
|
19426 |
|
19427 |
|
19428 |
|
19429 |
|
19430 |
|
19431 |
|
19432 |
|
19433 |
|
19434 |
|
19435 |
|
19436 |
|
19437 |
|
19438 |
|
19439 | function toFinite(value) {
|
19440 | if (!value) {
|
19441 | return value === 0 ? value : 0;
|
19442 | }
|
19443 | value = toNumber(value);
|
19444 | if (value === INFINITY || value === -INFINITY) {
|
19445 | var sign = (value < 0 ? -1 : 1);
|
19446 | return sign * MAX_INTEGER;
|
19447 | }
|
19448 | return value === value ? value : 0;
|
19449 | }
|
19450 |
|
19451 | |
19452 |
|
19453 |
|
19454 |
|
19455 |
|
19456 |
|
19457 |
|
19458 |
|
19459 |
|
19460 |
|
19461 |
|
19462 |
|
19463 |
|
19464 |
|
19465 |
|
19466 |
|
19467 |
|
19468 |
|
19469 |
|
19470 |
|
19471 |
|
19472 |
|
19473 |
|
19474 |
|
19475 |
|
19476 |
|
19477 | function toInteger(value) {
|
19478 | var result = toFinite(value),
|
19479 | remainder = result % 1;
|
19480 |
|
19481 | return result === result ? (remainder ? result - remainder : result) : 0;
|
19482 | }
|
19483 |
|
19484 | |
19485 |
|
19486 |
|
19487 |
|
19488 |
|
19489 |
|
19490 |
|
19491 |
|
19492 |
|
19493 |
|
19494 |
|
19495 |
|
19496 |
|
19497 |
|
19498 |
|
19499 |
|
19500 |
|
19501 |
|
19502 |
|
19503 |
|
19504 |
|
19505 |
|
19506 |
|
19507 |
|
19508 |
|
19509 |
|
19510 |
|
19511 | function toLength(value) {
|
19512 | return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
|
19513 | }
|
19514 |
|
19515 | |
19516 |
|
19517 |
|
19518 |
|
19519 |
|
19520 |
|
19521 |
|
19522 |
|
19523 |
|
19524 |
|
19525 |
|
19526 |
|
19527 |
|
19528 |
|
19529 |
|
19530 |
|
19531 |
|
19532 |
|
19533 |
|
19534 |
|
19535 |
|
19536 |
|
19537 |
|
19538 | function toNumber(value) {
|
19539 | if (typeof value == 'number') {
|
19540 | return value;
|
19541 | }
|
19542 | if (isSymbol(value)) {
|
19543 | return NAN;
|
19544 | }
|
19545 | if (isObject(value)) {
|
19546 | var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
19547 | value = isObject(other) ? (other + '') : other;
|
19548 | }
|
19549 | if (typeof value != 'string') {
|
19550 | return value === 0 ? value : +value;
|
19551 | }
|
19552 | value = value.replace(reTrim, '');
|
19553 | var isBinary = reIsBinary.test(value);
|
19554 | return (isBinary || reIsOctal.test(value))
|
19555 | ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
19556 | : (reIsBadHex.test(value) ? NAN : +value);
|
19557 | }
|
19558 |
|
19559 | |
19560 |
|
19561 |
|
19562 |
|
19563 |
|
19564 |
|
19565 |
|
19566 |
|
19567 |
|
19568 |
|
19569 |
|
19570 |
|
19571 |
|
19572 |
|
19573 |
|
19574 |
|
19575 |
|
19576 |
|
19577 |
|
19578 |
|
19579 |
|
19580 |
|
19581 |
|
19582 |
|
19583 | function toPlainObject(value) {
|
19584 | return copyObject(value, keysIn(value));
|
19585 | }
|
19586 |
|
19587 | |
19588 |
|
19589 |
|
19590 |
|
19591 |
|
19592 |
|
19593 |
|
19594 |
|
19595 |
|
19596 |
|
19597 |
|
19598 |
|
19599 |
|
19600 |
|
19601 |
|
19602 |
|
19603 |
|
19604 |
|
19605 |
|
19606 |
|
19607 |
|
19608 |
|
19609 |
|
19610 |
|
19611 | function toSafeInteger(value) {
|
19612 | return value
|
19613 | ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
|
19614 | : (value === 0 ? value : 0);
|
19615 | }
|
19616 |
|
19617 | |
19618 |
|
19619 |
|
19620 |
|
19621 |
|
19622 |
|
19623 |
|
19624 |
|
19625 |
|
19626 |
|
19627 |
|
19628 |
|
19629 |
|
19630 |
|
19631 |
|
19632 |
|
19633 |
|
19634 |
|
19635 |
|
19636 |
|
19637 |
|
19638 | function toString(value) {
|
19639 | return value == null ? '' : baseToString(value);
|
19640 | }
|
19641 |
|
19642 |
|
19643 |
|
19644 | |
19645 |
|
19646 |
|
19647 |
|
19648 |
|
19649 |
|
19650 |
|
19651 |
|
19652 |
|
19653 |
|
19654 |
|
19655 |
|
19656 |
|
19657 |
|
19658 |
|
19659 |
|
19660 |
|
19661 |
|
19662 |
|
19663 |
|
19664 |
|
19665 |
|
19666 |
|
19667 |
|
19668 |
|
19669 |
|
19670 |
|
19671 |
|
19672 |
|
19673 |
|
19674 |
|
19675 |
|
19676 | var assign = createAssigner(function(object, source) {
|
19677 | if (isPrototype(source) || isArrayLike(source)) {
|
19678 | copyObject(source, keys(source), object);
|
19679 | return;
|
19680 | }
|
19681 | for (var key in source) {
|
19682 | if (hasOwnProperty.call(source, key)) {
|
19683 | assignValue(object, key, source[key]);
|
19684 | }
|
19685 | }
|
19686 | });
|
19687 |
|
19688 | |
19689 |
|
19690 |
|
19691 |
|
19692 |
|
19693 |
|
19694 |
|
19695 |
|
19696 |
|
19697 |
|
19698 |
|
19699 |
|
19700 |
|
19701 |
|
19702 |
|
19703 |
|
19704 |
|
19705 |
|
19706 |
|
19707 |
|
19708 |
|
19709 |
|
19710 |
|
19711 |
|
19712 |
|
19713 |
|
19714 |
|
19715 |
|
19716 |
|
19717 |
|
19718 |
|
19719 | var assignIn = createAssigner(function(object, source) {
|
19720 | copyObject(source, keysIn(source), object);
|
19721 | });
|
19722 |
|
19723 | |
19724 |
|
19725 |
|
19726 |
|
19727 |
|
19728 |
|
19729 |
|
19730 |
|
19731 |
|
19732 |
|
19733 |
|
19734 |
|
19735 |
|
19736 |
|
19737 |
|
19738 |
|
19739 |
|
19740 |
|
19741 |
|
19742 |
|
19743 |
|
19744 |
|
19745 |
|
19746 |
|
19747 |
|
19748 |
|
19749 |
|
19750 |
|
19751 |
|
19752 | var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
|
19753 | copyObject(source, keysIn(source), object, customizer);
|
19754 | });
|
19755 |
|
19756 | |
19757 |
|
19758 |
|
19759 |
|
19760 |
|
19761 |
|
19762 |
|
19763 |
|
19764 |
|
19765 |
|
19766 |
|
19767 |
|
19768 |
|
19769 |
|
19770 |
|
19771 |
|
19772 |
|
19773 |
|
19774 |
|
19775 |
|
19776 |
|
19777 |
|
19778 |
|
19779 |
|
19780 |
|
19781 |
|
19782 |
|
19783 |
|
19784 | var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
|
19785 | copyObject(source, keys(source), object, customizer);
|
19786 | });
|
19787 |
|
19788 | |
19789 |
|
19790 |
|
19791 |
|
19792 |
|
19793 |
|
19794 |
|
19795 |
|
19796 |
|
19797 |
|
19798 |
|
19799 |
|
19800 |
|
19801 |
|
19802 |
|
19803 |
|
19804 |
|
19805 | var at = flatRest(baseAt);
|
19806 |
|
19807 | |
19808 |
|
19809 |
|
19810 |
|
19811 |
|
19812 |
|
19813 |
|
19814 |
|
19815 |
|
19816 |
|
19817 |
|
19818 |
|
19819 |
|
19820 |
|
19821 |
|
19822 |
|
19823 |
|
19824 |
|
19825 |
|
19826 |
|
19827 |
|
19828 |
|
19829 |
|
19830 |
|
19831 |
|
19832 |
|
19833 |
|
19834 |
|
19835 |
|
19836 |
|
19837 |
|
19838 |
|
19839 |
|
19840 |
|
19841 | function create(prototype, properties) {
|
19842 | var result = baseCreate(prototype);
|
19843 | return properties == null ? result : baseAssign(result, properties);
|
19844 | }
|
19845 |
|
19846 | |
19847 |
|
19848 |
|
19849 |
|
19850 |
|
19851 |
|
19852 |
|
19853 |
|
19854 |
|
19855 |
|
19856 |
|
19857 |
|
19858 |
|
19859 |
|
19860 |
|
19861 |
|
19862 |
|
19863 |
|
19864 |
|
19865 |
|
19866 |
|
19867 | var defaults = baseRest(function(args) {
|
19868 | args.push(undefined, customDefaultsAssignIn);
|
19869 | return apply(assignInWith, undefined, args);
|
19870 | });
|
19871 |
|
19872 | |
19873 |
|
19874 |
|
19875 |
|
19876 |
|
19877 |
|
19878 |
|
19879 |
|
19880 |
|
19881 |
|
19882 |
|
19883 |
|
19884 |
|
19885 |
|
19886 |
|
19887 |
|
19888 |
|
19889 |
|
19890 |
|
19891 | var defaultsDeep = baseRest(function(args) {
|
19892 | args.push(undefined, customDefaultsMerge);
|
19893 | return apply(mergeWith, undefined, args);
|
19894 | });
|
19895 |
|
19896 | |
19897 |
|
19898 |
|
19899 |
|
19900 |
|
19901 |
|
19902 |
|
19903 |
|
19904 |
|
19905 |
|
19906 |
|
19907 |
|
19908 |
|
19909 |
|
19910 |
|
19911 |
|
19912 |
|
19913 |
|
19914 |
|
19915 |
|
19916 |
|
19917 |
|
19918 |
|
19919 |
|
19920 |
|
19921 |
|
19922 |
|
19923 |
|
19924 |
|
19925 |
|
19926 |
|
19927 |
|
19928 |
|
19929 |
|
19930 |
|
19931 | function findKey(object, predicate) {
|
19932 | return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
|
19933 | }
|
19934 |
|
19935 | |
19936 |
|
19937 |
|
19938 |
|
19939 |
|
19940 |
|
19941 |
|
19942 |
|
19943 |
|
19944 |
|
19945 |
|
19946 |
|
19947 |
|
19948 |
|
19949 |
|
19950 |
|
19951 |
|
19952 |
|
19953 |
|
19954 |
|
19955 |
|
19956 |
|
19957 |
|
19958 |
|
19959 |
|
19960 |
|
19961 |
|
19962 |
|
19963 |
|
19964 |
|
19965 |
|
19966 |
|
19967 |
|
19968 |
|
19969 |
|
19970 | function findLastKey(object, predicate) {
|
19971 | return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
|
19972 | }
|
19973 |
|
19974 | |
19975 |
|
19976 |
|
19977 |
|
19978 |
|
19979 |
|
19980 |
|
19981 |
|
19982 |
|
19983 |
|
19984 |
|
19985 |
|
19986 |
|
19987 |
|
19988 |
|
19989 |
|
19990 |
|
19991 |
|
19992 |
|
19993 |
|
19994 |
|
19995 |
|
19996 |
|
19997 |
|
19998 |
|
19999 |
|
20000 |
|
20001 |
|
20002 | function forIn(object, iteratee) {
|
20003 | return object == null
|
20004 | ? object
|
20005 | : baseFor(object, getIteratee(iteratee, 3), keysIn);
|
20006 | }
|
20007 |
|
20008 | |
20009 |
|
20010 |
|
20011 |
|
20012 |
|
20013 |
|
20014 |
|
20015 |
|
20016 |
|
20017 |
|
20018 |
|
20019 |
|
20020 |
|
20021 |
|
20022 |
|
20023 |
|
20024 |
|
20025 |
|
20026 |
|
20027 |
|
20028 |
|
20029 |
|
20030 |
|
20031 |
|
20032 |
|
20033 |
|
20034 | function forInRight(object, iteratee) {
|
20035 | return object == null
|
20036 | ? object
|
20037 | : baseForRight(object, getIteratee(iteratee, 3), keysIn);
|
20038 | }
|
20039 |
|
20040 | |
20041 |
|
20042 |
|
20043 |
|
20044 |
|
20045 |
|
20046 |
|
20047 |
|
20048 |
|
20049 |
|
20050 |
|
20051 |
|
20052 |
|
20053 |
|
20054 |
|
20055 |
|
20056 |
|
20057 |
|
20058 |
|
20059 |
|
20060 |
|
20061 |
|
20062 |
|
20063 |
|
20064 |
|
20065 |
|
20066 |
|
20067 |
|
20068 | function forOwn(object, iteratee) {
|
20069 | return object && baseForOwn(object, getIteratee(iteratee, 3));
|
20070 | }
|
20071 |
|
20072 | |
20073 |
|
20074 |
|
20075 |
|
20076 |
|
20077 |
|
20078 |
|
20079 |
|
20080 |
|
20081 |
|
20082 |
|
20083 |
|
20084 |
|
20085 |
|
20086 |
|
20087 |
|
20088 |
|
20089 |
|
20090 |
|
20091 |
|
20092 |
|
20093 |
|
20094 |
|
20095 |
|
20096 |
|
20097 |
|
20098 | function forOwnRight(object, iteratee) {
|
20099 | return object && baseForOwnRight(object, getIteratee(iteratee, 3));
|
20100 | }
|
20101 |
|
20102 | |
20103 |
|
20104 |
|
20105 |
|
20106 |
|
20107 |
|
20108 |
|
20109 |
|
20110 |
|
20111 |
|
20112 |
|
20113 |
|
20114 |
|
20115 |
|
20116 |
|
20117 |
|
20118 |
|
20119 |
|
20120 |
|
20121 |
|
20122 |
|
20123 |
|
20124 |
|
20125 | function functions(object) {
|
20126 | return object == null ? [] : baseFunctions(object, keys(object));
|
20127 | }
|
20128 |
|
20129 | |
20130 |
|
20131 |
|
20132 |
|
20133 |
|
20134 |
|
20135 |
|
20136 |
|
20137 |
|
20138 |
|
20139 |
|
20140 |
|
20141 |
|
20142 |
|
20143 |
|
20144 |
|
20145 |
|
20146 |
|
20147 |
|
20148 |
|
20149 |
|
20150 |
|
20151 |
|
20152 | function functionsIn(object) {
|
20153 | return object == null ? [] : baseFunctions(object, keysIn(object));
|
20154 | }
|
20155 |
|
20156 | |
20157 |
|
20158 |
|
20159 |
|
20160 |
|
20161 |
|
20162 |
|
20163 |
|
20164 |
|
20165 |
|
20166 |
|
20167 |
|
20168 |
|
20169 |
|
20170 |
|
20171 |
|
20172 |
|
20173 |
|
20174 |
|
20175 |
|
20176 |
|
20177 |
|
20178 |
|
20179 |
|
20180 |
|
20181 | function get(object, path, defaultValue) {
|
20182 | var result = object == null ? undefined : baseGet(object, path);
|
20183 | return result === undefined ? defaultValue : result;
|
20184 | }
|
20185 |
|
20186 | |
20187 |
|
20188 |
|
20189 |
|
20190 |
|
20191 |
|
20192 |
|
20193 |
|
20194 |
|
20195 |
|
20196 |
|
20197 |
|
20198 |
|
20199 |
|
20200 |
|
20201 |
|
20202 |
|
20203 |
|
20204 |
|
20205 |
|
20206 |
|
20207 |
|
20208 |
|
20209 |
|
20210 |
|
20211 |
|
20212 |
|
20213 | function has(object, path) {
|
20214 | return object != null && hasPath(object, path, baseHas);
|
20215 | }
|
20216 |
|
20217 | |
20218 |
|
20219 |
|
20220 |
|
20221 |
|
20222 |
|
20223 |
|
20224 |
|
20225 |
|
20226 |
|
20227 |
|
20228 |
|
20229 |
|
20230 |
|
20231 |
|
20232 |
|
20233 |
|
20234 |
|
20235 |
|
20236 |
|
20237 |
|
20238 |
|
20239 |
|
20240 |
|
20241 |
|
20242 |
|
20243 | function hasIn(object, path) {
|
20244 | return object != null && hasPath(object, path, baseHasIn);
|
20245 | }
|
20246 |
|
20247 | |
20248 |
|
20249 |
|
20250 |
|
20251 |
|
20252 |
|
20253 |
|
20254 |
|
20255 |
|
20256 |
|
20257 |
|
20258 |
|
20259 |
|
20260 |
|
20261 |
|
20262 |
|
20263 |
|
20264 |
|
20265 | var invert = createInverter(function(result, value, key) {
|
20266 | result[value] = key;
|
20267 | }, constant(identity));
|
20268 |
|
20269 | |
20270 |
|
20271 |
|
20272 |
|
20273 |
|
20274 |
|
20275 |
|
20276 |
|
20277 |
|
20278 |
|
20279 |
|
20280 |
|
20281 |
|
20282 |
|
20283 |
|
20284 |
|
20285 |
|
20286 |
|
20287 |
|
20288 |
|
20289 |
|
20290 |
|
20291 |
|
20292 |
|
20293 |
|
20294 |
|
20295 | var invertBy = createInverter(function(result, value, key) {
|
20296 | if (hasOwnProperty.call(result, value)) {
|
20297 | result[value].push(key);
|
20298 | } else {
|
20299 | result[value] = [key];
|
20300 | }
|
20301 | }, getIteratee);
|
20302 |
|
20303 | |
20304 |
|
20305 |
|
20306 |
|
20307 |
|
20308 |
|
20309 |
|
20310 |
|
20311 |
|
20312 |
|
20313 |
|
20314 |
|
20315 |
|
20316 |
|
20317 |
|
20318 |
|
20319 |
|
20320 |
|
20321 | var invoke = baseRest(baseInvoke);
|
20322 |
|
20323 | |
20324 |
|
20325 |
|
20326 |
|
20327 |
|
20328 |
|
20329 |
|
20330 |
|
20331 |
|
20332 |
|
20333 |
|
20334 |
|
20335 |
|
20336 |
|
20337 |
|
20338 |
|
20339 |
|
20340 |
|
20341 |
|
20342 |
|
20343 |
|
20344 |
|
20345 |
|
20346 |
|
20347 |
|
20348 |
|
20349 |
|
20350 |
|
20351 | function keys(object) {
|
20352 | return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
20353 | }
|
20354 |
|
20355 | |
20356 |
|
20357 |
|
20358 |
|
20359 |
|
20360 |
|
20361 |
|
20362 |
|
20363 |
|
20364 |
|
20365 |
|
20366 |
|
20367 |
|
20368 |
|
20369 |
|
20370 |
|
20371 |
|
20372 |
|
20373 |
|
20374 |
|
20375 |
|
20376 |
|
20377 |
|
20378 | function keysIn(object) {
|
20379 | return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
20380 | }
|
20381 |
|
20382 | |
20383 |
|
20384 |
|
20385 |
|
20386 |
|
20387 |
|
20388 |
|
20389 |
|
20390 |
|
20391 |
|
20392 |
|
20393 |
|
20394 |
|
20395 |
|
20396 |
|
20397 |
|
20398 |
|
20399 |
|
20400 |
|
20401 |
|
20402 |
|
20403 | function mapKeys(object, iteratee) {
|
20404 | var result = {};
|
20405 | iteratee = getIteratee(iteratee, 3);
|
20406 |
|
20407 | baseForOwn(object, function(value, key, object) {
|
20408 | baseAssignValue(result, iteratee(value, key, object), value);
|
20409 | });
|
20410 | return result;
|
20411 | }
|
20412 |
|
20413 | |
20414 |
|
20415 |
|
20416 |
|
20417 |
|
20418 |
|
20419 |
|
20420 |
|
20421 |
|
20422 |
|
20423 |
|
20424 |
|
20425 |
|
20426 |
|
20427 |
|
20428 |
|
20429 |
|
20430 |
|
20431 |
|
20432 |
|
20433 |
|
20434 |
|
20435 |
|
20436 |
|
20437 |
|
20438 |
|
20439 |
|
20440 |
|
20441 | function mapValues(object, iteratee) {
|
20442 | var result = {};
|
20443 | iteratee = getIteratee(iteratee, 3);
|
20444 |
|
20445 | baseForOwn(object, function(value, key, object) {
|
20446 | baseAssignValue(result, key, iteratee(value, key, object));
|
20447 | });
|
20448 | return result;
|
20449 | }
|
20450 |
|
20451 | |
20452 |
|
20453 |
|
20454 |
|
20455 |
|
20456 |
|
20457 |
|
20458 |
|
20459 |
|
20460 |
|
20461 |
|
20462 |
|
20463 |
|
20464 |
|
20465 |
|
20466 |
|
20467 |
|
20468 |
|
20469 |
|
20470 |
|
20471 |
|
20472 |
|
20473 |
|
20474 |
|
20475 |
|
20476 |
|
20477 |
|
20478 |
|
20479 |
|
20480 |
|
20481 |
|
20482 | var merge = createAssigner(function(object, source, srcIndex) {
|
20483 | baseMerge(object, source, srcIndex);
|
20484 | });
|
20485 |
|
20486 | |
20487 |
|
20488 |
|
20489 |
|
20490 |
|
20491 |
|
20492 |
|
20493 |
|
20494 |
|
20495 |
|
20496 |
|
20497 |
|
20498 |
|
20499 |
|
20500 |
|
20501 |
|
20502 |
|
20503 |
|
20504 |
|
20505 |
|
20506 |
|
20507 |
|
20508 |
|
20509 |
|
20510 |
|
20511 |
|
20512 |
|
20513 |
|
20514 |
|
20515 |
|
20516 |
|
20517 | var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
|
20518 | baseMerge(object, source, srcIndex, customizer);
|
20519 | });
|
20520 |
|
20521 | |
20522 |
|
20523 |
|
20524 |
|
20525 |
|
20526 |
|
20527 |
|
20528 |
|
20529 |
|
20530 |
|
20531 |
|
20532 |
|
20533 |
|
20534 |
|
20535 |
|
20536 |
|
20537 |
|
20538 |
|
20539 |
|
20540 |
|
20541 | var omit = flatRest(function(object, paths) {
|
20542 | var result = {};
|
20543 | if (object == null) {
|
20544 | return result;
|
20545 | }
|
20546 | var isDeep = false;
|
20547 | paths = arrayMap(paths, function(path) {
|
20548 | path = castPath(path, object);
|
20549 | isDeep || (isDeep = path.length > 1);
|
20550 | return path;
|
20551 | });
|
20552 | copyObject(object, getAllKeysIn(object), result);
|
20553 | if (isDeep) {
|
20554 | result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
|
20555 | }
|
20556 | var length = paths.length;
|
20557 | while (length--) {
|
20558 | baseUnset(result, paths[length]);
|
20559 | }
|
20560 | return result;
|
20561 | });
|
20562 |
|
20563 | |
20564 |
|
20565 |
|
20566 |
|
20567 |
|
20568 |
|
20569 |
|
20570 |
|
20571 |
|
20572 |
|
20573 |
|
20574 |
|
20575 |
|
20576 |
|
20577 |
|
20578 |
|
20579 |
|
20580 |
|
20581 |
|
20582 |
|
20583 | function omitBy(object, predicate) {
|
20584 | return pickBy(object, negate(getIteratee(predicate)));
|
20585 | }
|
20586 |
|
20587 | |
20588 |
|
20589 |
|
20590 |
|
20591 |
|
20592 |
|
20593 |
|
20594 |
|
20595 |
|
20596 |
|
20597 |
|
20598 |
|
20599 |
|
20600 |
|
20601 |
|
20602 |
|
20603 |
|
20604 | var pick = flatRest(function(object, paths) {
|
20605 | return object == null ? {} : basePick(object, paths);
|
20606 | });
|
20607 |
|
20608 | |
20609 |
|
20610 |
|
20611 |
|
20612 |
|
20613 |
|
20614 |
|
20615 |
|
20616 |
|
20617 |
|
20618 |
|
20619 |
|
20620 |
|
20621 |
|
20622 |
|
20623 |
|
20624 |
|
20625 |
|
20626 | function pickBy(object, predicate) {
|
20627 | if (object == null) {
|
20628 | return {};
|
20629 | }
|
20630 | var props = arrayMap(getAllKeysIn(object), function(prop) {
|
20631 | return [prop];
|
20632 | });
|
20633 | predicate = getIteratee(predicate);
|
20634 | return basePickBy(object, props, function(value, path) {
|
20635 | return predicate(value, path[0]);
|
20636 | });
|
20637 | }
|
20638 |
|
20639 | |
20640 |
|
20641 |
|
20642 |
|
20643 |
|
20644 |
|
20645 |
|
20646 |
|
20647 |
|
20648 |
|
20649 |
|
20650 |
|
20651 |
|
20652 |
|
20653 |
|
20654 |
|
20655 |
|
20656 |
|
20657 |
|
20658 |
|
20659 |
|
20660 |
|
20661 |
|
20662 |
|
20663 |
|
20664 |
|
20665 |
|
20666 |
|
20667 |
|
20668 | function result(object, path, defaultValue) {
|
20669 | path = castPath(path, object);
|
20670 |
|
20671 | var index = -1,
|
20672 | length = path.length;
|
20673 |
|
20674 |
|
20675 | if (!length) {
|
20676 | length = 1;
|
20677 | object = undefined;
|
20678 | }
|
20679 | while (++index < length) {
|
20680 | var value = object == null ? undefined : object[toKey(path[index])];
|
20681 | if (value === undefined) {
|
20682 | index = length;
|
20683 | value = defaultValue;
|
20684 | }
|
20685 | object = isFunction(value) ? value.call(object) : value;
|
20686 | }
|
20687 | return object;
|
20688 | }
|
20689 |
|
20690 | |
20691 |
|
20692 |
|
20693 |
|
20694 |
|
20695 |
|
20696 |
|
20697 |
|
20698 |
|
20699 |
|
20700 |
|
20701 |
|
20702 |
|
20703 |
|
20704 |
|
20705 |
|
20706 |
|
20707 |
|
20708 |
|
20709 |
|
20710 |
|
20711 |
|
20712 |
|
20713 |
|
20714 |
|
20715 |
|
20716 |
|
20717 |
|
20718 | function set(object, path, value) {
|
20719 | return object == null ? object : baseSet(object, path, value);
|
20720 | }
|
20721 |
|
20722 | |
20723 |
|
20724 |
|
20725 |
|
20726 |
|
20727 |
|
20728 |
|
20729 |
|
20730 |
|
20731 |
|
20732 |
|
20733 |
|
20734 |
|
20735 |
|
20736 |
|
20737 |
|
20738 |
|
20739 |
|
20740 |
|
20741 |
|
20742 |
|
20743 |
|
20744 |
|
20745 |
|
20746 | function setWith(object, path, value, customizer) {
|
20747 | customizer = typeof customizer == 'function' ? customizer : undefined;
|
20748 | return object == null ? object : baseSet(object, path, value, customizer);
|
20749 | }
|
20750 |
|
20751 | |
20752 |
|
20753 |
|
20754 |
|
20755 |
|
20756 |
|
20757 |
|
20758 |
|
20759 |
|
20760 |
|
20761 |
|
20762 |
|
20763 |
|
20764 |
|
20765 |
|
20766 |
|
20767 |
|
20768 |
|
20769 |
|
20770 |
|
20771 |
|
20772 |
|
20773 |
|
20774 |
|
20775 | var toPairs = createToPairs(keys);
|
20776 |
|
20777 | |
20778 |
|
20779 |
|
20780 |
|
20781 |
|
20782 |
|
20783 |
|
20784 |
|
20785 |
|
20786 |
|
20787 |
|
20788 |
|
20789 |
|
20790 |
|
20791 |
|
20792 |
|
20793 |
|
20794 |
|
20795 |
|
20796 |
|
20797 |
|
20798 |
|
20799 |
|
20800 |
|
20801 | var toPairsIn = createToPairs(keysIn);
|
20802 |
|
20803 | |
20804 |
|
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 |
|
20831 |
|
20832 |
|
20833 | function transform(object, iteratee, accumulator) {
|
20834 | var isArr = isArray(object),
|
20835 | isArrLike = isArr || isBuffer(object) || isTypedArray(object);
|
20836 |
|
20837 | iteratee = getIteratee(iteratee, 4);
|
20838 | if (accumulator == null) {
|
20839 | var Ctor = object && object.constructor;
|
20840 | if (isArrLike) {
|
20841 | accumulator = isArr ? new Ctor : [];
|
20842 | }
|
20843 | else if (isObject(object)) {
|
20844 | accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
|
20845 | }
|
20846 | else {
|
20847 | accumulator = {};
|
20848 | }
|
20849 | }
|
20850 | (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
|
20851 | return iteratee(accumulator, value, index, object);
|
20852 | });
|
20853 | return accumulator;
|
20854 | }
|
20855 |
|
20856 | |
20857 |
|
20858 |
|
20859 |
|
20860 |
|
20861 |
|
20862 |
|
20863 |
|
20864 |
|
20865 |
|
20866 |
|
20867 |
|
20868 |
|
20869 |
|
20870 |
|
20871 |
|
20872 |
|
20873 |
|
20874 |
|
20875 |
|
20876 |
|
20877 |
|
20878 |
|
20879 |
|
20880 |
|
20881 |
|
20882 |
|
20883 | function unset(object, path) {
|
20884 | return object == null ? true : baseUnset(object, path);
|
20885 | }
|
20886 |
|
20887 | |
20888 |
|
20889 |
|
20890 |
|
20891 |
|
20892 |
|
20893 |
|
20894 |
|
20895 |
|
20896 |
|
20897 |
|
20898 |
|
20899 |
|
20900 |
|
20901 |
|
20902 |
|
20903 |
|
20904 |
|
20905 |
|
20906 |
|
20907 |
|
20908 |
|
20909 |
|
20910 |
|
20911 |
|
20912 |
|
20913 |
|
20914 | function update(object, path, updater) {
|
20915 | return object == null ? object : baseUpdate(object, path, castFunction(updater));
|
20916 | }
|
20917 |
|
20918 | |
20919 |
|
20920 |
|
20921 |
|
20922 |
|
20923 |
|
20924 |
|
20925 |
|
20926 |
|
20927 |
|
20928 |
|
20929 |
|
20930 |
|
20931 |
|
20932 |
|
20933 |
|
20934 |
|
20935 |
|
20936 |
|
20937 |
|
20938 |
|
20939 |
|
20940 |
|
20941 |
|
20942 | function updateWith(object, path, updater, customizer) {
|
20943 | customizer = typeof customizer == 'function' ? customizer : undefined;
|
20944 | return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
|
20945 | }
|
20946 |
|
20947 | |
20948 |
|
20949 |
|
20950 |
|
20951 |
|
20952 |
|
20953 |
|
20954 |
|
20955 |
|
20956 |
|
20957 |
|
20958 |
|
20959 |
|
20960 |
|
20961 |
|
20962 |
|
20963 |
|
20964 |
|
20965 |
|
20966 |
|
20967 |
|
20968 |
|
20969 |
|
20970 |
|
20971 |
|
20972 |
|
20973 | function values(object) {
|
20974 | return object == null ? [] : baseValues(object, keys(object));
|
20975 | }
|
20976 |
|
20977 | |
20978 |
|
20979 |
|
20980 |
|
20981 |
|
20982 |
|
20983 |
|
20984 |
|
20985 |
|
20986 |
|
20987 |
|
20988 |
|
20989 |
|
20990 |
|
20991 |
|
20992 |
|
20993 |
|
20994 |
|
20995 |
|
20996 |
|
20997 |
|
20998 |
|
20999 |
|
21000 |
|
21001 | function valuesIn(object) {
|
21002 | return object == null ? [] : baseValues(object, keysIn(object));
|
21003 | }
|
21004 |
|
21005 |
|
21006 |
|
21007 | |
21008 |
|
21009 |
|
21010 |
|
21011 |
|
21012 |
|
21013 |
|
21014 |
|
21015 |
|
21016 |
|
21017 |
|
21018 |
|
21019 |
|
21020 |
|
21021 |
|
21022 |
|
21023 |
|
21024 |
|
21025 |
|
21026 | function clamp(number, lower, upper) {
|
21027 | if (upper === undefined) {
|
21028 | upper = lower;
|
21029 | lower = undefined;
|
21030 | }
|
21031 | if (upper !== undefined) {
|
21032 | upper = toNumber(upper);
|
21033 | upper = upper === upper ? upper : 0;
|
21034 | }
|
21035 | if (lower !== undefined) {
|
21036 | lower = toNumber(lower);
|
21037 | lower = lower === lower ? lower : 0;
|
21038 | }
|
21039 | return baseClamp(toNumber(number), lower, upper);
|
21040 | }
|
21041 |
|
21042 | |
21043 |
|
21044 |
|
21045 |
|
21046 |
|
21047 |
|
21048 |
|
21049 |
|
21050 |
|
21051 |
|
21052 |
|
21053 |
|
21054 |
|
21055 |
|
21056 |
|
21057 |
|
21058 |
|
21059 |
|
21060 |
|
21061 |
|
21062 |
|
21063 |
|
21064 |
|
21065 |
|
21066 |
|
21067 |
|
21068 |
|
21069 |
|
21070 |
|
21071 |
|
21072 |
|
21073 |
|
21074 |
|
21075 |
|
21076 |
|
21077 |
|
21078 |
|
21079 |
|
21080 | function inRange(number, start, end) {
|
21081 | start = toFinite(start);
|
21082 | if (end === undefined) {
|
21083 | end = start;
|
21084 | start = 0;
|
21085 | } else {
|
21086 | end = toFinite(end);
|
21087 | }
|
21088 | number = toNumber(number);
|
21089 | return baseInRange(number, start, end);
|
21090 | }
|
21091 |
|
21092 | |
21093 |
|
21094 |
|
21095 |
|
21096 |
|
21097 |
|
21098 |
|
21099 |
|
21100 |
|
21101 |
|
21102 |
|
21103 |
|
21104 |
|
21105 |
|
21106 |
|
21107 |
|
21108 |
|
21109 |
|
21110 |
|
21111 |
|
21112 |
|
21113 |
|
21114 |
|
21115 |
|
21116 |
|
21117 |
|
21118 |
|
21119 |
|
21120 |
|
21121 |
|
21122 |
|
21123 | function random(lower, upper, floating) {
|
21124 | if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
|
21125 | upper = floating = undefined;
|
21126 | }
|
21127 | if (floating === undefined) {
|
21128 | if (typeof upper == 'boolean') {
|
21129 | floating = upper;
|
21130 | upper = undefined;
|
21131 | }
|
21132 | else if (typeof lower == 'boolean') {
|
21133 | floating = lower;
|
21134 | lower = undefined;
|
21135 | }
|
21136 | }
|
21137 | if (lower === undefined && upper === undefined) {
|
21138 | lower = 0;
|
21139 | upper = 1;
|
21140 | }
|
21141 | else {
|
21142 | lower = toFinite(lower);
|
21143 | if (upper === undefined) {
|
21144 | upper = lower;
|
21145 | lower = 0;
|
21146 | } else {
|
21147 | upper = toFinite(upper);
|
21148 | }
|
21149 | }
|
21150 | if (lower > upper) {
|
21151 | var temp = lower;
|
21152 | lower = upper;
|
21153 | upper = temp;
|
21154 | }
|
21155 | if (floating || lower % 1 || upper % 1) {
|
21156 | var rand = nativeRandom();
|
21157 | return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
|
21158 | }
|
21159 | return baseRandom(lower, upper);
|
21160 | }
|
21161 |
|
21162 |
|
21163 |
|
21164 | |
21165 |
|
21166 |
|
21167 |
|
21168 |
|
21169 |
|
21170 |
|
21171 |
|
21172 |
|
21173 |
|
21174 |
|
21175 |
|
21176 |
|
21177 |
|
21178 |
|
21179 |
|
21180 |
|
21181 |
|
21182 |
|
21183 |
|
21184 | var camelCase = createCompounder(function(result, word, index) {
|
21185 | word = word.toLowerCase();
|
21186 | return result + (index ? capitalize(word) : word);
|
21187 | });
|
21188 |
|
21189 | |
21190 |
|
21191 |
|
21192 |
|
21193 |
|
21194 |
|
21195 |
|
21196 |
|
21197 |
|
21198 |
|
21199 |
|
21200 |
|
21201 |
|
21202 |
|
21203 |
|
21204 | function capitalize(string) {
|
21205 | return upperFirst(toString(string).toLowerCase());
|
21206 | }
|
21207 |
|
21208 | |
21209 |
|
21210 |
|
21211 |
|
21212 |
|
21213 |
|
21214 |
|
21215 |
|
21216 |
|
21217 |
|
21218 |
|
21219 |
|
21220 |
|
21221 |
|
21222 |
|
21223 |
|
21224 |
|
21225 |
|
21226 | function deburr(string) {
|
21227 | string = toString(string);
|
21228 | return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
|
21229 | }
|
21230 |
|
21231 | |
21232 |
|
21233 |
|
21234 |
|
21235 |
|
21236 |
|
21237 |
|
21238 |
|
21239 |
|
21240 |
|
21241 |
|
21242 |
|
21243 |
|
21244 |
|
21245 |
|
21246 |
|
21247 |
|
21248 |
|
21249 |
|
21250 |
|
21251 |
|
21252 |
|
21253 |
|
21254 | function endsWith(string, target, position) {
|
21255 | string = toString(string);
|
21256 | target = baseToString(target);
|
21257 |
|
21258 | var length = string.length;
|
21259 | position = position === undefined
|
21260 | ? length
|
21261 | : baseClamp(toInteger(position), 0, length);
|
21262 |
|
21263 | var end = position;
|
21264 | position -= target.length;
|
21265 | return position >= 0 && string.slice(position, end) == target;
|
21266 | }
|
21267 |
|
21268 | |
21269 |
|
21270 |
|
21271 |
|
21272 |
|
21273 |
|
21274 |
|
21275 |
|
21276 |
|
21277 |
|
21278 |
|
21279 |
|
21280 |
|
21281 |
|
21282 |
|
21283 |
|
21284 |
|
21285 |
|
21286 |
|
21287 |
|
21288 |
|
21289 |
|
21290 |
|
21291 |
|
21292 |
|
21293 |
|
21294 |
|
21295 |
|
21296 | function escape(string) {
|
21297 | string = toString(string);
|
21298 | return (string && reHasUnescapedHtml.test(string))
|
21299 | ? string.replace(reUnescapedHtml, escapeHtmlChar)
|
21300 | : string;
|
21301 | }
|
21302 |
|
21303 | |
21304 |
|
21305 |
|
21306 |
|
21307 |
|
21308 |
|
21309 |
|
21310 |
|
21311 |
|
21312 |
|
21313 |
|
21314 |
|
21315 |
|
21316 |
|
21317 |
|
21318 | function escapeRegExp(string) {
|
21319 | string = toString(string);
|
21320 | return (string && reHasRegExpChar.test(string))
|
21321 | ? string.replace(reRegExpChar, '\\$&')
|
21322 | : string;
|
21323 | }
|
21324 |
|
21325 | |
21326 |
|
21327 |
|
21328 |
|
21329 |
|
21330 |
|
21331 |
|
21332 |
|
21333 |
|
21334 |
|
21335 |
|
21336 |
|
21337 |
|
21338 |
|
21339 |
|
21340 |
|
21341 |
|
21342 |
|
21343 |
|
21344 |
|
21345 |
|
21346 | var kebabCase = createCompounder(function(result, word, index) {
|
21347 | return result + (index ? '-' : '') + word.toLowerCase();
|
21348 | });
|
21349 |
|
21350 | |
21351 |
|
21352 |
|
21353 |
|
21354 |
|
21355 |
|
21356 |
|
21357 |
|
21358 |
|
21359 |
|
21360 |
|
21361 |
|
21362 |
|
21363 |
|
21364 |
|
21365 |
|
21366 |
|
21367 |
|
21368 |
|
21369 |
|
21370 | var lowerCase = createCompounder(function(result, word, index) {
|
21371 | return result + (index ? ' ' : '') + word.toLowerCase();
|
21372 | });
|
21373 |
|
21374 | |
21375 |
|
21376 |
|
21377 |
|
21378 |
|
21379 |
|
21380 |
|
21381 |
|
21382 |
|
21383 |
|
21384 |
|
21385 |
|
21386 |
|
21387 |
|
21388 |
|
21389 |
|
21390 |
|
21391 | var lowerFirst = createCaseFirst('toLowerCase');
|
21392 |
|
21393 | |
21394 |
|
21395 |
|
21396 |
|
21397 |
|
21398 |
|
21399 |
|
21400 |
|
21401 |
|
21402 |
|
21403 |
|
21404 |
|
21405 |
|
21406 |
|
21407 |
|
21408 |
|
21409 |
|
21410 |
|
21411 |
|
21412 |
|
21413 |
|
21414 |
|
21415 |
|
21416 | function pad(string, length, chars) {
|
21417 | string = toString(string);
|
21418 | length = toInteger(length);
|
21419 |
|
21420 | var strLength = length ? stringSize(string) : 0;
|
21421 | if (!length || strLength >= length) {
|
21422 | return string;
|
21423 | }
|
21424 | var mid = (length - strLength) / 2;
|
21425 | return (
|
21426 | createPadding(nativeFloor(mid), chars) +
|
21427 | string +
|
21428 | createPadding(nativeCeil(mid), chars)
|
21429 | );
|
21430 | }
|
21431 |
|
21432 | |
21433 |
|
21434 |
|
21435 |
|
21436 |
|
21437 |
|
21438 |
|
21439 |
|
21440 |
|
21441 |
|
21442 |
|
21443 |
|
21444 |
|
21445 |
|
21446 |
|
21447 |
|
21448 |
|
21449 |
|
21450 |
|
21451 |
|
21452 |
|
21453 |
|
21454 |
|
21455 | function padEnd(string, length, chars) {
|
21456 | string = toString(string);
|
21457 | length = toInteger(length);
|
21458 |
|
21459 | var strLength = length ? stringSize(string) : 0;
|
21460 | return (length && strLength < length)
|
21461 | ? (string + createPadding(length - strLength, chars))
|
21462 | : string;
|
21463 | }
|
21464 |
|
21465 | |
21466 |
|
21467 |
|
21468 |
|
21469 |
|
21470 |
|
21471 |
|
21472 |
|
21473 |
|
21474 |
|
21475 |
|
21476 |
|
21477 |
|
21478 |
|
21479 |
|
21480 |
|
21481 |
|
21482 |
|
21483 |
|
21484 |
|
21485 |
|
21486 |
|
21487 |
|
21488 | function padStart(string, length, chars) {
|
21489 | string = toString(string);
|
21490 | length = toInteger(length);
|
21491 |
|
21492 | var strLength = length ? stringSize(string) : 0;
|
21493 | return (length && strLength < length)
|
21494 | ? (createPadding(length - strLength, chars) + string)
|
21495 | : string;
|
21496 | }
|
21497 |
|
21498 | |
21499 |
|
21500 |
|
21501 |
|
21502 |
|
21503 |
|
21504 |
|
21505 |
|
21506 |
|
21507 |
|
21508 |
|
21509 |
|
21510 |
|
21511 |
|
21512 |
|
21513 |
|
21514 |
|
21515 |
|
21516 |
|
21517 |
|
21518 |
|
21519 |
|
21520 |
|
21521 |
|
21522 | function parseInt(string, radix, guard) {
|
21523 | if (guard || radix == null) {
|
21524 | radix = 0;
|
21525 | } else if (radix) {
|
21526 | radix = +radix;
|
21527 | }
|
21528 | return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
|
21529 | }
|
21530 |
|
21531 | |
21532 |
|
21533 |
|
21534 |
|
21535 |
|
21536 |
|
21537 |
|
21538 |
|
21539 |
|
21540 |
|
21541 |
|
21542 |
|
21543 |
|
21544 |
|
21545 |
|
21546 |
|
21547 |
|
21548 |
|
21549 |
|
21550 |
|
21551 |
|
21552 |
|
21553 | function repeat(string, n, guard) {
|
21554 | if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
|
21555 | n = 1;
|
21556 | } else {
|
21557 | n = toInteger(n);
|
21558 | }
|
21559 | return baseRepeat(toString(string), n);
|
21560 | }
|
21561 |
|
21562 | |
21563 |
|
21564 |
|
21565 |
|
21566 |
|
21567 |
|
21568 |
|
21569 |
|
21570 |
|
21571 |
|
21572 |
|
21573 |
|
21574 |
|
21575 |
|
21576 |
|
21577 |
|
21578 |
|
21579 |
|
21580 |
|
21581 | function replace() {
|
21582 | var args = arguments,
|
21583 | string = toString(args[0]);
|
21584 |
|
21585 | return args.length < 3 ? string : string.replace(args[1], args[2]);
|
21586 | }
|
21587 |
|
21588 | |
21589 |
|
21590 |
|
21591 |
|
21592 |
|
21593 |
|
21594 |
|
21595 |
|
21596 |
|
21597 |
|
21598 |
|
21599 |
|
21600 |
|
21601 |
|
21602 |
|
21603 |
|
21604 |
|
21605 |
|
21606 |
|
21607 |
|
21608 |
|
21609 | var snakeCase = createCompounder(function(result, word, index) {
|
21610 | return result + (index ? '_' : '') + word.toLowerCase();
|
21611 | });
|
21612 |
|
21613 | |
21614 |
|
21615 |
|
21616 |
|
21617 |
|
21618 |
|
21619 |
|
21620 |
|
21621 |
|
21622 |
|
21623 |
|
21624 |
|
21625 |
|
21626 |
|
21627 |
|
21628 |
|
21629 |
|
21630 |
|
21631 |
|
21632 | function split(string, separator, limit) {
|
21633 | if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
|
21634 | separator = limit = undefined;
|
21635 | }
|
21636 | limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
|
21637 | if (!limit) {
|
21638 | return [];
|
21639 | }
|
21640 | string = toString(string);
|
21641 | if (string && (
|
21642 | typeof separator == 'string' ||
|
21643 | (separator != null && !isRegExp(separator))
|
21644 | )) {
|
21645 | separator = baseToString(separator);
|
21646 | if (!separator && hasUnicode(string)) {
|
21647 | return castSlice(stringToArray(string), 0, limit);
|
21648 | }
|
21649 | }
|
21650 | return string.split(separator, limit);
|
21651 | }
|
21652 |
|
21653 | |
21654 |
|
21655 |
|
21656 |
|
21657 |
|
21658 |
|
21659 |
|
21660 |
|
21661 |
|
21662 |
|
21663 |
|
21664 |
|
21665 |
|
21666 |
|
21667 |
|
21668 |
|
21669 |
|
21670 |
|
21671 |
|
21672 |
|
21673 |
|
21674 | var startCase = createCompounder(function(result, word, index) {
|
21675 | return result + (index ? ' ' : '') + upperFirst(word);
|
21676 | });
|
21677 |
|
21678 | |
21679 |
|
21680 |
|
21681 |
|
21682 |
|
21683 |
|
21684 |
|
21685 |
|
21686 |
|
21687 |
|
21688 |
|
21689 |
|
21690 |
|
21691 |
|
21692 |
|
21693 |
|
21694 |
|
21695 |
|
21696 |
|
21697 |
|
21698 |
|
21699 |
|
21700 |
|
21701 | function startsWith(string, target, position) {
|
21702 | string = toString(string);
|
21703 | position = position == null
|
21704 | ? 0
|
21705 | : baseClamp(toInteger(position), 0, string.length);
|
21706 |
|
21707 | target = baseToString(target);
|
21708 | return string.slice(position, position + target.length) == target;
|
21709 | }
|
21710 |
|
21711 | |
21712 |
|
21713 |
|
21714 |
|
21715 |
|
21716 |
|
21717 |
|
21718 |
|
21719 |
|
21720 |
|
21721 |
|
21722 |
|
21723 |
|
21724 |
|
21725 |
|
21726 |
|
21727 |
|
21728 |
|
21729 |
|
21730 |
|
21731 |
|
21732 |
|
21733 |
|
21734 |
|
21735 |
|
21736 |
|
21737 |
|
21738 |
|
21739 |
|
21740 |
|
21741 |
|
21742 |
|
21743 |
|
21744 |
|
21745 |
|
21746 |
|
21747 |
|
21748 |
|
21749 |
|
21750 |
|
21751 |
|
21752 |
|
21753 |
|
21754 |
|
21755 |
|
21756 |
|
21757 |
|
21758 |
|
21759 |
|
21760 |
|
21761 |
|
21762 |
|
21763 |
|
21764 |
|
21765 |
|
21766 |
|
21767 |
|
21768 |
|
21769 |
|
21770 |
|
21771 |
|
21772 |
|
21773 |
|
21774 |
|
21775 |
|
21776 |
|
21777 |
|
21778 |
|
21779 |
|
21780 |
|
21781 |
|
21782 |
|
21783 |
|
21784 |
|
21785 |
|
21786 |
|
21787 |
|
21788 |
|
21789 |
|
21790 |
|
21791 |
|
21792 |
|
21793 |
|
21794 |
|
21795 |
|
21796 |
|
21797 |
|
21798 |
|
21799 |
|
21800 |
|
21801 |
|
21802 |
|
21803 |
|
21804 |
|
21805 |
|
21806 |
|
21807 |
|
21808 |
|
21809 |
|
21810 |
|
21811 |
|
21812 |
|
21813 |
|
21814 |
|
21815 | function template(string, options, guard) {
|
21816 |
|
21817 |
|
21818 |
|
21819 | var settings = lodash.templateSettings;
|
21820 |
|
21821 | if (guard && isIterateeCall(string, options, guard)) {
|
21822 | options = undefined;
|
21823 | }
|
21824 | string = toString(string);
|
21825 | options = assignInWith({}, options, settings, customDefaultsAssignIn);
|
21826 |
|
21827 | var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
|
21828 | importsKeys = keys(imports),
|
21829 | importsValues = baseValues(imports, importsKeys);
|
21830 |
|
21831 | var isEscaping,
|
21832 | isEvaluating,
|
21833 | index = 0,
|
21834 | interpolate = options.interpolate || reNoMatch,
|
21835 | source = "__p += '";
|
21836 |
|
21837 |
|
21838 | var reDelimiters = RegExp(
|
21839 | (options.escape || reNoMatch).source + '|' +
|
21840 | interpolate.source + '|' +
|
21841 | (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
|
21842 | (options.evaluate || reNoMatch).source + '|$'
|
21843 | , 'g');
|
21844 |
|
21845 |
|
21846 | var sourceURL = '//# sourceURL=' +
|
21847 | ('sourceURL' in options
|
21848 | ? options.sourceURL
|
21849 | : ('lodash.templateSources[' + (++templateCounter) + ']')
|
21850 | ) + '\n';
|
21851 |
|
21852 | string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
|
21853 | interpolateValue || (interpolateValue = esTemplateValue);
|
21854 |
|
21855 |
|
21856 | source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
|
21857 |
|
21858 |
|
21859 | if (escapeValue) {
|
21860 | isEscaping = true;
|
21861 | source += "' +\n__e(" + escapeValue + ") +\n'";
|
21862 | }
|
21863 | if (evaluateValue) {
|
21864 | isEvaluating = true;
|
21865 | source += "';\n" + evaluateValue + ";\n__p += '";
|
21866 | }
|
21867 | if (interpolateValue) {
|
21868 | source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
|
21869 | }
|
21870 | index = offset + match.length;
|
21871 |
|
21872 |
|
21873 |
|
21874 | return match;
|
21875 | });
|
21876 |
|
21877 | source += "';\n";
|
21878 |
|
21879 |
|
21880 |
|
21881 | var variable = options.variable;
|
21882 | if (!variable) {
|
21883 | source = 'with (obj) {\n' + source + '\n}\n';
|
21884 | }
|
21885 |
|
21886 | source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
|
21887 | .replace(reEmptyStringMiddle, '$1')
|
21888 | .replace(reEmptyStringTrailing, '$1;');
|
21889 |
|
21890 |
|
21891 | source = 'function(' + (variable || 'obj') + ') {\n' +
|
21892 | (variable
|
21893 | ? ''
|
21894 | : 'obj || (obj = {});\n'
|
21895 | ) +
|
21896 | "var __t, __p = ''" +
|
21897 | (isEscaping
|
21898 | ? ', __e = _.escape'
|
21899 | : ''
|
21900 | ) +
|
21901 | (isEvaluating
|
21902 | ? ', __j = Array.prototype.join;\n' +
|
21903 | "function print() { __p += __j.call(arguments, '') }\n"
|
21904 | : ';\n'
|
21905 | ) +
|
21906 | source +
|
21907 | 'return __p\n}';
|
21908 |
|
21909 | var result = attempt(function() {
|
21910 | return Function(importsKeys, sourceURL + 'return ' + source)
|
21911 | .apply(undefined, importsValues);
|
21912 | });
|
21913 |
|
21914 |
|
21915 |
|
21916 | result.source = source;
|
21917 | if (isError(result)) {
|
21918 | throw result;
|
21919 | }
|
21920 | return result;
|
21921 | }
|
21922 |
|
21923 | |
21924 |
|
21925 |
|
21926 |
|
21927 |
|
21928 |
|
21929 |
|
21930 |
|
21931 |
|
21932 |
|
21933 |
|
21934 |
|
21935 |
|
21936 |
|
21937 |
|
21938 |
|
21939 |
|
21940 |
|
21941 |
|
21942 |
|
21943 |
|
21944 | function toLower(value) {
|
21945 | return toString(value).toLowerCase();
|
21946 | }
|
21947 |
|
21948 | |
21949 |
|
21950 |
|
21951 |
|
21952 |
|
21953 |
|
21954 |
|
21955 |
|
21956 |
|
21957 |
|
21958 |
|
21959 |
|
21960 |
|
21961 |
|
21962 |
|
21963 |
|
21964 |
|
21965 |
|
21966 |
|
21967 |
|
21968 |
|
21969 | function toUpper(value) {
|
21970 | return toString(value).toUpperCase();
|
21971 | }
|
21972 |
|
21973 | |
21974 |
|
21975 |
|
21976 |
|
21977 |
|
21978 |
|
21979 |
|
21980 |
|
21981 |
|
21982 |
|
21983 |
|
21984 |
|
21985 |
|
21986 |
|
21987 |
|
21988 |
|
21989 |
|
21990 |
|
21991 |
|
21992 |
|
21993 |
|
21994 |
|
21995 | function trim(string, chars, guard) {
|
21996 | string = toString(string);
|
21997 | if (string && (guard || chars === undefined)) {
|
21998 | return string.replace(reTrim, '');
|
21999 | }
|
22000 | if (!string || !(chars = baseToString(chars))) {
|
22001 | return string;
|
22002 | }
|
22003 | var strSymbols = stringToArray(string),
|
22004 | chrSymbols = stringToArray(chars),
|
22005 | start = charsStartIndex(strSymbols, chrSymbols),
|
22006 | end = charsEndIndex(strSymbols, chrSymbols) + 1;
|
22007 |
|
22008 | return castSlice(strSymbols, start, end).join('');
|
22009 | }
|
22010 |
|
22011 | |
22012 |
|
22013 |
|
22014 |
|
22015 |
|
22016 |
|
22017 |
|
22018 |
|
22019 |
|
22020 |
|
22021 |
|
22022 |
|
22023 |
|
22024 |
|
22025 |
|
22026 |
|
22027 |
|
22028 |
|
22029 |
|
22030 | function trimEnd(string, chars, guard) {
|
22031 | string = toString(string);
|
22032 | if (string && (guard || chars === undefined)) {
|
22033 | return string.replace(reTrimEnd, '');
|
22034 | }
|
22035 | if (!string || !(chars = baseToString(chars))) {
|
22036 | return string;
|
22037 | }
|
22038 | var strSymbols = stringToArray(string),
|
22039 | end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
|
22040 |
|
22041 | return castSlice(strSymbols, 0, end).join('');
|
22042 | }
|
22043 |
|
22044 | |
22045 |
|
22046 |
|
22047 |
|
22048 |
|
22049 |
|
22050 |
|
22051 |
|
22052 |
|
22053 |
|
22054 |
|
22055 |
|
22056 |
|
22057 |
|
22058 |
|
22059 |
|
22060 |
|
22061 |
|
22062 |
|
22063 | function trimStart(string, chars, guard) {
|
22064 | string = toString(string);
|
22065 | if (string && (guard || chars === undefined)) {
|
22066 | return string.replace(reTrimStart, '');
|
22067 | }
|
22068 | if (!string || !(chars = baseToString(chars))) {
|
22069 | return string;
|
22070 | }
|
22071 | var strSymbols = stringToArray(string),
|
22072 | start = charsStartIndex(strSymbols, stringToArray(chars));
|
22073 |
|
22074 | return castSlice(strSymbols, start).join('');
|
22075 | }
|
22076 |
|
22077 | |
22078 |
|
22079 |
|
22080 |
|
22081 |
|
22082 |
|
22083 |
|
22084 |
|
22085 |
|
22086 |
|
22087 |
|
22088 |
|
22089 |
|
22090 |
|
22091 |
|
22092 |
|
22093 |
|
22094 |
|
22095 |
|
22096 |
|
22097 |
|
22098 |
|
22099 |
|
22100 |
|
22101 |
|
22102 |
|
22103 |
|
22104 |
|
22105 |
|
22106 |
|
22107 |
|
22108 |
|
22109 |
|
22110 |
|
22111 |
|
22112 |
|
22113 |
|
22114 | function truncate(string, options) {
|
22115 | var length = DEFAULT_TRUNC_LENGTH,
|
22116 | omission = DEFAULT_TRUNC_OMISSION;
|
22117 |
|
22118 | if (isObject(options)) {
|
22119 | var separator = 'separator' in options ? options.separator : separator;
|
22120 | length = 'length' in options ? toInteger(options.length) : length;
|
22121 | omission = 'omission' in options ? baseToString(options.omission) : omission;
|
22122 | }
|
22123 | string = toString(string);
|
22124 |
|
22125 | var strLength = string.length;
|
22126 | if (hasUnicode(string)) {
|
22127 | var strSymbols = stringToArray(string);
|
22128 | strLength = strSymbols.length;
|
22129 | }
|
22130 | if (length >= strLength) {
|
22131 | return string;
|
22132 | }
|
22133 | var end = length - stringSize(omission);
|
22134 | if (end < 1) {
|
22135 | return omission;
|
22136 | }
|
22137 | var result = strSymbols
|
22138 | ? castSlice(strSymbols, 0, end).join('')
|
22139 | : string.slice(0, end);
|
22140 |
|
22141 | if (separator === undefined) {
|
22142 | return result + omission;
|
22143 | }
|
22144 | if (strSymbols) {
|
22145 | end += (result.length - end);
|
22146 | }
|
22147 | if (isRegExp(separator)) {
|
22148 | if (string.slice(end).search(separator)) {
|
22149 | var match,
|
22150 | substring = result;
|
22151 |
|
22152 | if (!separator.global) {
|
22153 | separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
|
22154 | }
|
22155 | separator.lastIndex = 0;
|
22156 | while ((match = separator.exec(substring))) {
|
22157 | var newEnd = match.index;
|
22158 | }
|
22159 | result = result.slice(0, newEnd === undefined ? end : newEnd);
|
22160 | }
|
22161 | } else if (string.indexOf(baseToString(separator), end) != end) {
|
22162 | var index = result.lastIndexOf(separator);
|
22163 | if (index > -1) {
|
22164 | result = result.slice(0, index);
|
22165 | }
|
22166 | }
|
22167 | return result + omission;
|
22168 | }
|
22169 |
|
22170 | |
22171 |
|
22172 |
|
22173 |
|
22174 |
|
22175 |
|
22176 |
|
22177 |
|
22178 |
|
22179 |
|
22180 |
|
22181 |
|
22182 |
|
22183 |
|
22184 |
|
22185 |
|
22186 |
|
22187 |
|
22188 |
|
22189 | function unescape(string) {
|
22190 | string = toString(string);
|
22191 | return (string && reHasEscapedHtml.test(string))
|
22192 | ? string.replace(reEscapedHtml, unescapeHtmlChar)
|
22193 | : string;
|
22194 | }
|
22195 |
|
22196 | |
22197 |
|
22198 |
|
22199 |
|
22200 |
|
22201 |
|
22202 |
|
22203 |
|
22204 |
|
22205 |
|
22206 |
|
22207 |
|
22208 |
|
22209 |
|
22210 |
|
22211 |
|
22212 |
|
22213 |
|
22214 |
|
22215 |
|
22216 | var upperCase = createCompounder(function(result, word, index) {
|
22217 | return result + (index ? ' ' : '') + word.toUpperCase();
|
22218 | });
|
22219 |
|
22220 | |
22221 |
|
22222 |
|
22223 |
|
22224 |
|
22225 |
|
22226 |
|
22227 |
|
22228 |
|
22229 |
|
22230 |
|
22231 |
|
22232 |
|
22233 |
|
22234 |
|
22235 |
|
22236 |
|
22237 | var upperFirst = createCaseFirst('toUpperCase');
|
22238 |
|
22239 | |
22240 |
|
22241 |
|
22242 |
|
22243 |
|
22244 |
|
22245 |
|
22246 |
|
22247 |
|
22248 |
|
22249 |
|
22250 |
|
22251 |
|
22252 |
|
22253 |
|
22254 |
|
22255 |
|
22256 |
|
22257 |
|
22258 | function words(string, pattern, guard) {
|
22259 | string = toString(string);
|
22260 | pattern = guard ? undefined : pattern;
|
22261 |
|
22262 | if (pattern === undefined) {
|
22263 | return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
|
22264 | }
|
22265 | return string.match(pattern) || [];
|
22266 | }
|
22267 |
|
22268 |
|
22269 |
|
22270 | |
22271 |
|
22272 |
|
22273 |
|
22274 |
|
22275 |
|
22276 |
|
22277 |
|
22278 |
|
22279 |
|
22280 |
|
22281 |
|
22282 |
|
22283 |
|
22284 |
|
22285 |
|
22286 |
|
22287 |
|
22288 |
|
22289 |
|
22290 |
|
22291 |
|
22292 | var attempt = baseRest(function(func, args) {
|
22293 | try {
|
22294 | return apply(func, undefined, args);
|
22295 | } catch (e) {
|
22296 | return isError(e) ? e : new Error(e);
|
22297 | }
|
22298 | });
|
22299 |
|
22300 | |
22301 |
|
22302 |
|
22303 |
|
22304 |
|
22305 |
|
22306 |
|
22307 |
|
22308 |
|
22309 |
|
22310 |
|
22311 |
|
22312 |
|
22313 |
|
22314 |
|
22315 |
|
22316 |
|
22317 |
|
22318 |
|
22319 |
|
22320 |
|
22321 |
|
22322 |
|
22323 |
|
22324 |
|
22325 |
|
22326 | var bindAll = flatRest(function(object, methodNames) {
|
22327 | arrayEach(methodNames, function(key) {
|
22328 | key = toKey(key);
|
22329 | baseAssignValue(object, key, bind(object[key], object));
|
22330 | });
|
22331 | return object;
|
22332 | });
|
22333 |
|
22334 | |
22335 |
|
22336 |
|
22337 |
|
22338 |
|
22339 |
|
22340 |
|
22341 |
|
22342 |
|
22343 |
|
22344 |
|
22345 |
|
22346 |
|
22347 |
|
22348 |
|
22349 |
|
22350 |
|
22351 |
|
22352 |
|
22353 |
|
22354 |
|
22355 |
|
22356 |
|
22357 |
|
22358 |
|
22359 |
|
22360 |
|
22361 |
|
22362 |
|
22363 | function cond(pairs) {
|
22364 | var length = pairs == null ? 0 : pairs.length,
|
22365 | toIteratee = getIteratee();
|
22366 |
|
22367 | pairs = !length ? [] : arrayMap(pairs, function(pair) {
|
22368 | if (typeof pair[1] != 'function') {
|
22369 | throw new TypeError(FUNC_ERROR_TEXT);
|
22370 | }
|
22371 | return [toIteratee(pair[0]), pair[1]];
|
22372 | });
|
22373 |
|
22374 | return baseRest(function(args) {
|
22375 | var index = -1;
|
22376 | while (++index < length) {
|
22377 | var pair = pairs[index];
|
22378 | if (apply(pair[0], this, args)) {
|
22379 | return apply(pair[1], this, args);
|
22380 | }
|
22381 | }
|
22382 | });
|
22383 | }
|
22384 |
|
22385 | |
22386 |
|
22387 |
|
22388 |
|
22389 |
|
22390 |
|
22391 |
|
22392 |
|
22393 |
|
22394 |
|
22395 |
|
22396 |
|
22397 |
|
22398 |
|
22399 |
|
22400 |
|
22401 |
|
22402 |
|
22403 |
|
22404 |
|
22405 |
|
22406 |
|
22407 |
|
22408 |
|
22409 | function conforms(source) {
|
22410 | return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
|
22411 | }
|
22412 |
|
22413 | |
22414 |
|
22415 |
|
22416 |
|
22417 |
|
22418 |
|
22419 |
|
22420 |
|
22421 |
|
22422 |
|
22423 |
|
22424 |
|
22425 |
|
22426 |
|
22427 |
|
22428 |
|
22429 |
|
22430 |
|
22431 |
|
22432 | function constant(value) {
|
22433 | return function() {
|
22434 | return value;
|
22435 | };
|
22436 | }
|
22437 |
|
22438 | |
22439 |
|
22440 |
|
22441 |
|
22442 |
|
22443 |
|
22444 |
|
22445 |
|
22446 |
|
22447 |
|
22448 |
|
22449 |
|
22450 |
|
22451 |
|
22452 |
|
22453 |
|
22454 |
|
22455 |
|
22456 |
|
22457 |
|
22458 | function defaultTo(value, defaultValue) {
|
22459 | return (value == null || value !== value) ? defaultValue : value;
|
22460 | }
|
22461 |
|
22462 | |
22463 |
|
22464 |
|
22465 |
|
22466 |
|
22467 |
|
22468 |
|
22469 |
|
22470 |
|
22471 |
|
22472 |
|
22473 |
|
22474 |
|
22475 |
|
22476 |
|
22477 |
|
22478 |
|
22479 |
|
22480 |
|
22481 |
|
22482 |
|
22483 |
|
22484 | var flow = createFlow();
|
22485 |
|
22486 | |
22487 |
|
22488 |
|
22489 |
|
22490 |
|
22491 |
|
22492 |
|
22493 |
|
22494 |
|
22495 |
|
22496 |
|
22497 |
|
22498 |
|
22499 |
|
22500 |
|
22501 |
|
22502 |
|
22503 |
|
22504 |
|
22505 |
|
22506 |
|
22507 | var flowRight = createFlow(true);
|
22508 |
|
22509 | |
22510 |
|
22511 |
|
22512 |
|
22513 |
|
22514 |
|
22515 |
|
22516 |
|
22517 |
|
22518 |
|
22519 |
|
22520 |
|
22521 |
|
22522 |
|
22523 |
|
22524 |
|
22525 | function identity(value) {
|
22526 | return value;
|
22527 | }
|
22528 |
|
22529 | |
22530 |
|
22531 |
|
22532 |
|
22533 |
|
22534 |
|
22535 |
|
22536 |
|
22537 |
|
22538 |
|
22539 |
|
22540 |
|
22541 |
|
22542 |
|
22543 |
|
22544 |
|
22545 |
|
22546 |
|
22547 |
|
22548 |
|
22549 |
|
22550 |
|
22551 |
|
22552 |
|
22553 |
|
22554 |
|
22555 |
|
22556 |
|
22557 |
|
22558 |
|
22559 |
|
22560 |
|
22561 |
|
22562 |
|
22563 |
|
22564 |
|
22565 |
|
22566 |
|
22567 |
|
22568 |
|
22569 |
|
22570 |
|
22571 | function iteratee(func) {
|
22572 | return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
|
22573 | }
|
22574 |
|
22575 | |
22576 |
|
22577 |
|
22578 |
|
22579 |
|
22580 |
|
22581 |
|
22582 |
|
22583 |
|
22584 |
|
22585 |
|
22586 |
|
22587 |
|
22588 |
|
22589 |
|
22590 |
|
22591 |
|
22592 |
|
22593 |
|
22594 |
|
22595 |
|
22596 |
|
22597 |
|
22598 |
|
22599 |
|
22600 |
|
22601 |
|
22602 |
|
22603 | function matches(source) {
|
22604 | return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
|
22605 | }
|
22606 |
|
22607 | |
22608 |
|
22609 |
|
22610 |
|
22611 |
|
22612 |
|
22613 |
|
22614 |
|
22615 |
|
22616 |
|
22617 |
|
22618 |
|
22619 |
|
22620 |
|
22621 |
|
22622 |
|
22623 |
|
22624 |
|
22625 |
|
22626 |
|
22627 |
|
22628 |
|
22629 |
|
22630 |
|
22631 |
|
22632 |
|
22633 | function matchesProperty(path, srcValue) {
|
22634 | return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
|
22635 | }
|
22636 |
|
22637 | |
22638 |
|
22639 |
|
22640 |
|
22641 |
|
22642 |
|
22643 |
|
22644 |
|
22645 |
|
22646 |
|
22647 |
|
22648 |
|
22649 |
|
22650 |
|
22651 |
|
22652 |
|
22653 |
|
22654 |
|
22655 |
|
22656 |
|
22657 |
|
22658 |
|
22659 |
|
22660 |
|
22661 | var method = baseRest(function(path, args) {
|
22662 | return function(object) {
|
22663 | return baseInvoke(object, path, args);
|
22664 | };
|
22665 | });
|
22666 |
|
22667 | |
22668 |
|
22669 |
|
22670 |
|
22671 |
|
22672 |
|
22673 |
|
22674 |
|
22675 |
|
22676 |
|
22677 |
|
22678 |
|
22679 |
|
22680 |
|
22681 |
|
22682 |
|
22683 |
|
22684 |
|
22685 |
|
22686 |
|
22687 |
|
22688 |
|
22689 |
|
22690 | var methodOf = baseRest(function(object, args) {
|
22691 | return function(path) {
|
22692 | return baseInvoke(object, path, args);
|
22693 | };
|
22694 | });
|
22695 |
|
22696 | |
22697 |
|
22698 |
|
22699 |
|
22700 |
|
22701 |
|
22702 |
|
22703 |
|
22704 |
|
22705 |
|
22706 |
|
22707 |
|
22708 |
|
22709 |
|
22710 |
|
22711 |
|
22712 |
|
22713 |
|
22714 |
|
22715 |
|
22716 |
|
22717 |
|
22718 |
|
22719 |
|
22720 |
|
22721 |
|
22722 |
|
22723 |
|
22724 |
|
22725 |
|
22726 |
|
22727 |
|
22728 |
|
22729 |
|
22730 |
|
22731 |
|
22732 | function mixin(object, source, options) {
|
22733 | var props = keys(source),
|
22734 | methodNames = baseFunctions(source, props);
|
22735 |
|
22736 | if (options == null &&
|
22737 | !(isObject(source) && (methodNames.length || !props.length))) {
|
22738 | options = source;
|
22739 | source = object;
|
22740 | object = this;
|
22741 | methodNames = baseFunctions(source, keys(source));
|
22742 | }
|
22743 | var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
|
22744 | isFunc = isFunction(object);
|
22745 |
|
22746 | arrayEach(methodNames, function(methodName) {
|
22747 | var func = source[methodName];
|
22748 | object[methodName] = func;
|
22749 | if (isFunc) {
|
22750 | object.prototype[methodName] = function() {
|
22751 | var chainAll = this.__chain__;
|
22752 | if (chain || chainAll) {
|
22753 | var result = object(this.__wrapped__),
|
22754 | actions = result.__actions__ = copyArray(this.__actions__);
|
22755 |
|
22756 | actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
|
22757 | result.__chain__ = chainAll;
|
22758 | return result;
|
22759 | }
|
22760 | return func.apply(object, arrayPush([this.value()], arguments));
|
22761 | };
|
22762 | }
|
22763 | });
|
22764 |
|
22765 | return object;
|
22766 | }
|
22767 |
|
22768 | |
22769 |
|
22770 |
|
22771 |
|
22772 |
|
22773 |
|
22774 |
|
22775 |
|
22776 |
|
22777 |
|
22778 |
|
22779 |
|
22780 |
|
22781 | function noConflict() {
|
22782 | if (root._ === this) {
|
22783 | root._ = oldDash;
|
22784 | }
|
22785 | return this;
|
22786 | }
|
22787 |
|
22788 | |
22789 |
|
22790 |
|
22791 |
|
22792 |
|
22793 |
|
22794 |
|
22795 |
|
22796 |
|
22797 |
|
22798 |
|
22799 |
|
22800 | function noop() {
|
22801 |
|
22802 | }
|
22803 |
|
22804 | |
22805 |
|
22806 |
|
22807 |
|
22808 |
|
22809 |
|
22810 |
|
22811 |
|
22812 |
|
22813 |
|
22814 |
|
22815 |
|
22816 |
|
22817 |
|
22818 |
|
22819 |
|
22820 |
|
22821 |
|
22822 |
|
22823 |
|
22824 | function nthArg(n) {
|
22825 | n = toInteger(n);
|
22826 | return baseRest(function(args) {
|
22827 | return baseNth(args, n);
|
22828 | });
|
22829 | }
|
22830 |
|
22831 | |
22832 |
|
22833 |
|
22834 |
|
22835 |
|
22836 |
|
22837 |
|
22838 |
|
22839 |
|
22840 |
|
22841 |
|
22842 |
|
22843 |
|
22844 |
|
22845 |
|
22846 |
|
22847 |
|
22848 |
|
22849 | var over = createOver(arrayMap);
|
22850 |
|
22851 | |
22852 |
|
22853 |
|
22854 |
|
22855 |
|
22856 |
|
22857 |
|
22858 |
|
22859 |
|
22860 |
|
22861 |
|
22862 |
|
22863 |
|
22864 |
|
22865 |
|
22866 |
|
22867 |
|
22868 |
|
22869 |
|
22870 |
|
22871 |
|
22872 |
|
22873 |
|
22874 |
|
22875 | var overEvery = createOver(arrayEvery);
|
22876 |
|
22877 | |
22878 |
|
22879 |
|
22880 |
|
22881 |
|
22882 |
|
22883 |
|
22884 |
|
22885 |
|
22886 |
|
22887 |
|
22888 |
|
22889 |
|
22890 |
|
22891 |
|
22892 |
|
22893 |
|
22894 |
|
22895 |
|
22896 |
|
22897 |
|
22898 |
|
22899 |
|
22900 |
|
22901 | var overSome = createOver(arraySome);
|
22902 |
|
22903 | |
22904 |
|
22905 |
|
22906 |
|
22907 |
|
22908 |
|
22909 |
|
22910 |
|
22911 |
|
22912 |
|
22913 |
|
22914 |
|
22915 |
|
22916 |
|
22917 |
|
22918 |
|
22919 |
|
22920 |
|
22921 |
|
22922 |
|
22923 |
|
22924 |
|
22925 | function property(path) {
|
22926 | return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
22927 | }
|
22928 |
|
22929 | |
22930 |
|
22931 |
|
22932 |
|
22933 |
|
22934 |
|
22935 |
|
22936 |
|
22937 |
|
22938 |
|
22939 |
|
22940 |
|
22941 |
|
22942 |
|
22943 |
|
22944 |
|
22945 |
|
22946 |
|
22947 |
|
22948 |
|
22949 |
|
22950 | function propertyOf(object) {
|
22951 | return function(path) {
|
22952 | return object == null ? undefined : baseGet(object, path);
|
22953 | };
|
22954 | }
|
22955 |
|
22956 | |
22957 |
|
22958 |
|
22959 |
|
22960 |
|
22961 |
|
22962 |
|
22963 |
|
22964 |
|
22965 |
|
22966 |
|
22967 |
|
22968 |
|
22969 |
|
22970 |
|
22971 |
|
22972 |
|
22973 |
|
22974 |
|
22975 |
|
22976 |
|
22977 |
|
22978 |
|
22979 |
|
22980 |
|
22981 |
|
22982 |
|
22983 |
|
22984 |
|
22985 |
|
22986 |
|
22987 |
|
22988 |
|
22989 |
|
22990 |
|
22991 |
|
22992 |
|
22993 |
|
22994 |
|
22995 |
|
22996 |
|
22997 | var range = createRange();
|
22998 |
|
22999 | |
23000 |
|
23001 |
|
23002 |
|
23003 |
|
23004 |
|
23005 |
|
23006 |
|
23007 |
|
23008 |
|
23009 |
|
23010 |
|
23011 |
|
23012 |
|
23013 |
|
23014 |
|
23015 |
|
23016 |
|
23017 |
|
23018 |
|
23019 |
|
23020 |
|
23021 |
|
23022 |
|
23023 |
|
23024 |
|
23025 |
|
23026 |
|
23027 |
|
23028 |
|
23029 |
|
23030 |
|
23031 |
|
23032 |
|
23033 |
|
23034 |
|
23035 | var rangeRight = createRange(true);
|
23036 |
|
23037 | |
23038 |
|
23039 |
|
23040 |
|
23041 |
|
23042 |
|
23043 |
|
23044 |
|
23045 |
|
23046 |
|
23047 |
|
23048 |
|
23049 |
|
23050 |
|
23051 |
|
23052 |
|
23053 |
|
23054 |
|
23055 | function stubArray() {
|
23056 | return [];
|
23057 | }
|
23058 |
|
23059 | |
23060 |
|
23061 |
|
23062 |
|
23063 |
|
23064 |
|
23065 |
|
23066 |
|
23067 |
|
23068 |
|
23069 |
|
23070 |
|
23071 |
|
23072 | function stubFalse() {
|
23073 | return false;
|
23074 | }
|
23075 |
|
23076 | |
23077 |
|
23078 |
|
23079 |
|
23080 |
|
23081 |
|
23082 |
|
23083 |
|
23084 |
|
23085 |
|
23086 |
|
23087 |
|
23088 |
|
23089 |
|
23090 |
|
23091 |
|
23092 |
|
23093 |
|
23094 | function stubObject() {
|
23095 | return {};
|
23096 | }
|
23097 |
|
23098 | |
23099 |
|
23100 |
|
23101 |
|
23102 |
|
23103 |
|
23104 |
|
23105 |
|
23106 |
|
23107 |
|
23108 |
|
23109 |
|
23110 |
|
23111 | function stubString() {
|
23112 | return '';
|
23113 | }
|
23114 |
|
23115 | |
23116 |
|
23117 |
|
23118 |
|
23119 |
|
23120 |
|
23121 |
|
23122 |
|
23123 |
|
23124 |
|
23125 |
|
23126 |
|
23127 |
|
23128 | function stubTrue() {
|
23129 | return true;
|
23130 | }
|
23131 |
|
23132 | |
23133 |
|
23134 |
|
23135 |
|
23136 |
|
23137 |
|
23138 |
|
23139 |
|
23140 |
|
23141 |
|
23142 |
|
23143 |
|
23144 |
|
23145 |
|
23146 |
|
23147 |
|
23148 |
|
23149 |
|
23150 |
|
23151 | function times(n, iteratee) {
|
23152 | n = toInteger(n);
|
23153 | if (n < 1 || n > MAX_SAFE_INTEGER) {
|
23154 | return [];
|
23155 | }
|
23156 | var index = MAX_ARRAY_LENGTH,
|
23157 | length = nativeMin(n, MAX_ARRAY_LENGTH);
|
23158 |
|
23159 | iteratee = getIteratee(iteratee);
|
23160 | n -= MAX_ARRAY_LENGTH;
|
23161 |
|
23162 | var result = baseTimes(length, iteratee);
|
23163 | while (++index < n) {
|
23164 | iteratee(index);
|
23165 | }
|
23166 | return result;
|
23167 | }
|
23168 |
|
23169 | |
23170 |
|
23171 |
|
23172 |
|
23173 |
|
23174 |
|
23175 |
|
23176 |
|
23177 |
|
23178 |
|
23179 |
|
23180 |
|
23181 |
|
23182 |
|
23183 |
|
23184 |
|
23185 |
|
23186 | function toPath(value) {
|
23187 | if (isArray(value)) {
|
23188 | return arrayMap(value, toKey);
|
23189 | }
|
23190 | return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
|
23191 | }
|
23192 |
|
23193 | |
23194 |
|
23195 |
|
23196 |
|
23197 |
|
23198 |
|
23199 |
|
23200 |
|
23201 |
|
23202 |
|
23203 |
|
23204 |
|
23205 |
|
23206 |
|
23207 |
|
23208 |
|
23209 |
|
23210 | function uniqueId(prefix) {
|
23211 | var id = ++idCounter;
|
23212 | return toString(prefix) + id;
|
23213 | }
|
23214 |
|
23215 |
|
23216 |
|
23217 | |
23218 |
|
23219 |
|
23220 |
|
23221 |
|
23222 |
|
23223 |
|
23224 |
|
23225 |
|
23226 |
|
23227 |
|
23228 |
|
23229 |
|
23230 |
|
23231 |
|
23232 | var add = createMathOperation(function(augend, addend) {
|
23233 | return augend + addend;
|
23234 | }, 0);
|
23235 |
|
23236 | |
23237 |
|
23238 |
|
23239 |
|
23240 |
|
23241 |
|
23242 |
|
23243 |
|
23244 |
|
23245 |
|
23246 |
|
23247 |
|
23248 |
|
23249 |
|
23250 |
|
23251 |
|
23252 |
|
23253 |
|
23254 |
|
23255 |
|
23256 |
|
23257 | var ceil = createRound('ceil');
|
23258 |
|
23259 | |
23260 |
|
23261 |
|
23262 |
|
23263 |
|
23264 |
|
23265 |
|
23266 |
|
23267 |
|
23268 |
|
23269 |
|
23270 |
|
23271 |
|
23272 |
|
23273 |
|
23274 | var divide = createMathOperation(function(dividend, divisor) {
|
23275 | return dividend / divisor;
|
23276 | }, 1);
|
23277 |
|
23278 | |
23279 |
|
23280 |
|
23281 |
|
23282 |
|
23283 |
|
23284 |
|
23285 |
|
23286 |
|
23287 |
|
23288 |
|
23289 |
|
23290 |
|
23291 |
|
23292 |
|
23293 |
|
23294 |
|
23295 |
|
23296 |
|
23297 |
|
23298 |
|
23299 | var floor = createRound('floor');
|
23300 |
|
23301 | |
23302 |
|
23303 |
|
23304 |
|
23305 |
|
23306 |
|
23307 |
|
23308 |
|
23309 |
|
23310 |
|
23311 |
|
23312 |
|
23313 |
|
23314 |
|
23315 |
|
23316 |
|
23317 |
|
23318 |
|
23319 | function max(array) {
|
23320 | return (array && array.length)
|
23321 | ? baseExtremum(array, identity, baseGt)
|
23322 | : undefined;
|
23323 | }
|
23324 |
|
23325 | |
23326 |
|
23327 |
|
23328 |
|
23329 |
|
23330 |
|
23331 |
|
23332 |
|
23333 |
|
23334 |
|
23335 |
|
23336 |
|
23337 |
|
23338 |
|
23339 |
|
23340 |
|
23341 |
|
23342 |
|
23343 |
|
23344 |
|
23345 |
|
23346 |
|
23347 |
|
23348 | function maxBy(array, iteratee) {
|
23349 | return (array && array.length)
|
23350 | ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
|
23351 | : undefined;
|
23352 | }
|
23353 |
|
23354 | |
23355 |
|
23356 |
|
23357 |
|
23358 |
|
23359 |
|
23360 |
|
23361 |
|
23362 |
|
23363 |
|
23364 |
|
23365 |
|
23366 |
|
23367 |
|
23368 | function mean(array) {
|
23369 | return baseMean(array, identity);
|
23370 | }
|
23371 |
|
23372 | |
23373 |
|
23374 |
|
23375 |
|
23376 |
|
23377 |
|
23378 |
|
23379 |
|
23380 |
|
23381 |
|
23382 |
|
23383 |
|
23384 |
|
23385 |
|
23386 |
|
23387 |
|
23388 |
|
23389 |
|
23390 |
|
23391 |
|
23392 |
|
23393 |
|
23394 |
|
23395 | function meanBy(array, iteratee) {
|
23396 | return baseMean(array, getIteratee(iteratee, 2));
|
23397 | }
|
23398 |
|
23399 | |
23400 |
|
23401 |
|
23402 |
|
23403 |
|
23404 |
|
23405 |
|
23406 |
|
23407 |
|
23408 |
|
23409 |
|
23410 |
|
23411 |
|
23412 |
|
23413 |
|
23414 |
|
23415 |
|
23416 |
|
23417 | function min(array) {
|
23418 | return (array && array.length)
|
23419 | ? baseExtremum(array, identity, baseLt)
|
23420 | : undefined;
|
23421 | }
|
23422 |
|
23423 | |
23424 |
|
23425 |
|
23426 |
|
23427 |
|
23428 |
|
23429 |
|
23430 |
|
23431 |
|
23432 |
|
23433 |
|
23434 |
|
23435 |
|
23436 |
|
23437 |
|
23438 |
|
23439 |
|
23440 |
|
23441 |
|
23442 |
|
23443 |
|
23444 |
|
23445 |
|
23446 | function minBy(array, iteratee) {
|
23447 | return (array && array.length)
|
23448 | ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
|
23449 | : undefined;
|
23450 | }
|
23451 |
|
23452 | |
23453 |
|
23454 |
|
23455 |
|
23456 |
|
23457 |
|
23458 |
|
23459 |
|
23460 |
|
23461 |
|
23462 |
|
23463 |
|
23464 |
|
23465 |
|
23466 |
|
23467 | var multiply = createMathOperation(function(multiplier, multiplicand) {
|
23468 | return multiplier * multiplicand;
|
23469 | }, 1);
|
23470 |
|
23471 | |
23472 |
|
23473 |
|
23474 |
|
23475 |
|
23476 |
|
23477 |
|
23478 |
|
23479 |
|
23480 |
|
23481 |
|
23482 |
|
23483 |
|
23484 |
|
23485 |
|
23486 |
|
23487 |
|
23488 |
|
23489 |
|
23490 |
|
23491 |
|
23492 | var round = createRound('round');
|
23493 |
|
23494 | |
23495 |
|
23496 |
|
23497 |
|
23498 |
|
23499 |
|
23500 |
|
23501 |
|
23502 |
|
23503 |
|
23504 |
|
23505 |
|
23506 |
|
23507 |
|
23508 |
|
23509 | var subtract = createMathOperation(function(minuend, subtrahend) {
|
23510 | return minuend - subtrahend;
|
23511 | }, 0);
|
23512 |
|
23513 | |
23514 |
|
23515 |
|
23516 |
|
23517 |
|
23518 |
|
23519 |
|
23520 |
|
23521 |
|
23522 |
|
23523 |
|
23524 |
|
23525 |
|
23526 |
|
23527 | function sum(array) {
|
23528 | return (array && array.length)
|
23529 | ? baseSum(array, identity)
|
23530 | : 0;
|
23531 | }
|
23532 |
|
23533 | |
23534 |
|
23535 |
|
23536 |
|
23537 |
|
23538 |
|
23539 |
|
23540 |
|
23541 |
|
23542 |
|
23543 |
|
23544 |
|
23545 |
|
23546 |
|
23547 |
|
23548 |
|
23549 |
|
23550 |
|
23551 |
|
23552 |
|
23553 |
|
23554 |
|
23555 |
|
23556 | function sumBy(array, iteratee) {
|
23557 | return (array && array.length)
|
23558 | ? baseSum(array, getIteratee(iteratee, 2))
|
23559 | : 0;
|
23560 | }
|
23561 |
|
23562 |
|
23563 |
|
23564 |
|
23565 | lodash.after = after;
|
23566 | lodash.ary = ary;
|
23567 | lodash.assign = assign;
|
23568 | lodash.assignIn = assignIn;
|
23569 | lodash.assignInWith = assignInWith;
|
23570 | lodash.assignWith = assignWith;
|
23571 | lodash.at = at;
|
23572 | lodash.before = before;
|
23573 | lodash.bind = bind;
|
23574 | lodash.bindAll = bindAll;
|
23575 | lodash.bindKey = bindKey;
|
23576 | lodash.castArray = castArray;
|
23577 | lodash.chain = chain;
|
23578 | lodash.chunk = chunk;
|
23579 | lodash.compact = compact;
|
23580 | lodash.concat = concat;
|
23581 | lodash.cond = cond;
|
23582 | lodash.conforms = conforms;
|
23583 | lodash.constant = constant;
|
23584 | lodash.countBy = countBy;
|
23585 | lodash.create = create;
|
23586 | lodash.curry = curry;
|
23587 | lodash.curryRight = curryRight;
|
23588 | lodash.debounce = debounce;
|
23589 | lodash.defaults = defaults;
|
23590 | lodash.defaultsDeep = defaultsDeep;
|
23591 | lodash.defer = defer;
|
23592 | lodash.delay = delay;
|
23593 | lodash.difference = difference;
|
23594 | lodash.differenceBy = differenceBy;
|
23595 | lodash.differenceWith = differenceWith;
|
23596 | lodash.drop = drop;
|
23597 | lodash.dropRight = dropRight;
|
23598 | lodash.dropRightWhile = dropRightWhile;
|
23599 | lodash.dropWhile = dropWhile;
|
23600 | lodash.fill = fill;
|
23601 | lodash.filter = filter;
|
23602 | lodash.flatMap = flatMap;
|
23603 | lodash.flatMapDeep = flatMapDeep;
|
23604 | lodash.flatMapDepth = flatMapDepth;
|
23605 | lodash.flatten = flatten;
|
23606 | lodash.flattenDeep = flattenDeep;
|
23607 | lodash.flattenDepth = flattenDepth;
|
23608 | lodash.flip = flip;
|
23609 | lodash.flow = flow;
|
23610 | lodash.flowRight = flowRight;
|
23611 | lodash.fromPairs = fromPairs;
|
23612 | lodash.functions = functions;
|
23613 | lodash.functionsIn = functionsIn;
|
23614 | lodash.groupBy = groupBy;
|
23615 | lodash.initial = initial;
|
23616 | lodash.intersection = intersection;
|
23617 | lodash.intersectionBy = intersectionBy;
|
23618 | lodash.intersectionWith = intersectionWith;
|
23619 | lodash.invert = invert;
|
23620 | lodash.invertBy = invertBy;
|
23621 | lodash.invokeMap = invokeMap;
|
23622 | lodash.iteratee = iteratee;
|
23623 | lodash.keyBy = keyBy;
|
23624 | lodash.keys = keys;
|
23625 | lodash.keysIn = keysIn;
|
23626 | lodash.map = map;
|
23627 | lodash.mapKeys = mapKeys;
|
23628 | lodash.mapValues = mapValues;
|
23629 | lodash.matches = matches;
|
23630 | lodash.matchesProperty = matchesProperty;
|
23631 | lodash.memoize = memoize;
|
23632 | lodash.merge = merge;
|
23633 | lodash.mergeWith = mergeWith;
|
23634 | lodash.method = method;
|
23635 | lodash.methodOf = methodOf;
|
23636 | lodash.mixin = mixin;
|
23637 | lodash.negate = negate;
|
23638 | lodash.nthArg = nthArg;
|
23639 | lodash.omit = omit;
|
23640 | lodash.omitBy = omitBy;
|
23641 | lodash.once = once;
|
23642 | lodash.orderBy = orderBy;
|
23643 | lodash.over = over;
|
23644 | lodash.overArgs = overArgs;
|
23645 | lodash.overEvery = overEvery;
|
23646 | lodash.overSome = overSome;
|
23647 | lodash.partial = partial;
|
23648 | lodash.partialRight = partialRight;
|
23649 | lodash.partition = partition;
|
23650 | lodash.pick = pick;
|
23651 | lodash.pickBy = pickBy;
|
23652 | lodash.property = property;
|
23653 | lodash.propertyOf = propertyOf;
|
23654 | lodash.pull = pull;
|
23655 | lodash.pullAll = pullAll;
|
23656 | lodash.pullAllBy = pullAllBy;
|
23657 | lodash.pullAllWith = pullAllWith;
|
23658 | lodash.pullAt = pullAt;
|
23659 | lodash.range = range;
|
23660 | lodash.rangeRight = rangeRight;
|
23661 | lodash.rearg = rearg;
|
23662 | lodash.reject = reject;
|
23663 | lodash.remove = remove;
|
23664 | lodash.rest = rest;
|
23665 | lodash.reverse = reverse;
|
23666 | lodash.sampleSize = sampleSize;
|
23667 | lodash.set = set;
|
23668 | lodash.setWith = setWith;
|
23669 | lodash.shuffle = shuffle;
|
23670 | lodash.slice = slice;
|
23671 | lodash.sortBy = sortBy;
|
23672 | lodash.sortedUniq = sortedUniq;
|
23673 | lodash.sortedUniqBy = sortedUniqBy;
|
23674 | lodash.split = split;
|
23675 | lodash.spread = spread;
|
23676 | lodash.tail = tail;
|
23677 | lodash.take = take;
|
23678 | lodash.takeRight = takeRight;
|
23679 | lodash.takeRightWhile = takeRightWhile;
|
23680 | lodash.takeWhile = takeWhile;
|
23681 | lodash.tap = tap;
|
23682 | lodash.throttle = throttle;
|
23683 | lodash.thru = thru;
|
23684 | lodash.toArray = toArray;
|
23685 | lodash.toPairs = toPairs;
|
23686 | lodash.toPairsIn = toPairsIn;
|
23687 | lodash.toPath = toPath;
|
23688 | lodash.toPlainObject = toPlainObject;
|
23689 | lodash.transform = transform;
|
23690 | lodash.unary = unary;
|
23691 | lodash.union = union;
|
23692 | lodash.unionBy = unionBy;
|
23693 | lodash.unionWith = unionWith;
|
23694 | lodash.uniq = uniq;
|
23695 | lodash.uniqBy = uniqBy;
|
23696 | lodash.uniqWith = uniqWith;
|
23697 | lodash.unset = unset;
|
23698 | lodash.unzip = unzip;
|
23699 | lodash.unzipWith = unzipWith;
|
23700 | lodash.update = update;
|
23701 | lodash.updateWith = updateWith;
|
23702 | lodash.values = values;
|
23703 | lodash.valuesIn = valuesIn;
|
23704 | lodash.without = without;
|
23705 | lodash.words = words;
|
23706 | lodash.wrap = wrap;
|
23707 | lodash.xor = xor;
|
23708 | lodash.xorBy = xorBy;
|
23709 | lodash.xorWith = xorWith;
|
23710 | lodash.zip = zip;
|
23711 | lodash.zipObject = zipObject;
|
23712 | lodash.zipObjectDeep = zipObjectDeep;
|
23713 | lodash.zipWith = zipWith;
|
23714 |
|
23715 | // Add aliases.
|
23716 | lodash.entries = toPairs;
|
23717 | lodash.entriesIn = toPairsIn;
|
23718 | lodash.extend = assignIn;
|
23719 | lodash.extendWith = assignInWith;
|
23720 |
|
23721 | // Add methods to `lodash.prototype`.
|
23722 | mixin(lodash, lodash);
|
23723 |
|
23724 | /*------------------------------------------------------------------------*/
|
23725 |
|
23726 | // Add methods that return unwrapped values in chain sequences.
|
23727 | lodash.add = add;
|
23728 | lodash.attempt = attempt;
|
23729 | lodash.camelCase = camelCase;
|
23730 | lodash.capitalize = capitalize;
|
23731 | lodash.ceil = ceil;
|
23732 | lodash.clamp = clamp;
|
23733 | lodash.clone = clone;
|
23734 | lodash.cloneDeep = cloneDeep;
|
23735 | lodash.cloneDeepWith = cloneDeepWith;
|
23736 | lodash.cloneWith = cloneWith;
|
23737 | lodash.conformsTo = conformsTo;
|
23738 | lodash.deburr = deburr;
|
23739 | lodash.defaultTo = defaultTo;
|
23740 | lodash.divide = divide;
|
23741 | lodash.endsWith = endsWith;
|
23742 | lodash.eq = eq;
|
23743 | lodash.escape = escape;
|
23744 | lodash.escapeRegExp = escapeRegExp;
|
23745 | lodash.every = every;
|
23746 | lodash.find = find;
|
23747 | lodash.findIndex = findIndex;
|
23748 | lodash.findKey = findKey;
|
23749 | lodash.findLast = findLast;
|
23750 | lodash.findLastIndex = findLastIndex;
|
23751 | lodash.findLastKey = findLastKey;
|
23752 | lodash.floor = floor;
|
23753 | lodash.forEach = forEach;
|
23754 | lodash.forEachRight = forEachRight;
|
23755 | lodash.forIn = forIn;
|
23756 | lodash.forInRight = forInRight;
|
23757 | lodash.forOwn = forOwn;
|
23758 | lodash.forOwnRight = forOwnRight;
|
23759 | lodash.get = get;
|
23760 | lodash.gt = gt;
|
23761 | lodash.gte = gte;
|
23762 | lodash.has = has;
|
23763 | lodash.hasIn = hasIn;
|
23764 | lodash.head = head;
|
23765 | lodash.identity = identity;
|
23766 | lodash.includes = includes;
|
23767 | lodash.indexOf = indexOf;
|
23768 | lodash.inRange = inRange;
|
23769 | lodash.invoke = invoke;
|
23770 | lodash.isArguments = isArguments;
|
23771 | lodash.isArray = isArray;
|
23772 | lodash.isArrayBuffer = isArrayBuffer;
|
23773 | lodash.isArrayLike = isArrayLike;
|
23774 | lodash.isArrayLikeObject = isArrayLikeObject;
|
23775 | lodash.isBoolean = isBoolean;
|
23776 | lodash.isBuffer = isBuffer;
|
23777 | lodash.isDate = isDate;
|
23778 | lodash.isElement = isElement;
|
23779 | lodash.isEmpty = isEmpty;
|
23780 | lodash.isEqual = isEqual;
|
23781 | lodash.isEqualWith = isEqualWith;
|
23782 | lodash.isError = isError;
|
23783 | lodash.isFinite = isFinite;
|
23784 | lodash.isFunction = isFunction;
|
23785 | lodash.isInteger = isInteger;
|
23786 | lodash.isLength = isLength;
|
23787 | lodash.isMap = isMap;
|
23788 | lodash.isMatch = isMatch;
|
23789 | lodash.isMatchWith = isMatchWith;
|
23790 | lodash.isNaN = isNaN;
|
23791 | lodash.isNative = isNative;
|
23792 | lodash.isNil = isNil;
|
23793 | lodash.isNull = isNull;
|
23794 | lodash.isNumber = isNumber;
|
23795 | lodash.isObject = isObject;
|
23796 | lodash.isObjectLike = isObjectLike;
|
23797 | lodash.isPlainObject = isPlainObject;
|
23798 | lodash.isRegExp = isRegExp;
|
23799 | lodash.isSafeInteger = isSafeInteger;
|
23800 | lodash.isSet = isSet;
|
23801 | lodash.isString = isString;
|
23802 | lodash.isSymbol = isSymbol;
|
23803 | lodash.isTypedArray = isTypedArray;
|
23804 | lodash.isUndefined = isUndefined;
|
23805 | lodash.isWeakMap = isWeakMap;
|
23806 | lodash.isWeakSet = isWeakSet;
|
23807 | lodash.join = join;
|
23808 | lodash.kebabCase = kebabCase;
|
23809 | lodash.last = last;
|
23810 | lodash.lastIndexOf = lastIndexOf;
|
23811 | lodash.lowerCase = lowerCase;
|
23812 | lodash.lowerFirst = lowerFirst;
|
23813 | lodash.lt = lt;
|
23814 | lodash.lte = lte;
|
23815 | lodash.max = max;
|
23816 | lodash.maxBy = maxBy;
|
23817 | lodash.mean = mean;
|
23818 | lodash.meanBy = meanBy;
|
23819 | lodash.min = min;
|
23820 | lodash.minBy = minBy;
|
23821 | lodash.stubArray = stubArray;
|
23822 | lodash.stubFalse = stubFalse;
|
23823 | lodash.stubObject = stubObject;
|
23824 | lodash.stubString = stubString;
|
23825 | lodash.stubTrue = stubTrue;
|
23826 | lodash.multiply = multiply;
|
23827 | lodash.nth = nth;
|
23828 | lodash.noConflict = noConflict;
|
23829 | lodash.noop = noop;
|
23830 | lodash.now = now;
|
23831 | lodash.pad = pad;
|
23832 | lodash.padEnd = padEnd;
|
23833 | lodash.padStart = padStart;
|
23834 | lodash.parseInt = parseInt;
|
23835 | lodash.random = random;
|
23836 | lodash.reduce = reduce;
|
23837 | lodash.reduceRight = reduceRight;
|
23838 | lodash.repeat = repeat;
|
23839 | lodash.replace = replace;
|
23840 | lodash.result = result;
|
23841 | lodash.round = round;
|
23842 | lodash.runInContext = runInContext;
|
23843 | lodash.sample = sample;
|
23844 | lodash.size = size;
|
23845 | lodash.snakeCase = snakeCase;
|
23846 | lodash.some = some;
|
23847 | lodash.sortedIndex = sortedIndex;
|
23848 | lodash.sortedIndexBy = sortedIndexBy;
|
23849 | lodash.sortedIndexOf = sortedIndexOf;
|
23850 | lodash.sortedLastIndex = sortedLastIndex;
|
23851 | lodash.sortedLastIndexBy = sortedLastIndexBy;
|
23852 | lodash.sortedLastIndexOf = sortedLastIndexOf;
|
23853 | lodash.startCase = startCase;
|
23854 | lodash.startsWith = startsWith;
|
23855 | lodash.subtract = subtract;
|
23856 | lodash.sum = sum;
|
23857 | lodash.sumBy = sumBy;
|
23858 | lodash.template = template;
|
23859 | lodash.times = times;
|
23860 | lodash.toFinite = toFinite;
|
23861 | lodash.toInteger = toInteger;
|
23862 | lodash.toLength = toLength;
|
23863 | lodash.toLower = toLower;
|
23864 | lodash.toNumber = toNumber;
|
23865 | lodash.toSafeInteger = toSafeInteger;
|
23866 | lodash.toString = toString;
|
23867 | lodash.toUpper = toUpper;
|
23868 | lodash.trim = trim;
|
23869 | lodash.trimEnd = trimEnd;
|
23870 | lodash.trimStart = trimStart;
|
23871 | lodash.truncate = truncate;
|
23872 | lodash.unescape = unescape;
|
23873 | lodash.uniqueId = uniqueId;
|
23874 | lodash.upperCase = upperCase;
|
23875 | lodash.upperFirst = upperFirst;
|
23876 |
|
23877 | // Add aliases.
|
23878 | lodash.each = forEach;
|
23879 | lodash.eachRight = forEachRight;
|
23880 | lodash.first = head;
|
23881 |
|
23882 | mixin(lodash, (function() {
|
23883 | var source = {};
|
23884 | baseForOwn(lodash, function(func, methodName) {
|
23885 | if (!hasOwnProperty.call(lodash.prototype, methodName)) {
|
23886 | source[methodName] = func;
|
23887 | }
|
23888 | });
|
23889 | return source;
|
23890 | }()), { 'chain': false });
|
23891 |
|
23892 |
|
23893 |
|
23894 | |
23895 |
|
23896 |
|
23897 |
|
23898 |
|
23899 |
|
23900 |
|
23901 | lodash.VERSION = VERSION;
|
23902 |
|
23903 |
|
23904 | arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
|
23905 | lodash[methodName].placeholder = lodash;
|
23906 | });
|
23907 |
|
23908 |
|
23909 | arrayEach(['drop', 'take'], function(methodName, index) {
|
23910 | LazyWrapper.prototype[methodName] = function(n) {
|
23911 | n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
|
23912 |
|
23913 | var result = (this.__filtered__ && !index)
|
23914 | ? new LazyWrapper(this)
|
23915 | : this.clone();
|
23916 |
|
23917 | if (result.__filtered__) {
|
23918 | result.__takeCount__ = nativeMin(n, result.__takeCount__);
|
23919 | } else {
|
23920 | result.__views__.push({
|
23921 | 'size': nativeMin(n, MAX_ARRAY_LENGTH),
|
23922 | 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
|
23923 | });
|
23924 | }
|
23925 | return result;
|
23926 | };
|
23927 |
|
23928 | LazyWrapper.prototype[methodName + 'Right'] = function(n) {
|
23929 | return this.reverse()[methodName](n).reverse();
|
23930 | };
|
23931 | });
|
23932 |
|
23933 |
|
23934 | arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
|
23935 | var type = index + 1,
|
23936 | isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
|
23937 |
|
23938 | LazyWrapper.prototype[methodName] = function(iteratee) {
|
23939 | var result = this.clone();
|
23940 | result.__iteratees__.push({
|
23941 | 'iteratee': getIteratee(iteratee, 3),
|
23942 | 'type': type
|
23943 | });
|
23944 | result.__filtered__ = result.__filtered__ || isFilter;
|
23945 | return result;
|
23946 | };
|
23947 | });
|
23948 |
|
23949 |
|
23950 | arrayEach(['head', 'last'], function(methodName, index) {
|
23951 | var takeName = 'take' + (index ? 'Right' : '');
|
23952 |
|
23953 | LazyWrapper.prototype[methodName] = function() {
|
23954 | return this[takeName](1).value()[0];
|
23955 | };
|
23956 | });
|
23957 |
|
23958 |
|
23959 | arrayEach(['initial', 'tail'], function(methodName, index) {
|
23960 | var dropName = 'drop' + (index ? '' : 'Right');
|
23961 |
|
23962 | LazyWrapper.prototype[methodName] = function() {
|
23963 | return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
|
23964 | };
|
23965 | });
|
23966 |
|
23967 | LazyWrapper.prototype.compact = function() {
|
23968 | return this.filter(identity);
|
23969 | };
|
23970 |
|
23971 | LazyWrapper.prototype.find = function(predicate) {
|
23972 | return this.filter(predicate).head();
|
23973 | };
|
23974 |
|
23975 | LazyWrapper.prototype.findLast = function(predicate) {
|
23976 | return this.reverse().find(predicate);
|
23977 | };
|
23978 |
|
23979 | LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
|
23980 | if (typeof path == 'function') {
|
23981 | return new LazyWrapper(this);
|
23982 | }
|
23983 | return this.map(function(value) {
|
23984 | return baseInvoke(value, path, args);
|
23985 | });
|
23986 | });
|
23987 |
|
23988 | LazyWrapper.prototype.reject = function(predicate) {
|
23989 | return this.filter(negate(getIteratee(predicate)));
|
23990 | };
|
23991 |
|
23992 | LazyWrapper.prototype.slice = function(start, end) {
|
23993 | start = toInteger(start);
|
23994 |
|
23995 | var result = this;
|
23996 | if (result.__filtered__ && (start > 0 || end < 0)) {
|
23997 | return new LazyWrapper(result);
|
23998 | }
|
23999 | if (start < 0) {
|
24000 | result = result.takeRight(-start);
|
24001 | } else if (start) {
|
24002 | result = result.drop(start);
|
24003 | }
|
24004 | if (end !== undefined) {
|
24005 | end = toInteger(end);
|
24006 | result = end < 0 ? result.dropRight(-end) : result.take(end - start);
|
24007 | }
|
24008 | return result;
|
24009 | };
|
24010 |
|
24011 | LazyWrapper.prototype.takeRightWhile = function(predicate) {
|
24012 | return this.reverse().takeWhile(predicate).reverse();
|
24013 | };
|
24014 |
|
24015 | LazyWrapper.prototype.toArray = function() {
|
24016 | return this.take(MAX_ARRAY_LENGTH);
|
24017 | };
|
24018 |
|
24019 |
|
24020 | baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
24021 | var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
|
24022 | isTaker = /^(?:head|last)$/.test(methodName),
|
24023 | lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
|
24024 | retUnwrapped = isTaker || /^find/.test(methodName);
|
24025 |
|
24026 | if (!lodashFunc) {
|
24027 | return;
|
24028 | }
|
24029 | lodash.prototype[methodName] = function() {
|
24030 | var value = this.__wrapped__,
|
24031 | args = isTaker ? [1] : arguments,
|
24032 | isLazy = value instanceof LazyWrapper,
|
24033 | iteratee = args[0],
|
24034 | useLazy = isLazy || isArray(value);
|
24035 |
|
24036 | var interceptor = function(value) {
|
24037 | var result = lodashFunc.apply(lodash, arrayPush([value], args));
|
24038 | return (isTaker && chainAll) ? result[0] : result;
|
24039 | };
|
24040 |
|
24041 | if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
|
24042 |
|
24043 | isLazy = useLazy = false;
|
24044 | }
|
24045 | var chainAll = this.__chain__,
|
24046 | isHybrid = !!this.__actions__.length,
|
24047 | isUnwrapped = retUnwrapped && !chainAll,
|
24048 | onlyLazy = isLazy && !isHybrid;
|
24049 |
|
24050 | if (!retUnwrapped && useLazy) {
|
24051 | value = onlyLazy ? value : new LazyWrapper(this);
|
24052 | var result = func.apply(value, args);
|
24053 | result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
|
24054 | return new LodashWrapper(result, chainAll);
|
24055 | }
|
24056 | if (isUnwrapped && onlyLazy) {
|
24057 | return func.apply(this, args);
|
24058 | }
|
24059 | result = this.thru(interceptor);
|
24060 | return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
|
24061 | };
|
24062 | });
|
24063 |
|
24064 |
|
24065 | arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
|
24066 | var func = arrayProto[methodName],
|
24067 | chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
|
24068 | retUnwrapped = /^(?:pop|shift)$/.test(methodName);
|
24069 |
|
24070 | lodash.prototype[methodName] = function() {
|
24071 | var args = arguments;
|
24072 | if (retUnwrapped && !this.__chain__) {
|
24073 | var value = this.value();
|
24074 | return func.apply(isArray(value) ? value : [], args);
|
24075 | }
|
24076 | return this[chainName](function(value) {
|
24077 | return func.apply(isArray(value) ? value : [], args);
|
24078 | });
|
24079 | };
|
24080 | });
|
24081 |
|
24082 |
|
24083 | baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
24084 | var lodashFunc = lodash[methodName];
|
24085 | if (lodashFunc) {
|
24086 | var key = (lodashFunc.name + ''),
|
24087 | names = realNames[key] || (realNames[key] = []);
|
24088 |
|
24089 | names.push({ 'name': methodName, 'func': lodashFunc });
|
24090 | }
|
24091 | });
|
24092 |
|
24093 | realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
|
24094 | 'name': 'wrapper',
|
24095 | 'func': undefined
|
24096 | }];
|
24097 |
|
24098 |
|
24099 | LazyWrapper.prototype.clone = lazyClone;
|
24100 | LazyWrapper.prototype.reverse = lazyReverse;
|
24101 | LazyWrapper.prototype.value = lazyValue;
|
24102 |
|
24103 |
|
24104 | lodash.prototype.at = wrapperAt;
|
24105 | lodash.prototype.chain = wrapperChain;
|
24106 | lodash.prototype.commit = wrapperCommit;
|
24107 | lodash.prototype.next = wrapperNext;
|
24108 | lodash.prototype.plant = wrapperPlant;
|
24109 | lodash.prototype.reverse = wrapperReverse;
|
24110 | lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
|
24111 |
|
24112 |
|
24113 | lodash.prototype.first = lodash.prototype.head;
|
24114 |
|
24115 | if (symIterator) {
|
24116 | lodash.prototype[symIterator] = wrapperToIterator;
|
24117 | }
|
24118 | return lodash;
|
24119 | });
|
24120 |
|
24121 |
|
24122 |
|
24123 |
|
24124 | var _ = runInContext();
|
24125 |
|
24126 |
|
24127 | if (true) {
|
24128 |
|
24129 |
|
24130 |
|
24131 |
|
24132 | root._ = _;
|
24133 |
|
24134 |
|
24135 |
|
24136 | !(__WEBPACK_AMD_DEFINE_RESULT__ = function() {
|
24137 | return _;
|
24138 | }.call(exports, __webpack_require__, exports, module),
|
24139 | __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
24140 | }
|
24141 |
|
24142 | else if (freeModule) {
|
24143 |
|
24144 | (freeModule.exports = _)._ = _;
|
24145 |
|
24146 | freeExports._ = _;
|
24147 | }
|
24148 | else {
|
24149 |
|
24150 | root._ = _;
|
24151 | }
|
24152 | }.call(this));
|
24153 |
|
24154 | }.call(exports, __webpack_require__(192), __webpack_require__(193)(module)))
|
24155 |
|
24156 | }),
|
24157 |
|
24158 | (function(module, exports) {
|
24159 |
|
24160 | function classname () {
|
24161 | var result = {},
|
24162 | objects = {},
|
24163 | resultString = "";
|
24164 |
|
24165 | function add (strings) {
|
24166 | classname.each(strings.split(" "), function (string) {
|
24167 | result[string] = !!string;
|
24168 | });
|
24169 | }
|
24170 |
|
24171 | classname.each([].slice.call(arguments), function (x) {
|
24172 | switch (classname.getType(x)) {
|
24173 | case "string":
|
24174 | case "number":
|
24175 | add(x);
|
24176 | break;
|
24177 |
|
24178 | case "array":
|
24179 | add(classname.apply(null, x));
|
24180 | break;
|
24181 |
|
24182 | case "element":
|
24183 | add(classname(x.className || ""));
|
24184 | break;
|
24185 |
|
24186 | case "nodelist":
|
24187 | add(classname.apply(null, [].slice.call(x)));
|
24188 | break;
|
24189 |
|
24190 | case "jquery":
|
24191 | add(classname.apply(null, x.get()));
|
24192 | break;
|
24193 |
|
24194 | case "object":
|
24195 | objects = classname.extend(objects, x);
|
24196 | break;
|
24197 | }
|
24198 | });
|
24199 |
|
24200 | result = classname.extend(result, objects);
|
24201 |
|
24202 | classname.each(result, function (val, key) {
|
24203 | if (val) {
|
24204 | resultString += " " + key;
|
24205 | }
|
24206 | });
|
24207 |
|
24208 | return resultString.substr(1);
|
24209 | }
|
24210 |
|
24211 | classname.setTo = function (elements) {
|
24212 | var type = classname.getType(elements);
|
24213 |
|
24214 | if (type === "element") {
|
24215 | elements = [elements];
|
24216 | }
|
24217 |
|
24218 | if (type === "jquery") {
|
24219 | elements = elements.get();
|
24220 | }
|
24221 |
|
24222 | if (type === "nodelist") {
|
24223 | elements = [].slice.call(elements);
|
24224 | }
|
24225 |
|
24226 | return function () {
|
24227 | var classNames = classname.apply(null, arguments);
|
24228 |
|
24229 | classname.each(elements, function (element) {
|
24230 | element.className = classNames;
|
24231 | });
|
24232 | };
|
24233 | };
|
24234 |
|
24235 | classname.each = function (arr, fn) {
|
24236 | var type = classname.getType(arr);
|
24237 |
|
24238 | if (type === "array") {
|
24239 | for (var i = 0; i < arr.length; i++) {
|
24240 | fn(arr[i], i);
|
24241 | }
|
24242 | }
|
24243 |
|
24244 | if (type === "object") {
|
24245 | for (var key in arr) {
|
24246 | fn(arr[key], key);
|
24247 | }
|
24248 | }
|
24249 | };
|
24250 |
|
24251 | classname.getType = function (x) {
|
24252 | var type = Object.prototype.toString.call(x).slice(8, -1).toLowerCase();
|
24253 |
|
24254 | if (type === "object" && x.jquery) {
|
24255 | return "jquery";
|
24256 | }
|
24257 |
|
24258 | if (type.indexOf("element") > 1) {
|
24259 | return "element";
|
24260 | }
|
24261 |
|
24262 | return type;
|
24263 | };
|
24264 |
|
24265 | classname.extend = function (obj1, obj2) {
|
24266 | var result = {},
|
24267 | objs = [obj1, obj2];
|
24268 |
|
24269 | classname.each(objs, function (obj) {
|
24270 | classname.each(obj, function (val, key) {
|
24271 | if (obj.hasOwnProperty(key)) {
|
24272 | result[key] = val;
|
24273 | }
|
24274 | });
|
24275 | });
|
24276 |
|
24277 | return result;
|
24278 | };
|
24279 |
|
24280 | if (typeof module !== "undefined" && module.exports) {
|
24281 | module.exports = classname;
|
24282 | }
|
24283 |
|
24284 |
|
24285 | }),
|
24286 |
|
24287 | (function(module, exports, __webpack_require__) {
|
24288 |
|
24289 | "use strict";
|
24290 |
|
24291 |
|
24292 | Object.defineProperty(exports, "__esModule", {
|
24293 | value: true
|
24294 | });
|
24295 |
|
24296 | var _lodash = __webpack_require__(54);
|
24297 |
|
24298 | var _lodash2 = _interopRequireDefault(_lodash);
|
24299 |
|
24300 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
24301 |
|
24302 | function position(elem) {
|
24303 | if (!elem) {
|
24304 | return;
|
24305 | }
|
24306 |
|
24307 | return {
|
24308 | left: elem.offsetLeft,
|
24309 | top: elem.offsetTop
|
24310 | };
|
24311 | }
|
24312 |
|
24313 | function offset(elem) {
|
24314 | var docElem = void 0,
|
24315 | rect = void 0;
|
24316 |
|
24317 | if (!elem) {
|
24318 | return {};
|
24319 | }
|
24320 |
|
24321 | rect = elem.getBoundingClientRect();
|
24322 |
|
24323 |
|
24324 | if (rect.width || rect.height || elem.getClientRects().length) {
|
24325 | docElem = elem.ownerDocument.documentElement;
|
24326 |
|
24327 | return {
|
24328 | top: rect.top + window.pageYOffset - docElem.clientTop,
|
24329 | left: rect.left + window.pageXOffset - docElem.clientLeft
|
24330 | };
|
24331 | }
|
24332 |
|
24333 | return {};
|
24334 | }
|
24335 |
|
24336 |
|
24337 |
|
24338 |
|
24339 |
|
24340 |
|
24341 |
|
24342 |
|
24343 | function isChildOf(child, parent) {
|
24344 | var checkEqual = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
24345 |
|
24346 | var found = false;
|
24347 |
|
24348 | if (!(parent instanceof NodeList)) {
|
24349 | parent = [parent];
|
24350 | }
|
24351 |
|
24352 | _lodash2.default.each(parent, function (_parent) {
|
24353 | var _child = child;
|
24354 |
|
24355 | if (found) return false;
|
24356 | if (checkEqual && _child === _parent) return true;
|
24357 |
|
24358 | while ((_child = _child.parentNode) && _child !== _parent) {}
|
24359 | found = !!_child;
|
24360 | });
|
24361 |
|
24362 | return found;
|
24363 | }
|
24364 |
|
24365 | function ignoreSelection() {
|
24366 | if (document.selection) {
|
24367 | document.selection.empty();
|
24368 | return;
|
24369 | }
|
24370 |
|
24371 | if (window.getSelection) {
|
24372 | window.getSelection().removeAllRanges();
|
24373 | }
|
24374 | }
|
24375 |
|
24376 | function getHeight(elem) {
|
24377 | var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
24378 |
|
24379 | return elem && elem.offsetHeight || defaultValue;
|
24380 | }
|
24381 |
|
24382 | function getWidth(elem) {
|
24383 | var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
24384 |
|
24385 | return elem && elem.offsetHeight || defaultValue;
|
24386 | }
|
24387 |
|
24388 | function scrollTo(element, to, duration) {
|
24389 | if (duration <= 0) return;
|
24390 | var difference = to - element.scrollTop;
|
24391 | var perTick = difference / duration * 10;
|
24392 |
|
24393 | setTimeout(function () {
|
24394 | element.scrollTop = element.scrollTop + perTick;
|
24395 | if (element.scrollTop === to) return;
|
24396 | scrollTo(element, to, duration - 10);
|
24397 | }, 10);
|
24398 | }
|
24399 |
|
24400 | exports.default = { offset: offset, position: position, isChildOf: isChildOf, ignoreSelection: ignoreSelection, getHeight: getHeight, getWidth: getWidth, scrollTo: scrollTo };
|
24401 |
|
24402 | }),
|
24403 |
|
24404 | (function(module, exports, __webpack_require__) {
|
24405 |
|
24406 | "use strict";
|
24407 | (function(process) { |
24408 |
|
24409 |
|
24410 |
|
24411 |
|
24412 |
|
24413 |
|
24414 |
|
24415 |
|
24416 |
|
24417 |
|
24418 |
|
24419 | var _prodInvariant = __webpack_require__(18),
|
24420 | _assign = __webpack_require__(4);
|
24421 |
|
24422 | var ReactNoopUpdateQueue = __webpack_require__(58);
|
24423 |
|
24424 | var canDefineProperty = __webpack_require__(26);
|
24425 | var emptyObject = __webpack_require__(27);
|
24426 | var invariant = __webpack_require__(1);
|
24427 | var lowPriorityWarning = __webpack_require__(36);
|
24428 |
|
24429 |
|
24430 |
|
24431 |
|
24432 | function ReactComponent(props, context, updater) {
|
24433 | this.props = props;
|
24434 | this.context = context;
|
24435 | this.refs = emptyObject;
|
24436 |
|
24437 |
|
24438 | this.updater = updater || ReactNoopUpdateQueue;
|
24439 | }
|
24440 |
|
24441 | ReactComponent.prototype.isReactComponent = {};
|
24442 |
|
24443 |
|
24444 |
|
24445 |
|
24446 |
|
24447 |
|
24448 |
|
24449 |
|
24450 |
|
24451 |
|
24452 |
|
24453 |
|
24454 |
|
24455 |
|
24456 |
|
24457 |
|
24458 |
|
24459 |
|
24460 |
|
24461 |
|
24462 |
|
24463 |
|
24464 |
|
24465 |
|
24466 |
|
24467 |
|
24468 | ReactComponent.prototype.setState = function (partialState, callback) {
|
24469 | !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0;
|
24470 | this.updater.enqueueSetState(this, partialState);
|
24471 | if (callback) {
|
24472 | this.updater.enqueueCallback(this, callback, 'setState');
|
24473 | }
|
24474 | };
|
24475 |
|
24476 |
|
24477 |
|
24478 |
|
24479 |
|
24480 |
|
24481 |
|
24482 |
|
24483 |
|
24484 |
|
24485 |
|
24486 |
|
24487 |
|
24488 |
|
24489 |
|
24490 | ReactComponent.prototype.forceUpdate = function (callback) {
|
24491 | this.updater.enqueueForceUpdate(this);
|
24492 | if (callback) {
|
24493 | this.updater.enqueueCallback(this, callback, 'forceUpdate');
|
24494 | }
|
24495 | };
|
24496 |
|
24497 |
|
24498 |
|
24499 |
|
24500 |
|
24501 |
|
24502 | if (process.env.NODE_ENV !== 'production') {
|
24503 | var deprecatedAPIs = {
|
24504 | isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
|
24505 | replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
|
24506 | };
|
24507 | var defineDeprecationWarning = function (methodName, info) {
|
24508 | if (canDefineProperty) {
|
24509 | Object.defineProperty(ReactComponent.prototype, methodName, {
|
24510 | get: function () {
|
24511 | lowPriorityWarning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
|
24512 | return undefined;
|
24513 | }
|
24514 | });
|
24515 | }
|
24516 | };
|
24517 | for (var fnName in deprecatedAPIs) {
|
24518 | if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
24519 | defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
24520 | }
|
24521 | }
|
24522 | }
|
24523 |
|
24524 |
|
24525 |
|
24526 |
|
24527 | function ReactPureComponent(props, context, updater) {
|
24528 |
|
24529 | this.props = props;
|
24530 | this.context = context;
|
24531 | this.refs = emptyObject;
|
24532 |
|
24533 |
|
24534 | this.updater = updater || ReactNoopUpdateQueue;
|
24535 | }
|
24536 |
|
24537 | function ComponentDummy() {}
|
24538 | ComponentDummy.prototype = ReactComponent.prototype;
|
24539 | ReactPureComponent.prototype = new ComponentDummy();
|
24540 | ReactPureComponent.prototype.constructor = ReactPureComponent;
|
24541 |
|
24542 | _assign(ReactPureComponent.prototype, ReactComponent.prototype);
|
24543 | ReactPureComponent.prototype.isPureReactComponent = true;
|
24544 |
|
24545 | module.exports = {
|
24546 | Component: ReactComponent,
|
24547 | PureComponent: ReactPureComponent
|
24548 | };
|
24549 | }.call(exports, __webpack_require__(0)))
|
24550 |
|
24551 | }),
|
24552 |
|
24553 | (function(module, exports, __webpack_require__) {
|
24554 |
|
24555 | "use strict";
|
24556 | (function(process) { |
24557 |
|
24558 |
|
24559 |
|
24560 |
|
24561 |
|
24562 |
|
24563 |
|
24564 |
|
24565 |
|
24566 |
|
24567 |
|
24568 | var warning = __webpack_require__(2);
|
24569 |
|
24570 | function warnNoop(publicInstance, callerName) {
|
24571 | if (process.env.NODE_ENV !== 'production') {
|
24572 | var constructor = publicInstance.constructor;
|
24573 | process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;
|
24574 | }
|
24575 | }
|
24576 |
|
24577 | /**
|
24578 | * This is the abstract API for an update queue.
|
24579 | */
|
24580 | var ReactNoopUpdateQueue = {
|
24581 | |
24582 |
|
24583 |
|
24584 |
|
24585 |
|
24586 |
|
24587 |
|
24588 | isMounted: function (publicInstance) {
|
24589 | return false;
|
24590 | },
|
24591 |
|
24592 | |
24593 |
|
24594 |
|
24595 |
|
24596 |
|
24597 |
|
24598 |
|
24599 |
|
24600 | enqueueCallback: function (publicInstance, callback) {},
|
24601 |
|
24602 | |
24603 |
|
24604 |
|
24605 |
|
24606 |
|
24607 |
|
24608 |
|
24609 |
|
24610 |
|
24611 |
|
24612 |
|
24613 |
|
24614 |
|
24615 | enqueueForceUpdate: function (publicInstance) {
|
24616 | warnNoop(publicInstance, 'forceUpdate');
|
24617 | },
|
24618 |
|
24619 | |
24620 |
|
24621 |
|
24622 |
|
24623 |
|
24624 |
|
24625 |
|
24626 |
|
24627 |
|
24628 |
|
24629 |
|
24630 | enqueueReplaceState: function (publicInstance, completeState) {
|
24631 | warnNoop(publicInstance, 'replaceState');
|
24632 | },
|
24633 |
|
24634 | |
24635 |
|
24636 |
|
24637 |
|
24638 |
|
24639 |
|
24640 |
|
24641 |
|
24642 |
|
24643 |
|
24644 | enqueueSetState: function (publicInstance, partialState) {
|
24645 | warnNoop(publicInstance, 'setState');
|
24646 | }
|
24647 | };
|
24648 |
|
24649 | module.exports = ReactNoopUpdateQueue;
|
24650 | }.call(exports, __webpack_require__(0)))
|
24651 |
|
24652 | }),
|
24653 |
|
24654 | (function(module, exports, __webpack_require__) {
|
24655 |
|
24656 | "use strict";
|
24657 |
|
24658 |
|
24659 |
|
24660 |
|
24661 |
|
24662 |
|
24663 |
|
24664 |
|
24665 |
|
24666 |
|
24667 |
|
24668 |
|
24669 |
|
24670 |
|
24671 |
|
24672 |
|
24673 | var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
24674 |
|
24675 | module.exports = REACT_ELEMENT_TYPE;
|
24676 |
|
24677 | }),
|
24678 |
|
24679 | (function(module, exports, __webpack_require__) {
|
24680 |
|
24681 | "use strict";
|
24682 |
|
24683 |
|
24684 |
|
24685 |
|
24686 |
|
24687 |
|
24688 |
|
24689 |
|
24690 |
|
24691 |
|
24692 |
|
24693 |
|
24694 |
|
24695 |
|
24696 |
|
24697 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
24698 | var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
24699 |
|
24700 |
|
24701 |
|
24702 |
|
24703 |
|
24704 |
|
24705 |
|
24706 |
|
24707 |
|
24708 |
|
24709 |
|
24710 |
|
24711 |
|
24712 |
|
24713 |
|
24714 | function getIteratorFn(maybeIterable) {
|
24715 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
24716 | if (typeof iteratorFn === 'function') {
|
24717 | return iteratorFn;
|
24718 | }
|
24719 | }
|
24720 |
|
24721 | module.exports = getIteratorFn;
|
24722 |
|
24723 | }),
|
24724 |
|
24725 | (function(module, exports, __webpack_require__) {
|
24726 |
|
24727 | "use strict";
|
24728 | (function(process) { |
24729 |
|
24730 |
|
24731 |
|
24732 |
|
24733 |
|
24734 |
|
24735 |
|
24736 |
|
24737 |
|
24738 |
|
24739 |
|
24740 |
|
24741 |
|
24742 |
|
24743 |
|
24744 |
|
24745 |
|
24746 |
|
24747 | var ReactCurrentOwner = __webpack_require__(10);
|
24748 | var ReactComponentTreeHook = __webpack_require__(7);
|
24749 | var ReactElement = __webpack_require__(15);
|
24750 |
|
24751 | var checkReactTypeSpec = __webpack_require__(96);
|
24752 |
|
24753 | var canDefineProperty = __webpack_require__(26);
|
24754 | var getIteratorFn = __webpack_require__(60);
|
24755 | var warning = __webpack_require__(2);
|
24756 | var lowPriorityWarning = __webpack_require__(36);
|
24757 |
|
24758 | function getDeclarationErrorAddendum() {
|
24759 | if (ReactCurrentOwner.current) {
|
24760 | var name = ReactCurrentOwner.current.getName();
|
24761 | if (name) {
|
24762 | return ' Check the render method of `' + name + '`.';
|
24763 | }
|
24764 | }
|
24765 | return '';
|
24766 | }
|
24767 |
|
24768 | function getSourceInfoErrorAddendum(elementProps) {
|
24769 | if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
|
24770 | var source = elementProps.__source;
|
24771 | var fileName = source.fileName.replace(/^.*[\\\/]/, '');
|
24772 | var lineNumber = source.lineNumber;
|
24773 | return ' Check your code at ' + fileName + ':' + lineNumber + '.';
|
24774 | }
|
24775 | return '';
|
24776 | }
|
24777 |
|
24778 |
|
24779 |
|
24780 |
|
24781 |
|
24782 |
|
24783 | var ownerHasKeyUseWarning = {};
|
24784 |
|
24785 | function getCurrentComponentErrorInfo(parentType) {
|
24786 | var info = getDeclarationErrorAddendum();
|
24787 |
|
24788 | if (!info) {
|
24789 | var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
24790 | if (parentName) {
|
24791 | info = ' Check the top-level render call using <' + parentName + '>.';
|
24792 | }
|
24793 | }
|
24794 | return info;
|
24795 | }
|
24796 |
|
24797 |
|
24798 |
|
24799 |
|
24800 |
|
24801 |
|
24802 |
|
24803 |
|
24804 |
|
24805 |
|
24806 |
|
24807 |
|
24808 | function validateExplicitKey(element, parentType) {
|
24809 | if (!element._store || element._store.validated || element.key != null) {
|
24810 | return;
|
24811 | }
|
24812 | element._store.validated = true;
|
24813 |
|
24814 | var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {});
|
24815 |
|
24816 | var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
24817 | if (memoizer[currentComponentErrorInfo]) {
|
24818 | return;
|
24819 | }
|
24820 | memoizer[currentComponentErrorInfo] = true;
|
24821 |
|
24822 |
|
24823 |
|
24824 |
|
24825 | var childOwner = '';
|
24826 | if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
|
24827 |
|
24828 | childOwner = ' It was passed a child from ' + element._owner.getName() + '.';
|
24829 | }
|
24830 |
|
24831 | process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0;
|
24832 | }
|
24833 |
|
24834 |
|
24835 |
|
24836 |
|
24837 |
|
24838 |
|
24839 |
|
24840 |
|
24841 |
|
24842 |
|
24843 | function validateChildKeys(node, parentType) {
|
24844 | if (typeof node !== 'object') {
|
24845 | return;
|
24846 | }
|
24847 | if (Array.isArray(node)) {
|
24848 | for (var i = 0; i < node.length; i++) {
|
24849 | var child = node[i];
|
24850 | if (ReactElement.isValidElement(child)) {
|
24851 | validateExplicitKey(child, parentType);
|
24852 | }
|
24853 | }
|
24854 | } else if (ReactElement.isValidElement(node)) {
|
24855 |
|
24856 | if (node._store) {
|
24857 | node._store.validated = true;
|
24858 | }
|
24859 | } else if (node) {
|
24860 | var iteratorFn = getIteratorFn(node);
|
24861 |
|
24862 | if (iteratorFn) {
|
24863 | if (iteratorFn !== node.entries) {
|
24864 | var iterator = iteratorFn.call(node);
|
24865 | var step;
|
24866 | while (!(step = iterator.next()).done) {
|
24867 | if (ReactElement.isValidElement(step.value)) {
|
24868 | validateExplicitKey(step.value, parentType);
|
24869 | }
|
24870 | }
|
24871 | }
|
24872 | }
|
24873 | }
|
24874 | }
|
24875 |
|
24876 |
|
24877 |
|
24878 |
|
24879 |
|
24880 |
|
24881 |
|
24882 | function validatePropTypes(element) {
|
24883 | var componentClass = element.type;
|
24884 | if (typeof componentClass !== 'function') {
|
24885 | return;
|
24886 | }
|
24887 | var name = componentClass.displayName || componentClass.name;
|
24888 | if (componentClass.propTypes) {
|
24889 | checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null);
|
24890 | }
|
24891 | if (typeof componentClass.getDefaultProps === 'function') {
|
24892 | process.env.NODE_ENV !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
|
24893 | }
|
24894 | }
|
24895 |
|
24896 | var ReactElementValidator = {
|
24897 | createElement: function (type, props, children) {
|
24898 | var validType = typeof type === 'string' || typeof type === 'function';
|
24899 |
|
24900 |
|
24901 | if (!validType) {
|
24902 | if (typeof type !== 'function' && typeof type !== 'string') {
|
24903 | var info = '';
|
24904 | if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
24905 | info += ' You likely forgot to export your component from the file ' + "it's defined in.";
|
24906 | }
|
24907 |
|
24908 | var sourceInfo = getSourceInfoErrorAddendum(props);
|
24909 | if (sourceInfo) {
|
24910 | info += sourceInfo;
|
24911 | } else {
|
24912 | info += getDeclarationErrorAddendum();
|
24913 | }
|
24914 |
|
24915 | info += ReactComponentTreeHook.getCurrentStackAddendum();
|
24916 |
|
24917 | var currentSource = props !== null && props !== undefined && props.__source !== undefined ? props.__source : null;
|
24918 | ReactComponentTreeHook.pushNonStandardWarningStack(true, currentSource);
|
24919 | process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;
|
24920 | ReactComponentTreeHook.popNonStandardWarningStack();
|
24921 | }
|
24922 | }
|
24923 |
|
24924 | var element = ReactElement.createElement.apply(this, arguments);
|
24925 |
|
24926 |
|
24927 |
|
24928 | if (element == null) {
|
24929 | return element;
|
24930 | }
|
24931 |
|
24932 |
|
24933 |
|
24934 |
|
24935 |
|
24936 |
|
24937 | if (validType) {
|
24938 | for (var i = 2; i < arguments.length; i++) {
|
24939 | validateChildKeys(arguments[i], type);
|
24940 | }
|
24941 | }
|
24942 |
|
24943 | validatePropTypes(element);
|
24944 |
|
24945 | return element;
|
24946 | },
|
24947 |
|
24948 | createFactory: function (type) {
|
24949 | var validatedFactory = ReactElementValidator.createElement.bind(null, type);
|
24950 |
|
24951 | validatedFactory.type = type;
|
24952 |
|
24953 | if (process.env.NODE_ENV !== 'production') {
|
24954 | if (canDefineProperty) {
|
24955 | Object.defineProperty(validatedFactory, 'type', {
|
24956 | enumerable: false,
|
24957 | get: function () {
|
24958 | lowPriorityWarning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
|
24959 | Object.defineProperty(this, 'type', {
|
24960 | value: type
|
24961 | });
|
24962 | return type;
|
24963 | }
|
24964 | });
|
24965 | }
|
24966 | }
|
24967 |
|
24968 | return validatedFactory;
|
24969 | },
|
24970 |
|
24971 | cloneElement: function (element, props, children) {
|
24972 | var newElement = ReactElement.cloneElement.apply(this, arguments);
|
24973 | for (var i = 2; i < arguments.length; i++) {
|
24974 | validateChildKeys(arguments[i], newElement.type);
|
24975 | }
|
24976 | validatePropTypes(newElement);
|
24977 | return newElement;
|
24978 | }
|
24979 | };
|
24980 |
|
24981 | module.exports = ReactElementValidator;
|
24982 | }.call(exports, __webpack_require__(0)))
|
24983 |
|
24984 | }),
|
24985 |
|
24986 | (function(module, exports, __webpack_require__) {
|
24987 |
|
24988 | "use strict";
|
24989 |
|
24990 |
|
24991 |
|
24992 |
|
24993 |
|
24994 |
|
24995 |
|
24996 |
|
24997 |
|
24998 |
|
24999 |
|
25000 |
|
25001 |
|
25002 |
|
25003 |
|
25004 | var factory = __webpack_require__(63);
|
25005 | module.exports = function(isValidElement) {
|
25006 |
|
25007 | var throwOnDirectAccess = false;
|
25008 | return factory(isValidElement, throwOnDirectAccess);
|
25009 | };
|
25010 |
|
25011 |
|
25012 | }),
|
25013 |
|
25014 | (function(module, exports, __webpack_require__) {
|
25015 |
|
25016 | "use strict";
|
25017 | (function(process) { |
25018 |
|
25019 |
|
25020 |
|
25021 |
|
25022 |
|
25023 |
|
25024 |
|
25025 |
|
25026 |
|
25027 |
|
25028 | var emptyFunction = __webpack_require__(8);
|
25029 | var invariant = __webpack_require__(1);
|
25030 | var warning = __webpack_require__(2);
|
25031 |
|
25032 | var ReactPropTypesSecret = __webpack_require__(37);
|
25033 | var checkPropTypes = __webpack_require__(100);
|
25034 |
|
25035 | module.exports = function(isValidElement, throwOnDirectAccess) {
|
25036 |
|
25037 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
25038 | var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
25039 |
|
25040 | |
25041 |
|
25042 |
|
25043 |
|
25044 |
|
25045 |
|
25046 |
|
25047 |
|
25048 |
|
25049 |
|
25050 |
|
25051 |
|
25052 |
|
25053 |
|
25054 | function getIteratorFn(maybeIterable) {
|
25055 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
25056 | if (typeof iteratorFn === 'function') {
|
25057 | return iteratorFn;
|
25058 | }
|
25059 | }
|
25060 |
|
25061 | |
25062 |
|
25063 |
|
25064 |
|
25065 |
|
25066 |
|
25067 |
|
25068 |
|
25069 |
|
25070 |
|
25071 |
|
25072 |
|
25073 |
|
25074 |
|
25075 |
|
25076 |
|
25077 |
|
25078 |
|
25079 |
|
25080 |
|
25081 |
|
25082 |
|
25083 |
|
25084 |
|
25085 |
|
25086 |
|
25087 |
|
25088 |
|
25089 |
|
25090 |
|
25091 |
|
25092 |
|
25093 |
|
25094 |
|
25095 |
|
25096 |
|
25097 |
|
25098 |
|
25099 |
|
25100 |
|
25101 |
|
25102 |
|
25103 |
|
25104 |
|
25105 |
|
25106 |
|
25107 |
|
25108 | var ANONYMOUS = '<<anonymous>>';
|
25109 |
|
25110 |
|
25111 |
|
25112 | var ReactPropTypes = {
|
25113 | array: createPrimitiveTypeChecker('array'),
|
25114 | bool: createPrimitiveTypeChecker('boolean'),
|
25115 | func: createPrimitiveTypeChecker('function'),
|
25116 | number: createPrimitiveTypeChecker('number'),
|
25117 | object: createPrimitiveTypeChecker('object'),
|
25118 | string: createPrimitiveTypeChecker('string'),
|
25119 | symbol: createPrimitiveTypeChecker('symbol'),
|
25120 |
|
25121 | any: createAnyTypeChecker(),
|
25122 | arrayOf: createArrayOfTypeChecker,
|
25123 | element: createElementTypeChecker(),
|
25124 | instanceOf: createInstanceTypeChecker,
|
25125 | node: createNodeChecker(),
|
25126 | objectOf: createObjectOfTypeChecker,
|
25127 | oneOf: createEnumTypeChecker,
|
25128 | oneOfType: createUnionTypeChecker,
|
25129 | shape: createShapeTypeChecker
|
25130 | };
|
25131 |
|
25132 | |
25133 |
|
25134 |
|
25135 |
|
25136 |
|
25137 | function is(x, y) {
|
25138 |
|
25139 | if (x === y) {
|
25140 |
|
25141 |
|
25142 | return x !== 0 || 1 / x === 1 / y;
|
25143 | } else {
|
25144 |
|
25145 | return x !== x && y !== y;
|
25146 | }
|
25147 | }
|
25148 |
|
25149 |
|
25150 | |
25151 |
|
25152 |
|
25153 |
|
25154 |
|
25155 |
|
25156 |
|
25157 | function PropTypeError(message) {
|
25158 | this.message = message;
|
25159 | this.stack = '';
|
25160 | }
|
25161 |
|
25162 | PropTypeError.prototype = Error.prototype;
|
25163 |
|
25164 | function createChainableTypeChecker(validate) {
|
25165 | if (process.env.NODE_ENV !== 'production') {
|
25166 | var manualPropTypeCallCache = {};
|
25167 | var manualPropTypeWarningCount = 0;
|
25168 | }
|
25169 | function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
25170 | componentName = componentName || ANONYMOUS;
|
25171 | propFullName = propFullName || propName;
|
25172 |
|
25173 | if (secret !== ReactPropTypesSecret) {
|
25174 | if (throwOnDirectAccess) {
|
25175 |
|
25176 | invariant(
|
25177 | false,
|
25178 | 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
25179 | 'Use `PropTypes.checkPropTypes()` to call them. ' +
|
25180 | 'Read more at http://fb.me/use-check-prop-types'
|
25181 | );
|
25182 | } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
25183 |
|
25184 | var cacheKey = componentName + ':' + propName;
|
25185 | if (
|
25186 | !manualPropTypeCallCache[cacheKey] &&
|
25187 |
|
25188 | manualPropTypeWarningCount < 3
|
25189 | ) {
|
25190 | warning(
|
25191 | false,
|
25192 | 'You are manually calling a React.PropTypes validation ' +
|
25193 | 'function for the `%s` prop on `%s`. This is deprecated ' +
|
25194 | 'and will throw in the standalone `prop-types` package. ' +
|
25195 | 'You may be seeing this warning due to a third-party PropTypes ' +
|
25196 | 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
|
25197 | propFullName,
|
25198 | componentName
|
25199 | );
|
25200 | manualPropTypeCallCache[cacheKey] = true;
|
25201 | manualPropTypeWarningCount++;
|
25202 | }
|
25203 | }
|
25204 | }
|
25205 | if (props[propName] == null) {
|
25206 | if (isRequired) {
|
25207 | if (props[propName] === null) {
|
25208 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
25209 | }
|
25210 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
25211 | }
|
25212 | return null;
|
25213 | } else {
|
25214 | return validate(props, propName, componentName, location, propFullName);
|
25215 | }
|
25216 | }
|
25217 |
|
25218 | var chainedCheckType = checkType.bind(null, false);
|
25219 | chainedCheckType.isRequired = checkType.bind(null, true);
|
25220 |
|
25221 | return chainedCheckType;
|
25222 | }
|
25223 |
|
25224 | function createPrimitiveTypeChecker(expectedType) {
|
25225 | function validate(props, propName, componentName, location, propFullName, secret) {
|
25226 | var propValue = props[propName];
|
25227 | var propType = getPropType(propValue);
|
25228 | if (propType !== expectedType) {
|
25229 |
|
25230 |
|
25231 |
|
25232 | var preciseType = getPreciseType(propValue);
|
25233 |
|
25234 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
25235 | }
|
25236 | return null;
|
25237 | }
|
25238 | return createChainableTypeChecker(validate);
|
25239 | }
|
25240 |
|
25241 | function createAnyTypeChecker() {
|
25242 | return createChainableTypeChecker(emptyFunction.thatReturnsNull);
|
25243 | }
|
25244 |
|
25245 | function createArrayOfTypeChecker(typeChecker) {
|
25246 | function validate(props, propName, componentName, location, propFullName) {
|
25247 | if (typeof typeChecker !== 'function') {
|
25248 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
25249 | }
|
25250 | var propValue = props[propName];
|
25251 | if (!Array.isArray(propValue)) {
|
25252 | var propType = getPropType(propValue);
|
25253 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
25254 | }
|
25255 | for (var i = 0; i < propValue.length; i++) {
|
25256 | var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
25257 | if (error instanceof Error) {
|
25258 | return error;
|
25259 | }
|
25260 | }
|
25261 | return null;
|
25262 | }
|
25263 | return createChainableTypeChecker(validate);
|
25264 | }
|
25265 |
|
25266 | function createElementTypeChecker() {
|
25267 | function validate(props, propName, componentName, location, propFullName) {
|
25268 | var propValue = props[propName];
|
25269 | if (!isValidElement(propValue)) {
|
25270 | var propType = getPropType(propValue);
|
25271 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
25272 | }
|
25273 | return null;
|
25274 | }
|
25275 | return createChainableTypeChecker(validate);
|
25276 | }
|
25277 |
|
25278 | function createInstanceTypeChecker(expectedClass) {
|
25279 | function validate(props, propName, componentName, location, propFullName) {
|
25280 | if (!(props[propName] instanceof expectedClass)) {
|
25281 | var expectedClassName = expectedClass.name || ANONYMOUS;
|
25282 | var actualClassName = getClassName(props[propName]);
|
25283 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
25284 | }
|
25285 | return null;
|
25286 | }
|
25287 | return createChainableTypeChecker(validate);
|
25288 | }
|
25289 |
|
25290 | function createEnumTypeChecker(expectedValues) {
|
25291 | if (!Array.isArray(expectedValues)) {
|
25292 | process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
|
25293 | return emptyFunction.thatReturnsNull;
|
25294 | }
|
25295 |
|
25296 | function validate(props, propName, componentName, location, propFullName) {
|
25297 | var propValue = props[propName];
|
25298 | for (var i = 0; i < expectedValues.length; i++) {
|
25299 | if (is(propValue, expectedValues[i])) {
|
25300 | return null;
|
25301 | }
|
25302 | }
|
25303 |
|
25304 | var valuesString = JSON.stringify(expectedValues);
|
25305 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
25306 | }
|
25307 | return createChainableTypeChecker(validate);
|
25308 | }
|
25309 |
|
25310 | function createObjectOfTypeChecker(typeChecker) {
|
25311 | function validate(props, propName, componentName, location, propFullName) {
|
25312 | if (typeof typeChecker !== 'function') {
|
25313 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
25314 | }
|
25315 | var propValue = props[propName];
|
25316 | var propType = getPropType(propValue);
|
25317 | if (propType !== 'object') {
|
25318 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
25319 | }
|
25320 | for (var key in propValue) {
|
25321 | if (propValue.hasOwnProperty(key)) {
|
25322 | var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
25323 | if (error instanceof Error) {
|
25324 | return error;
|
25325 | }
|
25326 | }
|
25327 | }
|
25328 | return null;
|
25329 | }
|
25330 | return createChainableTypeChecker(validate);
|
25331 | }
|
25332 |
|
25333 | function createUnionTypeChecker(arrayOfTypeCheckers) {
|
25334 | if (!Array.isArray(arrayOfTypeCheckers)) {
|
25335 | process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
25336 | return emptyFunction.thatReturnsNull;
|
25337 | }
|
25338 |
|
25339 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
25340 | var checker = arrayOfTypeCheckers[i];
|
25341 | if (typeof checker !== 'function') {
|
25342 | warning(
|
25343 | false,
|
25344 | 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +
|
25345 | 'received %s at index %s.',
|
25346 | getPostfixForTypeWarning(checker),
|
25347 | i
|
25348 | );
|
25349 | return emptyFunction.thatReturnsNull;
|
25350 | }
|
25351 | }
|
25352 |
|
25353 | function validate(props, propName, componentName, location, propFullName) {
|
25354 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
25355 | var checker = arrayOfTypeCheckers[i];
|
25356 | if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
25357 | return null;
|
25358 | }
|
25359 | }
|
25360 |
|
25361 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
25362 | }
|
25363 | return createChainableTypeChecker(validate);
|
25364 | }
|
25365 |
|
25366 | function createNodeChecker() {
|
25367 | function validate(props, propName, componentName, location, propFullName) {
|
25368 | if (!isNode(props[propName])) {
|
25369 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
25370 | }
|
25371 | return null;
|
25372 | }
|
25373 | return createChainableTypeChecker(validate);
|
25374 | }
|
25375 |
|
25376 | function createShapeTypeChecker(shapeTypes) {
|
25377 | function validate(props, propName, componentName, location, propFullName) {
|
25378 | var propValue = props[propName];
|
25379 | var propType = getPropType(propValue);
|
25380 | if (propType !== 'object') {
|
25381 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
25382 | }
|
25383 | for (var key in shapeTypes) {
|
25384 | var checker = shapeTypes[key];
|
25385 | if (!checker) {
|
25386 | continue;
|
25387 | }
|
25388 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
25389 | if (error) {
|
25390 | return error;
|
25391 | }
|
25392 | }
|
25393 | return null;
|
25394 | }
|
25395 | return createChainableTypeChecker(validate);
|
25396 | }
|
25397 |
|
25398 | function isNode(propValue) {
|
25399 | switch (typeof propValue) {
|
25400 | case 'number':
|
25401 | case 'string':
|
25402 | case 'undefined':
|
25403 | return true;
|
25404 | case 'boolean':
|
25405 | return !propValue;
|
25406 | case 'object':
|
25407 | if (Array.isArray(propValue)) {
|
25408 | return propValue.every(isNode);
|
25409 | }
|
25410 | if (propValue === null || isValidElement(propValue)) {
|
25411 | return true;
|
25412 | }
|
25413 |
|
25414 | var iteratorFn = getIteratorFn(propValue);
|
25415 | if (iteratorFn) {
|
25416 | var iterator = iteratorFn.call(propValue);
|
25417 | var step;
|
25418 | if (iteratorFn !== propValue.entries) {
|
25419 | while (!(step = iterator.next()).done) {
|
25420 | if (!isNode(step.value)) {
|
25421 | return false;
|
25422 | }
|
25423 | }
|
25424 | } else {
|
25425 |
|
25426 | while (!(step = iterator.next()).done) {
|
25427 | var entry = step.value;
|
25428 | if (entry) {
|
25429 | if (!isNode(entry[1])) {
|
25430 | return false;
|
25431 | }
|
25432 | }
|
25433 | }
|
25434 | }
|
25435 | } else {
|
25436 | return false;
|
25437 | }
|
25438 |
|
25439 | return true;
|
25440 | default:
|
25441 | return false;
|
25442 | }
|
25443 | }
|
25444 |
|
25445 | function isSymbol(propType, propValue) {
|
25446 |
|
25447 | if (propType === 'symbol') {
|
25448 | return true;
|
25449 | }
|
25450 |
|
25451 |
|
25452 | if (propValue['@@toStringTag'] === 'Symbol') {
|
25453 | return true;
|
25454 | }
|
25455 |
|
25456 |
|
25457 | if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
25458 | return true;
|
25459 | }
|
25460 |
|
25461 | return false;
|
25462 | }
|
25463 |
|
25464 |
|
25465 | function getPropType(propValue) {
|
25466 | var propType = typeof propValue;
|
25467 | if (Array.isArray(propValue)) {
|
25468 | return 'array';
|
25469 | }
|
25470 | if (propValue instanceof RegExp) {
|
25471 |
|
25472 |
|
25473 |
|
25474 | return 'object';
|
25475 | }
|
25476 | if (isSymbol(propType, propValue)) {
|
25477 | return 'symbol';
|
25478 | }
|
25479 | return propType;
|
25480 | }
|
25481 |
|
25482 |
|
25483 |
|
25484 | function getPreciseType(propValue) {
|
25485 | if (typeof propValue === 'undefined' || propValue === null) {
|
25486 | return '' + propValue;
|
25487 | }
|
25488 | var propType = getPropType(propValue);
|
25489 | if (propType === 'object') {
|
25490 | if (propValue instanceof Date) {
|
25491 | return 'date';
|
25492 | } else if (propValue instanceof RegExp) {
|
25493 | return 'regexp';
|
25494 | }
|
25495 | }
|
25496 | return propType;
|
25497 | }
|
25498 |
|
25499 |
|
25500 |
|
25501 | function getPostfixForTypeWarning(value) {
|
25502 | var type = getPreciseType(value);
|
25503 | switch (type) {
|
25504 | case 'array':
|
25505 | case 'object':
|
25506 | return 'an ' + type;
|
25507 | case 'boolean':
|
25508 | case 'date':
|
25509 | case 'regexp':
|
25510 | return 'a ' + type;
|
25511 | default:
|
25512 | return type;
|
25513 | }
|
25514 | }
|
25515 |
|
25516 |
|
25517 | function getClassName(propValue) {
|
25518 | if (!propValue.constructor || !propValue.constructor.name) {
|
25519 | return ANONYMOUS;
|
25520 | }
|
25521 | return propValue.constructor.name;
|
25522 | }
|
25523 |
|
25524 | ReactPropTypes.checkPropTypes = checkPropTypes;
|
25525 | ReactPropTypes.PropTypes = ReactPropTypes;
|
25526 |
|
25527 | return ReactPropTypes;
|
25528 | };
|
25529 |
|
25530 | }.call(exports, __webpack_require__(0)))
|
25531 |
|
25532 | }),
|
25533 |
|
25534 | (function(module, exports, __webpack_require__) {
|
25535 |
|
25536 | "use strict";
|
25537 |
|
25538 |
|
25539 |
|
25540 |
|
25541 |
|
25542 |
|
25543 |
|
25544 |
|
25545 |
|
25546 |
|
25547 |
|
25548 |
|
25549 | var ReactDOMComponentFlags = {
|
25550 | hasCachedChildNodes: 1 << 0
|
25551 | };
|
25552 |
|
25553 | module.exports = ReactDOMComponentFlags;
|
25554 |
|
25555 | }),
|
25556 |
|
25557 | (function(module, exports, __webpack_require__) {
|
25558 |
|
25559 | "use strict";
|
25560 | (function(process) { |
25561 |
|
25562 |
|
25563 |
|
25564 |
|
25565 |
|
25566 |
|
25567 |
|
25568 |
|
25569 |
|
25570 |
|
25571 |
|
25572 |
|
25573 | var _prodInvariant = __webpack_require__(3);
|
25574 |
|
25575 | var invariant = __webpack_require__(1);
|
25576 |
|
25577 |
|
25578 |
|
25579 |
|
25580 |
|
25581 |
|
25582 |
|
25583 |
|
25584 |
|
25585 |
|
25586 |
|
25587 |
|
25588 |
|
25589 |
|
25590 | function accumulateInto(current, next) {
|
25591 | !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0;
|
25592 |
|
25593 | if (current == null) {
|
25594 | return next;
|
25595 | }
|
25596 |
|
25597 |
|
25598 |
|
25599 | if (Array.isArray(current)) {
|
25600 | if (Array.isArray(next)) {
|
25601 | current.push.apply(current, next);
|
25602 | return current;
|
25603 | }
|
25604 | current.push(next);
|
25605 | return current;
|
25606 | }
|
25607 |
|
25608 | if (Array.isArray(next)) {
|
25609 |
|
25610 | return [current].concat(next);
|
25611 | }
|
25612 |
|
25613 | return [current, next];
|
25614 | }
|
25615 |
|
25616 | module.exports = accumulateInto;
|
25617 | }.call(exports, __webpack_require__(0)))
|
25618 |
|
25619 | }),
|
25620 |
|
25621 | (function(module, exports, __webpack_require__) {
|
25622 |
|
25623 | "use strict";
|
25624 |
|
25625 |
|
25626 |
|
25627 |
|
25628 |
|
25629 |
|
25630 |
|
25631 |
|
25632 |
|
25633 |
|
25634 |
|
25635 |
|
25636 |
|
25637 |
|
25638 |
|
25639 |
|
25640 |
|
25641 |
|
25642 |
|
25643 |
|
25644 |
|
25645 | function forEachAccumulated(arr, cb, scope) {
|
25646 | if (Array.isArray(arr)) {
|
25647 | arr.forEach(cb, scope);
|
25648 | } else if (arr) {
|
25649 | cb.call(scope, arr);
|
25650 | }
|
25651 | }
|
25652 |
|
25653 | module.exports = forEachAccumulated;
|
25654 |
|
25655 | }),
|
25656 |
|
25657 | (function(module, exports, __webpack_require__) {
|
25658 |
|
25659 | "use strict";
|
25660 |
|
25661 |
|
25662 |
|
25663 |
|
25664 |
|
25665 |
|
25666 |
|
25667 |
|
25668 |
|
25669 |
|
25670 |
|
25671 |
|
25672 | var ExecutionEnvironment = __webpack_require__(6);
|
25673 |
|
25674 | var contentKey = null;
|
25675 |
|
25676 |
|
25677 |
|
25678 |
|
25679 |
|
25680 |
|
25681 |
|
25682 | function getTextContentAccessor() {
|
25683 | if (!contentKey && ExecutionEnvironment.canUseDOM) {
|
25684 |
|
25685 |
|
25686 | contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';
|
25687 | }
|
25688 | return contentKey;
|
25689 | }
|
25690 |
|
25691 | module.exports = getTextContentAccessor;
|
25692 |
|
25693 | }),
|
25694 |
|
25695 | (function(module, exports, __webpack_require__) {
|
25696 |
|
25697 | "use strict";
|
25698 | (function(process) { |
25699 |
|
25700 |
|
25701 |
|
25702 |
|
25703 |
|
25704 |
|
25705 |
|
25706 |
|
25707 |
|
25708 |
|
25709 |
|
25710 |
|
25711 | var _prodInvariant = __webpack_require__(3);
|
25712 |
|
25713 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
25714 |
|
25715 | var PooledClass = __webpack_require__(16);
|
25716 |
|
25717 | var invariant = __webpack_require__(1);
|
25718 |
|
25719 |
|
25720 |
|
25721 |
|
25722 |
|
25723 |
|
25724 |
|
25725 |
|
25726 |
|
25727 |
|
25728 |
|
25729 |
|
25730 |
|
25731 | var CallbackQueue = function () {
|
25732 | function CallbackQueue(arg) {
|
25733 | _classCallCheck(this, CallbackQueue);
|
25734 |
|
25735 | this._callbacks = null;
|
25736 | this._contexts = null;
|
25737 | this._arg = arg;
|
25738 | }
|
25739 |
|
25740 | |
25741 |
|
25742 |
|
25743 |
|
25744 |
|
25745 |
|
25746 |
|
25747 |
|
25748 |
|
25749 | CallbackQueue.prototype.enqueue = function enqueue(callback, context) {
|
25750 | this._callbacks = this._callbacks || [];
|
25751 | this._callbacks.push(callback);
|
25752 | this._contexts = this._contexts || [];
|
25753 | this._contexts.push(context);
|
25754 | };
|
25755 |
|
25756 | |
25757 |
|
25758 |
|
25759 |
|
25760 |
|
25761 |
|
25762 |
|
25763 |
|
25764 | CallbackQueue.prototype.notifyAll = function notifyAll() {
|
25765 | var callbacks = this._callbacks;
|
25766 | var contexts = this._contexts;
|
25767 | var arg = this._arg;
|
25768 | if (callbacks && contexts) {
|
25769 | !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;
|
25770 | this._callbacks = null;
|
25771 | this._contexts = null;
|
25772 | for (var i = 0; i < callbacks.length; i++) {
|
25773 | callbacks[i].call(contexts[i], arg);
|
25774 | }
|
25775 | callbacks.length = 0;
|
25776 | contexts.length = 0;
|
25777 | }
|
25778 | };
|
25779 |
|
25780 | CallbackQueue.prototype.checkpoint = function checkpoint() {
|
25781 | return this._callbacks ? this._callbacks.length : 0;
|
25782 | };
|
25783 |
|
25784 | CallbackQueue.prototype.rollback = function rollback(len) {
|
25785 | if (this._callbacks && this._contexts) {
|
25786 | this._callbacks.length = len;
|
25787 | this._contexts.length = len;
|
25788 | }
|
25789 | };
|
25790 |
|
25791 | |
25792 |
|
25793 |
|
25794 |
|
25795 |
|
25796 |
|
25797 |
|
25798 | CallbackQueue.prototype.reset = function reset() {
|
25799 | this._callbacks = null;
|
25800 | this._contexts = null;
|
25801 | };
|
25802 |
|
25803 | |
25804 |
|
25805 |
|
25806 |
|
25807 |
|
25808 | CallbackQueue.prototype.destructor = function destructor() {
|
25809 | this.reset();
|
25810 | };
|
25811 |
|
25812 | return CallbackQueue;
|
25813 | }();
|
25814 |
|
25815 | module.exports = PooledClass.addPoolingTo(CallbackQueue);
|
25816 | }.call(exports, __webpack_require__(0)))
|
25817 |
|
25818 | }),
|
25819 |
|
25820 | (function(module, exports, __webpack_require__) {
|
25821 |
|
25822 | "use strict";
|
25823 |
|
25824 |
|
25825 |
|
25826 |
|
25827 |
|
25828 |
|
25829 |
|
25830 |
|
25831 |
|
25832 |
|
25833 |
|
25834 |
|
25835 |
|
25836 | var ReactFeatureFlags = {
|
25837 |
|
25838 |
|
25839 |
|
25840 | logTopLevelRenders: false
|
25841 | };
|
25842 |
|
25843 | module.exports = ReactFeatureFlags;
|
25844 |
|
25845 | }),
|
25846 |
|
25847 | (function(module, exports, __webpack_require__) {
|
25848 |
|
25849 | "use strict";
|
25850 |
|
25851 |
|
25852 |
|
25853 |
|
25854 |
|
25855 |
|
25856 |
|
25857 |
|
25858 |
|
25859 |
|
25860 |
|
25861 |
|
25862 | var ReactDOMComponentTree = __webpack_require__(5);
|
25863 |
|
25864 | function isCheckable(elem) {
|
25865 | var type = elem.type;
|
25866 | var nodeName = elem.nodeName;
|
25867 | return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
|
25868 | }
|
25869 |
|
25870 | function getTracker(inst) {
|
25871 | return inst._wrapperState.valueTracker;
|
25872 | }
|
25873 |
|
25874 | function attachTracker(inst, tracker) {
|
25875 | inst._wrapperState.valueTracker = tracker;
|
25876 | }
|
25877 |
|
25878 | function detachTracker(inst) {
|
25879 | delete inst._wrapperState.valueTracker;
|
25880 | }
|
25881 |
|
25882 | function getValueFromNode(node) {
|
25883 | var value;
|
25884 | if (node) {
|
25885 | value = isCheckable(node) ? '' + node.checked : node.value;
|
25886 | }
|
25887 | return value;
|
25888 | }
|
25889 |
|
25890 | var inputValueTracking = {
|
25891 |
|
25892 | _getTrackerFromNode: function (node) {
|
25893 | return getTracker(ReactDOMComponentTree.getInstanceFromNode(node));
|
25894 | },
|
25895 |
|
25896 |
|
25897 | track: function (inst) {
|
25898 | if (getTracker(inst)) {
|
25899 | return;
|
25900 | }
|
25901 |
|
25902 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
25903 | var valueField = isCheckable(node) ? 'checked' : 'value';
|
25904 | var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
|
25905 |
|
25906 | var currentValue = '' + node[valueField];
|
25907 |
|
25908 |
|
25909 |
|
25910 |
|
25911 |
|
25912 | if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
|
25913 | return;
|
25914 | }
|
25915 |
|
25916 | Object.defineProperty(node, valueField, {
|
25917 | enumerable: descriptor.enumerable,
|
25918 | configurable: true,
|
25919 | get: function () {
|
25920 | return descriptor.get.call(this);
|
25921 | },
|
25922 | set: function (value) {
|
25923 | currentValue = '' + value;
|
25924 | descriptor.set.call(this, value);
|
25925 | }
|
25926 | });
|
25927 |
|
25928 | attachTracker(inst, {
|
25929 | getValue: function () {
|
25930 | return currentValue;
|
25931 | },
|
25932 | setValue: function (value) {
|
25933 | currentValue = '' + value;
|
25934 | },
|
25935 | stopTracking: function () {
|
25936 | detachTracker(inst);
|
25937 | delete node[valueField];
|
25938 | }
|
25939 | });
|
25940 | },
|
25941 |
|
25942 | updateValueIfChanged: function (inst) {
|
25943 | if (!inst) {
|
25944 | return false;
|
25945 | }
|
25946 | var tracker = getTracker(inst);
|
25947 |
|
25948 | if (!tracker) {
|
25949 | inputValueTracking.track(inst);
|
25950 | return true;
|
25951 | }
|
25952 |
|
25953 | var lastValue = tracker.getValue();
|
25954 | var nextValue = getValueFromNode(ReactDOMComponentTree.getNodeFromInstance(inst));
|
25955 |
|
25956 | if (nextValue !== lastValue) {
|
25957 | tracker.setValue(nextValue);
|
25958 | return true;
|
25959 | }
|
25960 |
|
25961 | return false;
|
25962 | },
|
25963 | stopTracking: function (inst) {
|
25964 | var tracker = getTracker(inst);
|
25965 | if (tracker) {
|
25966 | tracker.stopTracking();
|
25967 | }
|
25968 | }
|
25969 | };
|
25970 |
|
25971 | module.exports = inputValueTracking;
|
25972 |
|
25973 | }),
|
25974 |
|
25975 | (function(module, exports, __webpack_require__) {
|
25976 |
|
25977 | "use strict";
|
25978 |
|
25979 |
|
25980 |
|
25981 |
|
25982 |
|
25983 |
|
25984 |
|
25985 |
|
25986 |
|
25987 |
|
25988 |
|
25989 |
|
25990 |
|
25991 |
|
25992 |
|
25993 |
|
25994 |
|
25995 | var supportedInputTypes = {
|
25996 | color: true,
|
25997 | date: true,
|
25998 | datetime: true,
|
25999 | 'datetime-local': true,
|
26000 | email: true,
|
26001 | month: true,
|
26002 | number: true,
|
26003 | password: true,
|
26004 | range: true,
|
26005 | search: true,
|
26006 | tel: true,
|
26007 | text: true,
|
26008 | time: true,
|
26009 | url: true,
|
26010 | week: true
|
26011 | };
|
26012 |
|
26013 | function isTextInputElement(elem) {
|
26014 | var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
|
26015 |
|
26016 | if (nodeName === 'input') {
|
26017 | return !!supportedInputTypes[elem.type];
|
26018 | }
|
26019 |
|
26020 | if (nodeName === 'textarea') {
|
26021 | return true;
|
26022 | }
|
26023 |
|
26024 | return false;
|
26025 | }
|
26026 |
|
26027 | module.exports = isTextInputElement;
|
26028 |
|
26029 | }),
|
26030 |
|
26031 | (function(module, exports, __webpack_require__) {
|
26032 |
|
26033 | "use strict";
|
26034 |
|
26035 |
|
26036 |
|
26037 |
|
26038 |
|
26039 |
|
26040 |
|
26041 |
|
26042 |
|
26043 |
|
26044 |
|
26045 |
|
26046 | var ViewportMetrics = {
|
26047 | currentScrollLeft: 0,
|
26048 |
|
26049 | currentScrollTop: 0,
|
26050 |
|
26051 | refreshScrollValues: function (scrollPosition) {
|
26052 | ViewportMetrics.currentScrollLeft = scrollPosition.x;
|
26053 | ViewportMetrics.currentScrollTop = scrollPosition.y;
|
26054 | }
|
26055 | };
|
26056 |
|
26057 | module.exports = ViewportMetrics;
|
26058 |
|
26059 | }),
|
26060 |
|
26061 | (function(module, exports, __webpack_require__) {
|
26062 |
|
26063 | "use strict";
|
26064 |
|
26065 |
|
26066 |
|
26067 |
|
26068 |
|
26069 |
|
26070 |
|
26071 |
|
26072 |
|
26073 |
|
26074 |
|
26075 |
|
26076 | var ExecutionEnvironment = __webpack_require__(6);
|
26077 | var escapeTextContentForBrowser = __webpack_require__(32);
|
26078 | var setInnerHTML = __webpack_require__(31);
|
26079 |
|
26080 |
|
26081 |
|
26082 |
|
26083 |
|
26084 |
|
26085 |
|
26086 |
|
26087 |
|
26088 |
|
26089 |
|
26090 | var setTextContent = function (node, text) {
|
26091 | if (text) {
|
26092 | var firstChild = node.firstChild;
|
26093 |
|
26094 | if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) {
|
26095 | firstChild.nodeValue = text;
|
26096 | return;
|
26097 | }
|
26098 | }
|
26099 | node.textContent = text;
|
26100 | };
|
26101 |
|
26102 | if (ExecutionEnvironment.canUseDOM) {
|
26103 | if (!('textContent' in document.documentElement)) {
|
26104 | setTextContent = function (node, text) {
|
26105 | if (node.nodeType === 3) {
|
26106 | node.nodeValue = text;
|
26107 | return;
|
26108 | }
|
26109 | setInnerHTML(node, escapeTextContentForBrowser(text));
|
26110 | };
|
26111 | }
|
26112 | }
|
26113 |
|
26114 | module.exports = setTextContent;
|
26115 |
|
26116 | }),
|
26117 |
|
26118 | (function(module, exports, __webpack_require__) {
|
26119 |
|
26120 | "use strict";
|
26121 |
|
26122 |
|
26123 |
|
26124 |
|
26125 |
|
26126 |
|
26127 |
|
26128 |
|
26129 |
|
26130 |
|
26131 |
|
26132 |
|
26133 |
|
26134 |
|
26135 |
|
26136 |
|
26137 | function focusNode(node) {
|
26138 |
|
26139 |
|
26140 |
|
26141 | try {
|
26142 | node.focus();
|
26143 | } catch (e) {}
|
26144 | }
|
26145 |
|
26146 | module.exports = focusNode;
|
26147 |
|
26148 | }),
|
26149 |
|
26150 | (function(module, exports, __webpack_require__) {
|
26151 |
|
26152 | "use strict";
|
26153 |
|
26154 |
|
26155 |
|
26156 |
|
26157 |
|
26158 |
|
26159 |
|
26160 |
|
26161 |
|
26162 |
|
26163 |
|
26164 |
|
26165 |
|
26166 |
|
26167 |
|
26168 |
|
26169 | var isUnitlessNumber = {
|
26170 | animationIterationCount: true,
|
26171 | borderImageOutset: true,
|
26172 | borderImageSlice: true,
|
26173 | borderImageWidth: true,
|
26174 | boxFlex: true,
|
26175 | boxFlexGroup: true,
|
26176 | boxOrdinalGroup: true,
|
26177 | columnCount: true,
|
26178 | flex: true,
|
26179 | flexGrow: true,
|
26180 | flexPositive: true,
|
26181 | flexShrink: true,
|
26182 | flexNegative: true,
|
26183 | flexOrder: true,
|
26184 | gridRow: true,
|
26185 | gridRowEnd: true,
|
26186 | gridRowSpan: true,
|
26187 | gridRowStart: true,
|
26188 | gridColumn: true,
|
26189 | gridColumnEnd: true,
|
26190 | gridColumnSpan: true,
|
26191 | gridColumnStart: true,
|
26192 | fontWeight: true,
|
26193 | lineClamp: true,
|
26194 | lineHeight: true,
|
26195 | opacity: true,
|
26196 | order: true,
|
26197 | orphans: true,
|
26198 | tabSize: true,
|
26199 | widows: true,
|
26200 | zIndex: true,
|
26201 | zoom: true,
|
26202 |
|
26203 |
|
26204 | fillOpacity: true,
|
26205 | floodOpacity: true,
|
26206 | stopOpacity: true,
|
26207 | strokeDasharray: true,
|
26208 | strokeDashoffset: true,
|
26209 | strokeMiterlimit: true,
|
26210 | strokeOpacity: true,
|
26211 | strokeWidth: true
|
26212 | };
|
26213 |
|
26214 |
|
26215 |
|
26216 |
|
26217 |
|
26218 |
|
26219 |
|
26220 | function prefixKey(prefix, key) {
|
26221 | return prefix + key.charAt(0).toUpperCase() + key.substring(1);
|
26222 | }
|
26223 |
|
26224 |
|
26225 |
|
26226 |
|
26227 |
|
26228 | var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
|
26229 |
|
26230 |
|
26231 |
|
26232 | Object.keys(isUnitlessNumber).forEach(function (prop) {
|
26233 | prefixes.forEach(function (prefix) {
|
26234 | isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
|
26235 | });
|
26236 | });
|
26237 |
|
26238 |
|
26239 |
|
26240 |
|
26241 |
|
26242 |
|
26243 |
|
26244 |
|
26245 |
|
26246 |
|
26247 | var shorthandPropertyExpansions = {
|
26248 | background: {
|
26249 | backgroundAttachment: true,
|
26250 | backgroundColor: true,
|
26251 | backgroundImage: true,
|
26252 | backgroundPositionX: true,
|
26253 | backgroundPositionY: true,
|
26254 | backgroundRepeat: true
|
26255 | },
|
26256 | backgroundPosition: {
|
26257 | backgroundPositionX: true,
|
26258 | backgroundPositionY: true
|
26259 | },
|
26260 | border: {
|
26261 | borderWidth: true,
|
26262 | borderStyle: true,
|
26263 | borderColor: true
|
26264 | },
|
26265 | borderBottom: {
|
26266 | borderBottomWidth: true,
|
26267 | borderBottomStyle: true,
|
26268 | borderBottomColor: true
|
26269 | },
|
26270 | borderLeft: {
|
26271 | borderLeftWidth: true,
|
26272 | borderLeftStyle: true,
|
26273 | borderLeftColor: true
|
26274 | },
|
26275 | borderRight: {
|
26276 | borderRightWidth: true,
|
26277 | borderRightStyle: true,
|
26278 | borderRightColor: true
|
26279 | },
|
26280 | borderTop: {
|
26281 | borderTopWidth: true,
|
26282 | borderTopStyle: true,
|
26283 | borderTopColor: true
|
26284 | },
|
26285 | font: {
|
26286 | fontStyle: true,
|
26287 | fontVariant: true,
|
26288 | fontWeight: true,
|
26289 | fontSize: true,
|
26290 | lineHeight: true,
|
26291 | fontFamily: true
|
26292 | },
|
26293 | outline: {
|
26294 | outlineWidth: true,
|
26295 | outlineStyle: true,
|
26296 | outlineColor: true
|
26297 | }
|
26298 | };
|
26299 |
|
26300 | var CSSProperty = {
|
26301 | isUnitlessNumber: isUnitlessNumber,
|
26302 | shorthandPropertyExpansions: shorthandPropertyExpansions
|
26303 | };
|
26304 |
|
26305 | module.exports = CSSProperty;
|
26306 |
|
26307 | }),
|
26308 |
|
26309 | (function(module, exports, __webpack_require__) {
|
26310 |
|
26311 | "use strict";
|
26312 | (function(process) { |
26313 |
|
26314 |
|
26315 |
|
26316 |
|
26317 |
|
26318 |
|
26319 |
|
26320 |
|
26321 |
|
26322 |
|
26323 |
|
26324 | var DOMProperty = __webpack_require__(13);
|
26325 | var ReactDOMComponentTree = __webpack_require__(5);
|
26326 | var ReactInstrumentation = __webpack_require__(9);
|
26327 |
|
26328 | var quoteAttributeValueForBrowser = __webpack_require__(139);
|
26329 | var warning = __webpack_require__(2);
|
26330 |
|
26331 | var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
|
26332 | var illegalAttributeNameCache = {};
|
26333 | var validatedAttributeNameCache = {};
|
26334 |
|
26335 | function isAttributeNameSafe(attributeName) {
|
26336 | if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {
|
26337 | return true;
|
26338 | }
|
26339 | if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {
|
26340 | return false;
|
26341 | }
|
26342 | if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
|
26343 | validatedAttributeNameCache[attributeName] = true;
|
26344 | return true;
|
26345 | }
|
26346 | illegalAttributeNameCache[attributeName] = true;
|
26347 | process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0;
|
26348 | return false;
|
26349 | }
|
26350 |
|
26351 | function shouldIgnoreValue(propertyInfo, value) {
|
26352 | return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;
|
26353 | }
|
26354 |
|
26355 |
|
26356 |
|
26357 |
|
26358 | var DOMPropertyOperations = {
|
26359 | |
26360 |
|
26361 |
|
26362 |
|
26363 |
|
26364 |
|
26365 | createMarkupForID: function (id) {
|
26366 | return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);
|
26367 | },
|
26368 |
|
26369 | setAttributeForID: function (node, id) {
|
26370 | node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);
|
26371 | },
|
26372 |
|
26373 | createMarkupForRoot: function () {
|
26374 | return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""';
|
26375 | },
|
26376 |
|
26377 | setAttributeForRoot: function (node) {
|
26378 | node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, '');
|
26379 | },
|
26380 |
|
26381 | |
26382 |
|
26383 |
|
26384 |
|
26385 |
|
26386 |
|
26387 |
|
26388 | createMarkupForProperty: function (name, value) {
|
26389 | var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
|
26390 | if (propertyInfo) {
|
26391 | if (shouldIgnoreValue(propertyInfo, value)) {
|
26392 | return '';
|
26393 | }
|
26394 | var attributeName = propertyInfo.attributeName;
|
26395 | if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
|
26396 | return attributeName + '=""';
|
26397 | }
|
26398 | return attributeName + '=' + quoteAttributeValueForBrowser(value);
|
26399 | } else if (DOMProperty.isCustomAttribute(name)) {
|
26400 | if (value == null) {
|
26401 | return '';
|
26402 | }
|
26403 | return name + '=' + quoteAttributeValueForBrowser(value);
|
26404 | }
|
26405 | return null;
|
26406 | },
|
26407 |
|
26408 | |
26409 |
|
26410 |
|
26411 |
|
26412 |
|
26413 |
|
26414 |
|
26415 | createMarkupForCustomAttribute: function (name, value) {
|
26416 | if (!isAttributeNameSafe(name) || value == null) {
|
26417 | return '';
|
26418 | }
|
26419 | return name + '=' + quoteAttributeValueForBrowser(value);
|
26420 | },
|
26421 |
|
26422 | |
26423 |
|
26424 |
|
26425 |
|
26426 |
|
26427 |
|
26428 |
|
26429 | setValueForProperty: function (node, name, value) {
|
26430 | var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
|
26431 | if (propertyInfo) {
|
26432 | var mutationMethod = propertyInfo.mutationMethod;
|
26433 | if (mutationMethod) {
|
26434 | mutationMethod(node, value);
|
26435 | } else if (shouldIgnoreValue(propertyInfo, value)) {
|
26436 | this.deleteValueForProperty(node, name);
|
26437 | return;
|
26438 | } else if (propertyInfo.mustUseProperty) {
|
26439 |
|
26440 |
|
26441 | node[propertyInfo.propertyName] = value;
|
26442 | } else {
|
26443 | var attributeName = propertyInfo.attributeName;
|
26444 | var namespace = propertyInfo.attributeNamespace;
|
26445 |
|
26446 |
|
26447 | if (namespace) {
|
26448 | node.setAttributeNS(namespace, attributeName, '' + value);
|
26449 | } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
|
26450 | node.setAttribute(attributeName, '');
|
26451 | } else {
|
26452 | node.setAttribute(attributeName, '' + value);
|
26453 | }
|
26454 | }
|
26455 | } else if (DOMProperty.isCustomAttribute(name)) {
|
26456 | DOMPropertyOperations.setValueForAttribute(node, name, value);
|
26457 | return;
|
26458 | }
|
26459 |
|
26460 | if (process.env.NODE_ENV !== 'production') {
|
26461 | var payload = {};
|
26462 | payload[name] = value;
|
26463 | ReactInstrumentation.debugTool.onHostOperation({
|
26464 | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
|
26465 | type: 'update attribute',
|
26466 | payload: payload
|
26467 | });
|
26468 | }
|
26469 | },
|
26470 |
|
26471 | setValueForAttribute: function (node, name, value) {
|
26472 | if (!isAttributeNameSafe(name)) {
|
26473 | return;
|
26474 | }
|
26475 | if (value == null) {
|
26476 | node.removeAttribute(name);
|
26477 | } else {
|
26478 | node.setAttribute(name, '' + value);
|
26479 | }
|
26480 |
|
26481 | if (process.env.NODE_ENV !== 'production') {
|
26482 | var payload = {};
|
26483 | payload[name] = value;
|
26484 | ReactInstrumentation.debugTool.onHostOperation({
|
26485 | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
|
26486 | type: 'update attribute',
|
26487 | payload: payload
|
26488 | });
|
26489 | }
|
26490 | },
|
26491 |
|
26492 | |
26493 |
|
26494 |
|
26495 |
|
26496 |
|
26497 |
|
26498 | deleteValueForAttribute: function (node, name) {
|
26499 | node.removeAttribute(name);
|
26500 | if (process.env.NODE_ENV !== 'production') {
|
26501 | ReactInstrumentation.debugTool.onHostOperation({
|
26502 | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
|
26503 | type: 'remove attribute',
|
26504 | payload: name
|
26505 | });
|
26506 | }
|
26507 | },
|
26508 |
|
26509 | |
26510 |
|
26511 |
|
26512 |
|
26513 |
|
26514 |
|
26515 | deleteValueForProperty: function (node, name) {
|
26516 | var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
|
26517 | if (propertyInfo) {
|
26518 | var mutationMethod = propertyInfo.mutationMethod;
|
26519 | if (mutationMethod) {
|
26520 | mutationMethod(node, undefined);
|
26521 | } else if (propertyInfo.mustUseProperty) {
|
26522 | var propName = propertyInfo.propertyName;
|
26523 | if (propertyInfo.hasBooleanValue) {
|
26524 | node[propName] = false;
|
26525 | } else {
|
26526 | node[propName] = '';
|
26527 | }
|
26528 | } else {
|
26529 | node.removeAttribute(propertyInfo.attributeName);
|
26530 | }
|
26531 | } else if (DOMProperty.isCustomAttribute(name)) {
|
26532 | node.removeAttribute(name);
|
26533 | }
|
26534 |
|
26535 | if (process.env.NODE_ENV !== 'production') {
|
26536 | ReactInstrumentation.debugTool.onHostOperation({
|
26537 | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
|
26538 | type: 'remove attribute',
|
26539 | payload: name
|
26540 | });
|
26541 | }
|
26542 | }
|
26543 | };
|
26544 |
|
26545 | module.exports = DOMPropertyOperations;
|
26546 | }.call(exports, __webpack_require__(0)))
|
26547 |
|
26548 | }),
|
26549 |
|
26550 | (function(module, exports, __webpack_require__) {
|
26551 |
|
26552 | "use strict";
|
26553 |
|
26554 |
|
26555 |
|
26556 |
|
26557 |
|
26558 |
|
26559 |
|
26560 |
|
26561 |
|
26562 |
|
26563 |
|
26564 |
|
26565 |
|
26566 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
26567 |
|
26568 | module.exports = ReactPropTypesSecret;
|
26569 |
|
26570 | }),
|
26571 |
|
26572 | (function(module, exports, __webpack_require__) {
|
26573 |
|
26574 | "use strict";
|
26575 | (function(process) { |
26576 |
|
26577 |
|
26578 |
|
26579 |
|
26580 |
|
26581 |
|
26582 |
|
26583 |
|
26584 |
|
26585 |
|
26586 |
|
26587 | var _assign = __webpack_require__(4);
|
26588 |
|
26589 | var LinkedValueUtils = __webpack_require__(46);
|
26590 | var ReactDOMComponentTree = __webpack_require__(5);
|
26591 | var ReactUpdates = __webpack_require__(11);
|
26592 |
|
26593 | var warning = __webpack_require__(2);
|
26594 |
|
26595 | var didWarnValueLink = false;
|
26596 | var didWarnValueDefaultValue = false;
|
26597 |
|
26598 | function updateOptionsIfPendingUpdateAndMounted() {
|
26599 | if (this._rootNodeID && this._wrapperState.pendingUpdate) {
|
26600 | this._wrapperState.pendingUpdate = false;
|
26601 |
|
26602 | var props = this._currentElement.props;
|
26603 | var value = LinkedValueUtils.getValue(props);
|
26604 |
|
26605 | if (value != null) {
|
26606 | updateOptions(this, Boolean(props.multiple), value);
|
26607 | }
|
26608 | }
|
26609 | }
|
26610 |
|
26611 | function getDeclarationErrorAddendum(owner) {
|
26612 | if (owner) {
|
26613 | var name = owner.getName();
|
26614 | if (name) {
|
26615 | return ' Check the render method of `' + name + '`.';
|
26616 | }
|
26617 | }
|
26618 | return '';
|
26619 | }
|
26620 |
|
26621 | var valuePropNames = ['value', 'defaultValue'];
|
26622 |
|
26623 |
|
26624 |
|
26625 |
|
26626 |
|
26627 | function checkSelectPropTypes(inst, props) {
|
26628 | var owner = inst._currentElement._owner;
|
26629 | LinkedValueUtils.checkPropTypes('select', props, owner);
|
26630 |
|
26631 | if (props.valueLink !== undefined && !didWarnValueLink) {
|
26632 | process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;
|
26633 | didWarnValueLink = true;
|
26634 | }
|
26635 |
|
26636 | for (var i = 0; i < valuePropNames.length; i++) {
|
26637 | var propName = valuePropNames[i];
|
26638 | if (props[propName] == null) {
|
26639 | continue;
|
26640 | }
|
26641 | var isArray = Array.isArray(props[propName]);
|
26642 | if (props.multiple && !isArray) {
|
26643 | process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
|
26644 | } else if (!props.multiple && isArray) {
|
26645 | process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
|
26646 | }
|
26647 | }
|
26648 | }
|
26649 |
|
26650 |
|
26651 |
|
26652 |
|
26653 |
|
26654 |
|
26655 |
|
26656 | function updateOptions(inst, multiple, propValue) {
|
26657 | var selectedValue, i;
|
26658 | var options = ReactDOMComponentTree.getNodeFromInstance(inst).options;
|
26659 |
|
26660 | if (multiple) {
|
26661 | selectedValue = {};
|
26662 | for (i = 0; i < propValue.length; i++) {
|
26663 | selectedValue['' + propValue[i]] = true;
|
26664 | }
|
26665 | for (i = 0; i < options.length; i++) {
|
26666 | var selected = selectedValue.hasOwnProperty(options[i].value);
|
26667 | if (options[i].selected !== selected) {
|
26668 | options[i].selected = selected;
|
26669 | }
|
26670 | }
|
26671 | } else {
|
26672 |
|
26673 |
|
26674 | selectedValue = '' + propValue;
|
26675 | for (i = 0; i < options.length; i++) {
|
26676 | if (options[i].value === selectedValue) {
|
26677 | options[i].selected = true;
|
26678 | return;
|
26679 | }
|
26680 | }
|
26681 | if (options.length) {
|
26682 | options[0].selected = true;
|
26683 | }
|
26684 | }
|
26685 | }
|
26686 |
|
26687 |
|
26688 |
|
26689 |
|
26690 |
|
26691 |
|
26692 |
|
26693 |
|
26694 |
|
26695 |
|
26696 |
|
26697 |
|
26698 |
|
26699 |
|
26700 |
|
26701 |
|
26702 | var ReactDOMSelect = {
|
26703 | getHostProps: function (inst, props) {
|
26704 | return _assign({}, props, {
|
26705 | onChange: inst._wrapperState.onChange,
|
26706 | value: undefined
|
26707 | });
|
26708 | },
|
26709 |
|
26710 | mountWrapper: function (inst, props) {
|
26711 | if (process.env.NODE_ENV !== 'production') {
|
26712 | checkSelectPropTypes(inst, props);
|
26713 | }
|
26714 |
|
26715 | var value = LinkedValueUtils.getValue(props);
|
26716 | inst._wrapperState = {
|
26717 | pendingUpdate: false,
|
26718 | initialValue: value != null ? value : props.defaultValue,
|
26719 | listeners: null,
|
26720 | onChange: _handleChange.bind(inst),
|
26721 | wasMultiple: Boolean(props.multiple)
|
26722 | };
|
26723 |
|
26724 | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
|
26725 | process.env.NODE_ENV !== 'production' ? warning(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;
|
26726 | didWarnValueDefaultValue = true;
|
26727 | }
|
26728 | },
|
26729 |
|
26730 | getSelectValueContext: function (inst) {
|
26731 |
|
26732 |
|
26733 | return inst._wrapperState.initialValue;
|
26734 | },
|
26735 |
|
26736 | postUpdateWrapper: function (inst) {
|
26737 | var props = inst._currentElement.props;
|
26738 |
|
26739 |
|
26740 |
|
26741 | inst._wrapperState.initialValue = undefined;
|
26742 |
|
26743 | var wasMultiple = inst._wrapperState.wasMultiple;
|
26744 | inst._wrapperState.wasMultiple = Boolean(props.multiple);
|
26745 |
|
26746 | var value = LinkedValueUtils.getValue(props);
|
26747 | if (value != null) {
|
26748 | inst._wrapperState.pendingUpdate = false;
|
26749 | updateOptions(inst, Boolean(props.multiple), value);
|
26750 | } else if (wasMultiple !== Boolean(props.multiple)) {
|
26751 |
|
26752 | if (props.defaultValue != null) {
|
26753 | updateOptions(inst, Boolean(props.multiple), props.defaultValue);
|
26754 | } else {
|
26755 |
|
26756 | updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : '');
|
26757 | }
|
26758 | }
|
26759 | }
|
26760 | };
|
26761 |
|
26762 | function _handleChange(event) {
|
26763 | var props = this._currentElement.props;
|
26764 | var returnValue = LinkedValueUtils.executeOnChange(props, event);
|
26765 |
|
26766 | if (this._rootNodeID) {
|
26767 | this._wrapperState.pendingUpdate = true;
|
26768 | }
|
26769 | ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);
|
26770 | return returnValue;
|
26771 | }
|
26772 |
|
26773 | module.exports = ReactDOMSelect;
|
26774 | }.call(exports, __webpack_require__(0)))
|
26775 |
|
26776 | }),
|
26777 |
|
26778 | (function(module, exports, __webpack_require__) {
|
26779 |
|
26780 | "use strict";
|
26781 | (function(process) { |
26782 |
|
26783 |
|
26784 |
|
26785 |
|
26786 |
|
26787 |
|
26788 |
|
26789 |
|
26790 |
|
26791 |
|
26792 |
|
26793 | var _prodInvariant = __webpack_require__(3),
|
26794 | _assign = __webpack_require__(4);
|
26795 |
|
26796 | var ReactCompositeComponent = __webpack_require__(147);
|
26797 | var ReactEmptyComponent = __webpack_require__(81);
|
26798 | var ReactHostComponent = __webpack_require__(82);
|
26799 |
|
26800 | var getNextDebugID = __webpack_require__(150);
|
26801 | var invariant = __webpack_require__(1);
|
26802 | var warning = __webpack_require__(2);
|
26803 |
|
26804 |
|
26805 | var ReactCompositeComponentWrapper = function (element) {
|
26806 | this.construct(element);
|
26807 | };
|
26808 |
|
26809 | function getDeclarationErrorAddendum(owner) {
|
26810 | if (owner) {
|
26811 | var name = owner.getName();
|
26812 | if (name) {
|
26813 | return ' Check the render method of `' + name + '`.';
|
26814 | }
|
26815 | }
|
26816 | return '';
|
26817 | }
|
26818 |
|
26819 |
|
26820 |
|
26821 |
|
26822 |
|
26823 |
|
26824 |
|
26825 |
|
26826 | function isInternalComponentType(type) {
|
26827 | return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function';
|
26828 | }
|
26829 |
|
26830 |
|
26831 |
|
26832 |
|
26833 |
|
26834 |
|
26835 |
|
26836 |
|
26837 |
|
26838 | function instantiateReactComponent(node, shouldHaveDebugID) {
|
26839 | var instance;
|
26840 |
|
26841 | if (node === null || node === false) {
|
26842 | instance = ReactEmptyComponent.create(instantiateReactComponent);
|
26843 | } else if (typeof node === 'object') {
|
26844 | var element = node;
|
26845 | var type = element.type;
|
26846 | if (typeof type !== 'function' && typeof type !== 'string') {
|
26847 | var info = '';
|
26848 | if (process.env.NODE_ENV !== 'production') {
|
26849 | if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
26850 | info += ' You likely forgot to export your component from the file ' + "it's defined in.";
|
26851 | }
|
26852 | }
|
26853 | info += getDeclarationErrorAddendum(element._owner);
|
26854 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info) : _prodInvariant('130', type == null ? type : typeof type, info) : void 0;
|
26855 | }
|
26856 |
|
26857 |
|
26858 | if (typeof element.type === 'string') {
|
26859 | instance = ReactHostComponent.createInternalComponent(element);
|
26860 | } else if (isInternalComponentType(element.type)) {
|
26861 |
|
26862 |
|
26863 |
|
26864 | instance = new element.type(element);
|
26865 |
|
26866 |
|
26867 | if (!instance.getHostNode) {
|
26868 | instance.getHostNode = instance.getNativeNode;
|
26869 | }
|
26870 | } else {
|
26871 | instance = new ReactCompositeComponentWrapper(element);
|
26872 | }
|
26873 | } else if (typeof node === 'string' || typeof node === 'number') {
|
26874 | instance = ReactHostComponent.createInstanceForText(node);
|
26875 | } else {
|
26876 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0;
|
26877 | }
|
26878 |
|
26879 | if (process.env.NODE_ENV !== 'production') {
|
26880 | process.env.NODE_ENV !== 'production' ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0;
|
26881 | }
|
26882 |
|
26883 |
|
26884 |
|
26885 |
|
26886 | instance._mountIndex = 0;
|
26887 | instance._mountImage = null;
|
26888 |
|
26889 | if (process.env.NODE_ENV !== 'production') {
|
26890 | instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0;
|
26891 | }
|
26892 |
|
26893 |
|
26894 |
|
26895 | if (process.env.NODE_ENV !== 'production') {
|
26896 | if (Object.preventExtensions) {
|
26897 | Object.preventExtensions(instance);
|
26898 | }
|
26899 | }
|
26900 |
|
26901 | return instance;
|
26902 | }
|
26903 |
|
26904 | _assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, {
|
26905 | _instantiateReactComponent: instantiateReactComponent
|
26906 | });
|
26907 |
|
26908 | module.exports = instantiateReactComponent;
|
26909 | }.call(exports, __webpack_require__(0)))
|
26910 |
|
26911 | }),
|
26912 |
|
26913 | (function(module, exports, __webpack_require__) {
|
26914 |
|
26915 | "use strict";
|
26916 | (function(process) { |
26917 |
|
26918 |
|
26919 |
|
26920 |
|
26921 |
|
26922 |
|
26923 |
|
26924 |
|
26925 |
|
26926 |
|
26927 |
|
26928 |
|
26929 | var _prodInvariant = __webpack_require__(3);
|
26930 |
|
26931 | var React = __webpack_require__(17);
|
26932 |
|
26933 | var invariant = __webpack_require__(1);
|
26934 |
|
26935 | var ReactNodeTypes = {
|
26936 | HOST: 0,
|
26937 | COMPOSITE: 1,
|
26938 | EMPTY: 2,
|
26939 |
|
26940 | getType: function (node) {
|
26941 | if (node === null || node === false) {
|
26942 | return ReactNodeTypes.EMPTY;
|
26943 | } else if (React.isValidElement(node)) {
|
26944 | if (typeof node.type === 'function') {
|
26945 | return ReactNodeTypes.COMPOSITE;
|
26946 | } else {
|
26947 | return ReactNodeTypes.HOST;
|
26948 | }
|
26949 | }
|
26950 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0;
|
26951 | }
|
26952 | };
|
26953 |
|
26954 | module.exports = ReactNodeTypes;
|
26955 | }.call(exports, __webpack_require__(0)))
|
26956 |
|
26957 | }),
|
26958 |
|
26959 | (function(module, exports, __webpack_require__) {
|
26960 |
|
26961 | "use strict";
|
26962 |
|
26963 |
|
26964 |
|
26965 |
|
26966 |
|
26967 |
|
26968 |
|
26969 |
|
26970 |
|
26971 |
|
26972 |
|
26973 |
|
26974 | var emptyComponentFactory;
|
26975 |
|
26976 | var ReactEmptyComponentInjection = {
|
26977 | injectEmptyComponentFactory: function (factory) {
|
26978 | emptyComponentFactory = factory;
|
26979 | }
|
26980 | };
|
26981 |
|
26982 | var ReactEmptyComponent = {
|
26983 | create: function (instantiate) {
|
26984 | return emptyComponentFactory(instantiate);
|
26985 | }
|
26986 | };
|
26987 |
|
26988 | ReactEmptyComponent.injection = ReactEmptyComponentInjection;
|
26989 |
|
26990 | module.exports = ReactEmptyComponent;
|
26991 |
|
26992 | }),
|
26993 |
|
26994 | (function(module, exports, __webpack_require__) {
|
26995 |
|
26996 | "use strict";
|
26997 | (function(process) { |
26998 |
|
26999 |
|
27000 |
|
27001 |
|
27002 |
|
27003 |
|
27004 |
|
27005 |
|
27006 |
|
27007 |
|
27008 |
|
27009 | var _prodInvariant = __webpack_require__(3);
|
27010 |
|
27011 | var invariant = __webpack_require__(1);
|
27012 |
|
27013 | var genericComponentClass = null;
|
27014 | var textComponentClass = null;
|
27015 |
|
27016 | var ReactHostComponentInjection = {
|
27017 |
|
27018 |
|
27019 | injectGenericComponentClass: function (componentClass) {
|
27020 | genericComponentClass = componentClass;
|
27021 | },
|
27022 |
|
27023 |
|
27024 | injectTextComponentClass: function (componentClass) {
|
27025 | textComponentClass = componentClass;
|
27026 | }
|
27027 | };
|
27028 |
|
27029 |
|
27030 |
|
27031 |
|
27032 |
|
27033 |
|
27034 |
|
27035 | function createInternalComponent(element) {
|
27036 | !genericComponentClass ? process.env.NODE_ENV !== 'production' ? invariant(false, 'There is no registered component for the tag %s', element.type) : _prodInvariant('111', element.type) : void 0;
|
27037 | return new genericComponentClass(element);
|
27038 | }
|
27039 |
|
27040 |
|
27041 |
|
27042 |
|
27043 |
|
27044 | function createInstanceForText(text) {
|
27045 | return new textComponentClass(text);
|
27046 | }
|
27047 |
|
27048 |
|
27049 |
|
27050 |
|
27051 |
|
27052 | function isTextComponent(component) {
|
27053 | return component instanceof textComponentClass;
|
27054 | }
|
27055 |
|
27056 | var ReactHostComponent = {
|
27057 | createInternalComponent: createInternalComponent,
|
27058 | createInstanceForText: createInstanceForText,
|
27059 | isTextComponent: isTextComponent,
|
27060 | injection: ReactHostComponentInjection
|
27061 | };
|
27062 |
|
27063 | module.exports = ReactHostComponent;
|
27064 | }.call(exports, __webpack_require__(0)))
|
27065 |
|
27066 | }),
|
27067 |
|
27068 | (function(module, exports, __webpack_require__) {
|
27069 |
|
27070 | "use strict";
|
27071 | (function(process) { |
27072 |
|
27073 |
|
27074 |
|
27075 |
|
27076 |
|
27077 |
|
27078 |
|
27079 |
|
27080 |
|
27081 |
|
27082 |
|
27083 | var _prodInvariant = __webpack_require__(3);
|
27084 |
|
27085 | var ReactCurrentOwner = __webpack_require__(10);
|
27086 | var REACT_ELEMENT_TYPE = __webpack_require__(151);
|
27087 |
|
27088 | var getIteratorFn = __webpack_require__(152);
|
27089 | var invariant = __webpack_require__(1);
|
27090 | var KeyEscapeUtils = __webpack_require__(50);
|
27091 | var warning = __webpack_require__(2);
|
27092 |
|
27093 | var SEPARATOR = '.';
|
27094 | var SUBSEPARATOR = ':';
|
27095 |
|
27096 |
|
27097 |
|
27098 |
|
27099 |
|
27100 |
|
27101 |
|
27102 |
|
27103 |
|
27104 |
|
27105 |
|
27106 |
|
27107 | var didWarnAboutMaps = false;
|
27108 |
|
27109 |
|
27110 |
|
27111 |
|
27112 |
|
27113 |
|
27114 |
|
27115 |
|
27116 | function getComponentKey(component, index) {
|
27117 |
|
27118 |
|
27119 | if (component && typeof component === 'object' && component.key != null) {
|
27120 |
|
27121 | return KeyEscapeUtils.escape(component.key);
|
27122 | }
|
27123 |
|
27124 | return index.toString(36);
|
27125 | }
|
27126 |
|
27127 |
|
27128 |
|
27129 |
|
27130 |
|
27131 |
|
27132 |
|
27133 |
|
27134 |
|
27135 | function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
|
27136 | var type = typeof children;
|
27137 |
|
27138 | if (type === 'undefined' || type === 'boolean') {
|
27139 |
|
27140 | children = null;
|
27141 | }
|
27142 |
|
27143 | if (children === null || type === 'string' || type === 'number' ||
|
27144 |
|
27145 |
|
27146 | type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
|
27147 | callback(traverseContext, children,
|
27148 |
|
27149 |
|
27150 | nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
|
27151 | return 1;
|
27152 | }
|
27153 |
|
27154 | var child;
|
27155 | var nextName;
|
27156 | var subtreeCount = 0;
|
27157 | var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
27158 |
|
27159 | if (Array.isArray(children)) {
|
27160 | for (var i = 0; i < children.length; i++) {
|
27161 | child = children[i];
|
27162 | nextName = nextNamePrefix + getComponentKey(child, i);
|
27163 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
27164 | }
|
27165 | } else {
|
27166 | var iteratorFn = getIteratorFn(children);
|
27167 | if (iteratorFn) {
|
27168 | var iterator = iteratorFn.call(children);
|
27169 | var step;
|
27170 | if (iteratorFn !== children.entries) {
|
27171 | var ii = 0;
|
27172 | while (!(step = iterator.next()).done) {
|
27173 | child = step.value;
|
27174 | nextName = nextNamePrefix + getComponentKey(child, ii++);
|
27175 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
27176 | }
|
27177 | } else {
|
27178 | if (process.env.NODE_ENV !== 'production') {
|
27179 | var mapsAsChildrenAddendum = '';
|
27180 | if (ReactCurrentOwner.current) {
|
27181 | var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
|
27182 | if (mapsAsChildrenOwnerName) {
|
27183 | mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
|
27184 | }
|
27185 | }
|
27186 | process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;
|
27187 | didWarnAboutMaps = true;
|
27188 | }
|
27189 |
|
27190 | while (!(step = iterator.next()).done) {
|
27191 | var entry = step.value;
|
27192 | if (entry) {
|
27193 | child = entry[1];
|
27194 | nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
|
27195 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
27196 | }
|
27197 | }
|
27198 | }
|
27199 | } else if (type === 'object') {
|
27200 | var addendum = '';
|
27201 | if (process.env.NODE_ENV !== 'production') {
|
27202 | addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
|
27203 | if (children._isReactElement) {
|
27204 | addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.';
|
27205 | }
|
27206 | if (ReactCurrentOwner.current) {
|
27207 | var name = ReactCurrentOwner.current.getName();
|
27208 | if (name) {
|
27209 | addendum += ' Check the render method of `' + name + '`.';
|
27210 | }
|
27211 | }
|
27212 | }
|
27213 | var childrenString = String(children);
|
27214 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
|
27215 | }
|
27216 | }
|
27217 |
|
27218 | return subtreeCount;
|
27219 | }
|
27220 |
|
27221 |
|
27222 |
|
27223 |
|
27224 |
|
27225 |
|
27226 |
|
27227 |
|
27228 |
|
27229 |
|
27230 |
|
27231 |
|
27232 |
|
27233 |
|
27234 |
|
27235 |
|
27236 |
|
27237 | function traverseAllChildren(children, callback, traverseContext) {
|
27238 | if (children == null) {
|
27239 | return 0;
|
27240 | }
|
27241 |
|
27242 | return traverseAllChildrenImpl(children, '', callback, traverseContext);
|
27243 | }
|
27244 |
|
27245 | module.exports = traverseAllChildren;
|
27246 | }.call(exports, __webpack_require__(0)))
|
27247 |
|
27248 | }),
|
27249 |
|
27250 | (function(module, exports, __webpack_require__) {
|
27251 |
|
27252 | "use strict";
|
27253 | (function(process) {
|
27254 |
|
27255 |
|
27256 |
|
27257 |
|
27258 |
|
27259 |
|
27260 |
|
27261 |
|
27262 |
|
27263 |
|
27264 |
|
27265 |
|
27266 | var emptyFunction = __webpack_require__(8);
|
27267 |
|
27268 |
|
27269 |
|
27270 |
|
27271 |
|
27272 | var EventListener = {
|
27273 | |
27274 |
|
27275 |
|
27276 |
|
27277 |
|
27278 |
|
27279 |
|
27280 |
|
27281 | listen: function listen(target, eventType, callback) {
|
27282 | if (target.addEventListener) {
|
27283 | target.addEventListener(eventType, callback, false);
|
27284 | return {
|
27285 | remove: function remove() {
|
27286 | target.removeEventListener(eventType, callback, false);
|
27287 | }
|
27288 | };
|
27289 | } else if (target.attachEvent) {
|
27290 | target.attachEvent('on' + eventType, callback);
|
27291 | return {
|
27292 | remove: function remove() {
|
27293 | target.detachEvent('on' + eventType, callback);
|
27294 | }
|
27295 | };
|
27296 | }
|
27297 | },
|
27298 |
|
27299 | |
27300 |
|
27301 |
|
27302 |
|
27303 |
|
27304 |
|
27305 |
|
27306 |
|
27307 | capture: function capture(target, eventType, callback) {
|
27308 | if (target.addEventListener) {
|
27309 | target.addEventListener(eventType, callback, true);
|
27310 | return {
|
27311 | remove: function remove() {
|
27312 | target.removeEventListener(eventType, callback, true);
|
27313 | }
|
27314 | };
|
27315 | } else {
|
27316 | if (process.env.NODE_ENV !== 'production') {
|
27317 | console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.');
|
27318 | }
|
27319 | return {
|
27320 | remove: emptyFunction
|
27321 | };
|
27322 | }
|
27323 | },
|
27324 |
|
27325 | registerDefault: function registerDefault() {}
|
27326 | };
|
27327 |
|
27328 | module.exports = EventListener;
|
27329 | }.call(exports, __webpack_require__(0)))
|
27330 |
|
27331 | }),
|
27332 |
|
27333 | (function(module, exports, __webpack_require__) {
|
27334 |
|
27335 | "use strict";
|
27336 |
|
27337 |
|
27338 |
|
27339 |
|
27340 |
|
27341 |
|
27342 |
|
27343 |
|
27344 |
|
27345 |
|
27346 |
|
27347 |
|
27348 | var ReactDOMSelection = __webpack_require__(164);
|
27349 |
|
27350 | var containsNode = __webpack_require__(166);
|
27351 | var focusNode = __webpack_require__(74);
|
27352 | var getActiveElement = __webpack_require__(86);
|
27353 |
|
27354 | function isInDocument(node) {
|
27355 | return containsNode(document.documentElement, node);
|
27356 | }
|
27357 |
|
27358 |
|
27359 |
|
27360 |
|
27361 |
|
27362 |
|
27363 |
|
27364 | var ReactInputSelection = {
|
27365 | hasSelectionCapabilities: function (elem) {
|
27366 | var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
|
27367 | return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');
|
27368 | },
|
27369 |
|
27370 | getSelectionInformation: function () {
|
27371 | var focusedElem = getActiveElement();
|
27372 | return {
|
27373 | focusedElem: focusedElem,
|
27374 | selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null
|
27375 | };
|
27376 | },
|
27377 |
|
27378 | |
27379 |
|
27380 |
|
27381 |
|
27382 |
|
27383 | restoreSelection: function (priorSelectionInformation) {
|
27384 | var curFocusedElem = getActiveElement();
|
27385 | var priorFocusedElem = priorSelectionInformation.focusedElem;
|
27386 | var priorSelectionRange = priorSelectionInformation.selectionRange;
|
27387 | if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
|
27388 | if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {
|
27389 | ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange);
|
27390 | }
|
27391 | focusNode(priorFocusedElem);
|
27392 | }
|
27393 | },
|
27394 |
|
27395 | |
27396 |
|
27397 |
|
27398 |
|
27399 |
|
27400 |
|
27401 | getSelection: function (input) {
|
27402 | var selection;
|
27403 |
|
27404 | if ('selectionStart' in input) {
|
27405 |
|
27406 | selection = {
|
27407 | start: input.selectionStart,
|
27408 | end: input.selectionEnd
|
27409 | };
|
27410 | } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
|
27411 |
|
27412 | var range = document.selection.createRange();
|
27413 |
|
27414 |
|
27415 | if (range.parentElement() === input) {
|
27416 | selection = {
|
27417 | start: -range.moveStart('character', -input.value.length),
|
27418 | end: -range.moveEnd('character', -input.value.length)
|
27419 | };
|
27420 | }
|
27421 | } else {
|
27422 |
|
27423 | selection = ReactDOMSelection.getOffsets(input);
|
27424 | }
|
27425 |
|
27426 | return selection || { start: 0, end: 0 };
|
27427 | },
|
27428 |
|
27429 | |
27430 |
|
27431 |
|
27432 |
|
27433 |
|
27434 |
|
27435 | setSelection: function (input, offsets) {
|
27436 | var start = offsets.start;
|
27437 | var end = offsets.end;
|
27438 | if (end === undefined) {
|
27439 | end = start;
|
27440 | }
|
27441 |
|
27442 | if ('selectionStart' in input) {
|
27443 | input.selectionStart = start;
|
27444 | input.selectionEnd = Math.min(end, input.value.length);
|
27445 | } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
|
27446 | var range = input.createTextRange();
|
27447 | range.collapse(true);
|
27448 | range.moveStart('character', start);
|
27449 | range.moveEnd('character', end - start);
|
27450 | range.select();
|
27451 | } else {
|
27452 | ReactDOMSelection.setOffsets(input, offsets);
|
27453 | }
|
27454 | }
|
27455 | };
|
27456 |
|
27457 | module.exports = ReactInputSelection;
|
27458 |
|
27459 | }),
|
27460 |
|
27461 | (function(module, exports, __webpack_require__) {
|
27462 |
|
27463 | "use strict";
|
27464 |
|
27465 |
|
27466 |
|
27467 |
|
27468 |
|
27469 |
|
27470 |
|
27471 |
|
27472 |
|
27473 |
|
27474 |
|
27475 |
|
27476 |
|
27477 |
|
27478 |
|
27479 |
|
27480 |
|
27481 |
|
27482 |
|
27483 |
|
27484 |
|
27485 |
|
27486 |
|
27487 |
|
27488 |
|
27489 | function getActiveElement(doc) /*?DOMElement*/{
|
27490 | doc = doc || (typeof document !== 'undefined' ? document : undefined);
|
27491 | if (typeof doc === 'undefined') {
|
27492 | return null;
|
27493 | }
|
27494 | try {
|
27495 | return doc.activeElement || doc.body;
|
27496 | } catch (e) {
|
27497 | return doc.body;
|
27498 | }
|
27499 | }
|
27500 |
|
27501 | module.exports = getActiveElement;
|
27502 |
|
27503 | }),
|
27504 |
|
27505 | (function(module, exports, __webpack_require__) {
|
27506 |
|
27507 | "use strict";
|
27508 | (function(process) { |
27509 |
|
27510 |
|
27511 |
|
27512 |
|
27513 |
|
27514 |
|
27515 |
|
27516 |
|
27517 |
|
27518 |
|
27519 |
|
27520 | var _prodInvariant = __webpack_require__(3);
|
27521 |
|
27522 | var DOMLazyTree = __webpack_require__(20);
|
27523 | var DOMProperty = __webpack_require__(13);
|
27524 | var React = __webpack_require__(17);
|
27525 | var ReactBrowserEventEmitter = __webpack_require__(33);
|
27526 | var ReactCurrentOwner = __webpack_require__(10);
|
27527 | var ReactDOMComponentTree = __webpack_require__(5);
|
27528 | var ReactDOMContainerInfo = __webpack_require__(181);
|
27529 | var ReactDOMFeatureFlags = __webpack_require__(182);
|
27530 | var ReactFeatureFlags = __webpack_require__(69);
|
27531 | var ReactInstanceMap = __webpack_require__(24);
|
27532 | var ReactInstrumentation = __webpack_require__(9);
|
27533 | var ReactMarkupChecksum = __webpack_require__(183);
|
27534 | var ReactReconciler = __webpack_require__(19);
|
27535 | var ReactUpdateQueue = __webpack_require__(51);
|
27536 | var ReactUpdates = __webpack_require__(11);
|
27537 |
|
27538 | var emptyObject = __webpack_require__(27);
|
27539 | var instantiateReactComponent = __webpack_require__(79);
|
27540 | var invariant = __webpack_require__(1);
|
27541 | var setInnerHTML = __webpack_require__(31);
|
27542 | var shouldUpdateReactComponent = __webpack_require__(49);
|
27543 | var warning = __webpack_require__(2);
|
27544 |
|
27545 | var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
|
27546 | var ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME;
|
27547 |
|
27548 | var ELEMENT_NODE_TYPE = 1;
|
27549 | var DOC_NODE_TYPE = 9;
|
27550 | var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
|
27551 |
|
27552 | var instancesByReactRootID = {};
|
27553 |
|
27554 |
|
27555 |
|
27556 |
|
27557 |
|
27558 |
|
27559 |
|
27560 | function firstDifferenceIndex(string1, string2) {
|
27561 | var minLen = Math.min(string1.length, string2.length);
|
27562 | for (var i = 0; i < minLen; i++) {
|
27563 | if (string1.charAt(i) !== string2.charAt(i)) {
|
27564 | return i;
|
27565 | }
|
27566 | }
|
27567 | return string1.length === string2.length ? -1 : minLen;
|
27568 | }
|
27569 |
|
27570 |
|
27571 |
|
27572 |
|
27573 |
|
27574 |
|
27575 | function getReactRootElementInContainer(container) {
|
27576 | if (!container) {
|
27577 | return null;
|
27578 | }
|
27579 |
|
27580 | if (container.nodeType === DOC_NODE_TYPE) {
|
27581 | return container.documentElement;
|
27582 | } else {
|
27583 | return container.firstChild;
|
27584 | }
|
27585 | }
|
27586 |
|
27587 | function internalGetID(node) {
|
27588 |
|
27589 |
|
27590 |
|
27591 | return node.getAttribute && node.getAttribute(ATTR_NAME) || '';
|
27592 | }
|
27593 |
|
27594 |
|
27595 |
|
27596 |
|
27597 |
|
27598 |
|
27599 |
|
27600 |
|
27601 |
|
27602 | function mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) {
|
27603 | var markerName;
|
27604 | if (ReactFeatureFlags.logTopLevelRenders) {
|
27605 | var wrappedElement = wrapperInstance._currentElement.props.child;
|
27606 | var type = wrappedElement.type;
|
27607 | markerName = 'React mount: ' + (typeof type === 'string' ? type : type.displayName || type.name);
|
27608 | console.time(markerName);
|
27609 | }
|
27610 |
|
27611 | var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0
|
27612 | );
|
27613 |
|
27614 | if (markerName) {
|
27615 | console.timeEnd(markerName);
|
27616 | }
|
27617 |
|
27618 | wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance;
|
27619 | ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction);
|
27620 | }
|
27621 |
|
27622 |
|
27623 |
|
27624 |
|
27625 |
|
27626 |
|
27627 |
|
27628 |
|
27629 | function batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) {
|
27630 | var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(
|
27631 |
|
27632 | !shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement);
|
27633 | transaction.perform(mountComponentIntoNode, null, componentInstance, container, transaction, shouldReuseMarkup, context);
|
27634 | ReactUpdates.ReactReconcileTransaction.release(transaction);
|
27635 | }
|
27636 |
|
27637 |
|
27638 |
|
27639 |
|
27640 |
|
27641 |
|
27642 |
|
27643 |
|
27644 |
|
27645 |
|
27646 | function unmountComponentFromNode(instance, container, safely) {
|
27647 | if (process.env.NODE_ENV !== 'production') {
|
27648 | ReactInstrumentation.debugTool.onBeginFlush();
|
27649 | }
|
27650 | ReactReconciler.unmountComponent(instance, safely);
|
27651 | if (process.env.NODE_ENV !== 'production') {
|
27652 | ReactInstrumentation.debugTool.onEndFlush();
|
27653 | }
|
27654 |
|
27655 | if (container.nodeType === DOC_NODE_TYPE) {
|
27656 | container = container.documentElement;
|
27657 | }
|
27658 |
|
27659 |
|
27660 | while (container.lastChild) {
|
27661 | container.removeChild(container.lastChild);
|
27662 | }
|
27663 | }
|
27664 |
|
27665 |
|
27666 |
|
27667 |
|
27668 |
|
27669 |
|
27670 |
|
27671 |
|
27672 |
|
27673 |
|
27674 |
|
27675 | function hasNonRootReactChild(container) {
|
27676 | var rootEl = getReactRootElementInContainer(container);
|
27677 | if (rootEl) {
|
27678 | var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl);
|
27679 | return !!(inst && inst._hostParent);
|
27680 | }
|
27681 | }
|
27682 |
|
27683 |
|
27684 |
|
27685 |
|
27686 |
|
27687 |
|
27688 |
|
27689 |
|
27690 |
|
27691 | function nodeIsRenderedByOtherInstance(container) {
|
27692 | var rootEl = getReactRootElementInContainer(container);
|
27693 | return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl));
|
27694 | }
|
27695 |
|
27696 |
|
27697 |
|
27698 |
|
27699 |
|
27700 |
|
27701 |
|
27702 |
|
27703 | function isValidContainer(node) {
|
27704 | return !!(node && (node.nodeType === ELEMENT_NODE_TYPE || node.nodeType === DOC_NODE_TYPE || node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE));
|
27705 | }
|
27706 |
|
27707 |
|
27708 |
|
27709 |
|
27710 |
|
27711 |
|
27712 |
|
27713 |
|
27714 | function isReactNode(node) {
|
27715 | return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME));
|
27716 | }
|
27717 |
|
27718 | function getHostRootInstanceInContainer(container) {
|
27719 | var rootEl = getReactRootElementInContainer(container);
|
27720 | var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl);
|
27721 | return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null;
|
27722 | }
|
27723 |
|
27724 | function getTopLevelWrapperInContainer(container) {
|
27725 | var root = getHostRootInstanceInContainer(container);
|
27726 | return root ? root._hostContainerInfo._topLevelWrapper : null;
|
27727 | }
|
27728 |
|
27729 |
|
27730 |
|
27731 |
|
27732 |
|
27733 |
|
27734 | var topLevelRootCounter = 1;
|
27735 | var TopLevelWrapper = function () {
|
27736 | this.rootID = topLevelRootCounter++;
|
27737 | };
|
27738 | TopLevelWrapper.prototype.isReactComponent = {};
|
27739 | if (process.env.NODE_ENV !== 'production') {
|
27740 | TopLevelWrapper.displayName = 'TopLevelWrapper';
|
27741 | }
|
27742 | TopLevelWrapper.prototype.render = function () {
|
27743 | return this.props.child;
|
27744 | };
|
27745 | TopLevelWrapper.isReactTopLevelWrapper = true;
|
27746 |
|
27747 |
|
27748 |
|
27749 |
|
27750 |
|
27751 |
|
27752 |
|
27753 |
|
27754 |
|
27755 |
|
27756 |
|
27757 |
|
27758 |
|
27759 |
|
27760 |
|
27761 |
|
27762 |
|
27763 |
|
27764 |
|
27765 | var ReactMount = {
|
27766 | TopLevelWrapper: TopLevelWrapper,
|
27767 |
|
27768 | |
27769 |
|
27770 |
|
27771 | _instancesByReactRootID: instancesByReactRootID,
|
27772 |
|
27773 | |
27774 |
|
27775 |
|
27776 |
|
27777 |
|
27778 |
|
27779 |
|
27780 |
|
27781 | scrollMonitor: function (container, renderCallback) {
|
27782 | renderCallback();
|
27783 | },
|
27784 |
|
27785 | |
27786 |
|
27787 |
|
27788 |
|
27789 |
|
27790 |
|
27791 |
|
27792 | _updateRootComponent: function (prevComponent, nextElement, nextContext, container, callback) {
|
27793 | ReactMount.scrollMonitor(container, function () {
|
27794 | ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext);
|
27795 | if (callback) {
|
27796 | ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback);
|
27797 | }
|
27798 | });
|
27799 |
|
27800 | return prevComponent;
|
27801 | },
|
27802 |
|
27803 | |
27804 |
|
27805 |
|
27806 |
|
27807 |
|
27808 |
|
27809 |
|
27810 |
|
27811 | _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) {
|
27812 |
|
27813 |
|
27814 |
|
27815 | process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;
|
27816 |
|
27817 | !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : _prodInvariant('37') : void 0;
|
27818 |
|
27819 | ReactBrowserEventEmitter.ensureScrollValueMonitoring();
|
27820 | var componentInstance = instantiateReactComponent(nextElement, false);
|
27821 |
|
27822 |
|
27823 |
|
27824 |
|
27825 |
|
27826 | ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, container, shouldReuseMarkup, context);
|
27827 |
|
27828 | var wrapperID = componentInstance._instance.rootID;
|
27829 | instancesByReactRootID[wrapperID] = componentInstance;
|
27830 |
|
27831 | return componentInstance;
|
27832 | },
|
27833 |
|
27834 | |
27835 |
|
27836 |
|
27837 |
|
27838 |
|
27839 |
|
27840 |
|
27841 |
|
27842 |
|
27843 |
|
27844 |
|
27845 |
|
27846 |
|
27847 | renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {
|
27848 | !(parentComponent != null && ReactInstanceMap.has(parentComponent)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'parentComponent must be a valid React Component') : _prodInvariant('38') : void 0;
|
27849 | return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback);
|
27850 | },
|
27851 |
|
27852 | _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {
|
27853 | ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render');
|
27854 | !React.isValidElement(nextElement) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? " Instead of passing a string like 'div', pass " + "React.createElement('div') or <div />." : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' :
|
27855 | nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? " Instead of passing a string like 'div', pass " + "React.createElement('div') or <div />." : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0;
|
27856 |
|
27857 | process.env.NODE_ENV !== 'production' ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0;
|
27858 |
|
27859 | var nextWrappedElement = React.createElement(TopLevelWrapper, {
|
27860 | child: nextElement
|
27861 | });
|
27862 |
|
27863 | var nextContext;
|
27864 | if (parentComponent) {
|
27865 | var parentInst = ReactInstanceMap.get(parentComponent);
|
27866 | nextContext = parentInst._processChildContext(parentInst._context);
|
27867 | } else {
|
27868 | nextContext = emptyObject;
|
27869 | }
|
27870 |
|
27871 | var prevComponent = getTopLevelWrapperInContainer(container);
|
27872 |
|
27873 | if (prevComponent) {
|
27874 | var prevWrappedElement = prevComponent._currentElement;
|
27875 | var prevElement = prevWrappedElement.props.child;
|
27876 | if (shouldUpdateReactComponent(prevElement, nextElement)) {
|
27877 | var publicInst = prevComponent._renderedComponent.getPublicInstance();
|
27878 | var updatedCallback = callback && function () {
|
27879 | callback.call(publicInst);
|
27880 | };
|
27881 | ReactMount._updateRootComponent(prevComponent, nextWrappedElement, nextContext, container, updatedCallback);
|
27882 | return publicInst;
|
27883 | } else {
|
27884 | ReactMount.unmountComponentAtNode(container);
|
27885 | }
|
27886 | }
|
27887 |
|
27888 | var reactRootElement = getReactRootElementInContainer(container);
|
27889 | var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement);
|
27890 | var containerHasNonRootReactChild = hasNonRootReactChild(container);
|
27891 |
|
27892 | if (process.env.NODE_ENV !== 'production') {
|
27893 | process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0;
|
27894 |
|
27895 | if (!containerHasReactMarkup || reactRootElement.nextSibling) {
|
27896 | var rootElementSibling = reactRootElement;
|
27897 | while (rootElementSibling) {
|
27898 | if (internalGetID(rootElementSibling)) {
|
27899 | process.env.NODE_ENV !== 'production' ? warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.') : void 0;
|
27900 | break;
|
27901 | }
|
27902 | rootElementSibling = rootElementSibling.nextSibling;
|
27903 | }
|
27904 | }
|
27905 | }
|
27906 |
|
27907 | var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild;
|
27908 | var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, nextContext)._renderedComponent.getPublicInstance();
|
27909 | if (callback) {
|
27910 | callback.call(component);
|
27911 | }
|
27912 | return component;
|
27913 | },
|
27914 |
|
27915 | |
27916 |
|
27917 |
|
27918 |
|
27919 |
|
27920 |
|
27921 |
|
27922 |
|
27923 |
|
27924 |
|
27925 |
|
27926 |
|
27927 |
|
27928 | render: function (nextElement, container, callback) {
|
27929 | return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback);
|
27930 | },
|
27931 |
|
27932 | |
27933 |
|
27934 |
|
27935 |
|
27936 |
|
27937 |
|
27938 |
|
27939 |
|
27940 | unmountComponentAtNode: function (container) {
|
27941 |
|
27942 |
|
27943 |
|
27944 |
|
27945 | process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;
|
27946 |
|
27947 | !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0;
|
27948 |
|
27949 | if (process.env.NODE_ENV !== 'production') {
|
27950 | process.env.NODE_ENV !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.') : void 0;
|
27951 | }
|
27952 |
|
27953 | var prevComponent = getTopLevelWrapperInContainer(container);
|
27954 | if (!prevComponent) {
|
27955 |
|
27956 |
|
27957 | var containerHasNonRootReactChild = hasNonRootReactChild(container);
|
27958 |
|
27959 |
|
27960 | var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME);
|
27961 |
|
27962 | if (process.env.NODE_ENV !== 'production') {
|
27963 | process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0;
|
27964 | }
|
27965 |
|
27966 | return false;
|
27967 | }
|
27968 | delete instancesByReactRootID[prevComponent._instance.rootID];
|
27969 | ReactUpdates.batchedUpdates(unmountComponentFromNode, prevComponent, container, false);
|
27970 | return true;
|
27971 | },
|
27972 |
|
27973 | _mountImageIntoNode: function (markup, container, instance, shouldReuseMarkup, transaction) {
|
27974 | !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : _prodInvariant('41') : void 0;
|
27975 |
|
27976 | if (shouldReuseMarkup) {
|
27977 | var rootElement = getReactRootElementInContainer(container);
|
27978 | if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) {
|
27979 | ReactDOMComponentTree.precacheNode(instance, rootElement);
|
27980 | return;
|
27981 | } else {
|
27982 | var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
|
27983 | rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
|
27984 |
|
27985 | var rootMarkup = rootElement.outerHTML;
|
27986 | rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum);
|
27987 |
|
27988 | var normalizedMarkup = markup;
|
27989 | if (process.env.NODE_ENV !== 'production') {
|
27990 |
|
27991 |
|
27992 |
|
27993 |
|
27994 | var normalizer;
|
27995 | if (container.nodeType === ELEMENT_NODE_TYPE) {
|
27996 | normalizer = document.createElement('div');
|
27997 | normalizer.innerHTML = markup;
|
27998 | normalizedMarkup = normalizer.innerHTML;
|
27999 | } else {
|
28000 | normalizer = document.createElement('iframe');
|
28001 | document.body.appendChild(normalizer);
|
28002 | normalizer.contentDocument.write(markup);
|
28003 | normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML;
|
28004 | document.body.removeChild(normalizer);
|
28005 | }
|
28006 | }
|
28007 |
|
28008 | var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup);
|
28009 | var difference = ' (client) ' + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20);
|
28010 |
|
28011 | !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\'re trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\n%s', difference) : _prodInvariant('42', difference) : void 0;
|
28012 |
|
28013 | if (process.env.NODE_ENV !== 'production') {
|
28014 | process.env.NODE_ENV !== 'production' ? warning(false, 'React attempted to reuse markup in a container but the ' + 'checksum was invalid. This generally means that you are ' + 'using server rendering and the markup generated on the ' + 'server was not what the client was expecting. React injected ' + 'new markup to compensate which works but you have lost many ' + 'of the benefits of server rendering. Instead, figure out ' + 'why the markup being generated is different on the client ' + 'or server:\n%s', difference) : void 0;
|
28015 | }
|
28016 | }
|
28017 | }
|
28018 |
|
28019 | !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\'re trying to render a component to the document but you didn\'t use server rendering. We can\'t do this without using server rendering due to cross-browser quirks. See ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('43') : void 0;
|
28020 |
|
28021 | if (transaction.useCreateElement) {
|
28022 | while (container.lastChild) {
|
28023 | container.removeChild(container.lastChild);
|
28024 | }
|
28025 | DOMLazyTree.insertTreeBefore(container, markup, null);
|
28026 | } else {
|
28027 | setInnerHTML(container, markup);
|
28028 | ReactDOMComponentTree.precacheNode(instance, container.firstChild);
|
28029 | }
|
28030 |
|
28031 | if (process.env.NODE_ENV !== 'production') {
|
28032 | var hostNode = ReactDOMComponentTree.getInstanceFromNode(container.firstChild);
|
28033 | if (hostNode._debugID !== 0) {
|
28034 | ReactInstrumentation.debugTool.onHostOperation({
|
28035 | instanceID: hostNode._debugID,
|
28036 | type: 'mount',
|
28037 | payload: markup.toString()
|
28038 | });
|
28039 | }
|
28040 | }
|
28041 | }
|
28042 | };
|
28043 |
|
28044 | module.exports = ReactMount;
|
28045 | }.call(exports, __webpack_require__(0)))
|
28046 |
|
28047 | }),
|
28048 |
|
28049 | (function(module, exports, __webpack_require__) {
|
28050 |
|
28051 | "use strict";
|
28052 |
|
28053 |
|
28054 |
|
28055 |
|
28056 |
|
28057 |
|
28058 |
|
28059 |
|
28060 |
|
28061 |
|
28062 |
|
28063 |
|
28064 | var ReactNodeTypes = __webpack_require__(80);
|
28065 |
|
28066 | function getHostComponentFromComposite(inst) {
|
28067 | var type;
|
28068 |
|
28069 | while ((type = inst._renderedNodeType) === ReactNodeTypes.COMPOSITE) {
|
28070 | inst = inst._renderedComponent;
|
28071 | }
|
28072 |
|
28073 | if (type === ReactNodeTypes.HOST) {
|
28074 | return inst._renderedComponent;
|
28075 | } else if (type === ReactNodeTypes.EMPTY) {
|
28076 | return null;
|
28077 | }
|
28078 | }
|
28079 |
|
28080 | module.exports = getHostComponentFromComposite;
|
28081 |
|
28082 | }),
|
28083 |
|
28084 | (function(module, exports, __webpack_require__) {
|
28085 |
|
28086 | __webpack_require__(90);
|
28087 | module.exports = __webpack_require__(210);
|
28088 |
|
28089 |
|
28090 | }),
|
28091 |
|
28092 | (function(module, exports, __webpack_require__) {
|
28093 |
|
28094 | "use strict";
|
28095 |
|
28096 |
|
28097 | var _react = __webpack_require__(14);
|
28098 |
|
28099 | var _react2 = _interopRequireDefault(_react);
|
28100 |
|
28101 | var _reactDom = __webpack_require__(105);
|
28102 |
|
28103 | var _reactDom2 = _interopRequireDefault(_reactDom);
|
28104 |
|
28105 | var _App = __webpack_require__(191);
|
28106 |
|
28107 | var _App2 = _interopRequireDefault(_App);
|
28108 |
|
28109 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
28110 |
|
28111 | _reactDom2.default.render(_react2.default.createElement(_App2.default, null), document.getElementById('react'));
|
28112 |
|
28113 | }),
|
28114 |
|
28115 | (function(module, exports, __webpack_require__) {
|
28116 |
|
28117 | "use strict";
|
28118 |
|
28119 |
|
28120 |
|
28121 |
|
28122 |
|
28123 |
|
28124 |
|
28125 |
|
28126 |
|
28127 |
|
28128 |
|
28129 |
|
28130 | var PooledClass = __webpack_require__(92);
|
28131 | var ReactElement = __webpack_require__(15);
|
28132 |
|
28133 | var emptyFunction = __webpack_require__(8);
|
28134 | var traverseAllChildren = __webpack_require__(93);
|
28135 |
|
28136 | var twoArgumentPooler = PooledClass.twoArgumentPooler;
|
28137 | var fourArgumentPooler = PooledClass.fourArgumentPooler;
|
28138 |
|
28139 | var userProvidedKeyEscapeRegex = /\/+/g;
|
28140 | function escapeUserProvidedKey(text) {
|
28141 | return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
|
28142 | }
|
28143 |
|
28144 |
|
28145 |
|
28146 |
|
28147 |
|
28148 |
|
28149 |
|
28150 |
|
28151 |
|
28152 | function ForEachBookKeeping(forEachFunction, forEachContext) {
|
28153 | this.func = forEachFunction;
|
28154 | this.context = forEachContext;
|
28155 | this.count = 0;
|
28156 | }
|
28157 | ForEachBookKeeping.prototype.destructor = function () {
|
28158 | this.func = null;
|
28159 | this.context = null;
|
28160 | this.count = 0;
|
28161 | };
|
28162 | PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
|
28163 |
|
28164 | function forEachSingleChild(bookKeeping, child, name) {
|
28165 | var func = bookKeeping.func,
|
28166 | context = bookKeeping.context;
|
28167 |
|
28168 | func.call(context, child, bookKeeping.count++);
|
28169 | }
|
28170 |
|
28171 |
|
28172 |
|
28173 |
|
28174 |
|
28175 |
|
28176 |
|
28177 |
|
28178 |
|
28179 |
|
28180 |
|
28181 |
|
28182 |
|
28183 | function forEachChildren(children, forEachFunc, forEachContext) {
|
28184 | if (children == null) {
|
28185 | return children;
|
28186 | }
|
28187 | var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
|
28188 | traverseAllChildren(children, forEachSingleChild, traverseContext);
|
28189 | ForEachBookKeeping.release(traverseContext);
|
28190 | }
|
28191 |
|
28192 |
|
28193 |
|
28194 |
|
28195 |
|
28196 |
|
28197 |
|
28198 |
|
28199 |
|
28200 |
|
28201 | function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
|
28202 | this.result = mapResult;
|
28203 | this.keyPrefix = keyPrefix;
|
28204 | this.func = mapFunction;
|
28205 | this.context = mapContext;
|
28206 | this.count = 0;
|
28207 | }
|
28208 | MapBookKeeping.prototype.destructor = function () {
|
28209 | this.result = null;
|
28210 | this.keyPrefix = null;
|
28211 | this.func = null;
|
28212 | this.context = null;
|
28213 | this.count = 0;
|
28214 | };
|
28215 | PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
|
28216 |
|
28217 | function mapSingleChildIntoContext(bookKeeping, child, childKey) {
|
28218 | var result = bookKeeping.result,
|
28219 | keyPrefix = bookKeeping.keyPrefix,
|
28220 | func = bookKeeping.func,
|
28221 | context = bookKeeping.context;
|
28222 |
|
28223 |
|
28224 | var mappedChild = func.call(context, child, bookKeeping.count++);
|
28225 | if (Array.isArray(mappedChild)) {
|
28226 | mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
|
28227 | } else if (mappedChild != null) {
|
28228 | if (ReactElement.isValidElement(mappedChild)) {
|
28229 | mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
|
28230 |
|
28231 |
|
28232 | keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
|
28233 | }
|
28234 | result.push(mappedChild);
|
28235 | }
|
28236 | }
|
28237 |
|
28238 | function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
|
28239 | var escapedPrefix = '';
|
28240 | if (prefix != null) {
|
28241 | escapedPrefix = escapeUserProvidedKey(prefix) + '/';
|
28242 | }
|
28243 | var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
|
28244 | traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
|
28245 | MapBookKeeping.release(traverseContext);
|
28246 | }
|
28247 |
|
28248 |
|
28249 |
|
28250 |
|
28251 |
|
28252 |
|
28253 |
|
28254 |
|
28255 |
|
28256 |
|
28257 |
|
28258 |
|
28259 |
|
28260 |
|
28261 | function mapChildren(children, func, context) {
|
28262 | if (children == null) {
|
28263 | return children;
|
28264 | }
|
28265 | var result = [];
|
28266 | mapIntoWithKeyPrefixInternal(children, result, null, func, context);
|
28267 | return result;
|
28268 | }
|
28269 |
|
28270 | function forEachSingleChildDummy(traverseContext, child, name) {
|
28271 | return null;
|
28272 | }
|
28273 |
|
28274 |
|
28275 |
|
28276 |
|
28277 |
|
28278 |
|
28279 |
|
28280 |
|
28281 |
|
28282 |
|
28283 | function countChildren(children, context) {
|
28284 | return traverseAllChildren(children, forEachSingleChildDummy, null);
|
28285 | }
|
28286 |
|
28287 |
|
28288 |
|
28289 |
|
28290 |
|
28291 |
|
28292 |
|
28293 | function toArray(children) {
|
28294 | var result = [];
|
28295 | mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
|
28296 | return result;
|
28297 | }
|
28298 |
|
28299 | var ReactChildren = {
|
28300 | forEach: forEachChildren,
|
28301 | map: mapChildren,
|
28302 | mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
|
28303 | count: countChildren,
|
28304 | toArray: toArray
|
28305 | };
|
28306 |
|
28307 | module.exports = ReactChildren;
|
28308 |
|
28309 | }),
|
28310 |
|
28311 | (function(module, exports, __webpack_require__) {
|
28312 |
|
28313 | "use strict";
|
28314 | (function(process) { |
28315 |
|
28316 |
|
28317 |
|
28318 |
|
28319 |
|
28320 |
|
28321 |
|
28322 |
|
28323 |
|
28324 |
|
28325 |
|
28326 |
|
28327 | var _prodInvariant = __webpack_require__(18);
|
28328 |
|
28329 | var invariant = __webpack_require__(1);
|
28330 |
|
28331 |
|
28332 |
|
28333 |
|
28334 |
|
28335 |
|
28336 |
|
28337 |
|
28338 | var oneArgumentPooler = function (copyFieldsFrom) {
|
28339 | var Klass = this;
|
28340 | if (Klass.instancePool.length) {
|
28341 | var instance = Klass.instancePool.pop();
|
28342 | Klass.call(instance, copyFieldsFrom);
|
28343 | return instance;
|
28344 | } else {
|
28345 | return new Klass(copyFieldsFrom);
|
28346 | }
|
28347 | };
|
28348 |
|
28349 | var twoArgumentPooler = function (a1, a2) {
|
28350 | var Klass = this;
|
28351 | if (Klass.instancePool.length) {
|
28352 | var instance = Klass.instancePool.pop();
|
28353 | Klass.call(instance, a1, a2);
|
28354 | return instance;
|
28355 | } else {
|
28356 | return new Klass(a1, a2);
|
28357 | }
|
28358 | };
|
28359 |
|
28360 | var threeArgumentPooler = function (a1, a2, a3) {
|
28361 | var Klass = this;
|
28362 | if (Klass.instancePool.length) {
|
28363 | var instance = Klass.instancePool.pop();
|
28364 | Klass.call(instance, a1, a2, a3);
|
28365 | return instance;
|
28366 | } else {
|
28367 | return new Klass(a1, a2, a3);
|
28368 | }
|
28369 | };
|
28370 |
|
28371 | var fourArgumentPooler = function (a1, a2, a3, a4) {
|
28372 | var Klass = this;
|
28373 | if (Klass.instancePool.length) {
|
28374 | var instance = Klass.instancePool.pop();
|
28375 | Klass.call(instance, a1, a2, a3, a4);
|
28376 | return instance;
|
28377 | } else {
|
28378 | return new Klass(a1, a2, a3, a4);
|
28379 | }
|
28380 | };
|
28381 |
|
28382 | var standardReleaser = function (instance) {
|
28383 | var Klass = this;
|
28384 | !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
|
28385 | instance.destructor();
|
28386 | if (Klass.instancePool.length < Klass.poolSize) {
|
28387 | Klass.instancePool.push(instance);
|
28388 | }
|
28389 | };
|
28390 |
|
28391 | var DEFAULT_POOL_SIZE = 10;
|
28392 | var DEFAULT_POOLER = oneArgumentPooler;
|
28393 |
|
28394 |
|
28395 |
|
28396 |
|
28397 |
|
28398 |
|
28399 |
|
28400 |
|
28401 |
|
28402 |
|
28403 | var addPoolingTo = function (CopyConstructor, pooler) {
|
28404 |
|
28405 |
|
28406 | var NewKlass = CopyConstructor;
|
28407 | NewKlass.instancePool = [];
|
28408 | NewKlass.getPooled = pooler || DEFAULT_POOLER;
|
28409 | if (!NewKlass.poolSize) {
|
28410 | NewKlass.poolSize = DEFAULT_POOL_SIZE;
|
28411 | }
|
28412 | NewKlass.release = standardReleaser;
|
28413 | return NewKlass;
|
28414 | };
|
28415 |
|
28416 | var PooledClass = {
|
28417 | addPoolingTo: addPoolingTo,
|
28418 | oneArgumentPooler: oneArgumentPooler,
|
28419 | twoArgumentPooler: twoArgumentPooler,
|
28420 | threeArgumentPooler: threeArgumentPooler,
|
28421 | fourArgumentPooler: fourArgumentPooler
|
28422 | };
|
28423 |
|
28424 | module.exports = PooledClass;
|
28425 | }.call(exports, __webpack_require__(0)))
|
28426 |
|
28427 | }),
|
28428 |
|
28429 | (function(module, exports, __webpack_require__) {
|
28430 |
|
28431 | "use strict";
|
28432 | (function(process) { |
28433 |
|
28434 |
|
28435 |
|
28436 |
|
28437 |
|
28438 |
|
28439 |
|
28440 |
|
28441 |
|
28442 |
|
28443 |
|
28444 | var _prodInvariant = __webpack_require__(18);
|
28445 |
|
28446 | var ReactCurrentOwner = __webpack_require__(10);
|
28447 | var REACT_ELEMENT_TYPE = __webpack_require__(59);
|
28448 |
|
28449 | var getIteratorFn = __webpack_require__(60);
|
28450 | var invariant = __webpack_require__(1);
|
28451 | var KeyEscapeUtils = __webpack_require__(94);
|
28452 | var warning = __webpack_require__(2);
|
28453 |
|
28454 | var SEPARATOR = '.';
|
28455 | var SUBSEPARATOR = ':';
|
28456 |
|
28457 |
|
28458 |
|
28459 |
|
28460 |
|
28461 |
|
28462 |
|
28463 |
|
28464 |
|
28465 |
|
28466 |
|
28467 |
|
28468 | var didWarnAboutMaps = false;
|
28469 |
|
28470 |
|
28471 |
|
28472 |
|
28473 |
|
28474 |
|
28475 |
|
28476 |
|
28477 | function getComponentKey(component, index) {
|
28478 |
|
28479 |
|
28480 | if (component && typeof component === 'object' && component.key != null) {
|
28481 |
|
28482 | return KeyEscapeUtils.escape(component.key);
|
28483 | }
|
28484 |
|
28485 | return index.toString(36);
|
28486 | }
|
28487 |
|
28488 |
|
28489 |
|
28490 |
|
28491 |
|
28492 |
|
28493 |
|
28494 |
|
28495 |
|
28496 | function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
|
28497 | var type = typeof children;
|
28498 |
|
28499 | if (type === 'undefined' || type === 'boolean') {
|
28500 |
|
28501 | children = null;
|
28502 | }
|
28503 |
|
28504 | if (children === null || type === 'string' || type === 'number' ||
|
28505 |
|
28506 |
|
28507 | type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
|
28508 | callback(traverseContext, children,
|
28509 |
|
28510 |
|
28511 | nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
|
28512 | return 1;
|
28513 | }
|
28514 |
|
28515 | var child;
|
28516 | var nextName;
|
28517 | var subtreeCount = 0;
|
28518 | var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
28519 |
|
28520 | if (Array.isArray(children)) {
|
28521 | for (var i = 0; i < children.length; i++) {
|
28522 | child = children[i];
|
28523 | nextName = nextNamePrefix + getComponentKey(child, i);
|
28524 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
28525 | }
|
28526 | } else {
|
28527 | var iteratorFn = getIteratorFn(children);
|
28528 | if (iteratorFn) {
|
28529 | var iterator = iteratorFn.call(children);
|
28530 | var step;
|
28531 | if (iteratorFn !== children.entries) {
|
28532 | var ii = 0;
|
28533 | while (!(step = iterator.next()).done) {
|
28534 | child = step.value;
|
28535 | nextName = nextNamePrefix + getComponentKey(child, ii++);
|
28536 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
28537 | }
|
28538 | } else {
|
28539 | if (process.env.NODE_ENV !== 'production') {
|
28540 | var mapsAsChildrenAddendum = '';
|
28541 | if (ReactCurrentOwner.current) {
|
28542 | var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
|
28543 | if (mapsAsChildrenOwnerName) {
|
28544 | mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
|
28545 | }
|
28546 | }
|
28547 | process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;
|
28548 | didWarnAboutMaps = true;
|
28549 | }
|
28550 |
|
28551 | while (!(step = iterator.next()).done) {
|
28552 | var entry = step.value;
|
28553 | if (entry) {
|
28554 | child = entry[1];
|
28555 | nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
|
28556 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
28557 | }
|
28558 | }
|
28559 | }
|
28560 | } else if (type === 'object') {
|
28561 | var addendum = '';
|
28562 | if (process.env.NODE_ENV !== 'production') {
|
28563 | addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
|
28564 | if (children._isReactElement) {
|
28565 | addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.';
|
28566 | }
|
28567 | if (ReactCurrentOwner.current) {
|
28568 | var name = ReactCurrentOwner.current.getName();
|
28569 | if (name) {
|
28570 | addendum += ' Check the render method of `' + name + '`.';
|
28571 | }
|
28572 | }
|
28573 | }
|
28574 | var childrenString = String(children);
|
28575 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
|
28576 | }
|
28577 | }
|
28578 |
|
28579 | return subtreeCount;
|
28580 | }
|
28581 |
|
28582 |
|
28583 |
|
28584 |
|
28585 |
|
28586 |
|
28587 |
|
28588 |
|
28589 |
|
28590 |
|
28591 |
|
28592 |
|
28593 |
|
28594 |
|
28595 |
|
28596 |
|
28597 |
|
28598 | function traverseAllChildren(children, callback, traverseContext) {
|
28599 | if (children == null) {
|
28600 | return 0;
|
28601 | }
|
28602 |
|
28603 | return traverseAllChildrenImpl(children, '', callback, traverseContext);
|
28604 | }
|
28605 |
|
28606 | module.exports = traverseAllChildren;
|
28607 | }.call(exports, __webpack_require__(0)))
|
28608 |
|
28609 | }),
|
28610 |
|
28611 | (function(module, exports, __webpack_require__) {
|
28612 |
|
28613 | "use strict";
|
28614 |
|
28615 |
|
28616 |
|
28617 |
|
28618 |
|
28619 |
|
28620 |
|
28621 |
|
28622 |
|
28623 |
|
28624 |
|
28625 |
|
28626 |
|
28627 |
|
28628 |
|
28629 |
|
28630 |
|
28631 |
|
28632 |
|
28633 |
|
28634 | function escape(key) {
|
28635 | var escapeRegex = /[=:]/g;
|
28636 | var escaperLookup = {
|
28637 | '=': '=0',
|
28638 | ':': '=2'
|
28639 | };
|
28640 | var escapedString = ('' + key).replace(escapeRegex, function (match) {
|
28641 | return escaperLookup[match];
|
28642 | });
|
28643 |
|
28644 | return '$' + escapedString;
|
28645 | }
|
28646 |
|
28647 |
|
28648 |
|
28649 |
|
28650 |
|
28651 |
|
28652 |
|
28653 | function unescape(key) {
|
28654 | var unescapeRegex = /(=0|=2)/g;
|
28655 | var unescaperLookup = {
|
28656 | '=0': '=',
|
28657 | '=2': ':'
|
28658 | };
|
28659 | var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
|
28660 |
|
28661 | return ('' + keySubstring).replace(unescapeRegex, function (match) {
|
28662 | return unescaperLookup[match];
|
28663 | });
|
28664 | }
|
28665 |
|
28666 | var KeyEscapeUtils = {
|
28667 | escape: escape,
|
28668 | unescape: unescape
|
28669 | };
|
28670 |
|
28671 | module.exports = KeyEscapeUtils;
|
28672 |
|
28673 | }),
|
28674 |
|
28675 | (function(module, exports, __webpack_require__) {
|
28676 |
|
28677 | "use strict";
|
28678 | (function(process) { |
28679 |
|
28680 |
|
28681 |
|
28682 |
|
28683 |
|
28684 |
|
28685 |
|
28686 |
|
28687 |
|
28688 |
|
28689 |
|
28690 | var ReactElement = __webpack_require__(15);
|
28691 |
|
28692 |
|
28693 |
|
28694 |
|
28695 |
|
28696 |
|
28697 | var createDOMFactory = ReactElement.createFactory;
|
28698 | if (process.env.NODE_ENV !== 'production') {
|
28699 | var ReactElementValidator = __webpack_require__(61);
|
28700 | createDOMFactory = ReactElementValidator.createFactory;
|
28701 | }
|
28702 |
|
28703 |
|
28704 |
|
28705 |
|
28706 |
|
28707 |
|
28708 | var ReactDOMFactories = {
|
28709 | a: createDOMFactory('a'),
|
28710 | abbr: createDOMFactory('abbr'),
|
28711 | address: createDOMFactory('address'),
|
28712 | area: createDOMFactory('area'),
|
28713 | article: createDOMFactory('article'),
|
28714 | aside: createDOMFactory('aside'),
|
28715 | audio: createDOMFactory('audio'),
|
28716 | b: createDOMFactory('b'),
|
28717 | base: createDOMFactory('base'),
|
28718 | bdi: createDOMFactory('bdi'),
|
28719 | bdo: createDOMFactory('bdo'),
|
28720 | big: createDOMFactory('big'),
|
28721 | blockquote: createDOMFactory('blockquote'),
|
28722 | body: createDOMFactory('body'),
|
28723 | br: createDOMFactory('br'),
|
28724 | button: createDOMFactory('button'),
|
28725 | canvas: createDOMFactory('canvas'),
|
28726 | caption: createDOMFactory('caption'),
|
28727 | cite: createDOMFactory('cite'),
|
28728 | code: createDOMFactory('code'),
|
28729 | col: createDOMFactory('col'),
|
28730 | colgroup: createDOMFactory('colgroup'),
|
28731 | data: createDOMFactory('data'),
|
28732 | datalist: createDOMFactory('datalist'),
|
28733 | dd: createDOMFactory('dd'),
|
28734 | del: createDOMFactory('del'),
|
28735 | details: createDOMFactory('details'),
|
28736 | dfn: createDOMFactory('dfn'),
|
28737 | dialog: createDOMFactory('dialog'),
|
28738 | div: createDOMFactory('div'),
|
28739 | dl: createDOMFactory('dl'),
|
28740 | dt: createDOMFactory('dt'),
|
28741 | em: createDOMFactory('em'),
|
28742 | embed: createDOMFactory('embed'),
|
28743 | fieldset: createDOMFactory('fieldset'),
|
28744 | figcaption: createDOMFactory('figcaption'),
|
28745 | figure: createDOMFactory('figure'),
|
28746 | footer: createDOMFactory('footer'),
|
28747 | form: createDOMFactory('form'),
|
28748 | h1: createDOMFactory('h1'),
|
28749 | h2: createDOMFactory('h2'),
|
28750 | h3: createDOMFactory('h3'),
|
28751 | h4: createDOMFactory('h4'),
|
28752 | h5: createDOMFactory('h5'),
|
28753 | h6: createDOMFactory('h6'),
|
28754 | head: createDOMFactory('head'),
|
28755 | header: createDOMFactory('header'),
|
28756 | hgroup: createDOMFactory('hgroup'),
|
28757 | hr: createDOMFactory('hr'),
|
28758 | html: createDOMFactory('html'),
|
28759 | i: createDOMFactory('i'),
|
28760 | iframe: createDOMFactory('iframe'),
|
28761 | img: createDOMFactory('img'),
|
28762 | input: createDOMFactory('input'),
|
28763 | ins: createDOMFactory('ins'),
|
28764 | kbd: createDOMFactory('kbd'),
|
28765 | keygen: createDOMFactory('keygen'),
|
28766 | label: createDOMFactory('label'),
|
28767 | legend: createDOMFactory('legend'),
|
28768 | li: createDOMFactory('li'),
|
28769 | link: createDOMFactory('link'),
|
28770 | main: createDOMFactory('main'),
|
28771 | map: createDOMFactory('map'),
|
28772 | mark: createDOMFactory('mark'),
|
28773 | menu: createDOMFactory('menu'),
|
28774 | menuitem: createDOMFactory('menuitem'),
|
28775 | meta: createDOMFactory('meta'),
|
28776 | meter: createDOMFactory('meter'),
|
28777 | nav: createDOMFactory('nav'),
|
28778 | noscript: createDOMFactory('noscript'),
|
28779 | object: createDOMFactory('object'),
|
28780 | ol: createDOMFactory('ol'),
|
28781 | optgroup: createDOMFactory('optgroup'),
|
28782 | option: createDOMFactory('option'),
|
28783 | output: createDOMFactory('output'),
|
28784 | p: createDOMFactory('p'),
|
28785 | param: createDOMFactory('param'),
|
28786 | picture: createDOMFactory('picture'),
|
28787 | pre: createDOMFactory('pre'),
|
28788 | progress: createDOMFactory('progress'),
|
28789 | q: createDOMFactory('q'),
|
28790 | rp: createDOMFactory('rp'),
|
28791 | rt: createDOMFactory('rt'),
|
28792 | ruby: createDOMFactory('ruby'),
|
28793 | s: createDOMFactory('s'),
|
28794 | samp: createDOMFactory('samp'),
|
28795 | script: createDOMFactory('script'),
|
28796 | section: createDOMFactory('section'),
|
28797 | select: createDOMFactory('select'),
|
28798 | small: createDOMFactory('small'),
|
28799 | source: createDOMFactory('source'),
|
28800 | span: createDOMFactory('span'),
|
28801 | strong: createDOMFactory('strong'),
|
28802 | style: createDOMFactory('style'),
|
28803 | sub: createDOMFactory('sub'),
|
28804 | summary: createDOMFactory('summary'),
|
28805 | sup: createDOMFactory('sup'),
|
28806 | table: createDOMFactory('table'),
|
28807 | tbody: createDOMFactory('tbody'),
|
28808 | td: createDOMFactory('td'),
|
28809 | textarea: createDOMFactory('textarea'),
|
28810 | tfoot: createDOMFactory('tfoot'),
|
28811 | th: createDOMFactory('th'),
|
28812 | thead: createDOMFactory('thead'),
|
28813 | time: createDOMFactory('time'),
|
28814 | title: createDOMFactory('title'),
|
28815 | tr: createDOMFactory('tr'),
|
28816 | track: createDOMFactory('track'),
|
28817 | u: createDOMFactory('u'),
|
28818 | ul: createDOMFactory('ul'),
|
28819 | 'var': createDOMFactory('var'),
|
28820 | video: createDOMFactory('video'),
|
28821 | wbr: createDOMFactory('wbr'),
|
28822 |
|
28823 |
|
28824 | circle: createDOMFactory('circle'),
|
28825 | clipPath: createDOMFactory('clipPath'),
|
28826 | defs: createDOMFactory('defs'),
|
28827 | ellipse: createDOMFactory('ellipse'),
|
28828 | g: createDOMFactory('g'),
|
28829 | image: createDOMFactory('image'),
|
28830 | line: createDOMFactory('line'),
|
28831 | linearGradient: createDOMFactory('linearGradient'),
|
28832 | mask: createDOMFactory('mask'),
|
28833 | path: createDOMFactory('path'),
|
28834 | pattern: createDOMFactory('pattern'),
|
28835 | polygon: createDOMFactory('polygon'),
|
28836 | polyline: createDOMFactory('polyline'),
|
28837 | radialGradient: createDOMFactory('radialGradient'),
|
28838 | rect: createDOMFactory('rect'),
|
28839 | stop: createDOMFactory('stop'),
|
28840 | svg: createDOMFactory('svg'),
|
28841 | text: createDOMFactory('text'),
|
28842 | tspan: createDOMFactory('tspan')
|
28843 | };
|
28844 |
|
28845 | module.exports = ReactDOMFactories;
|
28846 | }.call(exports, __webpack_require__(0)))
|
28847 |
|
28848 | }),
|
28849 |
|
28850 | (function(module, exports, __webpack_require__) {
|
28851 |
|
28852 | "use strict";
|
28853 | (function(process) { |
28854 |
|
28855 |
|
28856 |
|
28857 |
|
28858 |
|
28859 |
|
28860 |
|
28861 |
|
28862 |
|
28863 |
|
28864 |
|
28865 | var _prodInvariant = __webpack_require__(18);
|
28866 |
|
28867 | var ReactPropTypeLocationNames = __webpack_require__(97);
|
28868 | var ReactPropTypesSecret = __webpack_require__(98);
|
28869 |
|
28870 | var invariant = __webpack_require__(1);
|
28871 | var warning = __webpack_require__(2);
|
28872 |
|
28873 | var ReactComponentTreeHook;
|
28874 |
|
28875 | if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
|
28876 |
|
28877 |
|
28878 |
|
28879 |
|
28880 |
|
28881 | ReactComponentTreeHook = __webpack_require__(7);
|
28882 | }
|
28883 |
|
28884 | var loggedTypeFailures = {};
|
28885 |
|
28886 |
|
28887 |
|
28888 |
|
28889 |
|
28890 |
|
28891 |
|
28892 |
|
28893 |
|
28894 |
|
28895 |
|
28896 |
|
28897 |
|
28898 | function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
|
28899 | for (var typeSpecName in typeSpecs) {
|
28900 | if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
28901 | var error;
|
28902 |
|
28903 |
|
28904 |
|
28905 | try {
|
28906 |
|
28907 |
|
28908 | !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;
|
28909 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
28910 | } catch (ex) {
|
28911 | error = ex;
|
28912 | }
|
28913 | process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;
|
28914 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
28915 |
|
28916 |
|
28917 | loggedTypeFailures[error.message] = true;
|
28918 |
|
28919 | var componentStackInfo = '';
|
28920 |
|
28921 | if (process.env.NODE_ENV !== 'production') {
|
28922 | if (!ReactComponentTreeHook) {
|
28923 | ReactComponentTreeHook = __webpack_require__(7);
|
28924 | }
|
28925 | if (debugID !== null) {
|
28926 | componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
|
28927 | } else if (element !== null) {
|
28928 | componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
|
28929 | }
|
28930 | }
|
28931 |
|
28932 | process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
|
28933 | }
|
28934 | }
|
28935 | }
|
28936 | }
|
28937 |
|
28938 | module.exports = checkReactTypeSpec;
|
28939 | }.call(exports, __webpack_require__(0)))
|
28940 |
|
28941 | }),
|
28942 |
|
28943 | (function(module, exports, __webpack_require__) {
|
28944 |
|
28945 | "use strict";
|
28946 | (function(process) { |
28947 |
|
28948 |
|
28949 |
|
28950 |
|
28951 |
|
28952 |
|
28953 |
|
28954 |
|
28955 |
|
28956 |
|
28957 |
|
28958 |
|
28959 | var ReactPropTypeLocationNames = {};
|
28960 |
|
28961 | if (process.env.NODE_ENV !== 'production') {
|
28962 | ReactPropTypeLocationNames = {
|
28963 | prop: 'prop',
|
28964 | context: 'context',
|
28965 | childContext: 'child context'
|
28966 | };
|
28967 | }
|
28968 |
|
28969 | module.exports = ReactPropTypeLocationNames;
|
28970 | }.call(exports, __webpack_require__(0)))
|
28971 |
|
28972 | }),
|
28973 |
|
28974 | (function(module, exports, __webpack_require__) {
|
28975 |
|
28976 | "use strict";
|
28977 |
|
28978 |
|
28979 |
|
28980 |
|
28981 |
|
28982 |
|
28983 |
|
28984 |
|
28985 |
|
28986 |
|
28987 |
|
28988 |
|
28989 |
|
28990 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
28991 |
|
28992 | module.exports = ReactPropTypesSecret;
|
28993 |
|
28994 | }),
|
28995 |
|
28996 | (function(module, exports, __webpack_require__) {
|
28997 |
|
28998 | "use strict";
|
28999 |
|
29000 |
|
29001 |
|
29002 |
|
29003 |
|
29004 |
|
29005 |
|
29006 |
|
29007 |
|
29008 |
|
29009 |
|
29010 |
|
29011 | var _require = __webpack_require__(15),
|
29012 | isValidElement = _require.isValidElement;
|
29013 |
|
29014 | var factory = __webpack_require__(62);
|
29015 |
|
29016 | module.exports = factory(isValidElement);
|
29017 |
|
29018 | }),
|
29019 |
|
29020 | (function(module, exports, __webpack_require__) {
|
29021 |
|
29022 | "use strict";
|
29023 | (function(process) { |
29024 |
|
29025 |
|
29026 |
|
29027 |
|
29028 |
|
29029 |
|
29030 |
|
29031 |
|
29032 |
|
29033 |
|
29034 | if (process.env.NODE_ENV !== 'production') {
|
29035 | var invariant = __webpack_require__(1);
|
29036 | var warning = __webpack_require__(2);
|
29037 | var ReactPropTypesSecret = __webpack_require__(37);
|
29038 | var loggedTypeFailures = {};
|
29039 | }
|
29040 |
|
29041 |
|
29042 |
|
29043 |
|
29044 |
|
29045 |
|
29046 |
|
29047 |
|
29048 |
|
29049 |
|
29050 |
|
29051 |
|
29052 | function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
29053 | if (process.env.NODE_ENV !== 'production') {
|
29054 | for (var typeSpecName in typeSpecs) {
|
29055 | if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
29056 | var error;
|
29057 |
|
29058 |
|
29059 |
|
29060 | try {
|
29061 |
|
29062 |
|
29063 | invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);
|
29064 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
29065 | } catch (ex) {
|
29066 | error = ex;
|
29067 | }
|
29068 | warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
|
29069 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
29070 |
|
29071 |
|
29072 | loggedTypeFailures[error.message] = true;
|
29073 |
|
29074 | var stack = getStack ? getStack() : '';
|
29075 |
|
29076 | warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
|
29077 | }
|
29078 | }
|
29079 | }
|
29080 | }
|
29081 | }
|
29082 |
|
29083 | module.exports = checkPropTypes;
|
29084 |
|
29085 | }.call(exports, __webpack_require__(0)))
|
29086 |
|
29087 | }),
|
29088 |
|
29089 | (function(module, exports, __webpack_require__) {
|
29090 |
|
29091 | "use strict";
|
29092 |
|
29093 |
|
29094 |
|
29095 |
|
29096 |
|
29097 |
|
29098 |
|
29099 |
|
29100 |
|
29101 |
|
29102 |
|
29103 |
|
29104 | module.exports = '15.6.1';
|
29105 |
|
29106 | }),
|
29107 |
|
29108 | (function(module, exports, __webpack_require__) {
|
29109 |
|
29110 | "use strict";
|
29111 |
|
29112 |
|
29113 |
|
29114 |
|
29115 |
|
29116 |
|
29117 |
|
29118 |
|
29119 |
|
29120 |
|
29121 |
|
29122 |
|
29123 | var _require = __webpack_require__(57),
|
29124 | Component = _require.Component;
|
29125 |
|
29126 | var _require2 = __webpack_require__(15),
|
29127 | isValidElement = _require2.isValidElement;
|
29128 |
|
29129 | var ReactNoopUpdateQueue = __webpack_require__(58);
|
29130 | var factory = __webpack_require__(103);
|
29131 |
|
29132 | module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue);
|
29133 |
|
29134 | }),
|
29135 |
|
29136 | (function(module, exports, __webpack_require__) {
|
29137 |
|
29138 | "use strict";
|
29139 | (function(process) { |
29140 |
|
29141 |
|
29142 |
|
29143 |
|
29144 |
|
29145 |
|
29146 |
|
29147 |
|
29148 |
|
29149 |
|
29150 |
|
29151 | var _assign = __webpack_require__(4);
|
29152 |
|
29153 | var emptyObject = __webpack_require__(27);
|
29154 | var _invariant = __webpack_require__(1);
|
29155 |
|
29156 | if (process.env.NODE_ENV !== 'production') {
|
29157 | var warning = __webpack_require__(2);
|
29158 | }
|
29159 |
|
29160 | var MIXINS_KEY = 'mixins';
|
29161 |
|
29162 |
|
29163 |
|
29164 | function identity(fn) {
|
29165 | return fn;
|
29166 | }
|
29167 |
|
29168 | var ReactPropTypeLocationNames;
|
29169 | if (process.env.NODE_ENV !== 'production') {
|
29170 | ReactPropTypeLocationNames = {
|
29171 | prop: 'prop',
|
29172 | context: 'context',
|
29173 | childContext: 'child context'
|
29174 | };
|
29175 | } else {
|
29176 | ReactPropTypeLocationNames = {};
|
29177 | }
|
29178 |
|
29179 | function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
|
29180 | |
29181 |
|
29182 |
|
29183 |
|
29184 | var injectedMixins = [];
|
29185 |
|
29186 | |
29187 |
|
29188 |
|
29189 |
|
29190 |
|
29191 |
|
29192 |
|
29193 |
|
29194 |
|
29195 |
|
29196 |
|
29197 |
|
29198 |
|
29199 |
|
29200 |
|
29201 |
|
29202 |
|
29203 |
|
29204 |
|
29205 |
|
29206 |
|
29207 |
|
29208 | var ReactClassInterface = {
|
29209 | |
29210 |
|
29211 |
|
29212 |
|
29213 |
|
29214 |
|
29215 | mixins: 'DEFINE_MANY',
|
29216 |
|
29217 | |
29218 |
|
29219 |
|
29220 |
|
29221 |
|
29222 |
|
29223 |
|
29224 | statics: 'DEFINE_MANY',
|
29225 |
|
29226 | |
29227 |
|
29228 |
|
29229 |
|
29230 |
|
29231 |
|
29232 | propTypes: 'DEFINE_MANY',
|
29233 |
|
29234 | |
29235 |
|
29236 |
|
29237 |
|
29238 |
|
29239 |
|
29240 | contextTypes: 'DEFINE_MANY',
|
29241 |
|
29242 | |
29243 |
|
29244 |
|
29245 |
|
29246 |
|
29247 |
|
29248 | childContextTypes: 'DEFINE_MANY',
|
29249 |
|
29250 |
|
29251 |
|
29252 | |
29253 |
|
29254 |
|
29255 |
|
29256 |
|
29257 |
|
29258 |
|
29259 |
|
29260 |
|
29261 |
|
29262 | getDefaultProps: 'DEFINE_MANY_MERGED',
|
29263 |
|
29264 | |
29265 |
|
29266 |
|
29267 |
|
29268 |
|
29269 |
|
29270 |
|
29271 |
|
29272 |
|
29273 |
|
29274 |
|
29275 |
|
29276 |
|
29277 |
|
29278 | getInitialState: 'DEFINE_MANY_MERGED',
|
29279 |
|
29280 | |
29281 |
|
29282 |
|
29283 |
|
29284 | getChildContext: 'DEFINE_MANY_MERGED',
|
29285 |
|
29286 | |
29287 |
|
29288 |
|
29289 |
|
29290 |
|
29291 |
|
29292 |
|
29293 |
|
29294 |
|
29295 |
|
29296 |
|
29297 |
|
29298 |
|
29299 |
|
29300 |
|
29301 | render: 'DEFINE_ONCE',
|
29302 |
|
29303 |
|
29304 |
|
29305 | |
29306 |
|
29307 |
|
29308 |
|
29309 |
|
29310 |
|
29311 |
|
29312 | componentWillMount: 'DEFINE_MANY',
|
29313 |
|
29314 | |
29315 |
|
29316 |
|
29317 |
|
29318 |
|
29319 |
|
29320 |
|
29321 |
|
29322 |
|
29323 |
|
29324 | componentDidMount: 'DEFINE_MANY',
|
29325 |
|
29326 | |
29327 |
|
29328 |
|
29329 |
|
29330 |
|
29331 |
|
29332 |
|
29333 |
|
29334 |
|
29335 |
|
29336 |
|
29337 |
|
29338 |
|
29339 |
|
29340 |
|
29341 |
|
29342 |
|
29343 |
|
29344 |
|
29345 | componentWillReceiveProps: 'DEFINE_MANY',
|
29346 |
|
29347 | |
29348 |
|
29349 |
|
29350 |
|
29351 |
|
29352 |
|
29353 |
|
29354 |
|
29355 |
|
29356 |
|
29357 |
|
29358 |
|
29359 |
|
29360 |
|
29361 |
|
29362 |
|
29363 |
|
29364 |
|
29365 |
|
29366 |
|
29367 | shouldComponentUpdate: 'DEFINE_ONCE',
|
29368 |
|
29369 | |
29370 |
|
29371 |
|
29372 |
|
29373 |
|
29374 |
|
29375 |
|
29376 |
|
29377 |
|
29378 |
|
29379 |
|
29380 |
|
29381 |
|
29382 |
|
29383 |
|
29384 | componentWillUpdate: 'DEFINE_MANY',
|
29385 |
|
29386 | |
29387 |
|
29388 |
|
29389 |
|
29390 |
|
29391 |
|
29392 |
|
29393 |
|
29394 |
|
29395 |
|
29396 |
|
29397 |
|
29398 | componentDidUpdate: 'DEFINE_MANY',
|
29399 |
|
29400 | |
29401 |
|
29402 |
|
29403 |
|
29404 |
|
29405 |
|
29406 |
|
29407 |
|
29408 |
|
29409 |
|
29410 |
|
29411 | componentWillUnmount: 'DEFINE_MANY',
|
29412 |
|
29413 |
|
29414 |
|
29415 | |
29416 |
|
29417 |
|
29418 |
|
29419 |
|
29420 |
|
29421 |
|
29422 |
|
29423 |
|
29424 |
|
29425 | updateComponent: 'OVERRIDE_BASE'
|
29426 | };
|
29427 |
|
29428 | |
29429 |
|
29430 |
|
29431 |
|
29432 |
|
29433 |
|
29434 |
|
29435 |
|
29436 |
|
29437 | var RESERVED_SPEC_KEYS = {
|
29438 | displayName: function(Constructor, displayName) {
|
29439 | Constructor.displayName = displayName;
|
29440 | },
|
29441 | mixins: function(Constructor, mixins) {
|
29442 | if (mixins) {
|
29443 | for (var i = 0; i < mixins.length; i++) {
|
29444 | mixSpecIntoComponent(Constructor, mixins[i]);
|
29445 | }
|
29446 | }
|
29447 | },
|
29448 | childContextTypes: function(Constructor, childContextTypes) {
|
29449 | if (process.env.NODE_ENV !== 'production') {
|
29450 | validateTypeDef(Constructor, childContextTypes, 'childContext');
|
29451 | }
|
29452 | Constructor.childContextTypes = _assign(
|
29453 | {},
|
29454 | Constructor.childContextTypes,
|
29455 | childContextTypes
|
29456 | );
|
29457 | },
|
29458 | contextTypes: function(Constructor, contextTypes) {
|
29459 | if (process.env.NODE_ENV !== 'production') {
|
29460 | validateTypeDef(Constructor, contextTypes, 'context');
|
29461 | }
|
29462 | Constructor.contextTypes = _assign(
|
29463 | {},
|
29464 | Constructor.contextTypes,
|
29465 | contextTypes
|
29466 | );
|
29467 | },
|
29468 | |
29469 |
|
29470 |
|
29471 |
|
29472 | getDefaultProps: function(Constructor, getDefaultProps) {
|
29473 | if (Constructor.getDefaultProps) {
|
29474 | Constructor.getDefaultProps = createMergedResultFunction(
|
29475 | Constructor.getDefaultProps,
|
29476 | getDefaultProps
|
29477 | );
|
29478 | } else {
|
29479 | Constructor.getDefaultProps = getDefaultProps;
|
29480 | }
|
29481 | },
|
29482 | propTypes: function(Constructor, propTypes) {
|
29483 | if (process.env.NODE_ENV !== 'production') {
|
29484 | validateTypeDef(Constructor, propTypes, 'prop');
|
29485 | }
|
29486 | Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
|
29487 | },
|
29488 | statics: function(Constructor, statics) {
|
29489 | mixStaticSpecIntoComponent(Constructor, statics);
|
29490 | },
|
29491 | autobind: function() {}
|
29492 | };
|
29493 |
|
29494 | function validateTypeDef(Constructor, typeDef, location) {
|
29495 | for (var propName in typeDef) {
|
29496 | if (typeDef.hasOwnProperty(propName)) {
|
29497 |
|
29498 |
|
29499 | if (process.env.NODE_ENV !== 'production') {
|
29500 | warning(
|
29501 | typeof typeDef[propName] === 'function',
|
29502 | '%s: %s type `%s` is invalid; it must be a function, usually from ' +
|
29503 | 'React.PropTypes.',
|
29504 | Constructor.displayName || 'ReactClass',
|
29505 | ReactPropTypeLocationNames[location],
|
29506 | propName
|
29507 | );
|
29508 | }
|
29509 | }
|
29510 | }
|
29511 | }
|
29512 |
|
29513 | function validateMethodOverride(isAlreadyDefined, name) {
|
29514 | var specPolicy = ReactClassInterface.hasOwnProperty(name)
|
29515 | ? ReactClassInterface[name]
|
29516 | : null;
|
29517 |
|
29518 |
|
29519 | if (ReactClassMixin.hasOwnProperty(name)) {
|
29520 | _invariant(
|
29521 | specPolicy === 'OVERRIDE_BASE',
|
29522 | 'ReactClassInterface: You are attempting to override ' +
|
29523 | '`%s` from your class specification. Ensure that your method names ' +
|
29524 | 'do not overlap with React methods.',
|
29525 | name
|
29526 | );
|
29527 | }
|
29528 |
|
29529 |
|
29530 | if (isAlreadyDefined) {
|
29531 | _invariant(
|
29532 | specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',
|
29533 | 'ReactClassInterface: You are attempting to define ' +
|
29534 | '`%s` on your component more than once. This conflict may be due ' +
|
29535 | 'to a mixin.',
|
29536 | name
|
29537 | );
|
29538 | }
|
29539 | }
|
29540 |
|
29541 | |
29542 |
|
29543 |
|
29544 |
|
29545 | function mixSpecIntoComponent(Constructor, spec) {
|
29546 | if (!spec) {
|
29547 | if (process.env.NODE_ENV !== 'production') {
|
29548 | var typeofSpec = typeof spec;
|
29549 | var isMixinValid = typeofSpec === 'object' && spec !== null;
|
29550 |
|
29551 | if (process.env.NODE_ENV !== 'production') {
|
29552 | warning(
|
29553 | isMixinValid,
|
29554 | "%s: You're attempting to include a mixin that is either null " +
|
29555 | 'or not an object. Check the mixins included by the component, ' +
|
29556 | 'as well as any mixins they include themselves. ' +
|
29557 | 'Expected object but got %s.',
|
29558 | Constructor.displayName || 'ReactClass',
|
29559 | spec === null ? null : typeofSpec
|
29560 | );
|
29561 | }
|
29562 | }
|
29563 |
|
29564 | return;
|
29565 | }
|
29566 |
|
29567 | _invariant(
|
29568 | typeof spec !== 'function',
|
29569 | "ReactClass: You're attempting to " +
|
29570 | 'use a component class or function as a mixin. Instead, just use a ' +
|
29571 | 'regular object.'
|
29572 | );
|
29573 | _invariant(
|
29574 | !isValidElement(spec),
|
29575 | "ReactClass: You're attempting to " +
|
29576 | 'use a component as a mixin. Instead, just use a regular object.'
|
29577 | );
|
29578 |
|
29579 | var proto = Constructor.prototype;
|
29580 | var autoBindPairs = proto.__reactAutoBindPairs;
|
29581 |
|
29582 |
|
29583 |
|
29584 |
|
29585 | if (spec.hasOwnProperty(MIXINS_KEY)) {
|
29586 | RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
|
29587 | }
|
29588 |
|
29589 | for (var name in spec) {
|
29590 | if (!spec.hasOwnProperty(name)) {
|
29591 | continue;
|
29592 | }
|
29593 |
|
29594 | if (name === MIXINS_KEY) {
|
29595 |
|
29596 | continue;
|
29597 | }
|
29598 |
|
29599 | var property = spec[name];
|
29600 | var isAlreadyDefined = proto.hasOwnProperty(name);
|
29601 | validateMethodOverride(isAlreadyDefined, name);
|
29602 |
|
29603 | if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
|
29604 | RESERVED_SPEC_KEYS[name](Constructor, property);
|
29605 | } else {
|
29606 |
|
29607 |
|
29608 |
|
29609 |
|
29610 | var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
|
29611 | var isFunction = typeof property === 'function';
|
29612 | var shouldAutoBind =
|
29613 | isFunction &&
|
29614 | !isReactClassMethod &&
|
29615 | !isAlreadyDefined &&
|
29616 | spec.autobind !== false;
|
29617 |
|
29618 | if (shouldAutoBind) {
|
29619 | autoBindPairs.push(name, property);
|
29620 | proto[name] = property;
|
29621 | } else {
|
29622 | if (isAlreadyDefined) {
|
29623 | var specPolicy = ReactClassInterface[name];
|
29624 |
|
29625 |
|
29626 | _invariant(
|
29627 | isReactClassMethod &&
|
29628 | (specPolicy === 'DEFINE_MANY_MERGED' ||
|
29629 | specPolicy === 'DEFINE_MANY'),
|
29630 | 'ReactClass: Unexpected spec policy %s for key %s ' +
|
29631 | 'when mixing in component specs.',
|
29632 | specPolicy,
|
29633 | name
|
29634 | );
|
29635 |
|
29636 |
|
29637 |
|
29638 | if (specPolicy === 'DEFINE_MANY_MERGED') {
|
29639 | proto[name] = createMergedResultFunction(proto[name], property);
|
29640 | } else if (specPolicy === 'DEFINE_MANY') {
|
29641 | proto[name] = createChainedFunction(proto[name], property);
|
29642 | }
|
29643 | } else {
|
29644 | proto[name] = property;
|
29645 | if (process.env.NODE_ENV !== 'production') {
|
29646 |
|
29647 |
|
29648 | if (typeof property === 'function' && spec.displayName) {
|
29649 | proto[name].displayName = spec.displayName + '_' + name;
|
29650 | }
|
29651 | }
|
29652 | }
|
29653 | }
|
29654 | }
|
29655 | }
|
29656 | }
|
29657 |
|
29658 | function mixStaticSpecIntoComponent(Constructor, statics) {
|
29659 | if (!statics) {
|
29660 | return;
|
29661 | }
|
29662 | for (var name in statics) {
|
29663 | var property = statics[name];
|
29664 | if (!statics.hasOwnProperty(name)) {
|
29665 | continue;
|
29666 | }
|
29667 |
|
29668 | var isReserved = name in RESERVED_SPEC_KEYS;
|
29669 | _invariant(
|
29670 | !isReserved,
|
29671 | 'ReactClass: You are attempting to define a reserved ' +
|
29672 | 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +
|
29673 | 'as an instance property instead; it will still be accessible on the ' +
|
29674 | 'constructor.',
|
29675 | name
|
29676 | );
|
29677 |
|
29678 | var isInherited = name in Constructor;
|
29679 | _invariant(
|
29680 | !isInherited,
|
29681 | 'ReactClass: You are attempting to define ' +
|
29682 | '`%s` on your component more than once. This conflict may be ' +
|
29683 | 'due to a mixin.',
|
29684 | name
|
29685 | );
|
29686 | Constructor[name] = property;
|
29687 | }
|
29688 | }
|
29689 |
|
29690 | |
29691 |
|
29692 |
|
29693 |
|
29694 |
|
29695 |
|
29696 |
|
29697 | function mergeIntoWithNoDuplicateKeys(one, two) {
|
29698 | _invariant(
|
29699 | one && two && typeof one === 'object' && typeof two === 'object',
|
29700 | 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
|
29701 | );
|
29702 |
|
29703 | for (var key in two) {
|
29704 | if (two.hasOwnProperty(key)) {
|
29705 | _invariant(
|
29706 | one[key] === undefined,
|
29707 | 'mergeIntoWithNoDuplicateKeys(): ' +
|
29708 | 'Tried to merge two objects with the same key: `%s`. This conflict ' +
|
29709 | 'may be due to a mixin; in particular, this may be caused by two ' +
|
29710 | 'getInitialState() or getDefaultProps() methods returning objects ' +
|
29711 | 'with clashing keys.',
|
29712 | key
|
29713 | );
|
29714 | one[key] = two[key];
|
29715 | }
|
29716 | }
|
29717 | return one;
|
29718 | }
|
29719 |
|
29720 | |
29721 |
|
29722 |
|
29723 |
|
29724 |
|
29725 |
|
29726 |
|
29727 |
|
29728 | function createMergedResultFunction(one, two) {
|
29729 | return function mergedResult() {
|
29730 | var a = one.apply(this, arguments);
|
29731 | var b = two.apply(this, arguments);
|
29732 | if (a == null) {
|
29733 | return b;
|
29734 | } else if (b == null) {
|
29735 | return a;
|
29736 | }
|
29737 | var c = {};
|
29738 | mergeIntoWithNoDuplicateKeys(c, a);
|
29739 | mergeIntoWithNoDuplicateKeys(c, b);
|
29740 | return c;
|
29741 | };
|
29742 | }
|
29743 |
|
29744 | |
29745 |
|
29746 |
|
29747 |
|
29748 |
|
29749 |
|
29750 |
|
29751 |
|
29752 | function createChainedFunction(one, two) {
|
29753 | return function chainedFunction() {
|
29754 | one.apply(this, arguments);
|
29755 | two.apply(this, arguments);
|
29756 | };
|
29757 | }
|
29758 |
|
29759 | |
29760 |
|
29761 |
|
29762 |
|
29763 |
|
29764 |
|
29765 |
|
29766 | function bindAutoBindMethod(component, method) {
|
29767 | var boundMethod = method.bind(component);
|
29768 | if (process.env.NODE_ENV !== 'production') {
|
29769 | boundMethod.__reactBoundContext = component;
|
29770 | boundMethod.__reactBoundMethod = method;
|
29771 | boundMethod.__reactBoundArguments = null;
|
29772 | var componentName = component.constructor.displayName;
|
29773 | var _bind = boundMethod.bind;
|
29774 | boundMethod.bind = function(newThis) {
|
29775 | for (
|
29776 | var _len = arguments.length,
|
29777 | args = Array(_len > 1 ? _len - 1 : 0),
|
29778 | _key = 1;
|
29779 | _key < _len;
|
29780 | _key++
|
29781 | ) {
|
29782 | args[_key - 1] = arguments[_key];
|
29783 | }
|
29784 |
|
29785 |
|
29786 |
|
29787 |
|
29788 | if (newThis !== component && newThis !== null) {
|
29789 | if (process.env.NODE_ENV !== 'production') {
|
29790 | warning(
|
29791 | false,
|
29792 | 'bind(): React component methods may only be bound to the ' +
|
29793 | 'component instance. See %s',
|
29794 | componentName
|
29795 | );
|
29796 | }
|
29797 | } else if (!args.length) {
|
29798 | if (process.env.NODE_ENV !== 'production') {
|
29799 | warning(
|
29800 | false,
|
29801 | 'bind(): You are binding a component method to the component. ' +
|
29802 | 'React does this for you automatically in a high-performance ' +
|
29803 | 'way, so you can safely remove this call. See %s',
|
29804 | componentName
|
29805 | );
|
29806 | }
|
29807 | return boundMethod;
|
29808 | }
|
29809 | var reboundMethod = _bind.apply(boundMethod, arguments);
|
29810 | reboundMethod.__reactBoundContext = component;
|
29811 | reboundMethod.__reactBoundMethod = method;
|
29812 | reboundMethod.__reactBoundArguments = args;
|
29813 | return reboundMethod;
|
29814 | };
|
29815 | }
|
29816 | return boundMethod;
|
29817 | }
|
29818 |
|
29819 | |
29820 |
|
29821 |
|
29822 |
|
29823 |
|
29824 | function bindAutoBindMethods(component) {
|
29825 | var pairs = component.__reactAutoBindPairs;
|
29826 | for (var i = 0; i < pairs.length; i += 2) {
|
29827 | var autoBindKey = pairs[i];
|
29828 | var method = pairs[i + 1];
|
29829 | component[autoBindKey] = bindAutoBindMethod(component, method);
|
29830 | }
|
29831 | }
|
29832 |
|
29833 | var IsMountedPreMixin = {
|
29834 | componentDidMount: function() {
|
29835 | this.__isMounted = true;
|
29836 | }
|
29837 | };
|
29838 |
|
29839 | var IsMountedPostMixin = {
|
29840 | componentWillUnmount: function() {
|
29841 | this.__isMounted = false;
|
29842 | }
|
29843 | };
|
29844 |
|
29845 | |
29846 |
|
29847 |
|
29848 |
|
29849 | var ReactClassMixin = {
|
29850 | |
29851 |
|
29852 |
|
29853 |
|
29854 | replaceState: function(newState, callback) {
|
29855 | this.updater.enqueueReplaceState(this, newState, callback);
|
29856 | },
|
29857 |
|
29858 | |
29859 |
|
29860 |
|
29861 |
|
29862 |
|
29863 |
|
29864 | isMounted: function() {
|
29865 | if (process.env.NODE_ENV !== 'production') {
|
29866 | warning(
|
29867 | this.__didWarnIsMounted,
|
29868 | '%s: isMounted is deprecated. Instead, make sure to clean up ' +
|
29869 | 'subscriptions and pending requests in componentWillUnmount to ' +
|
29870 | 'prevent memory leaks.',
|
29871 | (this.constructor && this.constructor.displayName) ||
|
29872 | this.name ||
|
29873 | 'Component'
|
29874 | );
|
29875 | this.__didWarnIsMounted = true;
|
29876 | }
|
29877 | return !!this.__isMounted;
|
29878 | }
|
29879 | };
|
29880 |
|
29881 | var ReactClassComponent = function() {};
|
29882 | _assign(
|
29883 | ReactClassComponent.prototype,
|
29884 | ReactComponent.prototype,
|
29885 | ReactClassMixin
|
29886 | );
|
29887 |
|
29888 | |
29889 |
|
29890 |
|
29891 |
|
29892 |
|
29893 |
|
29894 |
|
29895 |
|
29896 | function createClass(spec) {
|
29897 |
|
29898 |
|
29899 |
|
29900 | var Constructor = identity(function(props, context, updater) {
|
29901 |
|
29902 |
|
29903 |
|
29904 | if (process.env.NODE_ENV !== 'production') {
|
29905 | warning(
|
29906 | this instanceof Constructor,
|
29907 | 'Something is calling a React component directly. Use a factory or ' +
|
29908 | 'JSX instead. See: https://fb.me/react-legacyfactory'
|
29909 | );
|
29910 | }
|
29911 |
|
29912 |
|
29913 | if (this.__reactAutoBindPairs.length) {
|
29914 | bindAutoBindMethods(this);
|
29915 | }
|
29916 |
|
29917 | this.props = props;
|
29918 | this.context = context;
|
29919 | this.refs = emptyObject;
|
29920 | this.updater = updater || ReactNoopUpdateQueue;
|
29921 |
|
29922 | this.state = null;
|
29923 |
|
29924 |
|
29925 |
|
29926 |
|
29927 | var initialState = this.getInitialState ? this.getInitialState() : null;
|
29928 | if (process.env.NODE_ENV !== 'production') {
|
29929 |
|
29930 | if (
|
29931 | initialState === undefined &&
|
29932 | this.getInitialState._isMockFunction
|
29933 | ) {
|
29934 |
|
29935 |
|
29936 | initialState = null;
|
29937 | }
|
29938 | }
|
29939 | _invariant(
|
29940 | typeof initialState === 'object' && !Array.isArray(initialState),
|
29941 | '%s.getInitialState(): must return an object or null',
|
29942 | Constructor.displayName || 'ReactCompositeComponent'
|
29943 | );
|
29944 |
|
29945 | this.state = initialState;
|
29946 | });
|
29947 | Constructor.prototype = new ReactClassComponent();
|
29948 | Constructor.prototype.constructor = Constructor;
|
29949 | Constructor.prototype.__reactAutoBindPairs = [];
|
29950 |
|
29951 | injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
|
29952 |
|
29953 | mixSpecIntoComponent(Constructor, IsMountedPreMixin);
|
29954 | mixSpecIntoComponent(Constructor, spec);
|
29955 | mixSpecIntoComponent(Constructor, IsMountedPostMixin);
|
29956 |
|
29957 |
|
29958 | if (Constructor.getDefaultProps) {
|
29959 | Constructor.defaultProps = Constructor.getDefaultProps();
|
29960 | }
|
29961 |
|
29962 | if (process.env.NODE_ENV !== 'production') {
|
29963 |
|
29964 |
|
29965 |
|
29966 |
|
29967 | if (Constructor.getDefaultProps) {
|
29968 | Constructor.getDefaultProps.isReactClassApproved = {};
|
29969 | }
|
29970 | if (Constructor.prototype.getInitialState) {
|
29971 | Constructor.prototype.getInitialState.isReactClassApproved = {};
|
29972 | }
|
29973 | }
|
29974 |
|
29975 | _invariant(
|
29976 | Constructor.prototype.render,
|
29977 | 'createClass(...): Class specification must implement a `render` method.'
|
29978 | );
|
29979 |
|
29980 | if (process.env.NODE_ENV !== 'production') {
|
29981 | warning(
|
29982 | !Constructor.prototype.componentShouldUpdate,
|
29983 | '%s has a method called ' +
|
29984 | 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
|
29985 | 'The name is phrased as a question because the function is ' +
|
29986 | 'expected to return a value.',
|
29987 | spec.displayName || 'A component'
|
29988 | );
|
29989 | warning(
|
29990 | !Constructor.prototype.componentWillRecieveProps,
|
29991 | '%s has a method called ' +
|
29992 | 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
|
29993 | spec.displayName || 'A component'
|
29994 | );
|
29995 | }
|
29996 |
|
29997 |
|
29998 | for (var methodName in ReactClassInterface) {
|
29999 | if (!Constructor.prototype[methodName]) {
|
30000 | Constructor.prototype[methodName] = null;
|
30001 | }
|
30002 | }
|
30003 |
|
30004 | return Constructor;
|
30005 | }
|
30006 |
|
30007 | return createClass;
|
30008 | }
|
30009 |
|
30010 | module.exports = factory;
|
30011 |
|
30012 | }.call(exports, __webpack_require__(0)))
|
30013 |
|
30014 | }),
|
30015 |
|
30016 | (function(module, exports, __webpack_require__) {
|
30017 |
|
30018 | "use strict";
|
30019 | (function(process) { |
30020 |
|
30021 |
|
30022 |
|
30023 |
|
30024 |
|
30025 |
|
30026 |
|
30027 |
|
30028 |
|
30029 |
|
30030 | var _prodInvariant = __webpack_require__(18);
|
30031 |
|
30032 | var ReactElement = __webpack_require__(15);
|
30033 |
|
30034 | var invariant = __webpack_require__(1);
|
30035 |
|
30036 |
|
30037 |
|
30038 |
|
30039 |
|
30040 |
|
30041 |
|
30042 |
|
30043 |
|
30044 |
|
30045 |
|
30046 |
|
30047 |
|
30048 |
|
30049 |
|
30050 | function onlyChild(children) {
|
30051 | !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0;
|
30052 | return children;
|
30053 | }
|
30054 |
|
30055 | module.exports = onlyChild;
|
30056 | }.call(exports, __webpack_require__(0)))
|
30057 |
|
30058 | }),
|
30059 |
|
30060 | (function(module, exports, __webpack_require__) {
|
30061 |
|
30062 | "use strict";
|
30063 |
|
30064 |
|
30065 | module.exports = __webpack_require__(106);
|
30066 |
|
30067 |
|
30068 | }),
|
30069 |
|
30070 | (function(module, exports, __webpack_require__) {
|
30071 |
|
30072 | "use strict";
|
30073 | (function(process) { |
30074 |
|
30075 |
|
30076 |
|
30077 |
|
30078 |
|
30079 |
|
30080 |
|
30081 |
|
30082 |
|
30083 |
|
30084 |
|
30085 |
|
30086 |
|
30087 | var ReactDOMComponentTree = __webpack_require__(5);
|
30088 | var ReactDefaultInjection = __webpack_require__(107);
|
30089 | var ReactMount = __webpack_require__(87);
|
30090 | var ReactReconciler = __webpack_require__(19);
|
30091 | var ReactUpdates = __webpack_require__(11);
|
30092 | var ReactVersion = __webpack_require__(185);
|
30093 |
|
30094 | var findDOMNode = __webpack_require__(186);
|
30095 | var getHostComponentFromComposite = __webpack_require__(88);
|
30096 | var renderSubtreeIntoContainer = __webpack_require__(187);
|
30097 | var warning = __webpack_require__(2);
|
30098 |
|
30099 | ReactDefaultInjection.inject();
|
30100 |
|
30101 | var ReactDOM = {
|
30102 | findDOMNode: findDOMNode,
|
30103 | render: ReactMount.render,
|
30104 | unmountComponentAtNode: ReactMount.unmountComponentAtNode,
|
30105 | version: ReactVersion,
|
30106 |
|
30107 |
|
30108 | unstable_batchedUpdates: ReactUpdates.batchedUpdates,
|
30109 | unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer
|
30110 |
|
30111 | };
|
30112 |
|
30113 |
|
30114 |
|
30115 | if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') {
|
30116 | __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
|
30117 | ComponentTree: {
|
30118 | getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode,
|
30119 | getNodeFromInstance: function (inst) {
|
30120 |
|
30121 | if (inst._renderedComponent) {
|
30122 | inst = getHostComponentFromComposite(inst);
|
30123 | }
|
30124 | if (inst) {
|
30125 | return ReactDOMComponentTree.getNodeFromInstance(inst);
|
30126 | } else {
|
30127 | return null;
|
30128 | }
|
30129 | }
|
30130 | },
|
30131 | Mount: ReactMount,
|
30132 | Reconciler: ReactReconciler
|
30133 | });
|
30134 | }
|
30135 |
|
30136 | if (process.env.NODE_ENV !== 'production') {
|
30137 | var ExecutionEnvironment = __webpack_require__(6);
|
30138 | if (ExecutionEnvironment.canUseDOM && window.top === window.self) {
|
30139 |
|
30140 | if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
|
30141 |
|
30142 | if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
|
30143 |
|
30144 | var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1;
|
30145 | console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools');
|
30146 | }
|
30147 | }
|
30148 |
|
30149 | var testFunc = function testFn() {};
|
30150 | process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, "It looks like you're using a minified copy of the development build " + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0;
|
30151 |
|
30152 |
|
30153 |
|
30154 | var ieCompatibilityMode = document.documentMode && document.documentMode < 8;
|
30155 |
|
30156 | process.env.NODE_ENV !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />') : void 0;
|
30157 |
|
30158 | var expectedFeatures = [
|
30159 |
|
30160 | Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.trim];
|
30161 |
|
30162 | for (var i = 0; i < expectedFeatures.length; i++) {
|
30163 | if (!expectedFeatures[i]) {
|
30164 | process.env.NODE_ENV !== 'production' ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0;
|
30165 | break;
|
30166 | }
|
30167 | }
|
30168 | }
|
30169 | }
|
30170 |
|
30171 | if (process.env.NODE_ENV !== 'production') {
|
30172 | var ReactInstrumentation = __webpack_require__(9);
|
30173 | var ReactDOMUnknownPropertyHook = __webpack_require__(188);
|
30174 | var ReactDOMNullInputValuePropHook = __webpack_require__(189);
|
30175 | var ReactDOMInvalidARIAHook = __webpack_require__(190);
|
30176 |
|
30177 | ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook);
|
30178 | ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook);
|
30179 | ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook);
|
30180 | }
|
30181 |
|
30182 | module.exports = ReactDOM;
|
30183 | }.call(exports, __webpack_require__(0)))
|
30184 |
|
30185 | }),
|
30186 |
|
30187 | (function(module, exports, __webpack_require__) {
|
30188 |
|
30189 | "use strict";
|
30190 |
|
30191 |
|
30192 |
|
30193 |
|
30194 |
|
30195 |
|
30196 |
|
30197 |
|
30198 |
|
30199 |
|
30200 |
|
30201 |
|
30202 | var ARIADOMPropertyConfig = __webpack_require__(108);
|
30203 | var BeforeInputEventPlugin = __webpack_require__(109);
|
30204 | var ChangeEventPlugin = __webpack_require__(113);
|
30205 | var DefaultEventPluginOrder = __webpack_require__(121);
|
30206 | var EnterLeaveEventPlugin = __webpack_require__(122);
|
30207 | var HTMLDOMPropertyConfig = __webpack_require__(123);
|
30208 | var ReactComponentBrowserEnvironment = __webpack_require__(124);
|
30209 | var ReactDOMComponent = __webpack_require__(130);
|
30210 | var ReactDOMComponentTree = __webpack_require__(5);
|
30211 | var ReactDOMEmptyComponent = __webpack_require__(156);
|
30212 | var ReactDOMTreeTraversal = __webpack_require__(157);
|
30213 | var ReactDOMTextComponent = __webpack_require__(158);
|
30214 | var ReactDefaultBatchingStrategy = __webpack_require__(159);
|
30215 | var ReactEventListener = __webpack_require__(160);
|
30216 | var ReactInjection = __webpack_require__(162);
|
30217 | var ReactReconcileTransaction = __webpack_require__(163);
|
30218 | var SVGDOMPropertyConfig = __webpack_require__(169);
|
30219 | var SelectEventPlugin = __webpack_require__(170);
|
30220 | var SimpleEventPlugin = __webpack_require__(171);
|
30221 |
|
30222 | var alreadyInjected = false;
|
30223 |
|
30224 | function inject() {
|
30225 | if (alreadyInjected) {
|
30226 |
|
30227 |
|
30228 |
|
30229 | return;
|
30230 | }
|
30231 | alreadyInjected = true;
|
30232 |
|
30233 | ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);
|
30234 |
|
30235 | |
30236 |
|
30237 |
|
30238 | ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);
|
30239 | ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree);
|
30240 | ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal);
|
30241 |
|
30242 | |
30243 |
|
30244 |
|
30245 |
|
30246 | ReactInjection.EventPluginHub.injectEventPluginsByName({
|
30247 | SimpleEventPlugin: SimpleEventPlugin,
|
30248 | EnterLeaveEventPlugin: EnterLeaveEventPlugin,
|
30249 | ChangeEventPlugin: ChangeEventPlugin,
|
30250 | SelectEventPlugin: SelectEventPlugin,
|
30251 | BeforeInputEventPlugin: BeforeInputEventPlugin
|
30252 | });
|
30253 |
|
30254 | ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent);
|
30255 |
|
30256 | ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent);
|
30257 |
|
30258 | ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig);
|
30259 | ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
|
30260 | ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);
|
30261 |
|
30262 | ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) {
|
30263 | return new ReactDOMEmptyComponent(instantiate);
|
30264 | });
|
30265 |
|
30266 | ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction);
|
30267 | ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);
|
30268 |
|
30269 | ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);
|
30270 | }
|
30271 |
|
30272 | module.exports = {
|
30273 | inject: inject
|
30274 | };
|
30275 |
|
30276 | }),
|
30277 |
|
30278 | (function(module, exports, __webpack_require__) {
|
30279 |
|
30280 | "use strict";
|
30281 |
|
30282 |
|
30283 |
|
30284 |
|
30285 |
|
30286 |
|
30287 |
|
30288 |
|
30289 |
|
30290 |
|
30291 |
|
30292 |
|
30293 | var ARIADOMPropertyConfig = {
|
30294 | Properties: {
|
30295 |
|
30296 | 'aria-current': 0,
|
30297 | 'aria-details': 0,
|
30298 | 'aria-disabled': 0,
|
30299 | 'aria-hidden': 0,
|
30300 | 'aria-invalid': 0,
|
30301 | 'aria-keyshortcuts': 0,
|
30302 | 'aria-label': 0,
|
30303 | 'aria-roledescription': 0,
|
30304 |
|
30305 | 'aria-autocomplete': 0,
|
30306 | 'aria-checked': 0,
|
30307 | 'aria-expanded': 0,
|
30308 | 'aria-haspopup': 0,
|
30309 | 'aria-level': 0,
|
30310 | 'aria-modal': 0,
|
30311 | 'aria-multiline': 0,
|
30312 | 'aria-multiselectable': 0,
|
30313 | 'aria-orientation': 0,
|
30314 | 'aria-placeholder': 0,
|
30315 | 'aria-pressed': 0,
|
30316 | 'aria-readonly': 0,
|
30317 | 'aria-required': 0,
|
30318 | 'aria-selected': 0,
|
30319 | 'aria-sort': 0,
|
30320 | 'aria-valuemax': 0,
|
30321 | 'aria-valuemin': 0,
|
30322 | 'aria-valuenow': 0,
|
30323 | 'aria-valuetext': 0,
|
30324 |
|
30325 | 'aria-atomic': 0,
|
30326 | 'aria-busy': 0,
|
30327 | 'aria-live': 0,
|
30328 | 'aria-relevant': 0,
|
30329 |
|
30330 | 'aria-dropeffect': 0,
|
30331 | 'aria-grabbed': 0,
|
30332 |
|
30333 | 'aria-activedescendant': 0,
|
30334 | 'aria-colcount': 0,
|
30335 | 'aria-colindex': 0,
|
30336 | 'aria-colspan': 0,
|
30337 | 'aria-controls': 0,
|
30338 | 'aria-describedby': 0,
|
30339 | 'aria-errormessage': 0,
|
30340 | 'aria-flowto': 0,
|
30341 | 'aria-labelledby': 0,
|
30342 | 'aria-owns': 0,
|
30343 | 'aria-posinset': 0,
|
30344 | 'aria-rowcount': 0,
|
30345 | 'aria-rowindex': 0,
|
30346 | 'aria-rowspan': 0,
|
30347 | 'aria-setsize': 0
|
30348 | },
|
30349 | DOMAttributeNames: {},
|
30350 | DOMPropertyNames: {}
|
30351 | };
|
30352 |
|
30353 | module.exports = ARIADOMPropertyConfig;
|
30354 |
|
30355 | }),
|
30356 |
|
30357 | (function(module, exports, __webpack_require__) {
|
30358 |
|
30359 | "use strict";
|
30360 |
|
30361 |
|
30362 |
|
30363 |
|
30364 |
|
30365 |
|
30366 |
|
30367 |
|
30368 |
|
30369 |
|
30370 |
|
30371 |
|
30372 | var EventPropagators = __webpack_require__(21);
|
30373 | var ExecutionEnvironment = __webpack_require__(6);
|
30374 | var FallbackCompositionState = __webpack_require__(110);
|
30375 | var SyntheticCompositionEvent = __webpack_require__(111);
|
30376 | var SyntheticInputEvent = __webpack_require__(112);
|
30377 |
|
30378 | var END_KEYCODES = [9, 13, 27, 32];
|
30379 | var START_KEYCODE = 229;
|
30380 |
|
30381 | var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
|
30382 |
|
30383 | var documentMode = null;
|
30384 | if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
|
30385 | documentMode = document.documentMode;
|
30386 | }
|
30387 |
|
30388 |
|
30389 |
|
30390 |
|
30391 | var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
|
30392 |
|
30393 |
|
30394 |
|
30395 |
|
30396 | var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
|
30397 |
|
30398 |
|
30399 |
|
30400 |
|
30401 |
|
30402 | function isPresto() {
|
30403 | var opera = window.opera;
|
30404 | return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
|
30405 | }
|
30406 |
|
30407 | var SPACEBAR_CODE = 32;
|
30408 | var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
|
30409 |
|
30410 |
|
30411 | var eventTypes = {
|
30412 | beforeInput: {
|
30413 | phasedRegistrationNames: {
|
30414 | bubbled: 'onBeforeInput',
|
30415 | captured: 'onBeforeInputCapture'
|
30416 | },
|
30417 | dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']
|
30418 | },
|
30419 | compositionEnd: {
|
30420 | phasedRegistrationNames: {
|
30421 | bubbled: 'onCompositionEnd',
|
30422 | captured: 'onCompositionEndCapture'
|
30423 | },
|
30424 | dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
|
30425 | },
|
30426 | compositionStart: {
|
30427 | phasedRegistrationNames: {
|
30428 | bubbled: 'onCompositionStart',
|
30429 | captured: 'onCompositionStartCapture'
|
30430 | },
|
30431 | dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
|
30432 | },
|
30433 | compositionUpdate: {
|
30434 | phasedRegistrationNames: {
|
30435 | bubbled: 'onCompositionUpdate',
|
30436 | captured: 'onCompositionUpdateCapture'
|
30437 | },
|
30438 | dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
|
30439 | }
|
30440 | };
|
30441 |
|
30442 |
|
30443 | var hasSpaceKeypress = false;
|
30444 |
|
30445 |
|
30446 |
|
30447 |
|
30448 |
|
30449 |
|
30450 | function isKeypressCommand(nativeEvent) {
|
30451 | return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
|
30452 |
|
30453 | !(nativeEvent.ctrlKey && nativeEvent.altKey);
|
30454 | }
|
30455 |
|
30456 |
|
30457 |
|
30458 |
|
30459 |
|
30460 |
|
30461 |
|
30462 | function getCompositionEventType(topLevelType) {
|
30463 | switch (topLevelType) {
|
30464 | case 'topCompositionStart':
|
30465 | return eventTypes.compositionStart;
|
30466 | case 'topCompositionEnd':
|
30467 | return eventTypes.compositionEnd;
|
30468 | case 'topCompositionUpdate':
|
30469 | return eventTypes.compositionUpdate;
|
30470 | }
|
30471 | }
|
30472 |
|
30473 |
|
30474 |
|
30475 |
|
30476 |
|
30477 |
|
30478 |
|
30479 |
|
30480 |
|
30481 | function isFallbackCompositionStart(topLevelType, nativeEvent) {
|
30482 | return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE;
|
30483 | }
|
30484 |
|
30485 |
|
30486 |
|
30487 |
|
30488 |
|
30489 |
|
30490 |
|
30491 |
|
30492 | function isFallbackCompositionEnd(topLevelType, nativeEvent) {
|
30493 | switch (topLevelType) {
|
30494 | case 'topKeyUp':
|
30495 |
|
30496 | return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
|
30497 | case 'topKeyDown':
|
30498 |
|
30499 |
|
30500 | return nativeEvent.keyCode !== START_KEYCODE;
|
30501 | case 'topKeyPress':
|
30502 | case 'topMouseDown':
|
30503 | case 'topBlur':
|
30504 |
|
30505 | return true;
|
30506 | default:
|
30507 | return false;
|
30508 | }
|
30509 | }
|
30510 |
|
30511 |
|
30512 |
|
30513 |
|
30514 |
|
30515 |
|
30516 |
|
30517 |
|
30518 |
|
30519 |
|
30520 | function getDataFromCustomEvent(nativeEvent) {
|
30521 | var detail = nativeEvent.detail;
|
30522 | if (typeof detail === 'object' && 'data' in detail) {
|
30523 | return detail.data;
|
30524 | }
|
30525 | return null;
|
30526 | }
|
30527 |
|
30528 |
|
30529 | var currentComposition = null;
|
30530 |
|
30531 |
|
30532 |
|
30533 |
|
30534 | function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
30535 | var eventType;
|
30536 | var fallbackData;
|
30537 |
|
30538 | if (canUseCompositionEvent) {
|
30539 | eventType = getCompositionEventType(topLevelType);
|
30540 | } else if (!currentComposition) {
|
30541 | if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
|
30542 | eventType = eventTypes.compositionStart;
|
30543 | }
|
30544 | } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
|
30545 | eventType = eventTypes.compositionEnd;
|
30546 | }
|
30547 |
|
30548 | if (!eventType) {
|
30549 | return null;
|
30550 | }
|
30551 |
|
30552 | if (useFallbackCompositionData) {
|
30553 |
|
30554 |
|
30555 | if (!currentComposition && eventType === eventTypes.compositionStart) {
|
30556 | currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);
|
30557 | } else if (eventType === eventTypes.compositionEnd) {
|
30558 | if (currentComposition) {
|
30559 | fallbackData = currentComposition.getData();
|
30560 | }
|
30561 | }
|
30562 | }
|
30563 |
|
30564 | var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
|
30565 |
|
30566 | if (fallbackData) {
|
30567 |
|
30568 |
|
30569 | event.data = fallbackData;
|
30570 | } else {
|
30571 | var customData = getDataFromCustomEvent(nativeEvent);
|
30572 | if (customData !== null) {
|
30573 | event.data = customData;
|
30574 | }
|
30575 | }
|
30576 |
|
30577 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
30578 | return event;
|
30579 | }
|
30580 |
|
30581 |
|
30582 |
|
30583 |
|
30584 |
|
30585 |
|
30586 | function getNativeBeforeInputChars(topLevelType, nativeEvent) {
|
30587 | switch (topLevelType) {
|
30588 | case 'topCompositionEnd':
|
30589 | return getDataFromCustomEvent(nativeEvent);
|
30590 | case 'topKeyPress':
|
30591 | |
30592 |
|
30593 |
|
30594 |
|
30595 |
|
30596 |
|
30597 |
|
30598 |
|
30599 |
|
30600 |
|
30601 |
|
30602 |
|
30603 |
|
30604 |
|
30605 | var which = nativeEvent.which;
|
30606 | if (which !== SPACEBAR_CODE) {
|
30607 | return null;
|
30608 | }
|
30609 |
|
30610 | hasSpaceKeypress = true;
|
30611 | return SPACEBAR_CHAR;
|
30612 |
|
30613 | case 'topTextInput':
|
30614 |
|
30615 | var chars = nativeEvent.data;
|
30616 |
|
30617 |
|
30618 |
|
30619 |
|
30620 | if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
|
30621 | return null;
|
30622 | }
|
30623 |
|
30624 | return chars;
|
30625 |
|
30626 | default:
|
30627 |
|
30628 | return null;
|
30629 | }
|
30630 | }
|
30631 |
|
30632 |
|
30633 |
|
30634 |
|
30635 |
|
30636 |
|
30637 |
|
30638 |
|
30639 |
|
30640 | function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
|
30641 |
|
30642 |
|
30643 |
|
30644 |
|
30645 | if (currentComposition) {
|
30646 | if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
|
30647 | var chars = currentComposition.getData();
|
30648 | FallbackCompositionState.release(currentComposition);
|
30649 | currentComposition = null;
|
30650 | return chars;
|
30651 | }
|
30652 | return null;
|
30653 | }
|
30654 |
|
30655 | switch (topLevelType) {
|
30656 | case 'topPaste':
|
30657 |
|
30658 |
|
30659 | return null;
|
30660 | case 'topKeyPress':
|
30661 | |
30662 |
|
30663 |
|
30664 |
|
30665 |
|
30666 |
|
30667 |
|
30668 |
|
30669 |
|
30670 |
|
30671 |
|
30672 |
|
30673 |
|
30674 |
|
30675 |
|
30676 |
|
30677 | if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
|
30678 | return String.fromCharCode(nativeEvent.which);
|
30679 | }
|
30680 | return null;
|
30681 | case 'topCompositionEnd':
|
30682 | return useFallbackCompositionData ? null : nativeEvent.data;
|
30683 | default:
|
30684 | return null;
|
30685 | }
|
30686 | }
|
30687 |
|
30688 |
|
30689 |
|
30690 |
|
30691 |
|
30692 |
|
30693 |
|
30694 | function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
30695 | var chars;
|
30696 |
|
30697 | if (canUseTextInputEvent) {
|
30698 | chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
|
30699 | } else {
|
30700 | chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
|
30701 | }
|
30702 |
|
30703 |
|
30704 |
|
30705 | if (!chars) {
|
30706 | return null;
|
30707 | }
|
30708 |
|
30709 | var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
|
30710 |
|
30711 | event.data = chars;
|
30712 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
30713 | return event;
|
30714 | }
|
30715 |
|
30716 |
|
30717 |
|
30718 |
|
30719 |
|
30720 |
|
30721 |
|
30722 |
|
30723 |
|
30724 |
|
30725 |
|
30726 |
|
30727 |
|
30728 |
|
30729 |
|
30730 |
|
30731 |
|
30732 |
|
30733 |
|
30734 | var BeforeInputEventPlugin = {
|
30735 | eventTypes: eventTypes,
|
30736 |
|
30737 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
30738 | return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];
|
30739 | }
|
30740 | };
|
30741 |
|
30742 | module.exports = BeforeInputEventPlugin;
|
30743 |
|
30744 | }),
|
30745 |
|
30746 | (function(module, exports, __webpack_require__) {
|
30747 |
|
30748 | "use strict";
|
30749 |
|
30750 |
|
30751 |
|
30752 |
|
30753 |
|
30754 |
|
30755 |
|
30756 |
|
30757 |
|
30758 |
|
30759 |
|
30760 |
|
30761 | var _assign = __webpack_require__(4);
|
30762 |
|
30763 | var PooledClass = __webpack_require__(16);
|
30764 |
|
30765 | var getTextContentAccessor = __webpack_require__(67);
|
30766 |
|
30767 |
|
30768 |
|
30769 |
|
30770 |
|
30771 |
|
30772 |
|
30773 |
|
30774 |
|
30775 |
|
30776 |
|
30777 |
|
30778 | function FallbackCompositionState(root) {
|
30779 | this._root = root;
|
30780 | this._startText = this.getText();
|
30781 | this._fallbackText = null;
|
30782 | }
|
30783 |
|
30784 | _assign(FallbackCompositionState.prototype, {
|
30785 | destructor: function () {
|
30786 | this._root = null;
|
30787 | this._startText = null;
|
30788 | this._fallbackText = null;
|
30789 | },
|
30790 |
|
30791 | |
30792 |
|
30793 |
|
30794 |
|
30795 |
|
30796 | getText: function () {
|
30797 | if ('value' in this._root) {
|
30798 | return this._root.value;
|
30799 | }
|
30800 | return this._root[getTextContentAccessor()];
|
30801 | },
|
30802 |
|
30803 | |
30804 |
|
30805 |
|
30806 |
|
30807 |
|
30808 |
|
30809 | getData: function () {
|
30810 | if (this._fallbackText) {
|
30811 | return this._fallbackText;
|
30812 | }
|
30813 |
|
30814 | var start;
|
30815 | var startValue = this._startText;
|
30816 | var startLength = startValue.length;
|
30817 | var end;
|
30818 | var endValue = this.getText();
|
30819 | var endLength = endValue.length;
|
30820 |
|
30821 | for (start = 0; start < startLength; start++) {
|
30822 | if (startValue[start] !== endValue[start]) {
|
30823 | break;
|
30824 | }
|
30825 | }
|
30826 |
|
30827 | var minEnd = startLength - start;
|
30828 | for (end = 1; end <= minEnd; end++) {
|
30829 | if (startValue[startLength - end] !== endValue[endLength - end]) {
|
30830 | break;
|
30831 | }
|
30832 | }
|
30833 |
|
30834 | var sliceTail = end > 1 ? 1 - end : undefined;
|
30835 | this._fallbackText = endValue.slice(start, sliceTail);
|
30836 | return this._fallbackText;
|
30837 | }
|
30838 | });
|
30839 |
|
30840 | PooledClass.addPoolingTo(FallbackCompositionState);
|
30841 |
|
30842 | module.exports = FallbackCompositionState;
|
30843 |
|
30844 | }),
|
30845 |
|
30846 | (function(module, exports, __webpack_require__) {
|
30847 |
|
30848 | "use strict";
|
30849 |
|
30850 |
|
30851 |
|
30852 |
|
30853 |
|
30854 |
|
30855 |
|
30856 |
|
30857 |
|
30858 |
|
30859 |
|
30860 |
|
30861 | var SyntheticEvent = __webpack_require__(12);
|
30862 |
|
30863 |
|
30864 |
|
30865 |
|
30866 |
|
30867 | var CompositionEventInterface = {
|
30868 | data: null
|
30869 | };
|
30870 |
|
30871 |
|
30872 |
|
30873 |
|
30874 |
|
30875 |
|
30876 |
|
30877 | function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
30878 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
30879 | }
|
30880 |
|
30881 | SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);
|
30882 |
|
30883 | module.exports = SyntheticCompositionEvent;
|
30884 |
|
30885 | }),
|
30886 |
|
30887 | (function(module, exports, __webpack_require__) {
|
30888 |
|
30889 | "use strict";
|
30890 |
|
30891 |
|
30892 |
|
30893 |
|
30894 |
|
30895 |
|
30896 |
|
30897 |
|
30898 |
|
30899 |
|
30900 |
|
30901 |
|
30902 | var SyntheticEvent = __webpack_require__(12);
|
30903 |
|
30904 |
|
30905 |
|
30906 |
|
30907 |
|
30908 |
|
30909 | var InputEventInterface = {
|
30910 | data: null
|
30911 | };
|
30912 |
|
30913 |
|
30914 |
|
30915 |
|
30916 |
|
30917 |
|
30918 |
|
30919 | function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
30920 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
30921 | }
|
30922 |
|
30923 | SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);
|
30924 |
|
30925 | module.exports = SyntheticInputEvent;
|
30926 |
|
30927 | }),
|
30928 |
|
30929 | (function(module, exports, __webpack_require__) {
|
30930 |
|
30931 | "use strict";
|
30932 |
|
30933 |
|
30934 |
|
30935 |
|
30936 |
|
30937 |
|
30938 |
|
30939 |
|
30940 |
|
30941 |
|
30942 |
|
30943 |
|
30944 | var EventPluginHub = __webpack_require__(22);
|
30945 | var EventPropagators = __webpack_require__(21);
|
30946 | var ExecutionEnvironment = __webpack_require__(6);
|
30947 | var ReactDOMComponentTree = __webpack_require__(5);
|
30948 | var ReactUpdates = __webpack_require__(11);
|
30949 | var SyntheticEvent = __webpack_require__(12);
|
30950 |
|
30951 | var inputValueTracking = __webpack_require__(70);
|
30952 | var getEventTarget = __webpack_require__(40);
|
30953 | var isEventSupported = __webpack_require__(41);
|
30954 | var isTextInputElement = __webpack_require__(71);
|
30955 |
|
30956 | var eventTypes = {
|
30957 | change: {
|
30958 | phasedRegistrationNames: {
|
30959 | bubbled: 'onChange',
|
30960 | captured: 'onChangeCapture'
|
30961 | },
|
30962 | dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']
|
30963 | }
|
30964 | };
|
30965 |
|
30966 | function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
|
30967 | var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, target);
|
30968 | event.type = 'change';
|
30969 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
30970 | return event;
|
30971 | }
|
30972 |
|
30973 |
|
30974 |
|
30975 | var activeElement = null;
|
30976 | var activeElementInst = null;
|
30977 |
|
30978 |
|
30979 |
|
30980 |
|
30981 | function shouldUseChangeEvent(elem) {
|
30982 | var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
|
30983 | return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
|
30984 | }
|
30985 |
|
30986 | var doesChangeEventBubble = false;
|
30987 | if (ExecutionEnvironment.canUseDOM) {
|
30988 |
|
30989 | doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
|
30990 | }
|
30991 |
|
30992 | function manualDispatchChangeEvent(nativeEvent) {
|
30993 | var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));
|
30994 |
|
30995 |
|
30996 |
|
30997 |
|
30998 |
|
30999 |
|
31000 |
|
31001 |
|
31002 |
|
31003 |
|
31004 |
|
31005 |
|
31006 | ReactUpdates.batchedUpdates(runEventInBatch, event);
|
31007 | }
|
31008 |
|
31009 | function runEventInBatch(event) {
|
31010 | EventPluginHub.enqueueEvents(event);
|
31011 | EventPluginHub.processEventQueue(false);
|
31012 | }
|
31013 |
|
31014 | function startWatchingForChangeEventIE8(target, targetInst) {
|
31015 | activeElement = target;
|
31016 | activeElementInst = targetInst;
|
31017 | activeElement.attachEvent('onchange', manualDispatchChangeEvent);
|
31018 | }
|
31019 |
|
31020 | function stopWatchingForChangeEventIE8() {
|
31021 | if (!activeElement) {
|
31022 | return;
|
31023 | }
|
31024 | activeElement.detachEvent('onchange', manualDispatchChangeEvent);
|
31025 | activeElement = null;
|
31026 | activeElementInst = null;
|
31027 | }
|
31028 |
|
31029 | function getInstIfValueChanged(targetInst, nativeEvent) {
|
31030 | var updated = inputValueTracking.updateValueIfChanged(targetInst);
|
31031 | var simulated = nativeEvent.simulated === true && ChangeEventPlugin._allowSimulatedPassThrough;
|
31032 |
|
31033 | if (updated || simulated) {
|
31034 | return targetInst;
|
31035 | }
|
31036 | }
|
31037 |
|
31038 | function getTargetInstForChangeEvent(topLevelType, targetInst) {
|
31039 | if (topLevelType === 'topChange') {
|
31040 | return targetInst;
|
31041 | }
|
31042 | }
|
31043 |
|
31044 | function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
|
31045 | if (topLevelType === 'topFocus') {
|
31046 |
|
31047 |
|
31048 | stopWatchingForChangeEventIE8();
|
31049 | startWatchingForChangeEventIE8(target, targetInst);
|
31050 | } else if (topLevelType === 'topBlur') {
|
31051 | stopWatchingForChangeEventIE8();
|
31052 | }
|
31053 | }
|
31054 |
|
31055 |
|
31056 |
|
31057 |
|
31058 | var isInputEventSupported = false;
|
31059 | if (ExecutionEnvironment.canUseDOM) {
|
31060 |
|
31061 |
|
31062 |
|
31063 | isInputEventSupported = isEventSupported('input') && (!('documentMode' in document) || document.documentMode > 9);
|
31064 | }
|
31065 |
|
31066 |
|
31067 |
|
31068 |
|
31069 |
|
31070 |
|
31071 | function startWatchingForValueChange(target, targetInst) {
|
31072 | activeElement = target;
|
31073 | activeElementInst = targetInst;
|
31074 | activeElement.attachEvent('onpropertychange', handlePropertyChange);
|
31075 | }
|
31076 |
|
31077 |
|
31078 |
|
31079 |
|
31080 |
|
31081 | function stopWatchingForValueChange() {
|
31082 | if (!activeElement) {
|
31083 | return;
|
31084 | }
|
31085 | activeElement.detachEvent('onpropertychange', handlePropertyChange);
|
31086 |
|
31087 | activeElement = null;
|
31088 | activeElementInst = null;
|
31089 | }
|
31090 |
|
31091 |
|
31092 |
|
31093 |
|
31094 |
|
31095 | function handlePropertyChange(nativeEvent) {
|
31096 | if (nativeEvent.propertyName !== 'value') {
|
31097 | return;
|
31098 | }
|
31099 | if (getInstIfValueChanged(activeElementInst, nativeEvent)) {
|
31100 | manualDispatchChangeEvent(nativeEvent);
|
31101 | }
|
31102 | }
|
31103 |
|
31104 | function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
|
31105 | if (topLevelType === 'topFocus') {
|
31106 |
|
31107 |
|
31108 |
|
31109 |
|
31110 |
|
31111 |
|
31112 |
|
31113 |
|
31114 |
|
31115 |
|
31116 |
|
31117 |
|
31118 |
|
31119 | stopWatchingForValueChange();
|
31120 | startWatchingForValueChange(target, targetInst);
|
31121 | } else if (topLevelType === 'topBlur') {
|
31122 | stopWatchingForValueChange();
|
31123 | }
|
31124 | }
|
31125 |
|
31126 |
|
31127 | function getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEvent) {
|
31128 | if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {
|
31129 |
|
31130 |
|
31131 |
|
31132 |
|
31133 |
|
31134 |
|
31135 |
|
31136 |
|
31137 |
|
31138 |
|
31139 | return getInstIfValueChanged(activeElementInst, nativeEvent);
|
31140 | }
|
31141 | }
|
31142 |
|
31143 |
|
31144 |
|
31145 |
|
31146 | function shouldUseClickEvent(elem) {
|
31147 |
|
31148 |
|
31149 |
|
31150 | var nodeName = elem.nodeName;
|
31151 | return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
|
31152 | }
|
31153 |
|
31154 | function getTargetInstForClickEvent(topLevelType, targetInst, nativeEvent) {
|
31155 | if (topLevelType === 'topClick') {
|
31156 | return getInstIfValueChanged(targetInst, nativeEvent);
|
31157 | }
|
31158 | }
|
31159 |
|
31160 | function getTargetInstForInputOrChangeEvent(topLevelType, targetInst, nativeEvent) {
|
31161 | if (topLevelType === 'topInput' || topLevelType === 'topChange') {
|
31162 | return getInstIfValueChanged(targetInst, nativeEvent);
|
31163 | }
|
31164 | }
|
31165 |
|
31166 | function handleControlledInputBlur(inst, node) {
|
31167 |
|
31168 | if (inst == null) {
|
31169 | return;
|
31170 | }
|
31171 |
|
31172 |
|
31173 | var state = inst._wrapperState || node._wrapperState;
|
31174 |
|
31175 | if (!state || !state.controlled || node.type !== 'number') {
|
31176 | return;
|
31177 | }
|
31178 |
|
31179 |
|
31180 | var value = '' + node.value;
|
31181 | if (node.getAttribute('value') !== value) {
|
31182 | node.setAttribute('value', value);
|
31183 | }
|
31184 | }
|
31185 |
|
31186 |
|
31187 |
|
31188 |
|
31189 |
|
31190 |
|
31191 |
|
31192 |
|
31193 |
|
31194 |
|
31195 |
|
31196 | var ChangeEventPlugin = {
|
31197 | eventTypes: eventTypes,
|
31198 |
|
31199 | _allowSimulatedPassThrough: true,
|
31200 | _isInputEventSupported: isInputEventSupported,
|
31201 |
|
31202 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
31203 | var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
|
31204 |
|
31205 | var getTargetInstFunc, handleEventFunc;
|
31206 | if (shouldUseChangeEvent(targetNode)) {
|
31207 | if (doesChangeEventBubble) {
|
31208 | getTargetInstFunc = getTargetInstForChangeEvent;
|
31209 | } else {
|
31210 | handleEventFunc = handleEventsForChangeEventIE8;
|
31211 | }
|
31212 | } else if (isTextInputElement(targetNode)) {
|
31213 | if (isInputEventSupported) {
|
31214 | getTargetInstFunc = getTargetInstForInputOrChangeEvent;
|
31215 | } else {
|
31216 | getTargetInstFunc = getTargetInstForInputEventPolyfill;
|
31217 | handleEventFunc = handleEventsForInputEventPolyfill;
|
31218 | }
|
31219 | } else if (shouldUseClickEvent(targetNode)) {
|
31220 | getTargetInstFunc = getTargetInstForClickEvent;
|
31221 | }
|
31222 |
|
31223 | if (getTargetInstFunc) {
|
31224 | var inst = getTargetInstFunc(topLevelType, targetInst, nativeEvent);
|
31225 | if (inst) {
|
31226 | var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
|
31227 | return event;
|
31228 | }
|
31229 | }
|
31230 |
|
31231 | if (handleEventFunc) {
|
31232 | handleEventFunc(topLevelType, targetNode, targetInst);
|
31233 | }
|
31234 |
|
31235 |
|
31236 | if (topLevelType === 'topBlur') {
|
31237 | handleControlledInputBlur(targetInst, targetNode);
|
31238 | }
|
31239 | }
|
31240 | };
|
31241 |
|
31242 | module.exports = ChangeEventPlugin;
|
31243 |
|
31244 | }),
|
31245 |
|
31246 | (function(module, exports, __webpack_require__) {
|
31247 |
|
31248 | "use strict";
|
31249 |
|
31250 |
|
31251 |
|
31252 |
|
31253 |
|
31254 |
|
31255 |
|
31256 |
|
31257 |
|
31258 |
|
31259 |
|
31260 |
|
31261 |
|
31262 | var ReactOwner = __webpack_require__(115);
|
31263 |
|
31264 | var ReactRef = {};
|
31265 |
|
31266 | function attachRef(ref, component, owner) {
|
31267 | if (typeof ref === 'function') {
|
31268 | ref(component.getPublicInstance());
|
31269 | } else {
|
31270 |
|
31271 | ReactOwner.addComponentAsRefTo(component, ref, owner);
|
31272 | }
|
31273 | }
|
31274 |
|
31275 | function detachRef(ref, component, owner) {
|
31276 | if (typeof ref === 'function') {
|
31277 | ref(null);
|
31278 | } else {
|
31279 |
|
31280 | ReactOwner.removeComponentAsRefFrom(component, ref, owner);
|
31281 | }
|
31282 | }
|
31283 |
|
31284 | ReactRef.attachRefs = function (instance, element) {
|
31285 | if (element === null || typeof element !== 'object') {
|
31286 | return;
|
31287 | }
|
31288 | var ref = element.ref;
|
31289 | if (ref != null) {
|
31290 | attachRef(ref, instance, element._owner);
|
31291 | }
|
31292 | };
|
31293 |
|
31294 | ReactRef.shouldUpdateRefs = function (prevElement, nextElement) {
|
31295 |
|
31296 |
|
31297 |
|
31298 |
|
31299 |
|
31300 |
|
31301 |
|
31302 |
|
31303 |
|
31304 |
|
31305 |
|
31306 |
|
31307 | var prevRef = null;
|
31308 | var prevOwner = null;
|
31309 | if (prevElement !== null && typeof prevElement === 'object') {
|
31310 | prevRef = prevElement.ref;
|
31311 | prevOwner = prevElement._owner;
|
31312 | }
|
31313 |
|
31314 | var nextRef = null;
|
31315 | var nextOwner = null;
|
31316 | if (nextElement !== null && typeof nextElement === 'object') {
|
31317 | nextRef = nextElement.ref;
|
31318 | nextOwner = nextElement._owner;
|
31319 | }
|
31320 |
|
31321 | return prevRef !== nextRef ||
|
31322 |
|
31323 | typeof nextRef === 'string' && nextOwner !== prevOwner;
|
31324 | };
|
31325 |
|
31326 | ReactRef.detachRefs = function (instance, element) {
|
31327 | if (element === null || typeof element !== 'object') {
|
31328 | return;
|
31329 | }
|
31330 | var ref = element.ref;
|
31331 | if (ref != null) {
|
31332 | detachRef(ref, instance, element._owner);
|
31333 | }
|
31334 | };
|
31335 |
|
31336 | module.exports = ReactRef;
|
31337 |
|
31338 | }),
|
31339 |
|
31340 | (function(module, exports, __webpack_require__) {
|
31341 |
|
31342 | "use strict";
|
31343 | (function(process) { |
31344 |
|
31345 |
|
31346 |
|
31347 |
|
31348 |
|
31349 |
|
31350 |
|
31351 |
|
31352 |
|
31353 |
|
31354 |
|
31355 |
|
31356 | var _prodInvariant = __webpack_require__(3);
|
31357 |
|
31358 | var invariant = __webpack_require__(1);
|
31359 |
|
31360 |
|
31361 |
|
31362 |
|
31363 |
|
31364 |
|
31365 | function isValidOwner(object) {
|
31366 | return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');
|
31367 | }
|
31368 |
|
31369 |
|
31370 |
|
31371 |
|
31372 |
|
31373 |
|
31374 |
|
31375 |
|
31376 |
|
31377 |
|
31378 |
|
31379 |
|
31380 |
|
31381 |
|
31382 |
|
31383 |
|
31384 |
|
31385 |
|
31386 |
|
31387 |
|
31388 |
|
31389 |
|
31390 |
|
31391 |
|
31392 |
|
31393 |
|
31394 |
|
31395 |
|
31396 |
|
31397 |
|
31398 |
|
31399 | var ReactOwner = {
|
31400 | |
31401 |
|
31402 |
|
31403 |
|
31404 |
|
31405 |
|
31406 |
|
31407 |
|
31408 |
|
31409 | addComponentAsRefTo: function (component, ref, owner) {
|
31410 | !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0;
|
31411 | owner.attachRef(ref, component);
|
31412 | },
|
31413 |
|
31414 | |
31415 |
|
31416 |
|
31417 |
|
31418 |
|
31419 |
|
31420 |
|
31421 |
|
31422 |
|
31423 | removeComponentAsRefFrom: function (component, ref, owner) {
|
31424 | !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0;
|
31425 | var ownerPublicInstance = owner.getPublicInstance();
|
31426 |
|
31427 |
|
31428 | if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) {
|
31429 | owner.detachRef(ref);
|
31430 | }
|
31431 | }
|
31432 | };
|
31433 |
|
31434 | module.exports = ReactOwner;
|
31435 | }.call(exports, __webpack_require__(0)))
|
31436 |
|
31437 | }),
|
31438 |
|
31439 | (function(module, exports, __webpack_require__) {
|
31440 |
|
31441 | "use strict";
|
31442 | (function(process) { |
31443 |
|
31444 |
|
31445 |
|
31446 |
|
31447 |
|
31448 |
|
31449 |
|
31450 |
|
31451 |
|
31452 |
|
31453 |
|
31454 |
|
31455 | var ReactInvalidSetStateWarningHook = __webpack_require__(117);
|
31456 | var ReactHostOperationHistoryHook = __webpack_require__(118);
|
31457 | var ReactComponentTreeHook = __webpack_require__(7);
|
31458 | var ExecutionEnvironment = __webpack_require__(6);
|
31459 |
|
31460 | var performanceNow = __webpack_require__(119);
|
31461 | var warning = __webpack_require__(2);
|
31462 |
|
31463 | var hooks = [];
|
31464 | var didHookThrowForEvent = {};
|
31465 |
|
31466 | function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
|
31467 | try {
|
31468 | fn.call(context, arg1, arg2, arg3, arg4, arg5);
|
31469 | } catch (e) {
|
31470 | process.env.NODE_ENV !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0;
|
31471 | didHookThrowForEvent[event] = true;
|
31472 | }
|
31473 | }
|
31474 |
|
31475 | function emitEvent(event, arg1, arg2, arg3, arg4, arg5) {
|
31476 | for (var i = 0; i < hooks.length; i++) {
|
31477 | var hook = hooks[i];
|
31478 | var fn = hook[event];
|
31479 | if (fn) {
|
31480 | callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
|
31481 | }
|
31482 | }
|
31483 | }
|
31484 |
|
31485 | var isProfiling = false;
|
31486 | var flushHistory = [];
|
31487 | var lifeCycleTimerStack = [];
|
31488 | var currentFlushNesting = 0;
|
31489 | var currentFlushMeasurements = [];
|
31490 | var currentFlushStartTime = 0;
|
31491 | var currentTimerDebugID = null;
|
31492 | var currentTimerStartTime = 0;
|
31493 | var currentTimerNestedFlushDuration = 0;
|
31494 | var currentTimerType = null;
|
31495 |
|
31496 | var lifeCycleTimerHasWarned = false;
|
31497 |
|
31498 | function clearHistory() {
|
31499 | ReactComponentTreeHook.purgeUnmountedComponents();
|
31500 | ReactHostOperationHistoryHook.clearHistory();
|
31501 | }
|
31502 |
|
31503 | function getTreeSnapshot(registeredIDs) {
|
31504 | return registeredIDs.reduce(function (tree, id) {
|
31505 | var ownerID = ReactComponentTreeHook.getOwnerID(id);
|
31506 | var parentID = ReactComponentTreeHook.getParentID(id);
|
31507 | tree[id] = {
|
31508 | displayName: ReactComponentTreeHook.getDisplayName(id),
|
31509 | text: ReactComponentTreeHook.getText(id),
|
31510 | updateCount: ReactComponentTreeHook.getUpdateCount(id),
|
31511 | childIDs: ReactComponentTreeHook.getChildIDs(id),
|
31512 |
|
31513 | ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0,
|
31514 | parentID: parentID
|
31515 | };
|
31516 | return tree;
|
31517 | }, {});
|
31518 | }
|
31519 |
|
31520 | function resetMeasurements() {
|
31521 | var previousStartTime = currentFlushStartTime;
|
31522 | var previousMeasurements = currentFlushMeasurements;
|
31523 | var previousOperations = ReactHostOperationHistoryHook.getHistory();
|
31524 |
|
31525 | if (currentFlushNesting === 0) {
|
31526 | currentFlushStartTime = 0;
|
31527 | currentFlushMeasurements = [];
|
31528 | clearHistory();
|
31529 | return;
|
31530 | }
|
31531 |
|
31532 | if (previousMeasurements.length || previousOperations.length) {
|
31533 | var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
|
31534 | flushHistory.push({
|
31535 | duration: performanceNow() - previousStartTime,
|
31536 | measurements: previousMeasurements || [],
|
31537 | operations: previousOperations || [],
|
31538 | treeSnapshot: getTreeSnapshot(registeredIDs)
|
31539 | });
|
31540 | }
|
31541 |
|
31542 | clearHistory();
|
31543 | currentFlushStartTime = performanceNow();
|
31544 | currentFlushMeasurements = [];
|
31545 | }
|
31546 |
|
31547 | function checkDebugID(debugID) {
|
31548 | var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
31549 |
|
31550 | if (allowRoot && debugID === 0) {
|
31551 | return;
|
31552 | }
|
31553 | if (!debugID) {
|
31554 | process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0;
|
31555 | }
|
31556 | }
|
31557 |
|
31558 | function beginLifeCycleTimer(debugID, timerType) {
|
31559 | if (currentFlushNesting === 0) {
|
31560 | return;
|
31561 | }
|
31562 | if (currentTimerType && !lifeCycleTimerHasWarned) {
|
31563 | process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
|
31564 | lifeCycleTimerHasWarned = true;
|
31565 | }
|
31566 | currentTimerStartTime = performanceNow();
|
31567 | currentTimerNestedFlushDuration = 0;
|
31568 | currentTimerDebugID = debugID;
|
31569 | currentTimerType = timerType;
|
31570 | }
|
31571 |
|
31572 | function endLifeCycleTimer(debugID, timerType) {
|
31573 | if (currentFlushNesting === 0) {
|
31574 | return;
|
31575 | }
|
31576 | if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) {
|
31577 | process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
|
31578 | lifeCycleTimerHasWarned = true;
|
31579 | }
|
31580 | if (isProfiling) {
|
31581 | currentFlushMeasurements.push({
|
31582 | timerType: timerType,
|
31583 | instanceID: debugID,
|
31584 | duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration
|
31585 | });
|
31586 | }
|
31587 | currentTimerStartTime = 0;
|
31588 | currentTimerNestedFlushDuration = 0;
|
31589 | currentTimerDebugID = null;
|
31590 | currentTimerType = null;
|
31591 | }
|
31592 |
|
31593 | function pauseCurrentLifeCycleTimer() {
|
31594 | var currentTimer = {
|
31595 | startTime: currentTimerStartTime,
|
31596 | nestedFlushStartTime: performanceNow(),
|
31597 | debugID: currentTimerDebugID,
|
31598 | timerType: currentTimerType
|
31599 | };
|
31600 | lifeCycleTimerStack.push(currentTimer);
|
31601 | currentTimerStartTime = 0;
|
31602 | currentTimerNestedFlushDuration = 0;
|
31603 | currentTimerDebugID = null;
|
31604 | currentTimerType = null;
|
31605 | }
|
31606 |
|
31607 | function resumeCurrentLifeCycleTimer() {
|
31608 | var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(),
|
31609 | startTime = _lifeCycleTimerStack$.startTime,
|
31610 | nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime,
|
31611 | debugID = _lifeCycleTimerStack$.debugID,
|
31612 | timerType = _lifeCycleTimerStack$.timerType;
|
31613 |
|
31614 | var nestedFlushDuration = performanceNow() - nestedFlushStartTime;
|
31615 | currentTimerStartTime = startTime;
|
31616 | currentTimerNestedFlushDuration += nestedFlushDuration;
|
31617 | currentTimerDebugID = debugID;
|
31618 | currentTimerType = timerType;
|
31619 | }
|
31620 |
|
31621 | var lastMarkTimeStamp = 0;
|
31622 | var canUsePerformanceMeasure = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';
|
31623 |
|
31624 | function shouldMark(debugID) {
|
31625 | if (!isProfiling || !canUsePerformanceMeasure) {
|
31626 | return false;
|
31627 | }
|
31628 | var element = ReactComponentTreeHook.getElement(debugID);
|
31629 | if (element == null || typeof element !== 'object') {
|
31630 | return false;
|
31631 | }
|
31632 | var isHostElement = typeof element.type === 'string';
|
31633 | if (isHostElement) {
|
31634 | return false;
|
31635 | }
|
31636 | return true;
|
31637 | }
|
31638 |
|
31639 | function markBegin(debugID, markType) {
|
31640 | if (!shouldMark(debugID)) {
|
31641 | return;
|
31642 | }
|
31643 |
|
31644 | var markName = debugID + '::' + markType;
|
31645 | lastMarkTimeStamp = performanceNow();
|
31646 | performance.mark(markName);
|
31647 | }
|
31648 |
|
31649 | function markEnd(debugID, markType) {
|
31650 | if (!shouldMark(debugID)) {
|
31651 | return;
|
31652 | }
|
31653 |
|
31654 | var markName = debugID + '::' + markType;
|
31655 | var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown';
|
31656 |
|
31657 |
|
31658 |
|
31659 |
|
31660 |
|
31661 |
|
31662 |
|
31663 | var timeStamp = performanceNow();
|
31664 | if (timeStamp - lastMarkTimeStamp > 0.1) {
|
31665 | var measurementName = displayName + ' [' + markType + ']';
|
31666 | performance.measure(measurementName, markName);
|
31667 | }
|
31668 |
|
31669 | performance.clearMarks(markName);
|
31670 | if (measurementName) {
|
31671 | performance.clearMeasures(measurementName);
|
31672 | }
|
31673 | }
|
31674 |
|
31675 | var ReactDebugTool = {
|
31676 | addHook: function (hook) {
|
31677 | hooks.push(hook);
|
31678 | },
|
31679 | removeHook: function (hook) {
|
31680 | for (var i = 0; i < hooks.length; i++) {
|
31681 | if (hooks[i] === hook) {
|
31682 | hooks.splice(i, 1);
|
31683 | i--;
|
31684 | }
|
31685 | }
|
31686 | },
|
31687 | isProfiling: function () {
|
31688 | return isProfiling;
|
31689 | },
|
31690 | beginProfiling: function () {
|
31691 | if (isProfiling) {
|
31692 | return;
|
31693 | }
|
31694 |
|
31695 | isProfiling = true;
|
31696 | flushHistory.length = 0;
|
31697 | resetMeasurements();
|
31698 | ReactDebugTool.addHook(ReactHostOperationHistoryHook);
|
31699 | },
|
31700 | endProfiling: function () {
|
31701 | if (!isProfiling) {
|
31702 | return;
|
31703 | }
|
31704 |
|
31705 | isProfiling = false;
|
31706 | resetMeasurements();
|
31707 | ReactDebugTool.removeHook(ReactHostOperationHistoryHook);
|
31708 | },
|
31709 | getFlushHistory: function () {
|
31710 | return flushHistory;
|
31711 | },
|
31712 | onBeginFlush: function () {
|
31713 | currentFlushNesting++;
|
31714 | resetMeasurements();
|
31715 | pauseCurrentLifeCycleTimer();
|
31716 | emitEvent('onBeginFlush');
|
31717 | },
|
31718 | onEndFlush: function () {
|
31719 | resetMeasurements();
|
31720 | currentFlushNesting--;
|
31721 | resumeCurrentLifeCycleTimer();
|
31722 | emitEvent('onEndFlush');
|
31723 | },
|
31724 | onBeginLifeCycleTimer: function (debugID, timerType) {
|
31725 | checkDebugID(debugID);
|
31726 | emitEvent('onBeginLifeCycleTimer', debugID, timerType);
|
31727 | markBegin(debugID, timerType);
|
31728 | beginLifeCycleTimer(debugID, timerType);
|
31729 | },
|
31730 | onEndLifeCycleTimer: function (debugID, timerType) {
|
31731 | checkDebugID(debugID);
|
31732 | endLifeCycleTimer(debugID, timerType);
|
31733 | markEnd(debugID, timerType);
|
31734 | emitEvent('onEndLifeCycleTimer', debugID, timerType);
|
31735 | },
|
31736 | onBeginProcessingChildContext: function () {
|
31737 | emitEvent('onBeginProcessingChildContext');
|
31738 | },
|
31739 | onEndProcessingChildContext: function () {
|
31740 | emitEvent('onEndProcessingChildContext');
|
31741 | },
|
31742 | onHostOperation: function (operation) {
|
31743 | checkDebugID(operation.instanceID);
|
31744 | emitEvent('onHostOperation', operation);
|
31745 | },
|
31746 | onSetState: function () {
|
31747 | emitEvent('onSetState');
|
31748 | },
|
31749 | onSetChildren: function (debugID, childDebugIDs) {
|
31750 | checkDebugID(debugID);
|
31751 | childDebugIDs.forEach(checkDebugID);
|
31752 | emitEvent('onSetChildren', debugID, childDebugIDs);
|
31753 | },
|
31754 | onBeforeMountComponent: function (debugID, element, parentDebugID) {
|
31755 | checkDebugID(debugID);
|
31756 | checkDebugID(parentDebugID, true);
|
31757 | emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
|
31758 | markBegin(debugID, 'mount');
|
31759 | },
|
31760 | onMountComponent: function (debugID) {
|
31761 | checkDebugID(debugID);
|
31762 | markEnd(debugID, 'mount');
|
31763 | emitEvent('onMountComponent', debugID);
|
31764 | },
|
31765 | onBeforeUpdateComponent: function (debugID, element) {
|
31766 | checkDebugID(debugID);
|
31767 | emitEvent('onBeforeUpdateComponent', debugID, element);
|
31768 | markBegin(debugID, 'update');
|
31769 | },
|
31770 | onUpdateComponent: function (debugID) {
|
31771 | checkDebugID(debugID);
|
31772 | markEnd(debugID, 'update');
|
31773 | emitEvent('onUpdateComponent', debugID);
|
31774 | },
|
31775 | onBeforeUnmountComponent: function (debugID) {
|
31776 | checkDebugID(debugID);
|
31777 | emitEvent('onBeforeUnmountComponent', debugID);
|
31778 | markBegin(debugID, 'unmount');
|
31779 | },
|
31780 | onUnmountComponent: function (debugID) {
|
31781 | checkDebugID(debugID);
|
31782 | markEnd(debugID, 'unmount');
|
31783 | emitEvent('onUnmountComponent', debugID);
|
31784 | },
|
31785 | onTestEvent: function () {
|
31786 | emitEvent('onTestEvent');
|
31787 | }
|
31788 | };
|
31789 |
|
31790 |
|
31791 | ReactDebugTool.addDevtool = ReactDebugTool.addHook;
|
31792 | ReactDebugTool.removeDevtool = ReactDebugTool.removeHook;
|
31793 |
|
31794 | ReactDebugTool.addHook(ReactInvalidSetStateWarningHook);
|
31795 | ReactDebugTool.addHook(ReactComponentTreeHook);
|
31796 | var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
|
31797 | if (/[?&]react_perf\b/.test(url)) {
|
31798 | ReactDebugTool.beginProfiling();
|
31799 | }
|
31800 |
|
31801 | module.exports = ReactDebugTool;
|
31802 | }.call(exports, __webpack_require__(0)))
|
31803 |
|
31804 | }),
|
31805 |
|
31806 | (function(module, exports, __webpack_require__) {
|
31807 |
|
31808 | "use strict";
|
31809 | (function(process) { |
31810 |
|
31811 |
|
31812 |
|
31813 |
|
31814 |
|
31815 |
|
31816 |
|
31817 |
|
31818 |
|
31819 |
|
31820 |
|
31821 |
|
31822 | var warning = __webpack_require__(2);
|
31823 |
|
31824 | if (process.env.NODE_ENV !== 'production') {
|
31825 | var processingChildContext = false;
|
31826 |
|
31827 | var warnInvalidSetState = function () {
|
31828 | process.env.NODE_ENV !== 'production' ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0;
|
31829 | };
|
31830 | }
|
31831 |
|
31832 | var ReactInvalidSetStateWarningHook = {
|
31833 | onBeginProcessingChildContext: function () {
|
31834 | processingChildContext = true;
|
31835 | },
|
31836 | onEndProcessingChildContext: function () {
|
31837 | processingChildContext = false;
|
31838 | },
|
31839 | onSetState: function () {
|
31840 | warnInvalidSetState();
|
31841 | }
|
31842 | };
|
31843 |
|
31844 | module.exports = ReactInvalidSetStateWarningHook;
|
31845 | }.call(exports, __webpack_require__(0)))
|
31846 |
|
31847 | }),
|
31848 |
|
31849 | (function(module, exports, __webpack_require__) {
|
31850 |
|
31851 | "use strict";
|
31852 |
|
31853 |
|
31854 |
|
31855 |
|
31856 |
|
31857 |
|
31858 |
|
31859 |
|
31860 |
|
31861 |
|
31862 |
|
31863 |
|
31864 |
|
31865 | var history = [];
|
31866 |
|
31867 | var ReactHostOperationHistoryHook = {
|
31868 | onHostOperation: function (operation) {
|
31869 | history.push(operation);
|
31870 | },
|
31871 | clearHistory: function () {
|
31872 | if (ReactHostOperationHistoryHook._preventClearing) {
|
31873 |
|
31874 | return;
|
31875 | }
|
31876 |
|
31877 | history = [];
|
31878 | },
|
31879 | getHistory: function () {
|
31880 | return history;
|
31881 | }
|
31882 | };
|
31883 |
|
31884 | module.exports = ReactHostOperationHistoryHook;
|
31885 |
|
31886 | }),
|
31887 |
|
31888 | (function(module, exports, __webpack_require__) {
|
31889 |
|
31890 | "use strict";
|
31891 |
|
31892 |
|
31893 |
|
31894 |
|
31895 |
|
31896 |
|
31897 |
|
31898 |
|
31899 |
|
31900 |
|
31901 |
|
31902 |
|
31903 |
|
31904 | var performance = __webpack_require__(120);
|
31905 |
|
31906 | var performanceNow;
|
31907 |
|
31908 |
|
31909 |
|
31910 |
|
31911 |
|
31912 |
|
31913 | if (performance.now) {
|
31914 | performanceNow = function performanceNow() {
|
31915 | return performance.now();
|
31916 | };
|
31917 | } else {
|
31918 | performanceNow = function performanceNow() {
|
31919 | return Date.now();
|
31920 | };
|
31921 | }
|
31922 |
|
31923 | module.exports = performanceNow;
|
31924 |
|
31925 | }),
|
31926 |
|
31927 | (function(module, exports, __webpack_require__) {
|
31928 |
|
31929 | "use strict";
|
31930 |
|
31931 |
|
31932 |
|
31933 |
|
31934 |
|
31935 |
|
31936 |
|
31937 |
|
31938 |
|
31939 |
|
31940 |
|
31941 |
|
31942 |
|
31943 | var ExecutionEnvironment = __webpack_require__(6);
|
31944 |
|
31945 | var performance;
|
31946 |
|
31947 | if (ExecutionEnvironment.canUseDOM) {
|
31948 | performance = window.performance || window.msPerformance || window.webkitPerformance;
|
31949 | }
|
31950 |
|
31951 | module.exports = performance || {};
|
31952 |
|
31953 | }),
|
31954 |
|
31955 | (function(module, exports, __webpack_require__) {
|
31956 |
|
31957 | "use strict";
|
31958 |
|
31959 |
|
31960 |
|
31961 |
|
31962 |
|
31963 |
|
31964 |
|
31965 |
|
31966 |
|
31967 |
|
31968 |
|
31969 |
|
31970 |
|
31971 |
|
31972 |
|
31973 |
|
31974 |
|
31975 |
|
31976 |
|
31977 |
|
31978 |
|
31979 |
|
31980 | var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
|
31981 |
|
31982 | module.exports = DefaultEventPluginOrder;
|
31983 |
|
31984 | }),
|
31985 |
|
31986 | (function(module, exports, __webpack_require__) {
|
31987 |
|
31988 | "use strict";
|
31989 |
|
31990 |
|
31991 |
|
31992 |
|
31993 |
|
31994 |
|
31995 |
|
31996 |
|
31997 |
|
31998 |
|
31999 |
|
32000 |
|
32001 | var EventPropagators = __webpack_require__(21);
|
32002 | var ReactDOMComponentTree = __webpack_require__(5);
|
32003 | var SyntheticMouseEvent = __webpack_require__(30);
|
32004 |
|
32005 | var eventTypes = {
|
32006 | mouseEnter: {
|
32007 | registrationName: 'onMouseEnter',
|
32008 | dependencies: ['topMouseOut', 'topMouseOver']
|
32009 | },
|
32010 | mouseLeave: {
|
32011 | registrationName: 'onMouseLeave',
|
32012 | dependencies: ['topMouseOut', 'topMouseOver']
|
32013 | }
|
32014 | };
|
32015 |
|
32016 | var EnterLeaveEventPlugin = {
|
32017 | eventTypes: eventTypes,
|
32018 |
|
32019 | |
32020 |
|
32021 |
|
32022 |
|
32023 |
|
32024 |
|
32025 |
|
32026 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
32027 | if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
|
32028 | return null;
|
32029 | }
|
32030 | if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') {
|
32031 |
|
32032 | return null;
|
32033 | }
|
32034 |
|
32035 | var win;
|
32036 | if (nativeEventTarget.window === nativeEventTarget) {
|
32037 |
|
32038 | win = nativeEventTarget;
|
32039 | } else {
|
32040 |
|
32041 | var doc = nativeEventTarget.ownerDocument;
|
32042 | if (doc) {
|
32043 | win = doc.defaultView || doc.parentWindow;
|
32044 | } else {
|
32045 | win = window;
|
32046 | }
|
32047 | }
|
32048 |
|
32049 | var from;
|
32050 | var to;
|
32051 | if (topLevelType === 'topMouseOut') {
|
32052 | from = targetInst;
|
32053 | var related = nativeEvent.relatedTarget || nativeEvent.toElement;
|
32054 | to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;
|
32055 | } else {
|
32056 |
|
32057 | from = null;
|
32058 | to = targetInst;
|
32059 | }
|
32060 |
|
32061 | if (from === to) {
|
32062 |
|
32063 | return null;
|
32064 | }
|
32065 |
|
32066 | var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from);
|
32067 | var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to);
|
32068 |
|
32069 | var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);
|
32070 | leave.type = 'mouseleave';
|
32071 | leave.target = fromNode;
|
32072 | leave.relatedTarget = toNode;
|
32073 |
|
32074 | var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);
|
32075 | enter.type = 'mouseenter';
|
32076 | enter.target = toNode;
|
32077 | enter.relatedTarget = fromNode;
|
32078 |
|
32079 | EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to);
|
32080 |
|
32081 | return [leave, enter];
|
32082 | }
|
32083 | };
|
32084 |
|
32085 | module.exports = EnterLeaveEventPlugin;
|
32086 |
|
32087 | }),
|
32088 |
|
32089 | (function(module, exports, __webpack_require__) {
|
32090 |
|
32091 | "use strict";
|
32092 |
|
32093 |
|
32094 |
|
32095 |
|
32096 |
|
32097 |
|
32098 |
|
32099 |
|
32100 |
|
32101 |
|
32102 |
|
32103 |
|
32104 | var DOMProperty = __webpack_require__(13);
|
32105 |
|
32106 | var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
|
32107 | var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
|
32108 | var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
|
32109 | var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
|
32110 | var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
|
32111 |
|
32112 | var HTMLDOMPropertyConfig = {
|
32113 | isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
|
32114 | Properties: {
|
32115 | |
32116 |
|
32117 |
|
32118 | accept: 0,
|
32119 | acceptCharset: 0,
|
32120 | accessKey: 0,
|
32121 | action: 0,
|
32122 | allowFullScreen: HAS_BOOLEAN_VALUE,
|
32123 | allowTransparency: 0,
|
32124 | alt: 0,
|
32125 |
|
32126 | as: 0,
|
32127 | async: HAS_BOOLEAN_VALUE,
|
32128 | autoComplete: 0,
|
32129 |
|
32130 |
|
32131 | autoPlay: HAS_BOOLEAN_VALUE,
|
32132 | capture: HAS_BOOLEAN_VALUE,
|
32133 | cellPadding: 0,
|
32134 | cellSpacing: 0,
|
32135 | charSet: 0,
|
32136 | challenge: 0,
|
32137 | checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
32138 | cite: 0,
|
32139 | classID: 0,
|
32140 | className: 0,
|
32141 | cols: HAS_POSITIVE_NUMERIC_VALUE,
|
32142 | colSpan: 0,
|
32143 | content: 0,
|
32144 | contentEditable: 0,
|
32145 | contextMenu: 0,
|
32146 | controls: HAS_BOOLEAN_VALUE,
|
32147 | coords: 0,
|
32148 | crossOrigin: 0,
|
32149 | data: 0,
|
32150 | dateTime: 0,
|
32151 | 'default': HAS_BOOLEAN_VALUE,
|
32152 | defer: HAS_BOOLEAN_VALUE,
|
32153 | dir: 0,
|
32154 | disabled: HAS_BOOLEAN_VALUE,
|
32155 | download: HAS_OVERLOADED_BOOLEAN_VALUE,
|
32156 | draggable: 0,
|
32157 | encType: 0,
|
32158 | form: 0,
|
32159 | formAction: 0,
|
32160 | formEncType: 0,
|
32161 | formMethod: 0,
|
32162 | formNoValidate: HAS_BOOLEAN_VALUE,
|
32163 | formTarget: 0,
|
32164 | frameBorder: 0,
|
32165 | headers: 0,
|
32166 | height: 0,
|
32167 | hidden: HAS_BOOLEAN_VALUE,
|
32168 | high: 0,
|
32169 | href: 0,
|
32170 | hrefLang: 0,
|
32171 | htmlFor: 0,
|
32172 | httpEquiv: 0,
|
32173 | icon: 0,
|
32174 | id: 0,
|
32175 | inputMode: 0,
|
32176 | integrity: 0,
|
32177 | is: 0,
|
32178 | keyParams: 0,
|
32179 | keyType: 0,
|
32180 | kind: 0,
|
32181 | label: 0,
|
32182 | lang: 0,
|
32183 | list: 0,
|
32184 | loop: HAS_BOOLEAN_VALUE,
|
32185 | low: 0,
|
32186 | manifest: 0,
|
32187 | marginHeight: 0,
|
32188 | marginWidth: 0,
|
32189 | max: 0,
|
32190 | maxLength: 0,
|
32191 | media: 0,
|
32192 | mediaGroup: 0,
|
32193 | method: 0,
|
32194 | min: 0,
|
32195 | minLength: 0,
|
32196 |
|
32197 |
|
32198 | multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
32199 | muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
32200 | name: 0,
|
32201 | nonce: 0,
|
32202 | noValidate: HAS_BOOLEAN_VALUE,
|
32203 | open: HAS_BOOLEAN_VALUE,
|
32204 | optimum: 0,
|
32205 | pattern: 0,
|
32206 | placeholder: 0,
|
32207 | playsInline: HAS_BOOLEAN_VALUE,
|
32208 | poster: 0,
|
32209 | preload: 0,
|
32210 | profile: 0,
|
32211 | radioGroup: 0,
|
32212 | readOnly: HAS_BOOLEAN_VALUE,
|
32213 | referrerPolicy: 0,
|
32214 | rel: 0,
|
32215 | required: HAS_BOOLEAN_VALUE,
|
32216 | reversed: HAS_BOOLEAN_VALUE,
|
32217 | role: 0,
|
32218 | rows: HAS_POSITIVE_NUMERIC_VALUE,
|
32219 | rowSpan: HAS_NUMERIC_VALUE,
|
32220 | sandbox: 0,
|
32221 | scope: 0,
|
32222 | scoped: HAS_BOOLEAN_VALUE,
|
32223 | scrolling: 0,
|
32224 | seamless: HAS_BOOLEAN_VALUE,
|
32225 | selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
32226 | shape: 0,
|
32227 | size: HAS_POSITIVE_NUMERIC_VALUE,
|
32228 | sizes: 0,
|
32229 | span: HAS_POSITIVE_NUMERIC_VALUE,
|
32230 | spellCheck: 0,
|
32231 | src: 0,
|
32232 | srcDoc: 0,
|
32233 | srcLang: 0,
|
32234 | srcSet: 0,
|
32235 | start: HAS_NUMERIC_VALUE,
|
32236 | step: 0,
|
32237 | style: 0,
|
32238 | summary: 0,
|
32239 | tabIndex: 0,
|
32240 | target: 0,
|
32241 | title: 0,
|
32242 |
|
32243 | type: 0,
|
32244 | useMap: 0,
|
32245 | value: 0,
|
32246 | width: 0,
|
32247 | wmode: 0,
|
32248 | wrap: 0,
|
32249 |
|
32250 | |
32251 |
|
32252 |
|
32253 | about: 0,
|
32254 | datatype: 0,
|
32255 | inlist: 0,
|
32256 | prefix: 0,
|
32257 |
|
32258 | property: 0,
|
32259 | resource: 0,
|
32260 | 'typeof': 0,
|
32261 | vocab: 0,
|
32262 |
|
32263 | |
32264 |
|
32265 |
|
32266 |
|
32267 |
|
32268 | autoCapitalize: 0,
|
32269 | autoCorrect: 0,
|
32270 |
|
32271 | autoSave: 0,
|
32272 |
|
32273 | color: 0,
|
32274 |
|
32275 |
|
32276 | itemProp: 0,
|
32277 | itemScope: HAS_BOOLEAN_VALUE,
|
32278 | itemType: 0,
|
32279 |
|
32280 |
|
32281 |
|
32282 | itemID: 0,
|
32283 | itemRef: 0,
|
32284 |
|
32285 |
|
32286 | results: 0,
|
32287 |
|
32288 |
|
32289 | security: 0,
|
32290 |
|
32291 | unselectable: 0
|
32292 | },
|
32293 | DOMAttributeNames: {
|
32294 | acceptCharset: 'accept-charset',
|
32295 | className: 'class',
|
32296 | htmlFor: 'for',
|
32297 | httpEquiv: 'http-equiv'
|
32298 | },
|
32299 | DOMPropertyNames: {},
|
32300 | DOMMutationMethods: {
|
32301 | value: function (node, value) {
|
32302 | if (value == null) {
|
32303 | return node.removeAttribute('value');
|
32304 | }
|
32305 |
|
32306 |
|
32307 |
|
32308 |
|
32309 | if (node.type !== 'number' || node.hasAttribute('value') === false) {
|
32310 | node.setAttribute('value', '' + value);
|
32311 | } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) {
|
32312 |
|
32313 |
|
32314 |
|
32315 |
|
32316 |
|
32317 |
|
32318 |
|
32319 |
|
32320 | node.setAttribute('value', '' + value);
|
32321 | }
|
32322 | }
|
32323 | }
|
32324 | };
|
32325 |
|
32326 | module.exports = HTMLDOMPropertyConfig;
|
32327 |
|
32328 | }),
|
32329 |
|
32330 | (function(module, exports, __webpack_require__) {
|
32331 |
|
32332 | "use strict";
|
32333 |
|
32334 |
|
32335 |
|
32336 |
|
32337 |
|
32338 |
|
32339 |
|
32340 |
|
32341 |
|
32342 |
|
32343 |
|
32344 |
|
32345 | var DOMChildrenOperations = __webpack_require__(43);
|
32346 | var ReactDOMIDOperations = __webpack_require__(129);
|
32347 |
|
32348 |
|
32349 |
|
32350 |
|
32351 |
|
32352 |
|
32353 | var ReactComponentBrowserEnvironment = {
|
32354 | processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
|
32355 |
|
32356 | replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
|
32357 | };
|
32358 |
|
32359 | module.exports = ReactComponentBrowserEnvironment;
|
32360 |
|
32361 | }),
|
32362 |
|
32363 | (function(module, exports, __webpack_require__) {
|
32364 |
|
32365 | "use strict";
|
32366 | (function(process) { |
32367 |
|
32368 |
|
32369 |
|
32370 |
|
32371 |
|
32372 |
|
32373 |
|
32374 |
|
32375 |
|
32376 |
|
32377 |
|
32378 | var _prodInvariant = __webpack_require__(3);
|
32379 |
|
32380 | var DOMLazyTree = __webpack_require__(20);
|
32381 | var ExecutionEnvironment = __webpack_require__(6);
|
32382 |
|
32383 | var createNodesFromMarkup = __webpack_require__(126);
|
32384 | var emptyFunction = __webpack_require__(8);
|
32385 | var invariant = __webpack_require__(1);
|
32386 |
|
32387 | var Danger = {
|
32388 | |
32389 |
|
32390 |
|
32391 |
|
32392 |
|
32393 |
|
32394 |
|
32395 |
|
32396 | dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {
|
32397 | !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0;
|
32398 | !markup ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0;
|
32399 | !(oldChild.nodeName !== 'HTML') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0;
|
32400 |
|
32401 | if (typeof markup === 'string') {
|
32402 | var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
|
32403 | oldChild.parentNode.replaceChild(newChild, oldChild);
|
32404 | } else {
|
32405 | DOMLazyTree.replaceChildWithTree(oldChild, markup);
|
32406 | }
|
32407 | }
|
32408 | };
|
32409 |
|
32410 | module.exports = Danger;
|
32411 | }.call(exports, __webpack_require__(0)))
|
32412 |
|
32413 | }),
|
32414 |
|
32415 | (function(module, exports, __webpack_require__) {
|
32416 |
|
32417 | "use strict";
|
32418 | (function(process) {
|
32419 |
|
32420 |
|
32421 |
|
32422 |
|
32423 |
|
32424 |
|
32425 |
|
32426 |
|
32427 |
|
32428 |
|
32429 |
|
32430 |
|
32431 |
|
32432 |
|
32433 | var ExecutionEnvironment = __webpack_require__(6);
|
32434 |
|
32435 | var createArrayFromMixed = __webpack_require__(127);
|
32436 | var getMarkupWrap = __webpack_require__(128);
|
32437 | var invariant = __webpack_require__(1);
|
32438 |
|
32439 |
|
32440 |
|
32441 |
|
32442 | var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
|
32443 |
|
32444 |
|
32445 |
|
32446 |
|
32447 | var nodeNamePattern = /^\s*<(\w+)/;
|
32448 |
|
32449 |
|
32450 |
|
32451 |
|
32452 |
|
32453 |
|
32454 |
|
32455 | function getNodeName(markup) {
|
32456 | var nodeNameMatch = markup.match(nodeNamePattern);
|
32457 | return nodeNameMatch && nodeNameMatch[1].toLowerCase();
|
32458 | }
|
32459 |
|
32460 |
|
32461 |
|
32462 |
|
32463 |
|
32464 |
|
32465 |
|
32466 |
|
32467 |
|
32468 |
|
32469 |
|
32470 | function createNodesFromMarkup(markup, handleScript) {
|
32471 | var node = dummyNode;
|
32472 | !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0;
|
32473 | var nodeName = getNodeName(markup);
|
32474 |
|
32475 | var wrap = nodeName && getMarkupWrap(nodeName);
|
32476 | if (wrap) {
|
32477 | node.innerHTML = wrap[1] + markup + wrap[2];
|
32478 |
|
32479 | var wrapDepth = wrap[0];
|
32480 | while (wrapDepth--) {
|
32481 | node = node.lastChild;
|
32482 | }
|
32483 | } else {
|
32484 | node.innerHTML = markup;
|
32485 | }
|
32486 |
|
32487 | var scripts = node.getElementsByTagName('script');
|
32488 | if (scripts.length) {
|
32489 | !handleScript ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0;
|
32490 | createArrayFromMixed(scripts).forEach(handleScript);
|
32491 | }
|
32492 |
|
32493 | var nodes = Array.from(node.childNodes);
|
32494 | while (node.lastChild) {
|
32495 | node.removeChild(node.lastChild);
|
32496 | }
|
32497 | return nodes;
|
32498 | }
|
32499 |
|
32500 | module.exports = createNodesFromMarkup;
|
32501 | }.call(exports, __webpack_require__(0)))
|
32502 |
|
32503 | }),
|
32504 |
|
32505 | (function(module, exports, __webpack_require__) {
|
32506 |
|
32507 | "use strict";
|
32508 | (function(process) {
|
32509 |
|
32510 |
|
32511 |
|
32512 |
|
32513 |
|
32514 |
|
32515 |
|
32516 |
|
32517 |
|
32518 |
|
32519 |
|
32520 |
|
32521 | var invariant = __webpack_require__(1);
|
32522 |
|
32523 |
|
32524 |
|
32525 |
|
32526 |
|
32527 |
|
32528 |
|
32529 |
|
32530 |
|
32531 |
|
32532 | function toArray(obj) {
|
32533 | var length = obj.length;
|
32534 |
|
32535 |
|
32536 |
|
32537 | !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;
|
32538 |
|
32539 | !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;
|
32540 |
|
32541 | !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;
|
32542 |
|
32543 | !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0;
|
32544 |
|
32545 |
|
32546 |
|
32547 |
|
32548 | if (obj.hasOwnProperty) {
|
32549 | try {
|
32550 | return Array.prototype.slice.call(obj);
|
32551 | } catch (e) {
|
32552 |
|
32553 | }
|
32554 | }
|
32555 |
|
32556 |
|
32557 |
|
32558 | var ret = Array(length);
|
32559 | for (var ii = 0; ii < length; ii++) {
|
32560 | ret[ii] = obj[ii];
|
32561 | }
|
32562 | return ret;
|
32563 | }
|
32564 |
|
32565 |
|
32566 |
|
32567 |
|
32568 |
|
32569 |
|
32570 |
|
32571 |
|
32572 |
|
32573 |
|
32574 |
|
32575 |
|
32576 |
|
32577 |
|
32578 |
|
32579 |
|
32580 | function hasArrayNature(obj) {
|
32581 | return (
|
32582 |
|
32583 | !!obj && (
|
32584 |
|
32585 | typeof obj == 'object' || typeof obj == 'function') &&
|
32586 |
|
32587 | 'length' in obj &&
|
32588 |
|
32589 | !('setInterval' in obj) &&
|
32590 |
|
32591 |
|
32592 | typeof obj.nodeType != 'number' && (
|
32593 |
|
32594 | Array.isArray(obj) ||
|
32595 |
|
32596 | 'callee' in obj ||
|
32597 |
|
32598 | 'item' in obj)
|
32599 | );
|
32600 | }
|
32601 |
|
32602 |
|
32603 |
|
32604 |
|
32605 |
|
32606 |
|
32607 |
|
32608 |
|
32609 |
|
32610 |
|
32611 |
|
32612 |
|
32613 |
|
32614 |
|
32615 |
|
32616 |
|
32617 |
|
32618 |
|
32619 |
|
32620 |
|
32621 |
|
32622 |
|
32623 | function createArrayFromMixed(obj) {
|
32624 | if (!hasArrayNature(obj)) {
|
32625 | return [obj];
|
32626 | } else if (Array.isArray(obj)) {
|
32627 | return obj.slice();
|
32628 | } else {
|
32629 | return toArray(obj);
|
32630 | }
|
32631 | }
|
32632 |
|
32633 | module.exports = createArrayFromMixed;
|
32634 | }.call(exports, __webpack_require__(0)))
|
32635 |
|
32636 | }),
|
32637 |
|
32638 | (function(module, exports, __webpack_require__) {
|
32639 |
|
32640 | "use strict";
|
32641 | (function(process) {
|
32642 |
|
32643 |
|
32644 |
|
32645 |
|
32646 |
|
32647 |
|
32648 |
|
32649 |
|
32650 |
|
32651 |
|
32652 |
|
32653 |
|
32654 |
|
32655 | var ExecutionEnvironment = __webpack_require__(6);
|
32656 |
|
32657 | var invariant = __webpack_require__(1);
|
32658 |
|
32659 |
|
32660 |
|
32661 |
|
32662 | var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
|
32663 |
|
32664 |
|
32665 |
|
32666 |
|
32667 |
|
32668 |
|
32669 |
|
32670 |
|
32671 | var shouldWrap = {};
|
32672 |
|
32673 | var selectWrap = [1, '<select multiple="true">', '</select>'];
|
32674 | var tableWrap = [1, '<table>', '</table>'];
|
32675 | var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
|
32676 |
|
32677 | var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>'];
|
32678 |
|
32679 | var markupWrap = {
|
32680 | '*': [1, '?<div>', '</div>'],
|
32681 |
|
32682 | 'area': [1, '<map>', '</map>'],
|
32683 | 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
|
32684 | 'legend': [1, '<fieldset>', '</fieldset>'],
|
32685 | 'param': [1, '<object>', '</object>'],
|
32686 | 'tr': [2, '<table><tbody>', '</tbody></table>'],
|
32687 |
|
32688 | 'optgroup': selectWrap,
|
32689 | 'option': selectWrap,
|
32690 |
|
32691 | 'caption': tableWrap,
|
32692 | 'colgroup': tableWrap,
|
32693 | 'tbody': tableWrap,
|
32694 | 'tfoot': tableWrap,
|
32695 | 'thead': tableWrap,
|
32696 |
|
32697 | 'td': trWrap,
|
32698 | 'th': trWrap
|
32699 | };
|
32700 |
|
32701 |
|
32702 |
|
32703 |
|
32704 | var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];
|
32705 | svgElements.forEach(function (nodeName) {
|
32706 | markupWrap[nodeName] = svgWrap;
|
32707 | shouldWrap[nodeName] = true;
|
32708 | });
|
32709 |
|
32710 |
|
32711 |
|
32712 |
|
32713 |
|
32714 |
|
32715 |
|
32716 |
|
32717 |
|
32718 | function getMarkupWrap(nodeName) {
|
32719 | !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0;
|
32720 | if (!markupWrap.hasOwnProperty(nodeName)) {
|
32721 | nodeName = '*';
|
32722 | }
|
32723 | if (!shouldWrap.hasOwnProperty(nodeName)) {
|
32724 | if (nodeName === '*') {
|
32725 | dummyNode.innerHTML = '<link />';
|
32726 | } else {
|
32727 | dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';
|
32728 | }
|
32729 | shouldWrap[nodeName] = !dummyNode.firstChild;
|
32730 | }
|
32731 | return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
|
32732 | }
|
32733 |
|
32734 | module.exports = getMarkupWrap;
|
32735 | }.call(exports, __webpack_require__(0)))
|
32736 |
|
32737 | }),
|
32738 |
|
32739 | (function(module, exports, __webpack_require__) {
|
32740 |
|
32741 | "use strict";
|
32742 |
|
32743 |
|
32744 |
|
32745 |
|
32746 |
|
32747 |
|
32748 |
|
32749 |
|
32750 |
|
32751 |
|
32752 |
|
32753 |
|
32754 | var DOMChildrenOperations = __webpack_require__(43);
|
32755 | var ReactDOMComponentTree = __webpack_require__(5);
|
32756 |
|
32757 |
|
32758 |
|
32759 |
|
32760 | var ReactDOMIDOperations = {
|
32761 | |
32762 |
|
32763 |
|
32764 |
|
32765 |
|
32766 |
|
32767 | dangerouslyProcessChildrenUpdates: function (parentInst, updates) {
|
32768 | var node = ReactDOMComponentTree.getNodeFromInstance(parentInst);
|
32769 | DOMChildrenOperations.processUpdates(node, updates);
|
32770 | }
|
32771 | };
|
32772 |
|
32773 | module.exports = ReactDOMIDOperations;
|
32774 |
|
32775 | }),
|
32776 |
|
32777 | (function(module, exports, __webpack_require__) {
|
32778 |
|
32779 | "use strict";
|
32780 | (function(process) { |
32781 |
|
32782 |
|
32783 |
|
32784 |
|
32785 |
|
32786 |
|
32787 |
|
32788 |
|
32789 |
|
32790 |
|
32791 |
|
32792 |
|
32793 |
|
32794 | var _prodInvariant = __webpack_require__(3),
|
32795 | _assign = __webpack_require__(4);
|
32796 |
|
32797 | var AutoFocusUtils = __webpack_require__(131);
|
32798 | var CSSPropertyOperations = __webpack_require__(132);
|
32799 | var DOMLazyTree = __webpack_require__(20);
|
32800 | var DOMNamespaces = __webpack_require__(44);
|
32801 | var DOMProperty = __webpack_require__(13);
|
32802 | var DOMPropertyOperations = __webpack_require__(76);
|
32803 | var EventPluginHub = __webpack_require__(22);
|
32804 | var EventPluginRegistry = __webpack_require__(28);
|
32805 | var ReactBrowserEventEmitter = __webpack_require__(33);
|
32806 | var ReactDOMComponentFlags = __webpack_require__(64);
|
32807 | var ReactDOMComponentTree = __webpack_require__(5);
|
32808 | var ReactDOMInput = __webpack_require__(142);
|
32809 | var ReactDOMOption = __webpack_require__(143);
|
32810 | var ReactDOMSelect = __webpack_require__(78);
|
32811 | var ReactDOMTextarea = __webpack_require__(144);
|
32812 | var ReactInstrumentation = __webpack_require__(9);
|
32813 | var ReactMultiChild = __webpack_require__(145);
|
32814 | var ReactServerRenderingTransaction = __webpack_require__(154);
|
32815 |
|
32816 | var emptyFunction = __webpack_require__(8);
|
32817 | var escapeTextContentForBrowser = __webpack_require__(32);
|
32818 | var invariant = __webpack_require__(1);
|
32819 | var isEventSupported = __webpack_require__(41);
|
32820 | var shallowEqual = __webpack_require__(48);
|
32821 | var inputValueTracking = __webpack_require__(70);
|
32822 | var validateDOMNesting = __webpack_require__(52);
|
32823 | var warning = __webpack_require__(2);
|
32824 |
|
32825 | var Flags = ReactDOMComponentFlags;
|
32826 | var deleteListener = EventPluginHub.deleteListener;
|
32827 | var getNode = ReactDOMComponentTree.getNodeFromInstance;
|
32828 | var listenTo = ReactBrowserEventEmitter.listenTo;
|
32829 | var registrationNameModules = EventPluginRegistry.registrationNameModules;
|
32830 |
|
32831 |
|
32832 | var CONTENT_TYPES = { string: true, number: true };
|
32833 |
|
32834 | var STYLE = 'style';
|
32835 | var HTML = '__html';
|
32836 | var RESERVED_PROPS = {
|
32837 | children: null,
|
32838 | dangerouslySetInnerHTML: null,
|
32839 | suppressContentEditableWarning: null
|
32840 | };
|
32841 |
|
32842 |
|
32843 | var DOC_FRAGMENT_TYPE = 11;
|
32844 |
|
32845 | function getDeclarationErrorAddendum(internalInstance) {
|
32846 | if (internalInstance) {
|
32847 | var owner = internalInstance._currentElement._owner || null;
|
32848 | if (owner) {
|
32849 | var name = owner.getName();
|
32850 | if (name) {
|
32851 | return ' This DOM node was rendered by `' + name + '`.';
|
32852 | }
|
32853 | }
|
32854 | }
|
32855 | return '';
|
32856 | }
|
32857 |
|
32858 | function friendlyStringify(obj) {
|
32859 | if (typeof obj === 'object') {
|
32860 | if (Array.isArray(obj)) {
|
32861 | return '[' + obj.map(friendlyStringify).join(', ') + ']';
|
32862 | } else {
|
32863 | var pairs = [];
|
32864 | for (var key in obj) {
|
32865 | if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
32866 | var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key);
|
32867 | pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key]));
|
32868 | }
|
32869 | }
|
32870 | return '{' + pairs.join(', ') + '}';
|
32871 | }
|
32872 | } else if (typeof obj === 'string') {
|
32873 | return JSON.stringify(obj);
|
32874 | } else if (typeof obj === 'function') {
|
32875 | return '[function object]';
|
32876 | }
|
32877 |
|
32878 |
|
32879 | return String(obj);
|
32880 | }
|
32881 |
|
32882 | var styleMutationWarning = {};
|
32883 |
|
32884 | function checkAndWarnForMutatedStyle(style1, style2, component) {
|
32885 | if (style1 == null || style2 == null) {
|
32886 | return;
|
32887 | }
|
32888 | if (shallowEqual(style1, style2)) {
|
32889 | return;
|
32890 | }
|
32891 |
|
32892 | var componentName = component._tag;
|
32893 | var owner = component._currentElement._owner;
|
32894 | var ownerName;
|
32895 | if (owner) {
|
32896 | ownerName = owner.getName();
|
32897 | }
|
32898 |
|
32899 | var hash = ownerName + '|' + componentName;
|
32900 |
|
32901 | if (styleMutationWarning.hasOwnProperty(hash)) {
|
32902 | return;
|
32903 | }
|
32904 |
|
32905 | styleMutationWarning[hash] = true;
|
32906 |
|
32907 | process.env.NODE_ENV !== 'production' ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0;
|
32908 | }
|
32909 |
|
32910 |
|
32911 |
|
32912 |
|
32913 |
|
32914 | function assertValidProps(component, props) {
|
32915 | if (!props) {
|
32916 | return;
|
32917 | }
|
32918 |
|
32919 | if (voidElementTags[component._tag]) {
|
32920 | !(props.children == null && props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : _prodInvariant('137', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : void 0;
|
32921 | }
|
32922 | if (props.dangerouslySetInnerHTML != null) {
|
32923 | !(props.children == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0;
|
32924 | !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : _prodInvariant('61') : void 0;
|
32925 | }
|
32926 | if (process.env.NODE_ENV !== 'production') {
|
32927 | process.env.NODE_ENV !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0;
|
32928 | process.env.NODE_ENV !== 'production' ? warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;
|
32929 | process.env.NODE_ENV !== 'production' ? warning(props.onFocusIn == null && props.onFocusOut == null, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.') : void 0;
|
32930 | }
|
32931 | !(props.style == null || typeof props.style === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', getDeclarationErrorAddendum(component)) : _prodInvariant('62', getDeclarationErrorAddendum(component)) : void 0;
|
32932 | }
|
32933 |
|
32934 | function enqueuePutListener(inst, registrationName, listener, transaction) {
|
32935 | if (transaction instanceof ReactServerRenderingTransaction) {
|
32936 | return;
|
32937 | }
|
32938 | if (process.env.NODE_ENV !== 'production') {
|
32939 |
|
32940 |
|
32941 | process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), "This browser doesn't support the `onScroll` event") : void 0;
|
32942 | }
|
32943 | var containerInfo = inst._hostContainerInfo;
|
32944 | var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE;
|
32945 | var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument;
|
32946 | listenTo(registrationName, doc);
|
32947 | transaction.getReactMountReady().enqueue(putListener, {
|
32948 | inst: inst,
|
32949 | registrationName: registrationName,
|
32950 | listener: listener
|
32951 | });
|
32952 | }
|
32953 |
|
32954 | function putListener() {
|
32955 | var listenerToPut = this;
|
32956 | EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener);
|
32957 | }
|
32958 |
|
32959 | function inputPostMount() {
|
32960 | var inst = this;
|
32961 | ReactDOMInput.postMountWrapper(inst);
|
32962 | }
|
32963 |
|
32964 | function textareaPostMount() {
|
32965 | var inst = this;
|
32966 | ReactDOMTextarea.postMountWrapper(inst);
|
32967 | }
|
32968 |
|
32969 | function optionPostMount() {
|
32970 | var inst = this;
|
32971 | ReactDOMOption.postMountWrapper(inst);
|
32972 | }
|
32973 |
|
32974 | var setAndValidateContentChildDev = emptyFunction;
|
32975 | if (process.env.NODE_ENV !== 'production') {
|
32976 | setAndValidateContentChildDev = function (content) {
|
32977 | var hasExistingContent = this._contentDebugID != null;
|
32978 | var debugID = this._debugID;
|
32979 |
|
32980 | var contentDebugID = -debugID;
|
32981 |
|
32982 | if (content == null) {
|
32983 | if (hasExistingContent) {
|
32984 | ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID);
|
32985 | }
|
32986 | this._contentDebugID = null;
|
32987 | return;
|
32988 | }
|
32989 |
|
32990 | validateDOMNesting(null, String(content), this, this._ancestorInfo);
|
32991 | this._contentDebugID = contentDebugID;
|
32992 | if (hasExistingContent) {
|
32993 | ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);
|
32994 | ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID);
|
32995 | } else {
|
32996 | ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID);
|
32997 | ReactInstrumentation.debugTool.onMountComponent(contentDebugID);
|
32998 | ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]);
|
32999 | }
|
33000 | };
|
33001 | }
|
33002 |
|
33003 |
|
33004 |
|
33005 | var mediaEvents = {
|
33006 | topAbort: 'abort',
|
33007 | topCanPlay: 'canplay',
|
33008 | topCanPlayThrough: 'canplaythrough',
|
33009 | topDurationChange: 'durationchange',
|
33010 | topEmptied: 'emptied',
|
33011 | topEncrypted: 'encrypted',
|
33012 | topEnded: 'ended',
|
33013 | topError: 'error',
|
33014 | topLoadedData: 'loadeddata',
|
33015 | topLoadedMetadata: 'loadedmetadata',
|
33016 | topLoadStart: 'loadstart',
|
33017 | topPause: 'pause',
|
33018 | topPlay: 'play',
|
33019 | topPlaying: 'playing',
|
33020 | topProgress: 'progress',
|
33021 | topRateChange: 'ratechange',
|
33022 | topSeeked: 'seeked',
|
33023 | topSeeking: 'seeking',
|
33024 | topStalled: 'stalled',
|
33025 | topSuspend: 'suspend',
|
33026 | topTimeUpdate: 'timeupdate',
|
33027 | topVolumeChange: 'volumechange',
|
33028 | topWaiting: 'waiting'
|
33029 | };
|
33030 |
|
33031 | function trackInputValue() {
|
33032 | inputValueTracking.track(this);
|
33033 | }
|
33034 |
|
33035 | function trapBubbledEventsLocal() {
|
33036 | var inst = this;
|
33037 |
|
33038 |
|
33039 | !inst._rootNodeID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0;
|
33040 | var node = getNode(inst);
|
33041 | !node ? process.env.NODE_ENV !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0;
|
33042 |
|
33043 | switch (inst._tag) {
|
33044 | case 'iframe':
|
33045 | case 'object':
|
33046 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];
|
33047 | break;
|
33048 | case 'video':
|
33049 | case 'audio':
|
33050 | inst._wrapperState.listeners = [];
|
33051 |
|
33052 | for (var event in mediaEvents) {
|
33053 | if (mediaEvents.hasOwnProperty(event)) {
|
33054 | inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node));
|
33055 | }
|
33056 | }
|
33057 | break;
|
33058 | case 'source':
|
33059 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)];
|
33060 | break;
|
33061 | case 'img':
|
33062 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];
|
33063 | break;
|
33064 | case 'form':
|
33065 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)];
|
33066 | break;
|
33067 | case 'input':
|
33068 | case 'select':
|
33069 | case 'textarea':
|
33070 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)];
|
33071 | break;
|
33072 | }
|
33073 | }
|
33074 |
|
33075 | function postUpdateSelectWrapper() {
|
33076 | ReactDOMSelect.postUpdateWrapper(this);
|
33077 | }
|
33078 |
|
33079 |
|
33080 |
|
33081 |
|
33082 | var omittedCloseTags = {
|
33083 | area: true,
|
33084 | base: true,
|
33085 | br: true,
|
33086 | col: true,
|
33087 | embed: true,
|
33088 | hr: true,
|
33089 | img: true,
|
33090 | input: true,
|
33091 | keygen: true,
|
33092 | link: true,
|
33093 | meta: true,
|
33094 | param: true,
|
33095 | source: true,
|
33096 | track: true,
|
33097 | wbr: true
|
33098 |
|
33099 | };
|
33100 |
|
33101 | var newlineEatingTags = {
|
33102 | listing: true,
|
33103 | pre: true,
|
33104 | textarea: true
|
33105 | };
|
33106 |
|
33107 |
|
33108 |
|
33109 |
|
33110 | var voidElementTags = _assign({
|
33111 | menuitem: true
|
33112 | }, omittedCloseTags);
|
33113 |
|
33114 |
|
33115 |
|
33116 |
|
33117 |
|
33118 | var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/;
|
33119 | var validatedTagCache = {};
|
33120 | var hasOwnProperty = {}.hasOwnProperty;
|
33121 |
|
33122 | function validateDangerousTag(tag) {
|
33123 | if (!hasOwnProperty.call(validatedTagCache, tag)) {
|
33124 | !VALID_TAG_REGEX.test(tag) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0;
|
33125 | validatedTagCache[tag] = true;
|
33126 | }
|
33127 | }
|
33128 |
|
33129 | function isCustomComponent(tagName, props) {
|
33130 | return tagName.indexOf('-') >= 0 || props.is != null;
|
33131 | }
|
33132 |
|
33133 | var globalIdCounter = 1;
|
33134 |
|
33135 |
|
33136 |
|
33137 |
|
33138 |
|
33139 |
|
33140 |
|
33141 |
|
33142 |
|
33143 |
|
33144 |
|
33145 |
|
33146 |
|
33147 |
|
33148 |
|
33149 | function ReactDOMComponent(element) {
|
33150 | var tag = element.type;
|
33151 | validateDangerousTag(tag);
|
33152 | this._currentElement = element;
|
33153 | this._tag = tag.toLowerCase();
|
33154 | this._namespaceURI = null;
|
33155 | this._renderedChildren = null;
|
33156 | this._previousStyle = null;
|
33157 | this._previousStyleCopy = null;
|
33158 | this._hostNode = null;
|
33159 | this._hostParent = null;
|
33160 | this._rootNodeID = 0;
|
33161 | this._domID = 0;
|
33162 | this._hostContainerInfo = null;
|
33163 | this._wrapperState = null;
|
33164 | this._topLevelWrapper = null;
|
33165 | this._flags = 0;
|
33166 | if (process.env.NODE_ENV !== 'production') {
|
33167 | this._ancestorInfo = null;
|
33168 | setAndValidateContentChildDev.call(this, null);
|
33169 | }
|
33170 | }
|
33171 |
|
33172 | ReactDOMComponent.displayName = 'ReactDOMComponent';
|
33173 |
|
33174 | ReactDOMComponent.Mixin = {
|
33175 | |
33176 |
|
33177 |
|
33178 |
|
33179 |
|
33180 |
|
33181 |
|
33182 |
|
33183 |
|
33184 |
|
33185 |
|
33186 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
33187 | this._rootNodeID = globalIdCounter++;
|
33188 | this._domID = hostContainerInfo._idCounter++;
|
33189 | this._hostParent = hostParent;
|
33190 | this._hostContainerInfo = hostContainerInfo;
|
33191 |
|
33192 | var props = this._currentElement.props;
|
33193 |
|
33194 | switch (this._tag) {
|
33195 | case 'audio':
|
33196 | case 'form':
|
33197 | case 'iframe':
|
33198 | case 'img':
|
33199 | case 'link':
|
33200 | case 'object':
|
33201 | case 'source':
|
33202 | case 'video':
|
33203 | this._wrapperState = {
|
33204 | listeners: null
|
33205 | };
|
33206 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
33207 | break;
|
33208 | case 'input':
|
33209 | ReactDOMInput.mountWrapper(this, props, hostParent);
|
33210 | props = ReactDOMInput.getHostProps(this, props);
|
33211 | transaction.getReactMountReady().enqueue(trackInputValue, this);
|
33212 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
33213 | break;
|
33214 | case 'option':
|
33215 | ReactDOMOption.mountWrapper(this, props, hostParent);
|
33216 | props = ReactDOMOption.getHostProps(this, props);
|
33217 | break;
|
33218 | case 'select':
|
33219 | ReactDOMSelect.mountWrapper(this, props, hostParent);
|
33220 | props = ReactDOMSelect.getHostProps(this, props);
|
33221 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
33222 | break;
|
33223 | case 'textarea':
|
33224 | ReactDOMTextarea.mountWrapper(this, props, hostParent);
|
33225 | props = ReactDOMTextarea.getHostProps(this, props);
|
33226 | transaction.getReactMountReady().enqueue(trackInputValue, this);
|
33227 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
33228 | break;
|
33229 | }
|
33230 |
|
33231 | assertValidProps(this, props);
|
33232 |
|
33233 |
|
33234 |
|
33235 | var namespaceURI;
|
33236 | var parentTag;
|
33237 | if (hostParent != null) {
|
33238 | namespaceURI = hostParent._namespaceURI;
|
33239 | parentTag = hostParent._tag;
|
33240 | } else if (hostContainerInfo._tag) {
|
33241 | namespaceURI = hostContainerInfo._namespaceURI;
|
33242 | parentTag = hostContainerInfo._tag;
|
33243 | }
|
33244 | if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') {
|
33245 | namespaceURI = DOMNamespaces.html;
|
33246 | }
|
33247 | if (namespaceURI === DOMNamespaces.html) {
|
33248 | if (this._tag === 'svg') {
|
33249 | namespaceURI = DOMNamespaces.svg;
|
33250 | } else if (this._tag === 'math') {
|
33251 | namespaceURI = DOMNamespaces.mathml;
|
33252 | }
|
33253 | }
|
33254 | this._namespaceURI = namespaceURI;
|
33255 |
|
33256 | if (process.env.NODE_ENV !== 'production') {
|
33257 | var parentInfo;
|
33258 | if (hostParent != null) {
|
33259 | parentInfo = hostParent._ancestorInfo;
|
33260 | } else if (hostContainerInfo._tag) {
|
33261 | parentInfo = hostContainerInfo._ancestorInfo;
|
33262 | }
|
33263 | if (parentInfo) {
|
33264 |
|
33265 |
|
33266 | validateDOMNesting(this._tag, null, this, parentInfo);
|
33267 | }
|
33268 | this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);
|
33269 | }
|
33270 |
|
33271 | var mountImage;
|
33272 | if (transaction.useCreateElement) {
|
33273 | var ownerDocument = hostContainerInfo._ownerDocument;
|
33274 | var el;
|
33275 | if (namespaceURI === DOMNamespaces.html) {
|
33276 | if (this._tag === 'script') {
|
33277 |
|
33278 |
|
33279 | var div = ownerDocument.createElement('div');
|
33280 | var type = this._currentElement.type;
|
33281 | div.innerHTML = '<' + type + '></' + type + '>';
|
33282 | el = div.removeChild(div.firstChild);
|
33283 | } else if (props.is) {
|
33284 | el = ownerDocument.createElement(this._currentElement.type, props.is);
|
33285 | } else {
|
33286 |
|
33287 |
|
33288 |
|
33289 | el = ownerDocument.createElement(this._currentElement.type);
|
33290 | }
|
33291 | } else {
|
33292 | el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type);
|
33293 | }
|
33294 | ReactDOMComponentTree.precacheNode(this, el);
|
33295 | this._flags |= Flags.hasCachedChildNodes;
|
33296 | if (!this._hostParent) {
|
33297 | DOMPropertyOperations.setAttributeForRoot(el);
|
33298 | }
|
33299 | this._updateDOMProperties(null, props, transaction);
|
33300 | var lazyTree = DOMLazyTree(el);
|
33301 | this._createInitialChildren(transaction, props, context, lazyTree);
|
33302 | mountImage = lazyTree;
|
33303 | } else {
|
33304 | var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);
|
33305 | var tagContent = this._createContentMarkup(transaction, props, context);
|
33306 | if (!tagContent && omittedCloseTags[this._tag]) {
|
33307 | mountImage = tagOpen + '/>';
|
33308 | } else {
|
33309 | mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';
|
33310 | }
|
33311 | }
|
33312 |
|
33313 | switch (this._tag) {
|
33314 | case 'input':
|
33315 | transaction.getReactMountReady().enqueue(inputPostMount, this);
|
33316 | if (props.autoFocus) {
|
33317 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
33318 | }
|
33319 | break;
|
33320 | case 'textarea':
|
33321 | transaction.getReactMountReady().enqueue(textareaPostMount, this);
|
33322 | if (props.autoFocus) {
|
33323 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
33324 | }
|
33325 | break;
|
33326 | case 'select':
|
33327 | if (props.autoFocus) {
|
33328 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
33329 | }
|
33330 | break;
|
33331 | case 'button':
|
33332 | if (props.autoFocus) {
|
33333 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
33334 | }
|
33335 | break;
|
33336 | case 'option':
|
33337 | transaction.getReactMountReady().enqueue(optionPostMount, this);
|
33338 | break;
|
33339 | }
|
33340 |
|
33341 | return mountImage;
|
33342 | },
|
33343 |
|
33344 | |
33345 |
|
33346 |
|
33347 |
|
33348 |
|
33349 |
|
33350 |
|
33351 |
|
33352 |
|
33353 |
|
33354 |
|
33355 |
|
33356 |
|
33357 | _createOpenTagMarkupAndPutListeners: function (transaction, props) {
|
33358 | var ret = '<' + this._currentElement.type;
|
33359 |
|
33360 | for (var propKey in props) {
|
33361 | if (!props.hasOwnProperty(propKey)) {
|
33362 | continue;
|
33363 | }
|
33364 | var propValue = props[propKey];
|
33365 | if (propValue == null) {
|
33366 | continue;
|
33367 | }
|
33368 | if (registrationNameModules.hasOwnProperty(propKey)) {
|
33369 | if (propValue) {
|
33370 | enqueuePutListener(this, propKey, propValue, transaction);
|
33371 | }
|
33372 | } else {
|
33373 | if (propKey === STYLE) {
|
33374 | if (propValue) {
|
33375 | if (process.env.NODE_ENV !== 'production') {
|
33376 |
|
33377 | this._previousStyle = propValue;
|
33378 | }
|
33379 | propValue = this._previousStyleCopy = _assign({}, props.style);
|
33380 | }
|
33381 | propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this);
|
33382 | }
|
33383 | var markup = null;
|
33384 | if (this._tag != null && isCustomComponent(this._tag, props)) {
|
33385 | if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
|
33386 | markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue);
|
33387 | }
|
33388 | } else {
|
33389 | markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue);
|
33390 | }
|
33391 | if (markup) {
|
33392 | ret += ' ' + markup;
|
33393 | }
|
33394 | }
|
33395 | }
|
33396 |
|
33397 |
|
33398 |
|
33399 | if (transaction.renderToStaticMarkup) {
|
33400 | return ret;
|
33401 | }
|
33402 |
|
33403 | if (!this._hostParent) {
|
33404 | ret += ' ' + DOMPropertyOperations.createMarkupForRoot();
|
33405 | }
|
33406 | ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID);
|
33407 | return ret;
|
33408 | },
|
33409 |
|
33410 | |
33411 |
|
33412 |
|
33413 |
|
33414 |
|
33415 |
|
33416 |
|
33417 |
|
33418 |
|
33419 | _createContentMarkup: function (transaction, props, context) {
|
33420 | var ret = '';
|
33421 |
|
33422 |
|
33423 | var innerHTML = props.dangerouslySetInnerHTML;
|
33424 | if (innerHTML != null) {
|
33425 | if (innerHTML.__html != null) {
|
33426 | ret = innerHTML.__html;
|
33427 | }
|
33428 | } else {
|
33429 | var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
|
33430 | var childrenToUse = contentToUse != null ? null : props.children;
|
33431 | if (contentToUse != null) {
|
33432 |
|
33433 | ret = escapeTextContentForBrowser(contentToUse);
|
33434 | if (process.env.NODE_ENV !== 'production') {
|
33435 | setAndValidateContentChildDev.call(this, contentToUse);
|
33436 | }
|
33437 | } else if (childrenToUse != null) {
|
33438 | var mountImages = this.mountChildren(childrenToUse, transaction, context);
|
33439 | ret = mountImages.join('');
|
33440 | }
|
33441 | }
|
33442 | if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') {
|
33443 |
|
33444 |
|
33445 |
|
33446 |
|
33447 |
|
33448 |
|
33449 |
|
33450 |
|
33451 |
|
33452 |
|
33453 | return '\n' + ret;
|
33454 | } else {
|
33455 | return ret;
|
33456 | }
|
33457 | },
|
33458 |
|
33459 | _createInitialChildren: function (transaction, props, context, lazyTree) {
|
33460 |
|
33461 | var innerHTML = props.dangerouslySetInnerHTML;
|
33462 | if (innerHTML != null) {
|
33463 | if (innerHTML.__html != null) {
|
33464 | DOMLazyTree.queueHTML(lazyTree, innerHTML.__html);
|
33465 | }
|
33466 | } else {
|
33467 | var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
|
33468 | var childrenToUse = contentToUse != null ? null : props.children;
|
33469 |
|
33470 | if (contentToUse != null) {
|
33471 |
|
33472 |
|
33473 |
|
33474 |
|
33475 | if (contentToUse !== '') {
|
33476 | if (process.env.NODE_ENV !== 'production') {
|
33477 | setAndValidateContentChildDev.call(this, contentToUse);
|
33478 | }
|
33479 | DOMLazyTree.queueText(lazyTree, contentToUse);
|
33480 | }
|
33481 | } else if (childrenToUse != null) {
|
33482 | var mountImages = this.mountChildren(childrenToUse, transaction, context);
|
33483 | for (var i = 0; i < mountImages.length; i++) {
|
33484 | DOMLazyTree.queueChild(lazyTree, mountImages[i]);
|
33485 | }
|
33486 | }
|
33487 | }
|
33488 | },
|
33489 |
|
33490 | |
33491 |
|
33492 |
|
33493 |
|
33494 |
|
33495 |
|
33496 |
|
33497 |
|
33498 | receiveComponent: function (nextElement, transaction, context) {
|
33499 | var prevElement = this._currentElement;
|
33500 | this._currentElement = nextElement;
|
33501 | this.updateComponent(transaction, prevElement, nextElement, context);
|
33502 | },
|
33503 |
|
33504 | |
33505 |
|
33506 |
|
33507 |
|
33508 |
|
33509 |
|
33510 |
|
33511 |
|
33512 |
|
33513 |
|
33514 | updateComponent: function (transaction, prevElement, nextElement, context) {
|
33515 | var lastProps = prevElement.props;
|
33516 | var nextProps = this._currentElement.props;
|
33517 |
|
33518 | switch (this._tag) {
|
33519 | case 'input':
|
33520 | lastProps = ReactDOMInput.getHostProps(this, lastProps);
|
33521 | nextProps = ReactDOMInput.getHostProps(this, nextProps);
|
33522 | break;
|
33523 | case 'option':
|
33524 | lastProps = ReactDOMOption.getHostProps(this, lastProps);
|
33525 | nextProps = ReactDOMOption.getHostProps(this, nextProps);
|
33526 | break;
|
33527 | case 'select':
|
33528 | lastProps = ReactDOMSelect.getHostProps(this, lastProps);
|
33529 | nextProps = ReactDOMSelect.getHostProps(this, nextProps);
|
33530 | break;
|
33531 | case 'textarea':
|
33532 | lastProps = ReactDOMTextarea.getHostProps(this, lastProps);
|
33533 | nextProps = ReactDOMTextarea.getHostProps(this, nextProps);
|
33534 | break;
|
33535 | }
|
33536 |
|
33537 | assertValidProps(this, nextProps);
|
33538 | this._updateDOMProperties(lastProps, nextProps, transaction);
|
33539 | this._updateDOMChildren(lastProps, nextProps, transaction, context);
|
33540 |
|
33541 | switch (this._tag) {
|
33542 | case 'input':
|
33543 |
|
33544 |
|
33545 |
|
33546 | ReactDOMInput.updateWrapper(this);
|
33547 | break;
|
33548 | case 'textarea':
|
33549 | ReactDOMTextarea.updateWrapper(this);
|
33550 | break;
|
33551 | case 'select':
|
33552 |
|
33553 |
|
33554 | transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
|
33555 | break;
|
33556 | }
|
33557 | },
|
33558 |
|
33559 | |
33560 |
|
33561 |
|
33562 |
|
33563 |
|
33564 |
|
33565 |
|
33566 |
|
33567 |
|
33568 |
|
33569 |
|
33570 |
|
33571 |
|
33572 |
|
33573 |
|
33574 |
|
33575 | _updateDOMProperties: function (lastProps, nextProps, transaction) {
|
33576 | var propKey;
|
33577 | var styleName;
|
33578 | var styleUpdates;
|
33579 | for (propKey in lastProps) {
|
33580 | if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
|
33581 | continue;
|
33582 | }
|
33583 | if (propKey === STYLE) {
|
33584 | var lastStyle = this._previousStyleCopy;
|
33585 | for (styleName in lastStyle) {
|
33586 | if (lastStyle.hasOwnProperty(styleName)) {
|
33587 | styleUpdates = styleUpdates || {};
|
33588 | styleUpdates[styleName] = '';
|
33589 | }
|
33590 | }
|
33591 | this._previousStyleCopy = null;
|
33592 | } else if (registrationNameModules.hasOwnProperty(propKey)) {
|
33593 | if (lastProps[propKey]) {
|
33594 |
|
33595 |
|
33596 |
|
33597 | deleteListener(this, propKey);
|
33598 | }
|
33599 | } else if (isCustomComponent(this._tag, lastProps)) {
|
33600 | if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
|
33601 | DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey);
|
33602 | }
|
33603 | } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
|
33604 | DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey);
|
33605 | }
|
33606 | }
|
33607 | for (propKey in nextProps) {
|
33608 | var nextProp = nextProps[propKey];
|
33609 | var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined;
|
33610 | if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
|
33611 | continue;
|
33612 | }
|
33613 | if (propKey === STYLE) {
|
33614 | if (nextProp) {
|
33615 | if (process.env.NODE_ENV !== 'production') {
|
33616 | checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this);
|
33617 | this._previousStyle = nextProp;
|
33618 | }
|
33619 | nextProp = this._previousStyleCopy = _assign({}, nextProp);
|
33620 | } else {
|
33621 | this._previousStyleCopy = null;
|
33622 | }
|
33623 | if (lastProp) {
|
33624 |
|
33625 | for (styleName in lastProp) {
|
33626 | if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
|
33627 | styleUpdates = styleUpdates || {};
|
33628 | styleUpdates[styleName] = '';
|
33629 | }
|
33630 | }
|
33631 |
|
33632 | for (styleName in nextProp) {
|
33633 | if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
|
33634 | styleUpdates = styleUpdates || {};
|
33635 | styleUpdates[styleName] = nextProp[styleName];
|
33636 | }
|
33637 | }
|
33638 | } else {
|
33639 |
|
33640 | styleUpdates = nextProp;
|
33641 | }
|
33642 | } else if (registrationNameModules.hasOwnProperty(propKey)) {
|
33643 | if (nextProp) {
|
33644 | enqueuePutListener(this, propKey, nextProp, transaction);
|
33645 | } else if (lastProp) {
|
33646 | deleteListener(this, propKey);
|
33647 | }
|
33648 | } else if (isCustomComponent(this._tag, nextProps)) {
|
33649 | if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
|
33650 | DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp);
|
33651 | }
|
33652 | } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
|
33653 | var node = getNode(this);
|
33654 |
|
33655 |
|
33656 |
|
33657 | if (nextProp != null) {
|
33658 | DOMPropertyOperations.setValueForProperty(node, propKey, nextProp);
|
33659 | } else {
|
33660 | DOMPropertyOperations.deleteValueForProperty(node, propKey);
|
33661 | }
|
33662 | }
|
33663 | }
|
33664 | if (styleUpdates) {
|
33665 | CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this);
|
33666 | }
|
33667 | },
|
33668 |
|
33669 | |
33670 |
|
33671 |
|
33672 |
|
33673 |
|
33674 |
|
33675 |
|
33676 |
|
33677 |
|
33678 | _updateDOMChildren: function (lastProps, nextProps, transaction, context) {
|
33679 | var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;
|
33680 | var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;
|
33681 |
|
33682 | var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html;
|
33683 | var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html;
|
33684 |
|
33685 |
|
33686 | var lastChildren = lastContent != null ? null : lastProps.children;
|
33687 | var nextChildren = nextContent != null ? null : nextProps.children;
|
33688 |
|
33689 |
|
33690 |
|
33691 | var lastHasContentOrHtml = lastContent != null || lastHtml != null;
|
33692 | var nextHasContentOrHtml = nextContent != null || nextHtml != null;
|
33693 | if (lastChildren != null && nextChildren == null) {
|
33694 | this.updateChildren(null, transaction, context);
|
33695 | } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {
|
33696 | this.updateTextContent('');
|
33697 | if (process.env.NODE_ENV !== 'production') {
|
33698 | ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
|
33699 | }
|
33700 | }
|
33701 |
|
33702 | if (nextContent != null) {
|
33703 | if (lastContent !== nextContent) {
|
33704 | this.updateTextContent('' + nextContent);
|
33705 | if (process.env.NODE_ENV !== 'production') {
|
33706 | setAndValidateContentChildDev.call(this, nextContent);
|
33707 | }
|
33708 | }
|
33709 | } else if (nextHtml != null) {
|
33710 | if (lastHtml !== nextHtml) {
|
33711 | this.updateMarkup('' + nextHtml);
|
33712 | }
|
33713 | if (process.env.NODE_ENV !== 'production') {
|
33714 | ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
|
33715 | }
|
33716 | } else if (nextChildren != null) {
|
33717 | if (process.env.NODE_ENV !== 'production') {
|
33718 | setAndValidateContentChildDev.call(this, null);
|
33719 | }
|
33720 |
|
33721 | this.updateChildren(nextChildren, transaction, context);
|
33722 | }
|
33723 | },
|
33724 |
|
33725 | getHostNode: function () {
|
33726 | return getNode(this);
|
33727 | },
|
33728 |
|
33729 | |
33730 |
|
33731 |
|
33732 |
|
33733 |
|
33734 |
|
33735 | unmountComponent: function (safely) {
|
33736 | switch (this._tag) {
|
33737 | case 'audio':
|
33738 | case 'form':
|
33739 | case 'iframe':
|
33740 | case 'img':
|
33741 | case 'link':
|
33742 | case 'object':
|
33743 | case 'source':
|
33744 | case 'video':
|
33745 | var listeners = this._wrapperState.listeners;
|
33746 | if (listeners) {
|
33747 | for (var i = 0; i < listeners.length; i++) {
|
33748 | listeners[i].remove();
|
33749 | }
|
33750 | }
|
33751 | break;
|
33752 | case 'input':
|
33753 | case 'textarea':
|
33754 | inputValueTracking.stopTracking(this);
|
33755 | break;
|
33756 | case 'html':
|
33757 | case 'head':
|
33758 | case 'body':
|
33759 | |
33760 |
|
33761 |
|
33762 |
|
33763 |
|
33764 |
|
33765 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', this._tag) : _prodInvariant('66', this._tag) : void 0;
|
33766 | break;
|
33767 | }
|
33768 |
|
33769 | this.unmountChildren(safely);
|
33770 | ReactDOMComponentTree.uncacheNode(this);
|
33771 | EventPluginHub.deleteAllListeners(this);
|
33772 | this._rootNodeID = 0;
|
33773 | this._domID = 0;
|
33774 | this._wrapperState = null;
|
33775 |
|
33776 | if (process.env.NODE_ENV !== 'production') {
|
33777 | setAndValidateContentChildDev.call(this, null);
|
33778 | }
|
33779 | },
|
33780 |
|
33781 | getPublicInstance: function () {
|
33782 | return getNode(this);
|
33783 | }
|
33784 | };
|
33785 |
|
33786 | _assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);
|
33787 |
|
33788 | module.exports = ReactDOMComponent;
|
33789 | }.call(exports, __webpack_require__(0)))
|
33790 |
|
33791 | }),
|
33792 |
|
33793 | (function(module, exports, __webpack_require__) {
|
33794 |
|
33795 | "use strict";
|
33796 |
|
33797 |
|
33798 |
|
33799 |
|
33800 |
|
33801 |
|
33802 |
|
33803 |
|
33804 |
|
33805 |
|
33806 |
|
33807 |
|
33808 | var ReactDOMComponentTree = __webpack_require__(5);
|
33809 |
|
33810 | var focusNode = __webpack_require__(74);
|
33811 |
|
33812 | var AutoFocusUtils = {
|
33813 | focusDOMComponent: function () {
|
33814 | focusNode(ReactDOMComponentTree.getNodeFromInstance(this));
|
33815 | }
|
33816 | };
|
33817 |
|
33818 | module.exports = AutoFocusUtils;
|
33819 |
|
33820 | }),
|
33821 |
|
33822 | (function(module, exports, __webpack_require__) {
|
33823 |
|
33824 | "use strict";
|
33825 | (function(process) { |
33826 |
|
33827 |
|
33828 |
|
33829 |
|
33830 |
|
33831 |
|
33832 |
|
33833 |
|
33834 |
|
33835 |
|
33836 |
|
33837 | var CSSProperty = __webpack_require__(75);
|
33838 | var ExecutionEnvironment = __webpack_require__(6);
|
33839 | var ReactInstrumentation = __webpack_require__(9);
|
33840 |
|
33841 | var camelizeStyleName = __webpack_require__(133);
|
33842 | var dangerousStyleValue = __webpack_require__(135);
|
33843 | var hyphenateStyleName = __webpack_require__(136);
|
33844 | var memoizeStringOnly = __webpack_require__(138);
|
33845 | var warning = __webpack_require__(2);
|
33846 |
|
33847 | var processStyleName = memoizeStringOnly(function (styleName) {
|
33848 | return hyphenateStyleName(styleName);
|
33849 | });
|
33850 |
|
33851 | var hasShorthandPropertyBug = false;
|
33852 | var styleFloatAccessor = 'cssFloat';
|
33853 | if (ExecutionEnvironment.canUseDOM) {
|
33854 | var tempStyle = document.createElement('div').style;
|
33855 | try {
|
33856 |
|
33857 | tempStyle.font = '';
|
33858 | } catch (e) {
|
33859 | hasShorthandPropertyBug = true;
|
33860 | }
|
33861 |
|
33862 | if (document.documentElement.style.cssFloat === undefined) {
|
33863 | styleFloatAccessor = 'styleFloat';
|
33864 | }
|
33865 | }
|
33866 |
|
33867 | if (process.env.NODE_ENV !== 'production') {
|
33868 |
|
33869 | var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
|
33870 |
|
33871 |
|
33872 | var badStyleValueWithSemicolonPattern = /;\s*$/;
|
33873 |
|
33874 | var warnedStyleNames = {};
|
33875 | var warnedStyleValues = {};
|
33876 | var warnedForNaNValue = false;
|
33877 |
|
33878 | var warnHyphenatedStyleName = function (name, owner) {
|
33879 | if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
|
33880 | return;
|
33881 | }
|
33882 |
|
33883 | warnedStyleNames[name] = true;
|
33884 | process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;
|
33885 | };
|
33886 |
|
33887 | var warnBadVendoredStyleName = function (name, owner) {
|
33888 | if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
|
33889 | return;
|
33890 | }
|
33891 |
|
33892 | warnedStyleNames[name] = true;
|
33893 | process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0;
|
33894 | };
|
33895 |
|
33896 | var warnStyleValueWithSemicolon = function (name, value, owner) {
|
33897 | if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
|
33898 | return;
|
33899 | }
|
33900 |
|
33901 | warnedStyleValues[value] = true;
|
33902 | process.env.NODE_ENV !== 'production' ? warning(false, "Style property values shouldn't contain a semicolon.%s " + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
|
33903 | };
|
33904 |
|
33905 | var warnStyleValueIsNaN = function (name, value, owner) {
|
33906 | if (warnedForNaNValue) {
|
33907 | return;
|
33908 | }
|
33909 |
|
33910 | warnedForNaNValue = true;
|
33911 | process.env.NODE_ENV !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;
|
33912 | };
|
33913 |
|
33914 | var checkRenderMessage = function (owner) {
|
33915 | if (owner) {
|
33916 | var name = owner.getName();
|
33917 | if (name) {
|
33918 | return ' Check the render method of `' + name + '`.';
|
33919 | }
|
33920 | }
|
33921 | return '';
|
33922 | };
|
33923 |
|
33924 | |
33925 |
|
33926 |
|
33927 |
|
33928 |
|
33929 | var warnValidStyle = function (name, value, component) {
|
33930 | var owner;
|
33931 | if (component) {
|
33932 | owner = component._currentElement._owner;
|
33933 | }
|
33934 | if (name.indexOf('-') > -1) {
|
33935 | warnHyphenatedStyleName(name, owner);
|
33936 | } else if (badVendoredStyleNamePattern.test(name)) {
|
33937 | warnBadVendoredStyleName(name, owner);
|
33938 | } else if (badStyleValueWithSemicolonPattern.test(value)) {
|
33939 | warnStyleValueWithSemicolon(name, value, owner);
|
33940 | }
|
33941 |
|
33942 | if (typeof value === 'number' && isNaN(value)) {
|
33943 | warnStyleValueIsNaN(name, value, owner);
|
33944 | }
|
33945 | };
|
33946 | }
|
33947 |
|
33948 |
|
33949 |
|
33950 |
|
33951 | var CSSPropertyOperations = {
|
33952 | |
33953 |
|
33954 |
|
33955 |
|
33956 |
|
33957 |
|
33958 |
|
33959 |
|
33960 |
|
33961 |
|
33962 |
|
33963 |
|
33964 |
|
33965 | createMarkupForStyles: function (styles, component) {
|
33966 | var serialized = '';
|
33967 | for (var styleName in styles) {
|
33968 | if (!styles.hasOwnProperty(styleName)) {
|
33969 | continue;
|
33970 | }
|
33971 | var isCustomProperty = styleName.indexOf('--') === 0;
|
33972 | var styleValue = styles[styleName];
|
33973 | if (process.env.NODE_ENV !== 'production') {
|
33974 | if (!isCustomProperty) {
|
33975 | warnValidStyle(styleName, styleValue, component);
|
33976 | }
|
33977 | }
|
33978 | if (styleValue != null) {
|
33979 | serialized += processStyleName(styleName) + ':';
|
33980 | serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';';
|
33981 | }
|
33982 | }
|
33983 | return serialized || null;
|
33984 | },
|
33985 |
|
33986 | |
33987 |
|
33988 |
|
33989 |
|
33990 |
|
33991 |
|
33992 |
|
33993 |
|
33994 | setValueForStyles: function (node, styles, component) {
|
33995 | if (process.env.NODE_ENV !== 'production') {
|
33996 | ReactInstrumentation.debugTool.onHostOperation({
|
33997 | instanceID: component._debugID,
|
33998 | type: 'update styles',
|
33999 | payload: styles
|
34000 | });
|
34001 | }
|
34002 |
|
34003 | var style = node.style;
|
34004 | for (var styleName in styles) {
|
34005 | if (!styles.hasOwnProperty(styleName)) {
|
34006 | continue;
|
34007 | }
|
34008 | var isCustomProperty = styleName.indexOf('--') === 0;
|
34009 | if (process.env.NODE_ENV !== 'production') {
|
34010 | if (!isCustomProperty) {
|
34011 | warnValidStyle(styleName, styles[styleName], component);
|
34012 | }
|
34013 | }
|
34014 | var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty);
|
34015 | if (styleName === 'float' || styleName === 'cssFloat') {
|
34016 | styleName = styleFloatAccessor;
|
34017 | }
|
34018 | if (isCustomProperty) {
|
34019 | style.setProperty(styleName, styleValue);
|
34020 | } else if (styleValue) {
|
34021 | style[styleName] = styleValue;
|
34022 | } else {
|
34023 | var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
|
34024 | if (expansion) {
|
34025 |
|
34026 |
|
34027 | for (var individualStyleName in expansion) {
|
34028 | style[individualStyleName] = '';
|
34029 | }
|
34030 | } else {
|
34031 | style[styleName] = '';
|
34032 | }
|
34033 | }
|
34034 | }
|
34035 | }
|
34036 | };
|
34037 |
|
34038 | module.exports = CSSPropertyOperations;
|
34039 | }.call(exports, __webpack_require__(0)))
|
34040 |
|
34041 | }),
|
34042 |
|
34043 | (function(module, exports, __webpack_require__) {
|
34044 |
|
34045 | "use strict";
|
34046 |
|
34047 |
|
34048 |
|
34049 |
|
34050 |
|
34051 |
|
34052 |
|
34053 |
|
34054 |
|
34055 |
|
34056 |
|
34057 |
|
34058 |
|
34059 | var camelize = __webpack_require__(134);
|
34060 |
|
34061 | var msPattern = /^-ms-/;
|
34062 |
|
34063 |
|
34064 |
|
34065 |
|
34066 |
|
34067 |
|
34068 |
|
34069 |
|
34070 |
|
34071 |
|
34072 |
|
34073 |
|
34074 |
|
34075 |
|
34076 |
|
34077 |
|
34078 |
|
34079 |
|
34080 | function camelizeStyleName(string) {
|
34081 | return camelize(string.replace(msPattern, 'ms-'));
|
34082 | }
|
34083 |
|
34084 | module.exports = camelizeStyleName;
|
34085 |
|
34086 | }),
|
34087 |
|
34088 | (function(module, exports, __webpack_require__) {
|
34089 |
|
34090 | "use strict";
|
34091 |
|
34092 |
|
34093 |
|
34094 |
|
34095 |
|
34096 |
|
34097 |
|
34098 |
|
34099 |
|
34100 |
|
34101 |
|
34102 |
|
34103 |
|
34104 | var _hyphenPattern = /-(.)/g;
|
34105 |
|
34106 |
|
34107 |
|
34108 |
|
34109 |
|
34110 |
|
34111 |
|
34112 |
|
34113 |
|
34114 |
|
34115 | function camelize(string) {
|
34116 | return string.replace(_hyphenPattern, function (_, character) {
|
34117 | return character.toUpperCase();
|
34118 | });
|
34119 | }
|
34120 |
|
34121 | module.exports = camelize;
|
34122 |
|
34123 | }),
|
34124 |
|
34125 | (function(module, exports, __webpack_require__) {
|
34126 |
|
34127 | "use strict";
|
34128 | (function(process) { |
34129 |
|
34130 |
|
34131 |
|
34132 |
|
34133 |
|
34134 |
|
34135 |
|
34136 |
|
34137 |
|
34138 |
|
34139 |
|
34140 | var CSSProperty = __webpack_require__(75);
|
34141 | var warning = __webpack_require__(2);
|
34142 |
|
34143 | var isUnitlessNumber = CSSProperty.isUnitlessNumber;
|
34144 | var styleWarnings = {};
|
34145 |
|
34146 |
|
34147 |
|
34148 |
|
34149 |
|
34150 |
|
34151 |
|
34152 |
|
34153 |
|
34154 |
|
34155 |
|
34156 | function dangerousStyleValue(name, value, component, isCustomProperty) {
|
34157 |
|
34158 |
|
34159 |
|
34160 |
|
34161 |
|
34162 |
|
34163 |
|
34164 |
|
34165 |
|
34166 |
|
34167 | var isEmpty = value == null || typeof value === 'boolean' || value === '';
|
34168 | if (isEmpty) {
|
34169 | return '';
|
34170 | }
|
34171 |
|
34172 | var isNonNumeric = isNaN(value);
|
34173 | if (isCustomProperty || isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
|
34174 | return '' + value;
|
34175 | }
|
34176 |
|
34177 | if (typeof value === 'string') {
|
34178 | if (process.env.NODE_ENV !== 'production') {
|
34179 |
|
34180 |
|
34181 | if (component && value !== '0') {
|
34182 | var owner = component._currentElement._owner;
|
34183 | var ownerName = owner ? owner.getName() : null;
|
34184 | if (ownerName && !styleWarnings[ownerName]) {
|
34185 | styleWarnings[ownerName] = {};
|
34186 | }
|
34187 | var warned = false;
|
34188 | if (ownerName) {
|
34189 | var warnings = styleWarnings[ownerName];
|
34190 | warned = warnings[name];
|
34191 | if (!warned) {
|
34192 | warnings[name] = true;
|
34193 | }
|
34194 | }
|
34195 | if (!warned) {
|
34196 | process.env.NODE_ENV !== 'production' ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0;
|
34197 | }
|
34198 | }
|
34199 | }
|
34200 | value = value.trim();
|
34201 | }
|
34202 | return value + 'px';
|
34203 | }
|
34204 |
|
34205 | module.exports = dangerousStyleValue;
|
34206 | }.call(exports, __webpack_require__(0)))
|
34207 |
|
34208 | }),
|
34209 |
|
34210 | (function(module, exports, __webpack_require__) {
|
34211 |
|
34212 | "use strict";
|
34213 |
|
34214 |
|
34215 |
|
34216 |
|
34217 |
|
34218 |
|
34219 |
|
34220 |
|
34221 |
|
34222 |
|
34223 |
|
34224 |
|
34225 |
|
34226 | var hyphenate = __webpack_require__(137);
|
34227 |
|
34228 | var msPattern = /^ms-/;
|
34229 |
|
34230 |
|
34231 |
|
34232 |
|
34233 |
|
34234 |
|
34235 |
|
34236 |
|
34237 |
|
34238 |
|
34239 |
|
34240 |
|
34241 |
|
34242 |
|
34243 |
|
34244 |
|
34245 |
|
34246 | function hyphenateStyleName(string) {
|
34247 | return hyphenate(string).replace(msPattern, '-ms-');
|
34248 | }
|
34249 |
|
34250 | module.exports = hyphenateStyleName;
|
34251 |
|
34252 | }),
|
34253 |
|
34254 | (function(module, exports, __webpack_require__) {
|
34255 |
|
34256 | "use strict";
|
34257 |
|
34258 |
|
34259 |
|
34260 |
|
34261 |
|
34262 |
|
34263 |
|
34264 |
|
34265 |
|
34266 |
|
34267 |
|
34268 |
|
34269 |
|
34270 | var _uppercasePattern = /([A-Z])/g;
|
34271 |
|
34272 |
|
34273 |
|
34274 |
|
34275 |
|
34276 |
|
34277 |
|
34278 |
|
34279 |
|
34280 |
|
34281 |
|
34282 |
|
34283 |
|
34284 | function hyphenate(string) {
|
34285 | return string.replace(_uppercasePattern, '-$1').toLowerCase();
|
34286 | }
|
34287 |
|
34288 | module.exports = hyphenate;
|
34289 |
|
34290 | }),
|
34291 |
|
34292 | (function(module, exports, __webpack_require__) {
|
34293 |
|
34294 | "use strict";
|
34295 |
|
34296 |
|
34297 |
|
34298 |
|
34299 |
|
34300 |
|
34301 |
|
34302 |
|
34303 |
|
34304 |
|
34305 |
|
34306 |
|
34307 |
|
34308 |
|
34309 |
|
34310 |
|
34311 |
|
34312 |
|
34313 | function memoizeStringOnly(callback) {
|
34314 | var cache = {};
|
34315 | return function (string) {
|
34316 | if (!cache.hasOwnProperty(string)) {
|
34317 | cache[string] = callback.call(this, string);
|
34318 | }
|
34319 | return cache[string];
|
34320 | };
|
34321 | }
|
34322 |
|
34323 | module.exports = memoizeStringOnly;
|
34324 |
|
34325 | }),
|
34326 |
|
34327 | (function(module, exports, __webpack_require__) {
|
34328 |
|
34329 | "use strict";
|
34330 |
|
34331 |
|
34332 |
|
34333 |
|
34334 |
|
34335 |
|
34336 |
|
34337 |
|
34338 |
|
34339 |
|
34340 |
|
34341 |
|
34342 | var escapeTextContentForBrowser = __webpack_require__(32);
|
34343 |
|
34344 |
|
34345 |
|
34346 |
|
34347 |
|
34348 |
|
34349 |
|
34350 | function quoteAttributeValueForBrowser(value) {
|
34351 | return '"' + escapeTextContentForBrowser(value) + '"';
|
34352 | }
|
34353 |
|
34354 | module.exports = quoteAttributeValueForBrowser;
|
34355 |
|
34356 | }),
|
34357 |
|
34358 | (function(module, exports, __webpack_require__) {
|
34359 |
|
34360 | "use strict";
|
34361 |
|
34362 |
|
34363 |
|
34364 |
|
34365 |
|
34366 |
|
34367 |
|
34368 |
|
34369 |
|
34370 |
|
34371 |
|
34372 |
|
34373 | var EventPluginHub = __webpack_require__(22);
|
34374 |
|
34375 | function runEventQueueInBatch(events) {
|
34376 | EventPluginHub.enqueueEvents(events);
|
34377 | EventPluginHub.processEventQueue(false);
|
34378 | }
|
34379 |
|
34380 | var ReactEventEmitterMixin = {
|
34381 | |
34382 |
|
34383 |
|
34384 |
|
34385 | handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
34386 | var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
|
34387 | runEventQueueInBatch(events);
|
34388 | }
|
34389 | };
|
34390 |
|
34391 | module.exports = ReactEventEmitterMixin;
|
34392 |
|
34393 | }),
|
34394 |
|
34395 | (function(module, exports, __webpack_require__) {
|
34396 |
|
34397 | "use strict";
|
34398 |
|
34399 |
|
34400 |
|
34401 |
|
34402 |
|
34403 |
|
34404 |
|
34405 |
|
34406 |
|
34407 |
|
34408 |
|
34409 |
|
34410 | var ExecutionEnvironment = __webpack_require__(6);
|
34411 |
|
34412 |
|
34413 |
|
34414 |
|
34415 |
|
34416 |
|
34417 |
|
34418 |
|
34419 | function makePrefixMap(styleProp, eventName) {
|
34420 | var prefixes = {};
|
34421 |
|
34422 | prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
|
34423 | prefixes['Webkit' + styleProp] = 'webkit' + eventName;
|
34424 | prefixes['Moz' + styleProp] = 'moz' + eventName;
|
34425 | prefixes['ms' + styleProp] = 'MS' + eventName;
|
34426 | prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
|
34427 |
|
34428 | return prefixes;
|
34429 | }
|
34430 |
|
34431 |
|
34432 |
|
34433 |
|
34434 | var vendorPrefixes = {
|
34435 | animationend: makePrefixMap('Animation', 'AnimationEnd'),
|
34436 | animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
|
34437 | animationstart: makePrefixMap('Animation', 'AnimationStart'),
|
34438 | transitionend: makePrefixMap('Transition', 'TransitionEnd')
|
34439 | };
|
34440 |
|
34441 |
|
34442 |
|
34443 |
|
34444 | var prefixedEventNames = {};
|
34445 |
|
34446 |
|
34447 |
|
34448 |
|
34449 | var style = {};
|
34450 |
|
34451 |
|
34452 |
|
34453 |
|
34454 | if (ExecutionEnvironment.canUseDOM) {
|
34455 | style = document.createElement('div').style;
|
34456 |
|
34457 |
|
34458 |
|
34459 |
|
34460 |
|
34461 | if (!('AnimationEvent' in window)) {
|
34462 | delete vendorPrefixes.animationend.animation;
|
34463 | delete vendorPrefixes.animationiteration.animation;
|
34464 | delete vendorPrefixes.animationstart.animation;
|
34465 | }
|
34466 |
|
34467 |
|
34468 | if (!('TransitionEvent' in window)) {
|
34469 | delete vendorPrefixes.transitionend.transition;
|
34470 | }
|
34471 | }
|
34472 |
|
34473 |
|
34474 |
|
34475 |
|
34476 |
|
34477 |
|
34478 |
|
34479 | function getVendorPrefixedEventName(eventName) {
|
34480 | if (prefixedEventNames[eventName]) {
|
34481 | return prefixedEventNames[eventName];
|
34482 | } else if (!vendorPrefixes[eventName]) {
|
34483 | return eventName;
|
34484 | }
|
34485 |
|
34486 | var prefixMap = vendorPrefixes[eventName];
|
34487 |
|
34488 | for (var styleProp in prefixMap) {
|
34489 | if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
|
34490 | return prefixedEventNames[eventName] = prefixMap[styleProp];
|
34491 | }
|
34492 | }
|
34493 |
|
34494 | return '';
|
34495 | }
|
34496 |
|
34497 | module.exports = getVendorPrefixedEventName;
|
34498 |
|
34499 | }),
|
34500 |
|
34501 | (function(module, exports, __webpack_require__) {
|
34502 |
|
34503 | "use strict";
|
34504 | (function(process) { |
34505 |
|
34506 |
|
34507 |
|
34508 |
|
34509 |
|
34510 |
|
34511 |
|
34512 |
|
34513 |
|
34514 |
|
34515 |
|
34516 | var _prodInvariant = __webpack_require__(3),
|
34517 | _assign = __webpack_require__(4);
|
34518 |
|
34519 | var DOMPropertyOperations = __webpack_require__(76);
|
34520 | var LinkedValueUtils = __webpack_require__(46);
|
34521 | var ReactDOMComponentTree = __webpack_require__(5);
|
34522 | var ReactUpdates = __webpack_require__(11);
|
34523 |
|
34524 | var invariant = __webpack_require__(1);
|
34525 | var warning = __webpack_require__(2);
|
34526 |
|
34527 | var didWarnValueLink = false;
|
34528 | var didWarnCheckedLink = false;
|
34529 | var didWarnValueDefaultValue = false;
|
34530 | var didWarnCheckedDefaultChecked = false;
|
34531 | var didWarnControlledToUncontrolled = false;
|
34532 | var didWarnUncontrolledToControlled = false;
|
34533 |
|
34534 | function forceUpdateIfMounted() {
|
34535 | if (this._rootNodeID) {
|
34536 |
|
34537 | ReactDOMInput.updateWrapper(this);
|
34538 | }
|
34539 | }
|
34540 |
|
34541 | function isControlled(props) {
|
34542 | var usesChecked = props.type === 'checkbox' || props.type === 'radio';
|
34543 | return usesChecked ? props.checked != null : props.value != null;
|
34544 | }
|
34545 |
|
34546 |
|
34547 |
|
34548 |
|
34549 |
|
34550 |
|
34551 |
|
34552 |
|
34553 |
|
34554 |
|
34555 |
|
34556 |
|
34557 |
|
34558 |
|
34559 |
|
34560 |
|
34561 |
|
34562 | var ReactDOMInput = {
|
34563 | getHostProps: function (inst, props) {
|
34564 | var value = LinkedValueUtils.getValue(props);
|
34565 | var checked = LinkedValueUtils.getChecked(props);
|
34566 |
|
34567 | var hostProps = _assign({
|
34568 |
|
34569 |
|
34570 | type: undefined,
|
34571 |
|
34572 |
|
34573 | step: undefined,
|
34574 |
|
34575 |
|
34576 | min: undefined,
|
34577 | max: undefined
|
34578 | }, props, {
|
34579 | defaultChecked: undefined,
|
34580 | defaultValue: undefined,
|
34581 | value: value != null ? value : inst._wrapperState.initialValue,
|
34582 | checked: checked != null ? checked : inst._wrapperState.initialChecked,
|
34583 | onChange: inst._wrapperState.onChange
|
34584 | });
|
34585 |
|
34586 | return hostProps;
|
34587 | },
|
34588 |
|
34589 | mountWrapper: function (inst, props) {
|
34590 | if (process.env.NODE_ENV !== 'production') {
|
34591 | LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner);
|
34592 |
|
34593 | var owner = inst._currentElement._owner;
|
34594 |
|
34595 | if (props.valueLink !== undefined && !didWarnValueLink) {
|
34596 | process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
|
34597 | didWarnValueLink = true;
|
34598 | }
|
34599 | if (props.checkedLink !== undefined && !didWarnCheckedLink) {
|
34600 | process.env.NODE_ENV !== 'production' ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
|
34601 | didWarnCheckedLink = true;
|
34602 | }
|
34603 | if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
|
34604 | process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
|
34605 | didWarnCheckedDefaultChecked = true;
|
34606 | }
|
34607 | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
|
34608 | process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
|
34609 | didWarnValueDefaultValue = true;
|
34610 | }
|
34611 | }
|
34612 |
|
34613 | var defaultValue = props.defaultValue;
|
34614 | inst._wrapperState = {
|
34615 | initialChecked: props.checked != null ? props.checked : props.defaultChecked,
|
34616 | initialValue: props.value != null ? props.value : defaultValue,
|
34617 | listeners: null,
|
34618 | onChange: _handleChange.bind(inst),
|
34619 | controlled: isControlled(props)
|
34620 | };
|
34621 | },
|
34622 |
|
34623 | updateWrapper: function (inst) {
|
34624 | var props = inst._currentElement.props;
|
34625 |
|
34626 | if (process.env.NODE_ENV !== 'production') {
|
34627 | var controlled = isControlled(props);
|
34628 | var owner = inst._currentElement._owner;
|
34629 |
|
34630 | if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
|
34631 | process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
|
34632 | didWarnUncontrolledToControlled = true;
|
34633 | }
|
34634 | if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
|
34635 | process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
|
34636 | didWarnControlledToUncontrolled = true;
|
34637 | }
|
34638 | }
|
34639 |
|
34640 |
|
34641 | var checked = props.checked;
|
34642 | if (checked != null) {
|
34643 | DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false);
|
34644 | }
|
34645 |
|
34646 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
34647 | var value = LinkedValueUtils.getValue(props);
|
34648 | if (value != null) {
|
34649 | if (value === 0 && node.value === '') {
|
34650 | node.value = '0';
|
34651 |
|
34652 | } else if (props.type === 'number') {
|
34653 |
|
34654 | var valueAsNumber = parseFloat(node.value, 10) || 0;
|
34655 |
|
34656 | if (
|
34657 |
|
34658 | value != valueAsNumber ||
|
34659 |
|
34660 | value == valueAsNumber && node.value != value) {
|
34661 |
|
34662 |
|
34663 | node.value = '' + value;
|
34664 | }
|
34665 | } else if (node.value !== '' + value) {
|
34666 |
|
34667 |
|
34668 | node.value = '' + value;
|
34669 | }
|
34670 | } else {
|
34671 | if (props.value == null && props.defaultValue != null) {
|
34672 |
|
34673 |
|
34674 |
|
34675 |
|
34676 |
|
34677 |
|
34678 |
|
34679 |
|
34680 | if (node.defaultValue !== '' + props.defaultValue) {
|
34681 | node.defaultValue = '' + props.defaultValue;
|
34682 | }
|
34683 | }
|
34684 | if (props.checked == null && props.defaultChecked != null) {
|
34685 | node.defaultChecked = !!props.defaultChecked;
|
34686 | }
|
34687 | }
|
34688 | },
|
34689 |
|
34690 | postMountWrapper: function (inst) {
|
34691 | var props = inst._currentElement.props;
|
34692 |
|
34693 |
|
34694 |
|
34695 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
34696 |
|
34697 |
|
34698 |
|
34699 |
|
34700 |
|
34701 |
|
34702 |
|
34703 | switch (props.type) {
|
34704 | case 'submit':
|
34705 | case 'reset':
|
34706 | break;
|
34707 | case 'color':
|
34708 | case 'date':
|
34709 | case 'datetime':
|
34710 | case 'datetime-local':
|
34711 | case 'month':
|
34712 | case 'time':
|
34713 | case 'week':
|
34714 |
|
34715 |
|
34716 | node.value = '';
|
34717 | node.value = node.defaultValue;
|
34718 | break;
|
34719 | default:
|
34720 | node.value = node.value;
|
34721 | break;
|
34722 | }
|
34723 |
|
34724 |
|
34725 |
|
34726 |
|
34727 |
|
34728 |
|
34729 | var name = node.name;
|
34730 | if (name !== '') {
|
34731 | node.name = '';
|
34732 | }
|
34733 | node.defaultChecked = !node.defaultChecked;
|
34734 | node.defaultChecked = !node.defaultChecked;
|
34735 | if (name !== '') {
|
34736 | node.name = name;
|
34737 | }
|
34738 | }
|
34739 | };
|
34740 |
|
34741 | function _handleChange(event) {
|
34742 | var props = this._currentElement.props;
|
34743 |
|
34744 | var returnValue = LinkedValueUtils.executeOnChange(props, event);
|
34745 |
|
34746 |
|
34747 |
|
34748 |
|
34749 | ReactUpdates.asap(forceUpdateIfMounted, this);
|
34750 |
|
34751 | var name = props.name;
|
34752 | if (props.type === 'radio' && name != null) {
|
34753 | var rootNode = ReactDOMComponentTree.getNodeFromInstance(this);
|
34754 | var queryRoot = rootNode;
|
34755 |
|
34756 | while (queryRoot.parentNode) {
|
34757 | queryRoot = queryRoot.parentNode;
|
34758 | }
|
34759 |
|
34760 |
|
34761 |
|
34762 |
|
34763 |
|
34764 |
|
34765 |
|
34766 | var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
|
34767 |
|
34768 | for (var i = 0; i < group.length; i++) {
|
34769 | var otherNode = group[i];
|
34770 | if (otherNode === rootNode || otherNode.form !== rootNode.form) {
|
34771 | continue;
|
34772 | }
|
34773 |
|
34774 |
|
34775 |
|
34776 |
|
34777 | var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode);
|
34778 | !otherInstance ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0;
|
34779 |
|
34780 |
|
34781 |
|
34782 | ReactUpdates.asap(forceUpdateIfMounted, otherInstance);
|
34783 | }
|
34784 | }
|
34785 |
|
34786 | return returnValue;
|
34787 | }
|
34788 |
|
34789 | module.exports = ReactDOMInput;
|
34790 | }.call(exports, __webpack_require__(0)))
|
34791 |
|
34792 | }),
|
34793 |
|
34794 | (function(module, exports, __webpack_require__) {
|
34795 |
|
34796 | "use strict";
|
34797 | (function(process) { |
34798 |
|
34799 |
|
34800 |
|
34801 |
|
34802 |
|
34803 |
|
34804 |
|
34805 |
|
34806 |
|
34807 |
|
34808 |
|
34809 | var _assign = __webpack_require__(4);
|
34810 |
|
34811 | var React = __webpack_require__(17);
|
34812 | var ReactDOMComponentTree = __webpack_require__(5);
|
34813 | var ReactDOMSelect = __webpack_require__(78);
|
34814 |
|
34815 | var warning = __webpack_require__(2);
|
34816 | var didWarnInvalidOptionChildren = false;
|
34817 |
|
34818 | function flattenChildren(children) {
|
34819 | var content = '';
|
34820 |
|
34821 |
|
34822 |
|
34823 | React.Children.forEach(children, function (child) {
|
34824 | if (child == null) {
|
34825 | return;
|
34826 | }
|
34827 | if (typeof child === 'string' || typeof child === 'number') {
|
34828 | content += child;
|
34829 | } else if (!didWarnInvalidOptionChildren) {
|
34830 | didWarnInvalidOptionChildren = true;
|
34831 | process.env.NODE_ENV !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0;
|
34832 | }
|
34833 | });
|
34834 |
|
34835 | return content;
|
34836 | }
|
34837 |
|
34838 |
|
34839 |
|
34840 |
|
34841 | var ReactDOMOption = {
|
34842 | mountWrapper: function (inst, props, hostParent) {
|
34843 |
|
34844 | if (process.env.NODE_ENV !== 'production') {
|
34845 | process.env.NODE_ENV !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0;
|
34846 | }
|
34847 |
|
34848 |
|
34849 | var selectValue = null;
|
34850 | if (hostParent != null) {
|
34851 | var selectParent = hostParent;
|
34852 |
|
34853 | if (selectParent._tag === 'optgroup') {
|
34854 | selectParent = selectParent._hostParent;
|
34855 | }
|
34856 |
|
34857 | if (selectParent != null && selectParent._tag === 'select') {
|
34858 | selectValue = ReactDOMSelect.getSelectValueContext(selectParent);
|
34859 | }
|
34860 | }
|
34861 |
|
34862 |
|
34863 |
|
34864 | var selected = null;
|
34865 | if (selectValue != null) {
|
34866 | var value;
|
34867 | if (props.value != null) {
|
34868 | value = props.value + '';
|
34869 | } else {
|
34870 | value = flattenChildren(props.children);
|
34871 | }
|
34872 | selected = false;
|
34873 | if (Array.isArray(selectValue)) {
|
34874 |
|
34875 | for (var i = 0; i < selectValue.length; i++) {
|
34876 | if ('' + selectValue[i] === value) {
|
34877 | selected = true;
|
34878 | break;
|
34879 | }
|
34880 | }
|
34881 | } else {
|
34882 | selected = '' + selectValue === value;
|
34883 | }
|
34884 | }
|
34885 |
|
34886 | inst._wrapperState = { selected: selected };
|
34887 | },
|
34888 |
|
34889 | postMountWrapper: function (inst) {
|
34890 |
|
34891 | var props = inst._currentElement.props;
|
34892 | if (props.value != null) {
|
34893 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
34894 | node.setAttribute('value', props.value);
|
34895 | }
|
34896 | },
|
34897 |
|
34898 | getHostProps: function (inst, props) {
|
34899 | var hostProps = _assign({ selected: undefined, children: undefined }, props);
|
34900 |
|
34901 |
|
34902 |
|
34903 | if (inst._wrapperState.selected != null) {
|
34904 | hostProps.selected = inst._wrapperState.selected;
|
34905 | }
|
34906 |
|
34907 | var content = flattenChildren(props.children);
|
34908 |
|
34909 | if (content) {
|
34910 | hostProps.children = content;
|
34911 | }
|
34912 |
|
34913 | return hostProps;
|
34914 | }
|
34915 | };
|
34916 |
|
34917 | module.exports = ReactDOMOption;
|
34918 | }.call(exports, __webpack_require__(0)))
|
34919 |
|
34920 | }),
|
34921 |
|
34922 | (function(module, exports, __webpack_require__) {
|
34923 |
|
34924 | "use strict";
|
34925 | (function(process) { |
34926 |
|
34927 |
|
34928 |
|
34929 |
|
34930 |
|
34931 |
|
34932 |
|
34933 |
|
34934 |
|
34935 |
|
34936 |
|
34937 | var _prodInvariant = __webpack_require__(3),
|
34938 | _assign = __webpack_require__(4);
|
34939 |
|
34940 | var LinkedValueUtils = __webpack_require__(46);
|
34941 | var ReactDOMComponentTree = __webpack_require__(5);
|
34942 | var ReactUpdates = __webpack_require__(11);
|
34943 |
|
34944 | var invariant = __webpack_require__(1);
|
34945 | var warning = __webpack_require__(2);
|
34946 |
|
34947 | var didWarnValueLink = false;
|
34948 | var didWarnValDefaultVal = false;
|
34949 |
|
34950 | function forceUpdateIfMounted() {
|
34951 | if (this._rootNodeID) {
|
34952 |
|
34953 | ReactDOMTextarea.updateWrapper(this);
|
34954 | }
|
34955 | }
|
34956 |
|
34957 |
|
34958 |
|
34959 |
|
34960 |
|
34961 |
|
34962 |
|
34963 |
|
34964 |
|
34965 |
|
34966 |
|
34967 |
|
34968 |
|
34969 |
|
34970 |
|
34971 |
|
34972 | var ReactDOMTextarea = {
|
34973 | getHostProps: function (inst, props) {
|
34974 | !(props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0;
|
34975 |
|
34976 |
|
34977 |
|
34978 |
|
34979 |
|
34980 |
|
34981 | var hostProps = _assign({}, props, {
|
34982 | value: undefined,
|
34983 | defaultValue: undefined,
|
34984 | children: '' + inst._wrapperState.initialValue,
|
34985 | onChange: inst._wrapperState.onChange
|
34986 | });
|
34987 |
|
34988 | return hostProps;
|
34989 | },
|
34990 |
|
34991 | mountWrapper: function (inst, props) {
|
34992 | if (process.env.NODE_ENV !== 'production') {
|
34993 | LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner);
|
34994 | if (props.valueLink !== undefined && !didWarnValueLink) {
|
34995 | process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0;
|
34996 | didWarnValueLink = true;
|
34997 | }
|
34998 | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
|
34999 | process.env.NODE_ENV !== 'production' ? warning(false, 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;
|
35000 | didWarnValDefaultVal = true;
|
35001 | }
|
35002 | }
|
35003 |
|
35004 | var value = LinkedValueUtils.getValue(props);
|
35005 | var initialValue = value;
|
35006 |
|
35007 |
|
35008 | if (value == null) {
|
35009 | var defaultValue = props.defaultValue;
|
35010 |
|
35011 | var children = props.children;
|
35012 | if (children != null) {
|
35013 | if (process.env.NODE_ENV !== 'production') {
|
35014 | process.env.NODE_ENV !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0;
|
35015 | }
|
35016 | !(defaultValue == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0;
|
35017 | if (Array.isArray(children)) {
|
35018 | !(children.length <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0;
|
35019 | children = children[0];
|
35020 | }
|
35021 |
|
35022 | defaultValue = '' + children;
|
35023 | }
|
35024 | if (defaultValue == null) {
|
35025 | defaultValue = '';
|
35026 | }
|
35027 | initialValue = defaultValue;
|
35028 | }
|
35029 |
|
35030 | inst._wrapperState = {
|
35031 | initialValue: '' + initialValue,
|
35032 | listeners: null,
|
35033 | onChange: _handleChange.bind(inst)
|
35034 | };
|
35035 | },
|
35036 |
|
35037 | updateWrapper: function (inst) {
|
35038 | var props = inst._currentElement.props;
|
35039 |
|
35040 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
35041 | var value = LinkedValueUtils.getValue(props);
|
35042 | if (value != null) {
|
35043 |
|
35044 |
|
35045 | var newValue = '' + value;
|
35046 |
|
35047 |
|
35048 | if (newValue !== node.value) {
|
35049 | node.value = newValue;
|
35050 | }
|
35051 | if (props.defaultValue == null) {
|
35052 | node.defaultValue = newValue;
|
35053 | }
|
35054 | }
|
35055 | if (props.defaultValue != null) {
|
35056 | node.defaultValue = props.defaultValue;
|
35057 | }
|
35058 | },
|
35059 |
|
35060 | postMountWrapper: function (inst) {
|
35061 |
|
35062 |
|
35063 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
35064 | var textContent = node.textContent;
|
35065 |
|
35066 |
|
35067 |
|
35068 |
|
35069 |
|
35070 | if (textContent === inst._wrapperState.initialValue) {
|
35071 | node.value = textContent;
|
35072 | }
|
35073 | }
|
35074 | };
|
35075 |
|
35076 | function _handleChange(event) {
|
35077 | var props = this._currentElement.props;
|
35078 | var returnValue = LinkedValueUtils.executeOnChange(props, event);
|
35079 | ReactUpdates.asap(forceUpdateIfMounted, this);
|
35080 | return returnValue;
|
35081 | }
|
35082 |
|
35083 | module.exports = ReactDOMTextarea;
|
35084 | }.call(exports, __webpack_require__(0)))
|
35085 |
|
35086 | }),
|
35087 |
|
35088 | (function(module, exports, __webpack_require__) {
|
35089 |
|
35090 | "use strict";
|
35091 | (function(process) { |
35092 |
|
35093 |
|
35094 |
|
35095 |
|
35096 |
|
35097 |
|
35098 |
|
35099 |
|
35100 |
|
35101 |
|
35102 |
|
35103 | var _prodInvariant = __webpack_require__(3);
|
35104 |
|
35105 | var ReactComponentEnvironment = __webpack_require__(47);
|
35106 | var ReactInstanceMap = __webpack_require__(24);
|
35107 | var ReactInstrumentation = __webpack_require__(9);
|
35108 |
|
35109 | var ReactCurrentOwner = __webpack_require__(10);
|
35110 | var ReactReconciler = __webpack_require__(19);
|
35111 | var ReactChildReconciler = __webpack_require__(146);
|
35112 |
|
35113 | var emptyFunction = __webpack_require__(8);
|
35114 | var flattenChildren = __webpack_require__(153);
|
35115 | var invariant = __webpack_require__(1);
|
35116 |
|
35117 |
|
35118 |
|
35119 |
|
35120 |
|
35121 |
|
35122 |
|
35123 |
|
35124 | function makeInsertMarkup(markup, afterNode, toIndex) {
|
35125 |
|
35126 | return {
|
35127 | type: 'INSERT_MARKUP',
|
35128 | content: markup,
|
35129 | fromIndex: null,
|
35130 | fromNode: null,
|
35131 | toIndex: toIndex,
|
35132 | afterNode: afterNode
|
35133 | };
|
35134 | }
|
35135 |
|
35136 |
|
35137 |
|
35138 |
|
35139 |
|
35140 |
|
35141 |
|
35142 |
|
35143 | function makeMove(child, afterNode, toIndex) {
|
35144 |
|
35145 | return {
|
35146 | type: 'MOVE_EXISTING',
|
35147 | content: null,
|
35148 | fromIndex: child._mountIndex,
|
35149 | fromNode: ReactReconciler.getHostNode(child),
|
35150 | toIndex: toIndex,
|
35151 | afterNode: afterNode
|
35152 | };
|
35153 | }
|
35154 |
|
35155 |
|
35156 |
|
35157 |
|
35158 |
|
35159 |
|
35160 |
|
35161 | function makeRemove(child, node) {
|
35162 |
|
35163 | return {
|
35164 | type: 'REMOVE_NODE',
|
35165 | content: null,
|
35166 | fromIndex: child._mountIndex,
|
35167 | fromNode: node,
|
35168 | toIndex: null,
|
35169 | afterNode: null
|
35170 | };
|
35171 | }
|
35172 |
|
35173 |
|
35174 |
|
35175 |
|
35176 |
|
35177 |
|
35178 |
|
35179 | function makeSetMarkup(markup) {
|
35180 |
|
35181 | return {
|
35182 | type: 'SET_MARKUP',
|
35183 | content: markup,
|
35184 | fromIndex: null,
|
35185 | fromNode: null,
|
35186 | toIndex: null,
|
35187 | afterNode: null
|
35188 | };
|
35189 | }
|
35190 |
|
35191 |
|
35192 |
|
35193 |
|
35194 |
|
35195 |
|
35196 |
|
35197 | function makeTextContent(textContent) {
|
35198 |
|
35199 | return {
|
35200 | type: 'TEXT_CONTENT',
|
35201 | content: textContent,
|
35202 | fromIndex: null,
|
35203 | fromNode: null,
|
35204 | toIndex: null,
|
35205 | afterNode: null
|
35206 | };
|
35207 | }
|
35208 |
|
35209 |
|
35210 |
|
35211 |
|
35212 |
|
35213 | function enqueue(queue, update) {
|
35214 | if (update) {
|
35215 | queue = queue || [];
|
35216 | queue.push(update);
|
35217 | }
|
35218 | return queue;
|
35219 | }
|
35220 |
|
35221 |
|
35222 |
|
35223 |
|
35224 |
|
35225 |
|
35226 | function processQueue(inst, updateQueue) {
|
35227 | ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue);
|
35228 | }
|
35229 |
|
35230 | var setChildrenForInstrumentation = emptyFunction;
|
35231 | if (process.env.NODE_ENV !== 'production') {
|
35232 | var getDebugID = function (inst) {
|
35233 | if (!inst._debugID) {
|
35234 |
|
35235 | var internal;
|
35236 | if (internal = ReactInstanceMap.get(inst)) {
|
35237 | inst = internal;
|
35238 | }
|
35239 | }
|
35240 | return inst._debugID;
|
35241 | };
|
35242 | setChildrenForInstrumentation = function (children) {
|
35243 | var debugID = getDebugID(this);
|
35244 |
|
35245 |
|
35246 | if (debugID !== 0) {
|
35247 | ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) {
|
35248 | return children[key]._debugID;
|
35249 | }) : []);
|
35250 | }
|
35251 | };
|
35252 | }
|
35253 |
|
35254 |
|
35255 |
|
35256 |
|
35257 |
|
35258 |
|
35259 |
|
35260 | var ReactMultiChild = {
|
35261 | |
35262 |
|
35263 |
|
35264 |
|
35265 |
|
35266 |
|
35267 |
|
35268 | Mixin: {
|
35269 | _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) {
|
35270 | if (process.env.NODE_ENV !== 'production') {
|
35271 | var selfDebugID = getDebugID(this);
|
35272 | if (this._currentElement) {
|
35273 | try {
|
35274 | ReactCurrentOwner.current = this._currentElement._owner;
|
35275 | return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID);
|
35276 | } finally {
|
35277 | ReactCurrentOwner.current = null;
|
35278 | }
|
35279 | }
|
35280 | }
|
35281 | return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);
|
35282 | },
|
35283 |
|
35284 | _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) {
|
35285 | var nextChildren;
|
35286 | var selfDebugID = 0;
|
35287 | if (process.env.NODE_ENV !== 'production') {
|
35288 | selfDebugID = getDebugID(this);
|
35289 | if (this._currentElement) {
|
35290 | try {
|
35291 | ReactCurrentOwner.current = this._currentElement._owner;
|
35292 | nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
|
35293 | } finally {
|
35294 | ReactCurrentOwner.current = null;
|
35295 | }
|
35296 | ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
|
35297 | return nextChildren;
|
35298 | }
|
35299 | }
|
35300 | nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
|
35301 | ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
|
35302 | return nextChildren;
|
35303 | },
|
35304 |
|
35305 | |
35306 |
|
35307 |
|
35308 |
|
35309 |
|
35310 |
|
35311 |
|
35312 |
|
35313 | mountChildren: function (nestedChildren, transaction, context) {
|
35314 | var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context);
|
35315 | this._renderedChildren = children;
|
35316 |
|
35317 | var mountImages = [];
|
35318 | var index = 0;
|
35319 | for (var name in children) {
|
35320 | if (children.hasOwnProperty(name)) {
|
35321 | var child = children[name];
|
35322 | var selfDebugID = 0;
|
35323 | if (process.env.NODE_ENV !== 'production') {
|
35324 | selfDebugID = getDebugID(this);
|
35325 | }
|
35326 | var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);
|
35327 | child._mountIndex = index++;
|
35328 | mountImages.push(mountImage);
|
35329 | }
|
35330 | }
|
35331 |
|
35332 | if (process.env.NODE_ENV !== 'production') {
|
35333 | setChildrenForInstrumentation.call(this, children);
|
35334 | }
|
35335 |
|
35336 | return mountImages;
|
35337 | },
|
35338 |
|
35339 | |
35340 |
|
35341 |
|
35342 |
|
35343 |
|
35344 |
|
35345 | updateTextContent: function (nextContent) {
|
35346 | var prevChildren = this._renderedChildren;
|
35347 |
|
35348 | ReactChildReconciler.unmountChildren(prevChildren, false);
|
35349 | for (var name in prevChildren) {
|
35350 | if (prevChildren.hasOwnProperty(name)) {
|
35351 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
|
35352 | }
|
35353 | }
|
35354 |
|
35355 | var updates = [makeTextContent(nextContent)];
|
35356 | processQueue(this, updates);
|
35357 | },
|
35358 |
|
35359 | |
35360 |
|
35361 |
|
35362 |
|
35363 |
|
35364 |
|
35365 | updateMarkup: function (nextMarkup) {
|
35366 | var prevChildren = this._renderedChildren;
|
35367 |
|
35368 | ReactChildReconciler.unmountChildren(prevChildren, false);
|
35369 | for (var name in prevChildren) {
|
35370 | if (prevChildren.hasOwnProperty(name)) {
|
35371 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
|
35372 | }
|
35373 | }
|
35374 | var updates = [makeSetMarkup(nextMarkup)];
|
35375 | processQueue(this, updates);
|
35376 | },
|
35377 |
|
35378 | |
35379 |
|
35380 |
|
35381 |
|
35382 |
|
35383 |
|
35384 |
|
35385 | updateChildren: function (nextNestedChildrenElements, transaction, context) {
|
35386 |
|
35387 | this._updateChildren(nextNestedChildrenElements, transaction, context);
|
35388 | },
|
35389 |
|
35390 | |
35391 |
|
35392 |
|
35393 |
|
35394 |
|
35395 |
|
35396 | _updateChildren: function (nextNestedChildrenElements, transaction, context) {
|
35397 | var prevChildren = this._renderedChildren;
|
35398 | var removedNodes = {};
|
35399 | var mountImages = [];
|
35400 | var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context);
|
35401 | if (!nextChildren && !prevChildren) {
|
35402 | return;
|
35403 | }
|
35404 | var updates = null;
|
35405 | var name;
|
35406 |
|
35407 |
|
35408 | var nextIndex = 0;
|
35409 | var lastIndex = 0;
|
35410 |
|
35411 | var nextMountIndex = 0;
|
35412 | var lastPlacedNode = null;
|
35413 | for (name in nextChildren) {
|
35414 | if (!nextChildren.hasOwnProperty(name)) {
|
35415 | continue;
|
35416 | }
|
35417 | var prevChild = prevChildren && prevChildren[name];
|
35418 | var nextChild = nextChildren[name];
|
35419 | if (prevChild === nextChild) {
|
35420 | updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex));
|
35421 | lastIndex = Math.max(prevChild._mountIndex, lastIndex);
|
35422 | prevChild._mountIndex = nextIndex;
|
35423 | } else {
|
35424 | if (prevChild) {
|
35425 |
|
35426 | lastIndex = Math.max(prevChild._mountIndex, lastIndex);
|
35427 |
|
35428 | }
|
35429 |
|
35430 | updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context));
|
35431 | nextMountIndex++;
|
35432 | }
|
35433 | nextIndex++;
|
35434 | lastPlacedNode = ReactReconciler.getHostNode(nextChild);
|
35435 | }
|
35436 |
|
35437 | for (name in removedNodes) {
|
35438 | if (removedNodes.hasOwnProperty(name)) {
|
35439 | updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name]));
|
35440 | }
|
35441 | }
|
35442 | if (updates) {
|
35443 | processQueue(this, updates);
|
35444 | }
|
35445 | this._renderedChildren = nextChildren;
|
35446 |
|
35447 | if (process.env.NODE_ENV !== 'production') {
|
35448 | setChildrenForInstrumentation.call(this, nextChildren);
|
35449 | }
|
35450 | },
|
35451 |
|
35452 | |
35453 |
|
35454 |
|
35455 |
|
35456 |
|
35457 |
|
35458 |
|
35459 | unmountChildren: function (safely) {
|
35460 | var renderedChildren = this._renderedChildren;
|
35461 | ReactChildReconciler.unmountChildren(renderedChildren, safely);
|
35462 | this._renderedChildren = null;
|
35463 | },
|
35464 |
|
35465 | |
35466 |
|
35467 |
|
35468 |
|
35469 |
|
35470 |
|
35471 |
|
35472 |
|
35473 | moveChild: function (child, afterNode, toIndex, lastIndex) {
|
35474 |
|
35475 |
|
35476 |
|
35477 | if (child._mountIndex < lastIndex) {
|
35478 | return makeMove(child, afterNode, toIndex);
|
35479 | }
|
35480 | },
|
35481 |
|
35482 | |
35483 |
|
35484 |
|
35485 |
|
35486 |
|
35487 |
|
35488 |
|
35489 | createChild: function (child, afterNode, mountImage) {
|
35490 | return makeInsertMarkup(mountImage, afterNode, child._mountIndex);
|
35491 | },
|
35492 |
|
35493 | |
35494 |
|
35495 |
|
35496 |
|
35497 |
|
35498 |
|
35499 | removeChild: function (child, node) {
|
35500 | return makeRemove(child, node);
|
35501 | },
|
35502 |
|
35503 | |
35504 |
|
35505 |
|
35506 |
|
35507 |
|
35508 |
|
35509 |
|
35510 |
|
35511 |
|
35512 |
|
35513 |
|
35514 | _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) {
|
35515 | child._mountIndex = index;
|
35516 | return this.createChild(child, afterNode, mountImage);
|
35517 | },
|
35518 |
|
35519 | |
35520 |
|
35521 |
|
35522 |
|
35523 |
|
35524 |
|
35525 |
|
35526 |
|
35527 | _unmountChild: function (child, node) {
|
35528 | var update = this.removeChild(child, node);
|
35529 | child._mountIndex = null;
|
35530 | return update;
|
35531 | }
|
35532 | }
|
35533 | };
|
35534 |
|
35535 | module.exports = ReactMultiChild;
|
35536 | }.call(exports, __webpack_require__(0)))
|
35537 |
|
35538 | }),
|
35539 |
|
35540 | (function(module, exports, __webpack_require__) {
|
35541 |
|
35542 | "use strict";
|
35543 | (function(process) { |
35544 |
|
35545 |
|
35546 |
|
35547 |
|
35548 |
|
35549 |
|
35550 |
|
35551 |
|
35552 |
|
35553 |
|
35554 |
|
35555 | var ReactReconciler = __webpack_require__(19);
|
35556 |
|
35557 | var instantiateReactComponent = __webpack_require__(79);
|
35558 | var KeyEscapeUtils = __webpack_require__(50);
|
35559 | var shouldUpdateReactComponent = __webpack_require__(49);
|
35560 | var traverseAllChildren = __webpack_require__(83);
|
35561 | var warning = __webpack_require__(2);
|
35562 |
|
35563 | var ReactComponentTreeHook;
|
35564 |
|
35565 | if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
|
35566 |
|
35567 |
|
35568 |
|
35569 |
|
35570 |
|
35571 | ReactComponentTreeHook = __webpack_require__(7);
|
35572 | }
|
35573 |
|
35574 | function instantiateChild(childInstances, child, name, selfDebugID) {
|
35575 |
|
35576 | var keyUnique = childInstances[name] === undefined;
|
35577 | if (process.env.NODE_ENV !== 'production') {
|
35578 | if (!ReactComponentTreeHook) {
|
35579 | ReactComponentTreeHook = __webpack_require__(7);
|
35580 | }
|
35581 | if (!keyUnique) {
|
35582 | process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
|
35583 | }
|
35584 | }
|
35585 | if (child != null && keyUnique) {
|
35586 | childInstances[name] = instantiateReactComponent(child, true);
|
35587 | }
|
35588 | }
|
35589 |
|
35590 |
|
35591 |
|
35592 |
|
35593 |
|
35594 |
|
35595 | var ReactChildReconciler = {
|
35596 | |
35597 |
|
35598 |
|
35599 |
|
35600 |
|
35601 |
|
35602 |
|
35603 |
|
35604 | instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID) // 0 in production and for roots
|
35605 | {
|
35606 | if (nestedChildNodes == null) {
|
35607 | return null;
|
35608 | }
|
35609 | var childInstances = {};
|
35610 |
|
35611 | if (process.env.NODE_ENV !== 'production') {
|
35612 | traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {
|
35613 | return instantiateChild(childInsts, child, name, selfDebugID);
|
35614 | }, childInstances);
|
35615 | } else {
|
35616 | traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);
|
35617 | }
|
35618 | return childInstances;
|
35619 | },
|
35620 |
|
35621 | |
35622 |
|
35623 |
|
35624 |
|
35625 |
|
35626 |
|
35627 |
|
35628 |
|
35629 |
|
35630 |
|
35631 | updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) // 0 in production and for roots
|
35632 | {
|
35633 |
|
35634 |
|
35635 |
|
35636 |
|
35637 |
|
35638 | if (!nextChildren && !prevChildren) {
|
35639 | return;
|
35640 | }
|
35641 | var name;
|
35642 | var prevChild;
|
35643 | for (name in nextChildren) {
|
35644 | if (!nextChildren.hasOwnProperty(name)) {
|
35645 | continue;
|
35646 | }
|
35647 | prevChild = prevChildren && prevChildren[name];
|
35648 | var prevElement = prevChild && prevChild._currentElement;
|
35649 | var nextElement = nextChildren[name];
|
35650 | if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {
|
35651 | ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);
|
35652 | nextChildren[name] = prevChild;
|
35653 | } else {
|
35654 | if (prevChild) {
|
35655 | removedNodes[name] = ReactReconciler.getHostNode(prevChild);
|
35656 | ReactReconciler.unmountComponent(prevChild, false);
|
35657 | }
|
35658 |
|
35659 | var nextChildInstance = instantiateReactComponent(nextElement, true);
|
35660 | nextChildren[name] = nextChildInstance;
|
35661 |
|
35662 |
|
35663 | var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);
|
35664 | mountImages.push(nextChildMountImage);
|
35665 | }
|
35666 | }
|
35667 |
|
35668 | for (name in prevChildren) {
|
35669 | if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
|
35670 | prevChild = prevChildren[name];
|
35671 | removedNodes[name] = ReactReconciler.getHostNode(prevChild);
|
35672 | ReactReconciler.unmountComponent(prevChild, false);
|
35673 | }
|
35674 | }
|
35675 | },
|
35676 |
|
35677 | |
35678 |
|
35679 |
|
35680 |
|
35681 |
|
35682 |
|
35683 |
|
35684 | unmountChildren: function (renderedChildren, safely) {
|
35685 | for (var name in renderedChildren) {
|
35686 | if (renderedChildren.hasOwnProperty(name)) {
|
35687 | var renderedChild = renderedChildren[name];
|
35688 | ReactReconciler.unmountComponent(renderedChild, safely);
|
35689 | }
|
35690 | }
|
35691 | }
|
35692 | };
|
35693 |
|
35694 | module.exports = ReactChildReconciler;
|
35695 | }.call(exports, __webpack_require__(0)))
|
35696 |
|
35697 | }),
|
35698 |
|
35699 | (function(module, exports, __webpack_require__) {
|
35700 |
|
35701 | "use strict";
|
35702 | (function(process) { |
35703 |
|
35704 |
|
35705 |
|
35706 |
|
35707 |
|
35708 |
|
35709 |
|
35710 |
|
35711 |
|
35712 |
|
35713 |
|
35714 | var _prodInvariant = __webpack_require__(3),
|
35715 | _assign = __webpack_require__(4);
|
35716 |
|
35717 | var React = __webpack_require__(17);
|
35718 | var ReactComponentEnvironment = __webpack_require__(47);
|
35719 | var ReactCurrentOwner = __webpack_require__(10);
|
35720 | var ReactErrorUtils = __webpack_require__(39);
|
35721 | var ReactInstanceMap = __webpack_require__(24);
|
35722 | var ReactInstrumentation = __webpack_require__(9);
|
35723 | var ReactNodeTypes = __webpack_require__(80);
|
35724 | var ReactReconciler = __webpack_require__(19);
|
35725 |
|
35726 | if (process.env.NODE_ENV !== 'production') {
|
35727 | var checkReactTypeSpec = __webpack_require__(148);
|
35728 | }
|
35729 |
|
35730 | var emptyObject = __webpack_require__(27);
|
35731 | var invariant = __webpack_require__(1);
|
35732 | var shallowEqual = __webpack_require__(48);
|
35733 | var shouldUpdateReactComponent = __webpack_require__(49);
|
35734 | var warning = __webpack_require__(2);
|
35735 |
|
35736 | var CompositeTypes = {
|
35737 | ImpureClass: 0,
|
35738 | PureClass: 1,
|
35739 | StatelessFunctional: 2
|
35740 | };
|
35741 |
|
35742 | function StatelessComponent(Component) {}
|
35743 | StatelessComponent.prototype.render = function () {
|
35744 | var Component = ReactInstanceMap.get(this)._currentElement.type;
|
35745 | var element = Component(this.props, this.context, this.updater);
|
35746 | warnIfInvalidElement(Component, element);
|
35747 | return element;
|
35748 | };
|
35749 |
|
35750 | function warnIfInvalidElement(Component, element) {
|
35751 | if (process.env.NODE_ENV !== 'production') {
|
35752 | process.env.NODE_ENV !== 'production' ? warning(element === null || element === false || React.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0;
|
35753 | process.env.NODE_ENV !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0;
|
35754 | }
|
35755 | }
|
35756 |
|
35757 | function shouldConstruct(Component) {
|
35758 | return !!(Component.prototype && Component.prototype.isReactComponent);
|
35759 | }
|
35760 |
|
35761 | function isPureComponent(Component) {
|
35762 | return !!(Component.prototype && Component.prototype.isPureReactComponent);
|
35763 | }
|
35764 |
|
35765 |
|
35766 | function measureLifeCyclePerf(fn, debugID, timerType) {
|
35767 | if (debugID === 0) {
|
35768 |
|
35769 |
|
35770 |
|
35771 | return fn();
|
35772 | }
|
35773 |
|
35774 | ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);
|
35775 | try {
|
35776 | return fn();
|
35777 | } finally {
|
35778 | ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);
|
35779 | }
|
35780 | }
|
35781 |
|
35782 |
|
35783 |
|
35784 |
|
35785 |
|
35786 |
|
35787 |
|
35788 |
|
35789 |
|
35790 |
|
35791 |
|
35792 |
|
35793 |
|
35794 |
|
35795 |
|
35796 |
|
35797 |
|
35798 |
|
35799 |
|
35800 |
|
35801 |
|
35802 |
|
35803 |
|
35804 |
|
35805 |
|
35806 |
|
35807 |
|
35808 |
|
35809 |
|
35810 |
|
35811 |
|
35812 |
|
35813 |
|
35814 |
|
35815 | var nextMountID = 1;
|
35816 |
|
35817 |
|
35818 |
|
35819 |
|
35820 | var ReactCompositeComponent = {
|
35821 | |
35822 |
|
35823 |
|
35824 |
|
35825 |
|
35826 |
|
35827 |
|
35828 | construct: function (element) {
|
35829 | this._currentElement = element;
|
35830 | this._rootNodeID = 0;
|
35831 | this._compositeType = null;
|
35832 | this._instance = null;
|
35833 | this._hostParent = null;
|
35834 | this._hostContainerInfo = null;
|
35835 |
|
35836 |
|
35837 | this._updateBatchNumber = null;
|
35838 | this._pendingElement = null;
|
35839 | this._pendingStateQueue = null;
|
35840 | this._pendingReplaceState = false;
|
35841 | this._pendingForceUpdate = false;
|
35842 |
|
35843 | this._renderedNodeType = null;
|
35844 | this._renderedComponent = null;
|
35845 | this._context = null;
|
35846 | this._mountOrder = 0;
|
35847 | this._topLevelWrapper = null;
|
35848 |
|
35849 |
|
35850 | this._pendingCallbacks = null;
|
35851 |
|
35852 |
|
35853 | this._calledComponentWillUnmount = false;
|
35854 |
|
35855 | if (process.env.NODE_ENV !== 'production') {
|
35856 | this._warnedAboutRefsInRender = false;
|
35857 | }
|
35858 | },
|
35859 |
|
35860 | |
35861 |
|
35862 |
|
35863 |
|
35864 |
|
35865 |
|
35866 |
|
35867 |
|
35868 |
|
35869 |
|
35870 |
|
35871 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
35872 | var _this = this;
|
35873 |
|
35874 | this._context = context;
|
35875 | this._mountOrder = nextMountID++;
|
35876 | this._hostParent = hostParent;
|
35877 | this._hostContainerInfo = hostContainerInfo;
|
35878 |
|
35879 | var publicProps = this._currentElement.props;
|
35880 | var publicContext = this._processContext(context);
|
35881 |
|
35882 | var Component = this._currentElement.type;
|
35883 |
|
35884 | var updateQueue = transaction.getUpdateQueue();
|
35885 |
|
35886 |
|
35887 | var doConstruct = shouldConstruct(Component);
|
35888 | var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);
|
35889 | var renderedElement;
|
35890 |
|
35891 |
|
35892 | if (!doConstruct && (inst == null || inst.render == null)) {
|
35893 | renderedElement = inst;
|
35894 | warnIfInvalidElement(Component, renderedElement);
|
35895 | !(inst === null || inst === false || React.isValidElement(inst)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : _prodInvariant('105', Component.displayName || Component.name || 'Component') : void 0;
|
35896 | inst = new StatelessComponent(Component);
|
35897 | this._compositeType = CompositeTypes.StatelessFunctional;
|
35898 | } else {
|
35899 | if (isPureComponent(Component)) {
|
35900 | this._compositeType = CompositeTypes.PureClass;
|
35901 | } else {
|
35902 | this._compositeType = CompositeTypes.ImpureClass;
|
35903 | }
|
35904 | }
|
35905 |
|
35906 | if (process.env.NODE_ENV !== 'production') {
|
35907 |
|
35908 |
|
35909 | if (inst.render == null) {
|
35910 | process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component') : void 0;
|
35911 | }
|
35912 |
|
35913 | var propsMutated = inst.props !== publicProps;
|
35914 | var componentName = Component.displayName || Component.name || 'Component';
|
35915 |
|
35916 | process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", componentName, componentName) : void 0;
|
35917 | }
|
35918 |
|
35919 |
|
35920 |
|
35921 | inst.props = publicProps;
|
35922 | inst.context = publicContext;
|
35923 | inst.refs = emptyObject;
|
35924 | inst.updater = updateQueue;
|
35925 |
|
35926 | this._instance = inst;
|
35927 |
|
35928 |
|
35929 | ReactInstanceMap.set(inst, this);
|
35930 |
|
35931 | if (process.env.NODE_ENV !== 'production') {
|
35932 |
|
35933 |
|
35934 |
|
35935 | process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0;
|
35936 | process.env.NODE_ENV !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0;
|
35937 | process.env.NODE_ENV !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0;
|
35938 | process.env.NODE_ENV !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0;
|
35939 | process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : void 0;
|
35940 | process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : void 0;
|
35941 | process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0;
|
35942 | }
|
35943 |
|
35944 | var initialState = inst.state;
|
35945 | if (initialState === undefined) {
|
35946 | inst.state = initialState = null;
|
35947 | }
|
35948 | !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0;
|
35949 |
|
35950 | this._pendingStateQueue = null;
|
35951 | this._pendingReplaceState = false;
|
35952 | this._pendingForceUpdate = false;
|
35953 |
|
35954 | var markup;
|
35955 | if (inst.unstable_handleError) {
|
35956 | markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
35957 | } else {
|
35958 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
35959 | }
|
35960 |
|
35961 | if (inst.componentDidMount) {
|
35962 | if (process.env.NODE_ENV !== 'production') {
|
35963 | transaction.getReactMountReady().enqueue(function () {
|
35964 | measureLifeCyclePerf(function () {
|
35965 | return inst.componentDidMount();
|
35966 | }, _this._debugID, 'componentDidMount');
|
35967 | });
|
35968 | } else {
|
35969 | transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
|
35970 | }
|
35971 | }
|
35972 |
|
35973 | return markup;
|
35974 | },
|
35975 |
|
35976 | _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) {
|
35977 | if (process.env.NODE_ENV !== 'production') {
|
35978 | ReactCurrentOwner.current = this;
|
35979 | try {
|
35980 | return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
|
35981 | } finally {
|
35982 | ReactCurrentOwner.current = null;
|
35983 | }
|
35984 | } else {
|
35985 | return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
|
35986 | }
|
35987 | },
|
35988 |
|
35989 | _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) {
|
35990 | var Component = this._currentElement.type;
|
35991 |
|
35992 | if (doConstruct) {
|
35993 | if (process.env.NODE_ENV !== 'production') {
|
35994 | return measureLifeCyclePerf(function () {
|
35995 | return new Component(publicProps, publicContext, updateQueue);
|
35996 | }, this._debugID, 'ctor');
|
35997 | } else {
|
35998 | return new Component(publicProps, publicContext, updateQueue);
|
35999 | }
|
36000 | }
|
36001 |
|
36002 |
|
36003 |
|
36004 | if (process.env.NODE_ENV !== 'production') {
|
36005 | return measureLifeCyclePerf(function () {
|
36006 | return Component(publicProps, publicContext, updateQueue);
|
36007 | }, this._debugID, 'render');
|
36008 | } else {
|
36009 | return Component(publicProps, publicContext, updateQueue);
|
36010 | }
|
36011 | },
|
36012 |
|
36013 | performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
|
36014 | var markup;
|
36015 | var checkpoint = transaction.checkpoint();
|
36016 | try {
|
36017 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
36018 | } catch (e) {
|
36019 |
|
36020 | transaction.rollback(checkpoint);
|
36021 | this._instance.unstable_handleError(e);
|
36022 | if (this._pendingStateQueue) {
|
36023 | this._instance.state = this._processPendingState(this._instance.props, this._instance.context);
|
36024 | }
|
36025 | checkpoint = transaction.checkpoint();
|
36026 |
|
36027 | this._renderedComponent.unmountComponent(true);
|
36028 | transaction.rollback(checkpoint);
|
36029 |
|
36030 |
|
36031 |
|
36032 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
36033 | }
|
36034 | return markup;
|
36035 | },
|
36036 |
|
36037 | performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
|
36038 | var inst = this._instance;
|
36039 |
|
36040 | var debugID = 0;
|
36041 | if (process.env.NODE_ENV !== 'production') {
|
36042 | debugID = this._debugID;
|
36043 | }
|
36044 |
|
36045 | if (inst.componentWillMount) {
|
36046 | if (process.env.NODE_ENV !== 'production') {
|
36047 | measureLifeCyclePerf(function () {
|
36048 | return inst.componentWillMount();
|
36049 | }, debugID, 'componentWillMount');
|
36050 | } else {
|
36051 | inst.componentWillMount();
|
36052 | }
|
36053 |
|
36054 |
|
36055 | if (this._pendingStateQueue) {
|
36056 | inst.state = this._processPendingState(inst.props, inst.context);
|
36057 | }
|
36058 | }
|
36059 |
|
36060 |
|
36061 | if (renderedElement === undefined) {
|
36062 | renderedElement = this._renderValidatedComponent();
|
36063 | }
|
36064 |
|
36065 | var nodeType = ReactNodeTypes.getType(renderedElement);
|
36066 | this._renderedNodeType = nodeType;
|
36067 | var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY
|
36068 | );
|
36069 | this._renderedComponent = child;
|
36070 |
|
36071 | var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
|
36072 |
|
36073 | if (process.env.NODE_ENV !== 'production') {
|
36074 | if (debugID !== 0) {
|
36075 | var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
|
36076 | ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
|
36077 | }
|
36078 | }
|
36079 |
|
36080 | return markup;
|
36081 | },
|
36082 |
|
36083 | getHostNode: function () {
|
36084 | return ReactReconciler.getHostNode(this._renderedComponent);
|
36085 | },
|
36086 |
|
36087 | |
36088 |
|
36089 |
|
36090 |
|
36091 |
|
36092 |
|
36093 | unmountComponent: function (safely) {
|
36094 | if (!this._renderedComponent) {
|
36095 | return;
|
36096 | }
|
36097 |
|
36098 | var inst = this._instance;
|
36099 |
|
36100 | if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {
|
36101 | inst._calledComponentWillUnmount = true;
|
36102 |
|
36103 | if (safely) {
|
36104 | var name = this.getName() + '.componentWillUnmount()';
|
36105 | ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
|
36106 | } else {
|
36107 | if (process.env.NODE_ENV !== 'production') {
|
36108 | measureLifeCyclePerf(function () {
|
36109 | return inst.componentWillUnmount();
|
36110 | }, this._debugID, 'componentWillUnmount');
|
36111 | } else {
|
36112 | inst.componentWillUnmount();
|
36113 | }
|
36114 | }
|
36115 | }
|
36116 |
|
36117 | if (this._renderedComponent) {
|
36118 | ReactReconciler.unmountComponent(this._renderedComponent, safely);
|
36119 | this._renderedNodeType = null;
|
36120 | this._renderedComponent = null;
|
36121 | this._instance = null;
|
36122 | }
|
36123 |
|
36124 |
|
36125 |
|
36126 |
|
36127 | this._pendingStateQueue = null;
|
36128 | this._pendingReplaceState = false;
|
36129 | this._pendingForceUpdate = false;
|
36130 | this._pendingCallbacks = null;
|
36131 | this._pendingElement = null;
|
36132 |
|
36133 |
|
36134 |
|
36135 | this._context = null;
|
36136 | this._rootNodeID = 0;
|
36137 | this._topLevelWrapper = null;
|
36138 |
|
36139 |
|
36140 |
|
36141 |
|
36142 | ReactInstanceMap.remove(inst);
|
36143 |
|
36144 |
|
36145 |
|
36146 |
|
36147 |
|
36148 |
|
36149 | },
|
36150 |
|
36151 | |
36152 |
|
36153 |
|
36154 |
|
36155 |
|
36156 |
|
36157 |
|
36158 |
|
36159 | _maskContext: function (context) {
|
36160 | var Component = this._currentElement.type;
|
36161 | var contextTypes = Component.contextTypes;
|
36162 | if (!contextTypes) {
|
36163 | return emptyObject;
|
36164 | }
|
36165 | var maskedContext = {};
|
36166 | for (var contextName in contextTypes) {
|
36167 | maskedContext[contextName] = context[contextName];
|
36168 | }
|
36169 | return maskedContext;
|
36170 | },
|
36171 |
|
36172 | |
36173 |
|
36174 |
|
36175 |
|
36176 |
|
36177 |
|
36178 |
|
36179 |
|
36180 | _processContext: function (context) {
|
36181 | var maskedContext = this._maskContext(context);
|
36182 | if (process.env.NODE_ENV !== 'production') {
|
36183 | var Component = this._currentElement.type;
|
36184 | if (Component.contextTypes) {
|
36185 | this._checkContextTypes(Component.contextTypes, maskedContext, 'context');
|
36186 | }
|
36187 | }
|
36188 | return maskedContext;
|
36189 | },
|
36190 |
|
36191 | |
36192 |
|
36193 |
|
36194 |
|
36195 |
|
36196 | _processChildContext: function (currentContext) {
|
36197 | var Component = this._currentElement.type;
|
36198 | var inst = this._instance;
|
36199 | var childContext;
|
36200 |
|
36201 | if (inst.getChildContext) {
|
36202 | if (process.env.NODE_ENV !== 'production') {
|
36203 | ReactInstrumentation.debugTool.onBeginProcessingChildContext();
|
36204 | try {
|
36205 | childContext = inst.getChildContext();
|
36206 | } finally {
|
36207 | ReactInstrumentation.debugTool.onEndProcessingChildContext();
|
36208 | }
|
36209 | } else {
|
36210 | childContext = inst.getChildContext();
|
36211 | }
|
36212 | }
|
36213 |
|
36214 | if (childContext) {
|
36215 | !(typeof Component.childContextTypes === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0;
|
36216 | if (process.env.NODE_ENV !== 'production') {
|
36217 | this._checkContextTypes(Component.childContextTypes, childContext, 'child context');
|
36218 | }
|
36219 | for (var name in childContext) {
|
36220 | !(name in Component.childContextTypes) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0;
|
36221 | }
|
36222 | return _assign({}, currentContext, childContext);
|
36223 | }
|
36224 | return currentContext;
|
36225 | },
|
36226 |
|
36227 | |
36228 |
|
36229 |
|
36230 |
|
36231 |
|
36232 |
|
36233 |
|
36234 |
|
36235 | _checkContextTypes: function (typeSpecs, values, location) {
|
36236 | if (process.env.NODE_ENV !== 'production') {
|
36237 | checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID);
|
36238 | }
|
36239 | },
|
36240 |
|
36241 | receiveComponent: function (nextElement, transaction, nextContext) {
|
36242 | var prevElement = this._currentElement;
|
36243 | var prevContext = this._context;
|
36244 |
|
36245 | this._pendingElement = null;
|
36246 |
|
36247 | this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);
|
36248 | },
|
36249 |
|
36250 | |
36251 |
|
36252 |
|
36253 |
|
36254 |
|
36255 |
|
36256 |
|
36257 | performUpdateIfNecessary: function (transaction) {
|
36258 | if (this._pendingElement != null) {
|
36259 | ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context);
|
36260 | } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
|
36261 | this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context);
|
36262 | } else {
|
36263 | this._updateBatchNumber = null;
|
36264 | }
|
36265 | },
|
36266 |
|
36267 | |
36268 |
|
36269 |
|
36270 |
|
36271 |
|
36272 |
|
36273 |
|
36274 |
|
36275 |
|
36276 |
|
36277 |
|
36278 |
|
36279 |
|
36280 |
|
36281 |
|
36282 | updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {
|
36283 | var inst = this._instance;
|
36284 | !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', this.getName() || 'ReactCompositeComponent') : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') : void 0;
|
36285 |
|
36286 | var willReceive = false;
|
36287 | var nextContext;
|
36288 |
|
36289 |
|
36290 | if (this._context === nextUnmaskedContext) {
|
36291 | nextContext = inst.context;
|
36292 | } else {
|
36293 | nextContext = this._processContext(nextUnmaskedContext);
|
36294 | willReceive = true;
|
36295 | }
|
36296 |
|
36297 | var prevProps = prevParentElement.props;
|
36298 | var nextProps = nextParentElement.props;
|
36299 |
|
36300 |
|
36301 | if (prevParentElement !== nextParentElement) {
|
36302 | willReceive = true;
|
36303 | }
|
36304 |
|
36305 |
|
36306 |
|
36307 |
|
36308 | if (willReceive && inst.componentWillReceiveProps) {
|
36309 | if (process.env.NODE_ENV !== 'production') {
|
36310 | measureLifeCyclePerf(function () {
|
36311 | return inst.componentWillReceiveProps(nextProps, nextContext);
|
36312 | }, this._debugID, 'componentWillReceiveProps');
|
36313 | } else {
|
36314 | inst.componentWillReceiveProps(nextProps, nextContext);
|
36315 | }
|
36316 | }
|
36317 |
|
36318 | var nextState = this._processPendingState(nextProps, nextContext);
|
36319 | var shouldUpdate = true;
|
36320 |
|
36321 | if (!this._pendingForceUpdate) {
|
36322 | if (inst.shouldComponentUpdate) {
|
36323 | if (process.env.NODE_ENV !== 'production') {
|
36324 | shouldUpdate = measureLifeCyclePerf(function () {
|
36325 | return inst.shouldComponentUpdate(nextProps, nextState, nextContext);
|
36326 | }, this._debugID, 'shouldComponentUpdate');
|
36327 | } else {
|
36328 | shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);
|
36329 | }
|
36330 | } else {
|
36331 | if (this._compositeType === CompositeTypes.PureClass) {
|
36332 | shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState);
|
36333 | }
|
36334 | }
|
36335 | }
|
36336 |
|
36337 | if (process.env.NODE_ENV !== 'production') {
|
36338 | process.env.NODE_ENV !== 'production' ? warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : void 0;
|
36339 | }
|
36340 |
|
36341 | this._updateBatchNumber = null;
|
36342 | if (shouldUpdate) {
|
36343 | this._pendingForceUpdate = false;
|
36344 |
|
36345 | this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext);
|
36346 | } else {
|
36347 |
|
36348 |
|
36349 | this._currentElement = nextParentElement;
|
36350 | this._context = nextUnmaskedContext;
|
36351 | inst.props = nextProps;
|
36352 | inst.state = nextState;
|
36353 | inst.context = nextContext;
|
36354 | }
|
36355 | },
|
36356 |
|
36357 | _processPendingState: function (props, context) {
|
36358 | var inst = this._instance;
|
36359 | var queue = this._pendingStateQueue;
|
36360 | var replace = this._pendingReplaceState;
|
36361 | this._pendingReplaceState = false;
|
36362 | this._pendingStateQueue = null;
|
36363 |
|
36364 | if (!queue) {
|
36365 | return inst.state;
|
36366 | }
|
36367 |
|
36368 | if (replace && queue.length === 1) {
|
36369 | return queue[0];
|
36370 | }
|
36371 |
|
36372 | var nextState = _assign({}, replace ? queue[0] : inst.state);
|
36373 | for (var i = replace ? 1 : 0; i < queue.length; i++) {
|
36374 | var partial = queue[i];
|
36375 | _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);
|
36376 | }
|
36377 |
|
36378 | return nextState;
|
36379 | },
|
36380 |
|
36381 | |
36382 |
|
36383 |
|
36384 |
|
36385 |
|
36386 |
|
36387 |
|
36388 |
|
36389 |
|
36390 |
|
36391 |
|
36392 |
|
36393 | _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
|
36394 | var _this2 = this;
|
36395 |
|
36396 | var inst = this._instance;
|
36397 |
|
36398 | var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
|
36399 | var prevProps;
|
36400 | var prevState;
|
36401 | var prevContext;
|
36402 | if (hasComponentDidUpdate) {
|
36403 | prevProps = inst.props;
|
36404 | prevState = inst.state;
|
36405 | prevContext = inst.context;
|
36406 | }
|
36407 |
|
36408 | if (inst.componentWillUpdate) {
|
36409 | if (process.env.NODE_ENV !== 'production') {
|
36410 | measureLifeCyclePerf(function () {
|
36411 | return inst.componentWillUpdate(nextProps, nextState, nextContext);
|
36412 | }, this._debugID, 'componentWillUpdate');
|
36413 | } else {
|
36414 | inst.componentWillUpdate(nextProps, nextState, nextContext);
|
36415 | }
|
36416 | }
|
36417 |
|
36418 | this._currentElement = nextElement;
|
36419 | this._context = unmaskedContext;
|
36420 | inst.props = nextProps;
|
36421 | inst.state = nextState;
|
36422 | inst.context = nextContext;
|
36423 |
|
36424 | this._updateRenderedComponent(transaction, unmaskedContext);
|
36425 |
|
36426 | if (hasComponentDidUpdate) {
|
36427 | if (process.env.NODE_ENV !== 'production') {
|
36428 | transaction.getReactMountReady().enqueue(function () {
|
36429 | measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate');
|
36430 | });
|
36431 | } else {
|
36432 | transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
|
36433 | }
|
36434 | }
|
36435 | },
|
36436 |
|
36437 | |
36438 |
|
36439 |
|
36440 |
|
36441 |
|
36442 |
|
36443 | _updateRenderedComponent: function (transaction, context) {
|
36444 | var prevComponentInstance = this._renderedComponent;
|
36445 | var prevRenderedElement = prevComponentInstance._currentElement;
|
36446 | var nextRenderedElement = this._renderValidatedComponent();
|
36447 |
|
36448 | var debugID = 0;
|
36449 | if (process.env.NODE_ENV !== 'production') {
|
36450 | debugID = this._debugID;
|
36451 | }
|
36452 |
|
36453 | if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
|
36454 | ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));
|
36455 | } else {
|
36456 | var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance);
|
36457 | ReactReconciler.unmountComponent(prevComponentInstance, false);
|
36458 |
|
36459 | var nodeType = ReactNodeTypes.getType(nextRenderedElement);
|
36460 | this._renderedNodeType = nodeType;
|
36461 | var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY
|
36462 | );
|
36463 | this._renderedComponent = child;
|
36464 |
|
36465 | var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);
|
36466 |
|
36467 | if (process.env.NODE_ENV !== 'production') {
|
36468 | if (debugID !== 0) {
|
36469 | var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
|
36470 | ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
|
36471 | }
|
36472 | }
|
36473 |
|
36474 | this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance);
|
36475 | }
|
36476 | },
|
36477 |
|
36478 | |
36479 |
|
36480 |
|
36481 |
|
36482 |
|
36483 | _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) {
|
36484 | ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance);
|
36485 | },
|
36486 |
|
36487 | |
36488 |
|
36489 |
|
36490 | _renderValidatedComponentWithoutOwnerOrContext: function () {
|
36491 | var inst = this._instance;
|
36492 | var renderedElement;
|
36493 |
|
36494 | if (process.env.NODE_ENV !== 'production') {
|
36495 | renderedElement = measureLifeCyclePerf(function () {
|
36496 | return inst.render();
|
36497 | }, this._debugID, 'render');
|
36498 | } else {
|
36499 | renderedElement = inst.render();
|
36500 | }
|
36501 |
|
36502 | if (process.env.NODE_ENV !== 'production') {
|
36503 |
|
36504 | if (renderedElement === undefined && inst.render._isMockFunction) {
|
36505 |
|
36506 |
|
36507 | renderedElement = null;
|
36508 | }
|
36509 | }
|
36510 |
|
36511 | return renderedElement;
|
36512 | },
|
36513 |
|
36514 | |
36515 |
|
36516 |
|
36517 | _renderValidatedComponent: function () {
|
36518 | var renderedElement;
|
36519 | if (process.env.NODE_ENV !== 'production' || this._compositeType !== CompositeTypes.StatelessFunctional) {
|
36520 | ReactCurrentOwner.current = this;
|
36521 | try {
|
36522 | renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
|
36523 | } finally {
|
36524 | ReactCurrentOwner.current = null;
|
36525 | }
|
36526 | } else {
|
36527 | renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
|
36528 | }
|
36529 | !(
|
36530 |
|
36531 | renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') : void 0;
|
36532 |
|
36533 | return renderedElement;
|
36534 | },
|
36535 |
|
36536 | |
36537 |
|
36538 |
|
36539 |
|
36540 |
|
36541 |
|
36542 |
|
36543 |
|
36544 | attachRef: function (ref, component) {
|
36545 | var inst = this.getPublicInstance();
|
36546 | !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0;
|
36547 | var publicComponentInstance = component.getPublicInstance();
|
36548 | if (process.env.NODE_ENV !== 'production') {
|
36549 | var componentName = component && component.getName ? component.getName() : 'a component';
|
36550 | process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0;
|
36551 | }
|
36552 | var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
|
36553 | refs[ref] = publicComponentInstance;
|
36554 | },
|
36555 |
|
36556 | |
36557 |
|
36558 |
|
36559 |
|
36560 |
|
36561 |
|
36562 |
|
36563 | detachRef: function (ref) {
|
36564 | var refs = this.getPublicInstance().refs;
|
36565 | delete refs[ref];
|
36566 | },
|
36567 |
|
36568 | |
36569 |
|
36570 |
|
36571 |
|
36572 |
|
36573 |
|
36574 | getName: function () {
|
36575 | var type = this._currentElement.type;
|
36576 | var constructor = this._instance && this._instance.constructor;
|
36577 | return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null;
|
36578 | },
|
36579 |
|
36580 | /**
|
36581 | * Get the publicly accessible representation of this component - i.e. what
|
36582 | * is exposed by refs and returned by render. Can be null for stateless
|
36583 | * components.
|
36584 | *
|
36585 | * @return {ReactComponent} the public component instance.
|
36586 | * @internal
|
36587 | */
|
36588 | getPublicInstance: function () {
|
36589 | var inst = this._instance;
|
36590 | if (this._compositeType === CompositeTypes.StatelessFunctional) {
|
36591 | return null;
|
36592 | }
|
36593 | return inst;
|
36594 | },
|
36595 |
|
36596 |
|
36597 | _instantiateReactComponent: null
|
36598 | };
|
36599 |
|
36600 | module.exports = ReactCompositeComponent;
|
36601 | }.call(exports, __webpack_require__(0)))
|
36602 |
|
36603 | }),
|
36604 |
|
36605 | (function(module, exports, __webpack_require__) {
|
36606 |
|
36607 | "use strict";
|
36608 | (function(process) { |
36609 |
|
36610 |
|
36611 |
|
36612 |
|
36613 |
|
36614 |
|
36615 |
|
36616 |
|
36617 |
|
36618 |
|
36619 |
|
36620 | var _prodInvariant = __webpack_require__(3);
|
36621 |
|
36622 | var ReactPropTypeLocationNames = __webpack_require__(149);
|
36623 | var ReactPropTypesSecret = __webpack_require__(77);
|
36624 |
|
36625 | var invariant = __webpack_require__(1);
|
36626 | var warning = __webpack_require__(2);
|
36627 |
|
36628 | var ReactComponentTreeHook;
|
36629 |
|
36630 | if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
|
36631 |
|
36632 |
|
36633 |
|
36634 |
|
36635 |
|
36636 | ReactComponentTreeHook = __webpack_require__(7);
|
36637 | }
|
36638 |
|
36639 | var loggedTypeFailures = {};
|
36640 |
|
36641 |
|
36642 |
|
36643 |
|
36644 |
|
36645 |
|
36646 |
|
36647 |
|
36648 |
|
36649 |
|
36650 |
|
36651 |
|
36652 |
|
36653 | function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
|
36654 | for (var typeSpecName in typeSpecs) {
|
36655 | if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
36656 | var error;
|
36657 |
|
36658 |
|
36659 |
|
36660 | try {
|
36661 |
|
36662 |
|
36663 | !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;
|
36664 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
36665 | } catch (ex) {
|
36666 | error = ex;
|
36667 | }
|
36668 | process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;
|
36669 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
36670 |
|
36671 |
|
36672 | loggedTypeFailures[error.message] = true;
|
36673 |
|
36674 | var componentStackInfo = '';
|
36675 |
|
36676 | if (process.env.NODE_ENV !== 'production') {
|
36677 | if (!ReactComponentTreeHook) {
|
36678 | ReactComponentTreeHook = __webpack_require__(7);
|
36679 | }
|
36680 | if (debugID !== null) {
|
36681 | componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
|
36682 | } else if (element !== null) {
|
36683 | componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
|
36684 | }
|
36685 | }
|
36686 |
|
36687 | process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
|
36688 | }
|
36689 | }
|
36690 | }
|
36691 | }
|
36692 |
|
36693 | module.exports = checkReactTypeSpec;
|
36694 | }.call(exports, __webpack_require__(0)))
|
36695 |
|
36696 | }),
|
36697 |
|
36698 | (function(module, exports, __webpack_require__) {
|
36699 |
|
36700 | "use strict";
|
36701 | (function(process) { |
36702 |
|
36703 |
|
36704 |
|
36705 |
|
36706 |
|
36707 |
|
36708 |
|
36709 |
|
36710 |
|
36711 |
|
36712 |
|
36713 |
|
36714 | var ReactPropTypeLocationNames = {};
|
36715 |
|
36716 | if (process.env.NODE_ENV !== 'production') {
|
36717 | ReactPropTypeLocationNames = {
|
36718 | prop: 'prop',
|
36719 | context: 'context',
|
36720 | childContext: 'child context'
|
36721 | };
|
36722 | }
|
36723 |
|
36724 | module.exports = ReactPropTypeLocationNames;
|
36725 | }.call(exports, __webpack_require__(0)))
|
36726 |
|
36727 | }),
|
36728 |
|
36729 | (function(module, exports, __webpack_require__) {
|
36730 |
|
36731 | "use strict";
|
36732 |
|
36733 |
|
36734 |
|
36735 |
|
36736 |
|
36737 |
|
36738 |
|
36739 |
|
36740 |
|
36741 |
|
36742 |
|
36743 |
|
36744 |
|
36745 | var nextDebugID = 1;
|
36746 |
|
36747 | function getNextDebugID() {
|
36748 | return nextDebugID++;
|
36749 | }
|
36750 |
|
36751 | module.exports = getNextDebugID;
|
36752 |
|
36753 | }),
|
36754 |
|
36755 | (function(module, exports, __webpack_require__) {
|
36756 |
|
36757 | "use strict";
|
36758 |
|
36759 |
|
36760 |
|
36761 |
|
36762 |
|
36763 |
|
36764 |
|
36765 |
|
36766 |
|
36767 |
|
36768 |
|
36769 |
|
36770 |
|
36771 |
|
36772 |
|
36773 |
|
36774 | var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
36775 |
|
36776 | module.exports = REACT_ELEMENT_TYPE;
|
36777 |
|
36778 | }),
|
36779 |
|
36780 | (function(module, exports, __webpack_require__) {
|
36781 |
|
36782 | "use strict";
|
36783 |
|
36784 |
|
36785 |
|
36786 |
|
36787 |
|
36788 |
|
36789 |
|
36790 |
|
36791 |
|
36792 |
|
36793 |
|
36794 |
|
36795 |
|
36796 |
|
36797 |
|
36798 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
36799 | var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
36800 |
|
36801 |
|
36802 |
|
36803 |
|
36804 |
|
36805 |
|
36806 |
|
36807 |
|
36808 |
|
36809 |
|
36810 |
|
36811 |
|
36812 |
|
36813 |
|
36814 |
|
36815 | function getIteratorFn(maybeIterable) {
|
36816 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
36817 | if (typeof iteratorFn === 'function') {
|
36818 | return iteratorFn;
|
36819 | }
|
36820 | }
|
36821 |
|
36822 | module.exports = getIteratorFn;
|
36823 |
|
36824 | }),
|
36825 |
|
36826 | (function(module, exports, __webpack_require__) {
|
36827 |
|
36828 | "use strict";
|
36829 | (function(process) { |
36830 |
|
36831 |
|
36832 |
|
36833 |
|
36834 |
|
36835 |
|
36836 |
|
36837 |
|
36838 |
|
36839 |
|
36840 |
|
36841 |
|
36842 | var KeyEscapeUtils = __webpack_require__(50);
|
36843 | var traverseAllChildren = __webpack_require__(83);
|
36844 | var warning = __webpack_require__(2);
|
36845 |
|
36846 | var ReactComponentTreeHook;
|
36847 |
|
36848 | if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
|
36849 |
|
36850 |
|
36851 |
|
36852 |
|
36853 |
|
36854 | ReactComponentTreeHook = __webpack_require__(7);
|
36855 | }
|
36856 |
|
36857 |
|
36858 |
|
36859 |
|
36860 |
|
36861 |
|
36862 |
|
36863 | function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {
|
36864 |
|
36865 | if (traverseContext && typeof traverseContext === 'object') {
|
36866 | var result = traverseContext;
|
36867 | var keyUnique = result[name] === undefined;
|
36868 | if (process.env.NODE_ENV !== 'production') {
|
36869 | if (!ReactComponentTreeHook) {
|
36870 | ReactComponentTreeHook = __webpack_require__(7);
|
36871 | }
|
36872 | if (!keyUnique) {
|
36873 | process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
|
36874 | }
|
36875 | }
|
36876 | if (keyUnique && child != null) {
|
36877 | result[name] = child;
|
36878 | }
|
36879 | }
|
36880 | }
|
36881 |
|
36882 |
|
36883 |
|
36884 |
|
36885 |
|
36886 |
|
36887 | function flattenChildren(children, selfDebugID) {
|
36888 | if (children == null) {
|
36889 | return children;
|
36890 | }
|
36891 | var result = {};
|
36892 |
|
36893 | if (process.env.NODE_ENV !== 'production') {
|
36894 | traverseAllChildren(children, function (traverseContext, child, name) {
|
36895 | return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);
|
36896 | }, result);
|
36897 | } else {
|
36898 | traverseAllChildren(children, flattenSingleChildIntoContext, result);
|
36899 | }
|
36900 | return result;
|
36901 | }
|
36902 |
|
36903 | module.exports = flattenChildren;
|
36904 | }.call(exports, __webpack_require__(0)))
|
36905 |
|
36906 | }),
|
36907 |
|
36908 | (function(module, exports, __webpack_require__) {
|
36909 |
|
36910 | "use strict";
|
36911 | (function(process) { |
36912 |
|
36913 |
|
36914 |
|
36915 |
|
36916 |
|
36917 |
|
36918 |
|
36919 |
|
36920 |
|
36921 |
|
36922 |
|
36923 | var _assign = __webpack_require__(4);
|
36924 |
|
36925 | var PooledClass = __webpack_require__(16);
|
36926 | var Transaction = __webpack_require__(29);
|
36927 | var ReactInstrumentation = __webpack_require__(9);
|
36928 | var ReactServerUpdateQueue = __webpack_require__(155);
|
36929 |
|
36930 |
|
36931 |
|
36932 |
|
36933 |
|
36934 |
|
36935 | var TRANSACTION_WRAPPERS = [];
|
36936 |
|
36937 | if (process.env.NODE_ENV !== 'production') {
|
36938 | TRANSACTION_WRAPPERS.push({
|
36939 | initialize: ReactInstrumentation.debugTool.onBeginFlush,
|
36940 | close: ReactInstrumentation.debugTool.onEndFlush
|
36941 | });
|
36942 | }
|
36943 |
|
36944 | var noopCallbackQueue = {
|
36945 | enqueue: function () {}
|
36946 | };
|
36947 |
|
36948 |
|
36949 |
|
36950 |
|
36951 |
|
36952 | function ReactServerRenderingTransaction(renderToStaticMarkup) {
|
36953 | this.reinitializeTransaction();
|
36954 | this.renderToStaticMarkup = renderToStaticMarkup;
|
36955 | this.useCreateElement = false;
|
36956 | this.updateQueue = new ReactServerUpdateQueue(this);
|
36957 | }
|
36958 |
|
36959 | var Mixin = {
|
36960 | |
36961 |
|
36962 |
|
36963 |
|
36964 |
|
36965 |
|
36966 | getTransactionWrappers: function () {
|
36967 | return TRANSACTION_WRAPPERS;
|
36968 | },
|
36969 |
|
36970 | |
36971 |
|
36972 |
|
36973 | getReactMountReady: function () {
|
36974 | return noopCallbackQueue;
|
36975 | },
|
36976 |
|
36977 | |
36978 |
|
36979 |
|
36980 | getUpdateQueue: function () {
|
36981 | return this.updateQueue;
|
36982 | },
|
36983 |
|
36984 | |
36985 |
|
36986 |
|
36987 |
|
36988 | destructor: function () {},
|
36989 |
|
36990 | checkpoint: function () {},
|
36991 |
|
36992 | rollback: function () {}
|
36993 | };
|
36994 |
|
36995 | _assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin);
|
36996 |
|
36997 | PooledClass.addPoolingTo(ReactServerRenderingTransaction);
|
36998 |
|
36999 | module.exports = ReactServerRenderingTransaction;
|
37000 | }.call(exports, __webpack_require__(0)))
|
37001 |
|
37002 | }),
|
37003 |
|
37004 | (function(module, exports, __webpack_require__) {
|
37005 |
|
37006 | "use strict";
|
37007 | (function(process) { |
37008 |
|
37009 |
|
37010 |
|
37011 |
|
37012 |
|
37013 |
|
37014 |
|
37015 |
|
37016 |
|
37017 |
|
37018 |
|
37019 |
|
37020 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
37021 |
|
37022 | var ReactUpdateQueue = __webpack_require__(51);
|
37023 |
|
37024 | var warning = __webpack_require__(2);
|
37025 |
|
37026 | function warnNoop(publicInstance, callerName) {
|
37027 | if (process.env.NODE_ENV !== 'production') {
|
37028 | var constructor = publicInstance.constructor;
|
37029 | process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;
|
37030 | }
|
37031 | }
|
37032 |
|
37033 | /**
|
37034 | * This is the update queue used for server rendering.
|
37035 | * It delegates to ReactUpdateQueue while server rendering is in progress and
|
37036 | * switches to ReactNoopUpdateQueue after the transaction has completed.
|
37037 | * @class ReactServerUpdateQueue
|
37038 | * @param {Transaction} transaction
|
37039 | */
|
37040 |
|
37041 | var ReactServerUpdateQueue = function () {
|
37042 | function ReactServerUpdateQueue(transaction) {
|
37043 | _classCallCheck(this, ReactServerUpdateQueue);
|
37044 |
|
37045 | this.transaction = transaction;
|
37046 | }
|
37047 |
|
37048 | |
37049 |
|
37050 |
|
37051 |
|
37052 |
|
37053 |
|
37054 |
|
37055 |
|
37056 |
|
37057 | ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) {
|
37058 | return false;
|
37059 | };
|
37060 |
|
37061 | |
37062 |
|
37063 |
|
37064 |
|
37065 |
|
37066 |
|
37067 |
|
37068 |
|
37069 |
|
37070 |
|
37071 | ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) {
|
37072 | if (this.transaction.isInTransaction()) {
|
37073 | ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName);
|
37074 | }
|
37075 | };
|
37076 |
|
37077 | |
37078 |
|
37079 |
|
37080 |
|
37081 |
|
37082 |
|
37083 |
|
37084 |
|
37085 |
|
37086 |
|
37087 |
|
37088 |
|
37089 |
|
37090 |
|
37091 |
|
37092 | ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) {
|
37093 | if (this.transaction.isInTransaction()) {
|
37094 | ReactUpdateQueue.enqueueForceUpdate(publicInstance);
|
37095 | } else {
|
37096 | warnNoop(publicInstance, 'forceUpdate');
|
37097 | }
|
37098 | };
|
37099 |
|
37100 | |
37101 |
|
37102 |
|
37103 |
|
37104 |
|
37105 |
|
37106 |
|
37107 |
|
37108 |
|
37109 |
|
37110 |
|
37111 |
|
37112 |
|
37113 | ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) {
|
37114 | if (this.transaction.isInTransaction()) {
|
37115 | ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState);
|
37116 | } else {
|
37117 | warnNoop(publicInstance, 'replaceState');
|
37118 | }
|
37119 | };
|
37120 |
|
37121 | |
37122 |
|
37123 |
|
37124 |
|
37125 |
|
37126 |
|
37127 |
|
37128 |
|
37129 |
|
37130 |
|
37131 |
|
37132 |
|
37133 | ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) {
|
37134 | if (this.transaction.isInTransaction()) {
|
37135 | ReactUpdateQueue.enqueueSetState(publicInstance, partialState);
|
37136 | } else {
|
37137 | warnNoop(publicInstance, 'setState');
|
37138 | }
|
37139 | };
|
37140 |
|
37141 | return ReactServerUpdateQueue;
|
37142 | }();
|
37143 |
|
37144 | module.exports = ReactServerUpdateQueue;
|
37145 | }.call(exports, __webpack_require__(0)))
|
37146 |
|
37147 | }),
|
37148 |
|
37149 | (function(module, exports, __webpack_require__) {
|
37150 |
|
37151 | "use strict";
|
37152 |
|
37153 |
|
37154 |
|
37155 |
|
37156 |
|
37157 |
|
37158 |
|
37159 |
|
37160 |
|
37161 |
|
37162 |
|
37163 |
|
37164 | var _assign = __webpack_require__(4);
|
37165 |
|
37166 | var DOMLazyTree = __webpack_require__(20);
|
37167 | var ReactDOMComponentTree = __webpack_require__(5);
|
37168 |
|
37169 | var ReactDOMEmptyComponent = function (instantiate) {
|
37170 |
|
37171 | this._currentElement = null;
|
37172 |
|
37173 | this._hostNode = null;
|
37174 | this._hostParent = null;
|
37175 | this._hostContainerInfo = null;
|
37176 | this._domID = 0;
|
37177 | };
|
37178 | _assign(ReactDOMEmptyComponent.prototype, {
|
37179 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
37180 | var domID = hostContainerInfo._idCounter++;
|
37181 | this._domID = domID;
|
37182 | this._hostParent = hostParent;
|
37183 | this._hostContainerInfo = hostContainerInfo;
|
37184 |
|
37185 | var nodeValue = ' react-empty: ' + this._domID + ' ';
|
37186 | if (transaction.useCreateElement) {
|
37187 | var ownerDocument = hostContainerInfo._ownerDocument;
|
37188 | var node = ownerDocument.createComment(nodeValue);
|
37189 | ReactDOMComponentTree.precacheNode(this, node);
|
37190 | return DOMLazyTree(node);
|
37191 | } else {
|
37192 | if (transaction.renderToStaticMarkup) {
|
37193 |
|
37194 |
|
37195 |
|
37196 | return '';
|
37197 | }
|
37198 | return '<!--' + nodeValue + '-->';
|
37199 | }
|
37200 | },
|
37201 | receiveComponent: function () {},
|
37202 | getHostNode: function () {
|
37203 | return ReactDOMComponentTree.getNodeFromInstance(this);
|
37204 | },
|
37205 | unmountComponent: function () {
|
37206 | ReactDOMComponentTree.uncacheNode(this);
|
37207 | }
|
37208 | });
|
37209 |
|
37210 | module.exports = ReactDOMEmptyComponent;
|
37211 |
|
37212 | }),
|
37213 |
|
37214 | (function(module, exports, __webpack_require__) {
|
37215 |
|
37216 | "use strict";
|
37217 | (function(process) { |
37218 |
|
37219 |
|
37220 |
|
37221 |
|
37222 |
|
37223 |
|
37224 |
|
37225 |
|
37226 |
|
37227 |
|
37228 |
|
37229 | var _prodInvariant = __webpack_require__(3);
|
37230 |
|
37231 | var invariant = __webpack_require__(1);
|
37232 |
|
37233 |
|
37234 |
|
37235 |
|
37236 |
|
37237 | function getLowestCommonAncestor(instA, instB) {
|
37238 | !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
|
37239 | !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
|
37240 |
|
37241 | var depthA = 0;
|
37242 | for (var tempA = instA; tempA; tempA = tempA._hostParent) {
|
37243 | depthA++;
|
37244 | }
|
37245 | var depthB = 0;
|
37246 | for (var tempB = instB; tempB; tempB = tempB._hostParent) {
|
37247 | depthB++;
|
37248 | }
|
37249 |
|
37250 |
|
37251 | while (depthA - depthB > 0) {
|
37252 | instA = instA._hostParent;
|
37253 | depthA--;
|
37254 | }
|
37255 |
|
37256 |
|
37257 | while (depthB - depthA > 0) {
|
37258 | instB = instB._hostParent;
|
37259 | depthB--;
|
37260 | }
|
37261 |
|
37262 |
|
37263 | var depth = depthA;
|
37264 | while (depth--) {
|
37265 | if (instA === instB) {
|
37266 | return instA;
|
37267 | }
|
37268 | instA = instA._hostParent;
|
37269 | instB = instB._hostParent;
|
37270 | }
|
37271 | return null;
|
37272 | }
|
37273 |
|
37274 |
|
37275 |
|
37276 |
|
37277 | function isAncestor(instA, instB) {
|
37278 | !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
|
37279 | !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
|
37280 |
|
37281 | while (instB) {
|
37282 | if (instB === instA) {
|
37283 | return true;
|
37284 | }
|
37285 | instB = instB._hostParent;
|
37286 | }
|
37287 | return false;
|
37288 | }
|
37289 |
|
37290 |
|
37291 |
|
37292 |
|
37293 | function getParentInstance(inst) {
|
37294 | !('_hostNode' in inst) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0;
|
37295 |
|
37296 | return inst._hostParent;
|
37297 | }
|
37298 |
|
37299 |
|
37300 |
|
37301 |
|
37302 | function traverseTwoPhase(inst, fn, arg) {
|
37303 | var path = [];
|
37304 | while (inst) {
|
37305 | path.push(inst);
|
37306 | inst = inst._hostParent;
|
37307 | }
|
37308 | var i;
|
37309 | for (i = path.length; i-- > 0;) {
|
37310 | fn(path[i], 'captured', arg);
|
37311 | }
|
37312 | for (i = 0; i < path.length; i++) {
|
37313 | fn(path[i], 'bubbled', arg);
|
37314 | }
|
37315 | }
|
37316 |
|
37317 |
|
37318 |
|
37319 |
|
37320 |
|
37321 |
|
37322 |
|
37323 |
|
37324 | function traverseEnterLeave(from, to, fn, argFrom, argTo) {
|
37325 | var common = from && to ? getLowestCommonAncestor(from, to) : null;
|
37326 | var pathFrom = [];
|
37327 | while (from && from !== common) {
|
37328 | pathFrom.push(from);
|
37329 | from = from._hostParent;
|
37330 | }
|
37331 | var pathTo = [];
|
37332 | while (to && to !== common) {
|
37333 | pathTo.push(to);
|
37334 | to = to._hostParent;
|
37335 | }
|
37336 | var i;
|
37337 | for (i = 0; i < pathFrom.length; i++) {
|
37338 | fn(pathFrom[i], 'bubbled', argFrom);
|
37339 | }
|
37340 | for (i = pathTo.length; i-- > 0;) {
|
37341 | fn(pathTo[i], 'captured', argTo);
|
37342 | }
|
37343 | }
|
37344 |
|
37345 | module.exports = {
|
37346 | isAncestor: isAncestor,
|
37347 | getLowestCommonAncestor: getLowestCommonAncestor,
|
37348 | getParentInstance: getParentInstance,
|
37349 | traverseTwoPhase: traverseTwoPhase,
|
37350 | traverseEnterLeave: traverseEnterLeave
|
37351 | };
|
37352 | }.call(exports, __webpack_require__(0)))
|
37353 |
|
37354 | }),
|
37355 |
|
37356 | (function(module, exports, __webpack_require__) {
|
37357 |
|
37358 | "use strict";
|
37359 | (function(process) { |
37360 |
|
37361 |
|
37362 |
|
37363 |
|
37364 |
|
37365 |
|
37366 |
|
37367 |
|
37368 |
|
37369 |
|
37370 |
|
37371 | var _prodInvariant = __webpack_require__(3),
|
37372 | _assign = __webpack_require__(4);
|
37373 |
|
37374 | var DOMChildrenOperations = __webpack_require__(43);
|
37375 | var DOMLazyTree = __webpack_require__(20);
|
37376 | var ReactDOMComponentTree = __webpack_require__(5);
|
37377 |
|
37378 | var escapeTextContentForBrowser = __webpack_require__(32);
|
37379 | var invariant = __webpack_require__(1);
|
37380 | var validateDOMNesting = __webpack_require__(52);
|
37381 |
|
37382 |
|
37383 |
|
37384 |
|
37385 |
|
37386 |
|
37387 |
|
37388 |
|
37389 |
|
37390 |
|
37391 |
|
37392 |
|
37393 |
|
37394 |
|
37395 |
|
37396 |
|
37397 | var ReactDOMTextComponent = function (text) {
|
37398 |
|
37399 | this._currentElement = text;
|
37400 | this._stringText = '' + text;
|
37401 |
|
37402 | this._hostNode = null;
|
37403 | this._hostParent = null;
|
37404 |
|
37405 |
|
37406 | this._domID = 0;
|
37407 | this._mountIndex = 0;
|
37408 | this._closingComment = null;
|
37409 | this._commentNodes = null;
|
37410 | };
|
37411 |
|
37412 | _assign(ReactDOMTextComponent.prototype, {
|
37413 | |
37414 |
|
37415 |
|
37416 |
|
37417 |
|
37418 |
|
37419 |
|
37420 |
|
37421 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
37422 | if (process.env.NODE_ENV !== 'production') {
|
37423 | var parentInfo;
|
37424 | if (hostParent != null) {
|
37425 | parentInfo = hostParent._ancestorInfo;
|
37426 | } else if (hostContainerInfo != null) {
|
37427 | parentInfo = hostContainerInfo._ancestorInfo;
|
37428 | }
|
37429 | if (parentInfo) {
|
37430 |
|
37431 |
|
37432 | validateDOMNesting(null, this._stringText, this, parentInfo);
|
37433 | }
|
37434 | }
|
37435 |
|
37436 | var domID = hostContainerInfo._idCounter++;
|
37437 | var openingValue = ' react-text: ' + domID + ' ';
|
37438 | var closingValue = ' /react-text ';
|
37439 | this._domID = domID;
|
37440 | this._hostParent = hostParent;
|
37441 | if (transaction.useCreateElement) {
|
37442 | var ownerDocument = hostContainerInfo._ownerDocument;
|
37443 | var openingComment = ownerDocument.createComment(openingValue);
|
37444 | var closingComment = ownerDocument.createComment(closingValue);
|
37445 | var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment());
|
37446 | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment));
|
37447 | if (this._stringText) {
|
37448 | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText)));
|
37449 | }
|
37450 | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment));
|
37451 | ReactDOMComponentTree.precacheNode(this, openingComment);
|
37452 | this._closingComment = closingComment;
|
37453 | return lazyTree;
|
37454 | } else {
|
37455 | var escapedText = escapeTextContentForBrowser(this._stringText);
|
37456 |
|
37457 | if (transaction.renderToStaticMarkup) {
|
37458 |
|
37459 |
|
37460 |
|
37461 | return escapedText;
|
37462 | }
|
37463 |
|
37464 | return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->';
|
37465 | }
|
37466 | },
|
37467 |
|
37468 | |
37469 |
|
37470 |
|
37471 |
|
37472 |
|
37473 |
|
37474 |
|
37475 | receiveComponent: function (nextText, transaction) {
|
37476 | if (nextText !== this._currentElement) {
|
37477 | this._currentElement = nextText;
|
37478 | var nextStringText = '' + nextText;
|
37479 | if (nextStringText !== this._stringText) {
|
37480 |
|
37481 |
|
37482 |
|
37483 | this._stringText = nextStringText;
|
37484 | var commentNodes = this.getHostNode();
|
37485 | DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText);
|
37486 | }
|
37487 | }
|
37488 | },
|
37489 |
|
37490 | getHostNode: function () {
|
37491 | var hostNode = this._commentNodes;
|
37492 | if (hostNode) {
|
37493 | return hostNode;
|
37494 | }
|
37495 | if (!this._closingComment) {
|
37496 | var openingComment = ReactDOMComponentTree.getNodeFromInstance(this);
|
37497 | var node = openingComment.nextSibling;
|
37498 | while (true) {
|
37499 | !(node != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0;
|
37500 | if (node.nodeType === 8 && node.nodeValue === ' /react-text ') {
|
37501 | this._closingComment = node;
|
37502 | break;
|
37503 | }
|
37504 | node = node.nextSibling;
|
37505 | }
|
37506 | }
|
37507 | hostNode = [this._hostNode, this._closingComment];
|
37508 | this._commentNodes = hostNode;
|
37509 | return hostNode;
|
37510 | },
|
37511 |
|
37512 | unmountComponent: function () {
|
37513 | this._closingComment = null;
|
37514 | this._commentNodes = null;
|
37515 | ReactDOMComponentTree.uncacheNode(this);
|
37516 | }
|
37517 | });
|
37518 |
|
37519 | module.exports = ReactDOMTextComponent;
|
37520 | }.call(exports, __webpack_require__(0)))
|
37521 |
|
37522 | }),
|
37523 |
|
37524 | (function(module, exports, __webpack_require__) {
|
37525 |
|
37526 | "use strict";
|
37527 |
|
37528 |
|
37529 |
|
37530 |
|
37531 |
|
37532 |
|
37533 |
|
37534 |
|
37535 |
|
37536 |
|
37537 |
|
37538 |
|
37539 | var _assign = __webpack_require__(4);
|
37540 |
|
37541 | var ReactUpdates = __webpack_require__(11);
|
37542 | var Transaction = __webpack_require__(29);
|
37543 |
|
37544 | var emptyFunction = __webpack_require__(8);
|
37545 |
|
37546 | var RESET_BATCHED_UPDATES = {
|
37547 | initialize: emptyFunction,
|
37548 | close: function () {
|
37549 | ReactDefaultBatchingStrategy.isBatchingUpdates = false;
|
37550 | }
|
37551 | };
|
37552 |
|
37553 | var FLUSH_BATCHED_UPDATES = {
|
37554 | initialize: emptyFunction,
|
37555 | close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)
|
37556 | };
|
37557 |
|
37558 | var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];
|
37559 |
|
37560 | function ReactDefaultBatchingStrategyTransaction() {
|
37561 | this.reinitializeTransaction();
|
37562 | }
|
37563 |
|
37564 | _assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, {
|
37565 | getTransactionWrappers: function () {
|
37566 | return TRANSACTION_WRAPPERS;
|
37567 | }
|
37568 | });
|
37569 |
|
37570 | var transaction = new ReactDefaultBatchingStrategyTransaction();
|
37571 |
|
37572 | var ReactDefaultBatchingStrategy = {
|
37573 | isBatchingUpdates: false,
|
37574 |
|
37575 | |
37576 |
|
37577 |
|
37578 |
|
37579 | batchedUpdates: function (callback, a, b, c, d, e) {
|
37580 | var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;
|
37581 |
|
37582 | ReactDefaultBatchingStrategy.isBatchingUpdates = true;
|
37583 |
|
37584 |
|
37585 | if (alreadyBatchingUpdates) {
|
37586 | return callback(a, b, c, d, e);
|
37587 | } else {
|
37588 | return transaction.perform(callback, null, a, b, c, d, e);
|
37589 | }
|
37590 | }
|
37591 | };
|
37592 |
|
37593 | module.exports = ReactDefaultBatchingStrategy;
|
37594 |
|
37595 | }),
|
37596 |
|
37597 | (function(module, exports, __webpack_require__) {
|
37598 |
|
37599 | "use strict";
|
37600 |
|
37601 |
|
37602 |
|
37603 |
|
37604 |
|
37605 |
|
37606 |
|
37607 |
|
37608 |
|
37609 |
|
37610 |
|
37611 |
|
37612 | var _assign = __webpack_require__(4);
|
37613 |
|
37614 | var EventListener = __webpack_require__(84);
|
37615 | var ExecutionEnvironment = __webpack_require__(6);
|
37616 | var PooledClass = __webpack_require__(16);
|
37617 | var ReactDOMComponentTree = __webpack_require__(5);
|
37618 | var ReactUpdates = __webpack_require__(11);
|
37619 |
|
37620 | var getEventTarget = __webpack_require__(40);
|
37621 | var getUnboundedScrollPosition = __webpack_require__(161);
|
37622 |
|
37623 |
|
37624 |
|
37625 |
|
37626 |
|
37627 |
|
37628 | function findParent(inst) {
|
37629 |
|
37630 |
|
37631 |
|
37632 | while (inst._hostParent) {
|
37633 | inst = inst._hostParent;
|
37634 | }
|
37635 | var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst);
|
37636 | var container = rootNode.parentNode;
|
37637 | return ReactDOMComponentTree.getClosestInstanceFromNode(container);
|
37638 | }
|
37639 |
|
37640 |
|
37641 | function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {
|
37642 | this.topLevelType = topLevelType;
|
37643 | this.nativeEvent = nativeEvent;
|
37644 | this.ancestors = [];
|
37645 | }
|
37646 | _assign(TopLevelCallbackBookKeeping.prototype, {
|
37647 | destructor: function () {
|
37648 | this.topLevelType = null;
|
37649 | this.nativeEvent = null;
|
37650 | this.ancestors.length = 0;
|
37651 | }
|
37652 | });
|
37653 | PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);
|
37654 |
|
37655 | function handleTopLevelImpl(bookKeeping) {
|
37656 | var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent);
|
37657 | var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget);
|
37658 |
|
37659 |
|
37660 |
|
37661 |
|
37662 |
|
37663 | var ancestor = targetInst;
|
37664 | do {
|
37665 | bookKeeping.ancestors.push(ancestor);
|
37666 | ancestor = ancestor && findParent(ancestor);
|
37667 | } while (ancestor);
|
37668 |
|
37669 | for (var i = 0; i < bookKeeping.ancestors.length; i++) {
|
37670 | targetInst = bookKeeping.ancestors[i];
|
37671 | ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
|
37672 | }
|
37673 | }
|
37674 |
|
37675 | function scrollValueMonitor(cb) {
|
37676 | var scrollPosition = getUnboundedScrollPosition(window);
|
37677 | cb(scrollPosition);
|
37678 | }
|
37679 |
|
37680 | var ReactEventListener = {
|
37681 | _enabled: true,
|
37682 | _handleTopLevel: null,
|
37683 |
|
37684 | WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,
|
37685 |
|
37686 | setHandleTopLevel: function (handleTopLevel) {
|
37687 | ReactEventListener._handleTopLevel = handleTopLevel;
|
37688 | },
|
37689 |
|
37690 | setEnabled: function (enabled) {
|
37691 | ReactEventListener._enabled = !!enabled;
|
37692 | },
|
37693 |
|
37694 | isEnabled: function () {
|
37695 | return ReactEventListener._enabled;
|
37696 | },
|
37697 |
|
37698 | |
37699 |
|
37700 |
|
37701 |
|
37702 |
|
37703 |
|
37704 |
|
37705 |
|
37706 |
|
37707 |
|
37708 | trapBubbledEvent: function (topLevelType, handlerBaseName, element) {
|
37709 | if (!element) {
|
37710 | return null;
|
37711 | }
|
37712 | return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
|
37713 | },
|
37714 |
|
37715 | |
37716 |
|
37717 |
|
37718 |
|
37719 |
|
37720 |
|
37721 |
|
37722 |
|
37723 |
|
37724 |
|
37725 | trapCapturedEvent: function (topLevelType, handlerBaseName, element) {
|
37726 | if (!element) {
|
37727 | return null;
|
37728 | }
|
37729 | return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
|
37730 | },
|
37731 |
|
37732 | monitorScrollValue: function (refresh) {
|
37733 | var callback = scrollValueMonitor.bind(null, refresh);
|
37734 | EventListener.listen(window, 'scroll', callback);
|
37735 | },
|
37736 |
|
37737 | dispatchEvent: function (topLevelType, nativeEvent) {
|
37738 | if (!ReactEventListener._enabled) {
|
37739 | return;
|
37740 | }
|
37741 |
|
37742 | var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent);
|
37743 | try {
|
37744 |
|
37745 |
|
37746 | ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);
|
37747 | } finally {
|
37748 | TopLevelCallbackBookKeeping.release(bookKeeping);
|
37749 | }
|
37750 | }
|
37751 | };
|
37752 |
|
37753 | module.exports = ReactEventListener;
|
37754 |
|
37755 | }),
|
37756 |
|
37757 | (function(module, exports, __webpack_require__) {
|
37758 |
|
37759 | "use strict";
|
37760 |
|
37761 |
|
37762 |
|
37763 |
|
37764 |
|
37765 |
|
37766 |
|
37767 |
|
37768 |
|
37769 |
|
37770 |
|
37771 |
|
37772 |
|
37773 |
|
37774 |
|
37775 |
|
37776 |
|
37777 |
|
37778 |
|
37779 |
|
37780 |
|
37781 |
|
37782 |
|
37783 |
|
37784 | function getUnboundedScrollPosition(scrollable) {
|
37785 | if (scrollable.Window && scrollable instanceof scrollable.Window) {
|
37786 | return {
|
37787 | x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,
|
37788 | y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop
|
37789 | };
|
37790 | }
|
37791 | return {
|
37792 | x: scrollable.scrollLeft,
|
37793 | y: scrollable.scrollTop
|
37794 | };
|
37795 | }
|
37796 |
|
37797 | module.exports = getUnboundedScrollPosition;
|
37798 |
|
37799 | }),
|
37800 |
|
37801 | (function(module, exports, __webpack_require__) {
|
37802 |
|
37803 | "use strict";
|
37804 |
|
37805 |
|
37806 |
|
37807 |
|
37808 |
|
37809 |
|
37810 |
|
37811 |
|
37812 |
|
37813 |
|
37814 |
|
37815 |
|
37816 | var DOMProperty = __webpack_require__(13);
|
37817 | var EventPluginHub = __webpack_require__(22);
|
37818 | var EventPluginUtils = __webpack_require__(38);
|
37819 | var ReactComponentEnvironment = __webpack_require__(47);
|
37820 | var ReactEmptyComponent = __webpack_require__(81);
|
37821 | var ReactBrowserEventEmitter = __webpack_require__(33);
|
37822 | var ReactHostComponent = __webpack_require__(82);
|
37823 | var ReactUpdates = __webpack_require__(11);
|
37824 |
|
37825 | var ReactInjection = {
|
37826 | Component: ReactComponentEnvironment.injection,
|
37827 | DOMProperty: DOMProperty.injection,
|
37828 | EmptyComponent: ReactEmptyComponent.injection,
|
37829 | EventPluginHub: EventPluginHub.injection,
|
37830 | EventPluginUtils: EventPluginUtils.injection,
|
37831 | EventEmitter: ReactBrowserEventEmitter.injection,
|
37832 | HostComponent: ReactHostComponent.injection,
|
37833 | Updates: ReactUpdates.injection
|
37834 | };
|
37835 |
|
37836 | module.exports = ReactInjection;
|
37837 |
|
37838 | }),
|
37839 |
|
37840 | (function(module, exports, __webpack_require__) {
|
37841 |
|
37842 | "use strict";
|
37843 | (function(process) { |
37844 |
|
37845 |
|
37846 |
|
37847 |
|
37848 |
|
37849 |
|
37850 |
|
37851 |
|
37852 |
|
37853 |
|
37854 |
|
37855 | var _assign = __webpack_require__(4);
|
37856 |
|
37857 | var CallbackQueue = __webpack_require__(68);
|
37858 | var PooledClass = __webpack_require__(16);
|
37859 | var ReactBrowserEventEmitter = __webpack_require__(33);
|
37860 | var ReactInputSelection = __webpack_require__(85);
|
37861 | var ReactInstrumentation = __webpack_require__(9);
|
37862 | var Transaction = __webpack_require__(29);
|
37863 | var ReactUpdateQueue = __webpack_require__(51);
|
37864 |
|
37865 |
|
37866 |
|
37867 |
|
37868 |
|
37869 | var SELECTION_RESTORATION = {
|
37870 | |
37871 |
|
37872 |
|
37873 | initialize: ReactInputSelection.getSelectionInformation,
|
37874 | |
37875 |
|
37876 |
|
37877 | close: ReactInputSelection.restoreSelection
|
37878 | };
|
37879 |
|
37880 |
|
37881 |
|
37882 |
|
37883 |
|
37884 |
|
37885 | var EVENT_SUPPRESSION = {
|
37886 | |
37887 |
|
37888 |
|
37889 |
|
37890 | initialize: function () {
|
37891 | var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();
|
37892 | ReactBrowserEventEmitter.setEnabled(false);
|
37893 | return currentlyEnabled;
|
37894 | },
|
37895 |
|
37896 | |
37897 |
|
37898 |
|
37899 |
|
37900 |
|
37901 | close: function (previouslyEnabled) {
|
37902 | ReactBrowserEventEmitter.setEnabled(previouslyEnabled);
|
37903 | }
|
37904 | };
|
37905 |
|
37906 |
|
37907 |
|
37908 |
|
37909 |
|
37910 | var ON_DOM_READY_QUEUEING = {
|
37911 | |
37912 |
|
37913 |
|
37914 | initialize: function () {
|
37915 | this.reactMountReady.reset();
|
37916 | },
|
37917 |
|
37918 | |
37919 |
|
37920 |
|
37921 | close: function () {
|
37922 | this.reactMountReady.notifyAll();
|
37923 | }
|
37924 | };
|
37925 |
|
37926 |
|
37927 |
|
37928 |
|
37929 |
|
37930 |
|
37931 | var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING];
|
37932 |
|
37933 | if (process.env.NODE_ENV !== 'production') {
|
37934 | TRANSACTION_WRAPPERS.push({
|
37935 | initialize: ReactInstrumentation.debugTool.onBeginFlush,
|
37936 | close: ReactInstrumentation.debugTool.onEndFlush
|
37937 | });
|
37938 | }
|
37939 |
|
37940 |
|
37941 |
|
37942 |
|
37943 |
|
37944 |
|
37945 |
|
37946 |
|
37947 |
|
37948 |
|
37949 |
|
37950 |
|
37951 |
|
37952 |
|
37953 |
|
37954 | function ReactReconcileTransaction(useCreateElement) {
|
37955 | this.reinitializeTransaction();
|
37956 |
|
37957 |
|
37958 |
|
37959 |
|
37960 |
|
37961 | this.renderToStaticMarkup = false;
|
37962 | this.reactMountReady = CallbackQueue.getPooled(null);
|
37963 | this.useCreateElement = useCreateElement;
|
37964 | }
|
37965 |
|
37966 | var Mixin = {
|
37967 | |
37968 |
|
37969 |
|
37970 |
|
37971 |
|
37972 |
|
37973 |
|
37974 | getTransactionWrappers: function () {
|
37975 | return TRANSACTION_WRAPPERS;
|
37976 | },
|
37977 |
|
37978 | |
37979 |
|
37980 |
|
37981 | getReactMountReady: function () {
|
37982 | return this.reactMountReady;
|
37983 | },
|
37984 |
|
37985 | |
37986 |
|
37987 |
|
37988 | getUpdateQueue: function () {
|
37989 | return ReactUpdateQueue;
|
37990 | },
|
37991 |
|
37992 | |
37993 |
|
37994 |
|
37995 |
|
37996 | checkpoint: function () {
|
37997 |
|
37998 | return this.reactMountReady.checkpoint();
|
37999 | },
|
38000 |
|
38001 | rollback: function (checkpoint) {
|
38002 | this.reactMountReady.rollback(checkpoint);
|
38003 | },
|
38004 |
|
38005 | |
38006 |
|
38007 |
|
38008 |
|
38009 | destructor: function () {
|
38010 | CallbackQueue.release(this.reactMountReady);
|
38011 | this.reactMountReady = null;
|
38012 | }
|
38013 | };
|
38014 |
|
38015 | _assign(ReactReconcileTransaction.prototype, Transaction, Mixin);
|
38016 |
|
38017 | PooledClass.addPoolingTo(ReactReconcileTransaction);
|
38018 |
|
38019 | module.exports = ReactReconcileTransaction;
|
38020 | }.call(exports, __webpack_require__(0)))
|
38021 |
|
38022 | }),
|
38023 |
|
38024 | (function(module, exports, __webpack_require__) {
|
38025 |
|
38026 | "use strict";
|
38027 |
|
38028 |
|
38029 |
|
38030 |
|
38031 |
|
38032 |
|
38033 |
|
38034 |
|
38035 |
|
38036 |
|
38037 |
|
38038 |
|
38039 | var ExecutionEnvironment = __webpack_require__(6);
|
38040 |
|
38041 | var getNodeForCharacterOffset = __webpack_require__(165);
|
38042 | var getTextContentAccessor = __webpack_require__(67);
|
38043 |
|
38044 |
|
38045 |
|
38046 |
|
38047 |
|
38048 |
|
38049 | function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {
|
38050 | return anchorNode === focusNode && anchorOffset === focusOffset;
|
38051 | }
|
38052 |
|
38053 |
|
38054 |
|
38055 |
|
38056 |
|
38057 |
|
38058 |
|
38059 |
|
38060 |
|
38061 |
|
38062 |
|
38063 |
|
38064 |
|
38065 |
|
38066 |
|
38067 | function getIEOffsets(node) {
|
38068 | var selection = document.selection;
|
38069 | var selectedRange = selection.createRange();
|
38070 | var selectedLength = selectedRange.text.length;
|
38071 |
|
38072 |
|
38073 | var fromStart = selectedRange.duplicate();
|
38074 | fromStart.moveToElementText(node);
|
38075 | fromStart.setEndPoint('EndToStart', selectedRange);
|
38076 |
|
38077 | var startOffset = fromStart.text.length;
|
38078 | var endOffset = startOffset + selectedLength;
|
38079 |
|
38080 | return {
|
38081 | start: startOffset,
|
38082 | end: endOffset
|
38083 | };
|
38084 | }
|
38085 |
|
38086 |
|
38087 |
|
38088 |
|
38089 |
|
38090 | function getModernOffsets(node) {
|
38091 | var selection = window.getSelection && window.getSelection();
|
38092 |
|
38093 | if (!selection || selection.rangeCount === 0) {
|
38094 | return null;
|
38095 | }
|
38096 |
|
38097 | var anchorNode = selection.anchorNode;
|
38098 | var anchorOffset = selection.anchorOffset;
|
38099 | var focusNode = selection.focusNode;
|
38100 | var focusOffset = selection.focusOffset;
|
38101 |
|
38102 | var currentRange = selection.getRangeAt(0);
|
38103 |
|
38104 |
|
38105 |
|
38106 |
|
38107 |
|
38108 |
|
38109 |
|
38110 |
|
38111 | try {
|
38112 |
|
38113 | currentRange.startContainer.nodeType;
|
38114 | currentRange.endContainer.nodeType;
|
38115 |
|
38116 | } catch (e) {
|
38117 | return null;
|
38118 | }
|
38119 |
|
38120 |
|
38121 |
|
38122 |
|
38123 | var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);
|
38124 |
|
38125 | var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;
|
38126 |
|
38127 | var tempRange = currentRange.cloneRange();
|
38128 | tempRange.selectNodeContents(node);
|
38129 | tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);
|
38130 |
|
38131 | var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset);
|
38132 |
|
38133 | var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;
|
38134 | var end = start + rangeLength;
|
38135 |
|
38136 |
|
38137 | var detectionRange = document.createRange();
|
38138 | detectionRange.setStart(anchorNode, anchorOffset);
|
38139 | detectionRange.setEnd(focusNode, focusOffset);
|
38140 | var isBackward = detectionRange.collapsed;
|
38141 |
|
38142 | return {
|
38143 | start: isBackward ? end : start,
|
38144 | end: isBackward ? start : end
|
38145 | };
|
38146 | }
|
38147 |
|
38148 |
|
38149 |
|
38150 |
|
38151 |
|
38152 | function setIEOffsets(node, offsets) {
|
38153 | var range = document.selection.createRange().duplicate();
|
38154 | var start, end;
|
38155 |
|
38156 | if (offsets.end === undefined) {
|
38157 | start = offsets.start;
|
38158 | end = start;
|
38159 | } else if (offsets.start > offsets.end) {
|
38160 | start = offsets.end;
|
38161 | end = offsets.start;
|
38162 | } else {
|
38163 | start = offsets.start;
|
38164 | end = offsets.end;
|
38165 | }
|
38166 |
|
38167 | range.moveToElementText(node);
|
38168 | range.moveStart('character', start);
|
38169 | range.setEndPoint('EndToStart', range);
|
38170 | range.moveEnd('character', end - start);
|
38171 | range.select();
|
38172 | }
|
38173 |
|
38174 |
|
38175 |
|
38176 |
|
38177 |
|
38178 |
|
38179 |
|
38180 |
|
38181 |
|
38182 |
|
38183 |
|
38184 |
|
38185 |
|
38186 | function setModernOffsets(node, offsets) {
|
38187 | if (!window.getSelection) {
|
38188 | return;
|
38189 | }
|
38190 |
|
38191 | var selection = window.getSelection();
|
38192 | var length = node[getTextContentAccessor()].length;
|
38193 | var start = Math.min(offsets.start, length);
|
38194 | var end = offsets.end === undefined ? start : Math.min(offsets.end, length);
|
38195 |
|
38196 |
|
38197 |
|
38198 | if (!selection.extend && start > end) {
|
38199 | var temp = end;
|
38200 | end = start;
|
38201 | start = temp;
|
38202 | }
|
38203 |
|
38204 | var startMarker = getNodeForCharacterOffset(node, start);
|
38205 | var endMarker = getNodeForCharacterOffset(node, end);
|
38206 |
|
38207 | if (startMarker && endMarker) {
|
38208 | var range = document.createRange();
|
38209 | range.setStart(startMarker.node, startMarker.offset);
|
38210 | selection.removeAllRanges();
|
38211 |
|
38212 | if (start > end) {
|
38213 | selection.addRange(range);
|
38214 | selection.extend(endMarker.node, endMarker.offset);
|
38215 | } else {
|
38216 | range.setEnd(endMarker.node, endMarker.offset);
|
38217 | selection.addRange(range);
|
38218 | }
|
38219 | }
|
38220 | }
|
38221 |
|
38222 | var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window);
|
38223 |
|
38224 | var ReactDOMSelection = {
|
38225 | |
38226 |
|
38227 |
|
38228 | getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,
|
38229 |
|
38230 | |
38231 |
|
38232 |
|
38233 |
|
38234 | setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
|
38235 | };
|
38236 |
|
38237 | module.exports = ReactDOMSelection;
|
38238 |
|
38239 | }),
|
38240 |
|
38241 | (function(module, exports, __webpack_require__) {
|
38242 |
|
38243 | "use strict";
|
38244 |
|
38245 |
|
38246 |
|
38247 |
|
38248 |
|
38249 |
|
38250 |
|
38251 |
|
38252 |
|
38253 |
|
38254 |
|
38255 |
|
38256 |
|
38257 |
|
38258 |
|
38259 |
|
38260 |
|
38261 |
|
38262 |
|
38263 | function getLeafNode(node) {
|
38264 | while (node && node.firstChild) {
|
38265 | node = node.firstChild;
|
38266 | }
|
38267 | return node;
|
38268 | }
|
38269 |
|
38270 |
|
38271 |
|
38272 |
|
38273 |
|
38274 |
|
38275 |
|
38276 |
|
38277 | function getSiblingNode(node) {
|
38278 | while (node) {
|
38279 | if (node.nextSibling) {
|
38280 | return node.nextSibling;
|
38281 | }
|
38282 | node = node.parentNode;
|
38283 | }
|
38284 | }
|
38285 |
|
38286 |
|
38287 |
|
38288 |
|
38289 |
|
38290 |
|
38291 |
|
38292 |
|
38293 | function getNodeForCharacterOffset(root, offset) {
|
38294 | var node = getLeafNode(root);
|
38295 | var nodeStart = 0;
|
38296 | var nodeEnd = 0;
|
38297 |
|
38298 | while (node) {
|
38299 | if (node.nodeType === 3) {
|
38300 | nodeEnd = nodeStart + node.textContent.length;
|
38301 |
|
38302 | if (nodeStart <= offset && nodeEnd >= offset) {
|
38303 | return {
|
38304 | node: node,
|
38305 | offset: offset - nodeStart
|
38306 | };
|
38307 | }
|
38308 |
|
38309 | nodeStart = nodeEnd;
|
38310 | }
|
38311 |
|
38312 | node = getLeafNode(getSiblingNode(node));
|
38313 | }
|
38314 | }
|
38315 |
|
38316 | module.exports = getNodeForCharacterOffset;
|
38317 |
|
38318 | }),
|
38319 |
|
38320 | (function(module, exports, __webpack_require__) {
|
38321 |
|
38322 | "use strict";
|
38323 |
|
38324 |
|
38325 |
|
38326 |
|
38327 |
|
38328 |
|
38329 |
|
38330 |
|
38331 |
|
38332 |
|
38333 |
|
38334 |
|
38335 |
|
38336 | var isTextNode = __webpack_require__(167);
|
38337 |
|
38338 |
|
38339 |
|
38340 |
|
38341 |
|
38342 |
|
38343 | function containsNode(outerNode, innerNode) {
|
38344 | if (!outerNode || !innerNode) {
|
38345 | return false;
|
38346 | } else if (outerNode === innerNode) {
|
38347 | return true;
|
38348 | } else if (isTextNode(outerNode)) {
|
38349 | return false;
|
38350 | } else if (isTextNode(innerNode)) {
|
38351 | return containsNode(outerNode, innerNode.parentNode);
|
38352 | } else if ('contains' in outerNode) {
|
38353 | return outerNode.contains(innerNode);
|
38354 | } else if (outerNode.compareDocumentPosition) {
|
38355 | return !!(outerNode.compareDocumentPosition(innerNode) & 16);
|
38356 | } else {
|
38357 | return false;
|
38358 | }
|
38359 | }
|
38360 |
|
38361 | module.exports = containsNode;
|
38362 |
|
38363 | }),
|
38364 |
|
38365 | (function(module, exports, __webpack_require__) {
|
38366 |
|
38367 | "use strict";
|
38368 |
|
38369 |
|
38370 |
|
38371 |
|
38372 |
|
38373 |
|
38374 |
|
38375 |
|
38376 |
|
38377 |
|
38378 |
|
38379 |
|
38380 |
|
38381 | var isNode = __webpack_require__(168);
|
38382 |
|
38383 |
|
38384 |
|
38385 |
|
38386 |
|
38387 | function isTextNode(object) {
|
38388 | return isNode(object) && object.nodeType == 3;
|
38389 | }
|
38390 |
|
38391 | module.exports = isTextNode;
|
38392 |
|
38393 | }),
|
38394 |
|
38395 | (function(module, exports, __webpack_require__) {
|
38396 |
|
38397 | "use strict";
|
38398 |
|
38399 |
|
38400 |
|
38401 |
|
38402 |
|
38403 |
|
38404 |
|
38405 |
|
38406 |
|
38407 |
|
38408 |
|
38409 |
|
38410 |
|
38411 |
|
38412 |
|
38413 |
|
38414 |
|
38415 | function isNode(object) {
|
38416 | var doc = object ? object.ownerDocument || object : document;
|
38417 | var defaultView = doc.defaultView || window;
|
38418 | return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
|
38419 | }
|
38420 |
|
38421 | module.exports = isNode;
|
38422 |
|
38423 | }),
|
38424 |
|
38425 | (function(module, exports, __webpack_require__) {
|
38426 |
|
38427 | "use strict";
|
38428 |
|
38429 |
|
38430 |
|
38431 |
|
38432 |
|
38433 |
|
38434 |
|
38435 |
|
38436 |
|
38437 |
|
38438 |
|
38439 |
|
38440 | var NS = {
|
38441 | xlink: 'http://www.w3.org/1999/xlink',
|
38442 | xml: 'http://www.w3.org/XML/1998/namespace'
|
38443 | };
|
38444 |
|
38445 |
|
38446 |
|
38447 |
|
38448 |
|
38449 |
|
38450 |
|
38451 |
|
38452 |
|
38453 |
|
38454 |
|
38455 |
|
38456 |
|
38457 |
|
38458 |
|
38459 |
|
38460 |
|
38461 |
|
38462 | var ATTRS = {
|
38463 | accentHeight: 'accent-height',
|
38464 | accumulate: 0,
|
38465 | additive: 0,
|
38466 | alignmentBaseline: 'alignment-baseline',
|
38467 | allowReorder: 'allowReorder',
|
38468 | alphabetic: 0,
|
38469 | amplitude: 0,
|
38470 | arabicForm: 'arabic-form',
|
38471 | ascent: 0,
|
38472 | attributeName: 'attributeName',
|
38473 | attributeType: 'attributeType',
|
38474 | autoReverse: 'autoReverse',
|
38475 | azimuth: 0,
|
38476 | baseFrequency: 'baseFrequency',
|
38477 | baseProfile: 'baseProfile',
|
38478 | baselineShift: 'baseline-shift',
|
38479 | bbox: 0,
|
38480 | begin: 0,
|
38481 | bias: 0,
|
38482 | by: 0,
|
38483 | calcMode: 'calcMode',
|
38484 | capHeight: 'cap-height',
|
38485 | clip: 0,
|
38486 | clipPath: 'clip-path',
|
38487 | clipRule: 'clip-rule',
|
38488 | clipPathUnits: 'clipPathUnits',
|
38489 | colorInterpolation: 'color-interpolation',
|
38490 | colorInterpolationFilters: 'color-interpolation-filters',
|
38491 | colorProfile: 'color-profile',
|
38492 | colorRendering: 'color-rendering',
|
38493 | contentScriptType: 'contentScriptType',
|
38494 | contentStyleType: 'contentStyleType',
|
38495 | cursor: 0,
|
38496 | cx: 0,
|
38497 | cy: 0,
|
38498 | d: 0,
|
38499 | decelerate: 0,
|
38500 | descent: 0,
|
38501 | diffuseConstant: 'diffuseConstant',
|
38502 | direction: 0,
|
38503 | display: 0,
|
38504 | divisor: 0,
|
38505 | dominantBaseline: 'dominant-baseline',
|
38506 | dur: 0,
|
38507 | dx: 0,
|
38508 | dy: 0,
|
38509 | edgeMode: 'edgeMode',
|
38510 | elevation: 0,
|
38511 | enableBackground: 'enable-background',
|
38512 | end: 0,
|
38513 | exponent: 0,
|
38514 | externalResourcesRequired: 'externalResourcesRequired',
|
38515 | fill: 0,
|
38516 | fillOpacity: 'fill-opacity',
|
38517 | fillRule: 'fill-rule',
|
38518 | filter: 0,
|
38519 | filterRes: 'filterRes',
|
38520 | filterUnits: 'filterUnits',
|
38521 | floodColor: 'flood-color',
|
38522 | floodOpacity: 'flood-opacity',
|
38523 | focusable: 0,
|
38524 | fontFamily: 'font-family',
|
38525 | fontSize: 'font-size',
|
38526 | fontSizeAdjust: 'font-size-adjust',
|
38527 | fontStretch: 'font-stretch',
|
38528 | fontStyle: 'font-style',
|
38529 | fontVariant: 'font-variant',
|
38530 | fontWeight: 'font-weight',
|
38531 | format: 0,
|
38532 | from: 0,
|
38533 | fx: 0,
|
38534 | fy: 0,
|
38535 | g1: 0,
|
38536 | g2: 0,
|
38537 | glyphName: 'glyph-name',
|
38538 | glyphOrientationHorizontal: 'glyph-orientation-horizontal',
|
38539 | glyphOrientationVertical: 'glyph-orientation-vertical',
|
38540 | glyphRef: 'glyphRef',
|
38541 | gradientTransform: 'gradientTransform',
|
38542 | gradientUnits: 'gradientUnits',
|
38543 | hanging: 0,
|
38544 | horizAdvX: 'horiz-adv-x',
|
38545 | horizOriginX: 'horiz-origin-x',
|
38546 | ideographic: 0,
|
38547 | imageRendering: 'image-rendering',
|
38548 | 'in': 0,
|
38549 | in2: 0,
|
38550 | intercept: 0,
|
38551 | k: 0,
|
38552 | k1: 0,
|
38553 | k2: 0,
|
38554 | k3: 0,
|
38555 | k4: 0,
|
38556 | kernelMatrix: 'kernelMatrix',
|
38557 | kernelUnitLength: 'kernelUnitLength',
|
38558 | kerning: 0,
|
38559 | keyPoints: 'keyPoints',
|
38560 | keySplines: 'keySplines',
|
38561 | keyTimes: 'keyTimes',
|
38562 | lengthAdjust: 'lengthAdjust',
|
38563 | letterSpacing: 'letter-spacing',
|
38564 | lightingColor: 'lighting-color',
|
38565 | limitingConeAngle: 'limitingConeAngle',
|
38566 | local: 0,
|
38567 | markerEnd: 'marker-end',
|
38568 | markerMid: 'marker-mid',
|
38569 | markerStart: 'marker-start',
|
38570 | markerHeight: 'markerHeight',
|
38571 | markerUnits: 'markerUnits',
|
38572 | markerWidth: 'markerWidth',
|
38573 | mask: 0,
|
38574 | maskContentUnits: 'maskContentUnits',
|
38575 | maskUnits: 'maskUnits',
|
38576 | mathematical: 0,
|
38577 | mode: 0,
|
38578 | numOctaves: 'numOctaves',
|
38579 | offset: 0,
|
38580 | opacity: 0,
|
38581 | operator: 0,
|
38582 | order: 0,
|
38583 | orient: 0,
|
38584 | orientation: 0,
|
38585 | origin: 0,
|
38586 | overflow: 0,
|
38587 | overlinePosition: 'overline-position',
|
38588 | overlineThickness: 'overline-thickness',
|
38589 | paintOrder: 'paint-order',
|
38590 | panose1: 'panose-1',
|
38591 | pathLength: 'pathLength',
|
38592 | patternContentUnits: 'patternContentUnits',
|
38593 | patternTransform: 'patternTransform',
|
38594 | patternUnits: 'patternUnits',
|
38595 | pointerEvents: 'pointer-events',
|
38596 | points: 0,
|
38597 | pointsAtX: 'pointsAtX',
|
38598 | pointsAtY: 'pointsAtY',
|
38599 | pointsAtZ: 'pointsAtZ',
|
38600 | preserveAlpha: 'preserveAlpha',
|
38601 | preserveAspectRatio: 'preserveAspectRatio',
|
38602 | primitiveUnits: 'primitiveUnits',
|
38603 | r: 0,
|
38604 | radius: 0,
|
38605 | refX: 'refX',
|
38606 | refY: 'refY',
|
38607 | renderingIntent: 'rendering-intent',
|
38608 | repeatCount: 'repeatCount',
|
38609 | repeatDur: 'repeatDur',
|
38610 | requiredExtensions: 'requiredExtensions',
|
38611 | requiredFeatures: 'requiredFeatures',
|
38612 | restart: 0,
|
38613 | result: 0,
|
38614 | rotate: 0,
|
38615 | rx: 0,
|
38616 | ry: 0,
|
38617 | scale: 0,
|
38618 | seed: 0,
|
38619 | shapeRendering: 'shape-rendering',
|
38620 | slope: 0,
|
38621 | spacing: 0,
|
38622 | specularConstant: 'specularConstant',
|
38623 | specularExponent: 'specularExponent',
|
38624 | speed: 0,
|
38625 | spreadMethod: 'spreadMethod',
|
38626 | startOffset: 'startOffset',
|
38627 | stdDeviation: 'stdDeviation',
|
38628 | stemh: 0,
|
38629 | stemv: 0,
|
38630 | stitchTiles: 'stitchTiles',
|
38631 | stopColor: 'stop-color',
|
38632 | stopOpacity: 'stop-opacity',
|
38633 | strikethroughPosition: 'strikethrough-position',
|
38634 | strikethroughThickness: 'strikethrough-thickness',
|
38635 | string: 0,
|
38636 | stroke: 0,
|
38637 | strokeDasharray: 'stroke-dasharray',
|
38638 | strokeDashoffset: 'stroke-dashoffset',
|
38639 | strokeLinecap: 'stroke-linecap',
|
38640 | strokeLinejoin: 'stroke-linejoin',
|
38641 | strokeMiterlimit: 'stroke-miterlimit',
|
38642 | strokeOpacity: 'stroke-opacity',
|
38643 | strokeWidth: 'stroke-width',
|
38644 | surfaceScale: 'surfaceScale',
|
38645 | systemLanguage: 'systemLanguage',
|
38646 | tableValues: 'tableValues',
|
38647 | targetX: 'targetX',
|
38648 | targetY: 'targetY',
|
38649 | textAnchor: 'text-anchor',
|
38650 | textDecoration: 'text-decoration',
|
38651 | textRendering: 'text-rendering',
|
38652 | textLength: 'textLength',
|
38653 | to: 0,
|
38654 | transform: 0,
|
38655 | u1: 0,
|
38656 | u2: 0,
|
38657 | underlinePosition: 'underline-position',
|
38658 | underlineThickness: 'underline-thickness',
|
38659 | unicode: 0,
|
38660 | unicodeBidi: 'unicode-bidi',
|
38661 | unicodeRange: 'unicode-range',
|
38662 | unitsPerEm: 'units-per-em',
|
38663 | vAlphabetic: 'v-alphabetic',
|
38664 | vHanging: 'v-hanging',
|
38665 | vIdeographic: 'v-ideographic',
|
38666 | vMathematical: 'v-mathematical',
|
38667 | values: 0,
|
38668 | vectorEffect: 'vector-effect',
|
38669 | version: 0,
|
38670 | vertAdvY: 'vert-adv-y',
|
38671 | vertOriginX: 'vert-origin-x',
|
38672 | vertOriginY: 'vert-origin-y',
|
38673 | viewBox: 'viewBox',
|
38674 | viewTarget: 'viewTarget',
|
38675 | visibility: 0,
|
38676 | widths: 0,
|
38677 | wordSpacing: 'word-spacing',
|
38678 | writingMode: 'writing-mode',
|
38679 | x: 0,
|
38680 | xHeight: 'x-height',
|
38681 | x1: 0,
|
38682 | x2: 0,
|
38683 | xChannelSelector: 'xChannelSelector',
|
38684 | xlinkActuate: 'xlink:actuate',
|
38685 | xlinkArcrole: 'xlink:arcrole',
|
38686 | xlinkHref: 'xlink:href',
|
38687 | xlinkRole: 'xlink:role',
|
38688 | xlinkShow: 'xlink:show',
|
38689 | xlinkTitle: 'xlink:title',
|
38690 | xlinkType: 'xlink:type',
|
38691 | xmlBase: 'xml:base',
|
38692 | xmlns: 0,
|
38693 | xmlnsXlink: 'xmlns:xlink',
|
38694 | xmlLang: 'xml:lang',
|
38695 | xmlSpace: 'xml:space',
|
38696 | y: 0,
|
38697 | y1: 0,
|
38698 | y2: 0,
|
38699 | yChannelSelector: 'yChannelSelector',
|
38700 | z: 0,
|
38701 | zoomAndPan: 'zoomAndPan'
|
38702 | };
|
38703 |
|
38704 | var SVGDOMPropertyConfig = {
|
38705 | Properties: {},
|
38706 | DOMAttributeNamespaces: {
|
38707 | xlinkActuate: NS.xlink,
|
38708 | xlinkArcrole: NS.xlink,
|
38709 | xlinkHref: NS.xlink,
|
38710 | xlinkRole: NS.xlink,
|
38711 | xlinkShow: NS.xlink,
|
38712 | xlinkTitle: NS.xlink,
|
38713 | xlinkType: NS.xlink,
|
38714 | xmlBase: NS.xml,
|
38715 | xmlLang: NS.xml,
|
38716 | xmlSpace: NS.xml
|
38717 | },
|
38718 | DOMAttributeNames: {}
|
38719 | };
|
38720 |
|
38721 | Object.keys(ATTRS).forEach(function (key) {
|
38722 | SVGDOMPropertyConfig.Properties[key] = 0;
|
38723 | if (ATTRS[key]) {
|
38724 | SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key];
|
38725 | }
|
38726 | });
|
38727 |
|
38728 | module.exports = SVGDOMPropertyConfig;
|
38729 |
|
38730 | }),
|
38731 |
|
38732 | (function(module, exports, __webpack_require__) {
|
38733 |
|
38734 | "use strict";
|
38735 |
|
38736 |
|
38737 |
|
38738 |
|
38739 |
|
38740 |
|
38741 |
|
38742 |
|
38743 |
|
38744 |
|
38745 |
|
38746 |
|
38747 | var EventPropagators = __webpack_require__(21);
|
38748 | var ExecutionEnvironment = __webpack_require__(6);
|
38749 | var ReactDOMComponentTree = __webpack_require__(5);
|
38750 | var ReactInputSelection = __webpack_require__(85);
|
38751 | var SyntheticEvent = __webpack_require__(12);
|
38752 |
|
38753 | var getActiveElement = __webpack_require__(86);
|
38754 | var isTextInputElement = __webpack_require__(71);
|
38755 | var shallowEqual = __webpack_require__(48);
|
38756 |
|
38757 | var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;
|
38758 |
|
38759 | var eventTypes = {
|
38760 | select: {
|
38761 | phasedRegistrationNames: {
|
38762 | bubbled: 'onSelect',
|
38763 | captured: 'onSelectCapture'
|
38764 | },
|
38765 | dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange']
|
38766 | }
|
38767 | };
|
38768 |
|
38769 | var activeElement = null;
|
38770 | var activeElementInst = null;
|
38771 | var lastSelection = null;
|
38772 | var mouseDown = false;
|
38773 |
|
38774 |
|
38775 |
|
38776 | var hasListener = false;
|
38777 |
|
38778 |
|
38779 |
|
38780 |
|
38781 |
|
38782 |
|
38783 |
|
38784 |
|
38785 |
|
38786 |
|
38787 | function getSelection(node) {
|
38788 | if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) {
|
38789 | return {
|
38790 | start: node.selectionStart,
|
38791 | end: node.selectionEnd
|
38792 | };
|
38793 | } else if (window.getSelection) {
|
38794 | var selection = window.getSelection();
|
38795 | return {
|
38796 | anchorNode: selection.anchorNode,
|
38797 | anchorOffset: selection.anchorOffset,
|
38798 | focusNode: selection.focusNode,
|
38799 | focusOffset: selection.focusOffset
|
38800 | };
|
38801 | } else if (document.selection) {
|
38802 | var range = document.selection.createRange();
|
38803 | return {
|
38804 | parentElement: range.parentElement(),
|
38805 | text: range.text,
|
38806 | top: range.boundingTop,
|
38807 | left: range.boundingLeft
|
38808 | };
|
38809 | }
|
38810 | }
|
38811 |
|
38812 |
|
38813 |
|
38814 |
|
38815 |
|
38816 |
|
38817 |
|
38818 | function constructSelectEvent(nativeEvent, nativeEventTarget) {
|
38819 |
|
38820 |
|
38821 |
|
38822 |
|
38823 | if (mouseDown || activeElement == null || activeElement !== getActiveElement()) {
|
38824 | return null;
|
38825 | }
|
38826 |
|
38827 |
|
38828 | var currentSelection = getSelection(activeElement);
|
38829 | if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
|
38830 | lastSelection = currentSelection;
|
38831 |
|
38832 | var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget);
|
38833 |
|
38834 | syntheticEvent.type = 'select';
|
38835 | syntheticEvent.target = activeElement;
|
38836 |
|
38837 | EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);
|
38838 |
|
38839 | return syntheticEvent;
|
38840 | }
|
38841 |
|
38842 | return null;
|
38843 | }
|
38844 |
|
38845 |
|
38846 |
|
38847 |
|
38848 |
|
38849 |
|
38850 |
|
38851 |
|
38852 |
|
38853 |
|
38854 |
|
38855 |
|
38856 |
|
38857 |
|
38858 |
|
38859 | var SelectEventPlugin = {
|
38860 | eventTypes: eventTypes,
|
38861 |
|
38862 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
38863 | if (!hasListener) {
|
38864 | return null;
|
38865 | }
|
38866 |
|
38867 | var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
|
38868 |
|
38869 | switch (topLevelType) {
|
38870 |
|
38871 | case 'topFocus':
|
38872 | if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
|
38873 | activeElement = targetNode;
|
38874 | activeElementInst = targetInst;
|
38875 | lastSelection = null;
|
38876 | }
|
38877 | break;
|
38878 | case 'topBlur':
|
38879 | activeElement = null;
|
38880 | activeElementInst = null;
|
38881 | lastSelection = null;
|
38882 | break;
|
38883 |
|
38884 |
|
38885 | case 'topMouseDown':
|
38886 | mouseDown = true;
|
38887 | break;
|
38888 | case 'topContextMenu':
|
38889 | case 'topMouseUp':
|
38890 | mouseDown = false;
|
38891 | return constructSelectEvent(nativeEvent, nativeEventTarget);
|
38892 |
|
38893 |
|
38894 |
|
38895 |
|
38896 |
|
38897 |
|
38898 |
|
38899 |
|
38900 |
|
38901 | case 'topSelectionChange':
|
38902 | if (skipSelectionChangeEvent) {
|
38903 | break;
|
38904 | }
|
38905 |
|
38906 | case 'topKeyDown':
|
38907 | case 'topKeyUp':
|
38908 | return constructSelectEvent(nativeEvent, nativeEventTarget);
|
38909 | }
|
38910 |
|
38911 | return null;
|
38912 | },
|
38913 |
|
38914 | didPutListener: function (inst, registrationName, listener) {
|
38915 | if (registrationName === 'onSelect') {
|
38916 | hasListener = true;
|
38917 | }
|
38918 | }
|
38919 | };
|
38920 |
|
38921 | module.exports = SelectEventPlugin;
|
38922 |
|
38923 | }),
|
38924 |
|
38925 | (function(module, exports, __webpack_require__) {
|
38926 |
|
38927 | "use strict";
|
38928 | (function(process) { |
38929 |
|
38930 |
|
38931 |
|
38932 |
|
38933 |
|
38934 |
|
38935 |
|
38936 |
|
38937 |
|
38938 |
|
38939 |
|
38940 |
|
38941 | var _prodInvariant = __webpack_require__(3);
|
38942 |
|
38943 | var EventListener = __webpack_require__(84);
|
38944 | var EventPropagators = __webpack_require__(21);
|
38945 | var ReactDOMComponentTree = __webpack_require__(5);
|
38946 | var SyntheticAnimationEvent = __webpack_require__(172);
|
38947 | var SyntheticClipboardEvent = __webpack_require__(173);
|
38948 | var SyntheticEvent = __webpack_require__(12);
|
38949 | var SyntheticFocusEvent = __webpack_require__(174);
|
38950 | var SyntheticKeyboardEvent = __webpack_require__(175);
|
38951 | var SyntheticMouseEvent = __webpack_require__(30);
|
38952 | var SyntheticDragEvent = __webpack_require__(177);
|
38953 | var SyntheticTouchEvent = __webpack_require__(178);
|
38954 | var SyntheticTransitionEvent = __webpack_require__(179);
|
38955 | var SyntheticUIEvent = __webpack_require__(23);
|
38956 | var SyntheticWheelEvent = __webpack_require__(180);
|
38957 |
|
38958 | var emptyFunction = __webpack_require__(8);
|
38959 | var getEventCharCode = __webpack_require__(53);
|
38960 | var invariant = __webpack_require__(1);
|
38961 |
|
38962 |
|
38963 |
|
38964 |
|
38965 |
|
38966 |
|
38967 |
|
38968 |
|
38969 |
|
38970 |
|
38971 |
|
38972 |
|
38973 |
|
38974 |
|
38975 |
|
38976 |
|
38977 |
|
38978 |
|
38979 |
|
38980 | var eventTypes = {};
|
38981 | var topLevelEventsToDispatchConfig = {};
|
38982 | ['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'canPlay', 'canPlayThrough', 'click', 'contextMenu', 'copy', 'cut', 'doubleClick', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'progress', 'rateChange', 'reset', 'scroll', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) {
|
38983 | var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
|
38984 | var onEvent = 'on' + capitalizedEvent;
|
38985 | var topEvent = 'top' + capitalizedEvent;
|
38986 |
|
38987 | var type = {
|
38988 | phasedRegistrationNames: {
|
38989 | bubbled: onEvent,
|
38990 | captured: onEvent + 'Capture'
|
38991 | },
|
38992 | dependencies: [topEvent]
|
38993 | };
|
38994 | eventTypes[event] = type;
|
38995 | topLevelEventsToDispatchConfig[topEvent] = type;
|
38996 | });
|
38997 |
|
38998 | var onClickListeners = {};
|
38999 |
|
39000 | function getDictionaryKey(inst) {
|
39001 |
|
39002 |
|
39003 | return '.' + inst._rootNodeID;
|
39004 | }
|
39005 |
|
39006 | function isInteractive(tag) {
|
39007 | return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
|
39008 | }
|
39009 |
|
39010 | var SimpleEventPlugin = {
|
39011 | eventTypes: eventTypes,
|
39012 |
|
39013 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
39014 | var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
|
39015 | if (!dispatchConfig) {
|
39016 | return null;
|
39017 | }
|
39018 | var EventConstructor;
|
39019 | switch (topLevelType) {
|
39020 | case 'topAbort':
|
39021 | case 'topCanPlay':
|
39022 | case 'topCanPlayThrough':
|
39023 | case 'topDurationChange':
|
39024 | case 'topEmptied':
|
39025 | case 'topEncrypted':
|
39026 | case 'topEnded':
|
39027 | case 'topError':
|
39028 | case 'topInput':
|
39029 | case 'topInvalid':
|
39030 | case 'topLoad':
|
39031 | case 'topLoadedData':
|
39032 | case 'topLoadedMetadata':
|
39033 | case 'topLoadStart':
|
39034 | case 'topPause':
|
39035 | case 'topPlay':
|
39036 | case 'topPlaying':
|
39037 | case 'topProgress':
|
39038 | case 'topRateChange':
|
39039 | case 'topReset':
|
39040 | case 'topSeeked':
|
39041 | case 'topSeeking':
|
39042 | case 'topStalled':
|
39043 | case 'topSubmit':
|
39044 | case 'topSuspend':
|
39045 | case 'topTimeUpdate':
|
39046 | case 'topVolumeChange':
|
39047 | case 'topWaiting':
|
39048 |
|
39049 |
|
39050 | EventConstructor = SyntheticEvent;
|
39051 | break;
|
39052 | case 'topKeyPress':
|
39053 |
|
39054 |
|
39055 |
|
39056 | if (getEventCharCode(nativeEvent) === 0) {
|
39057 | return null;
|
39058 | }
|
39059 |
|
39060 | case 'topKeyDown':
|
39061 | case 'topKeyUp':
|
39062 | EventConstructor = SyntheticKeyboardEvent;
|
39063 | break;
|
39064 | case 'topBlur':
|
39065 | case 'topFocus':
|
39066 | EventConstructor = SyntheticFocusEvent;
|
39067 | break;
|
39068 | case 'topClick':
|
39069 |
|
39070 |
|
39071 | if (nativeEvent.button === 2) {
|
39072 | return null;
|
39073 | }
|
39074 |
|
39075 | case 'topDoubleClick':
|
39076 | case 'topMouseDown':
|
39077 | case 'topMouseMove':
|
39078 | case 'topMouseUp':
|
39079 |
|
39080 |
|
39081 | case 'topMouseOut':
|
39082 | case 'topMouseOver':
|
39083 | case 'topContextMenu':
|
39084 | EventConstructor = SyntheticMouseEvent;
|
39085 | break;
|
39086 | case 'topDrag':
|
39087 | case 'topDragEnd':
|
39088 | case 'topDragEnter':
|
39089 | case 'topDragExit':
|
39090 | case 'topDragLeave':
|
39091 | case 'topDragOver':
|
39092 | case 'topDragStart':
|
39093 | case 'topDrop':
|
39094 | EventConstructor = SyntheticDragEvent;
|
39095 | break;
|
39096 | case 'topTouchCancel':
|
39097 | case 'topTouchEnd':
|
39098 | case 'topTouchMove':
|
39099 | case 'topTouchStart':
|
39100 | EventConstructor = SyntheticTouchEvent;
|
39101 | break;
|
39102 | case 'topAnimationEnd':
|
39103 | case 'topAnimationIteration':
|
39104 | case 'topAnimationStart':
|
39105 | EventConstructor = SyntheticAnimationEvent;
|
39106 | break;
|
39107 | case 'topTransitionEnd':
|
39108 | EventConstructor = SyntheticTransitionEvent;
|
39109 | break;
|
39110 | case 'topScroll':
|
39111 | EventConstructor = SyntheticUIEvent;
|
39112 | break;
|
39113 | case 'topWheel':
|
39114 | EventConstructor = SyntheticWheelEvent;
|
39115 | break;
|
39116 | case 'topCopy':
|
39117 | case 'topCut':
|
39118 | case 'topPaste':
|
39119 | EventConstructor = SyntheticClipboardEvent;
|
39120 | break;
|
39121 | }
|
39122 | !EventConstructor ? process.env.NODE_ENV !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0;
|
39123 | var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
|
39124 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
39125 | return event;
|
39126 | },
|
39127 |
|
39128 | didPutListener: function (inst, registrationName, listener) {
|
39129 |
|
39130 |
|
39131 |
|
39132 |
|
39133 |
|
39134 | if (registrationName === 'onClick' && !isInteractive(inst._tag)) {
|
39135 | var key = getDictionaryKey(inst);
|
39136 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
39137 | if (!onClickListeners[key]) {
|
39138 | onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction);
|
39139 | }
|
39140 | }
|
39141 | },
|
39142 |
|
39143 | willDeleteListener: function (inst, registrationName) {
|
39144 | if (registrationName === 'onClick' && !isInteractive(inst._tag)) {
|
39145 | var key = getDictionaryKey(inst);
|
39146 | onClickListeners[key].remove();
|
39147 | delete onClickListeners[key];
|
39148 | }
|
39149 | }
|
39150 | };
|
39151 |
|
39152 | module.exports = SimpleEventPlugin;
|
39153 | }.call(exports, __webpack_require__(0)))
|
39154 |
|
39155 | }),
|
39156 |
|
39157 | (function(module, exports, __webpack_require__) {
|
39158 |
|
39159 | "use strict";
|
39160 |
|
39161 |
|
39162 |
|
39163 |
|
39164 |
|
39165 |
|
39166 |
|
39167 |
|
39168 |
|
39169 |
|
39170 |
|
39171 |
|
39172 | var SyntheticEvent = __webpack_require__(12);
|
39173 |
|
39174 |
|
39175 |
|
39176 |
|
39177 |
|
39178 |
|
39179 | var AnimationEventInterface = {
|
39180 | animationName: null,
|
39181 | elapsedTime: null,
|
39182 | pseudoElement: null
|
39183 | };
|
39184 |
|
39185 |
|
39186 |
|
39187 |
|
39188 |
|
39189 |
|
39190 |
|
39191 | function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
39192 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
39193 | }
|
39194 |
|
39195 | SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface);
|
39196 |
|
39197 | module.exports = SyntheticAnimationEvent;
|
39198 |
|
39199 | }),
|
39200 |
|
39201 | (function(module, exports, __webpack_require__) {
|
39202 |
|
39203 | "use strict";
|
39204 |
|
39205 |
|
39206 |
|
39207 |
|
39208 |
|
39209 |
|
39210 |
|
39211 |
|
39212 |
|
39213 |
|
39214 |
|
39215 |
|
39216 | var SyntheticEvent = __webpack_require__(12);
|
39217 |
|
39218 |
|
39219 |
|
39220 |
|
39221 |
|
39222 | var ClipboardEventInterface = {
|
39223 | clipboardData: function (event) {
|
39224 | return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
|
39225 | }
|
39226 | };
|
39227 |
|
39228 |
|
39229 |
|
39230 |
|
39231 |
|
39232 |
|
39233 |
|
39234 | function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
39235 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
39236 | }
|
39237 |
|
39238 | SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
|
39239 |
|
39240 | module.exports = SyntheticClipboardEvent;
|
39241 |
|
39242 | }),
|
39243 |
|
39244 | (function(module, exports, __webpack_require__) {
|
39245 |
|
39246 | "use strict";
|
39247 |
|
39248 |
|
39249 |
|
39250 |
|
39251 |
|
39252 |
|
39253 |
|
39254 |
|
39255 |
|
39256 |
|
39257 |
|
39258 |
|
39259 | var SyntheticUIEvent = __webpack_require__(23);
|
39260 |
|
39261 |
|
39262 |
|
39263 |
|
39264 |
|
39265 | var FocusEventInterface = {
|
39266 | relatedTarget: null
|
39267 | };
|
39268 |
|
39269 |
|
39270 |
|
39271 |
|
39272 |
|
39273 |
|
39274 |
|
39275 | function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
39276 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
39277 | }
|
39278 |
|
39279 | SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);
|
39280 |
|
39281 | module.exports = SyntheticFocusEvent;
|
39282 |
|
39283 | }),
|
39284 |
|
39285 | (function(module, exports, __webpack_require__) {
|
39286 |
|
39287 | "use strict";
|
39288 |
|
39289 |
|
39290 |
|
39291 |
|
39292 |
|
39293 |
|
39294 |
|
39295 |
|
39296 |
|
39297 |
|
39298 |
|
39299 |
|
39300 | var SyntheticUIEvent = __webpack_require__(23);
|
39301 |
|
39302 | var getEventCharCode = __webpack_require__(53);
|
39303 | var getEventKey = __webpack_require__(176);
|
39304 | var getEventModifierState = __webpack_require__(42);
|
39305 |
|
39306 |
|
39307 |
|
39308 |
|
39309 |
|
39310 | var KeyboardEventInterface = {
|
39311 | key: getEventKey,
|
39312 | location: null,
|
39313 | ctrlKey: null,
|
39314 | shiftKey: null,
|
39315 | altKey: null,
|
39316 | metaKey: null,
|
39317 | repeat: null,
|
39318 | locale: null,
|
39319 | getModifierState: getEventModifierState,
|
39320 |
|
39321 | charCode: function (event) {
|
39322 |
|
39323 |
|
39324 |
|
39325 |
|
39326 |
|
39327 | if (event.type === 'keypress') {
|
39328 | return getEventCharCode(event);
|
39329 | }
|
39330 | return 0;
|
39331 | },
|
39332 | keyCode: function (event) {
|
39333 |
|
39334 |
|
39335 |
|
39336 |
|
39337 |
|
39338 |
|
39339 |
|
39340 | if (event.type === 'keydown' || event.type === 'keyup') {
|
39341 | return event.keyCode;
|
39342 | }
|
39343 | return 0;
|
39344 | },
|
39345 | which: function (event) {
|
39346 |
|
39347 |
|
39348 | if (event.type === 'keypress') {
|
39349 | return getEventCharCode(event);
|
39350 | }
|
39351 | if (event.type === 'keydown' || event.type === 'keyup') {
|
39352 | return event.keyCode;
|
39353 | }
|
39354 | return 0;
|
39355 | }
|
39356 | };
|
39357 |
|
39358 |
|
39359 |
|
39360 |
|
39361 |
|
39362 |
|
39363 |
|
39364 | function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
39365 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
39366 | }
|
39367 |
|
39368 | SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);
|
39369 |
|
39370 | module.exports = SyntheticKeyboardEvent;
|
39371 |
|
39372 | }),
|
39373 |
|
39374 | (function(module, exports, __webpack_require__) {
|
39375 |
|
39376 | "use strict";
|
39377 |
|
39378 |
|
39379 |
|
39380 |
|
39381 |
|
39382 |
|
39383 |
|
39384 |
|
39385 |
|
39386 |
|
39387 |
|
39388 |
|
39389 | var getEventCharCode = __webpack_require__(53);
|
39390 |
|
39391 |
|
39392 |
|
39393 |
|
39394 |
|
39395 | var normalizeKey = {
|
39396 | Esc: 'Escape',
|
39397 | Spacebar: ' ',
|
39398 | Left: 'ArrowLeft',
|
39399 | Up: 'ArrowUp',
|
39400 | Right: 'ArrowRight',
|
39401 | Down: 'ArrowDown',
|
39402 | Del: 'Delete',
|
39403 | Win: 'OS',
|
39404 | Menu: 'ContextMenu',
|
39405 | Apps: 'ContextMenu',
|
39406 | Scroll: 'ScrollLock',
|
39407 | MozPrintableKey: 'Unidentified'
|
39408 | };
|
39409 |
|
39410 |
|
39411 |
|
39412 |
|
39413 |
|
39414 |
|
39415 | var translateToKey = {
|
39416 | 8: 'Backspace',
|
39417 | 9: 'Tab',
|
39418 | 12: 'Clear',
|
39419 | 13: 'Enter',
|
39420 | 16: 'Shift',
|
39421 | 17: 'Control',
|
39422 | 18: 'Alt',
|
39423 | 19: 'Pause',
|
39424 | 20: 'CapsLock',
|
39425 | 27: 'Escape',
|
39426 | 32: ' ',
|
39427 | 33: 'PageUp',
|
39428 | 34: 'PageDown',
|
39429 | 35: 'End',
|
39430 | 36: 'Home',
|
39431 | 37: 'ArrowLeft',
|
39432 | 38: 'ArrowUp',
|
39433 | 39: 'ArrowRight',
|
39434 | 40: 'ArrowDown',
|
39435 | 45: 'Insert',
|
39436 | 46: 'Delete',
|
39437 | 112: 'F1',
|
39438 | 113: 'F2',
|
39439 | 114: 'F3',
|
39440 | 115: 'F4',
|
39441 | 116: 'F5',
|
39442 | 117: 'F6',
|
39443 | 118: 'F7',
|
39444 | 119: 'F8',
|
39445 | 120: 'F9',
|
39446 | 121: 'F10',
|
39447 | 122: 'F11',
|
39448 | 123: 'F12',
|
39449 | 144: 'NumLock',
|
39450 | 145: 'ScrollLock',
|
39451 | 224: 'Meta'
|
39452 | };
|
39453 |
|
39454 |
|
39455 |
|
39456 |
|
39457 |
|
39458 | function getEventKey(nativeEvent) {
|
39459 | if (nativeEvent.key) {
|
39460 |
|
39461 |
|
39462 |
|
39463 |
|
39464 |
|
39465 | var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
|
39466 | if (key !== 'Unidentified') {
|
39467 | return key;
|
39468 | }
|
39469 | }
|
39470 |
|
39471 |
|
39472 | if (nativeEvent.type === 'keypress') {
|
39473 | var charCode = getEventCharCode(nativeEvent);
|
39474 |
|
39475 |
|
39476 |
|
39477 | return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
|
39478 | }
|
39479 | if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
|
39480 |
|
39481 |
|
39482 | return translateToKey[nativeEvent.keyCode] || 'Unidentified';
|
39483 | }
|
39484 | return '';
|
39485 | }
|
39486 |
|
39487 | module.exports = getEventKey;
|
39488 |
|
39489 | }),
|
39490 |
|
39491 | (function(module, exports, __webpack_require__) {
|
39492 |
|
39493 | "use strict";
|
39494 |
|
39495 |
|
39496 |
|
39497 |
|
39498 |
|
39499 |
|
39500 |
|
39501 |
|
39502 |
|
39503 |
|
39504 |
|
39505 |
|
39506 | var SyntheticMouseEvent = __webpack_require__(30);
|
39507 |
|
39508 |
|
39509 |
|
39510 |
|
39511 |
|
39512 | var DragEventInterface = {
|
39513 | dataTransfer: null
|
39514 | };
|
39515 |
|
39516 |
|
39517 |
|
39518 |
|
39519 |
|
39520 |
|
39521 |
|
39522 | function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
39523 | return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
39524 | }
|
39525 |
|
39526 | SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);
|
39527 |
|
39528 | module.exports = SyntheticDragEvent;
|
39529 |
|
39530 | }),
|
39531 |
|
39532 | (function(module, exports, __webpack_require__) {
|
39533 |
|
39534 | "use strict";
|
39535 |
|
39536 |
|
39537 |
|
39538 |
|
39539 |
|
39540 |
|
39541 |
|
39542 |
|
39543 |
|
39544 |
|
39545 |
|
39546 |
|
39547 | var SyntheticUIEvent = __webpack_require__(23);
|
39548 |
|
39549 | var getEventModifierState = __webpack_require__(42);
|
39550 |
|
39551 |
|
39552 |
|
39553 |
|
39554 |
|
39555 | var TouchEventInterface = {
|
39556 | touches: null,
|
39557 | targetTouches: null,
|
39558 | changedTouches: null,
|
39559 | altKey: null,
|
39560 | metaKey: null,
|
39561 | ctrlKey: null,
|
39562 | shiftKey: null,
|
39563 | getModifierState: getEventModifierState
|
39564 | };
|
39565 |
|
39566 |
|
39567 |
|
39568 |
|
39569 |
|
39570 |
|
39571 |
|
39572 | function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
39573 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
39574 | }
|
39575 |
|
39576 | SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
|
39577 |
|
39578 | module.exports = SyntheticTouchEvent;
|
39579 |
|
39580 | }),
|
39581 |
|
39582 | (function(module, exports, __webpack_require__) {
|
39583 |
|
39584 | "use strict";
|
39585 |
|
39586 |
|
39587 |
|
39588 |
|
39589 |
|
39590 |
|
39591 |
|
39592 |
|
39593 |
|
39594 |
|
39595 |
|
39596 |
|
39597 | var SyntheticEvent = __webpack_require__(12);
|
39598 |
|
39599 |
|
39600 |
|
39601 |
|
39602 |
|
39603 |
|
39604 | var TransitionEventInterface = {
|
39605 | propertyName: null,
|
39606 | elapsedTime: null,
|
39607 | pseudoElement: null
|
39608 | };
|
39609 |
|
39610 |
|
39611 |
|
39612 |
|
39613 |
|
39614 |
|
39615 |
|
39616 | function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
39617 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
39618 | }
|
39619 |
|
39620 | SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface);
|
39621 |
|
39622 | module.exports = SyntheticTransitionEvent;
|
39623 |
|
39624 | }),
|
39625 |
|
39626 | (function(module, exports, __webpack_require__) {
|
39627 |
|
39628 | "use strict";
|
39629 |
|
39630 |
|
39631 |
|
39632 |
|
39633 |
|
39634 |
|
39635 |
|
39636 |
|
39637 |
|
39638 |
|
39639 |
|
39640 |
|
39641 | var SyntheticMouseEvent = __webpack_require__(30);
|
39642 |
|
39643 |
|
39644 |
|
39645 |
|
39646 |
|
39647 | var WheelEventInterface = {
|
39648 | deltaX: function (event) {
|
39649 | return 'deltaX' in event ? event.deltaX :
|
39650 | 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
|
39651 | },
|
39652 | deltaY: function (event) {
|
39653 | return 'deltaY' in event ? event.deltaY :
|
39654 | 'wheelDeltaY' in event ? -event.wheelDeltaY :
|
39655 | 'wheelDelta' in event ? -event.wheelDelta : 0;
|
39656 | },
|
39657 | deltaZ: null,
|
39658 |
|
39659 |
|
39660 |
|
39661 |
|
39662 |
|
39663 | deltaMode: null
|
39664 | };
|
39665 |
|
39666 |
|
39667 |
|
39668 |
|
39669 |
|
39670 |
|
39671 |
|
39672 | function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
39673 | return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
39674 | }
|
39675 |
|
39676 | SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);
|
39677 |
|
39678 | module.exports = SyntheticWheelEvent;
|
39679 |
|
39680 | }),
|
39681 |
|
39682 | (function(module, exports, __webpack_require__) {
|
39683 |
|
39684 | "use strict";
|
39685 | (function(process) { |
39686 |
|
39687 |
|
39688 |
|
39689 |
|
39690 |
|
39691 |
|
39692 |
|
39693 |
|
39694 |
|
39695 |
|
39696 |
|
39697 | var validateDOMNesting = __webpack_require__(52);
|
39698 |
|
39699 | var DOC_NODE_TYPE = 9;
|
39700 |
|
39701 | function ReactDOMContainerInfo(topLevelWrapper, node) {
|
39702 | var info = {
|
39703 | _topLevelWrapper: topLevelWrapper,
|
39704 | _idCounter: 1,
|
39705 | _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null,
|
39706 | _node: node,
|
39707 | _tag: node ? node.nodeName.toLowerCase() : null,
|
39708 | _namespaceURI: node ? node.namespaceURI : null
|
39709 | };
|
39710 | if (process.env.NODE_ENV !== 'production') {
|
39711 | info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null;
|
39712 | }
|
39713 | return info;
|
39714 | }
|
39715 |
|
39716 | module.exports = ReactDOMContainerInfo;
|
39717 | }.call(exports, __webpack_require__(0)))
|
39718 |
|
39719 | }),
|
39720 |
|
39721 | (function(module, exports, __webpack_require__) {
|
39722 |
|
39723 | "use strict";
|
39724 |
|
39725 |
|
39726 |
|
39727 |
|
39728 |
|
39729 |
|
39730 |
|
39731 |
|
39732 |
|
39733 |
|
39734 |
|
39735 |
|
39736 | var ReactDOMFeatureFlags = {
|
39737 | useCreateElement: true,
|
39738 | useFiber: false
|
39739 | };
|
39740 |
|
39741 | module.exports = ReactDOMFeatureFlags;
|
39742 |
|
39743 | }),
|
39744 |
|
39745 | (function(module, exports, __webpack_require__) {
|
39746 |
|
39747 | "use strict";
|
39748 |
|
39749 |
|
39750 |
|
39751 |
|
39752 |
|
39753 |
|
39754 |
|
39755 |
|
39756 |
|
39757 |
|
39758 |
|
39759 |
|
39760 | var adler32 = __webpack_require__(184);
|
39761 |
|
39762 | var TAG_END = /\/?>/;
|
39763 | var COMMENT_START = /^<\!\-\-/;
|
39764 |
|
39765 | var ReactMarkupChecksum = {
|
39766 | CHECKSUM_ATTR_NAME: 'data-react-checksum',
|
39767 |
|
39768 | |
39769 |
|
39770 |
|
39771 |
|
39772 | addChecksumToMarkup: function (markup) {
|
39773 | var checksum = adler32(markup);
|
39774 |
|
39775 |
|
39776 | if (COMMENT_START.test(markup)) {
|
39777 | return markup;
|
39778 | } else {
|
39779 | return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&');
|
39780 | }
|
39781 | },
|
39782 |
|
39783 | |
39784 |
|
39785 |
|
39786 |
|
39787 |
|
39788 | canReuseMarkup: function (markup, element) {
|
39789 | var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
|
39790 | existingChecksum = existingChecksum && parseInt(existingChecksum, 10);
|
39791 | var markupChecksum = adler32(markup);
|
39792 | return markupChecksum === existingChecksum;
|
39793 | }
|
39794 | };
|
39795 |
|
39796 | module.exports = ReactMarkupChecksum;
|
39797 |
|
39798 | }),
|
39799 |
|
39800 | (function(module, exports, __webpack_require__) {
|
39801 |
|
39802 | "use strict";
|
39803 |
|
39804 |
|
39805 |
|
39806 |
|
39807 |
|
39808 |
|
39809 |
|
39810 |
|
39811 |
|
39812 |
|
39813 |
|
39814 |
|
39815 |
|
39816 | var MOD = 65521;
|
39817 |
|
39818 |
|
39819 |
|
39820 |
|
39821 |
|
39822 |
|
39823 | function adler32(data) {
|
39824 | var a = 1;
|
39825 | var b = 0;
|
39826 | var i = 0;
|
39827 | var l = data.length;
|
39828 | var m = l & ~0x3;
|
39829 | while (i < m) {
|
39830 | var n = Math.min(i + 4096, m);
|
39831 | for (; i < n; i += 4) {
|
39832 | b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3));
|
39833 | }
|
39834 | a %= MOD;
|
39835 | b %= MOD;
|
39836 | }
|
39837 | for (; i < l; i++) {
|
39838 | b += a += data.charCodeAt(i);
|
39839 | }
|
39840 | a %= MOD;
|
39841 | b %= MOD;
|
39842 | return a | b << 16;
|
39843 | }
|
39844 |
|
39845 | module.exports = adler32;
|
39846 |
|
39847 | }),
|
39848 |
|
39849 | (function(module, exports, __webpack_require__) {
|
39850 |
|
39851 | "use strict";
|
39852 |
|
39853 |
|
39854 |
|
39855 |
|
39856 |
|
39857 |
|
39858 |
|
39859 |
|
39860 |
|
39861 |
|
39862 |
|
39863 |
|
39864 | module.exports = '15.6.1';
|
39865 |
|
39866 | }),
|
39867 |
|
39868 | (function(module, exports, __webpack_require__) {
|
39869 |
|
39870 | "use strict";
|
39871 | (function(process) { |
39872 |
|
39873 |
|
39874 |
|
39875 |
|
39876 |
|
39877 |
|
39878 |
|
39879 |
|
39880 |
|
39881 |
|
39882 |
|
39883 | var _prodInvariant = __webpack_require__(3);
|
39884 |
|
39885 | var ReactCurrentOwner = __webpack_require__(10);
|
39886 | var ReactDOMComponentTree = __webpack_require__(5);
|
39887 | var ReactInstanceMap = __webpack_require__(24);
|
39888 |
|
39889 | var getHostComponentFromComposite = __webpack_require__(88);
|
39890 | var invariant = __webpack_require__(1);
|
39891 | var warning = __webpack_require__(2);
|
39892 |
|
39893 |
|
39894 |
|
39895 |
|
39896 |
|
39897 |
|
39898 |
|
39899 |
|
39900 |
|
39901 | function findDOMNode(componentOrElement) {
|
39902 | if (process.env.NODE_ENV !== 'production') {
|
39903 | var owner = ReactCurrentOwner.current;
|
39904 | if (owner !== null) {
|
39905 | process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;
|
39906 | owner._warnedAboutRefsInRender = true;
|
39907 | }
|
39908 | }
|
39909 | if (componentOrElement == null) {
|
39910 | return null;
|
39911 | }
|
39912 | if (componentOrElement.nodeType === 1) {
|
39913 | return componentOrElement;
|
39914 | }
|
39915 |
|
39916 | var inst = ReactInstanceMap.get(componentOrElement);
|
39917 | if (inst) {
|
39918 | inst = getHostComponentFromComposite(inst);
|
39919 | return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null;
|
39920 | }
|
39921 |
|
39922 | if (typeof componentOrElement.render === 'function') {
|
39923 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'findDOMNode was called on an unmounted component.') : _prodInvariant('44') : void 0;
|
39924 | } else {
|
39925 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : _prodInvariant('45', Object.keys(componentOrElement)) : void 0;
|
39926 | }
|
39927 | }
|
39928 |
|
39929 | module.exports = findDOMNode;
|
39930 | }.call(exports, __webpack_require__(0)))
|
39931 |
|
39932 | }),
|
39933 |
|
39934 | (function(module, exports, __webpack_require__) {
|
39935 |
|
39936 | "use strict";
|
39937 |
|
39938 |
|
39939 |
|
39940 |
|
39941 |
|
39942 |
|
39943 |
|
39944 |
|
39945 |
|
39946 |
|
39947 |
|
39948 |
|
39949 | var ReactMount = __webpack_require__(87);
|
39950 |
|
39951 | module.exports = ReactMount.renderSubtreeIntoContainer;
|
39952 |
|
39953 | }),
|
39954 |
|
39955 | (function(module, exports, __webpack_require__) {
|
39956 |
|
39957 | "use strict";
|
39958 | (function(process) { |
39959 |
|
39960 |
|
39961 |
|
39962 |
|
39963 |
|
39964 |
|
39965 |
|
39966 |
|
39967 |
|
39968 |
|
39969 |
|
39970 | var DOMProperty = __webpack_require__(13);
|
39971 | var EventPluginRegistry = __webpack_require__(28);
|
39972 | var ReactComponentTreeHook = __webpack_require__(7);
|
39973 |
|
39974 | var warning = __webpack_require__(2);
|
39975 |
|
39976 | if (process.env.NODE_ENV !== 'production') {
|
39977 | var reactProps = {
|
39978 | children: true,
|
39979 | dangerouslySetInnerHTML: true,
|
39980 | key: true,
|
39981 | ref: true,
|
39982 |
|
39983 | autoFocus: true,
|
39984 | defaultValue: true,
|
39985 | valueLink: true,
|
39986 | defaultChecked: true,
|
39987 | checkedLink: true,
|
39988 | innerHTML: true,
|
39989 | suppressContentEditableWarning: true,
|
39990 | onFocusIn: true,
|
39991 | onFocusOut: true
|
39992 | };
|
39993 | var warnedProperties = {};
|
39994 |
|
39995 | var validateProperty = function (tagName, name, debugID) {
|
39996 | if (DOMProperty.properties.hasOwnProperty(name) || DOMProperty.isCustomAttribute(name)) {
|
39997 | return true;
|
39998 | }
|
39999 | if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
|
40000 | return true;
|
40001 | }
|
40002 | if (EventPluginRegistry.registrationNameModules.hasOwnProperty(name)) {
|
40003 | return true;
|
40004 | }
|
40005 | warnedProperties[name] = true;
|
40006 | var lowerCasedName = name.toLowerCase();
|
40007 |
|
40008 |
|
40009 | var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;
|
40010 |
|
40011 | var registrationName = EventPluginRegistry.possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? EventPluginRegistry.possibleRegistrationNames[lowerCasedName] : null;
|
40012 |
|
40013 | if (standardName != null) {
|
40014 | process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown DOM property %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
40015 | return true;
|
40016 | } else if (registrationName != null) {
|
40017 | process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown event handler property %s. Did you mean `%s`?%s', name, registrationName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
40018 | return true;
|
40019 | } else {
|
40020 |
|
40021 |
|
40022 |
|
40023 |
|
40024 | return false;
|
40025 | }
|
40026 | };
|
40027 | }
|
40028 |
|
40029 | var warnUnknownProperties = function (debugID, element) {
|
40030 | var unknownProps = [];
|
40031 | for (var key in element.props) {
|
40032 | var isValid = validateProperty(element.type, key, debugID);
|
40033 | if (!isValid) {
|
40034 | unknownProps.push(key);
|
40035 | }
|
40036 | }
|
40037 |
|
40038 | var unknownPropString = unknownProps.map(function (prop) {
|
40039 | return '`' + prop + '`';
|
40040 | }).join(', ');
|
40041 |
|
40042 | if (unknownProps.length === 1) {
|
40043 | process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown prop %s on <%s> tag. Remove this prop from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
40044 | } else if (unknownProps.length > 1) {
|
40045 | process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown props %s on <%s> tag. Remove these props from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
40046 | }
|
40047 | };
|
40048 |
|
40049 | function handleElement(debugID, element) {
|
40050 | if (element == null || typeof element.type !== 'string') {
|
40051 | return;
|
40052 | }
|
40053 | if (element.type.indexOf('-') >= 0 || element.props.is) {
|
40054 | return;
|
40055 | }
|
40056 | warnUnknownProperties(debugID, element);
|
40057 | }
|
40058 |
|
40059 | var ReactDOMUnknownPropertyHook = {
|
40060 | onBeforeMountComponent: function (debugID, element) {
|
40061 | handleElement(debugID, element);
|
40062 | },
|
40063 | onBeforeUpdateComponent: function (debugID, element) {
|
40064 | handleElement(debugID, element);
|
40065 | }
|
40066 | };
|
40067 |
|
40068 | module.exports = ReactDOMUnknownPropertyHook;
|
40069 | }.call(exports, __webpack_require__(0)))
|
40070 |
|
40071 | }),
|
40072 |
|
40073 | (function(module, exports, __webpack_require__) {
|
40074 |
|
40075 | "use strict";
|
40076 | (function(process) { |
40077 |
|
40078 |
|
40079 |
|
40080 |
|
40081 |
|
40082 |
|
40083 |
|
40084 |
|
40085 |
|
40086 |
|
40087 |
|
40088 | var ReactComponentTreeHook = __webpack_require__(7);
|
40089 |
|
40090 | var warning = __webpack_require__(2);
|
40091 |
|
40092 | var didWarnValueNull = false;
|
40093 |
|
40094 | function handleElement(debugID, element) {
|
40095 | if (element == null) {
|
40096 | return;
|
40097 | }
|
40098 | if (element.type !== 'input' && element.type !== 'textarea' && element.type !== 'select') {
|
40099 | return;
|
40100 | }
|
40101 | if (element.props != null && element.props.value === null && !didWarnValueNull) {
|
40102 | process.env.NODE_ENV !== 'production' ? warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using the empty string to clear the component or `undefined` ' + 'for uncontrolled components.%s', element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
40103 |
|
40104 | didWarnValueNull = true;
|
40105 | }
|
40106 | }
|
40107 |
|
40108 | var ReactDOMNullInputValuePropHook = {
|
40109 | onBeforeMountComponent: function (debugID, element) {
|
40110 | handleElement(debugID, element);
|
40111 | },
|
40112 | onBeforeUpdateComponent: function (debugID, element) {
|
40113 | handleElement(debugID, element);
|
40114 | }
|
40115 | };
|
40116 |
|
40117 | module.exports = ReactDOMNullInputValuePropHook;
|
40118 | }.call(exports, __webpack_require__(0)))
|
40119 |
|
40120 | }),
|
40121 |
|
40122 | (function(module, exports, __webpack_require__) {
|
40123 |
|
40124 | "use strict";
|
40125 | (function(process) { |
40126 |
|
40127 |
|
40128 |
|
40129 |
|
40130 |
|
40131 |
|
40132 |
|
40133 |
|
40134 |
|
40135 |
|
40136 |
|
40137 | var DOMProperty = __webpack_require__(13);
|
40138 | var ReactComponentTreeHook = __webpack_require__(7);
|
40139 |
|
40140 | var warning = __webpack_require__(2);
|
40141 |
|
40142 | var warnedProperties = {};
|
40143 | var rARIA = new RegExp('^(aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
|
40144 |
|
40145 | function validateProperty(tagName, name, debugID) {
|
40146 | if (warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
|
40147 | return true;
|
40148 | }
|
40149 |
|
40150 | if (rARIA.test(name)) {
|
40151 | var lowerCasedName = name.toLowerCase();
|
40152 | var standardName = DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;
|
40153 |
|
40154 |
|
40155 |
|
40156 | if (standardName == null) {
|
40157 | warnedProperties[name] = true;
|
40158 | return false;
|
40159 | }
|
40160 |
|
40161 | if (name !== standardName) {
|
40162 | process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown ARIA attribute %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
40163 | warnedProperties[name] = true;
|
40164 | return true;
|
40165 | }
|
40166 | }
|
40167 |
|
40168 | return true;
|
40169 | }
|
40170 |
|
40171 | function warnInvalidARIAProps(debugID, element) {
|
40172 | var invalidProps = [];
|
40173 |
|
40174 | for (var key in element.props) {
|
40175 | var isValid = validateProperty(element.type, key, debugID);
|
40176 | if (!isValid) {
|
40177 | invalidProps.push(key);
|
40178 | }
|
40179 | }
|
40180 |
|
40181 | var unknownPropString = invalidProps.map(function (prop) {
|
40182 | return '`' + prop + '`';
|
40183 | }).join(', ');
|
40184 |
|
40185 | if (invalidProps.length === 1) {
|
40186 | process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
40187 | } else if (invalidProps.length > 1) {
|
40188 | process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
40189 | }
|
40190 | }
|
40191 |
|
40192 | function handleElement(debugID, element) {
|
40193 | if (element == null || typeof element.type !== 'string') {
|
40194 | return;
|
40195 | }
|
40196 | if (element.type.indexOf('-') >= 0 || element.props.is) {
|
40197 | return;
|
40198 | }
|
40199 |
|
40200 | warnInvalidARIAProps(debugID, element);
|
40201 | }
|
40202 |
|
40203 | var ReactDOMInvalidARIAHook = {
|
40204 | onBeforeMountComponent: function (debugID, element) {
|
40205 | if (process.env.NODE_ENV !== 'production') {
|
40206 | handleElement(debugID, element);
|
40207 | }
|
40208 | },
|
40209 | onBeforeUpdateComponent: function (debugID, element) {
|
40210 | if (process.env.NODE_ENV !== 'production') {
|
40211 | handleElement(debugID, element);
|
40212 | }
|
40213 | }
|
40214 | };
|
40215 |
|
40216 | module.exports = ReactDOMInvalidARIAHook;
|
40217 | }.call(exports, __webpack_require__(0)))
|
40218 |
|
40219 | }),
|
40220 |
|
40221 | (function(module, exports, __webpack_require__) {
|
40222 |
|
40223 | "use strict";
|
40224 |
|
40225 |
|
40226 | Object.defineProperty(exports, "__esModule", {
|
40227 | value: true
|
40228 | });
|
40229 |
|
40230 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
40231 |
|
40232 | var _lodash = __webpack_require__(54);
|
40233 |
|
40234 | var _lodash2 = _interopRequireDefault(_lodash);
|
40235 |
|
40236 | var _react = __webpack_require__(14);
|
40237 |
|
40238 | var _react2 = _interopRequireDefault(_react);
|
40239 |
|
40240 | var _ScrollArea = __webpack_require__(194);
|
40241 |
|
40242 | var _ScrollArea2 = _interopRequireDefault(_ScrollArea);
|
40243 |
|
40244 | var _App = __webpack_require__(207);
|
40245 |
|
40246 | var _App2 = _interopRequireDefault(_App);
|
40247 |
|
40248 | var _example = __webpack_require__(209);
|
40249 |
|
40250 | var _example2 = _interopRequireDefault(_example);
|
40251 |
|
40252 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
40253 |
|
40254 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
40255 |
|
40256 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
40257 |
|
40258 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
40259 |
|
40260 | var App = function (_Component) {
|
40261 | _inherits(App, _Component);
|
40262 |
|
40263 | function App() {
|
40264 | _classCallCheck(this, App);
|
40265 |
|
40266 | return _possibleConstructorReturn(this, (App.__proto__ || Object.getPrototypeOf(App)).apply(this, arguments));
|
40267 | }
|
40268 |
|
40269 | _createClass(App, [{
|
40270 | key: 'goToTop',
|
40271 | value: function goToTop() {
|
40272 | this.refs.scroll.goToTop(parseInt(this.refs.duration.value, 10) || 0);
|
40273 | }
|
40274 | }, {
|
40275 | key: 'goToBottom',
|
40276 | value: function goToBottom() {
|
40277 | this.refs.scroll.goToBottom(parseInt(this.refs.duration.value, 10) || 0);
|
40278 | }
|
40279 | }, {
|
40280 | key: 'goToPos',
|
40281 | value: function goToPos() {
|
40282 | this.refs.scroll.goToPos(this.refs.pos.value, parseInt(this.refs.duration.value, 10) || 0);
|
40283 | }
|
40284 | }, {
|
40285 | key: 'render',
|
40286 | value: function render() {
|
40287 | return _react2.default.createElement(
|
40288 | 'div',
|
40289 | { className: 'container' },
|
40290 | _react2.default.createElement(
|
40291 | 'div',
|
40292 | { className: 'columns is-multiline' },
|
40293 | _react2.default.createElement(
|
40294 | 'div',
|
40295 | { className: 'column' },
|
40296 | _react2.default.createElement(
|
40297 | 'div',
|
40298 | { className: _App2.default.example },
|
40299 | _react2.default.createElement(
|
40300 | 'h2',
|
40301 | { className: 'title is-5' },
|
40302 | 'Without params'
|
40303 | ),
|
40304 | _react2.default.createElement(
|
40305 | 'div',
|
40306 | { className: _App2.default.preview },
|
40307 | _react2.default.createElement(
|
40308 | 'div',
|
40309 | { className: _App2.default.exampleContainer },
|
40310 | _react2.default.createElement(
|
40311 | _ScrollArea2.default,
|
40312 | null,
|
40313 | _react2.default.createElement(
|
40314 | 'div',
|
40315 | { style: { minHeight: "2798px" } },
|
40316 | _react2.default.createElement('img', { src: _example2.default, height: '2798' })
|
40317 | )
|
40318 | )
|
40319 | )
|
40320 | )
|
40321 | )
|
40322 | ),
|
40323 | _react2.default.createElement(
|
40324 | 'div',
|
40325 | { className: 'column' },
|
40326 | _react2.default.createElement(
|
40327 | 'div',
|
40328 | { className: _App2.default.example },
|
40329 | _react2.default.createElement(
|
40330 | 'h2',
|
40331 | { className: 'title is-5' },
|
40332 | 'Always visible'
|
40333 | ),
|
40334 | _react2.default.createElement(
|
40335 | 'div',
|
40336 | { className: _App2.default.preview },
|
40337 | _react2.default.createElement(
|
40338 | 'div',
|
40339 | { className: _App2.default.exampleContainer },
|
40340 | _react2.default.createElement(
|
40341 | _ScrollArea2.default,
|
40342 | { trackVisible: true },
|
40343 | _react2.default.createElement(
|
40344 | 'div',
|
40345 | { style: { minHeight: "2798px" } },
|
40346 | _react2.default.createElement('img', { src: _example2.default, height: '2798' })
|
40347 | )
|
40348 | )
|
40349 | )
|
40350 | )
|
40351 | )
|
40352 | ),
|
40353 | _react2.default.createElement(
|
40354 | 'div',
|
40355 | { className: 'column' },
|
40356 | _react2.default.createElement(
|
40357 | 'div',
|
40358 | { className: _App2.default.example },
|
40359 | _react2.default.createElement(
|
40360 | 'h2',
|
40361 | { className: 'title is-5' },
|
40362 | 'Always hidden'
|
40363 | ),
|
40364 | _react2.default.createElement(
|
40365 | 'div',
|
40366 | { className: _App2.default.preview },
|
40367 | _react2.default.createElement(
|
40368 | 'div',
|
40369 | { className: _App2.default.exampleContainer },
|
40370 | _react2.default.createElement(
|
40371 | _ScrollArea2.default,
|
40372 | { trackHidden: true },
|
40373 | _react2.default.createElement(
|
40374 | 'div',
|
40375 | { style: { minHeight: "2798px" } },
|
40376 | _react2.default.createElement('img', { src: _example2.default, height: '2798' })
|
40377 | )
|
40378 | )
|
40379 | )
|
40380 | )
|
40381 | )
|
40382 | ),
|
40383 | _react2.default.createElement(
|
40384 | 'div',
|
40385 | { className: 'column' },
|
40386 | _react2.default.createElement(
|
40387 | 'div',
|
40388 | { className: _App2.default.example },
|
40389 | _react2.default.createElement(
|
40390 | 'h2',
|
40391 | { className: 'title is-5' },
|
40392 | 'With min scroll handler height set to 300px'
|
40393 | ),
|
40394 | _react2.default.createElement(
|
40395 | 'div',
|
40396 | { className: _App2.default.preview },
|
40397 | _react2.default.createElement(
|
40398 | 'div',
|
40399 | { className: _App2.default.exampleContainer },
|
40400 | _react2.default.createElement(
|
40401 | _ScrollArea2.default,
|
40402 | { minHandlerHeight: 300 },
|
40403 | _react2.default.createElement(
|
40404 | 'div',
|
40405 | { style: { minHeight: "2798px" } },
|
40406 | _react2.default.createElement('img', { src: _example2.default, height: '2798' })
|
40407 | )
|
40408 | )
|
40409 | )
|
40410 | )
|
40411 | )
|
40412 | ),
|
40413 | _react2.default.createElement(
|
40414 | 'div',
|
40415 | { className: 'column' },
|
40416 | _react2.default.createElement(
|
40417 | 'div',
|
40418 | { className: _App2.default.example },
|
40419 | _react2.default.createElement(
|
40420 | 'h2',
|
40421 | { className: 'title is-5' },
|
40422 | 'With hide time set to zero'
|
40423 | ),
|
40424 | _react2.default.createElement(
|
40425 | 'div',
|
40426 | { className: _App2.default.preview },
|
40427 | _react2.default.createElement(
|
40428 | 'div',
|
40429 | { className: _App2.default.exampleContainer },
|
40430 | _react2.default.createElement(
|
40431 | _ScrollArea2.default,
|
40432 | { trackHideTime: 0 },
|
40433 | _react2.default.createElement(
|
40434 | 'div',
|
40435 | { style: { minHeight: "2798px" } },
|
40436 | _react2.default.createElement('img', { src: _example2.default, height: '2798' })
|
40437 | )
|
40438 | )
|
40439 | )
|
40440 | )
|
40441 | )
|
40442 | ),
|
40443 | _react2.default.createElement(
|
40444 | 'div',
|
40445 | { className: 'column' },
|
40446 | _react2.default.createElement(
|
40447 | 'div',
|
40448 | { className: _App2.default.example },
|
40449 | _react2.default.createElement(
|
40450 | 'h2',
|
40451 | { className: 'title is-5' },
|
40452 | 'With margin set to 100px'
|
40453 | ),
|
40454 | _react2.default.createElement(
|
40455 | 'div',
|
40456 | { className: _App2.default.preview },
|
40457 | _react2.default.createElement(
|
40458 | 'div',
|
40459 | { className: _App2.default.exampleContainer },
|
40460 | _react2.default.createElement(
|
40461 | _ScrollArea2.default,
|
40462 | { trackMargin: 100, trackVisible: true },
|
40463 | _react2.default.createElement(
|
40464 | 'div',
|
40465 | { style: { minHeight: "2798px" } },
|
40466 | _react2.default.createElement('img', { src: _example2.default, height: '2798' })
|
40467 | )
|
40468 | )
|
40469 | )
|
40470 | )
|
40471 | )
|
40472 | )
|
40473 | )
|
40474 | );
|
40475 | }
|
40476 | }]);
|
40477 |
|
40478 | return App;
|
40479 | }(_react.Component);
|
40480 |
|
40481 | exports.default = App;
|
40482 |
|
40483 | }),
|
40484 |
|
40485 | (function(module, exports) {
|
40486 |
|
40487 | var g;
|
40488 |
|
40489 |
|
40490 | g = (function() {
|
40491 | return this;
|
40492 | })();
|
40493 |
|
40494 | try {
|
40495 |
|
40496 | g = g || Function("return this")() || (1,eval)("this");
|
40497 | } catch(e) {
|
40498 |
|
40499 | if(typeof window === "object")
|
40500 | g = window;
|
40501 | }
|
40502 |
|
40503 |
|
40504 |
|
40505 |
|
40506 |
|
40507 | module.exports = g;
|
40508 |
|
40509 |
|
40510 | }),
|
40511 |
|
40512 | (function(module, exports) {
|
40513 |
|
40514 | module.exports = function(module) {
|
40515 | if(!module.webpackPolyfill) {
|
40516 | module.deprecate = function() {};
|
40517 | module.paths = [];
|
40518 |
|
40519 | if(!module.children) module.children = [];
|
40520 | Object.defineProperty(module, "loaded", {
|
40521 | enumerable: true,
|
40522 | get: function() {
|
40523 | return module.l;
|
40524 | }
|
40525 | });
|
40526 | Object.defineProperty(module, "id", {
|
40527 | enumerable: true,
|
40528 | get: function() {
|
40529 | return module.i;
|
40530 | }
|
40531 | });
|
40532 | module.webpackPolyfill = 1;
|
40533 | }
|
40534 | return module;
|
40535 | };
|
40536 |
|
40537 |
|
40538 | }),
|
40539 |
|
40540 | (function(module, exports, __webpack_require__) {
|
40541 |
|
40542 | "use strict";
|
40543 | (function(process) {
|
40544 |
|
40545 | Object.defineProperty(exports, "__esModule", {
|
40546 | value: true
|
40547 | });
|
40548 |
|
40549 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
40550 |
|
40551 | var _react = __webpack_require__(14);
|
40552 |
|
40553 | var _react2 = _interopRequireDefault(_react);
|
40554 |
|
40555 | var _propTypes = __webpack_require__(25);
|
40556 |
|
40557 | var _propTypes2 = _interopRequireDefault(_propTypes);
|
40558 |
|
40559 | var _lodash = __webpack_require__(54);
|
40560 |
|
40561 | var _lodash2 = _interopRequireDefault(_lodash);
|
40562 |
|
40563 | var _classname = __webpack_require__(55);
|
40564 |
|
40565 | var _classname2 = _interopRequireDefault(_classname);
|
40566 |
|
40567 | var _DOMHelper = __webpack_require__(56);
|
40568 |
|
40569 | var _DOMHelper2 = _interopRequireDefault(_DOMHelper);
|
40570 |
|
40571 | var _ScrollArea = __webpack_require__(196);
|
40572 |
|
40573 | var _ScrollArea2 = _interopRequireDefault(_ScrollArea);
|
40574 |
|
40575 | var _Track = __webpack_require__(199);
|
40576 |
|
40577 | var _Track2 = _interopRequireDefault(_Track);
|
40578 |
|
40579 | var _Overflow = __webpack_require__(205);
|
40580 |
|
40581 | var _Overflow2 = _interopRequireDefault(_Overflow);
|
40582 |
|
40583 | var _Inner = __webpack_require__(206);
|
40584 |
|
40585 | var _Inner2 = _interopRequireDefault(_Inner);
|
40586 |
|
40587 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
40588 |
|
40589 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
40590 |
|
40591 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
40592 |
|
40593 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
40594 |
|
40595 | var ScrollArea = function (_Component) {
|
40596 | _inherits(ScrollArea, _Component);
|
40597 |
|
40598 | function ScrollArea(props) {
|
40599 | _classCallCheck(this, ScrollArea);
|
40600 |
|
40601 | var _this = _possibleConstructorReturn(this, (ScrollArea.__proto__ || Object.getPrototypeOf(ScrollArea)).call(this, props));
|
40602 |
|
40603 | _this.state = {
|
40604 | trackActive: props.trackVisible,
|
40605 | innerMargin: -1,
|
40606 | innerHeight: 0,
|
40607 | outerHeight: 0,
|
40608 | isDragging: false
|
40609 | };
|
40610 |
|
40611 | _this.references = {};
|
40612 | return _this;
|
40613 | }
|
40614 |
|
40615 | _createClass(ScrollArea, [{
|
40616 | key: 'componentDidMount',
|
40617 | value: function componentDidMount() {
|
40618 | this.validateProps();
|
40619 | this.onResize();
|
40620 | }
|
40621 | }, {
|
40622 | key: 'componentDidUpdate',
|
40623 | value: function componentDidUpdate() {
|
40624 | if (this.getInnerHeight() !== this.state.innerHeight) {
|
40625 | this.onResize();
|
40626 | }
|
40627 | }
|
40628 | }, {
|
40629 | key: 'componentWillUnmount',
|
40630 | value: function componentWillUnmount() {
|
40631 | clearTimeout(this.scrollTrackVisibleTimeout);
|
40632 | }
|
40633 | }, {
|
40634 | key: 'validateProps',
|
40635 | value: function validateProps() {
|
40636 | if (this.props.width && !/^([0-9]+)(%|px)?$/.test(this.props.width)) {
|
40637 | throw new TypeError('Invalid width, must be a numeric or percentage.');
|
40638 | }
|
40639 |
|
40640 | if (this.props.height && !/^([0-9]+)(%|px)?$/.test(this.props.height)) {
|
40641 | throw new TypeError('Invalid height, must be a numeric or percentage.');
|
40642 | }
|
40643 | }
|
40644 | }, {
|
40645 | key: 'getOuterWidth',
|
40646 | value: function getOuterWidth() {
|
40647 | var width = this.props.width,
|
40648 | isPercentage = /%/.test(width);
|
40649 |
|
40650 | if (isPercentage) {
|
40651 | var percentage = parseInt(width, 10) / 100;
|
40652 |
|
40653 | return process.env.NODE_ENV === 'testing' ? this.props.testParentWidth * percentage : _DOMHelper2.default.getWidth(this.references.outer) * percentage;
|
40654 | }
|
40655 |
|
40656 | return parseInt(this.props.width || _DOMHelper2.default.getWidth(this.references.outer) || 0, 10);
|
40657 | }
|
40658 | }, {
|
40659 | key: 'getOuterHeight',
|
40660 | value: function getOuterHeight() {
|
40661 | var height = this.props.height,
|
40662 | isPercentage = /%/.test(height);
|
40663 |
|
40664 | if (isPercentage) {
|
40665 | var percentage = parseInt(height, 10) / 100;
|
40666 |
|
40667 | return process.env.NODE_ENV === 'testing' ? this.props.testParentHeight * percentage : _DOMHelper2.default.getHeight(this.references.outer) * percentage;
|
40668 | }
|
40669 |
|
40670 | return parseInt(this.props.height || _DOMHelper2.default.getHeight(this.references.outer) || 0, 10);
|
40671 | }
|
40672 | }, {
|
40673 | key: 'getInnerHeight',
|
40674 | value: function getInnerHeight() {
|
40675 | return process.env.NODE_ENV === 'testing' ? this.props.testInnerHeight : _DOMHelper2.default.getHeight(this.references.inner.node);
|
40676 | }
|
40677 | }, {
|
40678 | key: 'getInnerMargin',
|
40679 | value: function getInnerMargin() {
|
40680 | var outer = this.references.outer,
|
40681 | inner = this.references.inner.node;
|
40682 |
|
40683 | if (!inner.offsetWidth || !outer.offsetWidth) {
|
40684 | return -1;
|
40685 | }
|
40686 |
|
40687 | return inner.offsetWidth - outer.offsetWidth - 1;
|
40688 | }
|
40689 | }, {
|
40690 | key: 'getScrollTop',
|
40691 | value: function getScrollTop() {
|
40692 | var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.references.overflow;
|
40693 |
|
40694 | return target && target.node.scrollTop || 0;
|
40695 | }
|
40696 | }, {
|
40697 | key: 'isTrackNeedEvents',
|
40698 | value: function isTrackNeedEvents() {
|
40699 | return !this.props.trackHidden && !this.props.trackVisible && this.getInnerHeight() > this.state.outerHeight;
|
40700 | }
|
40701 | }, {
|
40702 | key: 'onResize',
|
40703 | value: function onResize() {
|
40704 | var state = {
|
40705 | innerHeight: this.getInnerHeight(),
|
40706 | outerHeight: this.getOuterHeight()
|
40707 | };
|
40708 |
|
40709 | if (this.state.innerMargin === -1) {
|
40710 | state.innerMargin = this.getInnerMargin();
|
40711 | }
|
40712 |
|
40713 | this.setState(state);
|
40714 | }
|
40715 | }, {
|
40716 | key: 'onWheel',
|
40717 | value: function onWheel(event) {
|
40718 | var scrollTop = this.getScrollTop(),
|
40719 | innerHeight = this.getInnerHeight(),
|
40720 | outerHeight = this.getOuterHeight();
|
40721 |
|
40722 | if (!_DOMHelper2.default.isChildOf(event.target, this.references.outer, true)) {
|
40723 | return;
|
40724 | }
|
40725 |
|
40726 | if (event.deltaY > 0 && scrollTop >= innerHeight - outerHeight || event.deltaY < 0 && scrollTop === 0) {
|
40727 | event.stopPropagation();
|
40728 | event.preventDefault();
|
40729 | }
|
40730 | }
|
40731 | }, {
|
40732 | key: 'onScroll',
|
40733 | value: function onScroll() {
|
40734 | if (!this.isTrackNeedEvents()) {
|
40735 | this.forceUpdate();
|
40736 | return;
|
40737 | }
|
40738 |
|
40739 | if (this.props.onScroll) {
|
40740 | var data = {
|
40741 | scrollTop: this.getScrollTop(),
|
40742 | innerHeight: this.getInnerHeight(),
|
40743 | outerHeight: this.getOuterHeight()
|
40744 | };
|
40745 | data.complete = (data.scrollTop + data.outerHeight) / data.innerHeight;
|
40746 |
|
40747 | this.props.onScroll(data, this);
|
40748 | }
|
40749 |
|
40750 | this.forceUpdate();
|
40751 | }
|
40752 | }, {
|
40753 | key: 'onMouseEnter',
|
40754 | value: function onMouseEnter() {
|
40755 | if (!this.isTrackNeedEvents()) {
|
40756 | return;
|
40757 | }
|
40758 |
|
40759 | clearTimeout(this.scrollTrackVisibleTimeout);
|
40760 | this.setState({ trackActive: true });
|
40761 | }
|
40762 | }, {
|
40763 | key: 'onMouseLeave',
|
40764 | value: function onMouseLeave() {
|
40765 | if (!this.isTrackNeedEvents() || this.state.isDragging) {
|
40766 | return;
|
40767 | }
|
40768 |
|
40769 | this.hideTrack();
|
40770 | }
|
40771 | }, {
|
40772 | key: 'onMouseDown',
|
40773 | value: function onMouseDown(event) {
|
40774 | var offset = this.references.track.getOffset();
|
40775 |
|
40776 | if (event.pageX < offset.left || !this.state.trackHover) {
|
40777 | return;
|
40778 | }
|
40779 |
|
40780 | this.setState({
|
40781 | isDragging: true,
|
40782 | trackActive: !this.props.trackHidden,
|
40783 | startY: event.pageY,
|
40784 | originalY: this.references.track.getHeight() * (this.getScrollTop() / this.state.innerHeight)
|
40785 | });
|
40786 |
|
40787 | this.onMouseMoveFn = this.onMouseMove.bind(this);
|
40788 | this.onMouseUpFn = this.onMouseUp.bind(this);
|
40789 | window.addEventListener('mousemove', this.onMouseMoveFn, false);
|
40790 | window.addEventListener('mouseup', this.onMouseUpFn, false);
|
40791 | }
|
40792 | }, {
|
40793 | key: 'onMouseUp',
|
40794 | value: function onMouseUp(event) {
|
40795 | this.setState({
|
40796 | isDragging: false,
|
40797 | trackHover: false
|
40798 | });
|
40799 |
|
40800 | _DOMHelper2.default.ignoreSelection();
|
40801 |
|
40802 | if (!_DOMHelper2.default.isChildOf(event.target, this.references.outer) && this.isTrackNeedEvents()) {
|
40803 | this.hideTrack();
|
40804 | }
|
40805 |
|
40806 | window.removeEventListener('mouseup', this.onMouseUpFn);
|
40807 | window.removeEventListener('mousemove', this.onMouseMoveFn);
|
40808 | }
|
40809 | }, {
|
40810 | key: 'onMouseMove',
|
40811 | value: function onMouseMove(event) {
|
40812 | if (!this.state.isDragging) {
|
40813 | return;
|
40814 | }
|
40815 |
|
40816 | var deltaY = event.pageY - this.state.startY,
|
40817 | offsetY = this.state.originalY + deltaY;
|
40818 |
|
40819 | _DOMHelper2.default.ignoreSelection();
|
40820 |
|
40821 | this.references.overflow.node.scrollTop = Math.max(Math.min(Math.floor(offsetY * (this.state.innerHeight / (this.state.outerHeight - this.props.trackMargin))), this.state.innerHeight - this.state.outerHeight), 0);
|
40822 | }
|
40823 | }, {
|
40824 | key: 'onMouseMoveHover',
|
40825 | value: function onMouseMoveHover(event) {
|
40826 | if (this.state.isDragging || !this.state.trackActive) {
|
40827 | return;
|
40828 | }
|
40829 |
|
40830 | var offset = this.references.track.getOffset(),
|
40831 | trackHover = event.pageX > offset.left;
|
40832 |
|
40833 | this.setState({ trackHover: trackHover });
|
40834 | }
|
40835 | }, {
|
40836 | key: 'hideTrack',
|
40837 | value: function hideTrack() {
|
40838 | var _this2 = this;
|
40839 |
|
40840 | if (!this.props.trackHideTime) {
|
40841 | this.setState({ trackActive: false });
|
40842 | return;
|
40843 | }
|
40844 |
|
40845 | this.scrollTrackVisibleTimeout = _lodash2.default.delay(function () {
|
40846 | _this2.setState({ trackActive: false });
|
40847 | }, this.props.trackHideTime);
|
40848 | }
|
40849 | }, {
|
40850 | key: 'triggerScroll',
|
40851 | value: function triggerScroll() {
|
40852 | this.onScroll();
|
40853 | return this;
|
40854 | }
|
40855 | }, {
|
40856 | key: 'goToPos',
|
40857 | value: function goToPos(scrollTop) {
|
40858 | var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
40859 |
|
40860 | var overflow = this.references.overflow.node;
|
40861 |
|
40862 | duration ? _DOMHelper2.default.scrollTo(overflow, scrollTop, duration) : overflow.scrollTop = scrollTop;
|
40863 |
|
40864 | return this;
|
40865 | }
|
40866 | }, {
|
40867 | key: 'goToTop',
|
40868 | value: function goToTop() {
|
40869 | var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
40870 |
|
40871 | return this.goToPos(0, duration);
|
40872 | }
|
40873 | }, {
|
40874 | key: 'goToBottom',
|
40875 | value: function goToBottom() {
|
40876 | var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
40877 |
|
40878 | return this.goToPos(this.state.innerHeight - this.state.outerHeight, duration);
|
40879 | }
|
40880 | }, {
|
40881 | key: 'render',
|
40882 | value: function render() {
|
40883 | var _this3 = this;
|
40884 |
|
40885 | return _react2.default.createElement(
|
40886 | 'div',
|
40887 | {
|
40888 | ref: function ref(r) {
|
40889 | return _this3.references.outer = r;
|
40890 | },
|
40891 | style: {
|
40892 | width: this.props.width,
|
40893 | height: this.props.height
|
40894 | },
|
40895 | className: (0, _classname2.default)(_ScrollArea2.default.outer, this.props.className),
|
40896 | onMouseEnter: this.onMouseEnter.bind(this),
|
40897 | onMouseLeave: this.onMouseLeave.bind(this),
|
40898 | onMouseDown: this.onMouseDown.bind(this),
|
40899 | onMouseMove: this.onMouseMoveHover.bind(this)
|
40900 | },
|
40901 | _react2.default.createElement(
|
40902 | _Overflow2.default,
|
40903 | {
|
40904 | ref: function ref(r) {
|
40905 | return _this3.references.overflow = r;
|
40906 | },
|
40907 | className: (0, _classname2.default)(_ScrollArea2.default.overflow, this.props.overflowClassName),
|
40908 | onScroll: this.onScroll.bind(this),
|
40909 | onWheel: this.onWheel.bind(this)
|
40910 | },
|
40911 | _react2.default.createElement(
|
40912 | _Inner2.default,
|
40913 | {
|
40914 | ref: function ref(r) {
|
40915 | return _this3.references.inner = r;
|
40916 | },
|
40917 | className: (0, _classname2.default)(_ScrollArea2.default.inner, this.props.innerClassName),
|
40918 | innerMargin: this.state.innerMargin
|
40919 | },
|
40920 | this.props.children
|
40921 | )
|
40922 | ),
|
40923 | _react2.default.createElement(_Track2.default, {
|
40924 | ref: function ref(r) {
|
40925 | return _this3.references.track = r;
|
40926 | },
|
40927 |
|
40928 | className: this.props.trackClassName,
|
40929 | handlerClassName: this.props.handlerClassName,
|
40930 |
|
40931 | isActive: this.state.trackActive,
|
40932 | isDragging: this.state.isDragging,
|
40933 | isHover: this.state.trackHover,
|
40934 | margin: this.props.trackMargin,
|
40935 | minHandlerHeight: this.props.minHandlerHeight,
|
40936 | scrollTop: this.getScrollTop(),
|
40937 | outerWidth: this.getOuterWidth(),
|
40938 | outerHeight: this.state.outerHeight,
|
40939 | innerHeight: this.state.innerHeight
|
40940 | })
|
40941 | );
|
40942 | }
|
40943 | }]);
|
40944 |
|
40945 | return ScrollArea;
|
40946 | }(_react.Component);
|
40947 |
|
40948 | ScrollArea.propTypes = {
|
40949 | width: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]),
|
40950 | height: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]),
|
40951 |
|
40952 | trackVisible: _propTypes2.default.bool,
|
40953 | trackHidden: _propTypes2.default.bool,
|
40954 | trackHideTime: _propTypes2.default.number,
|
40955 | minHandlerHeight: _propTypes2.default.number,
|
40956 | trackMargin: _propTypes2.default.number,
|
40957 | onScroll: _propTypes2.default.func,
|
40958 | children: _propTypes2.default.node,
|
40959 |
|
40960 | className: _propTypes2.default.string,
|
40961 | innerClassName: _propTypes2.default.string,
|
40962 | overflowClassName: _propTypes2.default.string,
|
40963 | trackClassName: _propTypes2.default.string,
|
40964 | handlerClassName: _propTypes2.default.string,
|
40965 |
|
40966 |
|
40967 | testInnerHeight: _propTypes2.default.number,
|
40968 | testParentWidth: _propTypes2.default.number,
|
40969 | testParentHeight: _propTypes2.default.number
|
40970 | };
|
40971 | ScrollArea.defaultProps = {
|
40972 | trackVisible: false,
|
40973 | trackHidden: false,
|
40974 | trackHideTime: 1000,
|
40975 | minHandlerHeight: 70,
|
40976 | trackMargin: 4,
|
40977 |
|
40978 | className: '',
|
40979 | innerClassName: '',
|
40980 | overflowClassName: '',
|
40981 | trackClassName: '',
|
40982 | handlerClassName: '',
|
40983 |
|
40984 |
|
40985 | testInnerHeight: 0,
|
40986 | testParentWidth: 0,
|
40987 | testParentHeight: 0
|
40988 | };
|
40989 | exports.default = ScrollArea;
|
40990 | }.call(exports, __webpack_require__(0)))
|
40991 |
|
40992 | }),
|
40993 |
|
40994 | (function(module, exports, __webpack_require__) {
|
40995 |
|
40996 | "use strict";
|
40997 |
|
40998 |
|
40999 |
|
41000 |
|
41001 |
|
41002 |
|
41003 |
|
41004 |
|
41005 |
|
41006 |
|
41007 |
|
41008 | var emptyFunction = __webpack_require__(8);
|
41009 | var invariant = __webpack_require__(1);
|
41010 | var ReactPropTypesSecret = __webpack_require__(37);
|
41011 |
|
41012 | module.exports = function() {
|
41013 | function shim(props, propName, componentName, location, propFullName, secret) {
|
41014 | if (secret === ReactPropTypesSecret) {
|
41015 |
|
41016 | return;
|
41017 | }
|
41018 | invariant(
|
41019 | false,
|
41020 | 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
41021 | 'Use PropTypes.checkPropTypes() to call them. ' +
|
41022 | 'Read more at http://fb.me/use-check-prop-types'
|
41023 | );
|
41024 | };
|
41025 | shim.isRequired = shim;
|
41026 | function getShim() {
|
41027 | return shim;
|
41028 | };
|
41029 |
|
41030 |
|
41031 | var ReactPropTypes = {
|
41032 | array: shim,
|
41033 | bool: shim,
|
41034 | func: shim,
|
41035 | number: shim,
|
41036 | object: shim,
|
41037 | string: shim,
|
41038 | symbol: shim,
|
41039 |
|
41040 | any: shim,
|
41041 | arrayOf: getShim,
|
41042 | element: shim,
|
41043 | instanceOf: getShim,
|
41044 | node: shim,
|
41045 | objectOf: getShim,
|
41046 | oneOf: getShim,
|
41047 | oneOfType: getShim,
|
41048 | shape: getShim
|
41049 | };
|
41050 |
|
41051 | ReactPropTypes.checkPropTypes = emptyFunction;
|
41052 | ReactPropTypes.PropTypes = ReactPropTypes;
|
41053 |
|
41054 | return ReactPropTypes;
|
41055 | };
|
41056 |
|
41057 |
|
41058 | }),
|
41059 |
|
41060 | (function(module, exports, __webpack_require__) {
|
41061 |
|
41062 |
|
41063 |
|
41064 |
|
41065 | var content = __webpack_require__(197);
|
41066 | if(typeof content === 'string') content = [[module.i, content, '']];
|
41067 |
|
41068 | var transform;
|
41069 |
|
41070 | var options = {}
|
41071 | options.transform = transform
|
41072 |
|
41073 | var update = __webpack_require__(35)(content, options);
|
41074 | if(content.locals) module.exports = content.locals;
|
41075 |
|
41076 | if(false) {
|
41077 |
|
41078 | if(!content.locals) {
|
41079 | module.hot.accept("!!../../node_modules/css-loader/index.js?importLoaders=1&modules!./ScrollArea.css", function() {
|
41080 | var newContent = require("!!../../node_modules/css-loader/index.js?importLoaders=1&modules!./ScrollArea.css");
|
41081 | if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
|
41082 | update(newContent);
|
41083 | });
|
41084 | }
|
41085 |
|
41086 | module.hot.dispose(function() { update(); });
|
41087 | }
|
41088 |
|
41089 | }),
|
41090 |
|
41091 | (function(module, exports, __webpack_require__) {
|
41092 |
|
41093 | exports = module.exports = __webpack_require__(34)(undefined);
|
41094 |
|
41095 |
|
41096 |
|
41097 |
|
41098 | exports.push([module.i, "._37v-ohCwyBfAV_UWLutqvt {\n overflow: hidden;\n position: relative;\n\n width: 100%;\n height: 100%;\n}\n\n._3EGckgmDcNF_cmTkdQxSfY {\n position: relative;\n overflow-y: scroll;\n overflow-x: hidden;\n\n height: 100%;\n\n margin-right: -30px;\n padding-right: 30px;\n}\n\n._34zZxEHnIKZuv9SFSUwueU {\n position: relative;\n}\n\n._34zZxEHnIKZuv9SFSUwueU:before,\n._34zZxEHnIKZuv9SFSUwueU:after {\n content: \" \";\n display: table;\n}\n\n ._34zZxEHnIKZuv9SFSUwueU:after {\n clear: both;\n}\n", ""]);
|
41099 |
|
41100 |
|
41101 | exports.locals = {
|
41102 | "outer": "_37v-ohCwyBfAV_UWLutqvt",
|
41103 | "overflow": "_3EGckgmDcNF_cmTkdQxSfY",
|
41104 | "inner": "_34zZxEHnIKZuv9SFSUwueU"
|
41105 | };
|
41106 |
|
41107 | }),
|
41108 |
|
41109 | (function(module, exports) {
|
41110 |
|
41111 |
|
41112 |
|
41113 |
|
41114 |
|
41115 |
|
41116 |
|
41117 |
|
41118 |
|
41119 |
|
41120 |
|
41121 |
|
41122 |
|
41123 |
|
41124 |
|
41125 | module.exports = function (css) {
|
41126 |
|
41127 | var location = typeof window !== "undefined" && window.location;
|
41128 |
|
41129 | if (!location) {
|
41130 | throw new Error("fixUrls requires window.location");
|
41131 | }
|
41132 |
|
41133 |
|
41134 | if (!css || typeof css !== "string") {
|
41135 | return css;
|
41136 | }
|
41137 |
|
41138 | var baseUrl = location.protocol + "//" + location.host;
|
41139 | var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
|
41140 |
|
41141 |
|
41142 | |
41143 |
|
41144 |
|
41145 |
|
41146 |
|
41147 |
|
41148 |
|
41149 |
|
41150 |
|
41151 |
|
41152 |
|
41153 |
|
41154 |
|
41155 |
|
41156 |
|
41157 |
|
41158 |
|
41159 |
|
41160 |
|
41161 |
|
41162 |
|
41163 |
|
41164 |
|
41165 |
|
41166 |
|
41167 | var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
|
41168 |
|
41169 | var unquotedOrigUrl = origUrl
|
41170 | .trim()
|
41171 | .replace(/^"(.*)"$/, function(o, $1){ return $1; })
|
41172 | .replace(/^'(.*)'$/, function(o, $1){ return $1; });
|
41173 |
|
41174 |
|
41175 | if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(unquotedOrigUrl)) {
|
41176 | return fullMatch;
|
41177 | }
|
41178 |
|
41179 |
|
41180 | var newUrl;
|
41181 |
|
41182 | if (unquotedOrigUrl.indexOf("//") === 0) {
|
41183 |
|
41184 | newUrl = unquotedOrigUrl;
|
41185 | } else if (unquotedOrigUrl.indexOf("/") === 0) {
|
41186 |
|
41187 | newUrl = baseUrl + unquotedOrigUrl;
|
41188 | } else {
|
41189 |
|
41190 | newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, "");
|
41191 | }
|
41192 |
|
41193 |
|
41194 | return "url(" + JSON.stringify(newUrl) + ")";
|
41195 | });
|
41196 |
|
41197 |
|
41198 | return fixedCss;
|
41199 | };
|
41200 |
|
41201 |
|
41202 | }),
|
41203 |
|
41204 | (function(module, exports, __webpack_require__) {
|
41205 |
|
41206 | "use strict";
|
41207 | (function(process) {
|
41208 |
|
41209 | Object.defineProperty(exports, "__esModule", {
|
41210 | value: true
|
41211 | });
|
41212 | exports.style = undefined;
|
41213 |
|
41214 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
41215 |
|
41216 | var _react = __webpack_require__(14);
|
41217 |
|
41218 | var _react2 = _interopRequireDefault(_react);
|
41219 |
|
41220 | var _propTypes = __webpack_require__(25);
|
41221 |
|
41222 | var _propTypes2 = _interopRequireDefault(_propTypes);
|
41223 |
|
41224 | var _classname = __webpack_require__(55);
|
41225 |
|
41226 | var _classname2 = _interopRequireDefault(_classname);
|
41227 |
|
41228 | var _Handler = __webpack_require__(200);
|
41229 |
|
41230 | var _Handler2 = _interopRequireDefault(_Handler);
|
41231 |
|
41232 | var _Track = __webpack_require__(203);
|
41233 |
|
41234 | var _Track2 = _interopRequireDefault(_Track);
|
41235 |
|
41236 | var _DOMHelper = __webpack_require__(56);
|
41237 |
|
41238 | var _DOMHelper2 = _interopRequireDefault(_DOMHelper);
|
41239 |
|
41240 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
41241 |
|
41242 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
41243 |
|
41244 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
41245 |
|
41246 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
41247 |
|
41248 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
41249 |
|
41250 | exports.style = _Track2.default;
|
41251 |
|
41252 | var Track = function (_Component) {
|
41253 | _inherits(Track, _Component);
|
41254 |
|
41255 | function Track(props) {
|
41256 | _classCallCheck(this, Track);
|
41257 |
|
41258 | var _this = _possibleConstructorReturn(this, (Track.__proto__ || Object.getPrototypeOf(Track)).call(this, props));
|
41259 |
|
41260 | _this.state = {};
|
41261 | _this.references = {};
|
41262 | return _this;
|
41263 | }
|
41264 |
|
41265 | _createClass(Track, [{
|
41266 | key: 'getHeight',
|
41267 | value: function getHeight() {
|
41268 | return this.props.outerHeight - this.props.margin;
|
41269 | }
|
41270 | }, {
|
41271 | key: 'getOffset',
|
41272 | value: function getOffset() {
|
41273 | var offset = _DOMHelper2.default.offset(this.references.track);
|
41274 |
|
41275 | if (process.env.NODE_ENV === 'testing') {
|
41276 | offset = { top: 0, left: this.props.outerWidth - 5 };
|
41277 | }
|
41278 |
|
41279 | return offset;
|
41280 | }
|
41281 | }, {
|
41282 | key: 'render',
|
41283 | value: function render() {
|
41284 | var _this2 = this,
|
41285 | _className;
|
41286 |
|
41287 | return _react2.default.createElement(
|
41288 | 'div',
|
41289 | {
|
41290 | ref: function ref(r) {
|
41291 | return _this2.references.track = r;
|
41292 | },
|
41293 | className: (0, _classname2.default)((_className = {}, _defineProperty(_className, _Track2.default.track, true), _defineProperty(_className, this.props.className, true), _defineProperty(_className, _Track2.default.hidden, !this.props.isActive), _className)),
|
41294 | style: {
|
41295 | top: this.props.margin / 2,
|
41296 | height: this.getHeight()
|
41297 | }
|
41298 | },
|
41299 | _react2.default.createElement(_Handler2.default, {
|
41300 | ref: function ref(r) {
|
41301 | return _this2.references.handler = r;
|
41302 | },
|
41303 | className: this.props.handlerClassName,
|
41304 | scrollTop: this.props.scrollTop,
|
41305 | outerWidth: this.props.outerWidth,
|
41306 | outerHeight: this.getHeight(),
|
41307 | innerHeight: this.props.innerHeight,
|
41308 | minHeight: this.props.minHandlerHeight,
|
41309 | isDragging: this.props.isDragging,
|
41310 | isHover: this.props.isHover
|
41311 | })
|
41312 | );
|
41313 | }
|
41314 | }]);
|
41315 |
|
41316 | return Track;
|
41317 | }(_react.Component);
|
41318 |
|
41319 | Track.propTypes = {
|
41320 | className: _propTypes2.default.string,
|
41321 | handlerClassName: _propTypes2.default.string,
|
41322 | margin: _propTypes2.default.number,
|
41323 | isActive: _propTypes2.default.bool,
|
41324 | isDragging: _propTypes2.default.bool,
|
41325 | isHover: _propTypes2.default.bool,
|
41326 | minHandlerHeight: _propTypes2.default.number,
|
41327 | scrollTop: _propTypes2.default.number,
|
41328 | outerWidth: _propTypes2.default.number,
|
41329 | outerHeight: _propTypes2.default.number,
|
41330 | innerHeight: _propTypes2.default.number
|
41331 | };
|
41332 | Track.defaultProps = {
|
41333 | className: ''
|
41334 | };
|
41335 | exports.default = Track;
|
41336 | }.call(exports, __webpack_require__(0)))
|
41337 |
|
41338 | }),
|
41339 |
|
41340 | (function(module, exports, __webpack_require__) {
|
41341 |
|
41342 | "use strict";
|
41343 | (function(process) {
|
41344 |
|
41345 | Object.defineProperty(exports, "__esModule", {
|
41346 | value: true
|
41347 | });
|
41348 | exports.style = undefined;
|
41349 |
|
41350 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
41351 |
|
41352 | var _react = __webpack_require__(14);
|
41353 |
|
41354 | var _react2 = _interopRequireDefault(_react);
|
41355 |
|
41356 | var _propTypes = __webpack_require__(25);
|
41357 |
|
41358 | var _propTypes2 = _interopRequireDefault(_propTypes);
|
41359 |
|
41360 | var _classname = __webpack_require__(55);
|
41361 |
|
41362 | var _classname2 = _interopRequireDefault(_classname);
|
41363 |
|
41364 | var _Handler = __webpack_require__(201);
|
41365 |
|
41366 | var _Handler2 = _interopRequireDefault(_Handler);
|
41367 |
|
41368 | var _DOMHelper = __webpack_require__(56);
|
41369 |
|
41370 | var _DOMHelper2 = _interopRequireDefault(_DOMHelper);
|
41371 |
|
41372 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
41373 |
|
41374 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
41375 |
|
41376 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
41377 |
|
41378 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
41379 |
|
41380 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
41381 |
|
41382 | exports.style = _Handler2.default;
|
41383 |
|
41384 | var Handler = function (_Component) {
|
41385 | _inherits(Handler, _Component);
|
41386 |
|
41387 | function Handler(props) {
|
41388 | _classCallCheck(this, Handler);
|
41389 |
|
41390 | var _this = _possibleConstructorReturn(this, (Handler.__proto__ || Object.getPrototypeOf(Handler)).call(this, props));
|
41391 |
|
41392 | _this.references = {};
|
41393 | return _this;
|
41394 | }
|
41395 |
|
41396 | _createClass(Handler, [{
|
41397 | key: 'getRatio',
|
41398 | value: function getRatio() {
|
41399 | var innerHeight = this.props.innerHeight,
|
41400 | outerHeight = this.props.outerHeight;
|
41401 |
|
41402 | if (!innerHeight || !outerHeight) {
|
41403 | return 0;
|
41404 | }
|
41405 |
|
41406 | return innerHeight / outerHeight;
|
41407 | }
|
41408 | }, {
|
41409 | key: 'getHeight',
|
41410 | value: function getHeight() {
|
41411 | if (!this.props.outerHeight) {
|
41412 | return 0;
|
41413 | }
|
41414 |
|
41415 | return Math.min(Math.max(this.getMinHeight(), Math.round(this.props.outerHeight / this.getRatio())), this.props.outerHeight);
|
41416 | }
|
41417 | }, {
|
41418 | key: 'getMinHeight',
|
41419 | value: function getMinHeight() {
|
41420 | return Math.min(this.props.outerHeight, this.props.minHeight);
|
41421 | }
|
41422 | }, {
|
41423 | key: 'getTop',
|
41424 | value: function getTop() {
|
41425 | var scrollTop = this.props.scrollTop,
|
41426 | innerHeight = this.props.innerHeight,
|
41427 | trackHeight = this.props.outerHeight,
|
41428 | handlerHeight = this.getHeight();
|
41429 |
|
41430 | if (handlerHeight === this.getMinHeight()) {
|
41431 | if (!trackHeight) {
|
41432 | return 0;
|
41433 | }
|
41434 |
|
41435 | return (trackHeight - handlerHeight) * (scrollTop / (innerHeight - trackHeight));
|
41436 | }
|
41437 |
|
41438 | if (!scrollTop) {
|
41439 | return 0;
|
41440 | }
|
41441 |
|
41442 | return Math.round(scrollTop / this.getRatio());
|
41443 | }
|
41444 | }, {
|
41445 | key: 'getOffset',
|
41446 | value: function getOffset() {
|
41447 | var offset = _DOMHelper2.default.offset(this.references.handler);
|
41448 |
|
41449 | if (process.env.NODE_ENV === 'testing') {
|
41450 | offset = { top: 0, left: this.props.outerWidth - 5 };
|
41451 | }
|
41452 |
|
41453 | return offset;
|
41454 | }
|
41455 | }, {
|
41456 | key: 'render',
|
41457 | value: function render() {
|
41458 | var _this2 = this,
|
41459 | _className;
|
41460 |
|
41461 | return _react2.default.createElement('div', {
|
41462 | ref: function ref(r) {
|
41463 | return _this2.references.handler = r;
|
41464 | },
|
41465 | className: (0, _classname2.default)((_className = {}, _defineProperty(_className, _Handler2.default.handler, true), _defineProperty(_className, _Handler2.default.dragging, this.props.isDragging), _defineProperty(_className, _Handler2.default.hover, this.props.isHover), _defineProperty(_className, this.props.className, true), _className)),
|
41466 | style: {
|
41467 | height: this.getHeight(),
|
41468 | top: this.getTop()
|
41469 | }
|
41470 | });
|
41471 | }
|
41472 | }]);
|
41473 |
|
41474 | return Handler;
|
41475 | }(_react.Component);
|
41476 |
|
41477 | Handler.propTypes = {
|
41478 | className: _propTypes2.default.string,
|
41479 | isDragging: _propTypes2.default.bool,
|
41480 | isHover: _propTypes2.default.bool,
|
41481 | minHeight: _propTypes2.default.number,
|
41482 |
|
41483 | scrollTop: _propTypes2.default.number,
|
41484 | outerWidth: _propTypes2.default.number,
|
41485 | outerHeight: _propTypes2.default.number,
|
41486 | innerHeight: _propTypes2.default.number
|
41487 | };
|
41488 | Handler.defaultProps = {
|
41489 | className: ''
|
41490 | };
|
41491 | exports.default = Handler;
|
41492 | }.call(exports, __webpack_require__(0)))
|
41493 |
|
41494 | }),
|
41495 |
|
41496 | (function(module, exports, __webpack_require__) {
|
41497 |
|
41498 |
|
41499 |
|
41500 |
|
41501 | var content = __webpack_require__(202);
|
41502 | if(typeof content === 'string') content = [[module.i, content, '']];
|
41503 |
|
41504 | var transform;
|
41505 |
|
41506 | var options = {}
|
41507 | options.transform = transform
|
41508 |
|
41509 | var update = __webpack_require__(35)(content, options);
|
41510 | if(content.locals) module.exports = content.locals;
|
41511 |
|
41512 | if(false) {
|
41513 |
|
41514 | if(!content.locals) {
|
41515 | module.hot.accept("!!../../node_modules/css-loader/index.js?importLoaders=1&modules!./Handler.css", function() {
|
41516 | var newContent = require("!!../../node_modules/css-loader/index.js?importLoaders=1&modules!./Handler.css");
|
41517 | if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
|
41518 | update(newContent);
|
41519 | });
|
41520 | }
|
41521 |
|
41522 | module.hot.dispose(function() { update(); });
|
41523 | }
|
41524 |
|
41525 | }),
|
41526 |
|
41527 | (function(module, exports, __webpack_require__) {
|
41528 |
|
41529 | exports = module.exports = __webpack_require__(34)(undefined);
|
41530 |
|
41531 |
|
41532 |
|
41533 |
|
41534 | exports.push([module.i, "._1Y841HBakNfExDIHJer1y3 {\n position: absolute;\n top: 0px; left: -1px;\n width: 7px; height: 50px;\n\n background: #d7d7d7;\n border-radius: 4px;\n\n transition: background .2s linear;\n -webkit-transition: background .4s linear;\n -moz-transition: background .2s linear;\n -ms-transition: background .2s linear;\n -o-transition: background .2s linear;\n}\n\n._2edsf-nJOzMp_uPPUyjaas, ._3Cd157NtzF25HdI40gEa8C {\n background: #909090;\n}\n", ""]);
|
41535 |
|
41536 |
|
41537 | exports.locals = {
|
41538 | "handler": "_1Y841HBakNfExDIHJer1y3",
|
41539 | "hover": "_2edsf-nJOzMp_uPPUyjaas",
|
41540 | "dragging": "_3Cd157NtzF25HdI40gEa8C"
|
41541 | };
|
41542 |
|
41543 | }),
|
41544 |
|
41545 | (function(module, exports, __webpack_require__) {
|
41546 |
|
41547 |
|
41548 |
|
41549 |
|
41550 | var content = __webpack_require__(204);
|
41551 | if(typeof content === 'string') content = [[module.i, content, '']];
|
41552 |
|
41553 | var transform;
|
41554 |
|
41555 | var options = {}
|
41556 | options.transform = transform
|
41557 |
|
41558 | var update = __webpack_require__(35)(content, options);
|
41559 | if(content.locals) module.exports = content.locals;
|
41560 |
|
41561 | if(false) {
|
41562 |
|
41563 | if(!content.locals) {
|
41564 | module.hot.accept("!!../../node_modules/css-loader/index.js?importLoaders=1&modules!./Track.css", function() {
|
41565 | var newContent = require("!!../../node_modules/css-loader/index.js?importLoaders=1&modules!./Track.css");
|
41566 | if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
|
41567 | update(newContent);
|
41568 | });
|
41569 | }
|
41570 |
|
41571 | module.hot.dispose(function() { update(); });
|
41572 | }
|
41573 |
|
41574 | }),
|
41575 |
|
41576 | (function(module, exports, __webpack_require__) {
|
41577 |
|
41578 | exports = module.exports = __webpack_require__(34)(undefined);
|
41579 |
|
41580 |
|
41581 |
|
41582 |
|
41583 | exports.push([module.i, ".UisIHLSNDazEJzAYBR5F3 {\n position: absolute;\n top: 0px; right: 2px;\n width: 7px;\n height: 100%;\n\n padding: 0;\n\n border-radius: 4px;\n\n opacity: 1;\n\n pointer-events: none;\n\n transition: opacity .4s linear;\n -webkit-transition: opacity .4s linear;\n -moz-transition: opacity .4s linear;\n -ms-transition: opacity .4s linear;\n -o-transition: opacity .4s linear;\n}\n\n.ZW_yWyX03kZuljUcD63zL {\n opacity: 0;\n}\n", ""]);
|
41584 |
|
41585 |
|
41586 | exports.locals = {
|
41587 | "track": "UisIHLSNDazEJzAYBR5F3",
|
41588 | "hidden": "ZW_yWyX03kZuljUcD63zL"
|
41589 | };
|
41590 |
|
41591 | }),
|
41592 |
|
41593 | (function(module, exports, __webpack_require__) {
|
41594 |
|
41595 | "use strict";
|
41596 |
|
41597 |
|
41598 | Object.defineProperty(exports, "__esModule", {
|
41599 | value: true
|
41600 | });
|
41601 |
|
41602 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
41603 |
|
41604 | var _react = __webpack_require__(14);
|
41605 |
|
41606 | var _react2 = _interopRequireDefault(_react);
|
41607 |
|
41608 | var _propTypes = __webpack_require__(25);
|
41609 |
|
41610 | var _propTypes2 = _interopRequireDefault(_propTypes);
|
41611 |
|
41612 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
41613 |
|
41614 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
41615 |
|
41616 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
41617 |
|
41618 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
41619 |
|
41620 | var Overflow = function (_Component) {
|
41621 | _inherits(Overflow, _Component);
|
41622 |
|
41623 | function Overflow() {
|
41624 | _classCallCheck(this, Overflow);
|
41625 |
|
41626 | return _possibleConstructorReturn(this, (Overflow.__proto__ || Object.getPrototypeOf(Overflow)).apply(this, arguments));
|
41627 | }
|
41628 |
|
41629 | _createClass(Overflow, [{
|
41630 | key: 'render',
|
41631 | value: function render() {
|
41632 | var _this2 = this;
|
41633 |
|
41634 | return _react2.default.createElement(
|
41635 | 'div',
|
41636 | {
|
41637 | ref: function ref(r) {
|
41638 | return _this2.node = r;
|
41639 | },
|
41640 | className: this.props.className,
|
41641 | onScroll: this.props.onScroll,
|
41642 | onWheel: this.props.onWheel
|
41643 | },
|
41644 | this.props.children
|
41645 | );
|
41646 | }
|
41647 | }]);
|
41648 |
|
41649 | return Overflow;
|
41650 | }(_react.Component);
|
41651 |
|
41652 | Overflow.propTypes = {
|
41653 | className: _propTypes2.default.string,
|
41654 | onScroll: _propTypes2.default.func,
|
41655 | onWheel: _propTypes2.default.func,
|
41656 | children: _propTypes2.default.element
|
41657 | };
|
41658 | exports.default = Overflow;
|
41659 |
|
41660 | }),
|
41661 |
|
41662 | (function(module, exports, __webpack_require__) {
|
41663 |
|
41664 | "use strict";
|
41665 |
|
41666 |
|
41667 | Object.defineProperty(exports, "__esModule", {
|
41668 | value: true
|
41669 | });
|
41670 |
|
41671 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
41672 |
|
41673 | var _react = __webpack_require__(14);
|
41674 |
|
41675 | var _react2 = _interopRequireDefault(_react);
|
41676 |
|
41677 | var _propTypes = __webpack_require__(25);
|
41678 |
|
41679 | var _propTypes2 = _interopRequireDefault(_propTypes);
|
41680 |
|
41681 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
41682 |
|
41683 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
41684 |
|
41685 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
41686 |
|
41687 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
41688 |
|
41689 | var Inner = function (_Component) {
|
41690 | _inherits(Inner, _Component);
|
41691 |
|
41692 | function Inner() {
|
41693 | _classCallCheck(this, Inner);
|
41694 |
|
41695 | return _possibleConstructorReturn(this, (Inner.__proto__ || Object.getPrototypeOf(Inner)).apply(this, arguments));
|
41696 | }
|
41697 |
|
41698 | _createClass(Inner, [{
|
41699 | key: 'render',
|
41700 | value: function render() {
|
41701 | var _this2 = this;
|
41702 |
|
41703 | return _react2.default.createElement(
|
41704 | 'div',
|
41705 | {
|
41706 | ref: function ref(r) {
|
41707 | return _this2.node = r;
|
41708 | },
|
41709 | className: this.props.className,
|
41710 | style: { marginRight: this.props.innerMargin }
|
41711 | },
|
41712 | this.props.children
|
41713 | );
|
41714 | }
|
41715 | }]);
|
41716 |
|
41717 | return Inner;
|
41718 | }(_react.Component);
|
41719 |
|
41720 | Inner.propTypes = {
|
41721 | innerMargin: _propTypes2.default.number,
|
41722 | className: _propTypes2.default.string,
|
41723 | children: _propTypes2.default.node
|
41724 | };
|
41725 | exports.default = Inner;
|
41726 |
|
41727 | }),
|
41728 |
|
41729 | (function(module, exports, __webpack_require__) {
|
41730 |
|
41731 |
|
41732 |
|
41733 |
|
41734 | var content = __webpack_require__(208);
|
41735 | if(typeof content === 'string') content = [[module.i, content, '']];
|
41736 |
|
41737 | var transform;
|
41738 |
|
41739 | var options = {}
|
41740 | options.transform = transform
|
41741 |
|
41742 | var update = __webpack_require__(35)(content, options);
|
41743 | if(content.locals) module.exports = content.locals;
|
41744 |
|
41745 | if(false) {
|
41746 |
|
41747 | if(!content.locals) {
|
41748 | module.hot.accept("!!../../node_modules/css-loader/index.js?importLoaders=1&modules!./App.css", function() {
|
41749 | var newContent = require("!!../../node_modules/css-loader/index.js?importLoaders=1&modules!./App.css");
|
41750 | if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
|
41751 | update(newContent);
|
41752 | });
|
41753 | }
|
41754 |
|
41755 | module.hot.dispose(function() { update(); });
|
41756 | }
|
41757 |
|
41758 | }),
|
41759 |
|
41760 | (function(module, exports, __webpack_require__) {
|
41761 |
|
41762 | exports = module.exports = __webpack_require__(34)(undefined);
|
41763 |
|
41764 |
|
41765 |
|
41766 |
|
41767 | exports.push([module.i, "._1mIKZJ1ppHXnAYj6-pmZFT {\n width: 100%; height: 100%;\n max-width: 980px;\n margin: auto;\n}\n\n._3aKkg-KkxDrpYUnnaj4t-q {\n margin-bottom: 40px;\n}\n\n._3aKkg-KkxDrpYUnnaj4t-q img {\n display: block;\n pointer-events: none;\n}\n\n._39ZFcwc_k_DRCHc2m9zYr- {\n width: 360px;\n height: 500px;\n background: #FFF;\n}\n", ""]);
|
41768 |
|
41769 |
|
41770 | exports.locals = {
|
41771 | "wrapper": "_1mIKZJ1ppHXnAYj6-pmZFT",
|
41772 | "example": "_3aKkg-KkxDrpYUnnaj4t-q",
|
41773 | "exampleContainer": "_39ZFcwc_k_DRCHc2m9zYr-"
|
41774 | };
|
41775 |
|
41776 | }),
|
41777 |
|
41778 | (function(module, exports, __webpack_require__) {
|
41779 |
|
41780 | module.exports = __webpack_require__.p + "example.png";
|
41781 |
|
41782 | }),
|
41783 |
|
41784 | (function(module, exports, __webpack_require__) {
|
41785 |
|
41786 | module.exports = __webpack_require__.p + "index.html";
|
41787 |
|
41788 | })
|
41789 | ]); |
\ | No newline at end of file |